GNU bug report logs - #34465
[PATCH] gnu: lvm2: Update to 2.03.02.

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Tue, 12 Feb 2019 23:24:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34465 in the body.
You can then email your comments to 34465 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34465; Package guix-patches. (Tue, 12 Feb 2019 23:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 12 Feb 2019 23:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: lvm2: Update to 2.03.02.
Date: Wed, 13 Feb 2019 00:22:48 +0100
* gnu/packages/linux.scm (lvm2): Update to 2.03.02.
[source](snippet): Adjust confdir regex.
[inputs]: Add LIBAIO.
[arguments]: Add phase 'patch-configure.
(lvm2-static)[arguments]: Don't build dmeventd.  Add phase 'adjust-Makefile'.
---
 gnu/packages/linux.scm                      | 37 ++++++++++++++++++---
 gnu/packages/patches/lvm2-static-link.patch | 29 +++++++++++-----
 2 files changed, 52 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c4080f9285..28e30583e7 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2138,14 +2138,14 @@ time.")
 (define-public lvm2
   (package
     (name "lvm2")
-    (version "2.02.177")
+    (version "2.03.02")
     (source (origin
               (method url-fetch)
               (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2."
                                   version ".tgz"))
               (sha256
                (base32
-                "1wl0isn0yz5wvglwylnlqkppafwmvhliq5bd92vjqp5ir4za49a0"))
+                "03vjdkjxw04pggqzdmznpc3gbzmzr9jpb1y9a9z5pmwz4d8af2sm"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -2153,7 +2153,7 @@ time.")
 
                   ;; Honor sysconfdir.
                   (substitute* "make.tmpl.in"
-                    (("confdir = .*$")
+                    (("^confdir = .*$")
                      "confdir = @sysconfdir@\n")
                     (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
                      "DEFAULT_SYS_DIR = @sysconfdir@"))
@@ -2164,10 +2164,18 @@ time.")
      `(("pkg-config" ,pkg-config)
        ("procps" ,procps)))                       ;tests use 'pgrep'
     (inputs
-     `(("udev" ,eudev)))
+     `(("libaio" ,libaio)
+       ("udev" ,eudev)))
     (arguments
      '(#:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda _
+             ;; XXX: Passing both LDFLAGS and CLDFLAGS causes a syntax error
+             ;; in 2.03.02.  They are identical anyway.
+             (substitute* "configure"
+               (("CLDFLAGS:\"\\$LDFLAGS\"") "CLDFLAGS"))
+             #t))
          (add-after 'configure 'set-makefile-shell
            (lambda _
              ;; Use 'sh', not 'bash', so that '. lib/utils.sh' works as
@@ -2229,7 +2237,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 _
+               ;; Fix leftovers related to upstream libdm->device_mapper
+               ;; migration, hopefully not needed for versions > 2.03.02.
+               (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@
-- 
2.20.1





Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Mon, 10 Feb 2020 23:08:02 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Mon, 10 Feb 2020 23:08:02 GMT) Full text and rfc822 format available.

Message #10 received at 34465-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: 34465-done <at> debbugs.gnu.org
Subject: Re: [bug#34465] [PATCH] gnu: lvm2: Update to 2.03.02.
Date: Tue, 11 Feb 2020 00:07:29 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> * gnu/packages/linux.scm (lvm2): Update to 2.03.02.
> [source](snippet): Adjust confdir regex.
> [inputs]: Add LIBAIO.
> [arguments]: Add phase 'patch-configure.
> (lvm2-static)[arguments]: Don't build dmeventd.  Add phase 'adjust-Makefile'.

I've used this for about a year now(!), so I went ahead and pushed it in
57bd483f6730ce0daa9479d9b7be3b8b4a152097.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Mar 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.