mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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:
parent
131e09b95a
commit
181fd74121
1 changed files with 60 additions and 66 deletions
|
@ -5223,75 +5223,69 @@ 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")
|
#:phases
|
||||||
"/lib"))
|
#~(modify-phases %standard-phases
|
||||||
#:phases
|
(add-after 'unpack 'patch-source
|
||||||
(modify-phases %standard-phases
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(add-after 'unpack 'patch-source
|
(let ((libdevmapper.h
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(search-input-file inputs "include/libdevmapper.h"))
|
||||||
(let ((lvm2 (assoc-ref inputs "lvm2"))
|
(libudev.h
|
||||||
(udev (assoc-ref inputs "udev")))
|
(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")
|
(add-after 'unpack 'fix-maybe-uninitialized-variable
|
||||||
(string-append udev "/include/libudev.h")))
|
(lambda _
|
||||||
#t)))
|
;; This variable gets initialized later if needed, but GCC 7
|
||||||
(add-after 'unpack 'fix-maybe-uninitialized-variable
|
;; fails to notice. Should be fixed for > 0.8.4.
|
||||||
(lambda _
|
;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html
|
||||||
;; This variable gets initialized later if needed, but GCC 7
|
(substitute* "libmultipath/structs_vec.c"
|
||||||
;; fails to notice. Should be fixed for > 0.8.4.
|
(("bool is_queueing;")
|
||||||
;; https://www.redhat.com/archives/dm-devel/2020-March/msg00137.html
|
"bool is_queueing = false;"))))
|
||||||
(substitute* "libmultipath/structs_vec.c"
|
(add-after 'unpack 'fix-linking-tests
|
||||||
(("bool is_queueing;")
|
(lambda _
|
||||||
"bool is_queueing = false;"))
|
;; Add missing linker flag for -lmpathcmd. This should be fixed
|
||||||
#t))
|
;; for versions > 0.8.4.
|
||||||
(add-after 'unpack 'fix-linking-tests
|
(substitute* "tests/Makefile"
|
||||||
(lambda _
|
(("-lmultipath -lcmocka")
|
||||||
;; Add missing linker flag for -lmpathcmd. This should be fixed
|
"-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka"))))
|
||||||
;; for versions > 0.8.4.
|
(add-after 'unpack 'skip-failing-tests
|
||||||
(substitute* "tests/Makefile"
|
(lambda _
|
||||||
(("-lmultipath -lcmocka")
|
;; This test and the module's setup() test an arbitrary block
|
||||||
"-lmultipath -L$(mpathcmddir) -lmpathcmd -lcmocka"))
|
;; device node name, but the build environment has none.
|
||||||
#t))
|
(substitute* "tests/devt.c"
|
||||||
(add-after 'unpack 'skip-failing-tests
|
(("return get_one_devt.*") "return 0;\n")
|
||||||
(lambda _
|
(("cmocka_unit_test\\(test_devt2devname_devt_good\\),") ""))
|
||||||
;; This test and the module's setup() test an arbitrary block
|
;; The above triggers -Werror=unused-function. Ignore it.
|
||||||
;; device node name, but the build environment has none.
|
(substitute* "tests/Makefile"
|
||||||
(substitute* "tests/devt.c"
|
(("CFLAGS \\+= " match)
|
||||||
(("return get_one_devt.*") "return 0;\n")
|
(string-append match "-Wno-error=unused-function ")))))
|
||||||
(("cmocka_unit_test\\(test_devt2devname_devt_good\\),") ""))
|
(delete 'configure)))) ;no configure script
|
||||||
;; The above triggers -Werror=unused-function. Ignore it.
|
|
||||||
(substitute* "tests/Makefile"
|
|
||||||
(("CFLAGS \\+= " match)
|
|
||||||
(string-append match "-Wno-error=unused-function ")))
|
|
||||||
#t))
|
|
||||||
(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
|
||||||
|
@ -5304,8 +5298,8 @@ Linux Device Mapper multipathing driver:
|
||||||
@code{dm} multipath devices.
|
@code{dm} multipath devices.
|
||||||
@item @command{kpartx} - Create device maps from partition tables.
|
@item @command{kpartx} - Create device maps from partition tables.
|
||||||
@end enumerate")
|
@end enumerate")
|
||||||
(license (list license:gpl2+ ; main distribution
|
(license (list license:gpl2+ ;main distribution
|
||||||
license:lgpl2.0+)))) ; libmpathcmd/mpath_cmd.h
|
license:lgpl2.0+)))) ;libmpathcmd/mpath_cmd.h
|
||||||
|
|
||||||
(define-public libaio
|
(define-public libaio
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue