mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
gnu: util-linux: Use G-expressions.
* gnu/packages/linux.scm (util-linux)[arguments]: Convert to gexps.
This commit is contained in:
parent
879c71edf4
commit
82dae0c9e3
1 changed files with 90 additions and 91 deletions
|
@ -1844,102 +1844,101 @@ (define-public util-linux
|
||||||
"lib" ;8.8 MiB shared libraries, headers and locales
|
"lib" ;8.8 MiB shared libraries, headers and locales
|
||||||
"static")) ;2.9 MiB static .a libraries
|
"static")) ;2.9 MiB static .a libraries
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags (list "--disable-use-tty-group"
|
(list #:configure-flags
|
||||||
(string-append
|
#~(list "--disable-use-tty-group"
|
||||||
"--enable-fs-paths-default="
|
(string-append
|
||||||
"/run/setuid-programs"
|
"--enable-fs-paths-default="
|
||||||
":/run/current-system/profile/sbin")
|
"/run/setuid-programs"
|
||||||
;; Don't try to chown root:root mount and umount
|
":/run/current-system/profile/sbin")
|
||||||
"--disable-makeinstall-chown"
|
;; Don't try to chown root:root mount and umount
|
||||||
"--localstatedir=/var"
|
"--disable-makeinstall-chown"
|
||||||
(string-append "--localedir="
|
"--localstatedir=/var"
|
||||||
(assoc-ref %outputs "lib")
|
(string-append "--localedir=" #$output:lib
|
||||||
"/share/locale")
|
"/share/locale")
|
||||||
;; Install completions where our
|
;; Install completions where our bash-completion package
|
||||||
;; bash-completion package expects them.
|
;; expects them.
|
||||||
(string-append "--with-bashcompletiondir="
|
(string-append "--with-bashcompletiondir=" #$output
|
||||||
(assoc-ref %outputs "out")
|
"/etc/bash_completion.d"))
|
||||||
"/etc/bash_completion.d"))
|
|
||||||
|
|
||||||
;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
|
;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
|
||||||
;; <https://bugs.gnu.org/47791>.
|
;; <https://bugs.gnu.org/47791>.
|
||||||
#:tests? ,(and (not (%current-target-system))
|
#:tests? (and (not (%current-target-system))
|
||||||
(not (string-suffix? "-gnu" (%current-system))))
|
(not (string-suffix? "-gnu" (%current-system))))
|
||||||
|
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(add-before 'configure 'patch-build-scripts
|
#~(modify-phases %standard-phases
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-before 'configure 'patch-build-scripts
|
||||||
(substitute* "configure"
|
(lambda _
|
||||||
;; The build system assumes that we want to install
|
(substitute* "configure"
|
||||||
;; libraries below $exec_prefix when $libdir does not
|
;; The build system assumes that we want to install
|
||||||
;; match any of the "usual" locations. Fix that.
|
;; libraries below $exec_prefix when $libdir does not
|
||||||
(("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
|
;; match any of the "usual" locations. Fix that.
|
||||||
"usrlib_execdir=$libdir"))))
|
(("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
|
||||||
(add-before 'build 'set-umount-file-name
|
"usrlib_execdir=$libdir"))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-before 'build 'set-umount-file-name
|
||||||
;; Tell 'eject' the right file name of 'umount'.
|
(lambda _
|
||||||
(let ((out (assoc-ref outputs "out")))
|
;; Tell 'eject' the right file name of 'umount'.
|
||||||
(substitute* "sys-utils/eject.c"
|
(substitute* "sys-utils/eject.c"
|
||||||
(("\"/bin/umount\"")
|
(("\"/bin/umount\"")
|
||||||
(string-append "\"" out "/bin/umount\""))))))
|
(string-append "\"" #$output "/bin/umount\"")))))
|
||||||
(add-before 'check 'pre-check
|
(add-before 'check 'pre-check
|
||||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
||||||
(let ((services (search-input-file (or native-inputs inputs)
|
(let ((services (search-input-file (or native-inputs inputs)
|
||||||
"etc/services")))
|
"etc/services")))
|
||||||
;; Change the test to refer to the right file.
|
;; Change the test to refer to the right file.
|
||||||
(substitute* "tests/ts/misc/mcookie"
|
(substitute* "tests/ts/misc/mcookie"
|
||||||
(("/etc/services")
|
(("/etc/services")
|
||||||
services))
|
services))
|
||||||
|
|
||||||
;; The C.UTF-8 locale does not exist in our libc.
|
;; The C.UTF-8 locale does not exist in our libc.
|
||||||
(substitute* "tests/ts/column/invalid-multibyte"
|
(substitute* "tests/ts/column/invalid-multibyte"
|
||||||
(("C\\.UTF-8") "en_US.utf8")))))
|
(("C\\.UTF-8") "en_US.utf8")))))
|
||||||
(add-before 'check 'disable-setarch-test
|
(add-before 'check 'disable-setarch-test
|
||||||
(lambda _
|
(lambda _
|
||||||
;; The setarch tests are unreliable in QEMU's user-mode
|
;; The setarch tests are unreliable in QEMU's user-mode
|
||||||
;; emulation, which is our primary method of building
|
;; emulation, which is our primary method of building
|
||||||
;; ARMv7 packages. See
|
;; ARMv7 packages. See
|
||||||
;; <https://github.com/karelzak/util-linux/issues/601>.
|
;; <https://github.com/karelzak/util-linux/issues/601>.
|
||||||
(substitute* "tests/ts/misc/setarch"
|
(substitute* "tests/ts/misc/setarch"
|
||||||
(("ts_init_subtest.*" all)
|
(("ts_init_subtest.*" all)
|
||||||
(string-append
|
(string-append
|
||||||
all "\n"
|
all "\n"
|
||||||
"ts_skip \"setarch tests are unreliable under QEMU\"")))))
|
"ts_skip \"setarch tests are unreliable under QEMU\"")))))
|
||||||
(add-before 'check 'disable-lsns-test
|
(add-before 'check 'disable-lsns-test
|
||||||
(lambda _
|
(lambda _
|
||||||
;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
|
;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
|
||||||
;; returning ENOTTY, indicating this kernel does not
|
;; returning ENOTTY, indicating this kernel does not
|
||||||
;; support user namespaces. Curiously, this test can fail
|
;; support user namespaces. Curiously, this test can fail
|
||||||
;; on i686 even if the same test passes on x86_64 on the
|
;; on i686 even if the same test passes on x86_64 on the
|
||||||
;; same machine. See <https://issues.guix.gnu.org/49933>.
|
;; same machine. See <https://issues.guix.gnu.org/49933>.
|
||||||
(delete-file "tests/ts/lsns/ioctl_ns")))
|
(delete-file "tests/ts/lsns/ioctl_ns")))
|
||||||
(add-after 'install 'move-static-libraries
|
(add-after 'install 'move-static-libraries
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((lib (assoc-ref outputs "lib"))
|
(let ((lib #$output:lib)
|
||||||
(static (assoc-ref outputs "static")))
|
(static #$output:static))
|
||||||
|
|
||||||
;; Move static libraries to the "static" output.
|
;; Move static libraries to the "static" output.
|
||||||
(mkdir-p (string-append static "/lib"))
|
(mkdir-p (string-append static "/lib"))
|
||||||
(with-directory-excursion lib
|
(with-directory-excursion lib
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(rename-file file
|
(rename-file file
|
||||||
(string-append static "/"
|
(string-append static "/"
|
||||||
file)))
|
file)))
|
||||||
(find-files "lib" "\\.a$"))
|
(find-files "lib" "\\.a$"))
|
||||||
|
|
||||||
;; Remove references to the static library from the '.la'
|
;; Remove references to the static library from the '.la'
|
||||||
;; files so that Libtool does the right thing when both
|
;; files so that Libtool does the right thing when both
|
||||||
;; the shared and static library is available.
|
;; the shared and static library is available.
|
||||||
(substitute* (find-files "lib" "\\.la$")
|
(substitute* (find-files "lib" "\\.la$")
|
||||||
(("old_library=.*") "old_library=''\n"))))))
|
(("old_library=.*") "old_library=''\n"))))))
|
||||||
(add-after 'install 'adjust-pkg-config-files
|
(add-after 'install 'adjust-pkg-config-files
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let ((lib (assoc-ref outputs "lib")))
|
;; Drop the unused "prefix=" and "exec_prefix=" variables from
|
||||||
;; Drop the unused "prefix=" and "exec_prefix=" variables from
|
;; the pkg-config files to avoid a cyclic reference on "out".
|
||||||
;; the pkg-config files to avoid a cyclic reference on "out".
|
(substitute* (find-files (string-append #$output:lib
|
||||||
(substitute* (find-files (string-append lib "/lib/pkgconfig")
|
"/lib/pkgconfig")
|
||||||
"\\.pc$")
|
"\\.pc$")
|
||||||
(("^(exec_)?prefix=.*") ""))))))))
|
(("^(exec_)?prefix=.*") "")))))))
|
||||||
(inputs
|
(inputs
|
||||||
(list file ;for libmagic
|
(list file ;for libmagic
|
||||||
ncurses
|
ncurses
|
||||||
|
|
Loading…
Reference in a new issue