[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: gnu: Add 'lvm2-static'.
From: |
Ludovic Courtès |
Subject: |
02/06: gnu: Add 'lvm2-static'. |
Date: |
Tue, 22 Nov 2016 23:21:13 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 01f94cca19ebd843d6a518530f8acc4fc61b116b
Author: Ludovic Courtès <address@hidden>
Date: Tue Nov 22 21:38:40 2016 +0100
gnu: Add 'lvm2-static'.
* gnu/packages/patches/lvm2-static-link.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/linux.scm (lvm2)[source](patches): New field.
(lvm2-static): New variable.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 19 ++++++++++++++++++-
gnu/packages/patches/lvm2-static-link.patch | 14 ++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7c6306b..4913727 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -705,6 +705,7 @@ dist_patch_DATA =
\
%D%/packages/patches/luajit-no_ldconfig.patch \
%D%/packages/patches/luajit-symlinks.patch \
%D%/packages/patches/luit-posix.patch \
+ %D%/packages/patches/lvm2-static-link.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 94b9315..5870723 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1683,7 +1683,8 @@ time.")
(("confdir = .*$")
"confdir = @address@hidden")
(("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
- "DEFAULT_SYS_DIR = @sysconfdir@"))))))
+ "DEFAULT_SYS_DIR = @sysconfdir@"))))
+ (patches (search-patches "lvm2-static-link.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
@@ -1738,6 +1739,22 @@ mapper. Kernel components are part of Linux-libre.")
;; Command-line tools are GPLv2.
(license (list license:gpl2 license:lgpl2.1))))
+(define-public lvm2-static
+ (package
+ (inherit lvm2)
+ (name "lvm2-static")
+
+ ;; Propagate udev because libdevmapper.a depends on libudev.
+ (inputs (alist-delete "udev" (package-inputs lvm2)))
+ (propagated-inputs `(("udev" ,eudev)))
+
+ (arguments
+ (substitute-keyword-arguments (package-arguments lvm2)
+ ((#:configure-flags flags '())
+ ;; LVM2 doesn't use Libtool, hence the custom option.
+ `(cons "--enable-static_link" ,flags))))
+ (synopsis "Logical volume management for Linux (statically linked)")))
+
(define-public wireless-tools
(package
(name "wireless-tools")
diff --git a/gnu/packages/patches/lvm2-static-link.patch
b/gnu/packages/patches/lvm2-static-link.patch
new file mode 100644
index 0000000..b4b1dd9
--- /dev/null
+++ b/gnu/packages/patches/lvm2-static-link.patch
@@ -0,0 +1,14 @@
+Fix static linking of 'lvm.static', which indirectly depend on libpthread
+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)
+
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o
lvm2cmd.o
+ cat $(top_builddir)/lib/liblvm-internal.a > $@
- branch master updated (8957af3 -> 66ebb5b), Ludovic Courtès, 2016/11/22
- 04/06: marionette: Avoid use of SIGALRM for timeouts., Ludovic Courtès, 2016/11/22
- 06/06: gnu: guix: Update development snapshot., Ludovic Courtès, 2016/11/22
- 03/06: gnu: Add 'cryptsetup-static'., Ludovic Courtès, 2016/11/22
- 02/06: gnu: Add 'lvm2-static'.,
Ludovic Courtès <=
- 01/06: gnu: grub: Add dependency on LVM2., Ludovic Courtès, 2016/11/22
- 05/06: Revert "gnu: Update mit-krb5 to version 1.14.4.", Ludovic Courtès, 2016/11/22