aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-perl/Email-Outlook-Message/Manifest4
-rw-r--r--dev-perl/Net-Twitter-Lite/Manifest4
-rw-r--r--dev-perl/POE-Component-Client-Ping/Manifest4
-rw-r--r--dev-python/noxspellserver/Manifest4
-rw-r--r--net-mail/davmail-bin/Manifest8
-rw-r--r--sys-apps/openrc/Manifest8
-rw-r--r--sys-apps/openrc/files/openrc-0.8.3-ccwgroup.patch57
-rw-r--r--sys-apps/openrc/files/openrc-0.8.3-deprecation_warning.patch33
-rw-r--r--sys-apps/openrc/files/openrc-9999-msg-style.patch81
-rw-r--r--sys-apps/openrc/files/openrc-9999-pause.patch29
-rw-r--r--sys-apps/openrc/files/openrc.logrotate7
-rw-r--r--sys-apps/openrc/files/start-stop-daemon.pam2
-rw-r--r--sys-apps/openrc/openrc-0.11.8.ebuild479
-rw-r--r--sys-auth/pam_mobile_otp/Manifest12
-rw-r--r--sys-fs/cryptsetup/Manifest15
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.4.1.ebuild103
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.4.3.ebuild105
-rw-r--r--sys-fs/cryptsetup/files/1.0.5-dm-crypt-stop.sh40
-rw-r--r--sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc26
-rw-r--r--sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd98
-rw-r--r--sys-fs/cryptsetup/files/1.0.6-r2-dm-crypt-start.sh294
-rw-r--r--sys-fs/cryptsetup/files/1.1.0-libudev.patch26
-rw-r--r--sys-fs/cryptsetup/files/1.1.0_rc3-static-no-selinux.patch18
-rw-r--r--sys-fs/cryptsetup/files/1.1.3-dm-crypt-start.sh309
-rw-r--r--sys-fs/cryptsetup/files/1.1.3-dm-crypt-stop.sh51
-rwxr-xr-xsys-fs/cryptsetup/files/1.4.1-dmcrypt.rc337
-rw-r--r--sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch21
-rwxr-xr-xsys-fs/cryptsetup/files/dmcrypt.rc346
-rw-r--r--sys-fs/lvm2/Manifest40
-rw-r--r--sys-fs/lvm2/files/1.02.22-dmeventd.initd21
-rw-r--r--sys-fs/lvm2/files/clvmd.confd-2.02.399
-rwxr-xr-xsys-fs/lvm2/files/clvmd.rc-2.02.39146
-rw-r--r--sys-fs/lvm2/files/device-mapper.conf-1.02.22-r31
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-1.02.51-r228
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.67-r130
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2111
-rw-r--r--sys-fs/lvm2/files/dm-start.sh86
-rw-r--r--sys-fs/lvm2/files/dmeventd.initd-2.02.67-r123
-rw-r--r--sys-fs/lvm2/files/dmtab12
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r246
-rw-r--r--sys-fs/lvm2/files/lvm.conf-2.02.67.patch48
-rw-r--r--sys-fs/lvm2/files/lvm.confd-2.02.28-r25
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.51-r238
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.67-r139
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.95-r296
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch72
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch42
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.64-dmeventd-libs.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch18
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.70-locale-muck.patch11
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.72-dynamic-static-ldflags.patch67
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.73-asneeded.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.73-locale-muck.patch12
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.84-udev-pkgconfig.patch25
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.88-respect-cc.patch17
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch63
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.92-locale-muck.patch12
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.95-lvmpath.patch26
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.95-udev185.patch208
-rwxr-xr-xsys-fs/lvm2/files/lvm2-start.sh37
-rwxr-xr-xsys-fs/lvm2/files/lvm2-start.sh-2.02.49-r342
-rw-r--r--sys-fs/lvm2/files/lvm2-start.sh-2.02.67-r142
-rw-r--r--sys-fs/lvm2/files/lvm2-start.sh-2.02.9546
-rwxr-xr-xsys-fs/lvm2/files/lvm2-stop.sh61
-rwxr-xr-xsys-fs/lvm2/files/lvm2-stop.sh-2.02.49-r367
-rw-r--r--sys-fs/lvm2/files/lvm2-stop.sh-2.02.67-r131
-rw-r--r--sys-fs/lvm2/lvm2-2.02.88.ebuild255
-rw-r--r--www-apps/opennab/Manifest4
69 files changed, 4483 insertions, 20 deletions
diff --git a/dev-perl/Email-Outlook-Message/Manifest b/dev-perl/Email-Outlook-Message/Manifest
index 3d9a7823..52b6fca4 100644
--- a/dev-perl/Email-Outlook-Message/Manifest
+++ b/dev-perl/Email-Outlook-Message/Manifest
@@ -1,2 +1,2 @@
-DIST Email-Outlook-Message-0.910.tar.gz 31909 RMD160 bfe3bed8920c56d58941efd633ea9ae96f78a573 SHA1 da68fb7a1448b8b23a371262bf6e9c8feaf830c8 SHA256 0c837d17c8f363a0ad62c630917eb5d9530e783bde125d60d470e4fb91cf10e7
-EBUILD Email-Outlook-Message-0.910.ebuild 427 RMD160 ba437c9d5d2d5d60bc2d4ad2571fc53d50dfb16b SHA1 99da50a41651ad20c9862e6127a2528cef1e533b SHA256 a5711cdef127e9af2da72d96744aec2bc5fe7c64a30c6aa50d7c1112036d1dea
+DIST Email-Outlook-Message-0.910.tar.gz 31909 SHA256 0c837d17c8f363a0ad62c630917eb5d9530e783bde125d60d470e4fb91cf10e7 SHA512 deb0b570e64ec6efacac42b538ac9c90be7647925e03abb4ef891af493982abaa30b7c9c735bcc3ca806c62050a0f8cebcb94a86d23a976e00d5a2150ee21cfa WHIRLPOOL e670b54a92210ebdc69822c58e762f19903451b12e587d873107f822440ea4a6aaa05246db4c48047d2ebab2a3612b80daf17c0ad314fd170ed8ec51220539fd
+EBUILD Email-Outlook-Message-0.910.ebuild 427 SHA256 a5711cdef127e9af2da72d96744aec2bc5fe7c64a30c6aa50d7c1112036d1dea SHA512 4514420c6277dcf9fd8c00f7104816268e7f955d6426942de2710d42cd1f11d155ff48d5c7341e2627603e91d3f0cd3c1447e6e917b6766976df6039b5e92a40 WHIRLPOOL 0106e3d3cf75441ddcb0cc04f832d0a97280dbcad5bcd75fa2de3753673fbe3836b756352dd4c4c436613624695f3afed62a2ab93ea1bddea14c228be2f1d7b5
diff --git a/dev-perl/Net-Twitter-Lite/Manifest b/dev-perl/Net-Twitter-Lite/Manifest
index 9911a1ee..f81b9dc0 100644
--- a/dev-perl/Net-Twitter-Lite/Manifest
+++ b/dev-perl/Net-Twitter-Lite/Manifest
@@ -1,2 +1,2 @@
-DIST Net-Twitter-Lite-0.11001.tar.gz 90573 RMD160 3277f52c2da6db26949c284faf43b3b6bf6e1f58 SHA1 982fcd1fe88cf37495aecae144fd77afdd742e4b SHA256 671ea33cbcb07f9d687fc1d203884f8b83171f03ebffcf9a58b018cfd9a11211
-EBUILD Net-Twitter-Lite-0.11001.ebuild 612 RMD160 da8c2ade343bfb09c818b47e6c923136ab9bb1bc SHA1 4d3b95f2f2a54e8417774ff69c58d1ad5d034aa7 SHA256 42cd012fcbd686da967571b31e800c3af6651b53860e701817174527b98114d3
+DIST Net-Twitter-Lite-0.11001.tar.gz 90573 SHA256 671ea33cbcb07f9d687fc1d203884f8b83171f03ebffcf9a58b018cfd9a11211 SHA512 08a5826300a8efa87740f94d55ad41f041be0a5cbe85c87b50ccba198d247e6cfade608c8a5834a305748546bc672b0c23b0027a02cc555d7ad45c01f66bc6c6 WHIRLPOOL 45d77503ada2381d99d2c634a6ea165f0898728be201cebcffa8915e7dd878c28d5b7f5b50b7fe5095287f42c9c26de72c4219be5429c920e08e160d6c4ba228
+EBUILD Net-Twitter-Lite-0.11001.ebuild 612 SHA256 42cd012fcbd686da967571b31e800c3af6651b53860e701817174527b98114d3 SHA512 29e50d47a89ed4d68ddfed12398ba2d64c3adae10c3a8b7e275dbe6753409a2e422a9d30fb394c10e7d7811068157304fc27f70e4a225ddddfe1a0678cc79108 WHIRLPOOL 47fece3e5bfeecc60d5d6d1640ae1515f645a0733e4836c7aa1495a149a75e0f13998f5d817f6a8e7ac278d78827cc1d15e73434d84170ab025c16223a128df5
diff --git a/dev-perl/POE-Component-Client-Ping/Manifest b/dev-perl/POE-Component-Client-Ping/Manifest
index 6255f9e5..39bd3e03 100644
--- a/dev-perl/POE-Component-Client-Ping/Manifest
+++ b/dev-perl/POE-Component-Client-Ping/Manifest
@@ -1,2 +1,2 @@
-DIST POE-Component-Client-Ping-1.171.tar.gz 15575 RMD160 8df021609134614a50f84d91f0bdb4b2963957e5 SHA1 f0675fdba6f39dad3b34de8fd18e324c2bd31543 SHA256 ed01a23373654e2588686525aa26edc6799ec30116831a40ff1c0fd75f324a39
-EBUILD POE-Component-Client-Ping-1.171.ebuild 463 RMD160 b46eec68c95bf4e315766623b53ef58c36dbc8d5 SHA1 7cd4ebc6639fcd88743a68950badb96a154b876a SHA256 1a4551a27aabfb894a0fbf0fa45cc58ac5b90099702c6695ddbb96d1175db847
+DIST POE-Component-Client-Ping-1.171.tar.gz 15575 SHA256 ed01a23373654e2588686525aa26edc6799ec30116831a40ff1c0fd75f324a39 SHA512 f4c6786b1e1c7364a4de2bd399e4e2fe6d8df7a6cf6af7ebd3a04539b0396edb90bec648e48d218dc33f2759c51af031089cef05d1d0cbb36734c18036b3a028 WHIRLPOOL cfe148595b38b0293562ab590fccc77eccde1d34683da95f67165abcddade69d57596c011ec2b79c8ed52048813de42ae975b75bf4ae367af28747ddf3a959a7
+EBUILD POE-Component-Client-Ping-1.171.ebuild 463 SHA256 1a4551a27aabfb894a0fbf0fa45cc58ac5b90099702c6695ddbb96d1175db847 SHA512 79382f439fb3acac4b6f2f4a919496da6ad5de0c44733b837a9fe6969da03008fcf7c44e939b878c631af6bd4d28bbde4673976d2398994cfc908f062413ba8f WHIRLPOOL 898f044ab5a71b8ef2559a535c73fb8e07a8fdda5c88fbcd66f879e1002b8a38144eb9eec9b30ba163b78c24b07618d03130a1aeea8b0eb80f3ecd942889ee94
diff --git a/dev-python/noxspellserver/Manifest b/dev-python/noxspellserver/Manifest
index bc844dec..f09e0f9c 100644
--- a/dev-python/noxspellserver/Manifest
+++ b/dev-python/noxspellserver/Manifest
@@ -1,2 +1,2 @@
-DIST NoxSpellServer.zip 22896 RMD160 c8a59e11dcf6a36a49bc9864bcc0ad013e997321 SHA1 123c5a8eccd2e70a86fdf09de0fcce7dd048a3a7 SHA256 85bec73257e8ba98d87e5528c52295b99f06db946a2919a634da8b2e9a31df0c
-EBUILD noxspellserver-1.1.ebuild 717 RMD160 c56c0b2dbcf5735c185d78b4f611ab27358e3973 SHA1 8125f67909eb3a810727fbbf8300eabcd604db04 SHA256 7526d75015c3179a07b885b6c1979a87c0e5eef940f3c976d0fd92cd883d9ad0
+DIST NoxSpellServer.zip 22896 SHA256 85bec73257e8ba98d87e5528c52295b99f06db946a2919a634da8b2e9a31df0c
+EBUILD noxspellserver-1.1.ebuild 716 SHA256 7b8165d3c883753391655145ade5a68e49a1ca9dac147225d51c218e5715e1fe SHA512 7735306df6218a6236aaecc5e1a837a7a2c136fcd4e5ec33b6f4798981b953fe4eff855a5955628dd556c3992903e1bbde09802b30517c43b883420844b6a36f WHIRLPOOL daa4028b5ea510def1e978f0de60eef75454951bc026558590b215b2723043f338b4df4529d59018e0d6c7ec4160316cbb1e30ab0ba2cc01af00cb447803dede
diff --git a/net-mail/davmail-bin/Manifest b/net-mail/davmail-bin/Manifest
index b0617a9e..0a578977 100644
--- a/net-mail/davmail-bin/Manifest
+++ b/net-mail/davmail-bin/Manifest
@@ -1,4 +1,4 @@
-AUX davmail-3.9.8-initd 1046 RMD160 1edb419926f69d31e969995c25bea5ef53590aaf SHA1 e135dbd43a885be0b0f631b45b4b4be27c0e29fc SHA256 8caec347f4e01737bad8bb02cc831f14b11a7686b4d18c0ae1894555e1b88dbd
-AUX davmail.properties 879 RMD160 cf754916582f34d71084c58332446b4d4f4708f7 SHA1 01f4626165587341b1bbdb12fbc11330411d3ed8 SHA256 7bcf05750ea720cce434435acf660a01fac9217d23d1221d04b904af6d4b1622
-DIST davmail-3.9.8-1921.zip 4870397 RMD160 74deff81e9c04087d3e840b551302a2a00527203 SHA1 4022ad222f14ced1e550fe4d7cee81cb4116a7fc SHA256 f13bfa16a15e85fde9f2cb00308bb340ede4625966969d3fce3f352b45823956
-EBUILD davmail-bin-3.9.8.ebuild 1751 RMD160 0aadd185ed7ecf4ec6410ac95c70510245cc92b3 SHA1 24ce9a2641cea045192a689e92d13fc4e7aca2df SHA256 d0499b937442de7c9aeaa53161ccc0a09677c1c353be2cd49e5d7b78f1b655c9
+AUX davmail-3.9.8-initd 1046 SHA256 8caec347f4e01737bad8bb02cc831f14b11a7686b4d18c0ae1894555e1b88dbd SHA512 3376b911e1c2cb1cdce10ea9e3ae30320aa679daa11fbb2d0c5d2a9f4b24c1c5b9ae080e656629adb4af8030bd8f2957f7888c0af49876ec72f04eab02fb1a26 WHIRLPOOL 3810f16b49aecc7f5c92f2cd3ba58a09ba778c0ea2d93e2dcf8842a37c0e32703a51e28413f39639842d530afe70fe103900f05b87b691fdcf3f4e146f8f8cc9
+AUX davmail.properties 879 SHA256 7bcf05750ea720cce434435acf660a01fac9217d23d1221d04b904af6d4b1622 SHA512 7f0df4191860d9109f4ed8f6102152f44026051f8c28f840013d8b74c94bdb0bbd94843eabd0b6cf1fff49f2c3fdef42bac30fd482b2e84739a575380f1e6630 WHIRLPOOL 446a14b7c8565698c06a595cbbfc00f6eb0221a6a6134c28b05d070a6f4ef4ec6871c6b76136b5438ea8fcc4fe53f86d74273726d6e2c3622f1ee7f1d8383922
+DIST davmail-3.9.8-1921.zip 4870397 SHA256 f13bfa16a15e85fde9f2cb00308bb340ede4625966969d3fce3f352b45823956 SHA512 e310a18f2c9104dd2d6fb785bbca1d407238ca03bc18b47e9d1acc010788a7d8c24bf219a8947f24bb6dd86a90c25ab2ed469ec4b216cb875c334eebda4d1754 WHIRLPOOL af72bf12671b70e9410ff586a2742c58bf4ebfb220a1431fa5102feeba43b46f165fe55be1eca9cea4d18b82ef87bae37141e089c26b883c81dcacec5e67081a
+EBUILD davmail-bin-3.9.8.ebuild 1751 SHA256 d0499b937442de7c9aeaa53161ccc0a09677c1c353be2cd49e5d7b78f1b655c9 SHA512 cd86a25243aac897f988cffdcd1d15011a031a5c1b272846196ee43e272b269b6bbb11b5bee0ca580d6f022725adf76506513a7f8126bd74f380cdb77fe70abd WHIRLPOOL 6e47614ca9d1261552cca4df994688b87d07554b21bc162083a9c2458d6c6d2c1ec20b4c36826c7d238e5a53a07c1d96d4ce256dc85b833ae5d1fc35fa4e7e92
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
new file mode 100644
index 00000000..e3103df5
--- /dev/null
+++ b/sys-apps/openrc/Manifest
@@ -0,0 +1,8 @@
+AUX openrc-0.8.3-ccwgroup.patch 1992 SHA256 5a092cc0ab90507c28f8bd6af34b67fbb3d8a9ddce257195dde55128f87324fc SHA512 bea08e3064b8253713d996098006e8f636fef8e071d0c373b91db643c678aff36d490c5db853c97c91e0ce53f10c4db3d2b104283303aba1d3841058d5e3bb4a WHIRLPOOL a37fbb6fb31abab0631d61baa61280330791209c329aed0c41ffef1ffdab9e0ba41732404035f8a26865077b1d857387f4d253c71febfc9743ff864b484ec1cf
+AUX openrc-0.8.3-deprecation_warning.patch 1055 SHA256 fa95aaa34db3556240031fcfb5e33d85e44da2a2f74562faa97c75f569d4efa0 SHA512 72f8dc6a931ea4c97f337a1a358ccc4fc3600d8809e549afad8697fc74a07fa6f1460603d5c80ea08af2e441ad8cb7f404454876dce1244fdba13099f948d00a WHIRLPOOL 5bcee2abc2158ce750b94fee97f6e270adf4d5098bac2d64d2423bae462ce3b702c5df52d3e013e0027db66e09edde1c7aca1d5b8d77088f0f8937f968eba176
+AUX openrc-9999-msg-style.patch 2775 SHA256 637fc2d13e0940b55b7d4613ebf8ebabdee87a802a2690191c01fd5ee7cb3581 SHA512 ffeaba677106929ed842d38b161a865a6b3bd26e4ed804bf922d7a1e3c749adbf23348a20ca1be44f41cc0abd7d113172f1865d29865f322e30fbac9f9b34cba WHIRLPOOL 3044d94c523ec2a33a2b9cfda5988070d67bfe631c1fba1314eaba5f432e9e4dfcbb307685e326c181c9205dfe12c161568e3707b276ceff2114bd92e9375ec0
+AUX openrc-9999-pause.patch 825 SHA256 ffa34418921d30c589ad762a5d6d7640c37e7279ca19af469912cb9f118cc75d SHA512 ebab7434c5e1b76b882d99d45069de33da07230c9fa9bf28212b18c2742d726aff7be62907964cad9c37b483c25d805dc07d0c5927349f8104fef2f957e69943 WHIRLPOOL 2f633409182e6ab0da4162fcd3a29e928eaad9aa72d008192aa0f4e9532b55492a122c61d9027766a04a766be2c74697624a0f15aaadc273de45cca554c13cd3
+AUX openrc.logrotate 71 SHA256 0b44210db9770588bd491cd6c0ac9412d99124c6be4c9d3f7d31ec8746072f5c SHA512 690612fddfb2c4cf8f6b5ba7239b9faf29eb3d9b152ab4dcf62694aa2852780440d08cee56d98a9597607f446b3697c911269562821a8402bb5747cbbae34bd9 WHIRLPOOL 8678c51583c77a4985760e4ea2082e7214f28b68cad460b362d683db71067cf6031e1f3275e83ac7959b0973cdafd0a4102525fe7b0d975798ec2182d1fd2769
+AUX start-stop-daemon.pam 63 SHA256 2681da17e4a122656b5303b7c7eca82b8fb182641290b153fdbe96b63638086d SHA512 85cf440611b8f87f51bf24bdd9fa03639a75b950f00096d81b8826c21ae85ff9784b8c56b8ddb482e70f08bce933d4561b30750346d51fb2cef3be34acc065cb WHIRLPOOL 4abc9f051155a62d3033258a06003a4ca3909d8104deca84d5c1605bc1c7e56167fd82b2b4b72fe7b707070de98a7628730de1ad3f14b924b5b1480fba5ef854
+DIST openrc-0.11.8.tar.bz2 174860 SHA256 e1f7c5ed98a63178c20f3d023a7d35fe416e8e7db2f0cf78ff346a6d2f7949a9 SHA512 aaea9f1e1d08c367beb6d35bcc1d258eb9d7b71a659c05088f9027b0558aae068b2ad7c221cf8ff8b8950f5a4a5c187ee7b986ce2d475a9e3cccda74d040f780 WHIRLPOOL 69217f13dd05e9a443d906281ada167d6892615eb5db7c372ba535a3d4a21ac3111fad9d54ef06650c3b488b848180bbfe5257dbc83f62f5ecf60724dec2900c
+EBUILD openrc-0.11.8.ebuild 16118 SHA256 701899fde4a984cb670c28857daffdd682da600ed12ed937da1db06676a302a5 SHA512 d67ebd26523840ae766a98bdca019fe595b3f412a27a4db334fc776fa60fddfb3fb205c65f76d8cee2cba76d3746016e53562c10a10af5e3d883fd3c77191ff9 WHIRLPOOL 075768495408e711c4ced955075ece200efa153378409a6f3a3df4f489625f0ebf860270a3ee1e496bb02ba4715c0b239808e02c44f943ca9c025f580e17dee2
diff --git a/sys-apps/openrc/files/openrc-0.8.3-ccwgroup.patch b/sys-apps/openrc/files/openrc-0.8.3-ccwgroup.patch
new file mode 100644
index 00000000..14ecd5f8
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-0.8.3-ccwgroup.patch
@@ -0,0 +1,57 @@
+From c427d3c1fec89f6a9281dccdc123bad73af80804 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 28 Jun 2011 00:02:11 -0400
+Subject: [PATCH] net: ccwgroup: smooth up/down process
+
+We need to bring the link up ourselves after we've properly configured
+the device. The common code tries to bring the link up itself, but it
+does so before things are configured, and so it ends up failing.
+
+When shutting down, we need to wait for the kernel to finish destroying
+the interface. Otherwise, when doing a restart, openrc is quick enough
+to tell the kernel to destroy things, but then start trying to bring it
+back up before the kernel has finished.
+
+X-Gentoo-Bug: 367467
+X-Gentoo-Bug-URL: http://bugs.gentoo.org/367467
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ net/ccwgroup.sh | 14 ++++++++++++--
+ 1 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/net/ccwgroup.sh b/net/ccwgroup.sh
+index 248b159..60cd25f 100644
+--- a/net/ccwgroup.sh
++++ b/net/ccwgroup.sh
+@@ -58,6 +58,11 @@ ccwgroup_pre_start()
+ echo "${val}" > /sys/devices/${ccw_type}/${first}/${var}
+ done
+ eend $?
++
++ # Now that we've properly configured the device, we can run
++ # bring the interface up. Common code tried to do this already,
++ # but it failed because we didn't setup sysfs yet.
++ _up
+ }
+
+ ccwgroup_pre_stop()
+@@ -88,9 +93,14 @@ ccwgroup_post_stop()
+ local device="$(service_get_value ccwgroup_device)"
+ [ -z "${device}" ] && return 0
+ local ccw_type="$(service_get_value ccwgroup_type)"
++ local path="/sys/devices/${ccw_type}/${device}"
+
+ einfo "Disabling ccwgroup/${ccw_type} on ${IFACE}"
+- echo "0" >/sys/devices/${ccw_type}/"${device}"/online
+- echo "1" >/sys/devices/${ccw_type}/"${device}"/ungroup
++ if echo "0" >"${path}"/online &&
++ echo "1" >"${path}"/ungroup ; then
++ # The device doesn't disappear right away which breaks
++ # restart, or a quick start up, so wait around.
++ while [ -e "${path}" ] ; do :; done
++ fi
+ eend $?
+ }
+--
+1.7.5.3
+
diff --git a/sys-apps/openrc/files/openrc-0.8.3-deprecation_warning.patch b/sys-apps/openrc/files/openrc-0.8.3-deprecation_warning.patch
new file mode 100644
index 00000000..1aa7315b
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-0.8.3-deprecation_warning.patch
@@ -0,0 +1,33 @@
+From 24ba7955634dd571a4c34dd712dc8a592eea4d73 Mon Sep 17 00:00:00 2001
+From: Joe Harvell <jharvell@dogpad.net>
+Date: Mon, 27 Jun 2011 23:20:47 +0200
+Subject: [PATCH] Only print the deprecation warning for --chuid/-c when using it
+
+The deprecation warning has been printed when using the replecement functions as
+well, bug 373243.
+---
+ src/rc/start-stop-daemon.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
+index b5c2b6e..3017701 100644
+--- a/src/rc/start-stop-daemon.c
++++ b/src/rc/start-stop-daemon.c
+@@ -788,12 +788,11 @@ start_stop_daemon(int argc, char **argv)
+ background = true;
+ break;
+
+- case 'u': /* --user <username>|<uid> */
+ case 'c': /* --chuid <username>|<uid> */
+- {
+ /* DEPRECATED */
+ ewarn("WARNING: -c/--chuid is deprecated and will be removed in the future, please use -u/--user instead");
+-
++ case 'u': /* --user <username>|<uid> */
++ {
+ p = optarg;
+ tmp = strsep(&p, ":");
+ changeuser = xstrdup(tmp);
+--
+1.7.3.4
+
diff --git a/sys-apps/openrc/files/openrc-9999-msg-style.patch b/sys-apps/openrc/files/openrc-9999-msg-style.patch
new file mode 100644
index 00000000..ac325bb7
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-9999-msg-style.patch
@@ -0,0 +1,81 @@
+From 1e307244138c8f650ab37bffa7b3cc3e3b39cd64 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 24 Mar 2008 01:48:19 -0400
+Subject: [PATCH] restore old e* func output
+
+Gentoo has always used the sytle:
+ * moo ... [ ok ]
+Latest openrc now does:
+* moo... [ok]
+
+Realistically, 4 spaces out of 80 on reduced terminals doesn't make any
+sort of realistic difference and it's been just fine for the last 10
+years, so keep the default behavior.
+---
+ src/libeinfo/libeinfo.c | 15 ++++++---------
+ 1 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
+index 8a7613c..234b1af 100644
+--- a/src/libeinfo/libeinfo.c
++++ b/src/libeinfo/libeinfo.c
+@@ -643,7 +643,7 @@ static int EINFO_PRINTF(3, 0)
+ fprintf(f, "\n");
+ if (_eprefix)
+ fprintf(f, "%s%s%s|", _ecolor(f, color), _eprefix, _ecolor(f, ECOLOR_NORMAL));
+- fprintf(f, "%s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL));
++ fprintf(f, " %s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL));
+ retval += _eindent(f);
+ va_copy(ap, va);
+ retval += vfprintf(f, fmt, ap) + 3;
+@@ -800,7 +800,7 @@ ebegin(const char *EINFO_RESTRICT fmt, ...)
+ va_start(ap, fmt);
+ retval = _einfovn(fmt, ap);
+ va_end(ap);
+- retval += printf("...");
++ retval += printf(" ...");
+ if (colour_terminal(stdout))
+ retval += printf("\n");
+ LASTCMD("ebegin");
+@@ -817,7 +817,7 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg)
+ if (!msg)
+ return;
+
+- cols = get_term_columns(fp) - (strlen(msg) + 3);
++ cols = get_term_columns(fp) - (strlen(msg) + 5);
+
+ /* cons25 is special - we need to remove one char, otherwise things
+ * do not align properly at all. */
+@@ -831,18 +831,15 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg)
+ if (term_is_cons25)
+ cols--;
+
+- /* If extra spacing is required around msg, then please change
+- * via a runtime knob and leave this default as is as it saves 2
+- * valuable columns when running on 80 column screens. */
+ if (cols > 0 && colour_terminal(fp)) {
+- fprintf(fp, "%s%s %s[%s%s%s]%s\n", up, tgoto(goto_column, 0, cols),
++ fprintf(fp, "%s%s %s[%s %s %s]%s\n", up, tgoto(goto_column, 0, cols),
+ ecolor(ECOLOR_BRACKET), ecolor(color), msg,
+ ecolor(ECOLOR_BRACKET), ecolor(ECOLOR_NORMAL));
+ } else {
+ if (col > 0)
+ for (i = 0; i < cols - col; i++)
+ fprintf(fp, " ");
+- fprintf(fp, " [%s]\n", msg);
++ fprintf(fp, " [ %s ]\n", msg);
+ }
+ }
+
+@@ -1030,7 +1027,7 @@ ebeginv(const char *EINFO_RESTRICT fmt, ...)
+
+ va_start(ap, fmt);
+ retval = _einfovn(fmt, ap);
+- retval += printf("...");
++ retval += printf(" ...");
+ if (colour_terminal(stdout))
+ retval += printf("\n");
+ va_end(ap);
+--
+1.6.6.rc3
+
diff --git a/sys-apps/openrc/files/openrc-9999-pause.patch b/sys-apps/openrc/files/openrc-9999-pause.patch
new file mode 100644
index 00000000..bf2c94f8
--- /dev/null
+++ b/sys-apps/openrc/files/openrc-9999-pause.patch
@@ -0,0 +1,29 @@
+From e82772a6b6d4374e81b7e19a593ffdef16753418 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 21 Dec 2009 09:02:35 -0500
+Subject: [PATCH] restore init.d pause option
+
+---
+ src/rc/runscript.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/rc/runscript.c b/src/rc/runscript.c
+index 5939dae..7147902 100644
+--- a/src/rc/runscript.c
++++ b/src/rc/runscript.c
+@@ -1316,6 +1316,12 @@ runscript(int argc, char **argv)
+ prefix = NULL;
+ retval = svc_exec("status", NULL);
+ } else {
++ if (strcmp(optarg, "pause") == 0) {
++ ewarn("WARNING: 'pause' is deprecated; please use '--nodeps stop'");
++ deps = false;
++ optarg = "stop";
++ }
++
+ if (strcmp(optarg, "conditionalrestart") == 0 ||
+ strcmp(optarg, "condrestart") == 0)
+ {
+--
+1.6.6.rc3
+
diff --git a/sys-apps/openrc/files/openrc.logrotate b/sys-apps/openrc/files/openrc.logrotate
new file mode 100644
index 00000000..a168f236
--- /dev/null
+++ b/sys-apps/openrc/files/openrc.logrotate
@@ -0,0 +1,7 @@
+/var/log/rc.log {
+ compress
+ rotate 4
+ weekly
+ missingok
+ notifempty
+}
diff --git a/sys-apps/openrc/files/start-stop-daemon.pam b/sys-apps/openrc/files/start-stop-daemon.pam
new file mode 100644
index 00000000..2127f6a7
--- /dev/null
+++ b/sys-apps/openrc/files/start-stop-daemon.pam
@@ -0,0 +1,2 @@
+account required pam_permit.so
+session include system-services
diff --git a/sys-apps/openrc/openrc-0.11.8.ebuild b/sys-apps/openrc/openrc-0.11.8.ebuild
new file mode 100644
index 00000000..96e2535e
--- /dev/null
+++ b/sys-apps/openrc/openrc-0.11.8.ebuild
@@ -0,0 +1,479 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.11.8.ebuild,v 1.8 2013/02/12 19:01:51 swift Exp $
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib pam toolchain-funcs
+
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="debug elibc_glibc ncurses pam newnet prefix selinux static-libs unicode
+ kernel_linux kernel_FreeBSD"
+
+RDEPEND="virtual/init
+ kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
+ elibc_glibc? ( >=sys-libs/glibc-2.5 )
+ ncurses? ( sys-libs/ncurses )
+ pam? ( sys-auth/pambase )
+ >=sys-apps/baselayout-2.1-r1
+ kernel_linux? (
+ sys-process/psmisc
+ )
+ selinux? ( sec-policy/selinux-openrc )
+ !<sys-fs/udev-init-scripts-17
+ !<sys-fs/udev-133"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+
+src_prepare() {
+ sed -i 's:0444:0644:' mk/sys.mk || die
+ sed -i "/^DIR/s:/openrc:/${PF}:" doc/Makefile || die #241342
+
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ unset LIBDIR #266688
+
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBNAME=$(get_libdir)
+ LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc"
+
+ local brand="Unknown"
+ if use kernel_linux ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux"
+ brand="Linux"
+ elif use kernel_FreeBSD ; then
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
+ brand="FreeBSD"
+ fi
+ if use selinux; then
+ MAKE_ARGS="${MAKE_ARGS} MKSELINUX=yes"
+ fi
+ export BRANDING="Gentoo ${brand}"
+ if ! use static-libs; then
+ MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no"
+ fi
+ use newnet || MAKE_ARGS="${MAKE_ARGS} MKNET=oldnet"
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+ export DEBUG=$(usev debug)
+ export MKPAM=$(usev pam)
+ export MKTERMCAP=$(usev ncurses)
+
+ tc-export CC AR RANLIB
+ emake ${MAKE_ARGS}
+}
+
+# set_config <file> <option name> <yes value> <no value> test
+# a value of "#" will just comment out the option
+set_config() {
+ local file="${ED}/$1" var=$2 val com
+ eval "${@:5}" && val=$3 || val=$4
+ [[ ${val} == "#" ]] && com="#" && val='\2'
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
+}
+
+set_config_yes_no() {
+ set_config "$1" "$2" YES NO "${@:3}"
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+
+ # move the shared libs back to /usr so ldscript can install
+ # more of a minimal set of files
+ # disabled for now due to #270646
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
+ #gen_usr_ldscript -a einfo rc
+ gen_usr_ldscript libeinfo.so
+ gen_usr_ldscript librc.so
+
+ if ! use kernel_linux; then
+ keepdir /$(get_libdir)/rc/init.d
+ fi
+ keepdir /$(get_libdir)/rc/tmp
+
+ # Backup our default runlevels
+ dodir /usr/share/"${PN}"
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
+ rm -rf "${ED}"/etc/runlevels
+
+ # Install the default net configuration
+ doconfd conf.d/net
+
+ # Setup unicode defaults for silly unicode users
+ set_config_yes_no /etc/rc.conf unicode use unicode
+
+ # Cater to the norm
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
+
+ # On HPPA, do not run consolefont by default (bug #222889)
+ if use hppa; then
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
+ fi
+
+ # Support for logfile rotation
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openrc.logrotate openrc
+
+ # install the gentoo pam.d file
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
+}
+
+add_boot_init() {
+ local initd=$1
+ local runlevel=${2:-boot}
+ # if the initscript is not going to be installed and is not
+ # currently installed, return
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
+ || return
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel}
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created
+ fi
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf "${EROOT}"etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+add_boot_init_mit_config() {
+ local config=$1 initd=$2
+ if [[ -e ${EROOT}${config} ]] ; then
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
+ add_boot_init ${initd}
+ fi
+ fi
+}
+
+pkg_preinst() {
+ local f LIBDIR=$(get_libdir)
+
+ # default net script is just comments, so no point in biting people
+ # in the ass by accident. we save in preinst so that the package
+ # manager doesnt go throwing etc-update crap at us -- postinst is
+ # too late to prevent that. this behavior also lets us keep the
+ # file in the CONTENTS for binary packages.
+ [[ -e "${EROOT}"etc/conf.d/net ]] && \
+ cp "${EROOT}"etc/conf.d/net "${ED}"/etc/conf.d/
+
+ # avoid default thrashing in conf.d files when possible #295406
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
+ (
+ unset hostname HOSTNAME
+ source "${EROOT}"etc/conf.d/hostname
+ : ${hostname:=${HOSTNAME}}
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
+ )
+ fi
+
+ # upgrade timezone file ... do it before moving clock
+ if [[ -e ${EROOT}etc/conf.d/clock && ! -e ${EROOT}/etc/timezone ]] ; then
+ (
+ unset TIMEZONE
+ source "${EROOT}"etc/conf.d/clock
+ [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${EROOT}"etc/timezone
+ )
+ fi
+
+ # /etc/conf.d/clock moved to /etc/conf.d/hwclock
+ local clock
+ use kernel_FreeBSD && clock="adjkerntz" || clock="hwclock"
+ if [[ -e "${EROOT}"etc/conf.d/clock ]] ; then
+ mv "${EROOT}"etc/conf.d/clock "${EROOT}"etc/conf.d/${clock}
+ fi
+ if [[ -e "${EROOT}"etc/init.d/clock ]] ; then
+ rm -f "${EROOT}"etc/init.d/clock
+ fi
+ if [[ -L "${EROOT}"etc/runlevels/boot/clock ]] ; then
+ rm -f "${EROOT}"etc/runlevels/boot/clock
+ ln -snf /etc/init.d/${clock} "${EROOT}"etc/runlevels/boot/${clock}
+ fi
+ if [[ -L "${EROOT}"${LIBDIR}/rc/init.d/started/clock ]] ; then
+ rm -f "${EROOT}"${LIBDIR}/rc/init.d/started/clock
+ ln -snf /etc/init.d/${clok} "${EROOT}"${LIBDIR}/rc/init.d/started/${clock}
+ fi
+
+ # /etc/conf.d/rc is no longer used for configuration
+ if [[ -e "${EROOT}"etc/conf.d/rc ]] ; then
+ elog "/etc/conf.d/rc is no longer used for configuration."
+ elog "Please migrate your settings to /etc/rc.conf as applicable"
+ elog "and delete /etc/conf.d/rc"
+ fi
+
+ # force net init.d scripts into symlinks
+ for f in "${EROOT}"etc/init.d/net.* ; do
+ [[ -e ${f} ]] || continue # catch net.* not matching anything
+ [[ ${f} == */net.lo ]] && continue # real file now
+ [[ ${f} == *.openrc.bak ]] && continue
+ if [[ ! -L ${f} ]] ; then
+ elog "Moved net service '${f##*/}' to '${f##*/}.openrc.bak' to force a symlink."
+ elog "You should delete '${f##*/}.openrc.bak' if you don't need it."
+ mv "${f}" "${f}.openrc.bak"
+ ln -snf net.lo "${f}"
+ fi
+ done
+
+ # termencoding was added in 0.2.1 and needed in boot
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012)
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
+
+ if ! has_version ">=sys-apps/openrc-0.11"; then
+ add_boot_init sysfs sysinit
+ fi
+
+ # set default interactive shell to sulogin if it exists
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
+
+ has_version sys-apps/openrc || migrate_from_baselayout_1
+ has_version ">=sys-apps/openrc-0.4.0" || migrate_udev_init_script
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then
+ migrate_udev_mount_script
+ add_boot_init tmpfiles.setup boot
+ fi
+}
+
+# >=openrc-0.4.0 no longer loads the udev addon
+migrate_udev_init_script() {
+ # make sure udev is in sysinit if it was enabled before
+ local enable_udev=false
+ local rc_devices=$(
+ [[ -f /etc/rc.conf ]] && source /etc/rc.conf
+ [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc
+ echo "${rc_devices:-${RC_DEVICES:-auto}}"
+ )
+ case ${rc_devices} in
+ udev|auto)
+ enable_udev=true
+ ;;
+ esac
+
+ if $enable_udev; then
+ add_boot_init udev sysinit
+ add_boot_init udev-postmount default
+ fi
+}
+
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
+migrate_udev_mount_script() {
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
+ add_boot_init udev-mount sysinit
+ fi
+ return 0
+}
+
+migrate_from_baselayout_1() {
+ # baselayout boot init scripts have been split out
+ for f in $(cd "${ED}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do
+ # baselayout-1 is always "old" net, so ignore "new" net
+ [[ ${f} == "network" ]] && continue
+
+ add_boot_init ${f}
+ done
+
+ # Try to auto-add some addons when possible
+ add_boot_init_mit_config /etc/conf.d/cryptfs dmcrypt
+ add_boot_init_mit_config /etc/conf.d/dmcrypt dmcrypt
+ add_boot_init_mit_config /etc/mdadm.conf mdraid
+ add_boot_init_mit_config /etc/evms.conf evms
+ [[ -e "${EROOT}"sbin/dmsetup ]] && add_boot_init device-mapper
+ [[ -e "${EROOT}"sbin/vgscan ]] && add_boot_init lvm
+ elog "Add on services (such as RAID/dmcrypt/LVM/etc...) are now stand alone"
+ elog "init.d scripts. If you use such a thing, make sure you have the"
+ elog "required init.d scripts added to your boot runlevel."
+
+ # Upgrade our state for baselayout-1 users
+ if [[ ! -e "${EROOT}"${LIBDIR}/rc/init.d/started ]] ; then
+ (
+ [[ -e "${EROOT}"etc/conf.d/rc ]] && source "${EROOT}"/etc/conf.d/rc
+ svcdir=${svcdir:-/var/lib/init.d}
+ if [[ ! -d "${EROOT}"${svcdir}/started ]] ; then
+ ewarn "No state found, and no state exists"
+ elog "You should reboot this host"
+ else
+ mkdir -p "${EROOT}"${LIBDIR}/rc/init.d
+ einfo "Moving state from ${EROOT}${svcdir} to ${EROOT}${LIBDIR}/rc/init.d"
+ mv "${EROOT}${svcdir}"/* "${EROOT}${LIBDIR}"/rc/init.d
+ rm -rf "${EROOT}${LIBDIR}"/rc/init.d/daemons \
+ "${EROOT}${LIBDIR}"/rc/init.d/console
+ umount "${EROOT}${svcdir}" 2>/dev/null
+ rm -rf "${EROOT}${svcdir}"
+ fi
+ )
+ fi
+
+ # Handle the /etc/modules.autoload.d -> /etc/conf.d/modules transition
+ if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then
+ elog "Converting your /etc/modules.autoload.d/ files to /etc/conf.d/modules"
+ rm -f "${EROOT}"etc/modules.autoload.d/.keep*
+ rmdir "${EROOT}"etc/modules.autoload.d 2>/dev/null
+ if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then
+ local f v
+ for f in "${EROOT}"etc/modules.autoload.d/* ; do
+ v=${f##*/}
+ v=${v#kernel-}
+ v=${v//[^[:alnum:]]/_}
+ gawk -v v="${v}" -v f="${f##*/}" '
+ BEGIN { print "\n### START: Auto-converted from " f "\n" }
+ {
+ if ($0 ~ /^[^#]/) {
+ print "modules_" v "=\"${modules_" v "} " $1 "\""
+ gsub(/[^[:alnum:]]/, "_", $1)
+ printf "module_" $1 "_args_" v "=\""
+ for (i = 2; i <= NF; ++i) {
+ if (i > 2)
+ printf " "
+ printf $i
+ }
+ print "\"\n"
+ } else
+ print
+ }
+ END { print "\n### END: Auto-converted from " f "\n" }
+ ' "${f}" >> "${ED}"/etc/conf.d/modules
+ done
+ rm -f "${f}"
+ rmdir "${EROOT}"etc/modules.autoload.d 2>/dev/null
+ fi
+ fi
+}
+
+pkg_postinst() {
+ local LIBDIR=$(get_libdir)
+
+ # Remove old baselayout links
+ rm -f "${EROOT}"etc/runlevels/boot/{check{fs,root},rmnologin}
+ rm -f "${EROOT}"etc/init.d/{depscan,runscript}.sh
+
+ # Make our runlevels if they don't exist
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
+ einfo "Copying across default runlevels"
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
+ else
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/sysinit
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
+ "${EROOT}"etc/runlevels/sysinit
+ fi
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
+ mkdir -p "${EROOT}"etc/runlevels/shutdown
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
+ "${EROOT}"etc/runlevels/shutdown
+ fi
+ fi
+
+ # /etc/conf.d/net.example is no longer valid
+ local NET_EXAMPLE="${EROOT}etc/conf.d/net.example"
+ local NET_MD5='8ebebfa07441d39eb54feae0ee4c8210'
+ if [[ -e "${NET_EXAMPLE}" ]] ; then
+ if [[ $(md5sum "${NET_EXAMPLE}") == ${NET_MD5}* ]]; then
+ rm -f "${NET_EXAMPLE}"
+ elog "${NET_EXAMPLE} has been removed."
+ else
+ sed -i '1i# This file is obsolete.\n' "${NET_EXAMPLE}"
+ elog "${NET_EXAMPLE} should be removed."
+ fi
+ elog "The new file is ${EROOT}usr/share/doc/${PF}/net.example"
+ fi
+
+ # /etc/conf.d/wireless.example is no longer valid
+ local WIRELESS_EXAMPLE="${EROOT}etc/conf.d/wireless.example"
+ local WIRELESS_MD5='d1fad7da940bf263c76af4d2082124a3'
+ if [[ -e "${WIRELESS_EXAMPLE}" ]] ; then
+ if [[ $(md5sum "${WIRELESS_EXAMPLE}") == ${WIRELESS_MD5}* ]]; then
+ rm -f "${WIRELESS_EXAMPLE}"
+ elog "${WIRELESS_EXAMPLE} is deprecated and has been removed."
+ else
+ sed -i '1i# This file is obsolete.\n' "${WIRELESS_EXAMPLE}"
+ elog "${WIRELESS_EXAMPLE} is deprecated and should be removed."
+ fi
+ elog "If you are using the old style network scripts,"
+ elog "Configure wireless settings in ${EROOT}etc/conf.d/net"
+ elog "after reviewing ${EROOT}usr/share/doc/${PF}/net.example"
+ fi
+
+ if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then
+ ewarn "/etc/modules.autoload.d is no longer used. Please convert"
+ ewarn "your files to /etc/conf.d/modules and delete the directory."
+ fi
+
+ if use hppa; then
+ elog "Setting the console font does not work on all HPPA consoles."
+ elog "You can still enable it by running:"
+ elog "# rc-update add consolefont boot"
+ fi
+
+ # Handle the conf.d/local.{start,stop} -> local.d transition
+ if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
+ elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
+ elog "files to ${EROOT}etc/local.d"
+ mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
+ mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
+ chmod +x "${EROOT}"etc/local.d/*{start,stop}
+ fi
+
+ if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
+ /$(get_libdir)/rc/sh/migrate-to-run.sh
+ fi
+
+ # update the dependency tree after touching all files #224171
+ [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
+
+ if use newnet; then
+ local netscript=network
+ else
+ local netscript=net.lo
+ fi
+
+ if [ ! -e "${EROOT}"etc/runlevels/boot/${netscript} ]; then
+ ewarn "Please add the $netscript script to your boot runlevel"
+ ewarn "as soon as possible. Not doing so could leave you with a system"
+ ewarn "without networking."
+ fi
+
+ ewarn "In this version of OpenRC, the loopback interface no longer"
+ ewarn "satisfies the net virtual."
+ ewarn "If you have services now which do not start because of this,"
+ ewarn "They can be fixed by adding rc_need=\"!net\""
+ ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
+ ewarn "You should also file a bug against the service asking that"
+ ewarn "need net be dropped from the dependencies."
+ ewarn "The bug you file should block the following tracker:"
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
+
+ ewarn "This version of OpenRC doesn't enable nfs mounts automatically any"
+ ewarn "longer. In order to mount nfs file systems, you must use the"
+ ewarn "nfsmount service from the nfs-utils package."
+ ewarn "See bug https://bugs.gentoo.org/show_bug.cgi?id=427996 for"
+ ewarn "more information on this."
+
+ elog "You should now update all files in /etc, using etc-update"
+ elog "or equivalent before restarting any services or this host."
+ elog
+ elog "Please read the migration guide available at:"
+ elog "http://www.gentoo.org/doc/en/openrc-migration.xml"
+}
diff --git a/sys-auth/pam_mobile_otp/Manifest b/sys-auth/pam_mobile_otp/Manifest
index dc37f7c6..d1fc47c7 100644
--- a/sys-auth/pam_mobile_otp/Manifest
+++ b/sys-auth/pam_mobile_otp/Manifest
@@ -1,6 +1,6 @@
-AUX Makefile.patch 900 RMD160 560f06519459140f83c0facc850404d5b5b99ef1 SHA1 138e188ac4d51e7c0e49cead506f731b8131dfaf SHA256 51351325c44b617afd4134794bf3cbec2b39c8c139dcccfd3eff64952a01fc26
-AUX motp-manager.patch 411 RMD160 056ff5733ae411035d27e45450d111bc097aa067 SHA1 73746eddab83ab4e6efd9dfa2c8c35f6a41e7bbd SHA256 e852bb0272e9dbba8532c0304ce81468c960500908e94e5bac7b672634836374
-AUX motp.conf 78 RMD160 e1b95bc0e40d1ef6f48c779cb3f89b9a4b0e6cd3 SHA1 9da21fdd67c51a7e3b1aeb085fffed1add4d8ce5 SHA256 c85aa5384ef8f7364b483129d6e46c1505ecc0115bb8cd1084f6c7139f17a48e
-AUX prompt.patch 410 RMD160 ed817cde5a83e8195263dbb91bce5d5f6efe2c27 SHA1 1d5ef03fc63d6cb10aba012d99522b7f5ce7bd4a SHA256 a84b2ebb5e74f6d1d386d4bdf3bc910ded5f79ae046daa390c408d8323e163f2
-DIST pam_mobile_otp-0.6.1.tgz 26425 RMD160 7c8b5c02aeea5e53a36b2929574643a883dda371 SHA1 540e6f2a9a942ad0b2a39eb97015b4644480dedf SHA256 c26050358674ff2a2e4e4377e56aa3e1e348813936176bbc6957e84bdb2e6ba8
-EBUILD pam_mobile_otp-0.6.1.ebuild 1394 RMD160 f4bf8beb959c4c9995d0257e46bdcdd934257b1d SHA1 c8db402957ab17aa2c8223b25a9823c9a38fdd91 SHA256 84c9194892231c95d4514f3bf0d583ffad10ce8b16edd21e405c03b1acf439da
+AUX Makefile.patch 900 SHA256 51351325c44b617afd4134794bf3cbec2b39c8c139dcccfd3eff64952a01fc26 SHA512 d42120a45244bf3893584928bc64b0b10cf665c74a20459c6a77f1401e8053f92c493ab5d60e26a47cc39b3e449e472c26f96950f295f791b93ce5142df38c54 WHIRLPOOL 93ea236d406d48871c469de5dfc3384a13ab672e8979b0d43546a597acbfd9178137af485fe4c8f62d002fa8ba3cc551160e41a88be330099f09f9c344339b37
+AUX motp-manager.patch 411 SHA256 e852bb0272e9dbba8532c0304ce81468c960500908e94e5bac7b672634836374 SHA512 aba1a5f14f9af3377eaa1df826ddbc772bc0fd35363e1cd628011ee672990cdf115515ce85a381ae4556154cb80261ffcdd00de65e126979cd229207794bddf8 WHIRLPOOL 07b4d5496fb1b50ad29a1de86372f12237caddcf68fe94f5f9998a03ab6ff23837571db2d19b9a45c8c89f2912fdd47fd204de46284658815b1672523176db9d
+AUX motp.conf 78 SHA256 c85aa5384ef8f7364b483129d6e46c1505ecc0115bb8cd1084f6c7139f17a48e SHA512 6ae7b767cb42719ed3e3b011e4771fb3dd3b2267585defe3ac110d4888699ec3651904e0421997b737265b9ce4283ba89b4783ccdbd65205e905035bafa1e59a WHIRLPOOL 6c9721c987d74c2bc514f719eb2aa7de8066f06bc3c95f3779a9c5cc5949bf7cf846e6fd95cd856caadf036017f55d818e9cda69dec475d7018027464c82e5a7
+AUX prompt.patch 410 SHA256 a84b2ebb5e74f6d1d386d4bdf3bc910ded5f79ae046daa390c408d8323e163f2 SHA512 56fefadbc0f304402faae41772d914fdee7087778fee7461444874ef84cc61f26c647b52de94e6340841018e17309ef14a224dfcfcf31ecae5df066e09bebbe3 WHIRLPOOL b94e7320a1f90d8e2f3dc2d9debc7602eb10604642dfef7c3cb7e27971572a61006dccdd777d001b80f22ec38fb9ca04fa20c6a66919bab1a0fb3c74582456b2
+DIST pam_mobile_otp-0.6.1.tgz 26425 SHA256 c26050358674ff2a2e4e4377e56aa3e1e348813936176bbc6957e84bdb2e6ba8 SHA512 99027a0e9e5bc65fe2c0c27fde5cd267dfd5743b522169ceedcd01e43f5af49d25cbb1a0d0693fcf87e0cc58908434f037475f971bb56370a7897ab0a00ef02f WHIRLPOOL 665a4f1a51703edddeab95d33dfc3b596f14c0f7d23b9a41c4b12c2682cfa5bddd83bc6970e175c712f0f428346a3ffe89208d382fc94b19fae9c570b0088934
+EBUILD pam_mobile_otp-0.6.1.ebuild 1394 SHA256 84c9194892231c95d4514f3bf0d583ffad10ce8b16edd21e405c03b1acf439da SHA512 ef5318c8d7b4af576b872a84ece514acad983993248dff3b5ae919258d44a75c58ad050a8bbab5e08db2d19f432171ebab19a9d51f66a45fa9636034e55ad060 WHIRLPOOL 66b91dadfca2b3507f957450bc4f061d617218f03ce318725dfce96113847413918f48ab8507c7e3c5f036a1bbab7ff471fda4e56c49b6b0e8793445c7cd7c2a
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
new file mode 100644
index 00000000..c5e4fe59
--- /dev/null
+++ b/sys-fs/cryptsetup/Manifest
@@ -0,0 +1,15 @@
+AUX 1.0.5-dm-crypt-stop.sh 1022 SHA256 42015047c708aa73eae615559ff76c9c8948a5d01fba68f64c5432e30ec799a4 SHA512 6a8e55a2458278a48edaa8563ff7a586f521280587f4aacf03ab903fe6c3ae312b1925ee73a1462352d86cdc7097945f7ea842ba633ed527bbfb3a80689b1ae0 WHIRLPOOL c97f3d3485f56cb687acda6c697c4bb97e531d3aacc819ffa7073d9ac99f3e3d237e154064476e5f7ef1fce9b990792ffc992a90e083b5c93c45501f74564c58
+AUX 1.0.5-dmcrypt.rc 601 SHA256 0b58b18dc903d0d4a23e5e2df1e6f3c5db64c65b8884e24710e4b7528ea3f8dc SHA512 d18f0192eea97d5051b81b4287b96d5ffb59e2dc3611f93111ff92700916d561c246f956417f438180b9f65313f35fa85ca076872592ef87c984b91d9625c3c6 WHIRLPOOL 66eaefe2ea4ab4d82e2956891efac6e884f7997a36b9cd9527412b3d3713394d5d5144b0ec3807daee3de05dba15a0f9c7a2a1cc9f4919121f6d13ffbb2d582e
+AUX 1.0.6-dmcrypt.confd 3309 SHA256 0c30e081c0b8f879964ae49735f10b05a1d92f4f481042851958860945e13271 SHA512 d04ae17d3708ef20ade7afb223d4ef19e1b6812e0be8f9499e37e9c71344568b42030d9dd8f6918a9bfb211a3a94b40a9354e3b32a009cb165e84508d0a5e14b WHIRLPOOL 9496cd3fb3f8e8d84a5d70fd6e9853fdd2fe87df96244cb00fe73fee9a711847d795937b800ff13f98a888a288cfc5b33f564392794413e2a0b8e033165d4f5f
+AUX 1.0.6-r2-dm-crypt-start.sh 8092 SHA256 56004bef91b8fad57fe67fec19427dd7c48e01c8e1ba7ff60f8c370295775fdc SHA512 e55949ed23518f9530476973ab632f9d4af9a5a684546baf662caabe4566aeb0164484ed972ab2edf220120609c593b05fc07173da388b3fceb5063acef3aadb WHIRLPOOL 6f67efbf34bfc62b316026106fe89914c8a16f7377a64ff787e81fa80ab32654c88e803e5f0cb4ecaa943d36499d4b72c469cb2bb030c830d064836cc4ecae61
+AUX 1.1.0-libudev.patch 964 SHA256 02529608ee3743ada736ae3a6205c363cb1777ca5d72c5824287ec99fe9fe5f7 SHA512 f786e83d133c46d2dd61c8bf3fed781c8efbe7e045e2efde8255219360a214802937322d636fd156193a665dd020276494f687f5fea56ef08853de754db3ecc6 WHIRLPOOL a3eb49008885c883cb2a993cef9772369dbe5631e51968045d1eaef2ddd9c3eaed90b8601addb962c66fb50e9adaa5e5374a292ce3d7c321659f0acfccad344e
+AUX 1.1.0_rc3-static-no-selinux.patch 813 SHA256 7ec5067c5b05b478f45cdd35953827e4696011104f533b3339d18c4becc1985a SHA512 1d11d5e2d68de724c3a9a9ffa8b2a74c16f14c702a58bacaad171caf3e9bcd4b7130a7669e0c88bc169ae974e41ae4069fb16b47546f8461c77fb9503c93d851 WHIRLPOOL 7ebf5345fc6b40f003a854130e5e2eafa776318e186d1d679ce9340d5dad4fcdb5244050cc99ba3fc53db31a56cf044e7dc7f27b30cefda908442b2148f02d7b
+AUX 1.1.3-dm-crypt-start.sh 8651 SHA256 1489ce5480d51beb81cf4f5178468ad4b2f2e4b3f53bc75ee8fe47d3e050a76a SHA512 4cd3e4c28f1c3da4b864c556873c2036854da78d0c3055f06ea8e2d359f16dc7020b4ebc2c0d4024dc557f51e923a919ecf384add07e92525d908efe4073af4d WHIRLPOOL b68eacec508861821c1573dd85b4fb1a5d909ab70ad8445997796cf328cd54c8a2363dfc54ae8da82b4d7e526df6938baab5332bd8cb2d1c095ac15e730541ae
+AUX 1.1.3-dm-crypt-stop.sh 1272 SHA256 c81bf0cf8e57b3f83f55c808dba619b0a0f60eef8c3ed406d266be7cecdf96f9 SHA512 ec184e988f3ab36c5f661cc4743edf8ce0798ff69e4e40df854c172eaf0bae264de10160ee098dbfb7814318b2cd875ea18e1b447789c7e08b9549b11db3f175 WHIRLPOOL cb0c1afb4929229dc7bdade5657f053192c72a6011fd0eb05ef1e649f6a31925a57e61913cbea208eb0b3e2547b8bbe37cecb4e343ba84722efe2affadfa12ca
+AUX 1.4.1-dmcrypt.rc 8942 SHA256 3868b61751d36cb57d14c02a0dcbae9ed76965f4409ca6a328a0378e40ba1ce0 SHA512 afd45faddb3cd2553f860963611644f2786d56a4688624c6922dd60f5b9e07c5fa0da2b4f256f0780a902b4e6bdf6456f14e0b64f2d76dda3813e397684c32bf WHIRLPOOL 955133032bcf5b1e9530fcae5afe84ce2a48195dfa647888e061c65a79b8e6689f25dddc9e6c95be3156acdc12507a2f4eaf42ded55d1c76dc857c322b40c943
+AUX cryptsetup-1.0.6-udevsettle.patch 561 SHA256 80c4914071769dedc20198425b4ea528ec22264ff4c54516a9e5722a8e671f60 SHA512 74631c2aab95bd32a67dce1ae75ea30acdb167be78503a31ef8afbf178b651917cc65a37bafc5d6d60c1d3545664a2f53bf07885ba3ba86f562b12db17733228 WHIRLPOOL beb109875aa9579f05527d79a12eb0ebfd187853322accb70dc9e2a36e7ca4be881aa7f504f7573a040a64e0df777e70c4fbf31f79f29728c74cffaea8029d74
+AUX dmcrypt.rc 9336 SHA256 2cacfbe5b305c0ba9633764e79dfadd160e63ffb089f7347c0bca8c2ba9ec42f SHA512 0019cc0d0bb91c04b04949cdfb0126fdb04541ec4e76117760092e1287d4a4eb091ecbf643fb8e4346f226e6b01d8fe358f0f0e0221f31abc83415b5e235b17a WHIRLPOOL 527fbbebafcdd7e2e3687acdc59fb07e2fa26370508aa0758ca0deb6e12fcab789271b6733cdfd18381ddf55f606152febe6f1e4fdac26d1efd4206b7b219655
+DIST cryptsetup-1.4.1.tar.bz2 772971 SHA256 82b143328c2b427ef2b89fb76c701d311c95b54093c21bbf22342f7b393bddcb SHA512 663e6d90a19ff64e2b37e4b7b14bfb3f6ccdbabf0598b3a7c4a79409c0075884dbc9e3d6f93a4298254fee2f47be98b040d2eced6890c5575db96aaee2d13e8d WHIRLPOOL 3d81e3a418459d8a7d3b86fc97deeadd39c242d83ececa64e8a06cf8f7c972952aea10e123422faa8087b24830c4f9c1f1fc2fe713a47c0909e01e70f48e250c
+DIST cryptsetup-1.4.3.tar.bz2 798101 SHA256 d5ff2c00f6f791d77fa5636a02ae43ddbb46c6c793bdeafdec5e38fd15f99d0a SHA512 e91ad9cda9549802e9ea5cec02273ee4bc1a040883650e903e91a07c8cce8131b0bda068fa3433d2b5b3b7470cf9481d73670267cd419ce2d7b0f673b3601ba3 WHIRLPOOL e30c3bb9ad24145e425d64069cc84d8c129dc06d775299668dea9ad06c14c95e21b8bb734f94872990c7c1586666bdc6aee79aac5c8a64bacc3aa416d23a2f24
+EBUILD cryptsetup-1.4.1.ebuild 3347 SHA256 de14ca3516158d32e9f3399dfc7bea39afd8cb4a53393dc0ee3510d59604296b SHA512 9387142c3df615e7fe16b17c6cbbfe48b7a29bd9c00482386fca7c7287e86d44062f35787d750c8083257eed63dcaac492e4f0aa34f3a260c2cc738942731a72 WHIRLPOOL e94abe0105709dec4f254d607a13e37c90b59b63d5b632aee3fe62a5c00f5996ec6529e572e2c759544a5f097e9d94743f41a84c68ab41ca51cf19dee9860407
+EBUILD cryptsetup-1.4.3.ebuild 3554 SHA256 22710eb458bbcb1b23e2f48c1103c70907163df4d6c58a7423b2f20e5f73c015 SHA512 a470cb30f78d788ccb1d4c6dd57ad623deb8b2659f0f329211260bfcc2a1bcd94b0b7f8db0c08272536b22afda8506a2a49dea349430bb95a58d0f0b0e6e2b2d WHIRLPOOL 63b12964b3f3d1dc48a82438bdf0647d37a3a67cb91353d9ad44ab9384eb44b193e309eb5ad1a284f925e85a8d21e05fd5f59254d8d2518ddcbf281a071bc0a5
diff --git a/sys-fs/cryptsetup/cryptsetup-1.4.1.ebuild b/sys-fs/cryptsetup/cryptsetup-1.4.1.ebuild
new file mode 100644
index 00000000..8d1233aa
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.4.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/cryptsetup-1.4.1.ebuild,v 1.12 2012/11/29 00:15:27 ssuominen Exp $
+
+EAPI="2"
+
+inherit linux-info libtool
+
+MY_P=${P/_rc/-rc}
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="http://code.google.com/p/cryptsetup/"
+SRC_URI="http://cryptsetup.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="nls selinux +static"
+
+S=${WORKDIR}/${MY_P}
+
+RDEPEND="!<sys-apps/baselayout-2
+ !static? (
+ >=dev-libs/libgcrypt-1.1.42
+ dev-libs/libgpg-error
+ >=dev-libs/popt-1.7
+ >=sys-apps/util-linux-2.17.2
+ >=sys-fs/lvm2-2.02.64
+ )
+ virtual/udev
+ >=sys-libs/e2fsprogs-libs-1.41
+ selinux? ( sys-libs/libselinux )
+ !sys-fs/cryptsetup-luks"
+DEPEND="${RDEPEND}
+ static? (
+ >=dev-libs/libgpg-error-1.10[static-libs]
+ >=dev-libs/popt-1.16-r1[static-libs]
+ || ( >=sys-apps/util-linux-2.20[static-libs] <sys-apps/util-linux-2.20 )
+ dev-libs/libgcrypt[static-libs]
+ || ( >=sys-fs/lvm2-2.02.88[static-libs] <sys-fs/lvm2-2.02.88 )
+ virtual/udev
+ )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable nls) \
+ $(use_enable selinux)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ use static && { mv "${D}"/sbin/cryptsetup{.static,} || die ; }
+ dodoc TODO ChangeLog README NEWS
+
+ newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt || die
+ newinitd "${FILESDIR}"/1.4.1-dmcrypt.rc dmcrypt || die
+}
+
+pkg_postinst() {
+ ewarn "This ebuild introduces a new set of scripts and configuration"
+ ewarn "than the last version. If you are currently using /etc/conf.d/cryptfs"
+ ewarn "then you *MUST* copy your old file to:"
+ ewarn "/etc/conf.d/dmcrypt"
+ ewarn "Or your encrypted partitions will *NOT* work."
+ elog "Please see the example for configuring a LUKS mountpoint"
+ elog "in /etc/conf.d/dmcrypt"
+ elog
+ elog "If you are using baselayout-2 then please do:"
+ elog "rc-update add dmcrypt boot"
+ elog "This version introduces a command line arguement 'key_timeout'."
+ elog "If you want the search for the removable key device to timeout"
+ elog "after 10 seconds add the following to your bootloader config:"
+ elog "key_timeout=10"
+ elog "A timeout of 0 will mean it will wait indefinitely."
+ elog
+ elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
+ elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
+ elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
+ elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
+}
diff --git a/sys-fs/cryptsetup/cryptsetup-1.4.3.ebuild b/sys-fs/cryptsetup/cryptsetup-1.4.3.ebuild
new file mode 100644
index 00000000..163ea36a
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.4.3.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/cryptsetup-1.4.3.ebuild,v 1.9 2013/01/21 21:00:18 vapier Exp $
+
+EAPI="4"
+
+inherit linux-info libtool
+
+MY_P=${P/_rc/-rc}
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="http://code.google.com/p/cryptsetup/"
+SRC_URI="http://cryptsetup.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="nls selinux static static-libs udev"
+
+S=${WORKDIR}/${MY_P}
+
+LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
+ >=dev-libs/popt-1.7[static-libs(+)]
+ >=sys-apps/util-linux-2.17.2[static-libs(+)]
+ >=dev-libs/libgcrypt-1.1.42[static-libs(+)]
+ >=sys-fs/lvm2-2.02.64[static-libs(+)]
+ >=sys-libs/e2fsprogs-libs-1.41[static-libs(+)]
+ udev? ( virtual/udev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs(+)]}
+ !<sys-apps/baselayout-2
+ !sys-fs/cryptsetup-luks
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable selinux) \
+ $(use_enable udev)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+ default
+}
+
+src_install() {
+ default
+ use static && { mv "${ED}"/sbin/cryptsetup{.static,} || die ; }
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+
+ newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/dmcrypt.rc dmcrypt
+}
+
+pkg_postinst() {
+ ewarn "This ebuild introduces a new set of scripts and configuration"
+ ewarn "than the last version. If you are currently using /etc/conf.d/cryptfs"
+ ewarn "then you *MUST* copy your old file to:"
+ ewarn "/etc/conf.d/dmcrypt"
+ ewarn "Or your encrypted partitions will *NOT* work."
+ elog "Please see the example for configuring a LUKS mountpoint"
+ elog "in /etc/conf.d/dmcrypt"
+ elog
+ elog "If you are using baselayout-2 then please do:"
+ elog "rc-update add dmcrypt boot"
+ elog "This version introduces a command line arguement 'key_timeout'."
+ elog "If you want the search for the removable key device to timeout"
+ elog "after 10 seconds add the following to your bootloader config:"
+ elog "key_timeout=10"
+ elog "A timeout of 0 will mean it will wait indefinitely."
+ elog
+ elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
+ elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
+ elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
+ elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
+}
diff --git a/sys-fs/cryptsetup/files/1.0.5-dm-crypt-stop.sh b/sys-fs/cryptsetup/files/1.0.5-dm-crypt-stop.sh
new file mode 100644
index 00000000..299e43bb
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.0.5-dm-crypt-stop.sh
@@ -0,0 +1,40 @@
+# /lib/rcscripts/addons/dm-crypt-stop.sh
+
+# Try to remove any dm-crypt mappings
+csetup=/sbin/cryptsetup
+if [ -f /etc/conf.d/dmcrypt ] && [ -x "$csetup" ]
+then
+ einfo "Removing dm-crypt mappings"
+
+ /bin/egrep "^(target|swap)" /etc/conf.d/dmcrypt | \
+ while read targetline
+ do
+ target=
+ swap=
+
+ eval ${targetline}
+
+ [ -n "${swap}" ] && target=${swap}
+ [ -z "${target}" ] && ewarn "Invalid line in /etc/conf.d/dmcrypt: ${targetline}"
+
+ ebegin "Removing dm-crypt mapping for: ${target}"
+ ${csetup} remove ${target}
+ eend $? "Failed to remove dm-crypt mapping for: ${target}"
+ done
+
+ if [[ -n $(/bin/egrep -e "^(source=)./dev/loop*" /etc/conf.d/dmcrypt) ]] ; then
+ einfo "Taking down any dm-crypt loop devices"
+ /bin/egrep -e "^(source)" /etc/conf.d/dmcrypt | while read sourceline
+ do
+ source=
+ eval ${sourceline}
+ if [[ -n $(echo ${source} | grep /dev/loop) ]] ; then
+ ebegin " Taking down ${source}"
+ /sbin/losetup -d ${source}
+ eend $? " Failed to remove loop"
+ fi
+ done
+ fi
+fi
+
+# vim:ts=4
diff --git a/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc b/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc
new file mode 100644
index 00000000..dd7585b7
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.0.5-dmcrypt.rc,v 1.4 2011/01/18 20:05:18 vapier Exp $
+
+depend() {
+ before checkfs fsck
+}
+
+start() {
+ if [ ! -e /lib/librc.so ]; then
+ eerror "The ${myservice} init script is written for baselayout-2"
+ eerror "Please do not use it with baselayout-1"
+ return 1
+ fi
+
+ . /lib/rcscripts/addons/dm-crypt-start.sh
+}
+
+stop() {
+ if [ ! -e /lib/librc.so ]; then
+ return 0
+ fi
+
+ . /lib/rcscripts/addons/dm-crypt-stop.sh
+}
diff --git a/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd b/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd
new file mode 100644
index 00000000..35a1fd2c
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd
@@ -0,0 +1,98 @@
+# /etc/conf.d/dmcrypt
+
+# For people who run dmcrypt on top of some other layer (like raid),
+# use rc_need to specify that requirement. See the runscript(8) man
+# page for more information.
+
+#--------------------
+# Instructions
+#--------------------
+
+# Note regarding the syntax of this file. This file is *almost* bash,
+# but each line is evaluated separately. Separate swaps/targets can be
+# specified. The init-script which reads this file assumes that a
+# swap= or target= line starts a new section, similar to lilo or grub
+# configuration.
+
+# Note when using gpg keys and /usr on a separate partition, you will
+# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly
+# and ensure that gpg has been compiled statically.
+# See http://bugs.gentoo.org/90482 for more information.
+
+# Note that the init-script which reads this file detects whether your
+# partition is LUKS or not. No mkfs is run unless you specify a makefs
+# option.
+
+# Global options:
+#----------------
+
+# Max number of checks to perform (1 per second)
+#dmcrypt_max_timeout=120
+
+# Arguments:
+#-----------
+# target=<name> == Mapping name for partition.
+# swap=<name> == Mapping name for swap partition.
+# source='<dev>' == Real device for partition.
+# key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
+# remdev='<dev>' == Device that will be assigned to removable media.
+# gpg_options='<opts>' == Default are --quiet --decrypt
+# options='<opts>' == cryptsetup, for LUKS you can only use --readonly
+# loop_file='<file>' == Loopback file.
+# pre_mount='cmds' == commands to execute before mounting partition.
+# post_mount='cmds' == commands to execute after mounting partition.
+#-----------
+# Supported Modes
+# gpg == decrypt and pipe key into cryptsetup.
+# Note: new-line character must not be part of key.
+# Command to erase \n char: 'cat key | tr -d '\n' > cleanKey'
+
+#--------------------
+# dm-crypt examples
+#--------------------
+
+## swap
+# Swap partitions. These should come first so that no keys make their
+# way into unencrypted swap.
+# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
+# If no makefs is given then mkswap will be assumed
+#swap=crypt-swap
+#source='/dev/hda2'
+
+## /home with passphrase
+#target=crypt-home
+#source='/dev/hda5'
+
+## /home with regular keyfile
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+
+## /home with gpg protected key
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+
+## /home with regular keyfile on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+#remdev='/dev/sda1'
+
+##/home with gpg protected key on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+#remdev='/dev/sda1'
+
+##/tmp with regular keyfile
+#target=crypt-tmp
+#source='/dev/hda6'
+#key='/full/path/to/tmpkey'
+#pre_mount='/sbin/mkreiserfs -f -f ${dev}'
+#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'
+
+## Loopback file example
+#mount='crypt-loop-home'
+#source='/dev/loop0'
+#loop_file='/mnt/crypt/home'
diff --git a/sys-fs/cryptsetup/files/1.0.6-r2-dm-crypt-start.sh b/sys-fs/cryptsetup/files/1.0.6-r2-dm-crypt-start.sh
new file mode 100644
index 00000000..44d2c456
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.0.6-r2-dm-crypt-start.sh
@@ -0,0 +1,294 @@
+# /lib/rcscripts/addons/dm-crypt-start.sh
+
+# For backwards compatability with baselayout < 1.13.0
+dm_crypt_execute_checkfs() {
+ dm_crypt_execute_dmcrypt
+}
+
+dm_crypt_execute_volumes() {
+ dm_crypt_execute_dmcrypt
+}
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_dmcrypt() {
+ local dev ret mode foo
+ # some colors
+ local red='\x1b[31;01m' green='\x1b[32;01m' off='\x1b[0;0m'
+
+ if [ -n "$target" ]; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "$swap" ]; then
+ einfo "Checking swap is not LUKS"
+ cryptsetup isLuks ${source} 2>/dev/null
+ foo="$?"
+ if [ "${foo}" -eq 0 ]; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ else
+ return
+ fi
+ if [ -z "$source" ] && [ ! -e "$source" ]; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [[ -n ${loop_file} ]] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ /sbin/losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # luksOpen <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="$target" arg3="$source" luks=0
+
+ cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="$source"; arg3="$target"; luks=1; }
+
+ if /sbin/cryptsetup status ${target} | egrep -q '\<active:' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "$key" ]; then
+ read_abort() {
+ local ans
+ local prompt=" ${green}*${off} $1? (${red}yes${off}/${green}No${off}) "
+ shift
+ echo -n -e "${prompt}"
+ if ! read -n 1 $* ans ; then
+ local back=${prompt//?/\\b}
+ echo -n -e "${back}"
+ else
+ echo
+ fi
+ case $ans in
+ [yY]|[yY][eE][sS]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key/*:/} && ( [ "$mode" == "$key" ] || [ -z "$mode" ] ) && mode=reg
+ key=${key/:*/}
+ case "$mode" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "$remdev" ]; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ]; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${read_timeout:--t 1} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ ((++i))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "$key" ]; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin "dm-crypt map ${target}"
+ einfo "cryptsetup will be called with : ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "$mode" == "gpg" ]; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if type -p gpg >/dev/null ; then
+ for (( i = 0 ; i < 3 ; i++ ))
+ do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ [ "$ret" -eq 0 ] && break
+ done
+ eend "${ret}" "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "$mode" == "reg" ]; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ eend "${ret}" "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ eend "${ret}" "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "$mntrem" ]; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [[ ${ret} != 0 ]] ; then
+ cryptfs_status=1
+ else
+ if [[ -n ${pre_mount} ]] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Running pre_mount commands for ${target}"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Run any post_mount commands for an individual mount
+#
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_localmount() {
+ local mount_point
+
+ [ -z "$target" ] && [ -z "$post_mount" ] && return
+
+ if ! /sbin/cryptsetup status ${target} | egrep -q '\<active:' ; then
+ ewarn "Skipping unmapped target ${target}"
+ cryptfs_status=1
+ return
+ fi
+
+ mount_point=$(grep "/dev/mapper/${target}" /proc/mounts | cut -d' ' -f2)
+ if [[ -z ${mount_point} ]] ; then
+ ewarn "Failed to find mount point for ${target}, skipping"
+ cryptfs_status=1
+ fi
+
+ if [[ -n ${post_mount} ]] ; then
+ ebegin "Running post_mount commands for target ${target}"
+ eval "${post_mount}" >/dev/null
+ eend $? || cryptfs_status=1
+ fi
+}
+
+# Determine string lengths
+strlen() {
+ if [ -z "$1" ]
+ then
+ echo "usage: strlen <variable_name>"
+ die
+ fi
+ eval echo "\${#${1}}"
+}
+
+# Lookup optional bootparams
+parse_opt() {
+ case "$1" in
+ *\=*)
+ local key_name="`echo "$1" | cut -f1 -d=`"
+ local key_len=`strlen key_name`
+ local value_start=$((key_len+2))
+ echo "$1" | cut -c ${value_start}-
+ ;;
+ esac
+}
+
+local cryptfs_status=0
+local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+CMDLINE="`cat /proc/cmdline`"
+for x in ${CMDLINE}
+do
+ case "${x}" in
+ key_timeout\=*)
+ KEY_TIMEOUT=`parse_opt "${x}"`
+ if [ ${KEY_TIMEOUT} -gt 0 ]; then
+ read_timeout="-t ${KEY_TIMEOUT}"
+ fi
+ ;;
+ esac
+done
+
+if [[ -f /etc/conf.d/dmcrypt ]] && [[ -x /sbin/cryptsetup ]] ; then
+ ebegin "Setting up dm-crypt mappings"
+
+ # Fix for baselayout-1.12.10 (bug 174256)
+ [ -z ${SVCNAME} ] && SVCNAME="${myservice}"
+
+ while read -u 3 targetline ; do
+ # skip comments and blank lines
+ [[ ${targetline}\# == \#* ]] && continue
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ dm_crypt_execute_${SVCNAME}
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [[ -z ${target} && -z ${swap} ]] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in /etc/conf.d/dmcrypt: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute_${SVCNAME}
+ eval "${targetline}"
+ done 3< /etc/conf.d/dmcrypt
+
+ # If we have a target queued up, then execute it
+ dm_crypt_execute_${SVCNAME}
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+fi
+
+# vim:ts=4
diff --git a/sys-fs/cryptsetup/files/1.1.0-libudev.patch b/sys-fs/cryptsetup/files/1.1.0-libudev.patch
new file mode 100644
index 00000000..12d589e4
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.1.0-libudev.patch
@@ -0,0 +1,26 @@
+diff -ur cryptsetup-1.1.0.orig/configure.in cryptsetup-1.1.0/configure.in
+--- cryptsetup-1.1.0.orig/configure.in 2010-04-23 21:39:29.000000000 +0300
++++ cryptsetup-1.1.0/configure.in 2010-04-23 21:38:18.000000000 +0300
+@@ -62,6 +62,11 @@
+
+ dnl ==========================================================================
+
++saved_LIBS=$LIBS
++AC_CHECK_LIB([udev], [udev_queue_get_udev_is_active])
++AC_SUBST(UDEV_LIBS, $LIBS)
++LIBS=$saved_LIBS
++
+ AC_ARG_ENABLE(shared-library,
+ [ --disable-shared-library
+ disable building of shared cryptsetup library],,
+diff -ur cryptsetup-1.1.0.orig/lib/Makefile.am cryptsetup-1.1.0/lib/Makefile.am
+--- cryptsetup-1.1.0.orig/lib/Makefile.am 2009-12-30 18:29:28.000000000 +0200
++++ cryptsetup-1.1.0/lib/Makefile.am 2010-04-23 21:41:34.000000000 +0300
+@@ -33,6 +33,7 @@
+ libcryptsetup_la_LIBADD = \
+ @UUID_LIBS@ \
+ @DEVMAPPER_LIBS@ \
++ @UDEV_LIBS@ \
+ @LIBGCRYPT_LIBS@ \
+ ../luks/libluks.la
+
diff --git a/sys-fs/cryptsetup/files/1.1.0_rc3-static-no-selinux.patch b/sys-fs/cryptsetup/files/1.1.0_rc3-static-no-selinux.patch
new file mode 100644
index 00000000..d64867d4
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.1.0_rc3-static-no-selinux.patch
@@ -0,0 +1,18 @@
+diff -Naur cryptsetup-1.1.0-rc3/configure.in cryptsetup-1.1.0-rc3-areyoufuckingserious/configure.in
+--- cryptsetup-1.1.0-rc3/configure.in 2009-11-16 17:39:37.000000000 -0500
++++ cryptsetup-1.1.0-rc3-areyoufuckingserious/configure.in 2009-11-17 19:49:08.000000000 -0500
+@@ -93,9 +93,11 @@
+ saved_LIBS2=$LIBS
+ LIBS="$LIBS -static"
+ # Check if it there is still not some missing dependency like static selinux libs
+- AC_SEARCH_LIBS([dm_set_selinux_context], [devmapper],,
+- [AC_MSG_ERROR([Your system requires SElinux libraries for static compilation.])])
+- LIBS=$saved_LIBS2
++ if test "x$enable_selinux" != xno; then
++ AC_SEARCH_LIBS([dm_set_selinux_context], [devmapper],,
++ [AC_MSG_ERROR([Your system requires SElinux libraries for static compilation.])])
++ LIBS=$saved_LIBS2
++ fi
+ fi
+
+ LIBS=$saved_LIBS
diff --git a/sys-fs/cryptsetup/files/1.1.3-dm-crypt-start.sh b/sys-fs/cryptsetup/files/1.1.3-dm-crypt-start.sh
new file mode 100644
index 00000000..e56dbc97
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.1.3-dm-crypt-start.sh
@@ -0,0 +1,309 @@
+# /lib/rcscripts/addons/dm-crypt-start.sh
+
+# For backwards compatibility with baselayout < 1.13.0 #174256
+: ${SVCNAME:=${myservice}}
+
+# We might be hooked into init.d scripts (ala baselayout-1), or we might
+# be a standalone dmcrypt script. We support multiple dmcrypt instances,
+# but they must start with "dmcrypt." to be detected that way. It keeps
+# our lives much simpler with this multiplexed arrangement.
+execute_hook="dm_crypt_execute_dmcrypt"
+conf_file="dmcrypt"
+case ${SVCNAME} in
+ localmount) execute_hook="dm_crypt_execute_localmount" ;;
+ dmcrypt.*) conf_file="${SVCNAME}" ;;
+esac
+conf_file="/etc/conf.d/${conf_file}"
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_dmcrypt() {
+ local dev ret mode foo
+ # some colors
+ local red='\x1b[31;01m' green='\x1b[32;01m' off='\x1b[0;0m'
+
+ if [ -n "$target" ]; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "$swap" ]; then
+ einfo "Checking swap is not LUKS"
+ cryptsetup isLuks ${source} 2>/dev/null
+ foo="$?"
+ if [ "${foo}" -eq 0 ]; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ else
+ return
+ fi
+ if [ -z "$source" ] && [ ! -e "$source" ]; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [[ -n ${loop_file} ]] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ /sbin/losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # luksOpen <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="$target" arg3="$source" luks=0
+
+ cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="$source"; arg3="$target"; luks=1; }
+
+ # Older versions reported:
+ # ${target} is active:
+ # Newer versions report:
+ # ${target} is active[ and is in use.]
+ if cryptsetup status ${target} | egrep -q ' is active' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "$key" ]; then
+ read_abort() {
+ local ans
+ local prompt=" ${green}*${off} $1? (${red}yes${off}/${green}No${off}) "
+ shift
+ echo -n -e "${prompt}"
+ if ! read -n 1 $* ans ; then
+ local back=${prompt//?/\\b}
+ echo -n -e "${back}"
+ else
+ echo
+ fi
+ case $ans in
+ [yY]|[yY][eE][sS]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key/*:/} && ( [ "$mode" == "$key" ] || [ -z "$mode" ] ) && mode=reg
+ key=${key/:*/}
+ case "$mode" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "$remdev" ]; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ]; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${read_timeout:--t 1} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ ((++i))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "$key" ]; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin "dm-crypt map ${target}"
+ einfo "cryptsetup will be called with : ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "$mode" == "gpg" ]; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if type -p gpg >/dev/null ; then
+ for (( i = 0 ; i < 3 ; i++ ))
+ do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ [ "$ret" -eq 0 ] && break
+ done
+ eend "${ret}" "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "$mode" == "reg" ]; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ eend "${ret}" "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret="$?"
+ eend "${ret}" "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "$mntrem" ]; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [[ ${ret} != 0 ]] ; then
+ cryptfs_status=1
+ else
+ if [[ -n ${pre_mount} ]] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Running pre_mount commands for ${target}"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Run any post_mount commands for an individual mount
+#
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_localmount() {
+ local mount_point
+
+ [ -z "$target" ] && [ -z "$post_mount" ] && return
+
+ if ! /sbin/cryptsetup status ${target} | egrep -q '\<active:' ; then
+ ewarn "Skipping unmapped target ${target}"
+ cryptfs_status=1
+ return
+ fi
+
+ mount_point=$(grep "/dev/mapper/${target}" /proc/mounts | cut -d' ' -f2)
+ if [[ -z ${mount_point} ]] ; then
+ ewarn "Failed to find mount point for ${target}, skipping"
+ cryptfs_status=1
+ fi
+
+ if [[ -n ${post_mount} ]] ; then
+ ebegin "Running post_mount commands for target ${target}"
+ eval "${post_mount}" >/dev/null
+ eend $? || cryptfs_status=1
+ fi
+}
+
+# Determine string lengths
+strlen() {
+ if [ -z "$1" ]
+ then
+ echo "usage: strlen <variable_name>"
+ die
+ fi
+ eval echo "\${#${1}}"
+}
+
+# Lookup optional bootparams
+parse_opt() {
+ case "$1" in
+ *\=*)
+ local key_name="`echo "$1" | cut -f1 -d=`"
+ local key_len=`strlen key_name`
+ local value_start=$((key_len+2))
+ echo "$1" | cut -c ${value_start}-
+ ;;
+ esac
+}
+
+local cryptfs_status=0
+local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+CMDLINE="`cat /proc/cmdline`"
+for x in ${CMDLINE}
+do
+ case "${x}" in
+ key_timeout\=*)
+ KEY_TIMEOUT=`parse_opt "${x}"`
+ if [ ${KEY_TIMEOUT} -gt 0 ]; then
+ read_timeout="-t ${KEY_TIMEOUT}"
+ fi
+ ;;
+ esac
+done
+
+if [[ -f ${conf_file} ]] && [[ -x /sbin/cryptsetup ]] ; then
+ ebegin "Setting up dm-crypt mappings"
+
+ while read -u 3 targetline ; do
+ # skip comments and blank lines
+ [[ ${targetline}\# == \#* ]] && continue
+
+ # skip service-specific openrc configs #377927
+ [[ ${targetline} == rc_* ]] && continue
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [[ -z ${target} && -z ${swap} ]] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ dmcrypt_max_timeout=*)
+ # ignore global options
+ continue
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in ${conf_file}: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute_xxx
+ eval "${targetline}"
+ done 3< ${conf_file}
+
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+fi
+
+# vim:ts=4
diff --git a/sys-fs/cryptsetup/files/1.1.3-dm-crypt-stop.sh b/sys-fs/cryptsetup/files/1.1.3-dm-crypt-stop.sh
new file mode 100644
index 00000000..548269c0
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.1.3-dm-crypt-stop.sh
@@ -0,0 +1,51 @@
+# /lib/rcscripts/addons/dm-crypt-stop.sh
+
+# For backwards compatibility with baselayout < 1.13.0 #174256
+: ${SVCNAME:=${myservice}}
+
+# See notes in dm-crypt-start.sh
+execute_hook="dm_crypt_execute_dmcrypt"
+conf_file="dmcrypt"
+case ${SVCNAME} in
+ dmcrypt.*) conf_file="${SVCNAME}" ;;
+esac
+conf_file="/etc/conf.d/${conf_file}"
+
+# Try to remove any dm-crypt mappings
+csetup=/sbin/cryptsetup
+if [ -f ${conf_file} ] && [ -x "$csetup" ]
+then
+ einfo "Removing dm-crypt mappings"
+
+ /bin/egrep "^(target|swap)" ${conf_file} | \
+ while read targetline
+ do
+ target=
+ swap=
+
+ eval ${targetline}
+
+ [ -n "${swap}" ] && target=${swap}
+ [ -z "${target}" ] && ewarn "Invalid line in ${conf_file}: ${targetline}"
+
+ ebegin "Removing dm-crypt mapping for: ${target}"
+ ${csetup} remove ${target}
+ eend $? "Failed to remove dm-crypt mapping for: ${target}"
+ done
+
+ if [[ -n $(/bin/egrep -e "^(source=)./dev/loop*" ${conf_file}) ]] ; then
+ einfo "Taking down any dm-crypt loop devices"
+ /bin/egrep -e "^(source)" ${conf_file} | while read sourceline
+ do
+ source=
+ eval ${sourceline}
+ if [[ -n $(echo ${source} | grep /dev/loop) ]] ; then
+ ebegin " Taking down ${source}"
+ /sbin/losetup -d ${source}
+ eend $? " Failed to remove loop"
+ fi
+ done
+ fi
+fi
+
+# vim:ts=4
diff --git a/sys-fs/cryptsetup/files/1.4.1-dmcrypt.rc b/sys-fs/cryptsetup/files/1.4.1-dmcrypt.rc
new file mode 100755
index 00000000..79ec6342
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.4.1-dmcrypt.rc
@@ -0,0 +1,337 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.4.1-dmcrypt.rc,v 1.1 2012/05/11 08:31:51 vapier Exp $
+
+depend() {
+ before checkfs fsck
+}
+
+# We support multiple dmcrypt instances based on $SVCNAME
+execute_hook="dm_crypt_execute_dmcrypt"
+# XXX: Should we drop this ?
+# execute_hook="dm_crypt_execute_localmount"
+conf_file="/etc/conf.d/${SVCNAME}"
+
+# Get splash helpers if available.
+if [ -e /sbin/splash-functions.sh ] ; then
+ . /sbin/splash-functions.sh
+fi
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_dmcrypt() {
+ local dev ret mode foo
+
+ if [ -n "${target}" ] ; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "${swap}" ] ; then
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ else
+ return
+ fi
+ if [ -z "${source}" ] && [ ! -e "${source}" ] ; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [ -n "${loop_file}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # luksOpen <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="${target}" arg3="${source}" luks=0
+
+ cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="${source}"; arg3="${target}"; luks=1; }
+
+ # Older versions reported:
+ # ${target} is active:
+ # Newer versions report:
+ # ${target} is active[ and is in use.]
+ if cryptsetup status ${target} | egrep -q ' is active' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "${key}" ] ; then
+ read_abort() {
+ # some colors
+ local ans
+ shift
+ [ -z "${NORMAL}" ] && eval $(eval_ecolors)
+ einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) "
+ if ! read -n 1 $* ans ; then
+ printf '\r'
+ else
+ echo
+ fi
+ case ${ans} in
+ [yY]|[yY][eE][sS]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key/*:/} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
+ key=${key/:*/}
+ case "${mode}" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "${remdev}" ] ; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ] ; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${read_timeout:--t 1} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ : $((i += 1))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "${key}" ] ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "${mode}" = "gpg" ] ; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if type -p gpg >/dev/null ; then
+ for i in 0 1 2 ; do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ [ ${ret} -eq 0 ] && break
+ done
+ eend ${ret} "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "${mode}" = "reg" ] ; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "${mntrem}" ] ; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [ ${ret} -ne 0 ] ; then
+ cryptfs_status=1
+ else
+ if [ -n "${pre_mount}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " pre_mount: ${pre_mount}"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Run any post_mount commands for an individual mount
+#
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_localmount() {
+ local mount_point
+
+ [ -z "${target}" ] && [ -z "${post_mount}" ] && return
+
+ if ! cryptsetup status ${target} | egrep -q '\<active:' ; then
+ ewarn "Skipping unmapped target ${target}"
+ cryptfs_status=1
+ return
+ fi
+
+ mount_point=$(grep "/dev/mapper/${target}" /proc/mounts | cut -d' ' -f2)
+ if [ -z "${mount_point}" ] ; then
+ ewarn "Failed to find mount point for ${target}, skipping"
+ cryptfs_status=1
+ fi
+
+ if [ -n "${post_mount}" ] ; then
+ ebegin "Running post_mount commands for target ${target}"
+ eval "${post_mount}" >/dev/null
+ eend $? || cryptfs_status=1
+ fi
+}
+
+# Lookup optional bootparams
+get_bootparam_val() {
+ # We're given something like:
+ # foo=bar=cow
+ # Return the "bar=cow" part.
+ case $1 in
+ *\=*)
+ local key=$(echo "$1" | cut -f1 -d=)
+ echo "$1" | cut -c $(( ${#key} + 2 ))
+ ;;
+ esac
+}
+
+start() {
+ local header=true cryptfs_status=0
+ local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+ local x
+ for x in $(cat /proc/cmdline) ; do
+ case "${x}" in
+ key_timeout\=*)
+ local KEY_TIMEOUT=$(get_bootparam_val "${x}")
+ if [ ${KEY_TIMEOUT} -gt 0 ] ; then
+ read_timeout="-t ${KEY_TIMEOUT}"
+ fi
+ ;;
+ esac
+ done
+
+ while read -u 3 targetline ; do
+ case ${targetline} in
+ # skip comments and blank lines
+ ""|"#"*) continue ;;
+ # skip service-specific openrc configs #377927
+ rc_*) continue ;;
+ esac
+
+ ${header} && ebegin "Setting up dm-crypt mappings"
+ header=false
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [ -z "${target}${swap}" ] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ dmcrypt_max_timeout=*)
+ # ignore global options
+ continue
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in ${conf_file}: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute_xxx
+ eval "${targetline}"
+ done 3< ${conf_file}
+
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+}
+
+stop() {
+ local line header
+
+ # Break down all mappings
+ header=true
+ egrep "^(target|swap)=" ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Removing dm-crypt mappings"
+ header=false
+
+ target= swap=
+ eval ${line}
+
+ [ -n "${swap}" ] && target=${swap}
+ if [ -z "${target}" ] ; then
+ ewarn "invalid line in ${conf_file}: ${line}"
+ continue
+ fi
+
+ ebegin " ${target}"
+ cryptsetup remove ${target}
+ eend $?
+ done
+
+ # Break down loop devices
+ header=true
+ grep '^source=./dev/loop' ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Detaching dm-crypt loop devices"
+ header=false
+
+ source=
+ eval ${line}
+
+ ebegin " ${source}"
+ losetup -d "${source}"
+ eend $?
+ done
+
+ return 0
+}
diff --git a/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch b/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch
new file mode 100644
index 00000000..6860a7c4
--- /dev/null
+++ b/sys-fs/cryptsetup/files/cryptsetup-1.0.6-udevsettle.patch
@@ -0,0 +1,21 @@
+2008-09-13 Doug Goldstein <cardoe@gentoo.org>
+ * switch to udevadm settle since udevsettle has been deprecated
+ and finally removed with udev 126.
+
+--- cryptsetup-1.0.6/lib/libdevmapper.c
++++ cryptsetup-1.0.6/lib/libdevmapper.c
+@@ -18,11 +18,11 @@
+
+ #define CRYPT_TARGET "crypt"
+
+-#define UDEVSETTLE "/sbin/udevsettle"
++#define UDEVSETTLE "/sbin/udevadm settle"
+
+-static void run_udevsettle(void)
++static int run_udevsettle(void)
+ {
+- system(UDEVSETTLE);
++ return system(UDEVSETTLE);
+ }
+
+ static void set_dm_error(int level, const char *file, int line,
diff --git a/sys-fs/cryptsetup/files/dmcrypt.rc b/sys-fs/cryptsetup/files/dmcrypt.rc
new file mode 100755
index 00000000..130036b9
--- /dev/null
+++ b/sys-fs/cryptsetup/files/dmcrypt.rc
@@ -0,0 +1,346 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/dmcrypt.rc,v 1.4 2012/05/11 08:33:01 vapier Exp $
+
+depend() {
+ before checkfs fsck
+}
+
+# We support multiple dmcrypt instances based on $SVCNAME
+execute_hook="dm_crypt_execute_dmcrypt"
+# XXX: Should we drop this ?
+# execute_hook="dm_crypt_execute_localmount"
+conf_file="/etc/conf.d/${SVCNAME}"
+
+# Get splash helpers if available.
+if [ -e /sbin/splash-functions.sh ] ; then
+ . /sbin/splash-functions.sh
+fi
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_dmcrypt() {
+ local dev ret mode foo
+
+ if [ -n "${target}" ] ; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "${swap}" ] ; then
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ else
+ return
+ fi
+ if [ -z "${source}" ] && [ ! -e "${source}" ] ; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [ -n "${loop_file}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # luksOpen <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="${target}" arg3="${source}" luks=0
+
+ cryptsetup isLuks ${source} 2>/dev/null && { arg1="luksOpen"; arg2="${source}"; arg3="${target}"; luks=1; }
+
+ # Older versions reported:
+ # ${target} is active:
+ # Newer versions report:
+ # ${target} is active[ and is in use.]
+ if cryptsetup status ${target} | egrep -q ' is active' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "${key}" ] ; then
+ read_abort() {
+ # some colors
+ local ans savetty resettty
+ [ -z "${NORMAL}" ] && eval $(eval_ecolors)
+ einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) "
+ shift
+ # This is ugly as s**t. But POSIX doesn't provide `read -t`, so
+ # we end up having to implement our own crap with stty/etc...
+ savetty=$(stty -g)
+ resettty='stty ${savetty}; trap - EXIT HUP INT TERM'
+ trap 'eval "${resettty}"' EXIT HUP INT TERM
+ stty -icanon
+ [ "${1}" = -t ] && stty min 0 time "$(( $2 * 10 ))"
+ ans=$(dd count=1 bs=1 2>/dev/null) || ans=''
+ eval "${resettty}"
+ if [ -z "${ans}" ] ; then
+ printf '\r'
+ else
+ echo
+ fi
+ case ${ans} in
+ [yY]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key/*:/} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
+ key=${key/:*/}
+ case "${mode}" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "${remdev}" ] ; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ] ; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${read_timeout:--t 1} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ : $((i += 1))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "${key}" ] ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "${mode}" = "gpg" ] ; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if type -p gpg >/dev/null ; then
+ for i in 0 1 2 ; do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ [ ${ret} -eq 0 ] && break
+ done
+ eend ${ret} "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "${mode}" = "reg" ] ; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "${mntrem}" ] ; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [ ${ret} -ne 0 ] ; then
+ cryptfs_status=1
+ else
+ if [ -n "${pre_mount}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " pre_mount: ${pre_mount}"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Run any post_mount commands for an individual mount
+#
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute_localmount() {
+ local mount_point
+
+ [ -z "${target}" ] && [ -z "${post_mount}" ] && return
+
+ if ! cryptsetup status ${target} | egrep -q '\<active:' ; then
+ ewarn "Skipping unmapped target ${target}"
+ cryptfs_status=1
+ return
+ fi
+
+ mount_point=$(grep "/dev/mapper/${target}" /proc/mounts | cut -d' ' -f2)
+ if [ -z "${mount_point}" ] ; then
+ ewarn "Failed to find mount point for ${target}, skipping"
+ cryptfs_status=1
+ fi
+
+ if [ -n "${post_mount}" ] ; then
+ ebegin "Running post_mount commands for target ${target}"
+ eval "${post_mount}" >/dev/null
+ eend $? || cryptfs_status=1
+ fi
+}
+
+# Lookup optional bootparams
+get_bootparam_val() {
+ # We're given something like:
+ # foo=bar=cow
+ # Return the "bar=cow" part.
+ case $1 in
+ *\=*)
+ local key=$(echo "$1" | cut -f1 -d=)
+ echo "$1" | cut -c $(( ${#key} + 2 ))
+ ;;
+ esac
+}
+
+start() {
+ local header=true cryptfs_status=0
+ local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+ local x
+ for x in $(cat /proc/cmdline) ; do
+ case "${x}" in
+ key_timeout\=*)
+ local KEY_TIMEOUT=$(get_bootparam_val "${x}")
+ if [ ${KEY_TIMEOUT} -gt 0 ] ; then
+ read_timeout="-t ${KEY_TIMEOUT}"
+ fi
+ ;;
+ esac
+ done
+
+ while read -u 3 targetline ; do
+ case ${targetline} in
+ # skip comments and blank lines
+ ""|"#"*) continue ;;
+ # skip service-specific openrc configs #377927
+ rc_*) continue ;;
+ esac
+
+ ${header} && ebegin "Setting up dm-crypt mappings"
+ header=false
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [ -z "${target}${swap}" ] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ dmcrypt_max_timeout=*)
+ # ignore global options
+ continue
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in ${conf_file}: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute_xxx
+ eval "${targetline}"
+ done 3< ${conf_file}
+
+ # If we have a target queued up, then execute it
+ ${execute_hook}
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+}
+
+stop() {
+ local line header
+
+ # Break down all mappings
+ header=true
+ egrep "^(target|swap)=" ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Removing dm-crypt mappings"
+ header=false
+
+ target= swap=
+ eval ${line}
+
+ [ -n "${swap}" ] && target=${swap}
+ if [ -z "${target}" ] ; then
+ ewarn "invalid line in ${conf_file}: ${line}"
+ continue
+ fi
+
+ ebegin " ${target}"
+ cryptsetup remove ${target}
+ eend $?
+ done
+
+ # Break down loop devices
+ header=true
+ grep '^source=./dev/loop' ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Detaching dm-crypt loop devices"
+ header=false
+
+ source=
+ eval ${line}
+
+ ebegin " ${source}"
+ losetup -d "${source}"
+ eend $?
+ done
+
+ return 0
+}
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
new file mode 100644
index 00000000..7a1c3009
--- /dev/null
+++ b/sys-fs/lvm2/Manifest
@@ -0,0 +1,40 @@
+AUX 1.02.22-dmeventd.initd 536 SHA256 c9dcee15ce55961e5df7928c350ae1c6db6e78c30d87f7fafa6ba4b016dd9191 SHA512 6f5e1ff94c4a89224f30d76821820e8e08952c929418892be623afc8b57cbc2f4e78dc2a293e74ef4fbcc0cdd49ac986cf76eff689f0280c4b3d0c8b96483f0c WHIRLPOOL 0a4647eb42798f0281704a50fc4cf1b0e2e90f11bca2362ee67c8ee50971b4743881e049520519038271b8fd7d6f150ded942832f20cc3705f1d491f71810745
+AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
+AUX clvmd.rc-2.02.39 3682 SHA256 d60d88202589899e0856ac819cef1599103b7d5dc412afe5e0e38fc224aa79a8 SHA512 44779152b23ad21db054faf216daef9a17fbdf120cb064743d7eeff8a6a6686482b23d298c40f5569ca4ca3dfce9baa6bfc5f95b6730c12a46938253a9ec400d WHIRLPOOL 2081217dd77acae5b286eb4b7790cc0400cb8b90ae055f7ce5d8f8e9b44a970d5393dc98c9f8744cfbd8bb12047d9258774c16ec8250576d25fb5458b1dd2b2f
+AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
+AUX device-mapper.rc-1.02.51-r2 701 SHA256 dfdff0739dad521087ffa20f06e274bbc666e0ab85779621c360c04728e3cf58 SHA512 6b5c6dd96c1ec600969f39f2f90b1e2866be658a33383e6de1b6c9f81f5bcf6a4725b33ed0a5ba41de49ce5f3c970a328465e2f884502a9657c24fd2f563aff9 WHIRLPOOL 2474065a4a4ceb1747545146361536d7a0ca2eeb526856860c4ab150eebad092770e9aec5a9bd1bdf821b65b8a1d33111e44764a0a11633be7b8cb803829c115
+AUX device-mapper.rc-2.02.67-r1 841 SHA256 18be4a227c786a8cdbbb0fb0f6da295db55359b91884b4d4e0e9976b80aa4003 SHA512 207853b607b25d07ec8c8421a44e1b663cd8ed2bea8179728c96b54778bebf372871e94b1a86a9f84ad31297660e5aa871bc7b925b83429a5978d966341f5bd5 WHIRLPOOL c4cc35d3d4998de5a3a3184d64bf5997c84f9573c67c1bf85db3e8103ed2542a7d240c1aa6d4d2be08a26cca7088102e0187fd0e1b4bd46a84339f23c5adb598
+AUX device-mapper.rc-2.02.95-r2 2763 SHA256 1b3c74476c2f24dc5a297faaf8d0f65375fd867ef240f7eb48be0868039802a2 SHA512 5757bff476e118c6e880ae7e525600fc8eeb6f68ad965e175e6f9ad7e9cea5698c74b056bc0caadeaecebec20623dcf01a1ea45230bc2f600d3cd19902408005 WHIRLPOOL 4d8b1e12acf9f8f8bdd0b23f13efdd76402e3406791a153a18c66050e28d68e45738b56f8e2135b0fc63b129b025cad32b70b9c50c34b3cdb1300ea86ad9c193
+AUX dm-start.sh 2114 SHA256 c064c3e2a1d128a6326b539a675f1a6cf88b75f5526222e232d53ea1468a9bcf SHA512 cd38c155e953a2c462bc76aeda349c579bfebd3ed1f33b3440585ef0c730fb40f3b13a1b335e558b9f2005551ea45426eea749cc1182f64e3cee1065e8550376 WHIRLPOOL ced2896b64b6b9c744ffc1f92195f3c2ed7cde9eb885b193161ead57d707d21ffb1ea3004bf1618cd2f48ed931314272b934d294859301d4fefbae00133073e0
+AUX dmeventd.initd-2.02.67-r1 683 SHA256 84e157b1b99b9fddfc97ab95bc6d37bfa4378578458744447e9478ebe6fc821b SHA512 65e7676a65e142aec10dc3ae460b9eacdd4d46413baf80e3cb5e5151245961d4d334153fba72ea6f3f8a2319dbcca4a5f8a788f79ba526a430707b70e682bc39 WHIRLPOOL abc4f813d934b973a42cabf32d74564e153c34f1f3c5a6297e68c39143d299f4098dd08a593419e678fe50ea866551bb7c23b53583f4b0909b1dde23d388da0e
+AUX dmtab 416 SHA256 e2e22bbe13fb97ec9a68659daa275b1d22fd0a3fd21e76b1f4bfba504a8bd7b5 SHA512 392b4bd85745bc774245195a1c416ae68efbe5f7b2498f6bfc40021cd2c9f6372fd1c3d346198c7749635b5d9b3f66ba1b963a2e144b4f522d87016ab4777de2 WHIRLPOOL f48c0fda382c7d57bad2ad4a8155189735236d13f24f39b3969736c3ad54d28f92c82174cae5c6775f8bc58506f19025f2cba6433f389c84505552fc8b4d3ed4
+AUX lvm-monitoring.initd-2.02.67-r2 1181 SHA256 83291ac20f7d7de07a6fd4452ce46e4bd75dc55c826c4305049d33a7b34a30da SHA512 c41daeb748ecf5b4b2857727bb99f88a58beaf364604f83c4245e0fea9705a7f0a6695f3c1f961c4fa1d5f7b743427db136dc2c1c24d45bbfe71159e5463f320 WHIRLPOOL 31968d1f5d63950c6e6ed5d1ba6efb05fa191a3d7ca843fd665de0f5e4f32f42ebbdb689e5215b8cfb8fddf6644b8a8f7aae50535a6b43d1acbb3300c707117b
+AUX lvm.conf-2.02.67.patch 1676 SHA256 0d36c4de0503739d822b3103a62dc0110febc3c56cd25d04443b30f54da6d0cb SHA512 59cb4a4625a7a18ec81b10f4b70a1632cf608d30b1fd827cc7a97692ab3cbbe2e0108001952f5002f1ffe6b354be7b96430e5ce86ed183885afdd1b5f0aa76e4 WHIRLPOOL 71c42b80f390de73b116dbe4808b44559196175465126393128b87826248ac5a34d79c4f64647d6b4541288ae4d25669168120ce8889deb08bfb7919dde249ed
+AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
+AUX lvm.rc-2.02.51-r2 792 SHA256 b883e8ae1d3b9d8a0bdf85b009125e9408ee6d22a159b2e4c340fce455d5fd9f SHA512 da565deba09873acd962cbe4d1e18b6f685c00734404236f599eee4368e3cd73ca365af3680e2c4b8c3847deed8d001e3019b6cc116d93efb0171fc8c5740ebb WHIRLPOOL f496128dd7bcde8f711d4e3966b345390201bc0ab8b7420810ba29d40243568968250f23418da13919e5b7a5c23cd4279062db3c9d1582945daf768696be9d58
+AUX lvm.rc-2.02.67-r1 918 SHA256 63e8e9cbfbed5124d31b365f0e8108822847ceb381143c9529d9bf5439f2a99a SHA512 b0429dc519300ee385c31309d055b7ac96e633bfbf1038be68018f67182de08c23e13e03fb567eaa68d48c9481f45853283d5a10502cece8e0629329059915bc WHIRLPOOL 1713f7108d42d8c2e60d4675cb503bfe84ad9bb40e84390e3a8463db91b8f133e4dc6b8d23c3e2156c7bf114b3a94154c0fc277d1a7242f389ef69b0ea9ca4da
+AUX lvm.rc-2.02.95-r2 2999 SHA256 8f088a15453ec56f96daf44a72f26022b817e14ad1d00514c1fa48b810cac9bb SHA512 cd68d6b42cdd48dc7439329746da3c2c6dc86763a35f6c7dab712c4985a1f434ee3eb219e5f60717d93a99a3e8266a6f3a1d5713c911010db437a97f0c340958 WHIRLPOOL d4b6824037384743a19c6a5ec17c75065890fb0d441d584ef2e873eb4a07a2d4def7ebcfc4dcfea8323b90f3196e05a84f3ee0766ba5c974b1e76d16693f93c4
+AUX lvm2-2.02.56-lvm2create_initrd.patch 2032 SHA256 b892d0544e05350e78ea400c16e6fd3657671d9bdf50bfae70505fd79bdda081 SHA512 b2a1705fa6b962027ebc5047583547489afe8ef8d8977c6284a28d0a8b0e05e20e6c48bd6c02a8bb02de9cfb40ac2d6e2a4b8ed8ef8c4ae7b6ea9a29bc4194de WHIRLPOOL cb533df528be0aae4bf50966285ef7a238f810d955ee86d5b446f43944d093732eff6ef8178d1654c4a2c075049ffc11994a99de6291bab1140cb8812be8b8a0
+AUX lvm2-2.02.63-always-make-static-libdm.patch 1420 SHA256 1c498b5efce77ed16bbbfcd9e0ec6da404a9c70c7ad0959ed7b60733adfcfc21 SHA512 67735af9e51369d5b3b400cab4f9ffa25f8dea1c1ec3d01855cb3c5aeade5c39a35eeed43f3a665204fe6bbba4ca43baecd845330bf26d023064b94ca3d1317c WHIRLPOOL f273c893acedfd658e7947abb5f4b528f15de9808ae3862ec8a9189ba7de4ea6998dc67dbc7af642ca3a27bba2ef8eabfd48337f532145f88500988f564313b1
+AUX lvm2-2.02.64-dmeventd-libs.patch 618 SHA256 1b8c281212b3c7edf456b38679c2c7ed838dd55789125c11cde691c2ccf62ace SHA512 d6a9ad131d84ff884bbfecd91b8e620eff88add838ed91628e9b75fb03d614b08a03efb8da28ae95bb9a86383a366add6f165e71b5a52a878783cdce7b6e788e WHIRLPOOL 54e82f40cd7cc665ac859ecf75fc780995bf635a69a33d5b364200544ef4fae661ef03fae2be3d68b572d115d61102a143ff86bab300dbc6666fae7dec383e3b
+AUX lvm2-2.02.67-createinitrd.patch 660 SHA256 d59f5642fff9d9575227bfd0b3d103d928a6f7b08b417d6c458704171f11da39 SHA512 17fbba5d34ece5c1c25ef35fa3bbc3d6fcd20b44bd766c049bbc120853a8d60c9544db5790645a7814db5c272fd12d383699a8a9be6f4e9c56a7c0a1bb29ade2 WHIRLPOOL b358a31a9ee669a4fccf42280da5342c214932bfd83deee92d41351eb37dc6c0b2e5dc7419f2304128b5d285fed92db5b2e1634a71bbf1310d36b54d1a353bb0
+AUX lvm2-2.02.70-asneeded.patch 326 SHA256 b0f84dadc213a9daaa97ae7815f624f0bcdc883d627659c7fcf8b7131538b43e SHA512 e38d8ef5d13c8861f7d1ca5c16271b3da138e8747ba01442de3f55aab45265fdaf42513e596f5af1d024fa2cf0c959bd3e47da52bbe8b13c75e665dd95f81279 WHIRLPOOL 77143f2dafeca221f8b3cda4df1669111de44a4ae4916d9aa2228aa76d94b4d1c556cf90a6f90cae2f1938f7474fb678ec6eab1b4e57f7fd20eab473de667cda
+AUX lvm2-2.02.70-locale-muck.patch 477 SHA256 95d92e13ca1c926ff6da2b10bf12da63555a21463bb2f8118c722a7394ca5e13 SHA512 c3c702e7271e212c881a9d60577fc271fd58db21b8dbde96a06ecfd561cfcc90dfec55c00526d012f7a0a51cb6b1e8b70d54030050736de88ea00c26bc57ba5c WHIRLPOOL d9e658155a60b64216aa9af713c5486472297eedd42ac6b63055c21feb58246d350ec5994dc9ac98cd9d72babac869425a8a6b3767f5eb865db8a2356b9a610f
+AUX lvm2-2.02.72-dynamic-static-ldflags.patch 2912 SHA256 536f57d7860ea078a4cc7f025d86c3b37befe2db9df7802d58b506bbeefa79d8 SHA512 b9b9ade3417e355566b090f0f2766d297cd3a8ab85cd62be5ca2e155b980fdd2d9f3829ffcbca8c8293bd2484f3d28aaa733b45d0874e336093eda5d3a1101c4 WHIRLPOOL 3d84876df5d8c4533c53d42589e7702bacdbbbdc15ac8df1fc35e931829de5d48e51750deb15bc5a90a065077dcfa7cef896336a444b6796019e9f76caee7a54
+AUX lvm2-2.02.73-asneeded.patch 640 SHA256 f17df1abf6e36b7383b460eafa472f4395bc6bccee46c22c655a3381bd2ad306 SHA512 cc716520450f1e95f0fea13e50884d703ad40dafdcd27a6cdff4188207b8239abed9d2504e1b52e7a18a71a235814881d514b2a67d866f320e9653ac8b1cc305 WHIRLPOOL 2394ee68b57611385b49c911b9002df27a0f226e4f5db9675440f91feffe73a3577298c571a34a970f9616e31c82bde3830dde59b7a52c2f9febce02cc33f34d
+AUX lvm2-2.02.73-locale-muck.patch 605 SHA256 7e888d9c5dc9944c933ffd03755310bda48b5abcd686ec9c45fe852caa06d88f SHA512 be4230d771414fe63d276ff387f34b2b4c2fdce4a5332a41671e39bb77673d5d90898cabc05befd978d6d964c6a9a15f0daaae5e29c7e8b0ef0f7b156920a729 WHIRLPOOL 6c42e264b711fba4d9d3be80d427ad817a3d9fc377f81ce7b7ec26da11afe22d6130507113d99ce75b02de3b05011eaddc9741eb3032821f65b6f2e3f690abf5
+AUX lvm2-2.02.84-udev-pkgconfig.patch 1027 SHA256 62af214b1926b31205988dbed7ae7e7f2db825648e73eaed708042a9741edb95 SHA512 310acf1ba514a1b715880a8bb6ac6241f497b95dd4fa8b194773600372a6f46caaf29c897fad89e763c1fead13da7a83c13bc8a870a8ce367c28e5992493cfd7 WHIRLPOOL 426d078f118dcaed3d1da18fb726dd223eeb593386d2315708cfbe9b8b4b67b54832ea6f764724dcdb5400168ea1dabf59f25f9ae74a05a1a0d69741b7f5e581
+AUX lvm2-2.02.88-respect-cc.patch 467 SHA256 a19e1049fc6da2b9feb0898360a86ea3aab715329e294376b0b5fc2e11fc41f0 SHA512 e5224f4826dc1d475519719588a683cbb94d49c5449b22698f52cf7735c2b6a0f758e7a591851a01f3e7065a7adb43232370b25ba26127b75ca6280d0befe36e WHIRLPOOL fb2b1d66fa5af0a177561fc51ec447f550873c220f6344a9e705a4a425f547962eb780266bbc178220ba00a015f4311ca775e9751433fab1739c10a62b3124c1
+AUX lvm2-2.02.92-dynamic-static-ldflags.patch 3031 SHA256 90b880572186d4d1abf049d39e5f11e4cfedb3707c29eeb9740ceccdb3b62468 SHA512 edb78081d12bebaccd31c2474cb531563b729f1ad966afaff7892556177ee7a68217cc699c65383318066139ba62183adc8334f46f8f8933d62b6b5dcd11a023 WHIRLPOOL 6880a29dfb6747f167c41506e1472c0d48ef7af3a545238c733949f85f3f8f36110fb6908c6f626260f7ed975e56a4e8ccf42ece4d758fa3570154cbe970f2a3
+AUX lvm2-2.02.92-locale-muck.patch 570 SHA256 3b24abd3c1254de1727a91b6ade26c36dc8dbee8ecbfab4bf6afbad21fdd59ff SHA512 2496cd39b06a69441dc7fe223eab4da25ca76e9f79be85d0f162dba784c3a86afaf430a366dac83354e07dcf07a486d5abee2bb4c677a84c13bd22998cfdfd39 WHIRLPOOL ed28aa549983fb9c1b1e1fe17bf2eca624dec43400fe1c8b67b00e010c3d745ec5f29479e7b4bed67ac2d4d1d6237df91eba7318e33d5e592893f76b17e9074a
+AUX lvm2-2.02.95-lvmpath.patch 1247 SHA256 48d65570cbf86dcf749a0e77a1c57e26170ee90ddb8d8800988eab451f402456 SHA512 92b104476911882d0dae97251942a0dbf6c58d6d5c5af77e74b3e41de95a155966392fb539affef3de6def107168b436c54e5ee000bdff0c4701748481940eb4 WHIRLPOOL 26d00f35cdd4a0bbdabdda0a5a69956e7c7ed90dd3e774cfac46c4eb0e339a09e03dcd617b49863a550e79c72d327b3007ffa17ecd27750bf3a759058c4c9e7e
+AUX lvm2-2.02.95-udev185.patch 6792 SHA256 3067d45a2829f94b9c5f7f5d38cceb2c36bdf181417aaab7d45e359df501099f SHA512 2296344ca2746f71a12874723b2bbed218bd3114144329b3f0d0910512bd61d85b81d2e72fbb0e27d6c618fcb93be6ac05c95d32c3972a3df55357d004d7e713 WHIRLPOOL b7d971f7818384572c9307f828360d2faf395f949832560bbeeb647da7e0ebba6f4cca5dc2a40080e9ad440f8a6ca193076794e5be4d927ed40efa214e0e37c2
+AUX lvm2-start.sh 1025 SHA256 8c7da13b6326a383888110b25f53a4902cbec7d0dace274b9c5f1d6b0a775039 SHA512 8f89b550f5220b0b0f9f2ac24b0a76b9beee0acaf2eff1b9c6d28287498d7255cce8f1cdabfdfdbebfd35159f251ce8b45fca50f1798b3facdf7915b4724329b WHIRLPOOL 131de6e639f2bd17e3ef7a10e2349451ada1e24db17955cb69d67c816471a0f6ef6c933acb87507f0f6e8d98ab3dda54c047c68cd35f0afd25abf744f24d289f
+AUX lvm2-start.sh-2.02.49-r3 1244 SHA256 e9c72d8500294301131183b37a7060dbcbd1d01b2a3e8425cf644e07652fae87 SHA512 5e57db4f24584437262f76d1c7ea8753decca8c4b041ec2e0414d92a81ea04cff48fee48fa01b7a0d7d9bc97493cee32ce78da6348f3920704be64f9671bb5ec WHIRLPOOL d90452503560ff6e97235c34f2bba7cca96905a4f881cd3fd7aa47c5a191b2529596c944c95aa8d7472ef5d2d7ad4a21432ac702ce1094697d42219a20d671a7
+AUX lvm2-start.sh-2.02.67-r1 1267 SHA256 48def1f022a337df7cd030c0d1e386d843026814da5494dde5610aa66af94bd2 SHA512 0b60d5be19673927872b310b6825c5912dea55028b05668914856cb085fcf229fffc0089479b1e5bf346cc9e6f1c7f024634cafca5ebfbd0f431264455ddc4f4 WHIRLPOOL 59db10f46e56ef19824b0c43a92790a29a108648138137dfe40c3fa9673d2df3087d8852bae4843dbdc04db393d12fc318a7db186ce2e5ab039dde288c259516
+AUX lvm2-start.sh-2.02.95 1535 SHA256 46225f0703ac66b8a41b34c74a93060749386be1e8c13e74ec2785cdd38577b4 SHA512 7ab702a6d62e608e2427561338aa04257303ef13ba79ba90810925723512523cba66d14751b1585fdf47cdde9897143a2f3868992095bfa5fb3b7cd013383ba4 WHIRLPOOL 97626e6ae3a22daae3ee15f7bc854d012776a73b6971d1ed6ae184ea2a5c3a1106c759a752a128cc7592ec3cf3620487e75796e4e0041ed8bf6574eeda501a9c
+AUX lvm2-stop.sh 1939 SHA256 94a34e0b149ac43f5f1042c45ebdbaa69ac83bcbea7f894c15ab59aad65cb22c SHA512 f372d458b5bccbf872f7a8cc6759bde1c6aea90ba28b0a8a40b05084339e2bebf2d26431de8862cbb072e0b1e9970f393ac82fcda9437adfc75127ca2c76f97a WHIRLPOOL 74bd413264d8c6342b74d363ff1154e4c56b44526151869619f14d3c9952e2b870673676ad23a11ea9fa2ae0034c677897a3d859ea58b269411703d3fc0ebf10
+AUX lvm2-stop.sh-2.02.49-r3 2253 SHA256 dea23f37d232437b15c743ca23af3d7baa95f2b7c71ac1e47ae5289bdcfe0a56 SHA512 909eae8d09157a7227c4240bb9d0a3d2a56347b8926a2209b3d778d6c4f709c94fec8d966839ea8ac4fcb0f2fed8ae4349bcb6b9d487ec83116b83123fff7979 WHIRLPOOL 057ea018b83f8480407cbbbc0b60ed17dcb84644476382f8a79dec9f08caea6f5a103d21389a12697927b205f91b3168db5db65596c5e86cd130482b78d6d489
+AUX lvm2-stop.sh-2.02.67-r1 964 SHA256 5a208c7ab780404e476afdff349deedad5c57b3feb7e22a07a7075d09c1370e7 SHA512 af58f625423ea96a0b10c27a0222dd960614985f7fd11d681ffdb0151954b8bbec05643ba5addf371556ca7a6fa6fa68d70fdc7aec7b223a71d53dc95a8ef34b WHIRLPOOL 1163be1b762b56c227ff41367fc188fe6c54455a3607059f717ebfdb099a12fdb8cd5c44e3c0cc03af2f3600d2fc2801b86f7330af90dd17515a0cce0a5fd173
+DIST LVM2.2.02.88.tgz 1029151 SHA256 a129d1d3949524da7d6d2a67218254baea02df06a6744faa5808a4182b2fb432 SHA512 5c334c2c78220f4f9f082a74cbf0b156e96f2a07b5e55f054ff70c752ada97a67f83fa1d89c02accb7cbe5a62e356588831d96a102b7bf16cdce2591d4e37e4b WHIRLPOOL b30a1f2403e71ff6fb381ec82291018632e1d10258dd615efae4e39077a304a66271013247793390f57c26886599d8bad8f4b896d230f3e4f846e74c12282f71
+EBUILD lvm2-2.02.88.ebuild 8083 SHA256 81d93c2baeefd0c6ed0314537f6bee57c24d823ec149230688b8f0e22dbf1889 SHA512 1430293b9ccadb81e2d504ced9fcb27e108ebffa0318df89e24bdc7720bf4033883dfd23190dfc5bd58265a4c6e18f0710eb5112b2fc57d81a61d9d60b8ad4cf WHIRLPOOL 1f41a5c25d326e18045ac1b3204ca9f725f16c4ac567b82e2068f12351a0c8c7494c5442ec570cb1599c7c7484d520aac92e917055eda432631a025385a4d7c0
diff --git a/sys-fs/lvm2/files/1.02.22-dmeventd.initd b/sys-fs/lvm2/files/1.02.22-dmeventd.initd
new file mode 100644
index 00000000..f29da2e3
--- /dev/null
+++ b/sys-fs/lvm2/files/1.02.22-dmeventd.initd
@@ -0,0 +1,21 @@
+#!/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/1.02.22-dmeventd.initd,v 1.1 2009/04/09 23:00:10 caleb Exp $
+
+depend() {
+ before 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/clvmd.confd-2.02.39 b/sys-fs/lvm2/files/clvmd.confd-2.02.39
new file mode 100644
index 00000000..57821709
--- /dev/null
+++ b/sys-fs/lvm2/files/clvmd.confd-2.02.39
@@ -0,0 +1,9 @@
+# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum.
+
+CLVMD_CLUSTER_TIMEOUT=30
+
+
+# CLVMD_NODES_TIMEOUT -- amount of time to wait for the other nodes to
+# join the cluster.
+
+CLVMD_NODES_TIMEOUT=60
diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
new file mode 100755
index 00000000..764aeabc
--- /dev/null
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -0,0 +1,146 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/clvmd.rc-2.02.39,v 1.2 2010/05/01 21:26:32 robbat2 Exp $
+
+[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
+
+[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30
+[ -n "$CLVMD_NODES_TIMEOUT" ] || CLVMD_NODES_TIMEOUT=60
+
+VGCHANGE="/sbin/vgchange"
+VGSCAN="/sbin/vgscan"
+VGDISPLAY="/sbin/vgdisplay"
+CLVMD_PIDFILE="/var/run/clvmd.pid"
+
+depend() {
+ use net dns logger dmeventd
+ need cman
+}
+
+load_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Loading ${module} kernel module"
+ modprobe ${module}
+ eend $? "Failed to load ${module} kernel module"
+ done
+}
+
+unload_modules() {
+ local module modules
+ modules=$1
+
+ for module in ${modules}; do
+ ebegin "Unloading ${module} kernel module"
+ modprobe -r ${module}
+ eend $? "Failed to unload ${module} kernel module"
+ done
+}
+
+umount_gfs_filesystems() {
+ local sig retry
+ local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+
+ if [ -n "${remaining}" ]
+ then
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+}
+
+
+start_volumes() {
+ ebegin "Scanning LVM volumes"
+ $VGSCAN > /dev/null 2>&1
+ eend $?
+
+ ret=$?
+ if [ "$ret" -eq 5 ]
+ then
+ einfo " Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
+ fi
+
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Activating Clustered VG: ${vg} "
+
+ wait=0
+ while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
+ if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
+ sleep 3
+ wait=$(($wait + 3))
+ else
+ eend 1
+ fi
+ done
+ eend 0
+ done
+}
+
+stop_volumes() {
+ # Deactivate only clustered volumes
+ clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
+ for vg in $clustervgs; do
+ ebegin " Shutting Down Clustered VG: ${vg} "
+ $VGCHANGE -anl ${vg} >/dev/null
+ eend $?
+ done
+}
+
+
+start() {
+ local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
+
+ if [ -z "${module}" ]; then
+ load_modules "dm-mod"
+ sleep 1s
+ fi
+
+ ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
+
+ start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
+ eend $?
+
+ start_volumes
+}
+
+stop() {
+
+ # umount GFS filesystems
+ umount_gfs_filesystems
+
+ #stop_volumes
+
+ ebegin "Stopping clvmd"
+ #start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
+ killall -TERM ${CLVMD_BIN} >/dev/null
+ eend $?
+
+ #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
+
+ #if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
+ # unload_modules "dm-mod"
+ #fi
+}
diff --git a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
new file mode 100644
index 00000000..bc7a2515
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
@@ -0,0 +1 @@
+RC_AFTER="lvm"
diff --git a/sys-fs/lvm2/files/device-mapper.rc-1.02.51-r2 b/sys-fs/lvm2/files/device-mapper.rc-1.02.51-r2
new file mode 100644
index 00000000..9eb3d3cc
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.rc-1.02.51-r2
@@ -0,0 +1,28 @@
+#!/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-1.02.51-r2,v 1.2 2010/05/01 21:26:33 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
+ after 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/device-mapper.rc-2.02.67-r1 b/sys-fs/lvm2/files/device-mapper.rc-2.02.67-r1
new file mode 100644
index 00000000..1cb0f4da
--- /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/device-mapper.rc-2.02.95-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
new file mode 100644
index 00000000..404c269b
--- /dev/null
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
@@ -0,0 +1,111 @@
+#!/sbin/runscript
+# Copyright 1999-2012 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.95-r2,v 1.1 2012/05/27 07:05:22 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
+ before dmeventd checkfs fsck
+ after modules
+}
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+# char **get_new_dm_volumes(void)
+#
+# Return dmsetup commands to setup volumes
+get_new_dm_volumes() {
+ local volume params
+
+ # Filter comments and blank lines
+ grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ while read volume params ; do
+ # If it exists, skip it
+ dmvolume_exists "${volume%:}" && continue
+ # Assemble the command to run to create volume
+ echo "echo ${params} | /sbin/dmsetup create ${volume%:}"
+ done
+
+ return 0
+}
+
+# int dmvolume_exists(volume)
+#
+# Return true if volume exists in DM table
+dmvolume_exists() {
+ local x line volume=$1
+
+ [ -z "${volume}" ] && return 1
+
+ /sbin/dmsetup ls 2>/dev/null | \
+ while read line ; do
+ for x in ${line} ; do
+ # the following conditonal return only breaks out
+ # of the while loop, as it is running in a pipe.
+ [ "${x}" = "${volume}" ] && return 1
+ # We only want to check the volume name
+ break
+ done
+ done
+
+ # if 1 was returned from the above loop, then indicate that
+ # volume exists
+ [ $? = 1 ] && return 0
+
+ # otherwise the loop exited normally and the volume does not
+ # exist
+ return 1
+}
+
+# int is_empty_dm_volume(volume)
+#
+# Return true if the volume exists in DM table, but is empty/non-valid
+is_empty_dm_volume() {
+ local table volume=$1
+
+ set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
+ [ "${volume}" = "$1" -a -z "$2" ]
+}
+
+
+start() {
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ # Ensure the dirs exist for locking and running
+ checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
+
+ local x volume
+
+ if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+ [ -n "$(get_new_dm_volumes)" ] && \
+ einfo " Setting up device-mapper volumes:"
+
+ get_new_dm_volumes | \
+ while read x ; do
+ [ -n "${x}" ] || continue
+
+ volume="${x##* }"
+
+ ebegin " Creating volume: ${volume}"
+ if ! eval "${x}" >/dev/null 2>/dev/null ; then
+ eend 1 " Error creating volume: ${volume}"
+ # dmsetup still adds an empty volume in some cases,
+ # so lets remove it
+ is_empty_dm_volume "${volume}" && \
+ /sbin/dmsetup remove "${volume}" 2>/dev/null
+ else
+ eend 0
+ fi
+ done
+ fi
+}
+
diff --git a/sys-fs/lvm2/files/dm-start.sh b/sys-fs/lvm2/files/dm-start.sh
new file mode 100644
index 00000000..84acfa4a
--- /dev/null
+++ b/sys-fs/lvm2/files/dm-start.sh
@@ -0,0 +1,86 @@
+# /lib/rcscripts/addons/dm-start.sh: Setup DM volumes at boot
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/dm-start.sh,v 1.1 2009/04/09 23:00:10 caleb Exp $
+
+# char **get_new_dm_volumes(void)
+#
+# Return dmsetup commands to setup volumes
+get_new_dm_volumes() {
+ local volume params
+
+ # Filter comments and blank lines
+ grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
+ while read volume params ; do
+ # If it exists, skip it
+ dmvolume_exists "${volume%:}" && continue
+ # Assemble the command to run to create volume
+ echo "echo ${params} | /sbin/dmsetup create ${volume%:}"
+ done
+
+ return 0
+}
+
+# int dmvolume_exists(volume)
+#
+# Return true if volume exists in DM table
+dmvolume_exists() {
+ local x line volume=$1
+
+ [ -z "${volume}" ] && return 1
+
+ /sbin/dmsetup ls 2>/dev/null | \
+ while read line ; do
+ for x in ${line} ; do
+ # the following conditonal return only breaks out
+ # of the while loop, as it is running in a pipe.
+ [ "${x}" = "${volume}" ] && return 1
+ # We only want to check the volume name
+ break
+ done
+ done
+
+ # if 1 was returned from the above loop, then indicate that
+ # volume exists
+ [ $? = 1 ] && return 0
+
+ # otherwise the loop exited normally and the volume does not
+ # exist
+ return 1
+}
+
+# int is_empty_dm_volume(volume)
+#
+# Return true if the volume exists in DM table, but is empty/non-valid
+is_empty_dm_volume() {
+ local table volume=$1
+
+ set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
+ [ "${volume}" = "$1" -a -z "$2" ]
+}
+
+local x volume
+
+if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+ [ -n "$(get_new_dm_volumes)" ] && \
+ einfo " Setting up device-mapper volumes:"
+
+ get_new_dm_volumes | \
+ while read x ; do
+ [ -n "${x}" ] || continue
+
+ volume="${x##* }"
+
+ ebegin " Creating volume: ${volume}"
+ if ! eval "${x}" >/dev/null 2>/dev/null ; then
+ eend 1 " Error creating volume: ${volume}"
+ # dmsetup still adds an empty volume in some cases,
+ # so lets remove it
+ is_empty_dm_volume "${volume}" && \
+ /sbin/dmsetup remove "${volume}" 2>/dev/null
+ else
+ eend 0
+ fi
+ done
+fi
+
+
+# vim:ts=4
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 00000000..1b8ebe60
--- /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/dmtab b/sys-fs/lvm2/files/dmtab
new file mode 100644
index 00000000..5fc1d793
--- /dev/null
+++ b/sys-fs/lvm2/files/dmtab
@@ -0,0 +1,12 @@
+#/etc/dmraid: config file for adding device-mapper volumes at boot
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/dmtab,v 1.1 2009/04/09 23:00:10 caleb Exp $
+
+# Format: <volume name>: <table>
+# Example: isw0: 0 312602976 striped 2 128 /dev/sda 0 /dev/sdb 0
+#
+# Alternatively you can create all your volumes the first time, and just run:
+#
+# dmsetup table >> /etc/dmtab
+#
+# and verify that they are correct.
+
diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
new file mode 100644
index 00000000..0b67f331
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2,v 1.3 2010/08/20 19:18:29 robbat2 Exp $
+
+# This script is based on upstream file
+# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
+
+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
+ need lvm dmeventd
+}
+
+VGCHANGE=/sbin/vgchange
+VGS=/sbin/vgs
+
+start() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
+ for vg in $VGSLIST
+ do
+ ebegin "Starting LVM monitoring for VG $vg:"
+ $VGCHANGE --monitor y --poll y $vg
+ ret2=$?
+ eend $ret2
+ [ $ret2 -ne 0 ] && ret=$ret2
+ done
+ return $ret
+}
+
+stop() {
+ ret=0
+ # TODO do we want to separate out already active groups only?
+ VGSLIST=`$VGS --noheadings -o name 2> /dev/null`
+ for vg in $VGSLIST
+ do
+ ebegin "Stopping LVM monitoring for VG $vg:"
+ $VGCHANGE --monitor n $vg
+ ret2=$?
+ eend $ret2
+ [ $ret2 -ne 0 ] && ret=$ret2
+ done
+ return $ret
+}
diff --git a/sys-fs/lvm2/files/lvm.conf-2.02.67.patch b/sys-fs/lvm2/files/lvm.conf-2.02.67.patch
new file mode 100644
index 00000000..547963c7
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.conf-2.02.67.patch
@@ -0,0 +1,48 @@
+diff -Nuar LVM2.2.02.67.orig//doc/example.conf.in LVM2.2.02.67//doc/example.conf.in
+--- LVM2.2.02.67.orig//doc/example.conf.in 2010-05-20 13:47:21.000000000 +0000
++++ LVM2.2.02.67//doc/example.conf.in 2010-06-07 18:43:34.099693472 +0000
+@@ -50,7 +50,9 @@
+
+
+ # By default we accept every block device:
+- filter = [ "a/.*/" ]
++ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++ # noise when you probed while not available.
++ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
+
+ # Exclude the cdrom drive
+ # filter = [ "r|/dev/cdrom|" ]
+@@ -259,6 +261,8 @@
+ # the new lvm2 on-disk metadata format.
+ # The default value is set when the tools are built.
+ # fallback_to_lvm1 = 0
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # The default metadata format that commands should use - "lvm1" or "lvm2".
+ # The command line override is -M1 or -M2.
+@@ -449,12 +453,12 @@
+
+ # Metadata settings
+ #
+-# metadata {
++metadata {
+ # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
+ # You might want to override it from the command line with 0
+ # when running pvcreate on new PVs which are to be added to large VGs.
+-
+- # pvmetadatacopies = 1
++ # Gentoo: enable for data safety, but PV resize is then disabled.
++ #pvmetadatacopies = 2
+
+ # Approximate default size of on-disk metadata areas in sectors.
+ # You should increase this if you have large volume groups or
+@@ -476,7 +480,7 @@
+ # the supplied toolset to make changes (e.g. vgcfgrestore).
+
+ # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
+-#}
++}
+
+ # Event daemon
+ #
diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.28-r2 b/sys-fs/lvm2/files/lvm.confd-2.02.28-r2
new file mode 100644
index 00000000..2fbd8668
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.confd-2.02.28-r2
@@ -0,0 +1,5 @@
+# LVM should normally only be started after mdraid is available
+# this is because LVM physical volumes are very often MD devices.
+RC_AFTER="mdraid"
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.51-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.51-r2
new file mode 100644
index 00000000..ca2084ee
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.51-r2
@@ -0,0 +1,38 @@
+#!/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.51-r2,v 1.2 2010/05/01 21:26:33 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
+ use dmeventd
+ after 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/lvm.rc-2.02.67-r1 b/sys-fs/lvm2/files/lvm.rc-2.02.67-r1
new file mode 100644
index 00000000..d4eafc18
--- /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/lvm.rc-2.02.95-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
new file mode 100644
index 00000000..a06aa0bb
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
@@ -0,0 +1,96 @@
+#!/sbin/runscript
+# Copyright 1999-2012 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.95-r2,v 1.1 2012/05/27 07:05:22 robbat2 Exp $
+
+depend() {
+ use dmeventd
+ before checkfs fsck
+ after dmeventd modules device-mapper
+}
+
+config='global { locking_dir = "/run/lock/lvm" }'
+
+dm_in_proc() {
+ local retval=0
+ for x in devices misc ; do
+ grep -qs 'device-mapper' /proc/${x}
+ retval=$((${retval} + $?))
+ done
+ return ${retval}
+}
+
+start() {
+ # 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
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+ if [ -z "${CDBOOT}" ] ; 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
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}pvscan\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgscan --mknodes\n"
+ # And turn them on!
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed to setup the LVM"
+ fi
+ fi
+}
+
+stop() {
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ if [ ! -x "$lvm_path" ]; then
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+ return 1
+ fi
+# 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=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
+
+ if [ "$VGS" ]
+ then
+ ebegin " Shutting Down LVs & VGs"
+ #still echo stderr for debugging
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ln\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed"
+ fi
+
+ einfo "Finished Shutting down the Logical Volume Manager"
+fi
+}
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
new file mode 100644
index 00000000..59aaa9b3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
@@ -0,0 +1,72 @@
+--- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000
++++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000
+@@ -54,7 +54,9 @@
+ DEVRAM=/tmp/initrd.$$
+
+ # set defaults
+-BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
++LVM=`which lvm.static`
++LVM=${LVM:-"`which lvm`"}
++BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
+ BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
+ BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
+ MAKEDEV=${MAKEDEV:-"debian"}
+@@ -119,6 +121,10 @@
+ echo "$PRE Mounting /proc"
+ mount -t proc none /proc
+
++# We need /sys for lvm
++echo "$PRE Mounting /sys"
++mount -t sysfs sysfs /sys
++
+ # plug in modules listed in /etc/modules
+ if [ -f /etc/modules ]; then
+ echo -n "$PRE plugging in kernel modules:"
+@@ -179,26 +185,29 @@
+ # run a shell if we're passed lvm2rescue on commandline
+ grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+- lvm vgchange --ignorelockingfailure -P -a y
++ $LVM vgchange --ignorelockingfailure -P -a y
+ do_shell
+ else
+- lvm vgchange --ignorelockingfailure -a y
++ $LVM vgchange --ignorelockingfailure -a y
+ fi
+
+ echo "$PRE Mounting root filesystem $rootvol ro"
+ mkdir /rootvol
+ if ! mount -t auto -o ro $rootvol /rootvol; then
+- echo "\t*FAILED*";
++ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
+ do_shell
+ fi
+
+ echo "$PRE Umounting /proc"
+ umount /proc
+
++echo "$PRE Umounting /sys"
++umount /sys
++
+ echo "$PRE Changing roots"
+ cd /rootvol
+ if ! pivot_root . initrd ; then
+- echo "\t*FAILED*"
++ echo "\t*FAILED PIVOT TO NEW ROOT*"
+ do_shell
+ fi
+
+@@ -356,7 +365,7 @@
+ fi
+
+ verbose "creating basic set of directories in $TMPMNT"
+-(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
++(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
+ if [ $? -ne 0 ]; then
+ echo "$cmd -- ERROR creating directories in $TMPMNT"
+ cleanup 1
+@@ -499,4 +508,3 @@
+ FINALTXT
+
+ cleanup 0
+-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
new file mode 100644
index 00000000..5ddcb4e5
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
@@ -0,0 +1,42 @@
+diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700
++++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700
+@@ -28,11 +28,12 @@
+ INSTALL_LIB_TARGETS = install_lib_dynamic
+
+ LIB_NAME = libdevmapper-event
++LIB_STATIC = $(LIB_NAME).a
++INSTALL_LIB_TARGETS += install_lib_static
++TARGETS += $(LIB_STATIC)
+ ifeq ("@STATIC_LINK@", "yes")
+- LIB_STATIC = $(LIB_NAME).a
+- TARGETS += $(LIB_STATIC) dmeventd.static
++ TARGETS += dmeventd.static
+ INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
+- INSTALL_LIB_TARGETS += install_lib_static
+ endif
+
+ LIB_VERSION = $(LIB_VERSION_DM)
+diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in
+--- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700
++++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700
+@@ -34,8 +34,8 @@
+
+ INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
+
+-ifeq ("@STATIC_LINK@", "yes")
+ LIB_STATIC = $(interface)/libdevmapper.a
++ifeq ("@STATIC_LINK@", "yes")
+ endif
+
+ LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
+@@ -63,8 +63,8 @@
+
+ INSTALL_TYPE = install_dynamic
+
+-ifeq ("@STATIC_LINK@", "yes")
+ INSTALL_TYPE += install_static
++ifeq ("@STATIC_LINK@", "yes")
+ endif
+
+ ifeq ("@PKGCONFIG@", "yes")
diff --git a/sys-fs/lvm2/files/lvm2-2.02.64-dmeventd-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.64-dmeventd-libs.patch
new file mode 100644
index 00000000..3a536399
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.64-dmeventd-libs.patch
@@ -0,0 +1,15 @@
+X-Gentoo-Bug: 318513
+X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=318513
+
+diff -ur LVM2.2.02.64/daemons/dmeventd/plugins/lvm2/Makefile.in LVM2.2.02.64.new/daemons/dmeventd/plugins/lvm2/Makefile.in
+--- LVM2.2.02.64/daemons/dmeventd/plugins/lvm2/Makefile.in 2010-04-09 23:42:49.000000000 +0200
++++ LVM2.2.02.64.new/daemons/dmeventd/plugins/lvm2/Makefile.in 2010-05-04 13:18:07.886389742 +0200
+@@ -24,7 +24,7 @@
+
+ include $(top_builddir)/make.tmpl
+
+-LIBS += @LVM2CMD_LIB@ -ldevmapper $(PTHREAD_LIBS)
++LIBS += @LVM2CMD_LIB@ -ldevmapper -ldevmapper-event $(PTHREAD_LIBS)
+
+ install_lvm2: install_lib_shared
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
new file mode 100644
index 00000000..7f0bfb89
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
@@ -0,0 +1,18 @@
+X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331
+X-Gentoo-Bug: 301331
+
+diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd
+--- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000
++++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000
+@@ -469,9 +469,9 @@
+ rmdir $TMPMNT/lost+found
+
+ echo "$cmd -- ummounting ram disk"
+-umount $DEVRAM
++umount $TMPMNT
+ if [ $? -ne 0 ]; then
+- echo "$cmd -- ERROR umounting $DEVRAM"
++ echo "$cmd -- ERROR umounting $TMPMNT"
+ cleanup 1
+ fi
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
new file mode 100644
index 00000000..7576e192
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/330255
+
+liblvm2app.so: undefined reference to `floor'
+
+--- liblvm/Makefile.in
++++ liblvm/Makefile.in
+@@ -39,7 +39,7 @@
+
+ include $(top_builddir)/make.tmpl
+
+-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
++LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -lm
+
+ ifeq ("@DMEVENTD@", "yes")
+ LIBS += -ldevmapper-event
diff --git a/sys-fs/lvm2/files/lvm2-2.02.70-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.70-locale-muck.patch
new file mode 100644
index 00000000..fcde672c
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.70-locale-muck.patch
@@ -0,0 +1,11 @@
+--- make.tmpl.in.orig 2010-08-04 10:10:17.000000000 +0300
++++ make.tmpl.in 2010-08-04 10:10:33.000000000 +0300
+@@ -360,7 +360,7 @@
+ ( cat $(srcdir)/.exported_symbols; \
+ if test x$(EXPORTED_HEADER) != x; then \
+ $(CC) -E -P $(EXPORTED_HEADER) | \
+- $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
++ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
+ fi \
+ ) > $@
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.72-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.72-dynamic-static-ldflags.patch
new file mode 100644
index 00000000..f1824b1a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.72-dynamic-static-ldflags.patch
@@ -0,0 +1,67 @@
+X-Gentoo-Bug: 332905
+X-Patch-URL: https://bugs.gentoo.org/attachment.cgi?id=243283&action=view
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=332905
+
+diff -ur LVM2.2.02.72.orig/configure.in LVM2.2.02.72/configure.in
+--- LVM2.2.02.72.orig/configure.in 2010-07-28 16:55:42.000000000 +0300
++++ LVM2.2.02.72/configure.in 2010-08-17 03:00:24.000000000 +0300
+@@ -35,6 +35,7 @@
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
+ LDDEPS="$LDDEPS .export.sym"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
++ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
+ LIB_SUFFIX=so
+ DEVMAPPER=yes
+ ODIRECT=yes
+@@ -1282,6 +1283,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(UDEV_LIBS)
+diff -ur LVM2.2.02.72.orig/daemons/dmeventd/Makefile.in LVM2.2.02.72/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.72.orig/daemons/dmeventd/Makefile.in 2010-05-14 16:36:56.000000000 +0300
++++ LVM2.2.02.72/daemons/dmeventd/Makefile.in 2010-08-17 03:00:24.000000000 +0300
+@@ -61,7 +61,7 @@
+ $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
+
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
+ dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
+
+ ifeq ("@PKGCONFIG@", "yes")
+diff -ur LVM2.2.02.72.orig/make.tmpl.in LVM2.2.02.72/make.tmpl.in
+--- LVM2.2.02.72.orig/make.tmpl.in 2010-07-20 17:38:44.000000000 +0300
++++ LVM2.2.02.72/make.tmpl.in 2010-08-17 03:00:24.000000000 +0300
+@@ -38,6 +38,7 @@
+ CLDFLAGS += @CLDFLAGS@
+ LDDEPS += @LDDEPS@
+ LDFLAGS += @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ LIB_SUFFIX = @LIB_SUFFIX@
+ LVMINTERNAL_LIBS = -llvm-internal $(DL_LIBS)
+ DL_LIBS = @DL_LIBS@
+diff -ur LVM2.2.02.72.orig/tools/Makefile.in LVM2.2.02.72/tools/Makefile.in
+--- LVM2.2.02.72.orig/tools/Makefile.in 2010-06-25 21:23:10.000000000 +0300
++++ LVM2.2.02.72/tools/Makefile.in 2010-08-17 03:01:07.000000000 +0300
+@@ -126,7 +126,7 @@
+ -o $@ dmsetup.o -ldevmapper $(LIBS)
+
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
+
+ all: device-mapper
+@@ -136,7 +136,7 @@
+ $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
+
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
+
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
diff --git a/sys-fs/lvm2/files/lvm2-2.02.73-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.73-asneeded.patch
new file mode 100644
index 00000000..ec0f7f6c
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.73-asneeded.patch
@@ -0,0 +1,15 @@
+Index: LVM2.2.02.73/tools/Makefile.in
+===================================================================
+--- LVM2.2.02.73.orig/tools/Makefile.in
++++ LVM2.2.02.73/tools/Makefile.in
+@@ -149,8 +149,8 @@ liblvm2cmd-static.a: $(top_builddir)/lib
+
+ liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS)
+ $(CC) -shared -Wl,-soname,$@.$(LIB_VERSION) \
+- $(CFLAGS) $(CLDFLAGS) -o $@ $(LVMLIBS) $(LIBS) \
+- @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@
++ $(CFLAGS) $(CLDFLAGS) -o $@ \
++ @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@ $(LVMLIBS) $(LIBS)
+
+ liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
+ $(LN_S) -f $< $@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.73-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.73-locale-muck.patch
new file mode 100644
index 00000000..f34c412f
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.73-locale-muck.patch
@@ -0,0 +1,12 @@
+diff -Nuar LVM2.2.02.73.orig//make.tmpl.in LVM2.2.02.73//make.tmpl.in
+--- LVM2.2.02.73.orig//make.tmpl.in 2010-08-16 17:49:26.000000000 +0000
++++ LVM2.2.02.73//make.tmpl.in 2010-08-20 19:20:43.237413988 +0000
+@@ -362,7 +362,7 @@
+ ( cat $(srcdir)/.exported_symbols; \
+ if test x$(EXPORTED_HEADER) != x; then \
+ $(CC) -E -P $(INCLUDES) $(DEFS) $(CFLAGS) $(EXPORTED_HEADER) | \
+- $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
++ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
+ fi \
+ ) > $@
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.84-udev-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.84-udev-pkgconfig.patch
new file mode 100644
index 00000000..d371ddd3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.84-udev-pkgconfig.patch
@@ -0,0 +1,25 @@
+diff -Nuar LVM2.2.02.84.orig/configure.in LVM2.2.02.84/configure.in
+--- LVM2.2.02.84.orig/configure.in 2011-02-04 22:17:54.000000000 +0000
++++ LVM2.2.02.84/configure.in 2011-04-09 23:42:27.134617541 +0000
+@@ -803,9 +803,18 @@
+ AC_MSG_RESULT($UDEV_SYNC)
+
+ if test x$UDEV_SYNC = xyes; then
+- AC_CHECK_LIB(udev, udev_queue_get_udev_is_active,
+- [UDEV_PC="libudev"; UDEV_LIBS="-ludev"],
+- [AC_MSG_ERROR([bailing out... libudev library is required])])
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(UDEV, libudev, [UDEV_PC="libudev" HAVE_UDEV=yes],
++ [NOTFOUND=0
++ AC_CHECK_HEADERS(libudev.h,,$bailout)
++ check_lib_no_libs udev udev_queue_get_udev_is_active
++ if test $NOTFOUND = 0; then
++ AC_CHECK_LIB(udev, udev_queue_get_udev_is_active,
++ [UDEV_PC="libudev"; UDEV_LIBS="-ludev"],
++ [AC_MSG_ERROR([bailing out... libudev library is required])])
++ fi])
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.88-respect-cc.patch b/sys-fs/lvm2/files/lvm2-2.02.88-respect-cc.patch
new file mode 100644
index 00000000..13d99ade
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.88-respect-cc.patch
@@ -0,0 +1,17 @@
+GNU make always defaults CC to "cc", so using "?=" with the CC variable
+will never override the internal make value. since @CC@ comes from the
+configure script, and that respects the $CC env var, don't bother trying
+to handle it in make too. it's not like we do this with any other build
+variable after all.
+
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -17,7 +17,7 @@
+
+ @SET_MAKE@
+
+-CC ?= @CC@
++CC = @CC@
+ RANLIB = @RANLIB@
+ INSTALL = @INSTALL@
+ MKDIR_P = @MKDIR_P@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
new file mode 100644
index 00000000..de2b294e
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
@@ -0,0 +1,63 @@
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/configure.in LVM2.2.02.92/configure.in
+--- LVM2.2.02.92.orig/configure.in 2012-02-20 11:36:27.000000000 -0800
++++ LVM2.2.02.92/configure.in 2012-02-20 15:53:40.700124222 -0800
+@@ -32,6 +32,7 @@
+ COPTIMISE_FLAG="-O2"
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ ELDFLAGS="-Wl,--export-dynamic"
++ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
+ # FIXME Generate list and use --dynamic-list=.dlopen.sym
+ CLDWHOLEARCHIVE="-Wl,-whole-archive"
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
+@@ -1458,6 +1459,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(THIN)
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in LVM2.2.02.92/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in 2012-02-20 15:48:04.861683196 -0800
++++ LVM2.2.02.92/daemons/dmeventd/Makefile.in 2012-02-20 15:52:50.732314588 -0800
+@@ -65,7 +65,7 @@
+ $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
+
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
+ dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
+
+ ifeq ("@PKGCONFIG@", "yes")
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
+--- LVM2.2.02.92.orig/make.tmpl.in 2012-02-20 15:48:05.034685963 -0800
++++ LVM2.2.02.92/make.tmpl.in 2012-02-20 15:48:58.622550855 -0800
+@@ -38,6 +38,7 @@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+ LDFLAGS += @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ LIB_SUFFIX = @LIB_SUFFIX@
+ LVMINTERNAL_LIBS = -llvm-internal $(UDEV_LIBS) $(DL_LIBS)
+ DL_LIBS = @DL_LIBS@
+diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/tools/Makefile.in LVM2.2.02.92/tools/Makefile.in
+--- LVM2.2.02.92.orig/tools/Makefile.in 2011-11-14 13:30:36.000000000 -0800
++++ LVM2.2.02.92/tools/Makefile.in 2012-02-20 15:52:25.242901501 -0800
+@@ -126,7 +126,7 @@
+ -o $@ dmsetup.o -ldevmapper $(LIBS)
+
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
+
+ all: device-mapper
+@@ -136,7 +136,7 @@
+ $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
+
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
+ $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
+
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
diff --git a/sys-fs/lvm2/files/lvm2-2.02.92-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.92-locale-muck.patch
new file mode 100644
index 00000000..be9e66d0
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.92-locale-muck.patch
@@ -0,0 +1,12 @@
+diff -Nuar LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
+--- LVM2.2.02.92.orig/make.tmpl.in 2012-02-20 15:46:46.008422005 -0800
++++ LVM2.2.02.92/make.tmpl.in 2012-02-20 15:47:19.639959941 -0800
+@@ -382,7 +382,7 @@
+ ( cat $(srcdir)/.exported_symbols; \
+ if test x$(EXPORTED_HEADER) != x; then \
+ $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
+- $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
++ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ \*]\(\$(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
+ fi \
+ ) > $@
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.95-lvmpath.patch b/sys-fs/lvm2/files/lvm2-2.02.95-lvmpath.patch
new file mode 100644
index 00000000..7ed9794e
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.95-lvmpath.patch
@@ -0,0 +1,26 @@
+http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/udev/69-dm-lvm-metad.rules.diff?r1=1.3&r2=1.4&cvsroot=lvm2
+
+X-Gentoo-Bug: 409921
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409921
+
+===================================================================
+RCS file: /cvs/lvm2/LVM2/udev/69-dm-lvm-metad.rules,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- LVM2/udev/69-dm-lvm-metad.rules 2012/03/06 02:30:50 1.3
++++ LVM2/udev/69-dm-lvm-metad.rules 2012/03/12 08:59:55 1.4
+@@ -19,7 +19,12 @@
+ # Device-mapper devices are processed only on change event or on supported synthesized event.
+ KERNEL=="dm-[0-9]*", ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
+
++# Set proper sbin path, /sbin has higher priority than /usr/sbin.
++ENV{LVM_SBIN_PATH}="/sbin"
++TEST!="$env{LVM_SBIN_PATH}/lvm", ENV{LVM_SBIN_PATH}="/usr/sbin"
++TEST!="$env{LVM_SBIN_PATH}/lvm", GOTO="lvm_end"
++
+ # Only process devices already marked as a PV - this requires blkid to be called before.
+-ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="$env{DM_SBIN_PATH}/pvscan --cache --major $major --minor $minor"
++ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", RUN+="$env{LVM_SBIN_PATH}/lvm pvscan --cache --major $major --minor $minor"
+
+ LABEL="lvm_end"
diff --git a/sys-fs/lvm2/files/lvm2-2.02.95-udev185.patch b/sys-fs/lvm2/files/lvm2-2.02.95-udev185.patch
new file mode 100644
index 00000000..ba7e40de
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.95-udev185.patch
@@ -0,0 +1,208 @@
+From 06738cac051b671ed26bd137676713eab457b37f Mon Sep 17 00:00:00 2001
+From: Peter Rajnoha <prajnoha@redhat.com>
+Date: Tue, 29 May 2012 08:09:10 +0000
+Subject: [PATCH] Remove unsupported udev_get_dev_path libudev call used for checking udev dir.
+
+With latest changes in the udev, some deprecated functions were removed
+from libudev amongst which there was the "udev_get_dev_path" function
+we used to compare a device directory used in udev and directore set in
+libdevmapper. The "/dev" is hardcoded in udev now (udev version >= 183).
+
+Amongst other changes and from packager's point of view, it's also
+important to note that the libudev development library ("libudev-devel")
+could now be a part of the systemd development library ("systemd-devel")
+because of the udev + systemd merge.
+---
+ WHATS_NEW_DM | 1 +
+ lib/commands/toolcontext.c | 28 ++++++++++++++++------------
+ lib/misc/lvm-wrappers.c | 14 --------------
+ lib/misc/lvm-wrappers.h | 1 -
+ libdm/libdevmapper.h | 3 +++
+ tools/dmsetup.c | 30 ++++++++++++------------------
+ 6 files changed, 32 insertions(+), 45 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index 78f0801..cc23163 100644
+--- a/lib/commands/toolcontext.c
++++ b/lib/commands/toolcontext.c
+@@ -650,9 +650,9 @@ static int _init_dev_cache(struct cmd_context *cmd)
+ {
+ const struct dm_config_node *cn;
+ const struct dm_config_value *cv;
+- size_t uninitialized_var(udev_dir_len), len;
++ size_t len, udev_dir_len = strlen(DM_UDEV_DEV_DIR);
++ int len_diff;
+ int device_list_from_udev;
+- const char *uninitialized_var(udev_dir);
+
+ init_dev_disable_after_error_count(
+ find_config_tree_int(cmd, "devices/disable_after_error_count",
+@@ -661,13 +661,9 @@ static int _init_dev_cache(struct cmd_context *cmd)
+ if (!dev_cache_init(cmd))
+ return_0;
+
+- if ((device_list_from_udev = udev_is_running() ?
++ device_list_from_udev = udev_is_running() ?
+ find_config_tree_bool(cmd, "devices/obtain_device_list_from_udev",
+- DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV) : 0)) {
+- if (!(udev_dir = udev_get_dev_dir()))
+- stack;
+- udev_dir_len = (udev_dir) ? strlen(udev_dir) : 0;
+- }
++ DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV) : 0;
+ init_obtain_device_list_from_udev(device_list_from_udev);
+
+ if (!(cn = find_config_tree_node(cmd, "devices/scan"))) {
+@@ -688,11 +684,19 @@ static int _init_dev_cache(struct cmd_context *cmd)
+ return 0;
+ }
+
+- if (device_list_from_udev && udev_dir) {
++ if (device_list_from_udev) {
+ len = strlen(cv->v.str);
+- len = udev_dir_len > len ? len : udev_dir_len;
+- if (strncmp(udev_dir, cv->v.str, len) ||
+- udev_dir[len] != cv->v.str[len]) {
++
++ /*
++ * DM_UDEV_DEV_DIR always has '/' at its end.
++ * If the item in the conf does not have it, be sure
++ * to make the right comparison without the '/' char!
++ */
++ len_diff = len && cv->v.str[len - 1] != '/' ?
++ udev_dir_len - 1 != len :
++ udev_dir_len != len;
++
++ if (len_diff || strncmp(DM_UDEV_DEV_DIR, cv->v.str, len)) {
+ device_list_from_udev = 0;
+ init_obtain_device_list_from_udev(0);
+ }
+diff --git a/lib/misc/lvm-wrappers.c b/lib/misc/lvm-wrappers.c
+index 84f61a6..6cffae3 100644
+--- a/lib/misc/lvm-wrappers.c
++++ b/lib/misc/lvm-wrappers.c
+@@ -65,16 +65,6 @@ bad:
+ return 0;
+ }
+
+-const char *udev_get_dev_dir(void)
+-{
+- if (!_udev) {
+- log_debug(_no_context_msg);
+- return NULL;
+- }
+-
+- return udev_get_dev_path(_udev);
+-}
+-
+ struct udev* udev_get_library_context(void)
+ {
+ return _udev;
+@@ -96,10 +86,6 @@ int udev_is_running(void)
+ return 0;
+ }
+
+-const char *udev_get_dev_dir(void)
+-{
+- return NULL;
+-}
+ #endif
+
+ int lvm_getpagesize(void)
+diff --git a/lib/misc/lvm-wrappers.h b/lib/misc/lvm-wrappers.h
+index f5b381c..e43f831 100644
+--- a/lib/misc/lvm-wrappers.h
++++ b/lib/misc/lvm-wrappers.h
+@@ -24,7 +24,6 @@ struct udev *udev_get_library_context(void);
+ int udev_init_library_context(void);
+ void udev_fin_library_context(void);
+ int udev_is_running(void);
+-const char *udev_get_dev_dir(void);
+
+ int lvm_getpagesize(void);
+
+diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
+index 7df4db8..1f780a3 100644
+--- a/libdm/libdevmapper.h
++++ b/libdm/libdevmapper.h
+@@ -1500,6 +1500,9 @@ struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const st
+
+ struct dm_pool *dm_config_memory(struct dm_config_tree *cft);
+
++/* Udev device directory. */
++#define DM_UDEV_DEV_DIR "/dev/"
++
+ /* Cookie prefixes.
+ *
+ * The cookie value consists of a prefix (16 bits) and a base (16 bits).
+diff --git a/tools/dmsetup.c b/tools/dmsetup.c
+index 6934de8..2787b76 100644
+--- a/tools/dmsetup.c
++++ b/tools/dmsetup.c
+@@ -1008,11 +1008,9 @@ static int _udevcookies(CMD_ARGS)
+ #else /* UDEV_SYNC_SUPPORT */
+ static int _set_up_udev_support(const char *dev_dir)
+ {
+- struct udev *udev;
+- const char *udev_dev_dir;
+- size_t udev_dev_dir_len;
+ int dirs_diff;
+ const char *env;
++ size_t len = strlen(dev_dir), udev_dir_len = strlen(DM_UDEV_DEV_DIR);
+
+ if (_switches[NOUDEVSYNC_ARG])
+ dm_udev_set_sync_support(0);
+@@ -1030,14 +1028,6 @@ static int _set_up_udev_support(const char *dev_dir)
+ " defined by --udevcookie option.",
+ _udev_cookie);
+
+- if (!(udev = udev_new()) ||
+- !(udev_dev_dir = udev_get_dev_path(udev)) ||
+- !*udev_dev_dir) {
+- log_error("Could not get udev dev path.");
+- return 0;
+- }
+- udev_dev_dir_len = strlen(udev_dev_dir);
+-
+ /*
+ * Normally, there's always a fallback action by libdevmapper if udev
+ * has not done its job correctly, e.g. the nodes were not created.
+@@ -1049,12 +1039,17 @@ static int _set_up_udev_support(const char *dev_dir)
+ * is the same as "dev path" used by libdevmapper.
+ */
+
+- /* There's always a slash at the end of dev_dir. But check udev_dev_dir! */
+- if (udev_dev_dir[udev_dev_dir_len - 1] != '/')
+- dirs_diff = strncmp(dev_dir, udev_dev_dir, udev_dev_dir_len);
+- else
+- dirs_diff = strcmp(dev_dir, udev_dev_dir);
+
++ /*
++ * DM_UDEV_DEV_DIR always has '/' at its end.
++ * If the dev_dir does not have it, be sure
++ * to make the right comparison without the '/' char!
++ */
++ if (dev_dir[len - 1] != '/')
++ udev_dir_len--;
++
++ dirs_diff = udev_dir_len != len ||
++ strncmp(DM_UDEV_DEV_DIR, dev_dir, len);
+ _udev_only = !dirs_diff && (_udev_cookie || !_switches[VERIFYUDEV_ARG]);
+
+ if (dirs_diff) {
+@@ -1064,11 +1059,10 @@ static int _set_up_udev_support(const char *dev_dir)
+ "about udev not working correctly while processing "
+ "particular nodes will be suppressed. These nodes "
+ "and symlinks will be managed in each directory "
+- "separately.", dev_dir, udev_dev_dir);
++ "separately.", dev_dir, DM_UDEV_DEV_DIR);
+ dm_udev_set_checking(0);
+ }
+
+- udev_unref(udev);
+ return 1;
+ }
+
+--
+1.7.2.1
+
diff --git a/sys-fs/lvm2/files/lvm2-start.sh b/sys-fs/lvm2/files/lvm2-start.sh
new file mode 100755
index 00000000..ccb5e951
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-start.sh
@@ -0,0 +1,37 @@
+# /lib/rcscripts/addons/lvm-start.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh,v 1.7 2007/10/04 16:06:22 cardoe Exp $
+
+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
+ /sbin/vgscan --mknodes --ignorelockingfailure >/dev/null
+ if [ -x /sbin/vgchange ] && \
+ [ -f /etc/lvmtab -o -d /etc/lvm ]
+ then
+ /sbin/vgchange --ignorelockingfailure -a y >/dev/null
+ fi
+ eend $? "Failed to setup the LVM"
+ fi
+fi
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-start.sh-2.02.49-r3 b/sys-fs/lvm2/files/lvm2-start.sh-2.02.49-r3
new file mode 100755
index 00000000..ae3ab052
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-start.sh-2.02.49-r3
@@ -0,0 +1,42 @@
+# /lib/rcscripts/addons/lvm-start.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh-2.02.49-r3,v 1.1 2009/08/07 21:02:28 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 --config "${config}" -a y >/dev/null
+ fi
+ eend $? "Failed to setup the LVM"
+ fi
+fi
+
+# 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 00000000..7cded061
--- /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.2 2012/03/27 03:20:56 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 ft=sh noet:
diff --git a/sys-fs/lvm2/files/lvm2-start.sh-2.02.95 b/sys-fs/lvm2/files/lvm2-start.sh-2.02.95
new file mode 100644
index 00000000..979ea474
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-start.sh-2.02.95
@@ -0,0 +1,46 @@
+# /lib/rcscripts/addons/lvm-start.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-start.sh-2.02.95,v 1.1 2012/03/27 03:20:56 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
+for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+done
+if [ -z "${CDBOOT}" -a -x "$lvm_path" ] ; 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
+ lvm_commands="#! ${lvm_path} --config '${config}'\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}pvscan\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgscan --mknodes\n"
+ # And turn them on!
+ lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+ eend $? "Failed to setup the LVM"
+ fi
+else
+ eerror "Cannot find lvm binary in /sbin or /bin!"
+fi
+
+# vim:ts=4 ft=sh noet:
diff --git a/sys-fs/lvm2/files/lvm2-stop.sh b/sys-fs/lvm2/files/lvm2-stop.sh
new file mode 100755
index 00000000..c1380fe5
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-stop.sh
@@ -0,0 +1,61 @@
+# /lib/rcscripts/addons/lvm-stop.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-stop.sh,v 1.6 2007/10/04 16:06:22 cardoe Exp $
+
+# Stop LVM2
+if [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvdisplay ] && \
+ [ -x /sbin/vgdisplay ] && \
+ [ -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"
+ # If these commands fail it is not currently an issue
+ # as the system is going down anyway based on the current LVM
+ # functionality as described in this forum thread
+ #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html
+
+ LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|sed -e 's/.*LV Name\s*\(.*\)/\1/'|sort`
+ VOLUME_GROUPS=`vgdisplay |grep "VG Name"|sed -e 's/.*VG Name\s*\(.*\)/\1/'|sort`
+ for x in ${LOGICAL_VOLUMES}
+ do
+ LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|awk '{print $3}'`
+ if [ "${LV_IS_ACTIVE}" = 0 ]
+ then
+ ebegin " Shutting Down logical volume: ${x} "
+ lvchange -an --ignorelockingfailure -P ${x} >/dev/null
+ eend $?
+ fi
+ done
+
+ for x in ${VOLUME_GROUPS}
+ do
+ VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|sed -e 's/.*Open LV\s*\(.*\)/\1/'`
+ if [ "${VG_HAS_ACTIVE_LV}" = 0 ]
+ then
+ ebegin " Shutting Down volume group: ${x} "
+ vgchange -an --ignorelockingfailure -P ${x} >/dev/null
+ eend
+ fi
+ done
+
+ for x in ${LOGICAL_VOLUMES}
+ do
+ LV_IS_ACTIVE=`lvdisplay ${x}|grep "# open"|sed -e 's/.*# open\s*\(.*\)/\1/'`
+ if [ "${LV_IS_ACTIVE}" = 1 ]
+ then
+
+ ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'`
+ MOUNTED_DEVICE=${x}
+ [ -L ${ROOT_DEVICE} ] && ROOT_DEVICE="`/bin/readlink ${ROOT_DEVICE}`"
+ [ -L ${x} ] && MOUNTED_DEVICE="`/bin/readlink ${x}`"
+ if [ ! ${ROOT_DEVICE} = ${MOUNTED_DEVICE} ]
+ then
+ ewarn " Unable to shutdown: ${x} "
+ fi
+ fi
+ done
+ einfo "Finished Shutting down the Logical Volume Manager"
+fi
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-stop.sh-2.02.49-r3 b/sys-fs/lvm2/files/lvm2-stop.sh-2.02.49-r3
new file mode 100755
index 00000000..83f1884e
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-stop.sh-2.02.49-r3
@@ -0,0 +1,67 @@
+# /lib/rcscripts/addons/lvm-stop.sh
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm2-stop.sh-2.02.49-r3,v 1.1 2009/08/07 21:02:28 robbat2 Exp $
+
+config='global { locking_dir = "/dev/.lvm" }'
+
+# Stop LVM2
+if [ -x /sbin/vgchange ] && \
+ [ -x /sbin/lvdisplay ] && \
+ [ -x /sbin/vgdisplay ] && \
+ [ -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"
+ # If these commands fail it is not currently an issue
+ # as the system is going down anyway based on the current LVM
+ # functionality as described in this forum thread
+ #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html
+
+ LOGICAL_VOLUMES=`/sbin/lvdisplay --config "${config}" |grep "LV Name"|sed -e 's/.*LV Name\s*\(.*\)/\1/'|sort`
+ VOLUME_GROUPS=`/sbin/vgdisplay --config "${config}" |grep "VG Name"|sed -e 's/.*VG Name\s*\(.*\)/\1/'|sort`
+ for x in ${LOGICAL_VOLUMES}
+ do
+ LV_IS_ACTIVE=`/sbin/lvdisplay --config "${config}" ${x}|grep "# open"|awk '{print $3}'`
+ if [ "${LV_IS_ACTIVE}" = 0 ]
+ then
+ ebegin " Shutting Down logical volume: ${x} "
+ /sbin/lvchange -an --config "${config}" -P ${x} >/dev/null
+ eend $?
+ fi
+ done
+
+ for x in ${VOLUME_GROUPS}
+ do
+ VG_HAS_ACTIVE_LV=`/sbin/vgdisplay --config "${config}" ${x}|grep "Open LV"|sed -e 's/.*Open LV\s*\(.*\)/\1/'`
+ if [ "${VG_HAS_ACTIVE_LV}" = 0 ]
+ then
+ ebegin " Shutting Down volume group: ${x} "
+ /sbin/vgchange -an --config "${config}" -P ${x} >/dev/null
+ eend
+ fi
+ done
+
+ for x in ${LOGICAL_VOLUMES}
+ do
+ LV_IS_ACTIVE=`/sbin/lvdisplay --config "${config}" ${x}|grep "# open"|sed -e 's/.*# open\s*\(.*\)/\1/'`
+ if [ "${LV_IS_ACTIVE}" = 1 ]
+ then
+ if type mountinfo >/dev/null 2>&1; then
+ ROOT_DEVICE=`mountinfo -t /`
+ else
+ ROOT_DEVICE=`mount | awk '{if($3 == "/" && $1 != "rootfs"){print $1}}'`
+ fi
+
+ MOUNTED_DEVICE=${x}
+ [ -L ${ROOT_DEVICE} ] && ROOT_DEVICE="`/bin/readlink ${ROOT_DEVICE}`"
+ [ -L ${x} ] && MOUNTED_DEVICE="`/bin/readlink ${x}`"
+ if [ ! ${ROOT_DEVICE} = ${MOUNTED_DEVICE} ]
+ then
+ ewarn " Unable to shutdown: ${x} "
+ fi
+ fi
+ done
+ einfo "Finished Shutting down the Logical Volume Manager"
+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 00000000..a03823ea
--- /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.88.ebuild b/sys-fs/lvm2/lvm2-2.02.88.ebuild
new file mode 100644
index 00000000..a3a3d1ce
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.88.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.88.ebuild,v 1.16 2012/12/10 20:41:45 axs Exp $
+
+EAPI=3
+inherit eutils multilib toolchain-funcs autotools linux-info
+
+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 ~x86-linux"
+
+IUSE="readline +static +static-libs clvm cman +lvm1 selinux"
+
+DEPEND_COMMON="!!sys-fs/device-mapper
+ readline? ( sys-libs/readline )
+ clvm? ( =sys-cluster/dlm-2*
+ cman? ( =sys-cluster/cman-2* ) )
+ <virtual/udev-196"
+
+RDEPEND="${DEPEND_COMMON}
+ !<sys-apps/openrc-0.4
+ !!sys-fs/lvm-user
+ !!sys-fs/clvm
+ >=sys-apps/util-linux-2.16"
+
+# Upgrading to this LVM will break older cryptsetup
+RDEPEND="${RDEPEND}
+ !<sys-fs/cryptsetup-1.1.2"
+
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig
+ >=sys-devel/binutils-2.20.1-r1"
+
+S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
+
+pkg_setup() {
+ local CONFIG_CHECK="~SYSVIPC"
+ local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+ check_extra_config
+ # 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 to 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
+ # bug 330373
+ epatch "${FILESDIR}"/${PN}-2.02.73-locale-muck.patch
+ # --as-needed
+ epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch
+ # bug 332905
+ epatch "${FILESDIR}"/${PN}-2.02.72-dynamic-static-ldflags.patch
+ # bug 361429 - merged upstream in .85
+ #epatch "${FILESDIR}"/${PN}-2.02.84-udev-pkgconfig.patch
+
+ # Merged upstream
+ #epatch "${FILESDIR}"/${PN}-2.02.73-asneeded.patch
+
+ epatch "${FILESDIR}"/${PN}-2.02.88-respect-cc.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}
+ --with-dmeventd-path=/sbin/dmeventd"
+ econf $(use_enable readline) \
+ $(use_enable selinux) \
+ --enable-pkgconfig \
+ --with-confdir="${EPREFIX}/etc" \
+ --sbindir="${EPREFIX}/sbin" \
+ --with-staticdir="${EPREFIX}/sbin" \
+ --libdir="${EPREFIX}/$(get_libdir)" \
+ --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-udev_rules \
+ --enable-udev_sync \
+ --with-udevdir="${EPREFIX}/lib/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"
+
+ dodoc README VERSION* WHATS_NEW WHATS_NEW_DM 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
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring || 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)
+ if use static-libs; then
+ dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a"
+ #gen_usr_ldscript libdevmapper.so
+ fi
+
+ 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
+ if use static-libs; then
+ dolib.a daemons/dmeventd/libdevmapper-event.a \
+ || die "dolib.a libdevmapper-event.a"
+ #gen_usr_ldscript libdevmapper-event.so
+ fi
+
+ use static-libs || \
+ rm -f "${D}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+
+ #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 "${ED}"/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 be used"
+ 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 still using baselayout-1."
+}
+
+src_test() {
+ einfo "Testcases disabled because of device-node mucking"
+ einfo "If you want them, compile the package and see ${S}/tests"
+}
diff --git a/www-apps/opennab/Manifest b/www-apps/opennab/Manifest
index 11ce6a67..e01b00f4 100644
--- a/www-apps/opennab/Manifest
+++ b/www-apps/opennab/Manifest
@@ -1,2 +1,2 @@
-DIST opennab_0.09.zip 1678279 RMD160 d37efddf0a841967cc90dcfe9152ac921e248c28 SHA1 51fcf133cd649ae41b31c2f887987ecc55212324 SHA256 f21b75a0202ea5aa65390be8f0355abc0bcf0aaefd2d55ad85223cf7b9a34369
-EBUILD opennab-0.09.ebuild 968 RMD160 86c6d6fd8524cb44055fafe9e039092e09a8264e SHA1 7d4a9df15c7069e2db4697f1b0b0d6bfa8af32ac SHA256 ce10ad5b697ef52fd812101cd820f6e86ca7ddf799e7cb3690125d5636ae653a
+DIST opennab_0.09.zip 1678279 SHA256 f21b75a0202ea5aa65390be8f0355abc0bcf0aaefd2d55ad85223cf7b9a34369 SHA512 51041f6d685f2051217fec45a6524817a99e4eeb2561fbb38a8fa71d621bdc52ed024c08ac9c21efc50699f90680f87120a1187ebae8ecf56feaf334e8138859 WHIRLPOOL 98354ac01352759c02418dcbe767ee2525b1be63b6372909c64c64170930802763b7d4bd88c3ad161e264641fa2bb24e09946ca779af5705527ffeee896ebfad
+EBUILD opennab-0.09.ebuild 968 SHA256 ce10ad5b697ef52fd812101cd820f6e86ca7ddf799e7cb3690125d5636ae653a SHA512 7f9a53884166740735d87630d9cad804b6093ba445ab80c6ab306f526cd9b5a3d0742a4c00426cd5187d5208ed9832c825b521c9557e3afdc6a798b6b17db2f7 WHIRLPOOL 9f09dd9462a6757e4334f93fec0f630dd51c6f13c6486254ccb6770d1f9e24ed12571ec291b9ede7e5e5a01787e2bffdc18a35a4aabc078a41f35ecc7d9c3159