Merge branch 'master' into core-updates-frozen
[jackhill/guix/guix.git] / gnu / packages / admin.scm
index c7e83cd..0d61e37 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier <bavier@posteo.net>
@@ -35,6 +35,7 @@
 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
@@ -276,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 <https://bugs.gnu.org/48368>.
+                  (substitute* "Makefile.in"
+                    (("compile --target")
+                     "compile -O1 --target"))))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--localstatedir=/var")
@@ -652,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
@@ -753,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"
@@ -782,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))
@@ -941,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))
@@ -1262,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"
@@ -1614,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)
@@ -1744,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?)
@@ -2997,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"
@@ -3088,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.
@@ -3144,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)
@@ -4198,8 +4213,7 @@ cache of unix and unix-like systems.")
        (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)