mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: sudo: Use gexps and remove input labels.
* gnu/packages/admin.scm (sudo)[arguments]: Use gexps; use ‘search-input-file’ rather than ‘assoc-ref’. [inputs]: Remove labels. Change-Id: I0ea13751c5e34d1ad14035e8c2b8e7e4a7d5f8e1
This commit is contained in:
parent
79726a0507
commit
432a6ece6b
1 changed files with 62 additions and 61 deletions
|
@ -2059,9 +2059,9 @@ (define-public sudo
|
|||
(build-system gnu-build-system)
|
||||
(outputs (list "out"))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
(list (string-append "--docdir=" (assoc-ref %outputs "out")
|
||||
"/share/doc/" ,name "-" ,version)
|
||||
(list #:configure-flags
|
||||
#~(list (string-append "--docdir=" #$output
|
||||
"/share/doc/" #$name "-" #$version)
|
||||
|
||||
"--with-logpath=/var/log/sudo.log"
|
||||
"--with-rundir=/var/run/sudo" ; must be cleaned up at boot time
|
||||
|
@ -2071,14 +2071,14 @@ (define-public sudo
|
|||
;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
|
||||
;; provide it.
|
||||
(string-append "CPPFLAGS=-D_PATH_MV=\\\""
|
||||
(assoc-ref %build-inputs "coreutils")
|
||||
"/bin/mv\\\"")
|
||||
(search-input-file %build-inputs "/bin/mv")
|
||||
"\\\"")
|
||||
|
||||
;; When cross-compiling, assume we have a working 'snprintf' and
|
||||
;; 'vsnprintf' (which we do, when using glibc). The default
|
||||
;; choice fails with undefined references to 'sudo_snprintf' &
|
||||
;; co. when linking.
|
||||
,@(if (%current-target-system)
|
||||
#$@(if (%current-target-system)
|
||||
'("ac_cv_have_working_snprintf=yes"
|
||||
"ac_cv_have_working_vsnprintf=yes")
|
||||
'()))
|
||||
|
@ -2087,7 +2087,7 @@ (define-public sudo
|
|||
#:parallel-build? #f
|
||||
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-before 'configure 'pre-configure
|
||||
(lambda _
|
||||
(substitute* "src/sudo_usage.h.in"
|
||||
|
@ -2095,13 +2095,15 @@ (define-public sudo
|
|||
;; unduly retain references, and also because the
|
||||
;; CPPFLAGS above would close the string literal
|
||||
;; prematurely.
|
||||
(("@CONFIGURE_ARGS@") "\"\""))
|
||||
(("@CONFIGURE_ARGS@")
|
||||
"\"\""))
|
||||
(substitute* (find-files "." "Makefile\\.in")
|
||||
;; Allow installation as non-root.
|
||||
(("-o [[:graph:]]+ -g [[:graph:]]+")
|
||||
"")
|
||||
;; Don't try to create /etc/sudoers.
|
||||
(("^install: (.*)install-sudoers(.*)" _ before after)
|
||||
(("^install: (.*)install-sudoers(.*)" _ before
|
||||
after)
|
||||
(string-append "install: " before after "\n"))
|
||||
;; Don't try to create /run/sudo.
|
||||
(("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
|
||||
|
@ -2125,11 +2127,10 @@ (define-public sudo
|
|||
(native-inputs
|
||||
(list groff))
|
||||
(inputs
|
||||
`(("coreutils" ,coreutils)
|
||||
,@(if (target-hurd?)
|
||||
(append (list coreutils zlib)
|
||||
(if (target-hurd?)
|
||||
'()
|
||||
`(("linux-pam" ,linux-pam)))
|
||||
("zlib" ,zlib)))
|
||||
(list linux-pam))))
|
||||
(home-page "https://www.sudo.ws/")
|
||||
(synopsis "Run commands as root")
|
||||
(description
|
||||
|
|
Loading…
Reference in a new issue