projects/guix·blob bootstrap-team · refs

89 lines · 3.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2017 Efraim Flashner <[email protected]>
4;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2018, 2019 Ludovic Courtès <[email protected]>
6;;; Copyright © 2021 Maxim Cournoyer <[email protected]>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages lsof)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix gexp)
29 #:use-module (guix utils)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages groff)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages linux))
36
37(define-public lsof
38 (package
39 (name "lsof")
40 (version "4.99.3")
41 (source (origin
42 (method git-fetch)
43 (uri (git-reference
44 (url "https://github.com/lsof-org/lsof")
45 (commit version)))
46 (file-name (git-file-name name version))
47 (sha256
48 (base32
49 "1v32407al4j0hhcph95lv4xvr9h012lii29iyq41iwj39zwfavax"))
50 (patches (search-patches "lsof-compat-linux-6.9.patch"))))
51 (build-system gnu-build-system)
52 (native-inputs (list automake
53 autoconf
54 groff ;for soelim
55 libtool
56 perl
57 pkg-config
58 procps ;for ps
59 util-linux)) ;for unshare
60 (arguments
61 (list #:phases
62 #~(modify-phases %standard-phases
63 (add-after 'unpack 'fix-configure-ac-version
64 ;; see https://github.com/lsof-org/lsof/commit/932a0b3b1992497e23fd9b8d31116b9ca9b0f98d
65 ;; to fix tests/case-01-version.bash test fail.
66 (lambda _
67 (substitute* "configure.ac"
68 (("4\\.99\\.0")
69 "4.99.3"))))
70 (add-before 'bootstrap 'disable-failing-tests
71 (lambda _
72 (substitute* "Makefile.am"
73 ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
74 (("(TESTS \\+=.*) tests/LTsock" _ prefix)
75 prefix)
76 ;; Fails on CoW filesystems (eg. btrfs)
77 (("tests/LTlock") "")
78 ;; Fails because /proc not mounted in sandbox
79 (("\tdialects/linux/tests/case-20-epoll.bash \\\\")
80 "\\")))))))
81 (synopsis "Display information about open files")
82 (description
83 "Lsof stands for LiSt Open Files, and it does just that.
84It lists information about files that are open by the processes running
85on the system.")
86 (license (license:fsf-free
87 "file://00FAQ"
88 "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
89 (home-page "https://people.freebsd.org/~abe/")))