summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2013-09-12 21:08:48 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2013-09-12 21:08:48 +0000
commit3d5d6417031c6b6d2ac797a392049ed5ddabfaa3 (patch)
tree4257cbd3815ca51c4229c53aa9387e2f2d71a8f3 /sys-fs/lvm2
parentrespect LINGUAS (bug #483316) (diff)
downloadhistorical-3d5d6417031c6b6d2ac797a392049ed5ddabfaa3.tar.gz
historical-3d5d6417031c6b6d2ac797a392049ed5ddabfaa3.tar.bz2
historical-3d5d6417031c6b6d2ac797a392049ed5ddabfaa3.zip
Version bump.
Package-Manager: portage-2.2.2/cvs/Linux x86_64 Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r--sys-fs/lvm2/ChangeLog17
-rw-r--r--sys-fs/lvm2/Manifest26
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch32
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch31
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch31
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch20
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch93
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch80
-rw-r--r--sys-fs/lvm2/lvm2-2.02.100.ebuild236
9 files changed, 556 insertions, 10 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog
index aacdb72cf44d..0c62fe8ae67f 100644
--- a/sys-fs/lvm2/ChangeLog
+++ b/sys-fs/lvm2/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog for sys-fs/lvm2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.315 2013/08/14 16:17:19 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.316 2013/09/12 21:08:43 ssuominen Exp $
+
+*lvm2-2.02.100 (12 Sep 2013)
+
+ 12 Sep 2013; Samuli Suominen <ssuominen@gentoo.org> +lvm2-2.02.100.ebuild,
+ +files/lvm2-2.02.100-ignored_loop.patch, +files/lvm2-2.02.100-lvm_path.patch,
+ +files/lvm2-2.02.100-pvmove_segfault.patch,
+ +files/lvm2-2.02.100-respect_ar_and_cc.patch,
+ +files/lvm2-2.02.100-selinux_and_udev_static.patch,
+ +files/lvm2-2.02.100-vg_free_segfault.patch:
+ Version bump wrt #481154 by Alexander Tsoy. Respect CFLAGS wrt #480212 by
+ removing forced -O2 optimization flag. Backport two fixes from upstream
+ preventing segmentation fault. Backport fix from upstream for ignored loop
+ devices. Replace hardcoding sed for systemd activation generator with
+ upstream patch. Refresh -respect-cc.patch, -selinux-static.patch,
+ -udev-static.patch since they didn't apply anymore.
14 Aug 2013; Samuli Suominen <ssuominen@gentoo.org>
-files/lvm2-2.02.95-udev185.patch, -lvm2-2.02.98.ebuild,
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 499e5f0360e1..75f5ef56f3c7 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -11,6 +11,12 @@ AUX lvm-monitoring.initd-2.02.67-r2 1183 SHA256 b89971a4f163e1a91df2416ff442cae7
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.95-r2 3001 SHA256 66844a70cedf61b2cd3373cdbd8f8c1afa817bde0764fdf5cf488857532d4553 SHA512 e5d34447db2fc050256222eff427703341b839a80c833c8ca2a814663b790bdffad967fa41bda8c182d5217dda629057a571520cb0a2e4cb06d5a8a241746ea3 WHIRLPOOL 102baf82bd5573ce90bdb19307ccf71026b6e03fd9e471a123f17072e0ac3785ecf017bb2cd81adf7a5332f33b42330e7c484c8804ed57d4ad6fb1cdd4c119f7
+AUX lvm2-2.02.100-ignored_loop.patch 1442 SHA256 6cc84c9a025434990eb2a94e3782a52dfaf025cb0e240399c3e84aa8ab1908b1 SHA512 19db1461b20621a7bdba0605c0608c8905380508056a06ddc2e1c834eac89a3b615a25874f80a3613ffea43ded3a515e98323dbd0aa8126782c6196cde2ff7fb WHIRLPOOL d895951b1333ecfec221d9d4fd3ca803bbe7c3a808e96a7556f7cd137536c4ad4db47e62c365e5db212041073600633fb181640cc2c9e04f69b6e5fe6d67d6dd
+AUX lvm2-2.02.100-lvm_path.patch 1090 SHA256 f7e183e39071b618c64d68e37bad1d36294d111a7239bccca6fdbf4d1aa20323 SHA512 2eca11e31a7ff2a46553668e8501e4448cd6fd6b6422a36e24a9d526fbf65976e14ddba489a316a568cd3b9307de48ccbf975e0527020356322dd961ecb13107 WHIRLPOOL 28c235dda5875e52a4888788011ab553ba54bafd604253f649283b14854230f3f93e1d8ce6421ec88c06163c2d5bc51b025f11179268903389d2729bfc87dfe8
+AUX lvm2-2.02.100-pvmove_segfault.patch 1187 SHA256 299bf1fb53e89f01ebb7c754d95d5cb6cbc302a4c0b0cf6ad400b5e28a90af00 SHA512 667ccc6127b4c59268326070661246c9c19e02a97ceb51411c2977782d120f8bcd1b277feaab06afeb0d81fa8e1472a19fcd853806d31b0a24bf7f2b04ddcf2b WHIRLPOOL 9a637cf940a67f2f5e00e06b8cacbb5c8b93fb9cdaa252e8cb0c04174857ba9530d0f0081d0936b47ce1b4271f238c75e0c3056439b09952771598a5ef2a7613
+AUX lvm2-2.02.100-respect_ar_and_cc.patch 536 SHA256 7c86a44214f8181dbc248bf2cc13a1254e27bb84b222d750e57e208e9019cebd SHA512 807802a7cda7ced971b7206f86b2b0d2c3cc938ad711bd6c45a95d0d72e207deab73f0b1c00ee31693010eb04f270000fbf8229fc5b844235c62df13db52f64f WHIRLPOOL ff2df6c76e9706a6ac0da17bf8c9fec0e432935e101e4ab4ca819b1f9e5aee26700b57fdb16129a10fe0b677b1e1dd6398b139110c4f72a2d0ac951df84e6d0b
+AUX lvm2-2.02.100-selinux_and_udev_static.patch 3220 SHA256 7a4e2eead5d1f16918a1a943294e24ae5a4bb9143f2139244f6e3f82f8a52766 SHA512 9dae5ec1333650807e7d5bd40566b5c8dfdd8fe65b7c057b03678d13a1c055561a694572103aba2bcb5bef217216099745505e97983b66d278e9b64cac328eed WHIRLPOOL d787bddff12c987f1d7c746246176778c634297f784403dc6cd9470cb0e534e44a3e5fa720460b3e7b1444c884e02ab8988bfdaa76c1004c2761f2195b67af5f
+AUX lvm2-2.02.100-vg_free_segfault.patch 2316 SHA256 287065a798b727d5011644cd174d7b28492ccd0234d238dcfc4cdbb300cc128f SHA512 f5fa6f1e726353fca758fac2a70a2b39611cbad72db5a89ea1da015acd4e53a6e9881c40a9c648d4cf9952b8b8ae3e7847025078c43f9eef0f0da7b4cfb31560 WHIRLPOOL 47f74b534f5db2f94e487c0559d9176dfd9e923a492ab4ff9139bd5faf24ce7ad8cff9a3d1e6bcc68a7a512c5b4ce4509daa5fe2f77e3486484be893a9740e90
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.67-createinitrd.patch 660 SHA256 d59f5642fff9d9575227bfd0b3d103d928a6f7b08b417d6c458704171f11da39 SHA512 17fbba5d34ece5c1c25ef35fa3bbc3d6fcd20b44bd766c049bbc120853a8d60c9544db5790645a7814db5c272fd12d383699a8a9be6f4e9c56a7c0a1bb29ade2 WHIRLPOOL b358a31a9ee669a4fccf42280da5342c214932bfd83deee92d41351eb37dc6c0b2e5dc7419f2304128b5d285fed92db5b2e1634a71bbf1310d36b54d1a353bb0
@@ -26,20 +32,22 @@ AUX lvm2-2.02.99-example.conf.in.patch 1489 SHA256 55273a2bc6df33057f4efdd947b75
AUX lvm2-2.02.99-fix-mda-offset-size-overflow-4g-with-lvmetad.patch 1311 SHA256 d5547fb0eed458f13154c187037141fe3d1b3fcf049615b231afca332898c22b SHA512 400ef32d4535e45601f6d4e1f0270c0e504dfc3ad1b284b7cfe2b21d9bdc2438f24c45dc85ca51803881215c4f6f9a753fb71c7c357dc9b135bf439eba7874a5 WHIRLPOOL 870aa09765becdf90924e979376810acd060f13653f91ec0694883011570d52d5d4d22f6622313cb853eba7a6fc9cd5b85039d7d6b9f2c5dc1833c2cee1a541a
AUX lvm2-2.02.99-locale-muck.patch 395 SHA256 14e7c65fd9aa71b7f09cc1aecfaccb3048dbb09dd4eb4c342556708aa6adba77 SHA512 4014abbaeb1106dbaa360e2573340651adc0cccc6c0c05cc57695e74e7a3d0b5a73e2b72242bab0d0a10c2506a7c30c2a4de0275c0f81a14dfb068ec91492497 WHIRLPOOL 3383e94ca4dbaefd2c628d3a95b17a14602481c98425caf48f490185289eb3f1af2ef234ff5b5c431ea4624edd8e48764252bdf5b7159ab3bbbad699c3f936ab
AUX lvm2-2.02.99-selinux-static.patch 4695 SHA256 62571ea45660dc518b36128d929927a7bdd0476c6ecb1ab091807e5fbd091287 SHA512 94d6e29147d9c258f5cf00245b6b341ac301a0da1c0388c363f2dbb59eef69ab6bd4e6213b1fbcd749861d71a78d4f4ac2b4295074efc259bb9586d746ec1349 WHIRLPOOL c752bf942b9edc0ea43d5a0ae1394f8f037dbb74ce299dae0bff7f011e6182dbfe35131bd4496793cd1d55711837599f9ea448265e22523963acc0088fb5b253
+DIST LVM2.2.02.100.tgz 1324911 SHA256 450302f909a93a44710ed3ae70894d3774f2eab52ecb1e3e6cac16d0239bd3a0 SHA512 97cac59bae5627b29bd32d46e7fa96063874a6b17f20c2c7f3a82bb0a7c1d155da9dbd224c3201116544f866796ee2219a79e3478e62365b68c6a982eead0312 WHIRLPOOL 51a7a24184ea3db40da1cec238b6aae8a4db0f60779095eaaa4a44ea149504f34e6307b5fee5e7dc3aa94d834ab517b6607a3a25ff7a5c27434224447000df6f
DIST LVM2.2.02.97.tgz 1193141 SHA256 edda82012e8a9e1f0b00ba5a331468d3e0201992be14c0dbea71bf564a51fc2b SHA512 c209054832f36d7b9cbf833c702410ac95c9de1e213b550c01c42f087fcae346d3c931c409184086bc1fcbcbc154c9a4f8b82b06291cefeb7ae22fe7a4c254a0 WHIRLPOOL d4dafde0ae1607cb231acbf07e8aecd579b9e9042e9356df1074a2683f5f2d1036a3483e1799cf7dd14e64f1f4c5506d3628979fd7128cea70ad45b653403dfa
DIST LVM2.2.02.99.tgz 1317810 SHA256 493c9ad85bada036418671072355b2fc57fc30eb5a63fd14a7dfe8ed28dca040 SHA512 665c8be867b44a258e37e12f2202352dfe0d4b7a5018e041ef01ce53d59b88dd96195943f12bd6915ebadbc605340de138bb2268527fd830d35deb4d43ab561b WHIRLPOOL 13fbb82cada1b8c08c881070ce5400517e44b287402ff1e5637ba4b684b4af22a3c7197a0a004d4a43f3584ae257307bb3734e9f3152733368e39a1b7f8c9d89
+EBUILD lvm2-2.02.100.ebuild 7634 SHA256 822f9f38aa3054f9ac23a19788746960001c37bd9d70d655651ef957683a7f50 SHA512 a3ae8c7e3451dc44bb28b9550aabdb2f4a55aadaa9d1f02688473f589778dddda702c27f9095dde9fa8a3ded295f27065c843d9b4eb2b5706506a478381b7826 WHIRLPOOL 1afd56d60d5c02b9ed15fb133b36d1e54d607ba12e81da9e258cd3cdca83257d85bbfc768dc4341c949886e9eac8a432902de143861db1ade8591767a10df815
EBUILD lvm2-2.02.97-r1.ebuild 9072 SHA256 616ff463fda707204c5e92c3a22651ec3e87168ead21b859f6ad0f00c2775960 SHA512 d395b0dc1a18846f76bc79f7fef2cbb649bbee179ea800d6b82398ff113d21c84d987107d14397986d2dc7f5127345cde7e1c588ddfcab339e016f3133dc6080 WHIRLPOOL f14c3e31b83d73b4e996e47c1db7e79e293881dfb1bc519383cfdaac35331ff4fb0a735d2c138433855b1795f084552126b340624191ba8aaf0069011eb6d823
EBUILD lvm2-2.02.99-r2.ebuild 8217 SHA256 3b2b043cb028b55af42e88a5567267ac837f648e4c5f6327b2e97989eb86d444 SHA512 1f831d00e140b6ffe5ba64a48bfef8ec11ae66981451c9d64d50a6e60c04ba05a4bdfda38400a4d1501e7d4c150e745d0e3ed9512e0f4294fa79286237b66f5a WHIRLPOOL a92d6ad1769a239a65312065074730e9ccc7149b4d71dd19cbee5eafa334c703dad24a8a55e039f0ecfa6187d5cf1e69f3ffcd022485f5f7f2498da0d6e8c929
-MISC ChangeLog 59937 SHA256 976bb747128320cfb86a28f38d4c11377cad928d1c7650e5d4058067da5108f5 SHA512 02d4738918bc1e366703b0bf42e4553dc99be79c53c5538fa6a5d1bca3c4ebff3acb545c8437a5b68b99415626173f43407c6b20cd15ec93b66a130b02000a3b WHIRLPOOL 784396c227a465a77ff75c3123de29245aa289db7cdd89a9b446e036a409e39d5db869a67cdd15bc7fde7002b96512528f38178a8d3656004936663201f6a6db
+MISC ChangeLog 60741 SHA256 826b78ebab2082131b3ce200fc0b79e09beed0d53558b3ea5d73ddc3266eb682 SHA512 beba32af738e5100564a81ef491e220ab37fe4d90333fd1e8a5a8f161d6c6400f3d9e4a7e4850c61a94a5cdf671a6d409a7d21948aae537f7a70fe9c182f4d3a WHIRLPOOL 3cc508a57c1d95b56d539902749471bd58c9bf87c637b7f0dfbc1b0004ee68adcb494c59b025c6ad96dc575b6807988969b7bfe9335139f553fa3a9f427661d3
MISC metadata.xml 984 SHA256 8f554d97062552d62ce2d81c8e4536b3e97539a497dd8cddda3eeab24b4ef73a SHA512 9c0a10af6149817269590cd28e7dc7eb84539184d41123b12bfada3857f87d813199cfbecd7c8219ce1b6a70f4ee72cf7a911854fcdb1fbfd90e3146122bca7f WHIRLPOOL e98d441e34d6a8fe540c7526da3418417cfc10e31c52b42d7827b151f7e3e20f8b088ee49b3ebd67ec304143593a6319c8ea42094d62315e47f210b0e52fe149
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.20 (GNU/Linux)
+Version: GnuPG v2.0.21 (GNU/Linux)
-iQEcBAEBCAAGBQJSC6z9AAoJEEdUh39IaPFNymsH/0U9hFqpEbweWoK+UcHh+ZT2
-/RzeZZMge+oMEw5GxaM8QFYLt63a2dL6+qI75rnpUcDekDzKIBR2xF5i/ByNTP1V
-XedXAjY9fX/LHf3xI+al3BwxzTTaVZrbSB4IgKNsgH1aiW5VkaFFrLVq3Ub2IlGU
-LzsvdCI0D8NrzNJpM14TLofYEsNugn+y8/WDKAHe7R2HXHbFR2WTWP5BMoE//Gap
-KUwSJqinX1Cem7FmoKS30fH09SKJ6IT2SNjt5KwWG7hmq8G01wgS1jwxbd9s0H3r
-ZTZwJB9esiT/M6rBtJaU4LlYhAeL3uBxEWHTWoiKr1Bphil3XKu+Q1oYsoNuVpo=
-=k9V/
+iQEcBAEBCAAGBQJSMi1QAAoJEEdUh39IaPFNzwQH/RGM+5IUS2+/5UPGXZVHWZJA
+N1QC6HIdLyPK+SoLC8AXgV0tJgaP767qxSNoghpz7FplmQJkUzTG+OulOX2y5Wwm
+a84cXBdtmaLl9Z4xhzEYrh4eCv+1dtcVOtkGSfaecWqRKbhEZkRbN30PkPWiSc96
+drrCAnhn868wM3e8DV4ay3uKJEbFUiU/eC/EvpzMtC2b8sVuuzrjSN4ncf0/IVRh
+Cw+k+GvIP2nwihkoB4Ge9mmo9uLVoHKAyGDeAHNhc327+8X+Oyw6gYT93PcKhxZS
+ix85rBQNYArWgboiCNFHMU53KSIsGR1V/C5nTv+8ln9m2ZVVswSk71P6bWuitOY=
+=p6MW
-----END PGP SIGNATURE-----
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch b/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch
new file mode 100644
index 000000000000..cb0172718cb1
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch
@@ -0,0 +1,32 @@
+From cac49725c9a2a1f5c0e48235a07f168d98458ace Mon Sep 17 00:00:00 2001
+From: Peter Rajnoha <prajnoha@redhat.com>
+Date: Fri, 16 Aug 2013 13:45:00 +0000
+Subject: udev: fix lvmetad rules to not ignore loop device configuration
+
+If loop device is first configured on systems where /dev/loop-control
+is used to dynamically create the loop device itself, there's an
+ADD+CHANGE even generated. But next time the existing /dev/loop[0-9]*
+is reused, there's only a CHANGE event since the device representing
+it is already present in kernel (so no ADD event in this case).
+
+We can't ignore this CHANGE event for loop devices! This is a regression
+caused by 756bcabbfe297688ba240a880bc2b55265ad33f0. We already had
+a similar problem with MD devices which was fixed by
+2ac217d408470dcecb69b83d9cbf7a254747fa5b (but that one was
+only an intra-release fix).
+---
+diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
+index a0e48a1..d5087e3 100644
+--- a/udev/69-dm-lvm-metad.rules.in
++++ b/udev/69-dm-lvm-metad.rules.in
+@@ -21,7 +21,7 @@ SUBSYSTEM!="block", GOTO="lvm_end"
+ ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end"
+
+ ACTION=="remove", GOTO="lvm_scan"
+-ACTION=="change", KERNEL=="md[0-9]*", GOTO="lvm_scan"
++ACTION=="change", KERNEL=="md[0-9]*|loop[0-9]*", GOTO="lvm_scan"
+
+ # If the PV is not a dm device, scan only after device addition (ADD event)
+ KERNEL!="dm-[0-9]*", ACTION!="add", GOTO="lvm_end"
+--
+cgit v0.9.2
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch b/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch
new file mode 100644
index 000000000000..85c73209a35a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch
@@ -0,0 +1,31 @@
+http://bugs.gentoo.org/479626
+
+From 8cbbe851a80e8d99dc886ce9b44834137731d8ce Mon Sep 17 00:00:00 2001
+From: Michael Stapelberg <stapelberg@debian.org>
+Date: Thu, 15 Aug 2013 07:57:30 +0000
+Subject: systemd: use LVM_PATH instead of hardcoded value in activation generator
+
+---
+diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
+index 17bc71a..9d4b581 100644
+--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
++++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
+@@ -22,6 +22,7 @@
+ #include <fcntl.h>
+ #include <limits.h> /* For PATH_MAX for musl libc */
+ #include "lvm2app.h"
++#include "configure.h" /* for LVM_PATH */
+
+ #define KMSG_DEV_PATH "/dev/kmsg"
+ #define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
+@@ -150,7 +151,7 @@ static int generate_unit(const char *dir, int unit)
+ "[Service]\n", f);
+ }
+
+- fputs("ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n"
++ fputs("ExecStart=" LVM_PATH " vgchange -aay --sysinit\n"
+ "Type=oneshot\n", f);
+
+ if (fclose(f) < 0) {
+--
+cgit v0.9.2
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch b/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch
new file mode 100644
index 000000000000..84293148e803
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch
@@ -0,0 +1,31 @@
+From c0f987949b8a0bbbbe7f06694f59f710a73814da Mon Sep 17 00:00:00 2001
+From: Alasdair G Kergon <agk@redhat.com>
+Date: Wed, 28 Aug 2013 21:56:23 +0000
+Subject: activation: Fix segfault with inactive pvmove LV.
+
+Set flag to avoid recursion back through an inactive pvmove LV when
+populating deptree.
+---
+diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
+index 294606c..11be421 100644
+--- a/lib/activate/dev_manager.c
++++ b/lib/activate/dev_manager.c
+@@ -1763,11 +1763,13 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
+ return_0;
+
+ /* Add any LVs referencing a PVMOVE LV unless told not to. */
+- if (dm->track_pvmove_deps && lv->status & PVMOVE)
++ if (dm->track_pvmove_deps && lv->status & PVMOVE) {
++ dm->track_pvmove_deps = 0;
+ dm_list_iterate_items(sl, &lv->segs_using_this_lv)
+- if (!_cached_info(dm->mem, dtree, sl->seg->lv, 0) &&
+- !_add_lv_to_dtree(dm, dtree, sl->seg->lv, origin_only))
++ if (!_add_lv_to_dtree(dm, dtree, sl->seg->lv, origin_only))
+ return_0;
++ dm->track_pvmove_deps = 1;
++ }
+
+ /* Adding LV head of replicator adds all other related devs */
+ if (lv_is_replicator_dev(lv) &&
+--
+cgit v0.9.2
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch b/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch
new file mode 100644
index 000000000000..483f25898d6a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch
@@ -0,0 +1,20 @@
+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.
+
+Ditto for AR as per http://bugs.gentoo.org/444082
+
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -17,7 +17,8 @@
+
+ @SET_MAKE@
+
+-CC ?= @CC@
++AR = @GENTOO_AR@
++CC = @CC@
+ RANLIB = @RANLIB@
+ INSTALL = @INSTALL@
+ MKDIR_P = @MKDIR_P@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
new file mode 100644
index 000000000000..e7a4aea7d0c7
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
@@ -0,0 +1,93 @@
+diff -ur LVM2.2.02.100.orig/configure.in LVM2.2.02.100/configure.in
+--- LVM2.2.02.100.orig/configure.in 2013-08-13 13:44:43.000000000 +0300
++++ LVM2.2.02.100/configure.in 2013-09-12 23:23:19.365329440 +0300
+@@ -954,6 +954,7 @@
+ pkg_config_init
+ fi
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ fi
+
+@@ -1199,19 +1200,32 @@
+ if test x$SELINUX = xyes; then
+ AC_CHECK_LIB([sepol], [sepol_check_context], [
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+- SELINUX_LIBS="-lsepol"])
++ SEPOL_LIBS="-lsepol"])
+
+- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+- AC_CHECK_HEADERS([selinux/label.h])
+- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
+ SELINUX_PC="libselinux"
+- HAVE_SELINUX=yes ], [
+- AC_MSG_WARN(Disabling selinux)
+- SELINUX_LIBS=
+- SELINUX_PC=
+- HAVE_SELINUX=no ])
++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ ],[
++ dnl -- old non-pkgconfig method, is buggy with static builds
++ AC_CHECK_LIB([selinux], [is_selinux_enabled], [
++ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
++ AC_CHECK_HEADERS([selinux/label.h])
++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
++ SELINUX_STATIC_LIBS="$SELINUX_LIBS"
++ SELINUX_PC="libselinux"
++ HAVE_SELINUX=yes ], [
++ AC_MSG_WARN(Disabling selinux)
++ SELINUX_LIBS=
++ SELINUX_PC=
++ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1615,6 +1629,7 @@
+ AC_SUBST(SALCK_CFLAGS)
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
+@@ -1625,6 +1640,7 @@
+ AC_SUBST(THIN_DUMP_CMD)
+ AC_SUBST(THIN_REPAIR_CMD)
+ AC_SUBST(UDEV_LIBS)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+diff -ur LVM2.2.02.100.orig/make.tmpl.in LVM2.2.02.100/make.tmpl.in
+--- LVM2.2.02.100.orig/make.tmpl.in 2013-08-13 13:44:43.000000000 +0300
++++ LVM2.2.02.100/make.tmpl.in 2013-09-12 23:22:58.125328808 +0300
+@@ -32,7 +32,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
+@@ -46,7 +46,9 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ TESTING = @TESTING@
+
+ # Setup directory variables
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch b/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch
new file mode 100644
index 000000000000..0bfc551cda21
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch
@@ -0,0 +1,80 @@
+From c29c64f20dadbd9076d8729bd3d0cb724c4b39b0 Mon Sep 17 00:00:00 2001
+From: Tony Asleson <tasleson@redhat.com>
+Date: Wed, 14 Aug 2013 20:14:42 +0000
+Subject: lvm2app: lvm_list_pvs_free seg. fault when no PVs
+
+When the system has no PVs we don't have access to
+the cmd pointer and it remains NULL which causes
+a seg. fault when we try to free the VG lock.
+
+Signed-off-by: Tony Asleson <tasleson@redhat.com>
+---
+diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c
+index 2bd0ac0..e67e1eb 100644
+--- a/liblvm/lvm_pv.c
++++ b/liblvm/lvm_pv.c
+@@ -65,6 +65,7 @@ struct lvm_property_value lvm_pvseg_get_property(const pvseg_t pvseg,
+ struct lvm_list_wrapper
+ {
+ unsigned long magic;
++ struct cmd_context *cmd;
+ struct dm_list pvslist;
+ struct dm_list vgslist;
+ };
+@@ -84,6 +85,11 @@ struct dm_list *lvm_list_pvs(lvm_t libh)
+ struct lvm_list_wrapper *rc = NULL;
+ struct cmd_context *cmd = (struct cmd_context *)libh;
+
++ /*
++ * This memory will get cleared when the library handle
++ * gets closed, don't try to free is as it doesn't work
++ * like malloc/free do.
++ */
+ if (!(rc = dm_pool_zalloc(cmd->mem, sizeof(*rc)))) {
+ log_errno(ENOMEM, "Memory allocation fail for pv list.");
+ return NULL;
+@@ -95,9 +101,14 @@ struct dm_list *lvm_list_pvs(lvm_t libh)
+ dm_list_init(&rc->pvslist);
+ dm_list_init(&rc->vgslist);
+ if( !get_pvs_perserve_vg(cmd, &rc->pvslist, &rc->vgslist) ) {
+- dm_pool_free(cmd->mem, rc);
+ return NULL;
+ }
++
++ /*
++ * If we have no PVs we still need to have access to cmd
++ * pointer in the free call.
++ */
++ rc->cmd = cmd;
+ rc->magic = 0xF005BA11;
+ }
+
+@@ -109,7 +120,6 @@ int lvm_list_pvs_free(struct dm_list *pvlist)
+ struct lvm_list_wrapper *to_delete;
+ struct vg_list *vgl;
+ struct pv_list *pvl;
+- struct cmd_context *cmd = NULL;
+
+ if (pvlist) {
+ to_delete = dm_list_struct_base(pvlist, struct lvm_list_wrapper, pvslist);
+@@ -119,17 +129,14 @@ int lvm_list_pvs_free(struct dm_list *pvlist)
+ }
+
+ dm_list_iterate_items(vgl, &to_delete->vgslist) {
+- cmd = vgl->vg->cmd;
+ release_vg(vgl->vg);
+ }
+
+ dm_list_iterate_items(pvl, &to_delete->pvslist)
+ free_pv_fid(pvl->pv);
+
+- unlock_vg(cmd, VG_GLOBAL);
+-
++ unlock_vg(to_delete->cmd, VG_GLOBAL);
+ to_delete->magic = 0xA5A5A5A5;
+- dm_pool_free(cmd->mem, to_delete);
+ }
+
+ return 0;
+--
+cgit v0.9.2
diff --git a/sys-fs/lvm2/lvm2-2.02.100.ebuild b/sys-fs/lvm2/lvm2-2.02.100.ebuild
new file mode 100644
index 000000000000..3bf217dad605
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.100.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.100.ebuild,v 1.1 2013/09/12 21:08:43 ssuominen Exp $
+
+EAPI=5
+inherit autotools eutils linux-info multilib systemd toolchain-funcs udev
+
+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"
+
+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 )"
+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
+ epatch "${FILESDIR}"/${PN}-2.02.100-respect_ar_and_cc.patch #444082
+ sed -i -e "s:@GENTOO_AR@:$(tc-getAR):" make.tmpl.in || die
+ 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
+
+ # From upstream:
+ epatch "${FILESDIR}"/${P}-lvm_path.patch #479626
+ epatch "${FILESDIR}"/${P}-ignored_loop.patch
+ epatch "${FILESDIR}"/${P}-{vg_free,pvmove}_segfault.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ local buildmode
+
+ myconf="${myconf} --enable-dmeventd"
+ myconf="${myconf} --enable-cmdlib"
+ myconf="${myconf} --enable-applib"
+ myconf="${myconf} --enable-fsadm"
+ myconf="${myconf} --enable-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
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ myconf="${myconf} --with-mirrors=internal"
+ myconf="${myconf} --with-snapshots=internal"
+ use thin \
+ && myconf="${myconf} --with-thin=internal" \
+ || myconf="${myconf} --with-thin=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 \
+ --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-dmeventd-path=/sbin/dmeventd \
+ --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
+
+ emake
+ emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+}
+
+src_install() {
+ local inst
+ for inst in install install_systemd_units install_systemd_generators install_tmpfiles_configuration; do
+ emake DESTDIR="${D}" ${inst}
+ done
+
+ newinitd "${FILESDIR}"/lvm.rc-2.02.95-r2 lvm
+ newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
+
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring
+
+ newinitd "${FILESDIR}"/device-mapper.rc-2.02.95-r2 device-mapper
+ newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+ newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+
+ 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"
+}