summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/linux.scm44
-rw-r--r--gnu/packages/patches/lvm2-static-link.patch29
2 files changed, 49 insertions, 24 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 42f6da749c..9b42735a31 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2780,14 +2780,16 @@ time.")
(define-public lvm2
(package
(name "lvm2")
- (version "2.02.177")
+ (version "2.03.07")
(source (origin
(method url-fetch)
- (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
- version ".tgz"))
+ (uri (list (string-append "ftp://sourceware.org/pub/lvm2/LVM2."
+ version ".tgz")
+ (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
+ version ".tgz")))
(sha256
(base32
- "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
+ "1s818ghgl0cxqak3r4cc99anh2xnm46kl03cyk089a1cr2ai0by7"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -2795,7 +2797,7 @@ time.")
;; Honor sysconfdir.
(substitute* "make.tmpl.in"
- (("confdir = .*$")
+ (("^confdir = .*$")
"confdir = @sysconfdir@\n")
(("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
"DEFAULT_SYS_DIR = @sysconfdir@"))
@@ -2806,7 +2808,8 @@ time.")
`(("pkg-config" ,pkg-config)
("procps" ,procps))) ;tests use 'pgrep'
(inputs
- `(("udev" ,eudev)))
+ `(("libaio" ,libaio)
+ ("udev" ,eudev)))
(arguments
'(#:phases
(modify-phases %standard-phases
@@ -2835,14 +2838,6 @@ time.")
(assoc-ref %outputs "out")
"/lib,-rpath="
(assoc-ref %outputs "out")
- "/lib/device-mapper")
- ;; TODO: Patch make.tmpl.in to take LDFLAGS
- ;; into account so that we don't need to also
- ;; set CLDFLAGS.
- (string-append "CLDFLAGS=-Wl,-rpath="
- (assoc-ref %outputs "out")
- "/lib,-rpath="
- (assoc-ref %outputs "out")
"/lib/device-mapper"))
;; The tests use 'mknod', which requires root access.
@@ -2871,7 +2866,26 @@ mapper. Kernel components are part of Linux-libre.")
(substitute-keyword-arguments (package-arguments lvm2)
((#:configure-flags flags '())
;; LVM2 doesn't use Libtool, hence the custom option.
- `(cons "--enable-static_link" ,flags))))
+ `(append '("--enable-static_link")
+ ;; Building dmeventd statically is complicated due to a
+ ;; requirement on libdevmapper.a, which is being phased out
+ ;; in favor of libdevice-mapper.a, which in turn is is not
+ ;; easily made available at dmeventd build time. Just ignore
+ ;; it until the situation improves.
+ (delete "--enable-dmeventd" ,flags)))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'adjust-Makefile
+ (lambda _
+ ;; These fixes are related to the upstream libdm->device_mapper
+ ;; migration and will hopefully be fixed upstream in due time.
+ (substitute* "tools/Makefile.in"
+ ;; This variable is empty in a static configuration and causes
+ ;; an erroneous GCC command line.
+ (("-L\\$\\(interfacebuilddir\\)") "")
+ ;; Remove obsolete reference to libdevmapper.a.
+ (("-ldevmapper") ""))
+ #t))))))
(synopsis "Logical volume management for Linux (statically linked)")))
(define-public wireless-tools
diff --git a/gnu/packages/patches/lvm2-static-link.patch b/gnu/packages/patches/lvm2-static-link.patch
index eb7849a679..2ade0a1aaa 100644
--- a/gnu/packages/patches/lvm2-static-link.patch
+++ b/gnu/packages/patches/lvm2-static-link.patch
@@ -3,23 +3,34 @@ and libm via libdevmapper.a.
--- LVM2.2.02.166/tools/Makefile.in 2016-11-22 21:31:15.521045149 +0100
+++ LVM2.2.02.166/tools/Makefile.in 2016-11-22 21:31:24.085082767 +0100
-@@ -148,7 +148,7 @@ endif
-
- lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
-- $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
-+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) $(PTHREAD_LIBS) $(M_LIBS)
+@@ -137,7 +137,7 @@
+ lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS)
+ @echo " [CC] $@"
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \
+- $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS)
++ $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS) $(PTHREAD_LIBS)
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
- cat $(top_builddir)/lib/liblvm-internal.a > $@
+ @echo " [AR] $@"
--- a/make.tmpl.in 2018-07-31 22:00:39.969983104 +0200
+++ b/make.tmpl.in 2018-07-31 22:00:58.467613682 +0200
-@@ -53,7 +53,7 @@
+@@ -63,7 +63,7 @@
- LIBS = @LIBS@
+ LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(RT_LIBS) $(M_LIBS)
# Extra libraries always linked with static binaries
-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
+STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(M_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+--- a/libdm/make.tmpl.in 2018-12-18 15:22:34.000000000 +0100
++++ b/libdm/make.tmpl.in 2019-01-29 21:45:33.637345799 +0100
+@@ -57,7 +57,7 @@
+ LIBS = @LIBS@
+ LIBS += $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(RT_LIBS) -lm
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(PTHREAD_LIBS) $(M_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@