gnu: sudo: Remove support for Python plug-ins.

* gnu/packages/admin.scm (sudo)[inputs], [outputs]: Remove python.
[arguments]: Remove --enable-python/--disable-python configure flags.
Remove 'separate-python-output phase.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-10-07 18:49:29 +02:00
parent 9c1b8390ba
commit 165e0918da
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -1414,18 +1414,12 @@ (define-public sudo
(delete-file-recursively "lib/zlib")
#t))))
(build-system gnu-build-system)
(outputs (list "out" "python"))
(outputs (list "out"))
(arguments
`(#:configure-flags
(list (string-append "--docdir=" (assoc-ref %outputs "out")
"/share/doc/" ,name "-" ,version)
;; XXX: Disable Python support when cross-compiling because
;; 'configure' tries to run 'python', which fails.
,(if (%current-target-system)
"--disable-python"
"--enable-python") ; for plug-ins written in ~
"--with-logpath=/var/log/sudo.log"
"--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
"--with-vardir=/var/db/sudo"
@ -1472,22 +1466,7 @@ (define-public sudo
(substitute* "plugins/sudoers/Makefile.in"
(("^pre-install:" match)
(string-append match "\ndisabled-" match)))
#t))
(add-after 'install 'separate-python-output
(lambda* (#:key target outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(out:python (assoc-ref outputs "python")))
(if target
(mkdir-p (string-append out:python "/empty"))
(for-each
(lambda (file)
(let ((old (string-append out "/" file))
(new (string-append out:python "/" file)))
(mkdir-p (dirname new))
(rename-file old new)))
(list "libexec/sudo/python_plugin.so"
"libexec/sudo/python_plugin.la")))
#t))))
#t)))
;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
@ -1497,9 +1476,6 @@ (define-public sudo
(inputs
`(("coreutils" ,coreutils)
("linux-pam" ,linux-pam)
,@(if (%current-target-system)
'()
`(("python" ,python)))
("zlib" ,zlib)))
(home-page "https://www.sudo.ws/")
(synopsis "Run commands as root")