diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-04-30 23:15:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-04-30 23:16:23 +0200 |
commit | e1485c7b3846dabc6f9ea2d55bf5766657d0b19b (patch) | |
tree | 6b6cee780c8266c130edbf4ef2d8704486d9f868 /gnu | |
parent | 09e028f45feca1c415cd961ac5c79e5c7d5f3ae7 (diff) | |
download | guix-e1485c7b3846dabc6f9ea2d55bf5766657d0b19b.tar guix-e1485c7b3846dabc6f9ea2d55bf5766657d0b19b.tar.gz |
gnu: Add sudo.
* gnu/packages/admin.scm (sudo): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/admin.scm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index dd3ba33666..57fc645ad3 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -47,6 +47,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) + #:use-module (gnu packages groff) #:use-module (gnu packages xorg)) (define-public dmd @@ -619,3 +620,54 @@ according to a given schedule. It can also be used to automatically compress and archive such logs. Rot[t]log will mail reports of its activity to the system administrator.") (license gpl3+))) + +(define-public sudo + (package + (name "sudo") + (version "1.8.10p2") + (source (origin + (method url-fetch) + (uri + (list (string-append "http://www.sudo.ws/sudo/dist/sudo-" + version ".tar.gz") + (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-" + version ".tar.gz"))) + (sha256 + (base32 + "1wbrygz584abmywklq0b4xhqn3s1bjk3rrladslr5nycdpdvhv5s")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--with-logpath=/var/log/sudo.log") + #:phases (alist-cons-before + 'configure 'pre-configure + (lambda _ + (substitute* "configure" + ;; Refer to the right executables. + (("/usr/bin/mv") (which "mv")) + (("/usr/bin/sh") (which "sh"))) + (substitute* (find-files "." "Makefile\\.in") + (("-O [[:graph:]]+ -G [[:graph:]]+") + ;; Allow installation as non-root. + "") + (("^install: (.*)install-sudoers(.*)" _ before after) + ;; Don't try to create /etc/sudoers. + (string-append "install: " before after "\n")))) + %standard-phases) + + ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but + ;; the chroot's /etc/passwd doesn't have it. Turn off the tests. + #:tests? #f)) + (inputs + `(("groff" ,groff) + ("linux-pam" ,linux-pam) + ("coreutils" ,coreutils))) + (home-page "http://www.sudo.ws/") + (synopsis "Run commands as root") + (description + "Sudo (su \"do\") allows a system administrator to delegate authority to +give certain users (or groups of users) the ability to run some (or all) +commands as root or another user while providing an audit trail of the +commands and their arguments.") + + ;; See <http://www.sudo.ws/sudo/license.html>. + (license x11))) |