diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-02-02 19:52:41 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-02-02 19:52:41 +0000 |
commit | f50ed590b97a21ed6b6f61358b66f74189b36110 (patch) | |
tree | 205d0af0043b17dee19e745c0157c3f19e90159b /sys-fs/lvm2 | |
parent | Version bump. (diff) | |
download | historical-f50ed590b97a21ed6b6f61358b66f74189b36110.tar.gz historical-f50ed590b97a21ed6b6f61358b66f74189b36110.tar.bz2 historical-f50ed590b97a21ed6b6f61358b66f74189b36110.zip |
Bug #438262: dmtab multi-line support. Bug #458262: require sysfs mounted. Bug #437718: speed up lvm-monitoring.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r-- | sys-fs/lvm2/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/lvm2/Manifest | 27 | ||||
-rw-r--r-- | sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 | 147 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 | 39 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm.rc-2.02.105-r2 | 97 | ||||
-rw-r--r-- | sys-fs/lvm2/lvm2-2.02.105-r2.ebuild | 246 |
6 files changed, 544 insertions, 22 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog index 385468ef9c70..42df0f48ec87 100644 --- a/sys-fs/lvm2/ChangeLog +++ b/sys-fs/lvm2/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-fs/lvm2 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.339 2014/02/02 11:08:18 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.340 2014/02/02 19:52:35 robbat2 Exp $ + +*lvm2-2.02.105-r2 (02 Feb 2014) + + 02 Feb 2014; Robin H. Johnson <robbat2@gentoo.org> + +files/device-mapper.rc-2.02.105-r2, +files/lvm-monitoring.initd-2.02.105-r2, + +files/lvm.rc-2.02.105-r2, +lvm2-2.02.105-r2.ebuild: + Bug #438262: dmtab multi-line support. Bug #458262: require sysfs mounted. Bug + #437718: speed up lvm-monitoring. 02 Feb 2014; Agostino Sarubbo <ago@gentoo.org> lvm2-2.02.103.ebuild: Stable for alpha, wrt bug #486278 diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest index 627df4725f4f..d43ff8fd4d49 100644 --- a/sys-fs/lvm2/Manifest +++ b/sys-fs/lvm2/Manifest @@ -1,16 +1,16 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4 AUX clvmd.rc-2.02.39 3684 SHA256 476289b24539eeff4ff94c34c129da755d8cff11f1e950b40f9fad212ca5c05d SHA512 18879fa7925d6181b9ebfd7a6379ee4f25c9c83474ba69684e63811867754b1c52dd6568324aafd9fe391fd2fd4aadf931870cefc21b72d2f81f9e04ef123f41 WHIRLPOOL 095a313a6c66f0dec1d42233dd1853879ade6334c474ac747c2cd87c24b433381547a6fdecedf784db060549ece8dc24870d4981bcf590bf39e57dd7bad92120 AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e +AUX device-mapper.rc-2.02.105-r2 3828 SHA256 036b6de05e6cbd921a667d6fc6b01d30c8f9b720e1a0d0e2453ecd62d32573fb SHA512 aa5c73a91a85069782384ab9ecec299d9f036ed8c069ebef66bbedfa9d9ce7c63baa70692148cf4f1b06d6b4e53fc1916ae576ecc005323154a25a686bef33fd WHIRLPOOL bebba4faf498d400c68b8e79a64c90f0b71a3df350895ea4b78efb802600f4179ec0b7507be7ca61bd7444ca8d5c8f8156112a2fa3083e51a6fe8f552db583ba AUX device-mapper.rc-2.02.95-r2 2765 SHA256 e0bff689040746480e2479d1ad57adb5ab23cc0415ab9a8356503aed7a14c658 SHA512 f6e653c6af92debe543bcb48ee36c2bfa0f1ad08d2dfe40455cf9d3b104a1f825a295b43de2a5fa64367c6c2eadb2b36004c7cf51fd3b15191ea6be21d0c5a4f WHIRLPOOL 298548daebf413ea8739c979c23b9ea7cfbcf12437debb8ce7d570b6a8269fbcd4d7b27816734f3728e2d591ef9658a4f4bb0c43299dbf408aeac10ef87e5bf0 AUX dmeventd.initd-2.02.67-r1 685 SHA256 dbf81d357446fa555bcd75939af6d5982c10a8235800ddc299d2673b2c694d39 SHA512 0c0399987f7710bd29c5a8a02288927fae5fb54cb42918f2c96c67aae4beedc1c6e6b3f80546799696364c1c40cc03e2cbbede5042caeb519fc0532a0296b7ad WHIRLPOOL aaa0064fc5bcde09814e8ee3535d5348c5b1f0119ccbd961d6423a26fd1e1d654df3e0e1f9dea1725afe7f9e4fe8d1152b8653f6430ad23a7c47e36e61750a3d AUX dmtab 416 SHA256 e2e22bbe13fb97ec9a68659daa275b1d22fd0a3fd21e76b1f4bfba504a8bd7b5 SHA512 392b4bd85745bc774245195a1c416ae68efbe5f7b2498f6bfc40021cd2c9f6372fd1c3d346198c7749635b5d9b3f66ba1b963a2e144b4f522d87016ab4777de2 WHIRLPOOL f48c0fda382c7d57bad2ad4a8155189735236d13f24f39b3969736c3ad54d28f92c82174cae5c6775f8bc58506f19025f2cba6433f389c84505552fc8b4d3ed4 +AUX lvm-monitoring.initd-2.02.105-r2 1088 SHA256 d7655cadd3a3a9d3683a540413365310ca9503c38fd21a9bfccec40630ca72f1 SHA512 3c3f7ec1868e3634be3bb82689d30065dbe0fac3e2dfa22a14acb76c82b102022c280f995f82a1f7c91c905c0ba961bbb2707ddf60ad5fa9d717acdf942855d5 WHIRLPOOL 92e7eedf6add5cba645f74281912713928f694f18155db222352ba8e4a70ac89696f9db3cc2c9fc79fb9ff0f98cb176da8aedb1c5b7b47eecd4ee36360df41f0 AUX lvm-monitoring.initd-2.02.67-r2 1183 SHA256 b89971a4f163e1a91df2416ff442cae7209f8343e6c8612eb3174ed8f5c5c788 SHA512 e99d8e0ed2f22e8f3f1e36581ce92bc2196dbebdeb7c301070c5f2e78079804de3ac782c732929e23a3a01536a270236513c849ec1574ff4c72045b8f69c98ed WHIRLPOOL 71eb7d1203bc2b6be22ebb0eb20e3d2e0786036bea9f0beda91c517f47b99374b52ca4c7d5cd76ae6338ddab187b68a7a371a437e5501996454e125e12e998a8 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.105 3062 SHA256 3c1a868b766e1a8e4fa19a9ef63d664fae039752c174bca49fa9b23cd82fe11c SHA512 7df015e554c55caff38e41b364eb810991e57b70f8d7967a4675bc46f71d162fcc9657bea46211a08df411a526e73647d43ee46c96bb409008fb9cf45619ecd7 WHIRLPOOL f27a40987101c0043fc030f0e6354531c8057486f789c519fd6c3e3ee24a0a74640630245171f970f09b041e2c30845729b3d54196eda973d1f7f78c23556041 +AUX lvm.rc-2.02.105-r2 3071 SHA256 a5754ffa0a05a0c29a9f6b5acf1b21dd313581fd6156c1ef722dc620e0114676 SHA512 9dd321b6d76628376b324de1ff47c4a37b98d3bf406abbf1b1755e20d957a9f1d77ff2e50a99b0c77ca8200800cd6071da5ab83c2f5afb9ff97f31e75671a617 WHIRLPOOL 6ba25a5152bf6f5052481e6ad2b1dc3ea65a818d11bff49e9688f537245c471f5446d4b8d381dba69ab8ece8f16340220f4c8173be096c7cb3d7c4c7fd10cebd AUX lvm.rc-2.02.95-r2 3001 SHA256 66844a70cedf61b2cd3373cdbd8f8c1afa817bde0764fdf5cf488857532d4553 SHA512 e5d34447db2fc050256222eff427703341b839a80c833c8ca2a814663b790bdffad967fa41bda8c182d5217dda629057a571520cb0a2e4cb06d5a8a241746ea3 WHIRLPOOL 102baf82bd5573ce90bdb19307ccf71026b6e03fd9e471a123f17072e0ac3785ecf017bb2cd81adf7a5332f33b42330e7c484c8804ed57d4ad6fb1cdd4c119f7 AUX lvm2-2.02.100-selinux_and_udev_static.patch 3223 SHA256 15c20b1e16443932c560164ad9546ab01279601b0f0dd7fdc54f9cf3cd3ffee3 SHA512 232dc2908073254e23878098734cc65449c7be0707f7f0f7e73561e7b204bf71cf75ff5ee143b0f9f301ddabac1595c59cb0ec80c665464e8fe3f1b65a3eb0c2 WHIRLPOOL fdd908aa01cc3790be4ff8e7b2180cd526065c826657924edfccdc53f5c2266a12911c1ebface9de649b1974ff77401e94a64de507b5c72415614e5726dd4a2a AUX lvm2-2.02.105-pthread-pkgconfig.patch 444 SHA256 44e088b638019515cfe58577f4e387e6eb053e44ef4465bf2a451186f38ff7ac SHA512 aea6b2c9ed3705211674c89fac32953612e90c957c632eafe9741d5ec24821a8e94960c3c93fa4e017f622bc174bbb83a4330c4aaa4ba57ebd2bbfb081342bcb WHIRLPOOL 9ed33e26ba3197d02f98dbb586e949439b0b074638e269485ca9a972133603c5be3b707dadcb95db838090ed8c092d3949ae6d8fed8a04dcf5f0f729fb864b1c @@ -36,24 +36,9 @@ DIST LVM2.2.02.97.tgz 1193141 SHA256 edda82012e8a9e1f0b00ba5a331468d3e0201992be1 EBUILD lvm2-2.02.103.ebuild 7426 SHA256 743445b40906b40e3b83f3c7622b44bdae58baa3b11e6aab7d1f209da2a1fd93 SHA512 5d313ce0b0bccb212ae4c1912cb2a9a053be83aab379f3aa7246c8f948faf73416ca5a56282c364fbffb1674fc3a36810e5ceef1e26aea3dbb32ec0292b0ad3d WHIRLPOOL 98fd4a76f2ad09b34f1a6c00574856ff8d2efc6815787f7c10cf63642721275959b59bfd03da7d5cb67b803ce862ac072f4f8912d328196e1ebedf935eb8ed8a EBUILD lvm2-2.02.104.ebuild 7443 SHA256 49f94841de1fd4a2c8b5275de5d317ea67cb285e8cc89758da8525f869dc0270 SHA512 542035e3dc3117794c2a8e2270f1360cff8aa7edec3c7ad7b51b14535f632b41d3c53f0c214e48bcc000e8946f8a805b8aa4d8b32bcf1abdae3f4223424fa0d9 WHIRLPOOL b17ed1883571c4d794e71a834a3a7105c2d97b32087e4bf5acc2d33be27fd8e1df6f75d50b3a0c064af4c4958f1cb0ff9eecbacd3b1ea7816dd87e0013379988 EBUILD lvm2-2.02.105-r1.ebuild 8187 SHA256 80aca0494d40cfafdb2b207b2a2656e7f26c93bc1f795694e8b1eeada87bb19c SHA512 e6a0da3ee61469d06f6a799ca6502dbaef1060fe1ac3474f799396be1fb685be515a28ab7da5caa7392e141a2d2a5cd3864e890d3b8e03811a530e94f6c9f90a WHIRLPOOL 1bce905836375ee54c990371a64df447bb0be2e52ecbad4442e514c5d059e9b251d7ef4ef36b9809256f9453fe16466173491606555e92e81a0e8d31d075d17f +EBUILD lvm2-2.02.105-r2.ebuild 8192 SHA256 40750eb7741d635a42e3d63db88441c925cbf9365f16e2c0a729acbb9f3f8b44 SHA512 ce9664261170449e1c19cb404715aee12f9691d0bd20cdf46353dcd262f30584911da3074a09934ae28d9c3944fd859cb790259a688057bf775a10183a91ed52 WHIRLPOOL 9f1f3b5dc587d8afde0f3b668bb1c007765e283901867df4cef3c5d0f90a7217e491f1bc026868644f671a3d187e919174d5604a1e073a205c4a9ce3097607ad EBUILD lvm2-2.02.105.ebuild 7686 SHA256 a5f79ffbdb0b7962e150b0eda74cc596b5dc58c29d9fd713d49a12fa29c8771b SHA512 eb88e49c64e9b368eb85a94c809911bde59b632818e4af32c36b63b30b376b90d8284679a67fc742b4ef685aad20f29976ae6339abff9deef6569bfae66c2929 WHIRLPOOL 21d65f7f4e580951ea27516aaf41d1e6b470b3aba350ef9cdea2060257786446310141268e4d81dc8d66fffb853d23cf625d087b5b27a7a8c9d84d5d22886105 EBUILD lvm2-2.02.97-r1.ebuild 9072 SHA256 616ff463fda707204c5e92c3a22651ec3e87168ead21b859f6ad0f00c2775960 SHA512 d395b0dc1a18846f76bc79f7fef2cbb649bbee179ea800d6b82398ff113d21c84d987107d14397986d2dc7f5127345cde7e1c588ddfcab339e016f3133dc6080 WHIRLPOOL f14c3e31b83d73b4e996e47c1db7e79e293881dfb1bc519383cfdaac35331ff4fb0a735d2c138433855b1795f084552126b340624191ba8aaf0069011eb6d823 -MISC ChangeLog 64833 SHA256 5f59c82a5dc162f07101061966bfb5cc707cf2770e6b5313d057b09cdb6ae335 SHA512 2292d3ade58c81956bfa4a30483566760c3fda39850747ec27d6874f9fa3c594ce1a1d0cdea5df2a2e5fe2d7c15e5d2161f1408a96839035988cdd5511b15afa WHIRLPOOL 2d9bfe056646daa4d3147ebc96d641123664570a0ebce8940791019a5a580f6432cedba14a2db474248acb46e026cdfe957cb17c5113dd9beb82d6de3e6cfdb9 +MISC ChangeLog 65176 SHA256 724048d9508ef686b0e1f1e5fbadc3b269fe6d6a7d40b7a3b6b39d35d41e940c SHA512 e23522b3c42b5d3e84f5954189d4c099dcb6681412d3456d330da88c4480d2697ab2aa488a3901b1ae2f4d9951391f18a7dcad1ad44f380000274197e24c243d WHIRLPOOL 9e25468a90bcfa29c9ffd007def5c15a57b5155ef6d9c726cc311692c659c7787908247e0b30f7b6203d82dfc25223adabbb42e2ce95b5e2a186b4f8aab7d706 +MISC lvm2-2.02.105-r2.ebuild.orig 8187 SHA256 80aca0494d40cfafdb2b207b2a2656e7f26c93bc1f795694e8b1eeada87bb19c SHA512 e6a0da3ee61469d06f6a799ca6502dbaef1060fe1ac3474f799396be1fb685be515a28ab7da5caa7392e141a2d2a5cd3864e890d3b8e03811a530e94f6c9f90a WHIRLPOOL 1bce905836375ee54c990371a64df447bb0be2e52ecbad4442e514c5d059e9b251d7ef4ef36b9809256f9453fe16466173491606555e92e81a0e8d31d075d17f MISC metadata.xml 995 SHA256 a2be36b695dab8ef65772af8d808cdc7a5c5855e2c9104060e7232e21b984216 SHA512 642abe2a196ffeaf3a67530befa8dc123f1e3e1238bf55d38c0affea82ab5b2f9e56da6b303410845c625494a59323ac8570f40e0f8a406db76295059958361a WHIRLPOOL cba3a6dd12fafc4719050082ee740d03ef0ed68e074b556a0c1f15f4a7b328d9b826d2b7ab3d3f19546de92e907a3fd466792db67423cb8630d5313154d5b6f2 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (GNU/Linux) - -iQIcBAEBCAAGBQJS7icjAAoJELp701BxlEWf9h4P/2scXnBXxFtUMRJxe6EHHMjm -/PcHkoDTqA2r5JJj5U7ZXqq5S8w31HXklD/Me5gsgN4SCChGndLdymE5Ab4H0y4C -qyDxtFtJzsRG9L/rN6q4Lojx8rdN7s76KD3OB8bZSTk6ymwDM5vIr2+sRAfOs93A -WZqq4ihPjVqUahJMjY5Dq/7ZihFyh7kqj9T/ELgfryu7uMpjPcf69UuRjbmH/kXO -RPku34l2b4qITRxeghvBX0uOsavF7F0HCvyEcK8yJjFM30CJ6S3jNTfaTlZalcJ1 -G6cyS0CzUTXmk2zZrn9/YQSLNRqe/y7xrCuF+udTc3eGI1uVfU6ZHsRCGvLe2kMl -zufGz2GqwXhUQ4gE+Oc70NDNTOl6b971Hy2eRwXa1q4OqpJcd+II07LCoFZYoZLI -ig7H2k7gBriv8rWSHOfTvhVQXQNMYm9TO5Ca7aNVlQnszj9/CfTpSOg1itlxF0d/ -s4iMGEB5NjRBTpN7ozFzH7Dv27sJqN/vWH/2ZgUpDU6DCGWCplFi2wTnTcnxm28E -XreZnSGf3GVWy85Wla75nAF89Z/J3w2xmLh+XsAy9olc2wRwuwyLrqDK7sG+kodo -FOh94RFbUA6VyCnu3YOdwKrmtgaUYzw4Znyd9ZQvG9pFEo8mfsiHncvriKBAJwZ1 -lzS3RRPH5WfFICopJFUe -=W3OE ------END PGP SIGNATURE----- diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 new file mode 100644 index 000000000000..56e75037ec74 --- /dev/null +++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 @@ -0,0 +1,147 @@ +#!/sbin/runscript +# Copyright 1999-2014 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.105-r2,v 1.1 2014/02/02 19:52:34 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 **build_dmsetup_command(volume) +# +# Returns complete dmsetup command given single volume name +build_dmsetup_command() { + local count dmsetup_cmd + + # Number of lines mentioning volume name + count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1}) + + # If there's just one line: + if [ ${count} -eq 1 ] ; then + echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}" + + # For all cases with more lines: + elif [ ${count} -gt 1 ] ; then + for c in $( seq 1 ${count} ) ; do + if [ ${c} -eq 1 ] ; then + # Heavy escaping in awk-statement because we cannot use apostrophes + dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" + else + # Append starting with newline + dmsetup_cmd="${dmsetup_cmd}\\\\n \ + $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" + fi + done + echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}" + fi + + return 0 +} + +# char **get_new_dm_volumes(void) +# +# Return unique volumes from /etc/dmtab +get_new_dm_volumes() { + local volume + + # Filter comments and blank lines + grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + awk '{ print $1 }' | \ + uniq | \ + while read volume ; do + # If it exists, skip it + dmvolume_exists "${volume%:}" && continue + + echo "${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 $(build_dmsetup_command ${volume}) >/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/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 new file mode 100644 index 000000000000..c53a60465f4c --- /dev/null +++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2014 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.105-r2,v 1.1 2014/02/02 19:52:34 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 --rows 2> /dev/null` + ebegin "Starting LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor y --poll y ${VGSLIST} + ret=$? + eend $ret + return $ret + +} + +stop() { + ret=0 + # TODO do we want to separate out already active groups only? + VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` + ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor n ${VGSLIST} + ret=$? + eend $ret + return $ret +} diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 new file mode 100644 index 000000000000..7fdf50e1815f --- /dev/null +++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 @@ -0,0 +1,97 @@ +#!/sbin/runscript +# Copyright 1999-2014 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.105-r2,v 1.1 2014/02/02 19:52:34 robbat2 Exp $ + +depend() { + before checkfs fsck + after modules device-mapper + need lvmetad sysfs +} + +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 --rows 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 ${VGS}\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 (possibly some LVs still needed for /usr or root)" + fi + + einfo "Finished shutting down the Logical Volume Manager" + return 0 +fi +} + +# vim:ts=4 diff --git a/sys-fs/lvm2/lvm2-2.02.105-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.105-r2.ebuild new file mode 100644 index 000000000000..19dd3270f516 --- /dev/null +++ b/sys-fs/lvm2/lvm2-2.02.105-r2.ebuild @@ -0,0 +1,246 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.105-r2.ebuild,v 1.1 2014/02/02 19:52:35 robbat2 Exp $ + +EAPI=5 +inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic + +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 ~amd64-linux ~x86-linux" +IUSE="readline static static-libs clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only" +REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )" + +DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* ) + readline? ( sys-libs/readline ) + udev? ( >=virtual/udev-200[static-libs?] )" +# /run is now required for locking during early boot. /var cannot be assumed to +# be available -- thus, pull in recent enough baselayout for /run. +# This version of LVM is incompatible with cryptsetup <1.1.2. +RDEPEND="${DEPEND_COMMON} + >=sys-apps/baselayout-2.2 + !<sys-apps/openrc-0.11 + !<sys-fs/cryptsetup-1.1.2 + !!sys-fs/clvm + !!sys-fs/lvm-user + >=sys-apps/util-linux-2.16 + lvm2create_initrd? ( sys-apps/makedev ) + thin? ( >=sys-block/thin-provisioning-tools-0.2.8-r1 )" +DEPEND="${DEPEND_COMMON} + virtual/pkgconfig + >=sys-devel/binutils-2.20.1-r1 + static? ( + selinux? ( sys-libs/libselinux[static-libs] ) + udev? ( virtual/udev[static-libs] ) + )" + +S=${WORKDIR}/${PN/lvm/LVM}.${PV} + +pkg_setup() { + local CONFIG_CHECK="~SYSVIPC" + + if use udev; then + local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" + if linux_config_exists; then + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) + if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then + ewarn "It's recommended to set an empty value to the following kernel config option:" + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" + fi + fi + fi + + check_extra_config + + # 1. Genkernel no longer copies /sbin/lvm blindly. + 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_prepare() { + # Gentoo specific modification(s): + epatch "${FILESDIR}"/${PN}-2.02.99-example.conf.in.patch + + sed -i \ + -e "1iAR = $(tc-getAR)" \ + -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ + make.tmpl.in || die #444082 + + sed -i -e '/FLAG/s:-O2::' configure{,.in} || die #480212 + + # For upstream -- review and forward: + epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch + epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch + epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 + epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 + epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed + epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905 + #epatch "${FILESDIR}"/${PN}-2.02.100-selinux_and_udev_static.patch #370217, #439414 + epatch "${FILESDIR}"/${PN}-2.02.105-static-pkgconfig-libs.patch #370217, #439414 + blkid + epatch "${FILESDIR}"/${PN}-2.02.105-pthread-pkgconfig.patch #492450 + + eautoreconf +} + +src_configure() { + filter-flags -flto + local myconf + local buildmode + + myconf="${myconf} $(use_enable !device-mapper-only dmeventd)" + myconf="${myconf} $(use_enable !device-mapper-only cmdlib)" + myconf="${myconf} $(use_enable !device-mapper-only applib)" + myconf="${myconf} $(use_enable !device-mapper-only fsadm)" + myconf="${myconf} $(use_enable !device-mapper-only lvmetad)" + + # 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 + buildmode="internal" + # This only causes the .static versions to become available + myconf="${myconf} --enable-static_link" + else + buildmode="shared" + fi + dmbuildmode=$(use !device-mapper-only && echo internal || echo none) + + # dmeventd requires mirrors to be internal, and snapshot available + # so we cannot disable them + myconf="${myconf} --with-mirrors=${dmbuildmode}" + myconf="${myconf} --with-snapshots=${dmbuildmode}" + myconf="${myconf} --with-thin=$(use thin && echo internal || echo none)" + + 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 + + econf \ + $(use_enable readline) \ + $(use_enable selinux) \ + --enable-pkgconfig \ + --with-confdir="${EPREFIX}"/etc \ + --exec-prefix="${EPREFIX}" \ + --sbindir="${EPREFIX}/sbin" \ + --with-staticdir="${EPREFIX}"/sbin \ + --libdir="${EPREFIX}/$(get_libdir)" \ + --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \ + --with-default-dm-run-dir=/run \ + --with-default-run-dir=/run/lvm \ + --with-default-locking-dir=/run/lock/lvm \ + --with-default-pid-dir=/run \ + $(use_enable udev udev_rules) \ + $(use_enable udev udev_sync) \ + $(use_with udev udevdir "$(get_udevdir)"/rules.d) \ + "$(systemd_with_unitdir)" \ + ${myconf} \ + CLDFLAGS="${LDFLAGS}" +} + +src_compile() { + pushd include >/dev/null + emake + popd >/dev/null + + if use device-mapper-only ; then + emake device-mapper + else + emake + emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat + fi +} + +src_install() { + local inst + INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration" + use device-mapper-only && INSTALL_TARGETS="install_device-mapper" + for inst in ${INSTALL_TARGETS}; do + emake DESTDIR="${D}" ${inst} + done + + newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper + + if use !device-mapper-only ; then + newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd + newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm + newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm + + newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring + newinitd "${FILESDIR}"/lvmetad.initd-2.02.105 lvmetad + fi + + if use clvm; then + newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd + newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd + fi + + if use static-libs; then + dolib.a libdm/ioctl/libdevmapper.a + dolib.a libdaemon/client/libdaemonclient.a #462908 + #gen_usr_ldscript libdevmapper.so + dolib.a daemons/dmeventd/libdevmapper-event.a + #gen_usr_ldscript libdevmapper-event.so + else + rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a + fi + + if use lvm2create_initrd; then + dosbin scripts/lvm2create_initrd/lvm2create_initrd + doman scripts/lvm2create_initrd/lvm2create_initrd.8 + newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd + fi + + insinto /etc + doins "${FILESDIR}"/dmtab + + dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf +} + +pkg_postinst() { + ewarn "Make sure the \"lvm\" init script is in the runlevels:" + ewarn "# rc-update add lvm boot" + ewarn + ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" + ewarn "to enable lvm autoactivation and metadata caching." +} + +src_test() { + einfo "Tests are disabled because of device-node mucking, if you want to" + einfo "run tests, compile the package and see ${S}/tests" +} |