gnu: multipath-tools: Remove input labels.

* gnu/packages/linux.scm (multipath-tools)[arguments]: Use G-expression and
SEARCH-INPUT-FILE.
[inputs]: Remove labels.
This commit is contained in:
Marius Bakke 2022-08-09 22:49:31 +02:00
parent 131e09b95a
commit 181fd74121
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -5223,34 +5223,31 @@ arrays when needed.")
#t)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:test-target "test" (list
#:parallel-build? #f ;XXX: broken in 0.8.4 #:test-target "test"
#:make-flags (list "CC=gcc" #:parallel-build? #f ;XXX: broken since 0.8.4
(string-append "DESTDIR=" #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
(assoc-ref %outputs "out")) (string-append "DESTDIR=" #$output)
;; Install Udev rules below this directory, relative ;; Install Udev rules below this directory, relative
;; to the prefix. ;; to the prefix.
"SYSTEMDPATH=lib" "SYSTEMDPATH=lib"
(string-append "LDFLAGS=-Wl,-rpath=" (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
(assoc-ref %outputs "out")
"/lib"))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-source (add-after 'unpack 'patch-source
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((lvm2 (assoc-ref inputs "lvm2")) (let ((libdevmapper.h
(udev (assoc-ref inputs "udev"))) (search-input-file inputs "include/libdevmapper.h"))
(libudev.h
(search-input-file inputs "include/libudev.h")))
(substitute* "Makefile.inc" (substitute* "Makefile.inc"
(("\\$\\(prefix\\)/usr") "$(prefix)") (("\\$\\(prefix\\)/usr") "$(prefix)")
;; Do not save timestamp to avoid gzip "timestamp ;; Do not save timestamp to avoid gzip "timestamp
;; out-of-range" warnings. ;; out-of-range" warnings.
(("gzip -9") "gzip -9n")) (("gzip -9") "gzip -9n"))
(substitute* '("kpartx/Makefile" "libmultipath/Makefile") (substitute* '("kpartx/Makefile" "libmultipath/Makefile")
(("/usr/include/libdevmapper.h") (("/usr/include/libdevmapper.h") libdevmapper.h)
(string-append lvm2 "/include/libdevmapper.h")) (("/usr/include/libudev.h") libudev.h)))))
(("/usr/include/libudev.h")
(string-append udev "/include/libudev.h")))
#t)))
(add-after 'unpack 'fix-maybe-uninitialized-variable (add-after 'unpack 'fix-maybe-uninitialized-variable
(lambda _ (lambda _
;; This variable gets initialized later if needed, but GCC 7 ;; This variable gets initialized later if needed, but GCC 7
@ -5258,16 +5255,14 @@ arrays when needed.")
;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html ;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html
(substitute* "libmultipath/structs_vec.c" (substitute* "libmultipath/structs_vec.c"
(("bool is_queueing;") (("bool is_queueing;")
"bool is_queueing = false;")) "bool is_queueing = false;"))))
#t))
(add-after 'unpack 'fix-linking-tests (add-after 'unpack 'fix-linking-tests
(lambda _ (lambda _
;; Add missing linker flag for -lmpathcmd. This should be fixed ;; Add missing linker flag for -lmpathcmd. This should be fixed
;; for versions > 0.8.4. ;; for versions > 0.8.4.
(substitute* "tests/Makefile" (substitute* "tests/Makefile"
(("-lmultipath -lcmocka") (("-lmultipath -lcmocka")
"-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka")) "-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka"))))
#t))
(add-after 'unpack 'skip-failing-tests (add-after 'unpack 'skip-failing-tests
(lambda _ (lambda _
;; This test and the module's setup() test an arbitrary block ;; This test and the module's setup() test an arbitrary block
@ -5278,20 +5273,19 @@ arrays when needed.")
;; The above triggers -Werror=unused-function. Ignore it. ;; The above triggers -Werror=unused-function. Ignore it.
(substitute* "tests/Makefile" (substitute* "tests/Makefile"
(("CFLAGS \\+= " match) (("CFLAGS \\+= " match)
(string-append match "-Wno-error=unused-function "))) (string-append match "-Wno-error=unused-function ")))))
#t))
(delete 'configure)))) ;no configure script (delete 'configure)))) ;no configure script
(native-inputs (native-inputs
(list perl pkg-config valgrind (list perl pkg-config valgrind
;; For tests. ;; For tests.
cmocka)) cmocka))
(inputs (inputs
`(("json-c" ,json-c) (list json-c
("libaio" ,libaio) libaio
("liburcu" ,liburcu) liburcu
("lvm2" ,lvm2) lvm2
("readline" ,readline) readline
("udev" ,eudev))) eudev))
(home-page "http://christophe.varoqui.free.fr/") (home-page "http://christophe.varoqui.free.fr/")
(synopsis "Access block devices through multiple paths") (synopsis "Access block devices through multiple paths")
(description (description