summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-07-05 22:02:51 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-07-05 22:02:51 +0000
commitd8890088b4cd8db1753a36e66ea9f5cfaa5145fe (patch)
tree19896faf0f904ba6ee2ac2d25431d83b70b5432c /sys-fs
parentSparc stable, bug #276640. (diff)
downloadhistorical-d8890088b4cd8db1753a36e66ea9f5cfaa5145fe.tar.gz
historical-d8890088b4cd8db1753a36e66ea9f5cfaa5145fe.tar.bz2
historical-d8890088b4cd8db1753a36e66ea9f5cfaa5145fe.zip
Version bump. Patch for bug #217644: as-needed fixes.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/lvm2/ChangeLog9
-rw-r--r--sys-fs/lvm2/Manifest6
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.48-as-needed.patch187
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.48-device-mapper-export-format.patch306
-rw-r--r--sys-fs/lvm2/lvm2-2.02.48.ebuild195
5 files changed, 701 insertions, 2 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog
index 6f00f46cba50..435b5b18f7ac 100644
--- a/sys-fs/lvm2/ChangeLog
+++ b/sys-fs/lvm2/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/lvm2
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.157 2009/05/19 00:08:34 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.158 2009/07/05 22:02:51 robbat2 Exp $
+
+*lvm2-2.02.48 (05 Jul 2009)
+
+ 05 Jul 2009; Robin H. Johnson <robbat2@gentoo.org> +lvm2-2.02.48.ebuild,
+ +files/lvm2-2.02.48-as-needed.patch,
+ +files/lvm2-2.02.48-device-mapper-export-format.patch:
+ Version bump. Patch for bug #217644: as-needed fixes.
*lvm2-2.02.45-r2 (19 May 2009)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 5e0a6e0a58fa..3507a51295cf 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -14,6 +14,8 @@ AUX lvm.confd-2.02.28-r2 173 RMD160 cf554372fa11df056e3757e5139fad6c7606a696 SHA
AUX lvm.rc-2.02.28-r2 661 RMD160 3b267ab500785de249101548a15792708d3adc55 SHA1 b014a0d4344c58c963db20cefeb726dfd66d1b1a SHA256 962d9e8baa06a617671701d21f8a2849b45ab9baa6684b2e99b2b03192c9e66a
AUX lvm2-2.02.45-device-mapper-export-format.patch 10323 RMD160 d36a0d80add1ea812cc7f4828aa4a71b0accff78 SHA1 29e5b230ce7562dee59cd61068a8faa6684518fe SHA256 563103fc0fa4c2a35a9adf94332f0502f36fd85e408916b7be7e3503121cc1d0
AUX lvm2-2.02.45-dmeventd.patch 457 RMD160 280708918c33db4614d825e6c9f1909aa3f52a62 SHA1 3c3e17919d369457947944d428508a94049d3787 SHA256 1b275c4321c20227af6a758f962dfd2f14d2f25a65f9b74e9d43f93d3a6bf37e
+AUX lvm2-2.02.48-as-needed.patch 7846 RMD160 b3b73f2c0675bbc9ed688849ae085de95c6efc33 SHA1 8044921f37c14d503562237c5795a8e06230223f SHA256 d7ce214d8257b385791afd58328fd7091deea469192e08099da4b89299f12f92
+AUX lvm2-2.02.48-device-mapper-export-format.patch 11244 RMD160 1ba7988ef2782b4565d66fb6e9800bc698042c22 SHA1 82548e5b97c3239f121ec5e542303f1acb269eac SHA256 3a0e1d6d4fa43bd4549c75b562f636c78e39fbba1aa8b127ca179e223a60c50e
AUX lvm2-start.sh 1025 RMD160 fa27385e4640d59c33f2ca42db9d38f80def3977 SHA1 83a86ff292192b3f62e4686b70bbbfcc39158b53 SHA256 8c7da13b6326a383888110b25f53a4902cbec7d0dace274b9c5f1d6b0a775039
AUX lvm2-start.sh-2.02.28-r2 1180 RMD160 3ec85899a19c56d4d49e4654e1b05f53bc7d9c93 SHA1 80fce53cc1925990fbb103e57314b3c1740de6ed SHA256 a891855ed04d4c59f17fc0b19dc61813a4ca3cc183166867606d92cb58498460
AUX lvm2-stop.sh 1939 RMD160 52d1adbf4bdbe6e75e9ff2e91c809b6eed5839d5 SHA1 8ccf316b02fb5f79bb6c0464cc3c1606704cec7b SHA256 94a34e0b149ac43f5f1042c45ebdbaa69ac83bcbea7f894c15ab59aad65cb22c
@@ -26,6 +28,7 @@ DIST LVM2.2.02.37.tgz 571462 RMD160 5fd5247f7fb977eb13b1db0caa6c570fecaacd83 SHA
DIST LVM2.2.02.39.tgz 578005 RMD160 8a6c0ce5d13e7e215a346bcfa3f2427803ab0a9d SHA1 0bc8a2c351f0ca0123e592bc3e808e39b0d03bbb SHA256 d07bbdda39307bd01e9a41eb50e265c72baed026abb6d4a4c452ba24e9f1cea2
DIST LVM2.2.02.42.tgz 590809 RMD160 4ea3ceb6dc3abb299ec786ce262749b69ce62736 SHA1 354b360f210e5be7ba2b5ba0c822e785c12d2ea6 SHA256 a4eeaf59c08e22d813dbabe8f62b10385e3e3dfe6f1fa5aede326bb008ddd248
DIST LVM2.2.02.45.tgz 740347 RMD160 18af03dac08d6bb96bba1614365a772e5b550fbc SHA1 d2b167198e7a4efea743fefaa84c3a43715341eb SHA256 2ad7490f5747ea8547ddfbf89256549fcdcffb990df2f3cbdea84d985887ecb8
+DIST LVM2.2.02.48.tgz 762435 RMD160 2ae5061c408db553f8b8af954552916c3d768130 SHA1 8a6f29f08f731caffa09f52e5ca41bcce80ff3b9 SHA256 32e0365ada6e18e16bfc2e6e1e5fb019f8c36de7476d87c4bf6613ee9cf024ad
EBUILD lvm2-2.01.13.ebuild 1476 RMD160 ba736b93e558951031bd54265c471f45a0fbaaeb SHA1 5d6a7284dac8aa7508ecc6e2b82419bd25282c2b SHA256 456d866ac9d90f10c7970a6c01716dabc0d9394fd489f13bd372a6379a16d86f
EBUILD lvm2-2.02.33-r1.ebuild 4522 RMD160 91f893fcf36be8f806c7871e14082ae651b4cfd4 SHA1 cb077da93919421f666c5ae5d578f2c71f9f02c7 SHA256 ca7b54902e18fc161cc493850c5ab4814d4d1644d17e8d40e6bce2794ab30e0b
EBUILD lvm2-2.02.33.ebuild 4493 RMD160 5cc3967afc0b88149759bbbfc4c0a12831bcf200 SHA1 ae0ea83890fd25c1b15e05db09278ba8ba290150 SHA256 f1b42bbb0a7e6467f4feeb95a75bcded1d2f9d9e51e478c22c188cb2d0c72a89
@@ -36,5 +39,6 @@ EBUILD lvm2-2.02.42.ebuild 4705 RMD160 56ef98e954c6b9e2717aedcf771bfe1332f82e0f
EBUILD lvm2-2.02.45-r1.ebuild 5715 RMD160 f48dee13e3ec1935da4ba6456931965f74c56b48 SHA1 ecf3695bdde9d7d9b659cd1a925f0612ef4e030c SHA256 576df8e17db68e68fa31a6c47af4a238ed82773a8ec8c3f31adecda5fadeced1
EBUILD lvm2-2.02.45-r2.ebuild 5856 RMD160 79ab968c62ca8ef62d29921819742edf406a753e SHA1 165b410d4fd3473f2313d039f999913e81b85533 SHA256 98376ae365d4581f5c25154e0050d704c0b507b7b9fc6ec946c253ac6b04fcd6
EBUILD lvm2-2.02.45.ebuild 5748 RMD160 44663663c49e906d1fc9b7b6f0adae672d086f4b SHA1 9162aa871d1c7756e5153ba009ab4cbe710388fe SHA256 9f31d6397e44ecec804f0510cd0ade1cf84b0dfb6cadea1988a1155b50156187
-MISC ChangeLog 25091 RMD160 da580596dd18efea947ee690fa801f61e26908d7 SHA1 2137c7bb6788899b9cd25d018c04a98ac8a7ac69 SHA256 943295ef25b8613baaf36df5ce41a5550cc6f2302332a966654f542e5292e957
+EBUILD lvm2-2.02.48.ebuild 5977 RMD160 6e44e3564a72a3311bed7cd983819d515a1e02bb SHA1 11bd581d4db560161d9ed0712a5e2a564d7e17dc SHA256 8c23e2bac5fabd79be943c0c25d397631a9a1a6fba70380eb905cc47a994302c
+MISC ChangeLog 25348 RMD160 f8714b0cb87e0b6aa2e176cfb3f8bf5379132169 SHA1 45f9bb5994accd50c07ef00ebcd35bfb1bb3dc26 SHA256 292e3968e8b43d78b10cefc63306546a59b0fa1014e7153bb1075e450d6da5b6
MISC metadata.xml 792 RMD160 f60db9169ee273ca2f97fa5e69d4e5329e988164 SHA1 42f85f30477c65a164a11e172db7e250f442dca5 SHA256 87ced5a3a6102985f7c2a619dd52f65e62ae916f8921c8e7115a25452cd44b7f
diff --git a/sys-fs/lvm2/files/lvm2-2.02.48-as-needed.patch b/sys-fs/lvm2/files/lvm2-2.02.48-as-needed.patch
new file mode 100644
index 000000000000..eb65548f97e3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.48-as-needed.patch
@@ -0,0 +1,187 @@
+Compile-fix with --as-needed.
+
+To ensure correct output when --as-needed are in the linker flags, the order of
+flags to the linker (directly or via the compiler) must explictly only include
+libraries and objects AFTER all compiler flags, linker flags and linker
+directory arguments.
+
+X-Gentoo-Bug: #217644
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Signed-off-by: Christian Ruppert (idl0r) <idl0r@gentoo.org>
+
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/daemons/clogd/Makefile LVM2.2.02.48/daemons/clogd/Makefile
+--- LVM2.2.02.48.orig/daemons/clogd/Makefile 2009-01-08 09:12:33.000000000 -0800
++++ LVM2.2.02.48/daemons/clogd/Makefile 2009-07-05 14:33:03.799446085 -0700
+@@ -45,12 +45,12 @@ LDFLAGS += $(shell if [ -e /usr/lib64/op
+ else \
+ echo '-L/usr/lib/openais -L/usr/lib'; \
+ fi)
+-LDFLAGS += -lcpg -lSaCkpt -lext2fs
++LIBS += -lcpg -lSaCkpt -lext2fs
+
+ all: ${TARGET}
+
+ clogd: ${SOURCES}
+- ${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
++ ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $^
+
+ no_clogd_kernel_headers:
+ echo "Unable to find clogd kernel headers"
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/daemons/clvmd/Makefile.in LVM2.2.02.48/daemons/clvmd/Makefile.in
+--- LVM2.2.02.48.orig/daemons/clvmd/Makefile.in 2009-03-10 05:10:12.000000000 -0700
++++ LVM2.2.02.48/daemons/clvmd/Makefile.in 2009-07-05 14:41:22.633723993 -0700
+@@ -101,7 +101,7 @@ INSTALL_TARGETS = \
+ install_clvmd
+
+ clvmd: $(OBJECTS) $(top_srcdir)/lib/liblvm-internal.a
+- $(CC) -o clvmd $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) -o clvmd $(OBJECTS) \
+ $(LVMLIBS) $(LMLIBS) $(LIBS)
+
+ .PHONY: install_clvmd
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/daemons/dmeventd/Makefile.in LVM2.2.02.48/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.48.orig/daemons/dmeventd/Makefile.in 2009-07-05 14:32:41.000000000 -0700
++++ LVM2.2.02.48/daemons/dmeventd/Makefile.in 2009-07-05 14:40:43.094941107 -0700
+@@ -41,12 +41,12 @@ include $(top_srcdir)/make.tmpl
+ all: dmeventd
+ device-mapper: dmeventd $(LIB_STATIC)
+
+-LDFLAGS += -ldl -ldevmapper -lpthread
+-CLDFLAGS += -ldl -ldevmapper -lpthread
++LIBS += -ldl -ldevmapper -lpthread
+
+ dmeventd: $(LIB_SHARED) $(LIB_STATIC) $(VERSIONED_SHLIB) dmeventd.o
+- $(CC) -o $@ dmeventd.o $(CFLAGS) $(LDFLAGS) \
+- -L. -ldevmapper-event $(LIBS) -rdynamic
++ $(CC) $(CFLAGS) $(LDFLAGS) -L. \
++ -o $@ dmeventd.o \
++ -ldevmapper-event $(LIBS) -rdynamic
+
+ .PHONY: install_dynamic install_static install_include \
+ install_pkgconfig install_dmeventd
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/daemons/dmeventd/plugins/mirror/Makefile.in LVM2.2.02.48/daemons/dmeventd/plugins/mirror/Makefile.in
+--- LVM2.2.02.48.orig/daemons/dmeventd/plugins/mirror/Makefile.in 2009-05-11 03:28:46.000000000 -0700
++++ LVM2.2.02.48/daemons/dmeventd/plugins/mirror/Makefile.in 2009-07-05 14:33:03.801620744 -0700
+@@ -17,7 +17,8 @@ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+
+ INCLUDES += -I${top_srcdir}/tools
+-CLDFLAGS += -L${top_srcdir}/tools -ldevmapper @LVM2CMD_LIB@
++CLDFLAGS += -L${top_srcdir}/tools
++LIBS += -ldevmapper -lpthread @LVM2CMD_LIB@
+
+ SOURCES = dmeventd_mirror.c
+
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/daemons/dmeventd/plugins/snapshot/Makefile.in LVM2.2.02.48/daemons/dmeventd/plugins/snapshot/Makefile.in
+--- LVM2.2.02.48.orig/daemons/dmeventd/plugins/snapshot/Makefile.in 2009-05-11 03:28:46.000000000 -0700
++++ LVM2.2.02.48/daemons/dmeventd/plugins/snapshot/Makefile.in 2009-07-05 14:33:03.801620744 -0700
+@@ -17,7 +17,8 @@ top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+
+ INCLUDES += -I${top_srcdir}/tools
+-CLDFLAGS += -L${top_srcdir}/tools -ldevmapper @LVM2CMD_LIB@
++CLDFLAGS += -L${top_srcdir}/tools
++LIBS += -lpthread -ldevmapper @LVM2CMD_LIB@
+
+ SOURCES = dmeventd_snapshot.c
+
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/lib/Makefile.in LVM2.2.02.48/lib/Makefile.in
+--- LVM2.2.02.48.orig/lib/Makefile.in 2009-06-03 04:31:06.000000000 -0700
++++ LVM2.2.02.48/lib/Makefile.in 2009-07-05 14:33:03.801620744 -0700
+@@ -137,7 +137,7 @@ ifeq ("@HAVE_LIBDL@", "yes")
+ endif
+
+ ifeq ("@DMEVENTD@", "yes")
+- CLDFLAGS += -ldevmapper-event
++ LIBS += -ldevmapper-event
+ endif
+
+ LIB_NAME = liblvm-internal
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/make.tmpl.in LVM2.2.02.48/make.tmpl.in
+--- LVM2.2.02.48.orig/make.tmpl.in 2009-05-11 03:28:45.000000000 -0700
++++ LVM2.2.02.48/make.tmpl.in 2009-07-05 14:33:03.801620744 -0700
+@@ -28,7 +28,7 @@ GENHTML = @GENHTML@
+ LN_S = @LN_S@
+ SED = @SED@
+
+-LIBS = @LIBS@
++LIBS += @LIBS@ $(LVMLIBS) $(LMLIBS)
+ DEFS += @DEFS@
+ CFLAGS += @CFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+@@ -203,19 +203,19 @@ $(TARGETS): $(OBJECTS)
+ ifeq ("@LIB_SUFFIX@","so")
+ $(LIB_SHARED): $(OBJECTS) $(LDDEPS)
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
+- $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
++ $(CFLAGS) $(CLDFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
+ endif
+
+ ifeq ("@LIB_SUFFIX@","dylib")
+ $(LIB_SHARED): $(OBJECTS) $(LDDEPS)
+ $(CC) -dynamiclib -dylib_current_version,$(LIB_VERSION) \
+- $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
++ $(CFLAGS) $(CLDFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
+ endif
+
+ %.so: %.a
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
+- $(CFLAGS) $(CLDFLAGS) $(LIBS) -o $@ \
+- @CLDWHOLEARCHIVE@ $< @CLDNOWHOLEARCHIVE@
++ $(CFLAGS) $(CLDFLAGS) $(LDFLAGS) -o $@ \
++ @CLDWHOLEARCHIVE@ $< @CLDNOWHOLEARCHIVE@ $(LIBS)
+
+ $(LIB_STATIC): $(OBJECTS)
+ $(RM) $@
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/test/api/Makefile.in LVM2.2.02.48/test/api/Makefile.in
+--- LVM2.2.02.48.orig/test/api/Makefile.in 2009-05-22 07:45:00.000000000 -0700
++++ LVM2.2.02.48/test/api/Makefile.in 2009-07-05 14:39:19.353146953 -0700
+@@ -36,5 +36,5 @@ LDFLAGS = -L$(top_srcdir)/libdm -L$(top_
+ CLDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm
+
+ test: $(OBJECTS) $(top_srcdir)/liblvm/liblvm2app.so $(top_srcdir)/libdm/libdevmapper.so
+- $(CC) -o test $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o test $(OBJECTS) $(LVMLIBS) $(LIBS)
+
+diff -Nuarp --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/tools/Makefile.in LVM2.2.02.48/tools/Makefile.in
+--- LVM2.2.02.48.orig/tools/Makefile.in 2009-05-21 04:11:29.000000000 -0700
++++ LVM2.2.02.48/tools/Makefile.in 2009-07-05 14:38:36.536891908 -0700
+@@ -106,24 +106,30 @@ include $(top_srcdir)/make.tmpl
+ device-mapper: $(TARGETS_DM)
+
+ dmsetup: dmsetup.o $(top_srcdir)/libdm/libdevmapper.$(LIB_SUFFIX)
+- $(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) \
+- -L$(top_srcdir)/libdm -ldevmapper $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) \
++ -L$(top_srcdir)/libdm \
++ -o $@ dmsetup.o \
++ -ldevmapper $(LIBS)
+
+ dmsetup.static: dmsetup.o $(interfacedir)/libdevmapper.a
+- $(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) -static \
+- -L$(interfacedir) -ldevmapper $(LIBS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) -static \
++ -L$(interfacedir) \
++ -o $@ dmsetup.o \
++ -ldevmapper $(LIBS) \
+ $(LIB_PTHREAD)
+
+ all: device-mapper
+
+ lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm-internal.a
+- $(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm.o \
+- $(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
++ $(CC) $(CFLAGS) $(LDFLAGS) \
++ -o $@ $(OBJECTS) lvm.o \
++ $(LVMLIBS) $(LIBS) -rdynamic
+
+ LIB_PTHREAD = @LIB_PTHREAD@
+ lvm.static: $(OBJECTS) lvm-static.o $(top_srcdir)/lib/liblvm-internal.a $(interfacedir)/libdevmapper.a
+- $(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm-static.o -static \
+- -L$(interfacedir) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
++ $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacedir) \
++ -o $@ $(OBJECTS) lvm-static.o \
++ $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
+
+ liblvm2cmd.a: $(top_srcdir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
+ cat $(top_srcdir)/lib/liblvm-internal.a > $@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.48-device-mapper-export-format.patch b/sys-fs/lvm2/files/lvm2-2.02.48-device-mapper-export-format.patch
new file mode 100644
index 000000000000..6e73d414802a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.48-device-mapper-export-format.patch
@@ -0,0 +1,306 @@
+Add support for exporting the device-mapper table to userspace.
+
+Original patch written by Matthias Schwarzott <zzam@gentoo.org>, in response to
+Gentoo bug #189404.
+
+This makes it possible to have udev rules based on the properties of the
+device-mapper node, such as target types, suspended status etc.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/libdm/libdevmapper.h LVM2.2.02.48/libdm/libdevmapper.h
+--- LVM2.2.02.48.orig/libdm/libdevmapper.h 2009-06-17 13:55:24.000000000 -0700
++++ LVM2.2.02.48/libdm/libdevmapper.h 2009-07-05 14:16:14.331690820 -0700
+@@ -953,6 +953,7 @@
+ #define DM_REPORT_OUTPUT_FIELD_NAME_PREFIX 0x00000008
+ #define DM_REPORT_OUTPUT_FIELD_UNQUOTED 0x00000010
+ #define DM_REPORT_OUTPUT_COLUMNS_AS_ROWS 0x00000020
++#define DM_REPORT_OUTPUT_EXPORT 0x00000040
+
+ struct dm_report *dm_report_init(uint32_t *report_types,
+ const struct dm_report_object_type *types,
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/libdm/libdm-report.c LVM2.2.02.48/libdm/libdm-report.c
+--- LVM2.2.02.48.orig/libdm/libdm-report.c 2009-02-09 01:45:49.000000000 -0800
++++ LVM2.2.02.48/libdm/libdm-report.c 2009-07-05 14:16:14.331690820 -0700
+@@ -891,6 +891,8 @@
+ uint32_t align;
+ const char *repstr;
+ char buf[4096];
++ const char *fname;
++ char tmp_char;
+
+ if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) {
+ if (!(field_id = strdup(rh->fields[field->props->field_num].id))) {
+@@ -921,6 +923,25 @@
+ return 0;
+ }
+ }
++ if (rh->flags & DM_REPORT_OUTPUT_EXPORT) {
++ fname = rh->fields[field->props->field_num].id;
++ if (!dm_pool_grow_object(rh->mem, "DM_", strlen("DM_"))) {
++ log_error("dm_report: Unable to extend output line");
++ return 0;
++ }
++ while (fname && fname[0]) {
++ tmp_char = toupper(fname[0]);
++ if (!dm_pool_grow_object(rh->mem, &tmp_char, 1)) {
++ log_error("dm_report: Unable to extend output line");
++ return 0;
++ }
++ fname++;
++ }
++ if (!dm_pool_grow_object(rh->mem, "=", strlen("="))) {
++ log_error("dm_report: Unable to extend output line");
++ return 0;
++ }
++ }
+
+ repstr = field->report_string;
+ width = field->props->width;
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.48.orig/tools/dmsetup.c LVM2.2.02.48/tools/dmsetup.c
+--- LVM2.2.02.48.orig/tools/dmsetup.c 2009-06-03 13:44:49.000000000 -0700
++++ LVM2.2.02.48/tools/dmsetup.c 2009-07-05 14:22:41.972149507 -0700
+@@ -107,6 +107,7 @@
+ enum {
+ READ_ONLY = 0,
+ COLS_ARG,
++ EXPORT_ARG,
+ EXEC_ARG,
+ FORCE_ARG,
+ GID_ARG,
+@@ -142,7 +143,8 @@
+ DR_INFO = 2,
+ DR_DEPS = 4,
+ DR_TREE = 8, /* Complete dependency tree required */
+- DR_NAME = 16
++ DR_NAME = 16,
++ DR_TABLE = 0x20, /* table is required, not just info */
+ } report_type_t;
+
+ static int _switches[NUM_SWITCHES];
+@@ -1217,8 +1219,13 @@
+ name = argv[1];
+ }
+
+- if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
+- return 0;
++ if (_report_type & DR_TABLE ) {
++ if (!(dmt = dm_task_create(DM_DEVICE_TABLE)))
++ return 0;
++ } else {
++ if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
++ return 0;
++ }
+
+ if (!_set_task_device(dmt, name, 0))
+ goto out;
+@@ -1682,6 +1689,16 @@
+ return dm_report_field_uint32(rh, field, &value);
+ }
+
++static int _int_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ const int value = *(const int *)data;
++
++ return dm_report_field_int(rh, field, &value);
++}
++
+ static int _dm_name_disp(struct dm_report *rh,
+ struct dm_pool *mem __attribute((unused)),
+ struct dm_report_field *field, const void *data,
+@@ -1793,6 +1810,66 @@
+ }
+
+
++static int _dm_info_cleartext_status_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ const char *buf = "NOTPRESENT";
++ const struct dm_info *info = data;
++
++ if (info->exists) {
++ if (info->suspended)
++ buf = "SUSPENDED";
++ else
++ buf = info->read_only ? " READONLY" : "ACTIVE";
++ }
++
++ return dm_report_field_string(rh, field, &buf);
++}
++
++static int _dm_info_target_types_disp(struct dm_report *rh,
++ struct dm_pool *mem __attribute((unused)),
++ struct dm_report_field *field, const void *data,
++ void *private __attribute((unused)))
++{
++ char buf[1024];
++ char *dest = buf;
++ int remains = sizeof(buf);
++ int written;
++ const char *s = buf;
++ struct dm_task *dmt = (struct dm_task *) data;
++ void *next = NULL;
++ uint64_t start, length;
++ char *target_type = NULL;
++ char *params;
++
++
++ buf[0] = '\0';
++
++ next = dm_get_next_target(dmt, next, &start, &length,
++ &target_type, &params);
++ if (target_type) {
++ written = snprintf(dest, remains, "%s", target_type);
++ dest += written;
++ remains -= written;
++
++ while (remains > 0 && next) {
++ next = dm_get_next_target(dmt, next, &start, &length,
++ &target_type, &params);
++ if (target_type) {
++ written = snprintf(dest, remains, ",%s", target_type);
++ dest += written;
++ remains -= written;
++ }
++ }
++ }
++
++ buf[sizeof(buf)-1] = '\0';
++
++ return dm_report_field_string(rh, field, &s);
++}
++
+ static int _dm_info_devno_disp(struct dm_report *rh, struct dm_pool *mem,
+ struct dm_report_field *field, const void *data,
+ void *private)
+@@ -2057,6 +2134,7 @@
+ { DR_DEPS, "Mapped Device Relationship Information", "", _deps_get_obj },
+ { DR_TREE, "Mapped Device Relationship Information", "", _tree_get_obj },
+ { DR_NAME, "Mapped Device Name Components", "", _split_name_get_obj },
++ { DR_TABLE, "Mapped Device Table", "", _task_get_obj },
+ { 0, "", "", NULL },
+ };
+
+@@ -2076,6 +2154,7 @@
+ FIELD_F(TASK, NUM, "RAhead", 6, dm_read_ahead, "read_ahead", "Read ahead in sectors.")
+
+ FIELD_F(INFO, STR, "Stat", 4, dm_info_status, "attr", "(L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.")
++FIELD_F(INFO, STR, "State", 1, dm_info_cleartext_status, "status", "State as cleartext.")
+ FIELD_F(INFO, STR, "Tables", 6, dm_info_table_loaded, "tables_loaded", "Which of the live and inactive table slots are filled.")
+ FIELD_F(INFO, STR, "Suspended", 9, dm_info_suspended, "suspended", "Whether the device is suspended.")
+ FIELD_F(INFO, STR, "Read-only", 9, dm_info_read_only, "readonly", "Whether the device is read-only or writeable.")
+@@ -2086,6 +2165,11 @@
+ FIELD_O(INFO, dm_info, NUM, "Targ", target_count, 4, int32, "segments", "Number of segments in live table, if present.")
+ FIELD_O(INFO, dm_info, NUM, "Event", event_nr, 6, uint32, "events", "Number of most recent event.")
+
++FIELD_O(INFO, dm_info, NUM, "RO", read_only, 2, int, "read_only", "Read only.")
++FIELD_O(INFO, dm_info, NUM, "Ex", exists, 2, int, "exists", "Exists.")
++FIELD_O(INFO, dm_info, NUM, "Susp", suspended, 4, int, "suspended", "Suspended.")
++FIELD_O(INFO, dm_info, NUM, "tab_live", live_table, 8, int, "table_live", "Live table.")
++FIELD_O(INFO, dm_info, NUM, "tab_inact", inactive_table, 9, int, "table_inactive", "Inactive table.")
+ FIELD_O(DEPS, dm_deps, NUM, "#Devs", count, 5, int32, "device_count", "Number of devices used by this one.")
+ FIELD_F(TREE, STR, "DevNames", 8, dm_deps_names, "devs_used", "List of names of mapped devices used by this one.")
+ FIELD_F(DEPS, STR, "DevNos", 6, dm_deps, "devnos_used", "List of device numbers of devices used by this one.")
+@@ -2093,6 +2177,7 @@
+ FIELD_F(TREE, NUM, "#Refs", 5, dm_tree_parents_count, "device_ref_count", "Number of mapped devices referencing this one.")
+ FIELD_F(TREE, STR, "RefNames", 8, dm_tree_parents_names, "names_using_dev", "List of names of mapped devices using this one.")
+ FIELD_F(TREE, STR, "RefDevNos", 9, dm_tree_parents_devs, "devnos_using_dev", "List of device numbers of mapped devices using this one.")
++FIELD_F(TABLE, STR, "Targettypes", 32, dm_info_target_types, "target_types", "Used target types.")
+
+ FIELD_O(NAME, dm_split_name, STR, "Subsys", subsystem, 6, dm_subsystem, "subsystem", "Userspace subsystem responsible for this device.")
+ FIELD_O(NAME, dm_split_name, STR, "VG", vg_name, 4, dm_vg_name, "vg_name", "LVM Volume Group name.")
+@@ -2109,14 +2194,16 @@
+ #undef FIELD_F
+
+ static const char *default_report_options = "name,major,minor,attr,open,segments,events,uuid";
++static const char *default_export_options = "name,major,minor,status,read_only,exists,suspended,table_live,table_inactive,open,segments,events,uuid,target_types";
+ static const char *splitname_report_options = "vg_name,lv_name,lv_layer";
+
+ static int _report_init(struct command *c)
+ {
+- char *options = (char *) default_report_options;
++ char *default_options = (char *) default_report_options;
++ char *options;
+ const char *keys = "";
+ const char *separator = " ";
+- int aligned = 1, headings = 1, buffered = 1, field_prefixes = 0;
++ int aligned = 1, headings = 1, buffered = 1, field_prefixes = 0, export = 0;
+ int quoted = 1, columns_as_rows = 0;
+ uint32_t flags = 0;
+ size_t len = 0;
+@@ -2146,6 +2233,15 @@
+ field_prefixes = 1;
+ }
+
++ if (_switches[EXPORT_ARG]) {
++ default_options = (char *) default_export_options;
++ separator = "\n";
++ aligned = 0;
++ headings = 0;
++ export = 1;
++ }
++
++ options = default_options;
+ if (_switches[OPTIONS_ARG] && _string_args[OPTIONS_ARG]) {
+ if (*_string_args[OPTIONS_ARG] != '+')
+ options = _string_args[OPTIONS_ARG];
+@@ -2197,6 +2293,9 @@
+ if (columns_as_rows)
+ flags |= DM_REPORT_OUTPUT_COLUMNS_AS_ROWS;
+
++ if (export)
++ flags |= DM_REPORT_OUTPUT_EXPORT;
++
+ if (!(_report = dm_report_init(&_report_type,
+ _report_types, _report_fields,
+ options, separator, flags, keys, NULL)))
+@@ -2276,7 +2375,8 @@
+ fprintf(out, "dmsetup [--version] [-v|--verbose [-v|--verbose ...]]\n"
+ " [-r|--readonly] [--noopencount] [--nolockfs]\n"
+ " [--readahead [+]<sectors>|auto|none]\n"
+- " [-c|-C|--columns] [-o <fields>] [-O|--sort <sort_fields>]\n"
++ " [-c|-C|--columns] [-e|--export]\n"
++ " [-o <fields>] [-O|--sort <sort_fields>]\n"
+ " [--nameprefixes] [--noheadings] [--separator <separator>]\n\n");
+ for (i = 0; _commands[i].name; i++)
+ fprintf(out, "\t%s %s\n", _commands[i].name, _commands[i].help);
+@@ -2532,7 +2632,7 @@
+ show_all++;
+ if (c == 'd')
+ delete++;
+- if (c == 'e')
++ if (c == 'E')
+ encrypt_loop++;
+ if (c == 'f')
+ find++;
+@@ -2627,6 +2727,7 @@
+ static struct option long_options[] = {
+ {"readonly", 0, &ind, READ_ONLY},
+ {"columns", 0, &ind, COLS_ARG},
++ {"export", 0, &ind, EXPORT_ARG},
+ {"exec", 1, &ind, EXEC_ARG},
+ {"force", 0, &ind, FORCE_ARG},
+ {"gid", 1, &ind, GID_ARG},
+@@ -2709,12 +2810,16 @@
+
+ optarg = 0;
+ optind = OPTIND_INIT;
+- while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfG:j:m:M:no:O:ru:U:v",
++ while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCefG:j:m:M:no:O:ru:U:v",
+ long_options, NULL)) != -1) {
+ if (c == ':' || c == '?')
+ return 0;
+ if (c == 'c' || c == 'C' || ind == COLS_ARG)
+ _switches[COLS_ARG]++;
++ if (c == 'e' || ind == EXPORT_ARG) {
++ _switches[EXPORT_ARG]++;
++ _switches[COLS_ARG]++;
++ }
+ if (c == 'f' || ind == FORCE_ARG)
+ _switches[FORCE_ARG]++;
+ if (c == 'r' || ind == READ_ONLY)
diff --git a/sys-fs/lvm2/lvm2-2.02.48.ebuild b/sys-fs/lvm2/lvm2-2.02.48.ebuild
new file mode 100644
index 000000000000..c0f5edc8cd47
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.48.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.48.ebuild,v 1.1 2009/07/05 22:02:51 robbat2 Exp $
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software."
+HOMEPAGE="http://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+IUSE="readline static clvm cman lvm1 selinux"
+
+DEPEND="!sys-fs/device-mapper
+ clvm? ( =sys-cluster/dlm-2*
+ cman? ( =sys-cluster/cman-2* ) )"
+
+RDEPEND="${DEPEND}
+ !sys-fs/lvm-user
+ !sys-fs/clvm"
+
+S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
+
+pkg_setup() {
+ use nolvmstatic && eerror "USE=nolvmstatic has changed to USE=static via package.use"
+ use nolvm1 && eerror "USE=nolvm1 has changed to USE=lvm1 via package.use"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.02.45-dmeventd.patch
+ epatch "${FILESDIR}"/lvm.conf-2.02.45.patch
+ epatch "${FILESDIR}"/${PN}-2.02.48-device-mapper-export-format.patch
+ epatch "${FILESDIR}"/${PN}-2.02.48-as-needed.patch
+}
+
+src_compile() {
+ # Static compile of lvm2 so that the install described in the handbook works
+ # http://www.gentoo.org/doc/en/lvm2.xml
+ # fixes http://bugs.gentoo.org/show_bug.cgi?id=84463
+ local myconf
+ local buildmode
+
+ # fsadm is broken, don't include it (2.02.28)
+ myconf="${myconf} --enable-dmeventd --enable-cmdlib"
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ if use static ; then
+ einfo "Building static LVM, for usage inside genkernel"
+ myconf="${myconf} --enable-static_link"
+ buildmode="internal"
+ else
+ ewarn "Building shared LVM, it will not work inside genkernel!"
+ buildmode="shared"
+ fi
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ myconf="${myconf} --with-mirrors=internal"
+ myconf="${myconf} --with-snapshots=internal"
+
+ if use lvm1 ; then
+ myconf="${myconf} --with-lvm1=${buildmode}"
+ else
+ myconf="${myconf} --with-lvm1=none"
+ fi
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ use hppa && myconf="${myconf} --disable-o_direct"
+
+ if use clvm; then
+ myconf="${myconf} --with-cluster=${buildmode}"
+ # 4-state! Make sure we get it right, per bug 210879
+ # Valid options are: none, cman, gulm, all
+ # 2009/02:
+ # gulm is removed now, now dual-state:
+ # cman, none
+ # all still exists, but is not needed
+ local clvmd=""
+ use cman && clvmd="cman"
+ #clvmd="${clvmd/cmangulm/all}"
+ [ -z "${clvmd}" ] && clvmd="none"
+ myconf="${myconf} --with-clvmd=${clvmd}"
+ myconf="${myconf} --with-pool=${buildmode}"
+ else
+ myconf="${myconf} --with-clvmd=none --with-cluster=none"
+ fi
+
+ myconf="${myconf} --sbindir=/sbin --with-staticdir=/sbin"
+ econf $(use_enable readline) \
+ $(use_enable selinux) \
+ --libdir=/usr/$(get_libdir) \
+ ${myconf} \
+ CLDFLAGS="${LDFLAGS}" || die
+
+ pushd include
+ emake || die "Failed to prepare symlinks"
+ popd
+
+ pushd libdm
+ emake || die "failed to build libdm"
+ popd
+
+ pushd lib
+ emake || die "failed to build lib"
+ popd
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ # TODO: At some point in the future, we need to stop installing the static
+ # as the /sbin/lvm name, and have both variants seperate.
+ if use static; then
+ cp -f "${D}"/sbin/lvm.static "${D}"/sbin/lvm \
+ || die "Failed to copy lvm.static"
+ fi
+
+ dodir /$(get_libdir)
+ # Put these in root so we can reach before /usr is up
+ for i in \
+ libdevmapper-event{,-lvm2{mirror,snapshot}} \
+ libdevmapper \
+ liblvm2{format1,snapshot,cmd} \
+ ; do
+ b="${D}"/usr/$(get_libdir)/${i}
+ if [ -f "${b}".so ]; then
+ mv -f "${b}".so* "${D}"/$(get_libdir) || die
+ gen_usr_ldscript ${i}.so || die
+ fi
+ done
+
+ dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt}
+ insinto /$(get_libdir)/rcscripts/addons
+ newins "${FILESDIR}"/lvm2-start.sh-2.02.28-r2 lvm-start.sh || die
+ newins "${FILESDIR}"/lvm2-stop.sh-2.02.37 lvm-stop.sh || die
+ newinitd "${FILESDIR}"/lvm.rc-2.02.28-r2 lvm || die
+ newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die
+ if use clvm; then
+ newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die
+ newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die
+ fi
+
+ # move shared libs to /lib(64)
+ dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a"
+ #gen_usr_ldscript libdevmapper.so
+
+ insinto /etc
+ doins "${FILESDIR}"/dmtab
+ insinto /$(get_libdir)/rcscripts/addons
+ doins "${FILESDIR}"/dm-start.sh
+
+ # Device mapper stuff
+ newinitd "${FILESDIR}"/device-mapper.rc-1.02.22-r3 device-mapper || die
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
+
+ newinitd "${FILESDIR}"/1.02.22-dmeventd.initd dmeventd || die
+ dolib.a daemons/dmeventd/libdevmapper-event.a || die
+ #gen_usr_ldscript libdevmapper-event.so
+
+ insinto /etc/udev/rules.d/
+ newins "${FILESDIR}"/64-device-mapper.rules-1.02.22-r5 64-device-mapper.rules || die
+
+ elog "USE flag nocman is deprecated and replaced"
+ elog "with the cman USE flag."
+ elog ""
+ elog "USE flags clvm and cman are masked"
+ elog "by default and need to be unmasked to use them"
+ elog ""
+ elog "Rebuild your genkernel initramfs if you are using lvm"
+ use nolvmstatic && \
+ elog "USE=nolvmstatic has changed to USE=static via package.use"
+ use nolvm1 && \
+ elog "USE=nolvm1 has changed to USE=lvm1 via package.use"
+}
+
+pkg_postinst() {
+ elog "lvm volumes are no longer automatically created for"
+ elog "baselayout-2 users. If you are using baselayout-2, be sure to"
+ elog "run: # rc-update add lvm boot"
+ elog "Do NOT add it if you are using baselayout-1 still."
+}
+
+src_test() {
+ einfo "Testcases disabled because of device-node mucking"
+ einfo "If you want them, compile the package and see ${S}/tests"
+}