summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-06-09 22:41:45 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-06-09 22:41:45 +0000
commit057fc354990787ee9e09c2add0b7d999c29d28a2 (patch)
tree24e61cf1ee8212fead2dd6ad2dad7cd14eadf791 /sys-fs/lvm2
parentOld. (diff)
downloadhistorical-057fc354990787ee9e09c2add0b7d999c29d28a2.tar.gz
historical-057fc354990787ee9e09c2add0b7d999c29d28a2.tar.bz2
historical-057fc354990787ee9e09c2add0b7d999c29d28a2.zip
Bugs #319017, #322969: adjusting LVM service ordering and optimizing startup and shutdown processes. When you install this upgrade, you apply all 3 init.d changes (device-mapper, dmeventd, lvm).
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r--sys-fs/lvm2/ChangeLog12
-rw-r--r--sys-fs/lvm2/Manifest8
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.67-r130
-rw-r--r--sys-fs/lvm2/files/dmeventd.initd-2.02.67-r123
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.67-r139
-rw-r--r--sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r142
-rw-r--r--sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r131
-rw-r--r--sys-fs/lvm2/lvm2-2.02.67-r1.ebuild253
8 files changed, 436 insertions, 2 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog
index 4e8d303f7180..d7f0459dd9be 100644
--- a/sys-fs/lvm2/ChangeLog
+++ b/sys-fs/lvm2/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-fs/lvm2
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.211 2010/06/07 23:09:45 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.212 2010/06/09 22:41:45 robbat2 Exp $
+
+*lvm2-2.02.67-r1 (09 Jun 2010)
+
+ 09 Jun 2010; Robin H. Johnson <robbat2@gentoo.org>
+ +files/device-mapper.rc-2.02.67-r1, +files/dmeventd.initd-2.02.67-r1,
+ +files/lvm.rc-2.02.67-r1, +files/lvm2-start.sh-2.02.67-r1,
+ +files/lvm2-stop.sh-2.02.67-r1, +lvm2-2.02.67-r1.ebuild:
+ Bugs #319017, #322969: adjusting LVM service ordering and optimizing
+ startup and shutdown processes. When you install this upgrade, you apply
+ all 3 init.d changes (device-mapper, dmeventd, lvm).
07 Jun 2010; Robin H. Johnson <robbat2@gentoo.org> lvm2-2.02.33.ebuild,
lvm2-2.02.33-r1.ebuild, lvm2-2.02.36.ebuild, lvm2-2.02.37.ebuild,
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 21ebff046d97..6f7a31e11582 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -8,7 +8,9 @@ AUX clvmd.rc-2.02.39 3682 RMD160 891e8f770a5566fc9102cc02db8ff81174791aca SHA1 4
AUX device-mapper.conf-1.02.22-r3 15 RMD160 1954cbfeea6eeed764a6344039d9c1eb58f7b00a SHA1 0dd47dfb811946a11fbde987e2ce1e105ed7fafb SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22
AUX device-mapper.rc-1.02.22-r3 618 RMD160 c6d4c405ce381cc4c86c8e838ba25ddb64f4ac75 SHA1 92486f5a6f77b220e3d11589f12c458eaeeda0b1 SHA256 c682cfa6da469eed055bf6e6a88e2d48ecfa12be406cd857965ef08bb1ecdaf8
AUX device-mapper.rc-1.02.51-r2 701 RMD160 cebd843b44b7d03acc113fbaa0af30f21d0f5de6 SHA1 f563adc35777030ec50b29005a9285a90e86a904 SHA256 dfdff0739dad521087ffa20f06e274bbc666e0ab85779621c360c04728e3cf58
+AUX device-mapper.rc-2.02.67-r1 841 RMD160 a6bb66fd8d2f30e168658c557efd99b4a277abe7 SHA1 3447311f2ee9cb104fc9db11f29264c9f4a48c22 SHA256 18be4a227c786a8cdbbb0fb0f6da295db55359b91884b4d4e0e9976b80aa4003
AUX dm-start.sh 2114 RMD160 96a6b824e22d5c04f2710f98cda5361bde6a265c SHA1 b18c79802ab8bac9befe4a32cce6fe13beb3134c SHA256 c064c3e2a1d128a6326b539a675f1a6cf88b75f5526222e232d53ea1468a9bcf
+AUX dmeventd.initd-2.02.67-r1 683 RMD160 23e3787c3bd9d99a1d73d4688c91ec1198f4a7e6 SHA1 b00215e6297d69330df834e291b809c847396c28 SHA256 84e157b1b99b9fddfc97ab95bc6d37bfa4378578458744447e9478ebe6fc821b
AUX dmtab 416 RMD160 d5da257f9ac48af9e831dbd6591e608577d87717 SHA1 f37631cb644b8a242a0426375b1b6acee0bde399 SHA256 e2e22bbe13fb97ec9a68659daa275b1d22fd0a3fd21e76b1f4bfba504a8bd7b5
AUX lvm.conf-2.02.33.patch 3136 RMD160 c0292c39db064f0a4151ffccdc441be2fa78f8cf SHA1 8dbcbf66a841cc8acd889e174095df9932813a3e SHA256 63a8c21186f47979cb628970dca12df2a9f319745488a4d8a1e01f238a7fc711
AUX lvm.conf-2.02.36.patch 3118 RMD160 b19039d550cd81d46f77d493cb6c5507a3fd66ee SHA1 dd4f4892c4b423348a764c1373ed81959ca0772b SHA256 85abba15c2dc52af9d518140e210abba852df83deb7740a19be3987a64f677f9
@@ -19,6 +21,7 @@ AUX lvm.conf-2.02.67.patch 1676 RMD160 9bd0d32e205853b38493380373a7ba29d5b085ad
AUX lvm.confd-2.02.28-r2 173 RMD160 cf554372fa11df056e3757e5139fad6c7606a696 SHA1 e8186ebb91d12247d0865285dc62346d1cbc207a SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844
AUX lvm.rc-2.02.28-r2 661 RMD160 3b267ab500785de249101548a15792708d3adc55 SHA1 b014a0d4344c58c963db20cefeb726dfd66d1b1a SHA256 962d9e8baa06a617671701d21f8a2849b45ab9baa6684b2e99b2b03192c9e66a
AUX lvm.rc-2.02.51-r2 792 RMD160 9a5bb96606d20a420b7ff94e6de2b140d0a5022d SHA1 302111a801f1301f387db52180ec2f876d08898f SHA256 b883e8ae1d3b9d8a0bdf85b009125e9408ee6d22a159b2e4c340fce455d5fd9f
+AUX lvm.rc-2.02.67-r1 918 RMD160 f2918f4a25746f8ee2ee220cc2819e13c0093662 SHA1 9e6b995c2b8de569db01f09a070dc466fe0248d9 SHA256 63e8e9cbfbed5124d31b365f0e8108822847ceb381143c9529d9bf5439f2a99a
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 7894 RMD160 d44bc76d5f83249af6401c81d7a21082022446c8 SHA1 07b850f41425cd1505259d54de3daf9cdb3cf259 SHA256 8e23f75f9e51f1c94bcba4a4a87534146baa6e992f38f86552e8688091cfbc09
@@ -41,11 +44,13 @@ AUX lvm2-start.sh 1025 RMD160 fa27385e4640d59c33f2ca42db9d38f80def3977 SHA1 83a8
AUX lvm2-start.sh-2.02.28-r2 1180 RMD160 3ec85899a19c56d4d49e4654e1b05f53bc7d9c93 SHA1 80fce53cc1925990fbb103e57314b3c1740de6ed SHA256 a891855ed04d4c59f17fc0b19dc61813a4ca3cc183166867606d92cb58498460
AUX lvm2-start.sh-2.02.49-r1 1200 RMD160 b88e37e7e228fecdedf359c1132723077a3d4c94 SHA1 85eb83a83c598b3ea405ec4c597a9c77364e7fb4 SHA256 94d15b5dbeabb275b4d91b284b3113cd812b7e7c90ec3018693803b3e91d9535
AUX lvm2-start.sh-2.02.49-r3 1244 RMD160 26916bf97b553ee19ebb5bacf2ee754cc5695ea7 SHA1 c5d9fa10089efd28e0dc0fb101ed90f0e6124f0a SHA256 e9c72d8500294301131183b37a7060dbcbd1d01b2a3e8425cf644e07652fae87
+AUX lvm2-start.sh-2.02.67-r1 1255 RMD160 da52e34dfbde91f179acaa9fcdbc7ffe4e9ea5d8 SHA1 47671b4f08ba5a72d06a2fa1bf048616af4e0dd5 SHA256 0351d2fa86fcf5b3b93611d9932dbc6d3fb2bb16210c321334895c51c67f8e91
AUX lvm2-stop.sh 1939 RMD160 52d1adbf4bdbe6e75e9ff2e91c809b6eed5839d5 SHA1 8ccf316b02fb5f79bb6c0464cc3c1606704cec7b SHA256 94a34e0b149ac43f5f1042c45ebdbaa69ac83bcbea7f894c15ab59aad65cb22c
AUX lvm2-stop.sh-2.02.28-r5 2055 RMD160 54ad47b7e48b651f1909df5e5b68440ebeb6d9f2 SHA1 07a85433d5a5d7295e781a8261f9265d050fe963 SHA256 3dd704eef9f7bd0cd97fc0afdb384c1d6e6163144c6c79b00f2dd8d27877f574
AUX lvm2-stop.sh-2.02.37 2060 RMD160 1cd419f466c58382c852257878ab6bbbdd0061f9 SHA1 b487acbf219171afee029562f3b71188ca876dfc SHA256 e295acf3b53e00d6e868607ac422bbb196843165885a8f37323bfff4d147fa42
AUX lvm2-stop.sh-2.02.49-r1 2169 RMD160 81048d1db521e8660bbbddbf43d72f572fb8cb7f SHA1 0684c7bb7b6f26eda9cf79b01869e380c0b66ae6 SHA256 6d60daab486896cbf6f52b4f792717bcc8418d3fd9b3335e4cb2e28a888c02d6
AUX lvm2-stop.sh-2.02.49-r3 2253 RMD160 7b00d83fb35125f73349c49af765c1e7409de35a SHA1 e4f61120506e11f4a063ccf10bab2e495194d379 SHA256 dea23f37d232437b15c743ca23af3d7baa95f2b7c71ac1e47ae5289bdcfe0a56
+AUX lvm2-stop.sh-2.02.67-r1 964 RMD160 813e2dbf967c5114ca3eba441815216efd2ebe1e SHA1 ea5568cb54cd1efc0b724830e0d8538cf3c5cfed SHA256 5a208c7ab780404e476afdff349deedad5c57b3feb7e22a07a7075d09c1370e7
DIST LVM2.2.01.13.tgz 463900 RMD160 5bbee0800fe4b04c3452445a5851c0d1960fb521 SHA1 34b18451aec6914da7e58f2d098a92216bb306f2 SHA256 f98495cbf43128a67bf20fe21e74ef9aa8fb872de80c980f1f506b45b922df50
DIST LVM2.2.02.33.tgz 558820 RMD160 903d72844c4b309f26f9e58c4245b4f7377e23c7 SHA1 eb96a9f0cd90bdb61a8d5d5d44bd0b066420b70a SHA256 f8af333573e37b73ecc17eb0422e2ae9918e1e4f87a72f8e4054663e7d05e4b8
DIST LVM2.2.02.36.tgz 568884 RMD160 dae1925160373c9f8e3c58954b394015c654c667 SHA1 29ddaf10a49868fb8d85afd21c8e7f6943846eae SHA256 359000abf276c65a4cab0ac682be3d0891130b75733a09543e340bce22486df7
@@ -88,6 +93,7 @@ EBUILD lvm2-2.02.56.ebuild 6519 RMD160 15073500bde596fe5c5705f16809e62053b69b2b
EBUILD lvm2-2.02.63-r1.ebuild 7570 RMD160 14640b0ec48c6906085c14b58357d02864f6fab6 SHA1 6fe1f1158d35e2f37e4594bf2b52a6515fd40d14 SHA256 574ba667ebadee7ff5c694bf99181f5180e99191740965cac7bf9f7f7849d5c4
EBUILD lvm2-2.02.63-r2.ebuild 7708 RMD160 5e0176e9d4cdceba012dab3c6f9a929a8363dc91 SHA1 0f097f2822fb8ce1fe8b60d6f5c8870ff89af1ef SHA256 0aea1f557449094375ad26e6215f5b26beeef444c54fbfb07183729c4a04a5fd
EBUILD lvm2-2.02.64.ebuild 7926 RMD160 ad843ab85e71c5752096d60446c8db5061e6b681 SHA1 cbc495d15de2b1ffa333ed2dce01835f6a1147d1 SHA256 a4a2ba51fa1d46a423cb1ae8adf942c0b2c7ff7f12298b4dc89c11367744bf00
+EBUILD lvm2-2.02.67-r1.ebuild 8116 RMD160 e364ae957d7644b8db1145c8bbe021c084eabd61 SHA1 f3ab30befa52fe8775ac1e11dbbe0e67559fbcd3 SHA256 db68e52639f4509bbd24bb4a8fd97be82be54be3caa7e94f06fbd020e2cc0b64
EBUILD lvm2-2.02.67.ebuild 8110 RMD160 aaf4a019266f6f63091e3fbb8de92bc5ce26f99a SHA1 0ba61b30d452f19563d186df511828de3d08a06b SHA256 85f7d288549b04e66f2a6cdb0db85e4f787bd331e819312a6a69729f206cd801
-MISC ChangeLog 37784 RMD160 e3c1c1367e7fed30d8ec3e05e19bfbffe7c13bd0 SHA1 992925516e11048b89c4afa810c77dd6c6edbc11 SHA256 d14f2f26ab05327e5178ccd7bb71ec6c3a54320f4b16d9359807279ffcb62f50
+MISC ChangeLog 38263 RMD160 eedb0a6c31a71b879f9d064081278c33f249c39c SHA1 3f5e9628a9c2c8af780545773a41ace684dff70d SHA256 02d8e5a51bec6e9ed9e15af6b6aff842f7eabc1bd6bb3b53f9761d08f076f2b6
MISC metadata.xml 792 RMD160 f60db9169ee273ca2f97fa5e69d4e5329e988164 SHA1 42f85f30477c65a164a11e172db7e250f442dca5 SHA256 87ced5a3a6102985f7c2a619dd52f65e62ae916f8921c8e7115a25452cd44b7f
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.67-r1 b/sys-fs/lvm2/files/device-mapper.rc-2.02.67-r1
new file mode 100644
index 000000000000..1cb0f4daad1c
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.67-r1
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/device-mapper.rc-2.02.67-r1,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+depend() {
+ # necessary for services when using baselayout-2
+ # but conflict for baselayout-1
+ if [ -e /etc/init.d/root ] ; then
+ before checkfs fsck
+ after modules
+ fi
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ before dmeventd
+}
+
+start() {
+ if [ ! -e /etc/init.d/root ] ; then
+ eerror "The ${SVCNAME} init script is written for baselayout-2"
+ eerror "Please do not use it with baselayout-1"
+ return 1
+ fi
+
+ local f=/lib/rcscripts/addons/dm-start.sh
+ if [ -r "$f" ]; then
+ ( . "$f" )
+ fi
+}
+
diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1 b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
new file mode 100644
index 000000000000..1b8ebe60a7ed
--- /dev/null
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+depend() {
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ after lvm device-mapper
+}
+
+start() {
+ ebegin "Starting dmeventd"
+ start-stop-daemon --start --exec /sbin/dmeventd --pidfile /var/run/dmeventd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dmeventd"
+ start-stop-daemon --stop --exec /sbin/dmeventd --pidfile /var/run/dmeventd.pid
+ eend $?
+}
+
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.67-r1 b/sys-fs/lvm2/files/lvm.rc-2.02.67-r1
new file mode 100644
index 000000000000..d4eafc1880c5
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.67-r1
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.67-r1,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+depend() {
+ if [ -f /etc/init.d/sysfs ]; then
+ # on baselayout-1 this causes
+ # dependency-cycles with checkroot (before *)
+ before checkfs fsck
+ after modules device-mapper
+ fi
+ # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+ # means dmeventd is NOT notified, as it cannot be safely running
+ before dmeventd
+}
+
+run_addon() {
+ local f=/lib/rcscripts/addons/$1.sh
+ if [ -r "$f" ]; then
+ ( . "$f" )
+ fi
+}
+
+start() {
+ if [ ! -f /etc/init.d/sysfs ]; then
+ eerror "The $SVCNAME init-script is written for baselayout-2!"
+ eerror "Please do not use it with baselayout-1!".
+ return 1
+ fi
+
+ run_addon lvm-start
+}
+
+stop() {
+ run_addon lvm-stop
+}
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r1 b/sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r1
new file mode 100644
index 000000000000..65137e2b1062
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r1
@@ -0,0 +1,42 @@
+# /lib/rcscripts/addons/lvm-start.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r1,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+config='global { locking_dir = "/dev/.lvm" }'
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+# LVM support for /usr, /home, /opt ....
+# This should be done *before* checking local
+# volumes, or they never get checked.
+
+# NOTE: Add needed modules for LVM or RAID, etc
+# to /etc/modules.autoload if needed
+if [ -z "${CDBOOT}" -a -x /sbin/vgscan ] ; then
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+
+ if [ -d /proc/lvm ] || dm_in_proc ; then
+ ebegin "Setting up the Logical Volume Manager"
+ #still echo stderr for debugging
+ # Extra PV find pass because some devices might not have been available until very recently
+ /sbin/pvscan --config "${config}" >/dev/null
+ # Now make the nodes
+ /sbin/vgscan --mknodes --config "${config}" >/dev/null
+ if [ -x /sbin/vgchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ]
+ then
+ /sbin/vgchange --sysinit --config "${config}" -a ly >/dev/null
+ fi
+ eend $? "Failed to setup the LVM"
+ fi
+fi
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r1 b/sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r1
new file mode 100644
index 000000000000..a03823eaa8a4
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r1
@@ -0,0 +1,31 @@
+# /lib/rcscripts/addons/lvm-stop.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r1,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+config='global { locking_dir = "/dev/.lvm" }'
+
+# Stop LVM2
+if [ -x /sbin/vgs ] && \
+ [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \
+ [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
+then
+ einfo "Shutting down the Logical Volume Manager"
+
+ VGS=$(/sbin/vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
+
+ if [ "$VGS" ]
+ then
+ ebegin " Shutting Down logical volumes "
+ /sbin/lvchange --config "${config}" --sysinit -a ln ${VGS}
+ eend $?
+
+ ebegin " Shutting Down volume groups "
+ /sbin/vgchange --config "${config}" --sysinit -a ln
+ eend $?
+ fi
+
+ einfo "Finished Shutting down the Logical Volume Manager"
+fi
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/lvm2-2.02.67-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.67-r1.ebuild
new file mode 100644
index 000000000000..93b5c8c9d18a
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.67-r1.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.67-r1.ebuild,v 1.1 2010/06/09 22:41:45 robbat2 Exp $
+
+EAPI=2
+inherit eutils multilib toolchain-funcs autotools
+
+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 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+IUSE="readline +static clvm cman +lvm1 selinux"
+
+DEPEND_COMMON="!!sys-fs/device-mapper
+ clvm? ( =sys-cluster/dlm-2*
+ cman? ( =sys-cluster/cman-2* ) )
+ || ( >=sys-fs/udev-151-r2 =sys-fs/udev-146-r3 )"
+
+RDEPEND="${DEPEND_COMMON}
+ !<sys-apps/openrc-0.4
+ !!sys-fs/lvm-user
+ !!sys-fs/clvm
+ >=sys-apps/util-linux-2.16"
+
+DEPEND="${DEPEND_COMMON}
+ dev-util/pkgconfig"
+
+S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
+
+pkg_setup() {
+ # 1. Genkernel no longer copies /sbin/lvm blindly.
+ # 2. There are no longer any linking deps in /usr.
+ if use static; then
+ elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+ elog "their static versions. If you need the static binaries,"
+ elog "you must append .static the filename!"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/lvm.conf-2.02.67.patch
+
+ # Should not be needed due to upstream re-arrangement of build
+ #epatch "${FILESDIR}"/${PN}-2.02.56-dmeventd.patch
+ # Should not be need with new upstream udev rules
+ #epatch "${FILESDIR}"/${PN}-2.02.56-device-mapper-export-format.patch
+
+ # Merged upstream:
+ #epatch "${FILESDIR}"/${PN}-2.02.51-as-needed.patch
+ # Merged upstream:
+ #epatch "${FILESDIR}"/${PN}-2.02.48-fix-pkgconfig.patch
+ # Merged upstream:
+ #epatch "${FILESDIR}"/${PN}-2.02.51-fix-pvcreate.patch
+ # Fixed differently upstream:
+ #epatch "${FILESDIR}"/${PN}-2.02.51-dmsetup-selinux-linking-fix-r3.patch
+
+ epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ epatch "${FILESDIR}"/lvm2-2.02.56-lvm2create_initrd.patch
+ # bug 318513
+ epatch "${FILESDIR}"/${PN}-2.02.64-dmeventd-libs.patch
+ # bug 301331
+ epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ local buildmode
+
+ myconf="${myconf} --enable-dmeventd"
+ myconf="${myconf} --enable-cmdlib"
+ myconf="${myconf} --enable-applib"
+ myconf="${myconf} --enable-fsadm"
+
+ # 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"
+ buildmode="internal"
+ # This only causes the .static versions to become available
+ # For recent systems, there are no linkages against anything in /usr anyway.
+ # We explicitly provide the .static versions so that they can be included in
+ # initramfs environments.
+ myconf="${myconf} --enable-static_link"
+ 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
+ #
+ # 2009/07:
+ # TODO: add corosync and re-enable ALL
+ 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
+ --with-dmeventd-path=/sbin/dmeventd"
+ econf $(use_enable readline) \
+ $(use_enable selinux) \
+ --enable-pkgconfig \
+ --libdir=/$(get_libdir) \
+ --with-usrlibdir=/usr/$(get_libdir) \
+ --enable-udev_rules \
+ --enable-udev_sync \
+ --with-udevdir=/$(get_libdir)/udev/rules.d/ \
+ ${myconf} \
+ CLDFLAGS="${LDFLAGS}" || die
+}
+
+src_compile() {
+ einfo "Doing symlinks"
+ pushd include
+ emake || die "Failed to prepare symlinks"
+ popd
+
+ einfo "Starting main build"
+ emake || die "compile fail"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Failed to emake install"
+
+ # All of this was change by upstream, and if we don't get any problems, we
+ # can probably drop it in .65
+ #X## Revamp all of our library handling for bug #316571
+ #X## Upstream build script puts a lot of this stuff into /usr/lib regardless of
+ #X## libdir variable.
+ #X#dodir /$(get_libdir)
+ #X## .so -> /$(get_libdir)
+ #X#mv -f "${D}"/usr/lib/lib*.so* "${D}"/$(get_libdir)
+ #X#[[ "$(get_libdir)" != "lib" ]] && \
+ #X# mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)
+ #X## .a -> /usr/$(get_libdir)
+ #X#[[ "$(get_libdir)" != "lib" ]] && \
+ #X# mv -f "${D}"/usr/lib/lib*.a "${D}"/usr/$(get_libdir)
+ #X## The upstream symlinks are borked. lets rebuild them instead.
+ #X#find "${D}"/{usr,}/{lib,$(get_libdir)} -type l \
+ #X# | xargs rm -f 2>/dev/null
+ #X#for i in "${D}"/$(get_libdir)/*.so.* ; do
+ #X# b="${i//*\/}" o="${b/.so.*/.so}"
+ #X# ln -s "${b}" "${D}/$(get_libdir)/${o}"
+ #X#done
+ #X## Now enable building properly
+ #X#for i in \
+ #X# libdevmapper-event{,-lvm2{,mirror,snapshot}} \
+ #X# libdevmapper \
+ #X# liblvm2{format1,snapshot,cmd,app} \
+ #X# ; do
+ #X# gen_usr_ldscript ${i}.so || die
+ #X#done
+
+ dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt}
+ insinto /$(get_libdir)/rcscripts/addons
+ newins "${FILESDIR}"/lvm2-start.sh-2.02.67-r1 lvm-start.sh || die
+ newins "${FILESDIR}"/lvm2-stop.sh-2.02.67-r1 lvm-stop.sh || die
+ newinitd "${FILESDIR}"/lvm.rc-2.02.67-r1 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 libdevmapper.a"
+ #gen_usr_ldscript libdevmapper.so
+
+ dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd
+ doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8
+ newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd
+
+ insinto /etc
+ doins "${FILESDIR}"/dmtab
+ insinto /$(get_libdir)/rcscripts/addons
+ doins "${FILESDIR}"/dm-start.sh
+
+ # Device mapper stuff
+ newinitd "${FILESDIR}"/device-mapper.rc-2.02.67-r1 device-mapper || die
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
+
+ newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd || die
+ dolib.a daemons/dmeventd/libdevmapper-event.a \
+ || die "dolib.a libdevmapper-event.a"
+ #gen_usr_ldscript libdevmapper-event.so
+
+ #insinto /etc/udev/rules.d/
+ #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules || die
+
+ # do not rely on /lib -> /libXX link
+ sed -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" -i "${D}"/etc/init.d/*
+
+ 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 "If you are using genkernel and root-on-LVM, rebuild the initramfs."
+}
+
+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"
+}