From patchwork Tue Apr 11 08:18:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiajie Chen X-Patchwork-Id: 49100 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 91F4B174B4; Tue, 11 Apr 2023 23:27:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 64C8E174A3 for ; Tue, 11 Apr 2023 23:27:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmMSd-000454-1q; Tue, 11 Apr 2023 18:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmGf5-0006HN-27 for guix-patches@gnu.org; Tue, 11 Apr 2023 12:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmGf4-0008W7-OX for guix-patches@gnu.org; Tue, 11 Apr 2023 12:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmGf4-0001qW-AN for guix-patches@gnu.org; Tue, 11 Apr 2023 12:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62777] [PATCH] gnu: lsof: Update to 4.98.0 Resent-From: Jiajie Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 Apr 2023 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62777@debbugs.gnu.org Cc: Jiajie Chen X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16812297337040 (code B ref -1); Tue, 11 Apr 2023 16:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2023 16:15:33 +0000 Received: from localhost ([127.0.0.1]:38059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmGeW-0001pQ-QU for submit@debbugs.gnu.org; Tue, 11 Apr 2023 12:15:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:51578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pm9DR-0001lL-3M for submit@debbugs.gnu.org; Tue, 11 Apr 2023 04:19:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm9DQ-0003as-I5 for guix-patches@gnu.org; Tue, 11 Apr 2023 04:19:00 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm9DN-0003q9-9q for guix-patches@gnu.org; Tue, 11 Apr 2023 04:18:59 -0400 Received: (Authenticated sender: c@jia.je) by mail.gandi.net (Postfix) with ESMTPSA id 0E7DB60007; Tue, 11 Apr 2023 08:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jia.je; s=gm1; t=1681201133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1QQJ3lUbopeJvs5ZA9rbt+7gL6cuvBiebPEvJrdZT+w=; b=aE26M92JuFgFWWhsv2pasgxCVPtgrXWSCkBKO2W6w8zIypwYDd9fWE6UvdLGw2n1Cqqzfn M7808oP8gwjufigaM/cVtBslVLi7bL86rXx+tKdxMV0mmVfG67JoCxS0w6ILCjSbgw6+CY uBchIxeAiv9jj1u6NrqPnGis8eQLk1+CkIPnJ1YIT7KB6Mc2VCMGOr4eUh3vRMXB4k2Mnl AiNLsovFRaULUlK0CKM5j8rOJV9YpOpXsbkdKf8Zqy7ji3t/Mvo18y+iJG2IEaRY8AyVPn bAMNnIIMVDqwKNgRc4tUjrbtR1AVjIhe6ZG00uGKt3EpCwgRiqfYh+3xkkoRHA== From: Jiajie Chen Date: Tue, 11 Apr 2023 16:18:45 +0800 Message-Id: <20230411081845.1010857-1-c@jia.je> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.195; envelope-from=c@jia.je; helo=relay3-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 11 Apr 2023 12:15:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 11 Apr 2023 18:27:32 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lsof.scm (lsof): Update to 4.98.0 and switch to autotools. --- gnu/packages/lsof.scm | 99 ++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 67 deletions(-) diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 5f413483f4..6a46744edc 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -27,84 +27,49 @@ (define-module (gnu packages lsof) #:use-module (guix build-system gnu) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages groff) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages linux)) (define-public lsof (package (name "lsof") - (version "4.94.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/lsof-org/lsof") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")) - (patches (search-patches "lsof-fatal-test-failures.patch")))) + (version "4.98.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lsof-org/lsof") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cjmhd01p5a9cy52lirv1rkidrzhyn366f4h212jcf1cmp8xh0hd")))) (build-system gnu-build-system) - (native-inputs - (list groff ; for soelim - perl)) + (native-inputs (list automake + autoconf + groff ;for soelim + perl + pkg-config + procps ;for ps + util-linux)) ;for unshare (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'configure - (lambda _ - (setenv "LSOF_CC" ,(cc-for-target)) - ,@(if (%current-target-system) - '((setenv "LINUX_CONF_CC" "gcc")) - '()) - (setenv "LSOF_MAKE" "make") - - ;; By default, the makefile captures the output of 'uname -a'. - ;; Provide a fixed output instead to make builds reproducible. - (setenv "LSOF_SYSINFO" - (string-append "GNU/" (utsname:sysname (uname)) - " (GNU Guix)")) - - (invoke "./Configure" "linux"))) - (add-after 'configure 'patch-timestamps - (lambda _ - (substitute* "Makefile" - (("`date`") "`date --date=@1`")))) - (add-after 'build 'build-man-page - (lambda _ - (with-output-to-file "lsof.8" - (lambda _ (invoke "soelim" "Lsof.8"))))) - (add-before 'check 'disable-failing-tests - (lambda _ - (substitute* "tests/Makefile" - ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’. - (("(STDTST=.*) LTsock" _ prefix) prefix) - ;; LTnfs fails without access to a remote NFS server, and LTlock - ;; fails when run on a Btrfs file system (see: - ;; https://github.com/lsof-org/lsof/issues/152). - (("OPTTST=[[:space:]]*LTbigf LTdnlc LTlock LTnfs") - "OPTTST = LTbigf LTdnlc")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion "tests" - ;; Tests refuse to run on ‘unvalidated’ platforms. - (make-file-writable "TestDB") - (invoke "./Add2TestDB") - - ;; The ‘standard’ tests suggest running ‘optional’ ones as well. - (invoke "make" "standard" "optional"))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (install-file "lsof" (string-append out "/bin")) - (install-file "lsof.8" (string-append out "/share/man/man8")))))))) + `(#:phases (modify-phases %standard-phases + (add-before 'bootstrap 'disable-failing-tests + (lambda _ + (substitute* "Makefile.am" + ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’. + (("(TESTS \\+=.*) tests/LTsock" _ prefix) + prefix) + ;; Fails because /proc not mounted in sandbox + (("\tdialects/linux/tests/case-20-epoll.bash \\\\") + "\\"))))))) (synopsis "Display information about open files") (description "Lsof stands for LiSt Open Files, and it does just that. It lists information about files that are open by the processes running on the system.") - (license (license:fsf-free - "file://00FAQ" + (license (license:fsf-free "file://00FAQ" "License inspired by zlib, see point 1.9 of 00FAQ in the distribution.")) (home-page "https://people.freebsd.org/~abe/")))