diff options
Diffstat (limited to 'gnu/packages/admin.scm')
-rw-r--r-- | gnu/packages/admin.scm | 367 |
1 files changed, 285 insertions, 82 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index c9230c3295..01a58763d8 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl> ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net> -;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at> ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net> ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is> @@ -45,6 +45,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cmake) + #:use-module (guix build-system emacs) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system perl) @@ -125,7 +126,9 @@ `(("libgcrypt" ,libgcrypt) ("libgpg-error" ,libgpg-error) ("libmhash" ,libmhash) + ("pcre:static" ,pcre "static") ("pcre" ,pcre) + ("zlib:static" ,zlib "static") ("zlib" ,zlib))) (synopsis "File and directory integrity checker") (description @@ -173,14 +176,14 @@ and provides a \"top-like\" mode (monitoring).") (define-public shepherd (package (name "shepherd") - (version "0.4.0") + (version "0.5.0") (source (origin (method url-fetch) (uri (string-append "https://alpha.gnu.org/gnu/shepherd/shepherd-" version ".tar.gz")) (sha256 (base32 - "1lgmsbxn8i8xdasxzkdp2cml75n128pplw6icvmspl6s0n9xmw8n")))) + "1wmciqml9yplnx1s4ynn00giqyk06rbrcsgvpjj2df47sawk2jp8")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--localstatedir=/var"))) @@ -225,13 +228,15 @@ interface and is based on GNU Guile.") (modify-phases %standard-phases (add-after 'unpack 'chdir (lambda _ - (chdir ,(string-append name "-" version)))) + (chdir ,(string-append name "-" version)) + #t)) (delete 'configure) (add-before 'build 'patch (lambda _ (substitute* "src/error.h" (("extern int errno;") - "#include <errno.h>")))) + "#include <errno.h>")) + #t)) (replace 'build (lambda _ (invoke "package/compile"))) @@ -241,7 +246,8 @@ interface and is based on GNU Guile.") (bin (string-append out "/bin"))) (for-each (lambda (file) (install-file file bin)) - (find-files "command")))))))) + (find-files "command"))) + #t))))) (synopsis "Tools for managing UNIX style services") (description "@code{daemontools} is a collection of tools for managing UNIX @@ -613,7 +619,7 @@ connection alive.") (bind-minor-version "11") (bind-patch-version "4") (bind-release-type "-P") ; for patch release, use "-P" - (bind-release-version "1") ; for patch release, e.g. "6" + (bind-release-version "2") ; for patch release, e.g. "6" (bind-version (string-append bind-major-version "." bind-minor-version @@ -730,7 +736,7 @@ connection alive.") "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "08zyy13b8ydfbg26b3y6mw299qs89ba90gymraqqjsgjicydrq5h")))) + "04fq17zksd2b3w6w6padps5n7b6s2lasxpksbhl4378h56vgfnm8")))) ;; When cross-compiling, we need the cross Coreutils and sed. ;; Otherwise just use those from %FINAL-INPUTS. @@ -869,7 +875,7 @@ over ssh connections.") (define-public rename (package (name "rename") - (version "0.35") + (version "1.00") (source (origin (method url-fetch) (uri (string-append @@ -877,8 +883,24 @@ over ssh connections.") version ".tar.gz")) (sha256 (base32 - "052iqmn7ya3w1nadpiyavmr3rx566r0lbflx94y8b5wx9q5c16rq")))) + "03yhf8nmqsb0zyliv501fdvwlp589jqfn44yqkrflmpzrbik3zxl")))) (build-system perl-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'find-itself + ;; Fix run-time 'Can't locate File/Rename.pm in @INC' failure. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (with-directory-excursion bin + (for-each + (lambda (program) + (wrap-program program + `("PERL5LIB" ":" prefix + (,(string-append out "/lib/perl5/site_perl"))))) + (find-files "." ".*"))) + #t)))))) (native-inputs `(("perl-module-build" ,perl-module-build) ("perl-test-pod" ,perl-test-pod) @@ -947,7 +969,7 @@ at once based on a Perl regular expression.") #t)) (add-after 'install 'install-info (lambda _ - (zero? (system* "make" "install-info"))))))) + (invoke "make" "install-info")))))) (native-inputs `(("texinfo" ,texinfo) ("util-linux" ,util-linux))) ; for 'cal' (home-page "https://www.gnu.org/software/rottlog/") @@ -963,7 +985,7 @@ system administrator.") (define-public sudo (package (name "sudo") - (version "1.8.24") + (version "1.8.26") (source (origin (method url-fetch) (uri @@ -973,7 +995,7 @@ system administrator.") version ".tar.gz"))) (sha256 (base32 - "1s2v49n905wf3phmdnaa6v1dwck2lrcin0flg85z7klf35x5b25l")) + "1qpyyfga8rs02p3186sns8qvh2bzwa48ka845nrcqh83dyd23nj0")) (modules '((guix build utils))) (snippet '(begin @@ -1078,7 +1100,8 @@ commands and their arguments.") CFLAGS += $(shell pkg-config libnl-3.0 --cflags) CONFIG_LIBNL32=y CONFIG_READLINE=y\n" port) - (close-port port)))) + (close-port port)) + #t)) (add-after 'install 'install-man-pages (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1178,9 +1201,6 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.") (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (qt '("qtbase" "qtsvg"))) - (substitute* "wpa_gui.desktop" - (("Exec=wpa_gui") - (string-append "Exec=" out "/bin/wpa_gui"))) (install-file "wpa_gui" (string-append out "/bin")) (install-file "wpa_gui.desktop" (string-append out "/share/applications")) @@ -1220,11 +1240,10 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.") ;; It's an old configure script that doesn't understand ;; the extra options we pass. (setenv "CONFIG_SHELL" (which "bash")) - (zero? - (system* "./configure" - (string-append "--prefix=" out) - (string-append "--mandir=" out - "/share/man"))))))) + (invoke "./configure" + (string-append "--prefix=" out) + (string-append "--mandir=" out + "/share/man")))))) #:tests? #f)) (home-page "https://www.kernel.org") ; really, no home page (synopsis "Send a wake-on-LAN packet") @@ -1236,7 +1255,7 @@ network, which causes enabled computers to power on.") (define-public dmidecode (package (name "dmidecode") - (version "3.1") + (version "3.2") (source (origin (method url-fetch) (uri (string-append @@ -1244,7 +1263,7 @@ network, which causes enabled computers to power on.") version ".tar.xz")) (sha256 (base32 - "1h0sg0lxa15nzf8s7884p6q7p6md9idm0c79wyqmk32l4ndwwrnp")))) + "1pcfhcgs2ifdjwp7amnsr3lq95pgxpr150bjhdinvl505px0cw07")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases (delete 'configure)) @@ -1326,25 +1345,30 @@ system is under heavy load.") (define-public detox (package (name "detox") - (version "1.2.0") + (version "1.3.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/detox/detox/" version - "/detox-" version ".tar.bz2")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/dharple/detox.git") + (commit (string-append "v" version)))) (sha256 (base32 - "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb")))) + "1dd608c7g65s5lj02cddvani3q9kzirddgkjqa22ap9d4f8b9xgr")))) (build-system gnu-build-system) - ;; Both flex and popt are used in this case for their runtime libraries - ;; (libfl and libpopt). - (inputs - `(("flex" ,flex) - ("popt" ,popt))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("flex" ,flex))) (arguments - `(#:configure-flags `(,(string-append "--with-popt=" - (assoc-ref %build-inputs "popt"))) - #:tests? #f)) ;no 'check' target - (home-page "http://detox.sourceforge.net") + `(#:tests? #f ;no 'check' target + #: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))))) + (home-page "https://github.com/dharple/detox") (synopsis "Clean up file names") (description "Detox is a program that renames files to make them easier to work with @@ -1576,14 +1600,14 @@ of supported upstream metrics systems simultaneously.") (define-public ansible (package (name "ansible") - (version "2.5.7") + (version "2.7.4") (source (origin (method url-fetch) (uri (pypi-uri "ansible" version)) (sha256 (base32 - "0wbsjjx3xjlm8g50a9j9c6p9rn23jx32yn1234bf5rmj1qgy3p85")) + "0p1n6yyc632522fl2r247p0jg4mncc7z4hqngzbh1zxq3dcb12s9")) (patches (search-patches "ansible-wrap-program-hack.patch")))) (build-system python-build-system) (native-inputs @@ -1609,6 +1633,34 @@ ad hoc task execution, and multinode orchestration---including trivializing things like zero-downtime rolling updates with load balancers.") (license license:gpl3+))) +(define-public emacs-ansible-doc + (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0")) + (package + (name "emacs-ansible-doc") + (version (git-version "0.4" "1" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lunaryorn/ansible-doc.el") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0lap404ch74w99n3xip176jr42b38xhyzkfnkyqg0g3wk2cd3aq8")))) + (build-system emacs-build-system) + ;; Unmaintained by upstream. + (home-page "https://github.com/lunaryorn/ansible-doc.el") + (synopsis "Ansible documentation for Emacs") + (description + "This package provides an Ansible documentation for GNU Emacs. + +@code{ansible-doc} allows you to view the documentation of an Ansible +module and @code{ansible-doc-mode} minor mode adds documentation +lookup to YAML Mode. You could enable the mode with @code{(add-hook +'yaml-mode-hook #'ansible-doc-mode)}.") + (license license:gpl3+)))) + (define-public cpulimit (package (name "cpulimit") @@ -1626,20 +1678,18 @@ things like zero-downtime rolling updates with load balancers.") (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) - (replace - 'build - (lambda _ - (zero? (system* "make" "CC=gcc" "-Csrc")))) - (replace - 'check - (lambda _ - (zero? (system* "make" "CC=gcc" "-Ctests")))) - (replace - 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (install-file "src/cpulimit" bin))))))) + (replace 'build + (lambda _ + (invoke "make" "CC=gcc" "-Csrc"))) + (replace 'check + (lambda _ + (invoke "make" "CC=gcc" "-Ctests"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "src/cpulimit" bin)) + #t))))) (home-page "https://github.com/opsengine/cpulimit") (synopsis "Limit CPU usage") (description @@ -1848,10 +1898,9 @@ done with the @code{auditctl} utility.") (replace 'install (lambda* (#:key outputs #:allow-other-keys) (define (make out . args) - (unless (zero? (apply system* "make" - (string-append "prefix=" out) - args)) - (error "make failed"))) + (apply invoke "make" + (string-append "prefix=" out) + args)) (define (python-path dir) (string-append dir "/lib/python2.7/site-packages")) (let ((out (assoc-ref outputs "out")) @@ -1865,13 +1914,14 @@ done with the @code{auditctl} utility.") (make ndiff "install-ndiff") (wrap-program (string-append ndiff "/bin/ndiff") `("PYTHONPATH" prefix - (,(python-path ndiff))))))) + (,(python-path ndiff))))) + #t)) ;; These are the tests that do not require network access. (replace 'check - (lambda _ (zero? (system* "make" - "check-nse" - "check-ndiff" - "check-dns"))))) + (lambda _ (invoke "make" + "check-nse" + "check-ndiff" + "check-dns")))) ;; Nmap can't cope with out-of-source building. #:out-of-source? #f)) (home-page "https://nmap.org/") @@ -2177,15 +2227,15 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.") #t)) (replace 'build (lambda* (#:key make-flags #:allow-other-keys) - (zero? (apply system* "make" "tools" "misc" make-flags)))) + (apply invoke "make" "tools" "misc" make-flags))) (add-after 'build 'build-armhf (lambda* (#:key make-flags #:allow-other-keys) (setenv "LIBRARY_PATH" #f) - (zero? (apply system* "make" "target-tools" make-flags)))) + (apply invoke "make" "target-tools" make-flags))) (replace 'install (lambda* (#:key make-flags #:allow-other-keys) - (zero? (apply system* "make" "install-all" "install-misc" - make-flags))))))) + (apply invoke "make" "install-all" "install-misc" + make-flags)))))) (home-page "https://github.com/linux-sunxi/sunxi-tools") (synopsis "Hardware management tools for Allwinner computers") (description "This package contains tools for Allwinner devices: @@ -2439,26 +2489,20 @@ make it a perfect utility on modern distros.") (version "1.7.2") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/01org/thermal_daemon/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 (base32 - "15a6vb67y5wsmf0irrq7sxam18yqpz64130k83ryf24mp40h661b")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/01org/thermal_daemon") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1cs2pq8xvfnsvrhg2bxawk4kn3z1qmfrnpnhs178pvfbglzh15hc")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'bootstrap - (lambda _ - (invoke "sh" "autogen.sh") - #t))) - #:configure-flags + `(#:configure-flags (let ((out (assoc-ref %outputs "out"))) (list (string-append "--sysconfdir=" out "/etc") - (string-append "--with-udev-dir=" - out "/lib/udev") (string-append "--with-dbus-sys-dir=" out "/etc/dbus-1/system.d") "--localstatedir=/var")))) @@ -2750,3 +2794,162 @@ support forum. It runs with the @code{/exec} command in most IRC clients.") (description "@code{pscircle} visualizes Linux processes in the form of a radial tree.") (license license:gpl2+))) + +(define-public python-pyudev + (package + (name "python-pyudev") + (version "0.21.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyudev" version)) + (sha256 + (base32 + "0arz0dqp75sszsmgm6vhg92n1lsx91ihddx3m944f4ah0487ljq9")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; Tests require /sys + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-ctypes-udev + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((eudev (assoc-ref inputs "eudev"))) + (substitute* "src/pyudev/core.py" + (("'udev'") + (string-append "'" eudev "/lib/libudev.so'"))) + (substitute* "src/pyudev/_ctypeslib/utils.py" + ;; Use absolute paths instead of keys. + (("= find_library") "= ")) + #t)))))) + (inputs + `(("eudev" ,eudev))) + (propagated-inputs + `(("python-six" ,python-six))) + (native-inputs + `(("python-docutils" ,python-docutils) + ("python-hypothesis" ,python-hypothesis) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest) + ("python-sphinx" ,python-sphinx))) + (home-page "http://pyudev.readthedocs.org/") + (synopsis "Python udev binding") + (description "This package provides @code{udev} bindings for Python.") + (license license:lgpl2.1))) + +(define-public solaar + (package + (name "solaar") + (version "0.9.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pwr/Solaar.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "085mfa13dap3wqik1dqlad0d7kff4rv7j4ljh99c7l8nhczkqgwm")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-prefix-detection + (lambda _ + (substitute* "setup.py" + (("'--prefix' in sys\\.argv") + "len([x.startswith('--prefix=') for x in sys.argv]) > 0")) + #t)) + (replace 'build + (lambda _ + (invoke "python" "setup.py" "build"))) + (add-before 'check 'setenv-PATH + (lambda _ + (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH"))) + #t))))) + (propagated-inputs + `(("python-pygobject" ,python-pygobject) + ("python-pyudev" ,python-pyudev))) + (home-page "https://smxi.org/docs/inxi.htm") + (synopsis "Linux devices manager for the Logitech Unifying Receiver") + (description "This package provides tools to manage clients of the +Logitech Unifying Receiver.") + (license license:gpl2))) + +(define-public lynis + (package + (name "lynis") + (version "2.7.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CISOfy/lynis") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rzc0y8lk22bymf56249jzmllki2lh0rz5in4lkrc5fkmp29c2wv")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove proprietary plugins. As of now, all plugins supplied with + ;; lynis are proprietary. In the future, if free plugins are + ;; provided, whitelist them from deletion. + (for-each delete-file (find-files "plugins")) + #t)))) + (build-system gnu-build-system) + (native-inputs + `(;; For tests + ("lynis-sdk" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CISOfy/lynis-sdk") + (commit "3310aef4f2b3dd97d166c96ad0253c89c4ad390d"))) + (file-name (git-file-name "lynis-sdk" version)) + (sha256 + (base32 + "0sqsrm5wal742yrwps8bqb8a8lxd93n4b93n3kkm1b30nbs25g7y")))))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "lynis" + (("/usr/share/lynis") + (string-append (assoc-ref outputs "out") "/share/lynis"))) + (substitute* "include/functions" + (("/usr/local/etc/lynis") + (string-append (assoc-ref outputs "out") "/etc/lynis"))) + #t)) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "lynis" (string-append out "/bin/")) + (install-file "default.prf" (string-append out "/etc/lynis")) + (for-each + (lambda (dir) + (copy-recursively dir (string-append out "/share/lynis/" dir))) + (list "db" "include" "plugins")) + (install-file "lynis.8" (string-append out "/share/man/man8")) + #t))) + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "lynis-sdk") "../lynis-sdk") + (setenv "LANG" "en_US.UTF-8") + (let ((lynis-dir (getcwd))) + (with-directory-excursion "../lynis-sdk" + (substitute* "config" + (("\\.\\./lynis") lynis-dir)) + (substitute* "unit-tests/tests-language-translations.sh" + (("\\.\\./lynis") lynis-dir)) + (invoke "sh" "lynis-devkit" "run" "unit-tests")))))))) + (home-page "https://cisofy.com/lynis/") + (synopsis "Security auditing tool") + (description "Lynis is a security auditing tool. It performs an in-depth +security scan and runs on the system itself. The primary goal is to test +security defenses and provide tips for further system hardening. It will also +scan for general system information, vulnerable software packages, and +possible configuration issues.") + (license license:gpl3+))) |