X-Git-Url: http://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/409e20a65c556cad85f132f02564fb9f1f35a4f7..5c3cb22c9b2810669999e044b2de5e9331011a83:/gnu/packages/admin.scm diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 57d509a184..0d61e37b8f 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1,8 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020 Eric Bavier +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Alex Sassmannshausen ;;; Copyright © 2015 Eric Dvorsak @@ -17,7 +17,7 @@ ;;; Copyright © 2016 John Darrington ;;; Copyright © 2017 Ben Sturmfels ;;; Copyright © 2017 Ethan R. Jones -;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2017 Christine Lemmer-Webber ;;; Copyright © 2017, 2018, 2020 Marius Bakke ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2018 Pierre-Antoine Rouby @@ -29,17 +29,22 @@ ;;; Copyright © 2019 Hartmut Goebel ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019, 2021 Guillaume Le Vaillant -;;; Copyright © 2019, 2020 Mathieu Othacehe +;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Michael Rohleder ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Morgan Smith +;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 qblade ;;; Copyright © 2021 Hyunseok Kim ;;; Copyright © 2021 David Larsson +;;; Copyright © 2021 WinterHound +;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -132,11 +137,14 @@ #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) + #:use-module (gnu packages selinux) #:use-module (gnu packages serialization) + #:use-module (gnu packages ssh) #:use-module (gnu packages sphinx) #:use-module (gnu packages tcl) #:use-module (gnu packages terminals) #:use-module (gnu packages texinfo) + #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages web) @@ -269,7 +277,14 @@ and provides a \"top-like\" mode (monitoring).") version ".tar.gz")) (sha256 (base32 - "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk")))) + "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Build with -O1 to work around . + (substitute* "Makefile.in" + (("compile --target") + "compile -O1 --target")))))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--localstatedir=/var") @@ -469,6 +484,34 @@ services.") (license license:public-domain) (home-page "https://cr.yp.to/daemontools.html"))) +(define-public daemonize + (package + (name "daemonize") + (version "1.7.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bmc/daemonize") + (commit (string-append "release-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm")))) + (build-system gnu-build-system) + (arguments '(#:tests? #f)) ; No tests available. + (home-page "http://software.clapper.org/daemonize/") + (synopsis "Command line utility to run a program as a daemon") + (description + "daemonize runs a command as a Unix daemon. It will close all open file +descriptors, change working directory of the process to the root filesystem, +reset its umask, run in the background, ignore I/O signals, handle +@code{SIGCLD}, etc. Most programs that are designed to be run as daemons do +that work for themselves. However, you’ll occasionally run across one that +does not. When you must run a daemon program that does not properly make +itself into a true Unix daemon, you can use daemonize to force it to run as a +true daemon.") + (license license:bsd-3))) + (define-public dfc (package (name "dfc") @@ -617,7 +660,8 @@ console.") `(("ncurses" ,ncurses))) (native-inputs `(("autoconf" ,autoconf) - ("automake" ,automake))) + ("automake" ,automake) + ("python" ,python-minimal-wrapper))) ; for scripts/MakeHeader.py (home-page "https://htop.dev") (synopsis "Interactive process viewer") (description @@ -652,14 +696,13 @@ memory, disks, network and processes.") (define-public bpytop (package (name "bpytop") - (version "1.0.63") + (version "1.0.67") (source (origin (method url-fetch) (uri (pypi-uri "bpytop" version)) (sha256 - (base32 - "0ql72s842g56rnzdqja6m53lw5y68c4gb540ihp1bjg7x9ycim11")))) + (base32 "1fwmiwvs8ax9az3hbp1p79x6m3wq73pn3vkbhcg9jvps4wv8wcwb")))) (build-system python-build-system) (inputs `(("python-psutil" ,python-psutil))) @@ -674,19 +717,19 @@ memory, disks, network and processes.") (package-version python)) "/site-packages/bpytop-themes"))) (mkdir-p themes) - (copy-recursively "bpytop-themes" themes))))))) + (copy-recursively "themes" themes))))))) (home-page "https://github.com/aristocratos/bpytop") (synopsis "Resource monitor") (description "Resource monitor that shows usage and stats for processor, -memory, disks, network and processes. It's a Python port of +memory, disks, network and processes. It's a Python port and continuation of @command{bashtop}.") (license license:asl2.0))) (define-public pies (package (name "pies") - (version "1.5") + (version "1.6") (source (origin (method url-fetch) @@ -694,7 +737,7 @@ memory, disks, network and processes. It's a Python port of version ".tar.bz2")) (sha256 (base32 - "11j168qljsinaj5dwmg7nkm2z1aghi6gc3d0wf0pikflnh2q2wqf")))) + "0ad5bg1czwmr4qw33aszxzc6ll99a9lfs32lyfb1wl5x9s1cc7az")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -719,15 +762,14 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "1.9.4") + (version "2.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) - (patches (search-patches "inetutils-hurd.patch")) (sha256 (base32 - "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy")))) + "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--localstatedir=/var" @@ -748,10 +790,17 @@ re-executing them as necessary.") "--disable-uucpd" "--disable-whois") '())) + ;; Make sure that canonical "coreutils" package is not referred. + #:make-flags + (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\"" + (assoc-ref %build-inputs "coreutils*") + "/bin/cp\\\"")) ;; On some systems, 'libls.sh' may fail with an error such as: ;; "Failed to tell switch -a apart from -A". #:parallel-tests? #f)) - (inputs `(("ncurses" ,ncurses) + (inputs `(("coreutils*" ,coreutils) + ("shadow" ,shadow) ;for login (used in telnetd and rlogind) + ("ncurses" ,ncurses) ("readline" ,readline))) ;for 'ftp' (native-inputs (if (member (%current-system) (package-supported-systems net-tools)) @@ -790,6 +839,17 @@ hostname.") #:phases (modify-phases %standard-phases + ,@(if (%current-target-system) + '((add-before 'configure 'set-runtime-shell + (lambda* (#:key inputs #:allow-other-keys) + (let ((shell (string-append + (assoc-ref inputs "bash") + "/bin/bash"))) + (setenv "RUNTIME_SHELL" shell) + (substitute* "configure.ac" + (("\\$SHELL") + "$RUNTIME_SHELL")))))) + '()) (add-before 'build 'set-nscd-file-name (lambda* (#:key inputs #:allow-other-keys) ;; Use the right file name for nscd. @@ -814,7 +874,10 @@ hostname.") (inputs `(,@(if (hurd-target?) '() - `(("linux-pam" ,linux-pam))))) + `(("linux-pam" ,linux-pam))) + ,@(if (%current-target-system) + `(("bash" ,bash-minimal)) + '()))) (home-page "https://github.com/shadow-maint/shadow") (synopsis "Authentication-related tools such as passwd, su, and login") (description @@ -893,6 +956,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder (begin (use-modules (guix build utils) (srfi srfi-26)) @@ -1107,7 +1175,7 @@ connection alive.") (define-public isc-dhcp (let* ((bind-major-version "9") (bind-minor-version "11") - (bind-patch-version "29") + (bind-patch-version "32") (bind-release-type "") ; for patch release, use "-P" (bind-release-version "") ; for patch release, e.g. "6" (bind-version (string-append bind-major-version @@ -1119,14 +1187,15 @@ connection alive.") bind-release-version))) (package (name "isc-dhcp") - (version "4.4.2") + (version "4.4.2-P1") (source (origin (method url-fetch) (uri (string-append "https://ftp.isc.org/isc/dhcp/" version "/dhcp-" version ".tar.gz")) + (patches (search-patches "isc-dhcp-gcc-compat.patch")) (sha256 (base32 - "08a5003zdxgl41b29zjkxa92h2i40zyjgxg0npvnhpkfl5jcsz0s")))) + "06jsr0cg5rsmyibshrpcb9za0qgwvqccashdma7mlm1rflrh8pmh")))) (build-system gnu-build-system) (arguments `(#:parallel-build? #f @@ -1198,7 +1267,11 @@ connection alive.") "--owner=root:0" "--group=root:0"))))) (add-after 'install 'post-install - (lambda* (#:key inputs outputs #:allow-other-keys) + ;; TODO(core-updates): native-inputs isn't required anymore. + (lambda* (#:key ,@(if (%current-target-system) + '(native-inputs) + '()) + inputs outputs #:allow-other-keys) ;; Install the dhclient script for GNU/Linux and make sure ;; if finds all the programs it needs. (let* ((out (assoc-ref outputs "out")) @@ -1209,8 +1282,7 @@ connection alive.") (sed (assoc-ref inputs "sed*"))) (substitute* "client/scripts/linux" (("/sbin/ip") - (string-append (assoc-ref inputs "iproute") - "/sbin/ip"))) + (search-input-file inputs "/sbin/ip"))) (mkdir-p libexec) (copy-file "client/scripts/linux" @@ -1223,6 +1295,19 @@ connection alive.") (string-append dir "/bin:" dir "/sbin")) (list inetutils net-tools coreutils sed)))) + ;; TODO(core-updates): should not be required anymore, + ;; once has been merged. + ,@(if (%current-target-system) + '((for-each + (lambda (file) + (substitute* file + (((assoc-ref native-inputs "bash")) + (assoc-ref inputs "bash")))) + (list (string-append libexec + "/dhclient-script") + (string-append libexec + "/.dhclient-script-real")))) + '()) #t)))))) (native-inputs @@ -1230,6 +1315,11 @@ connection alive.") ("file" ,file))) (inputs `(("inetutils" ,inetutils) + ;; TODO(core-updates): simply make this unconditional + ,@(if (%current-target-system) + ;; for wrap-program + `(("bash" ,(canonical-package bash-minimal))) + '()) ,@(if (hurd-target?) '() `(("net-tools" ,net-tools) ("iproute" ,iproute))) @@ -1244,12 +1334,12 @@ connection alive.") "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "01vvkvlhsxz4ffz2fw86z0fsf170b93jjnn5710ai6vfri8wgfy7")))) + "0hhkb4d14hvly2751cxl2s2xyim3bri8qaisgkcm456xfi5wpy6b")))) ("coreutils*" ,coreutils) ("sed*" ,sed))) - (home-page "https://www.isc.org/products/DHCP/") + (home-page "https://www.isc.org/dhcp/") (synopsis "Dynamic Host Configuration Protocol (DHCP) tools") (description "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a @@ -1258,24 +1348,64 @@ tools: server, client, and relay agent.") (license license:mpl2.0) (properties '((cpe-name . "dhcp")))))) +(define-public radvd + (package + (name "radvd") + (version "2.19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/radvd-project/radvd") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1df827m3vkjq2bcs5y9wg2cygvpdwl8ppl446qqhyym584gz54nl")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("bison" ,bison) + ("check" ,check) + ("flex" ,flex) + ("pkg-config" ,pkg-config))) + (arguments + `(#:configure-flags '("--with-check"))) + (home-page "https://radvd.litech.org/") + (synopsis "IPv6 Router Advertisement Daemon") + (description + "The Router Advertisement Daemon (radvd) is run on systems acting as IPv6 +routers. It sends Router Advertisement messages specified by RFC 2461 +periodically and when requested by a node sending a Router Solicitation +message. These messages are required for IPv6 stateless autoconfiguration.") + (license (license:non-copyleft "file://COPYRIGHT")))) + (define-public libpcap (package (name "libpcap") - (version "1.10.0") + (version "1.10.1") (source (origin (method url-fetch) (uri (string-append "https://www.tcpdump.org/release/libpcap-" version ".tar.gz")) (sha256 (base32 - "07ibr6zzfh1wk5gqcbnlyh6v0dfmhpfd0fqj5y3yxvzf4ckb84ld")))) + "1m5x26vlbymp90k1qh0w3nj2nxzyvfrmfmwpj17k81dgri55ya7d")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) ("flex" ,flex))) (arguments ;; There are some tests in testprogs/, but no automated test suite. - '(#:tests? #f)) + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'omit-static-library + ;; Neither build nor install libpcap.a. + (lambda _ + (substitute* "Makefile.in" + ((" libpcap\\.a") "") + ((" install-archive ") " "))))))) (home-page "https://www.tcpdump.org") (synopsis "Network packet capture library") (description @@ -1289,14 +1419,14 @@ network statistics collection, security monitoring, network debugging, etc.") (define-public tcpdump (package (name "tcpdump") - (version "4.99.0") + (version "4.99.1") (source (origin (method url-fetch) (uri (string-append "https://www.tcpdump.org/release/tcpdump-" version ".tar.gz")) (sha256 (base32 - "0hmqh2fx8rgs9v1mk3vpywj61xvkifz260q685xllxr8jmxg3wlc")))) + "1ghfs5gifzrk3813zf9zalfbjs70wg6llz6q31k180r7zf2nkcvr")))) (build-system gnu-build-system) (inputs `(("libpcap" ,libpcap) ("openssl" ,openssl))) @@ -1503,8 +1633,7 @@ at once based on a Perl regular expression.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "rc/rc" (("/usr/sbin/sendmail") - (string-append (assoc-ref inputs "mailutils") - "/bin/mail"))) + (search-input-file inputs "/bin/mail"))) #t)) (add-after 'unpack 'fix-configure (lambda* (#:key inputs native-inputs #:allow-other-keys) @@ -1558,7 +1687,7 @@ system administrator.") (define-public sudo (package (name "sudo") - (version "1.9.6p1") + (version "1.9.8") (source (origin (method url-fetch) (uri @@ -1568,7 +1697,7 @@ system administrator.") version ".tar.gz"))) (sha256 (base32 - "146alf6cwnzjcckia8m0ibcj9ram2z469f5z7v6vkzpsb30cvsd9")) + "1rlln9nb3lvg4qlkp0c9qxjflx36rf16mflg0sps2kl0k7lmswzi")) (modules '((guix build utils))) (snippet '(begin @@ -1633,10 +1762,7 @@ system administrator.") ;; the chroot's /etc/passwd doesn't have it. Turn off the tests. #:tests? #f)) (native-inputs - ;; XXX TODO: Remove on next rebuild cycle. - (if (hurd-target?) - '() - `(("groff" ,groff)))) + `(("groff" ,groff))) (inputs `(("coreutils" ,coreutils) ,@(if (hurd-target?) @@ -1671,18 +1797,27 @@ commands and their arguments.") (arguments `(#:phases (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "GNUmakefile" + (("^\tchown.*$") "")) + ;; OpenDoas look for binaries in safepath when a rule specify a + ;; relative command, such as “permit keepenv :wheel cmd guix”. + (substitute* "doas.c" + (("safepath =" match) + (string-append match " \"" + "/run/setuid-programs:" + "/run/current-system/profile/bin:" + "/run/current-system/profile/sbin:" + "\" "))) + #t)) (replace 'configure ;; The configure script doesn't accept most of the default flags. (lambda* (#:key configure-flags #:allow-other-keys) ;; The configure script can be told which compiler to use only ;; through environment variables. (setenv "CC" ,(cc-for-target)) - (apply invoke "./configure" configure-flags))) - (add-before 'install 'fix-makefile - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "GNUmakefile" - (("^\tchown.*$") "")) - #t))) + (apply invoke "./configure" configure-flags)))) #:configure-flags (list (string-append "--prefix=" (assoc-ref %outputs "out")) "--with-timestamp") @@ -1838,7 +1973,7 @@ command.") (package (inherit wpa-supplicant) (name "wpa-supplicant-gui") - (inputs `(("qtbase" ,qtbase) + (inputs `(("qtbase" ,qtbase-5) ("qtsvg" ,qtsvg) ,@(package-inputs wpa-supplicant))) (native-inputs @@ -2026,15 +2161,15 @@ module slots, and the list of I/O ports (e.g. serial, parallel, USB).") (define-public acpica (package (name "acpica") - (version "20210331") + (version "20210604") (source (origin (method url-fetch) (uri (string-append "https://acpica.org/sites/acpica/files/acpica-unix2-" - version ".tar.gz")) + version ".tar_0.gz")) (sha256 (base32 - "1h98pvc9iy1c49cid0ppjwk5zsy2m1xbvfqb72pkwkrd4rn35arx")))) + "1wsgg6fx7bhbpfzhbpbq2r7jpmv4c4n7v0zidbh25swrz7kfgpwz")))) (build-system gnu-build-system) (native-inputs `(("flex" ,flex) ("bison" ,bison))) @@ -2109,7 +2244,7 @@ system is under heavy load.") (define-public detox (package (name "detox") - (version "1.3.3") + (version "1.4.2") (source (origin (method git-fetch) (uri (git-reference @@ -2118,21 +2253,23 @@ system is under heavy load.") (file-name (git-file-name name version)) (sha256 (base32 - "13mhs62m7bpff45liy65pajq5jg3i12jj90vwdkra94z9mlr2rlz")))) + "0q16dvjbry573j4ayh9dwskdh1dxx8dk4rj94w6f2dcv4ww37is1")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("flex" ,flex))) (arguments - `(#:tests? #f ;no 'check' target - #:phases (modify-phases %standard-phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'delete-configure ;; The "configure" script is present, but otherwise the ;; project is not bootstrapped: missing install-sh and ;; Makefile.in, so delete it so the bootstrap phase will ;; take over. - (lambda _ (delete-file "configure") #t))))) + (lambda _ (delete-file "configure") #t)) + (replace 'check + (lambda _ + (invoke "./tests/test.sh" "src/detox")))))) (home-page "https://github.com/dharple/detox") (synopsis "Clean up file names") (description @@ -2381,40 +2518,29 @@ Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number of supported upstream metrics systems simultaneously.") (license license:gpl2+))) -(define-public ansible +(define-public ansible-core (package - (name "ansible") - (version "2.9.18") + (name "ansible-core") + (version "2.11.4") (source (origin (method url-fetch) - (uri (pypi-uri "ansible" version)) + (uri (pypi-uri "ansible-core" version)) (sha256 - (base32 "0g6rsnh02zq5nizamgakl2wvgz7hk1lpnjn9akldrcpa55vygzjm")))) + (base32 + "0jgahcv2pyc5ky0wir55a1h9q9d6rgqj60rqmvlpbj76vz1agsi2")))) (build-system python-build-system) - (native-inputs - `(("python-bcrypt" ,python-bcrypt) - ("python-pynacl" ,python-pynacl) - ("python-httplib2" ,python-httplib2) - ("python-passlib" ,python-passlib) - ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("python-jinja2" ,python-jinja2) - ("python-pyyaml" ,python-pyyaml) - ("python-paramiko" ,python-paramiko))) - (inputs - `(("python-cryptography" ,python-cryptography) - ("python-jinja2" ,python-jinja2) - ("python-pyyaml" ,python-pyyaml) - ("python-paramiko" ,python-paramiko))) (arguments - `(#:phases + `(#:modules ((guix build python-build-system) + (guix build utils) + (ice-9 ftw)) + #:phases (modify-phases %standard-phases ;; Several ansible commands (ansible-config, ansible-console, etc.) - ;; are just symlinks to a single ansible executable. The ansible - ;; executable behaves differently based on the value of - ;; sys.argv[0]. This does not work well with our wrap phase, and - ;; therefore the following two phases are required as a workaround. + ;; are just symlinks to a single ansible executable. The ansible + ;; executable behaves differently based on the value of sys.argv[0]. + ;; This does not work well with our wrap phase, and therefore the + ;; following two phases are required as a workaround. (add-after 'unpack 'hide-wrapping (lambda _ ;; Overwrite sys.argv[0] to hide the wrapper script from it. @@ -2423,27 +2549,138 @@ of supported upstream metrics systems simultaneously.") (string-append all " import re sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0]) -"))) - #t)) +"))))) (add-after 'install 'replace-symlinks (lambda* (#:key outputs #:allow-other-keys) ;; Replace symlinks with duplicate copies of the ansible - ;; executable. - (let ((out (assoc-ref outputs "out"))) + ;; executable so that sys.argv[0] has the correct value. + (define bin (string-append (assoc-ref outputs "out") "/bin")) + (with-directory-excursion bin (for-each - (lambda (subprogram) - (delete-file (string-append out "/bin/ansible-" subprogram)) - (copy-file (string-append out "/bin/ansible") - (string-append out "/bin/ansible-" subprogram))) - (list "config" "console" "doc" "galaxy" - "inventory" "playbook" "pull" "vault"))) - #t))))) + (lambda (ansible-symlink) + (delete-file ansible-symlink) + (copy-file "ansible" ansible-symlink)) + (scandir "." (lambda (x) + (and (eq? 'symlink (stat:type (lstat x))) + (string-prefix? "ansible-" x) + (string=? "ansible" (readlink x))))))))) + (add-after 'unpack 'preserve-pythonpath + (lambda _ + (substitute* "test/lib/ansible_test/_internal/ansible_util.py" + (("PYTHONPATH=get_ansible_python_path\\(args\\)" all) + (string-append all "+ ':' + os.environ['PYTHONPATH']"))))) + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "lib/ansible/module_utils/compat/selinux.py" + (("libselinux.so.1" name) + (string-append (assoc-ref inputs "libselinux") + "/lib/" name))) + (substitute* "test/units/modules/test_async_wrapper.py" + (("/usr/bin/python") + (which "python"))))) + (replace 'check + ;; The environment for the test suite can be tricky to get right. + ;; The environment used for Ansible's CI defined in the following + ;; Dockerfile can be used as a reference: + ;; https://raw.githubusercontent.com/ansible/ + ;; default-test-container/master/Dockerfile. + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + ;; Otherwise Ansible fails to create its config directory. + (setenv "HOME" "/tmp") + (setenv "PATH" (string-append (getenv "PATH") ":" + (assoc-ref outputs "out") "/bin")) + (add-installed-pythonpath inputs outputs) + ;; This test module messes up with sys.path and causes many + ;; test failures. + (delete-file "test/units/_vendor/test_vendor.py") + ;; The test fails when run in the container, for reasons + ;; unknown. + (delete-file "test/units/utils/test_display.py") + ;; This test fail for reasons unknown. + (delete-file "test/units/cli/test_adhoc.py") + ;; The test suite needs to be run with 'ansible-test', which + ;; does some extra environment setup. Taken from + ;; https://raw.githubusercontent.com/ansible/ansible/\ + ;; devel/test/utils/shippable/shippable.sh. + (invoke "ansible-test" "units" "-v"))))))) + (native-inputs + `(("openssh" ,openssh) + ("openssl" ,openssl) + ("python-mock" ,python-mock) + ("python-pycrypto" ,python-pycrypto) + ("python-pytest" ,python-pytest) + ("python-pytest-forked" ,python-pytest-forked) + ("python-pytest-mock" ,python-pytest-mock) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-pytz" ,python-pytz))) + (inputs ;optional dependencies captured in wrap scripts + `(("libselinux" ,libselinux) + ("python-paramiko" ,python-paramiko) + ("python-passlib" ,python-passlib) + ("python-pexpect" ,python-pexpect) + ("sshpass" ,sshpass))) + (propagated-inputs ;core dependencies listed in egg-info/requires.txt + `(("python-cryptography" ,python-cryptography) + ("python-jinja2" ,python-jinja2) + ("python-pyyaml" ,python-pyyaml) + ("python-packaging" ,python-packaging) ;for version number parsing + ("python-resolvelib" ,python-resolvelib-0.5))) (home-page "https://www.ansible.com/") (synopsis "Radically simple IT automation") - (description "Ansible is a radically simple IT automation system. It -handles configuration management, application deployment, cloud provisioning, -ad hoc task execution, and multinode orchestration---including trivializing -things like zero-downtime rolling updates with load balancers.") + (description "Ansible aims to be a radically simple IT automation system. +It handles configuration management, application deployment, cloud +provisioning, ad-hoc task execution, network automation, and multi-node +orchestration. Ansible facilitates complex changes like zero-downtime rolling +updates with load balancers. This package is the core of Ansible, which +provides the following commands: +@itemize +@item ansible +@item ansible-config +@item ansible-connection +@item ansible-console +@item ansible-doc +@item ansible-galaxy +@item ansible-inventory +@item ansible-playbook +@item ansible-pull +@item ansible-test +@item ansible-vault +@end itemize") + (license license:gpl3+))) + +(define-public ansible + (package + (name "ansible") + (version "4.4.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ansible" version)) + (sha256 + (base32 "031n22j0lsmh69x6i6gkva81j68b4yzh1pbg3q2h4bknl85q46ag")))) + (build-system python-build-system) + (propagated-inputs + `(("ansible-core" ,ansible-core))) + ;; The Ansible collections are found by ansible-core via PYTHONPATH; the + ;; following search path ensures that they are found even when Python is + ;; not present in the profile. + (native-search-paths + ;; XXX: Attempting to use (package-native-search-paths python) + ;; here would cause an error about python being an unbound + ;; variable in the tests/cpan.scm test. + (list (search-path-specification + (variable "PYTHONPATH") + (files (list "lib/python3.8/site-packages"))))) + (home-page "https://www.ansible.com/") + (synopsis "Radically simple IT automation") + (description "Ansible aims to be a radically simple IT automation system. +It handles configuration management, application deployment, cloud +provisioning, ad-hoc task execution, network automation, and multi-node +orchestration. Ansible facilitates complex changes like zero-downtime rolling +updates with load balancers. This package provides a curated set of +community-maintained Ansible collections, which contain playbooks, roles, +modules and plugins that extend Ansible.") (license license:gpl3+))) (define-public debops @@ -2775,13 +3012,13 @@ platform-specific methods.") (package (name "audit") (home-page "https://people.redhat.com/sgrubb/audit/") - (version "2.8.5") + (version "3.0.4") (source (origin (method url-fetch) (uri (string-append home-page "audit-" version ".tar.gz")) (sha256 (base32 - "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f")))) + "1xlcvc2g7qrbnin5pw0bacalva5ldjw97yi6nr17g0yjp4jyhnlc")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--with-python=no" @@ -2802,14 +3039,14 @@ done with the @code{auditctl} utility.") (define-public nmap (package (name "nmap") - (version "7.80") + (version "7.91") (source (origin (method url-fetch) (uri (string-append "https://nmap.org/dist/nmap-" version ".tar.bz2")) (sha256 (base32 - "1aizfys6l9f9grm82bk878w56mg0zpkfns3spzj157h98875mypw")) + "001kb5xadqswyw966k2lqi6jr6zz605jpp9w4kmm272if184pk0q")) (modules '((guix build utils))) (snippet '(begin @@ -2866,7 +3103,7 @@ done with the @code{auditctl} utility.") "install-nping") (make ndiff "install-ndiff") (wrap-program (string-append ndiff "/bin/ndiff") - `("PYTHONPATH" prefix + `("GUIX_PYTHONPATH" prefix (,(python-path ndiff))))) #t)) ;; These are the tests that do not require network access. @@ -2885,6 +3122,7 @@ tool. It is also useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. It also provides an advanced netcat implementation (ncat), a utility for comparing scan results (ndiff), and a packet generation and response analysis tool (nping).") + ;; See . ;; This package uses nmap's bundled versions of libdnet and liblinear, which ;; both use a 3-clause BSD license. (license (list license:nmap license:bsd-3)))) @@ -2921,7 +3159,7 @@ results (ndiff), and a packet generation and response analysis tool (nping).") (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-program (string-append out "/bin/dstat") - `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))) #t)))))) (inputs `(("python" ,python-wrapper) @@ -3034,7 +3272,7 @@ produce uniform output across heterogeneous networks.") `(#:tests? #f ; no tests #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CC=gcc") + ,(string-append "CC=" (cc-for-target))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script @@ -3304,7 +3542,7 @@ buffers.") (define-public igt-gpu-tools (package (name "igt-gpu-tools") - (version "1.25") + (version "1.26") (source (origin (method git-fetch) @@ -3313,7 +3551,7 @@ buffers.") (commit (string-append "igt-gpu-tools-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1lvhkdhilw0fn4nzkpfwvrhiv8d92h811qs2v6ac3p5w7v86a9zm")))) + (base32 "0m124pqv7zna25jnvk566c4kk628jr0w8mgnp8mr5xqz9cprgczm")))) (build-system meson-build-system) (arguments `(#:tests? #f)) ; many of the tests try to load kernel modules @@ -3343,52 +3581,6 @@ Intel DRM Driver.") (supported-systems '("i686-linux" "x86_64-linux")) (license license:expat))) -(define-public fabric - (package - (name "fabric") - (version "1.14.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "Fabric" version)) - (sha256 - (base32 - "1a3ndlpdw6bhn8fcw1jgznl117a8pnr84az9rb5fwnrypf1ph2b6")))) - (build-system python-build-system) - (arguments - `(#:python ,python-2 ; Python 2 only - #:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke - "nosetests" "-v" "tests/" - ;; This test hangs indefinitely when run on a single core VM - ;; (see GNU bug #26647 and Debian bug #850230). - "--exclude=test_nested_execution_with_explicit_ports" - ;; This test randomly fails in certain environments causing too - ;; much noise to be useful (see Debian bug #854686). - "--exclude=test_should_use_sentinel_for_tasks_that_errored")))))) - (native-inputs - `(("python2-fudge" ,python2-fudge) ; Requires < 1.0 - ("python2-jinja2" ,python2-jinja2) ; Requires < 3.0 - ("python2-nose" ,python2-nose) ; Requires < 2.0 - ("python2-pynacl" ,python2-pynacl) - ("python2-bcrypt" ,python2-bcrypt))) - (propagated-inputs - `(("python2-paramiko" ,python2-paramiko))) - (home-page "https://www.fabfile.org/") - (synopsis "Simple Pythonic remote execution and deployment tool") - (description - "Fabric is designed to upload files and run shell commands on a number of -servers in parallel or serially. These commands are grouped in tasks (which -are regular Python functions) and specified in a @dfn{fabfile}. - -It is similar to Capistrano, except it's implemented in Python and doesn't -expect you to be deploying Rails applications. Fabric is a simple, Pythonic -tool for remote execution and deployment.") - (license license:bsd-2))) - (define-public neofetch (package (name "neofetch") @@ -3566,14 +3758,14 @@ information tool.") (define-public nnn (package (name "nnn") - (version "3.6") + (version "4.1.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/jarun/nnn/releases/download/v" version "/nnn-v" version ".tar.gz")) (sha256 - (base32 "1dbq16cdipij5ws59ab3alfmxli7n4wx28ip7gsyq8ncxg598l47")))) + (base32 "1fnf35s3b2nfp18s712n5vhg6idx4rfgwdfv74nc2933v9l2dq7h")))) (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses) @@ -3584,33 +3776,26 @@ information tool.") `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-after 'unpack 'patch-pkg-config - (lambda _ - (substitute* "Makefile" - (("pkg-config") - (or (which "pkg-config") - (string-append ,(%current-target-system) - "-pkg-config")))) - #t))) + (delete 'configure)) ; no configure script #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "CC=" ,(cc-for-target))))) + (string-append "CC=" ,(cc-for-target)) + (string-append "PKG_CONFIG=" ,(pkg-config-for-target))))) (home-page "https://github.com/jarun/nnn") (synopsis "Terminal file browser") - (description "@command{nnn} is a fork of @command{noice}, a blazing-fast -lightweight terminal file browser with easy keyboard shortcuts for -navigation, opening files and running tasks. There is no config file and -mime associations are hard-coded. The incredible user-friendliness and speed -make it a perfect utility on modern distros.") + (description + "@command{nnn} is a fork of @command{noice}, a fast and minimal text +terminal file browser with keyboard shortcuts for navigation, opening files and +running tasks. There is no configuration file and MIME associations are +hard-coded.") (license license:bsd-2))) (define-public thermald (package (name "thermald") - (version "2.4.3") + (version "2.4.6") (source (origin (method git-fetch) @@ -3619,7 +3804,7 @@ make it a perfect utility on modern distros.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1ibihgpmx038xci0k2h471scs5ssn7z5kcvjrfz63qf2ppdf9yh8")))) + (base32 "1lgaky8cmxbi17zpymy2v9wgknx1g92bq50j6kfpsm8qgb7djjb6")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -3633,13 +3818,7 @@ make it a perfect utility on modern distros.") (modify-phases %standard-phases (add-before 'bootstrap 'no-early-./configure (lambda _ - (setenv "NO_CONFIGURE" "yet") - ;; XXX thd_trip_point.h redefines "__STDC_LIMIT_MACROS" after - ;; /include/lzma.h. ./configure forcibly appends -Werror - ;; to CXXFLAGS, overriding any -Wno-error we'd add. - (substitute* "configure.ac" - (("-Werror") "")) - #t))))) + (setenv "NO_CONFIGURE" "yet")))))) (native-inputs `(("autoconf" ,autoconf) ("autoconf-archive" ,autoconf-archive) @@ -3808,7 +3987,7 @@ Python loading in HPC environments.") (let ((real-name "inxi")) (package (name "inxi-minimal") - (version "3.3.04-1") + (version "3.3.06-1") (source (origin (method git-fetch) @@ -3817,7 +3996,7 @@ Python loading in HPC environments.") (commit version))) (file-name (git-file-name real-name version)) (sha256 - (base32 "1rrhycp8i43yf9wi80n4pq2hkfhvb2rg1srz8if28bh6fhhasjzw")))) + (base32 "1qk40iyrdp52vmbiqwxicvlcycm2v2bf1gg4lzq0b4619sd6d1m7")))) (build-system trivial-build-system) (inputs `(("bash" ,bash-minimal) @@ -4018,7 +4197,7 @@ cache of unix and unix-like systems.") (define-public solaar (package (name "solaar") - (version "1.0.5") + (version "1.0.6") (source (origin (method git-fetch) (uri (git-reference @@ -4027,15 +4206,14 @@ cache of unix and unix-like systems.") (file-name (git-file-name name version)) (sha256 (base32 - "17gkr2lf1kzp1198gcdr30j3c8xd81kg7ly12aar1jrgi6lc7klk")))) + "04zclzfc31l2fj5shcsngnmcvcmmhnc567l3wb9yfhs8k39k9kb2")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'build 'setenv-PATH (lambda _ - (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH"))) - #t))))) + (setenv "PYTHONPATH" "lib")))))) (propagated-inputs `(("python-pygobject" ,python-pygobject) ("python-pyudev" ,python-pyudev) @@ -4056,7 +4234,7 @@ Logitech Unifying Receiver.") (package (name "lynis") ;; Also update the ‘lynis-sdk’ input to the commit matching this release. - (version "3.0.3") + (version "3.0.5") (source (origin (method git-fetch) @@ -4065,7 +4243,7 @@ Logitech Unifying Receiver.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0sdjh2f1563qalp740vkaaxdxl56ny98h168cggpm10h2yq366gr")) + (base32 "11kl54hbvjl7q2i1jz8a726vlkdmknvbp4zac3j4fgljg27qp410")) (modules '((guix build utils))) (snippet '(begin @@ -4082,10 +4260,10 @@ Logitech Unifying Receiver.") (method git-fetch) (uri (git-reference (url "https://github.com/CISOfy/lynis-sdk") - (commit "ea7a39774fbd71113a1955cf1a4937b489935174"))) + (commit "99f79c4deb4cb2221d7fccfe82baf58c0a55b9e7"))) (file-name (git-file-name "lynis-sdk" version)) (sha256 - (base32 "0q5j2myshjkz9qwvcg8n7c33yw2cp80yvzhckd60qmzabv4g4qb5")))))) + (base32 "1nc2rhzj6l08d2mnjrzkm4mxla1mjkddcxl8n05c1kdz9ycn6cpl")))))) (arguments `(#:phases (modify-phases %standard-phases @@ -4390,14 +4568,14 @@ Netgear devices.") (define-public atop (package (name "atop") - (version "2.5.0") + (version "2.6.0") (source (origin (method url-fetch) (uri (string-append "https://www.atoptool.nl/download/atop-" version ".tar.gz")) (sha256 (base32 - "0crzz4i2nabyh7d6xg7fvl65qls87nbca5ihidp3nijhrrbi14ab")))) + "0wlg0n0h9vwpjp2dcb623jvvqck422jrjpq9mbpzg4hnawxcmhly")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no test suite @@ -4589,3 +4767,49 @@ the XMODEM/YMODEM/ZMODEM file transfer protocols.") setup, maintenance, supervision, or any long-running processes.") (home-page "https://github.com/leahneukirchen/nq") (license license:public-domain))) + +(define-public lsofgraph + (let ((commit "1d414bdc727c00a8c6cbfffc3c43128c60d6f0de") + (revision "1")) + (package + (name "lsofgraph") + (version (git-version "0.0.1" revision commit)) ;no upstream release + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zevv/lsofgraph") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "058x04yp6bc77hbl3qchqm7pa8f9vqfl9jryr88m8pzl7kvpif54")))) + (build-system trivial-build-system) + (inputs + `(("lua" ,lua))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + ;; copy source + (copy-recursively (assoc-ref %build-inputs "source") ".") + ;; patch-shebang phase + (setenv "PATH" + (string-append (assoc-ref %build-inputs "lua") "/bin" + ":" (getenv "PATH"))) + (substitute* "lsofgraph" + (("#!/usr/bin/env lua") + (string-append "#!" (which "lua")))) + ;; install phase + (install-file "lsofgraph" (string-append %output "/bin")) + (let ((doc (string-append + %output "/share/doc/" ,name "-" ,version))) + (mkdir-p doc) + (install-file "LICENSE" doc) + (install-file "README.md" doc)) + #t))) + (home-page "https://github.com/zevv/lsofgraph") + (synopsis "Convert @code{lsof} output to @code{graphviz}") + (description "Utility to convert @code{lsof} output to a graph showing +FIFO and UNIX interprocess communication.") + (license license:bsd-2))))