* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2015-10-13 21:20 Anthony G. Basile
0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2015-10-13 21:20 UTC (permalink / raw
To: gentoo-commits
commit: 41c0b3b8700137df6640c50ada488dc2daa26233
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 13 21:26:45 2015 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 21:26:45 2015 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=41c0b3b8
sys-fs/lvm2: avoid using mallinfo().
sys-fs/lvm2/Manifest | 3 +-
sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch | 71 +++++++++++++++++++++++++++++
sys-fs/lvm2/lvm2-2.02.116-r99.ebuild | 1 +
3 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 48dec37..47b0b2b 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -22,9 +22,10 @@ AUX lvm2-2.02.70-asneeded.patch 326 SHA256 b0f84dadc213a9daaa97ae7815f624f0bcdc8
AUX lvm2-2.02.92-dynamic-static-ldflags.patch 3031 SHA256 90b880572186d4d1abf049d39e5f11e4cfedb3707c29eeb9740ceccdb3b62468 SHA512 edb78081d12bebaccd31c2474cb531563b729f1ad966afaff7892556177ee7a68217cc699c65383318066139ba62183adc8334f46f8f8933d62b6b5dcd11a023 WHIRLPOOL 6880a29dfb6747f167c41506e1472c0d48ef7af3a545238c733949f85f3f8f36110fb6908c6f626260f7ed975e56a4e8ccf42ece4d758fa3570154cbe970f2a3
AUX lvm2-2.02.99-example.conf.in.patch 1489 SHA256 55273a2bc6df33057f4efdd947b75f0282a7993acd5e57f0019f8ca57ca7df38 SHA512 0c92a0e454505219653500d4fb2ee57626bb30375782be941bda17d7b841cb05eeebb87bfc4f7aa397b26fb4908bcbd0f69d2c07e63bf4f070756a1894851869 WHIRLPOOL 3f6c94dd63fcf5e2d1406aa074aee27997fa6d58da3db9d22281b3080ec36277bc5225c3b62f042b38f5d0870fb1e3e19433f218f01e03323c7ad1210d45d4b3
AUX lvm2-2.02.99-locale-muck.patch 395 SHA256 14e7c65fd9aa71b7f09cc1aecfaccb3048dbb09dd4eb4c342556708aa6adba77 SHA512 4014abbaeb1106dbaa360e2573340651adc0cccc6c0c05cc57695e74e7a3d0b5a73e2b72242bab0d0a10c2506a7c30c2a4de0275c0f81a14dfb068ec91492497 WHIRLPOOL 3383e94ca4dbaefd2c628d3a95b17a14602481c98425caf48f490185289eb3f1af2ef234ff5b5c431ea4624edd8e48764252bdf5b7159ab3bbbad699c3f936ab
+AUX lvm2-avoid-mallinfo.patch 2772 SHA256 d4faa07ecbc6e0fe324f8d5ca65e0dab6e65dd42e871a95e52186c00f390e7e3 SHA512 55e5118aae081863acdb7cda1b9b10955545420a6a7a8048ec0f2b6759d9f1a4fdb21c6445597d43b7aef3b5db8123cc784fb1e897c89242e1d5541e58798280 WHIRLPOOL 5cbd2623c984ec3b66f57d904a9eb0814e192f214b12bc80cdc54498f5d318580dbfa33d7a9da7bbef5216553a2b33d8f2ad791d83336ba2c27453b8e80b13b3
AUX lvm2-fix-stdio-usage.patch 3666 SHA256 79c5379cbf660f8dabd45359463c77a40b5a83153b54c67ce36049260dac9071 SHA512 c4d55b366a60926baadf431dd382012eb808490c0bb514e01503d526cfd7ae573efa2d60a92bd5f6f451b54b11fb5cf827f45cec35cfcdee6aa291674cc776dd WHIRLPOOL 48be6a1205c2293fda51bb8b103db0eebe4b28794a6983c910e5761bb50712da4552eb339a485258f0f79032e10aa7589f65411de282f83ab910881c52a356ed
AUX lvm2-musl-fixes.patch 1537 SHA256 6516f64faeccaf87641f7c29823344baea0f3af9ac14701e98fa768cbccb703d SHA512 87bd64a0c7525cbf5d49f1fbdd4a86f23bade065362580a1f2ef3b73b5e76e865e620800c922aa6819ace78daf3d4e2ce96b7990c63dcdbf504d03e636d26c00 WHIRLPOOL 9aeabec1f8b0e3487cad583e359c729b5c45ecbc426b48c19260d1f3a8e377fe5e8f09297d893dc2588b9ee11537148558a372c029ac84c02282011cc07440fe
AUX lvmetad.initd-2.02.105-r2 405 SHA256 60accb4b6114753232f2db0adf3fc3f46d4459bfedf79b888801a13c55d79fa9 SHA512 d9c6f6c68a83b8f391ded7ebe900009a61ff06e92eb68ccb3dcdc8f41e61bbcdf47246e523ea8cfd6e71790376b316b219d4afaf66cf11477e2b54d526b74998 WHIRLPOOL d959d8c8b5f4ef84c26f8e585fe1761ef9bfd37f590e783e937679a863982e7cc4a4e320c3e2e3bd635dbd3486c15baf7c24e1a21325521f4320e643a57fb0e7
DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
-EBUILD lvm2-2.02.116-r99.ebuild 9329 SHA256 635df4a4a52fa30655ffc5b3936e9fa4e071c056f826c4c4191a3802c5e44dab SHA512 aae8e7a8f5e78d1d026253db9b3ec9a309270d887c99b223d8f756331f50b7ac0b429c31cb39b16fc526c53aa8505c553232d22857fde33290c09a53f41f7a48 WHIRLPOOL 4cb7ac35e2c7a65fcf9477fe6dbd2a9757e0450c7157648a1916efa6957ee3c2d1d1e30f594c551f20511e9661957a5992cc37635eced5119ed592a95fb3d834
+EBUILD lvm2-2.02.116-r99.ebuild 9378 SHA256 53b161f6ed5850ba38a9cdac1ab300da94c5fdb65f0d5f499d80918ee0d55e1d SHA512 e8e5082a83e3d12620ef5c1d71f68c9fb83a67077e6cd924b64fbacbb6e8fd7f1c86dabc04d5fe92723b9bd5e80d16548c6498f16e7ceefaab4178543467b362 WHIRLPOOL 0b7577c0156df5354f56933db3b906a0a49bec80f63664b85e55b9a108953b12b01747d7d9ced35c1be6d22403bb777965064d1a4af9a870a8f4e77817045698
MISC metadata.xml 995 SHA256 a2be36b695dab8ef65772af8d808cdc7a5c5855e2c9104060e7232e21b984216 SHA512 642abe2a196ffeaf3a67530befa8dc123f1e3e1238bf55d38c0affea82ab5b2f9e56da6b303410845c625494a59323ac8570f40e0f8a406db76295059958361a WHIRLPOOL cba3a6dd12fafc4719050082ee740d03ef0ed68e074b556a0c1f15f4a7b328d9b826d2b7ab3d3f19546de92e907a3fd466792db67423cb8630d5313154d5b6f2
diff --git a/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch b/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch
new file mode 100644
index 0000000..b7da941
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch
@@ -0,0 +1,71 @@
+File lvm2-2.02.116-r99.orig/.ipc_in is a fifo while file lvm2-2.02.116-r99/.ipc_in is a fifo
+File lvm2-2.02.116-r99.orig/.ipc_out is a fifo while file lvm2-2.02.116-r99/.ipc_out is a fifo
+diff -Naur lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c
+--- lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c 2015-01-30 16:19:53.000000000 +0000
++++ lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c 2015-10-13 21:02:49.385224386 +0000
+@@ -134,10 +134,8 @@
+ static void _allocate_memory(void)
+ {
+ #ifndef VALGRIND_POOL
+- void *stack_mem;
++ void *stack_mem, *temp_malloc_mem;
+ struct rlimit limit;
+- int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
+- char *areas[max_areas];
+
+ /* Check if we could preallocate requested stack */
+ if ((getrlimit (RLIMIT_STACK, &limit) == 0) &&
+@@ -146,50 +144,13 @@
+ _touch_memory(stack_mem, _size_stack);
+ /* FIXME else warn user setting got ignored */
+
+- /*
+- * When a brk() fails due to fragmented address space (which sometimes
+- * happens when we try to grab 8M or so), glibc will make a new
+- * arena. In this arena, the rules for using “direct” mmap are relaxed,
+- * circumventing the MAX_MMAPs and MMAP_THRESHOLD settings. We can,
+- * however, detect when this happens with mallinfo() and try to co-opt
+- * malloc into using MMAP as a MORECORE substitute instead of returning
+- * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the
+- * memory on free(), this is good enough for our purposes.
+- */
+- while (missing > 0) {
+- struct mallinfo inf = mallinfo();
+- hblks = inf.hblks;
+-
+- if ((areas[area] = malloc(_size_malloc_tmp)))
+- _touch_memory(areas[area], _size_malloc_tmp);
+-
+- inf = mallinfo();
+-
+- if (hblks < inf.hblks) {
+- /* malloc cheated and used mmap, even though we told it
+- not to; we try with twice as many areas, each half
+- the size, to circumvent the faulty logic in glibc */
+- free(areas[area]);
+- _size_malloc_tmp /= 2;
+- } else {
+- ++ area;
+- missing -= _size_malloc_tmp;
+- }
+-
+- if (area == max_areas && missing > 0) {
+- /* Too bad. Warn the user and proceed, as things are
+- * most likely going to work out anyway. */
+- log_warn("WARNING: Failed to reserve memory, %d bytes missing.", missing);
+- break;
+- }
+- }
++ if ((temp_malloc_mem = malloc(_size_malloc_tmp)))
++ _touch_memory(temp_malloc_mem, _size_malloc_tmp);
+
+ if ((_malloc_mem = malloc(_size_malloc)))
+ _touch_memory(_malloc_mem, _size_malloc);
+
+- /* free up the reserves so subsequent malloc's can use that memory */
+- for (i = 0; i < area; ++i)
+- free(areas[i]);
++ free(temp_malloc_mem);
+ #endif
+ }
+
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
index a984ae5..11e5e92 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
@@ -101,6 +101,7 @@ src_prepare() {
# Patches for musl
epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux
epatch "${FILESDIR}"/${PN}-musl-fixes.patch
+ epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch
# Without thin-privision-tools, there is nothing to install for target install_man7:
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2016-11-27 1:19 Aric Belsito
0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2016-11-27 1:19 UTC (permalink / raw
To: gentoo-commits
commit: 71c89bfcc5c31d9a1ceda16d4216eb32689cefdd
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Sun Nov 27 01:18:14 2016 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Sun Nov 27 01:18:14 2016 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=71c89bfc
sys-fs/lvm2: Add 2.02.166
Sync with upstream
Remove r99 postfix
sys-fs/lvm2/Manifest | 36 +++---
sys-fs/lvm2/files/clvmd.rc-2.02.39 | 6 +-
sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 | 4 +-
sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2 | 111 -------------------
sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1 | 4 +-
sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 | 4 +-
sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2 | 46 --------
sys-fs/lvm2/files/lvm.rc-2.02.105-r2 | 4 +-
.../{lvm.rc-2.02.95-r2 => lvm.rc-2.02.116-r4} | 57 ++++++++--
.../{lvm.rc-2.02.105-r2 => lvm.rc-2.02.116-r6} | 46 +++++++-
.../lvm2-2.02.100-selinux_and_udev_static.patch | 93 ----------------
.../lvm2/files/lvm2-2.02.129-example.conf.in.patch | 52 +++++++++
...h => lvm2-2.02.129-static-pkgconfig-libs.patch} | 42 ++++---
.../files/lvm2-2.02.130-pthread-pkgconfig.patch | 32 ++++++
.../lvm2-2.02.139-dynamic-static-ldflags.patch | 63 +++++++++++
sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch | 4 +-
.../lvm2/files/lvm2-2.02.99-example.conf.in.patch | 47 --------
sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch | 4 +-
sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 | 4 +-
...initd-2.02.105-r2 => lvmetad.initd-2.02.116-r3} | 9 +-
...2.02.116-r99.ebuild => lvm2-2.02.116-r4.ebuild} | 28 +++--
...m2-2.02.116-r99.ebuild => lvm2-2.02.116.ebuild} | 14 +--
...m2-2.02.116-r99.ebuild => lvm2-2.02.166.ebuild} | 121 ++++++++++++---------
sys-fs/lvm2/metadata.xml | 2 +
24 files changed, 397 insertions(+), 436 deletions(-)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 6f20438..f05d1e3 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,31 +1,35 @@
AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
-AUX clvmd.rc-2.02.39 3579 SHA256 b547533128b5b48adf0dc2174786303d07c1cf4527d4fd81d0a1db187ff8c12b SHA512 0dfa6d3a7cf2ddbe7decb75765715bd0d3bf7b924aae54bfafe0d184a3804f2793efe020c8ef4003ec751a01ba742c50db1924e85df025cec7d1ae41b7931f9d WHIRLPOOL 8620212e6f5a148d75b7c6e757f17aeb20ffd9fbd51d678caedc2c8ad0cbe9c9fdf9311f41321093ddadb1ef0b470f82d0209d0edfebe9a4d27dc8628216cb13
+AUX clvmd.rc-2.02.39 3597 SHA256 51f46131b5955b399f4f4e5e456aeb56edd4239cdb6625c3b4f60d8b34e85352 SHA512 5adce1c19994296f890e59f56785bcee0a21cc3f4312c1e120d11431f25fba6225e0d1ee89443862d6ffe6fc381cea0f27863b2f241f44c2a9cf9b779f820ff0 WHIRLPOOL ac6e00e374778bd96635c1a14be8636908126b865226366bad9b8c88d5de43b91ff91fd5a551571f9bd1c6096c294dec235bf7d2f67dce28d67cf7b48a42af3d
AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
-AUX device-mapper.rc-2.02.105-r2 3713 SHA256 eb5c194b5e70a6fef95d5b1064771e37384d0972494a500fc22c3265eb9064e4 SHA512 ebf3953b8a9c13d2c8a9c28ae7e3ac23c7583a628b2435335e8c21ae51d046ecb02302a9f147a97102b663329f7756ef5edfce78cd18cce57bf9247cea88ba56 WHIRLPOOL 1f39d046a23a4f079640f3ac972b819f40dfb5d4f19dfb144a7862e2195871c2f37219f94c61ee139af4bf1e4e4f25d0c1b12aa3a14410a877667991f1aae950
-AUX device-mapper.rc-2.02.95-r2 2649 SHA256 f95dff42b6e22b96cc61389263dd68cd6eec6c26924a594c0494941ed4cd993e SHA512 05bc0af9647c43209179076e2743855d2ad6cfd9c13d41dd55c09d8e49db854a868d16a1f72b141a4a04f5d631a2c1c0f4a99488c26e10c07962e10affe6847e WHIRLPOOL 98e69479fa031073ce84868d2693d82ec84c3a4e74fe2eae58bc859ac7f77d660ed47201c3520427b6cf1beada10d52a47fc4e6df0d37868d0a36de9f01b727f
-AUX dmeventd.initd-2.02.67-r1 571 SHA256 63e45f4a86c9c0be27d455999289f0dd62d912c04f12a38e3fa0257fafe293fb SHA512 7b14234333ec92908f15f419ca0c43e3a9be3a22fd397e3e5790cb4be9ef6e1e216f7d30b0b44404802e6c403367cbe56a68807e0e899ef25d298368956a287e WHIRLPOOL 28fcd1a9023da971898fdb2a5b26a4dd667342063f58d648508ff42e57dc7f1f23577e48c94a86a0195f10d4356d8ebb4e9a7a33ede0b25b272991d5c243f151
+AUX device-mapper.rc-2.02.105-r2 3714 SHA256 656a73ab54f078b9d1610945cf2b5fca62b97241fe503382adcb869ec808cfba SHA512 2461dd74237761353a05d8e44a548cfa3977988529521fcb079a09b2f93615c4a0388e943a46df0dd1f72279ced9a4f4d9901a965fbc16c9bee1611c805657ec WHIRLPOOL fd4919e2bc04d44ef616154c3ccf20c2cdb027a77eacdb44fb55be2b42506b954ec8385960bed86d58d1e7e2baa833966615531cd5290c3e64adc8e4c94359d4
+AUX dmeventd.initd-2.02.67-r1 572 SHA256 7b379916cdae04f02c530336c9f1483e93cfd15761bdb8fb0291d7368033f9f2 SHA512 168ea1bbc2fb9186c5afe838dfb9b30dca128776564a19ec657c357fc37546542888df587532916f098c9f391a9a1558197f8f31df8ee1690838daecfba26308 WHIRLPOOL e7ffe16d0243b4efcc8451a8a2dff59eb84f8679a7fa5440695044611e2d4fb1e8baa2e5c50f37dff9eb74fddd918f337d68d2225ff098ed33521a96f037e65d
AUX dmtab 326 SHA256 5be366ff8ffc8f2e30467f21ca4396d3e20eb754bbb215c7d4cfb1e352bcc3f9 SHA512 a9dba029eca594a75e59d7e6577c3917113a87eb19c12258775bd62267b9d07eb35ffb413b0a9d0086c10364a2a9210e79c17ee89249a059974b58523e31f598 WHIRLPOOL aad1090b32958ceb40ea1f0c6acf28fdfc943238ca61d33ce1e50bc922687db46642253d2947413eeaaa21d9b247266a9bb06f755f753e2052f97ada0028c88d
-AUX lvm-monitoring.initd-2.02.105-r2 969 SHA256 258b913654312e39ab8db4aa43584cbeee8d654621f357810e6dac744312fb62 SHA512 a031965ad807b370b5495a41d303b99834bea3dbfa02dd16ff1e190501348d04a97f183c88fea93691fd78249beed5cb20b9172eb3ca9cfd30959473a8e04ef3 WHIRLPOOL dcfad6f9b6238c9246b73008dd1f7e06c3fdde57f1b30935f2f49394fa6b67a2b8d8702e36d2fefd9e4b448df3940f40c78be0796b555b28895c6c71fea9b96f
-AUX lvm-monitoring.initd-2.02.67-r2 1063 SHA256 8b37306841eec2f7cae621b73e2c313477ff826bbc241b5b1e497a45f1e3b8b1 SHA512 472353323bf1e941aa1d1bc52bbf3232c78112bc7c1fa070fc7e7d685660e653282202034c19d8420bf8d391408a60804a1bef6b2bfde8a89c925f76845b9ed3 WHIRLPOOL 3580666f699111014e05d4d6507908a32d84112a925420251a1ed382cfa98614bb09e4534aad2a6848d334233f2835f95acf8199b8d37d92d56d279ac3af2c4c
+AUX lvm-monitoring.initd-2.02.105-r2 970 SHA256 3f2577f224a8f1594255c32e38aecdf3e3fe9d921a2054d851ab0cf73c3b8413 SHA512 6cde5a492356e92df58c0260d00fef176228fb5ddac1ec9b289430373217528ed9459e24b4fdcb66519eb9c4be7c5219b697bef70052daac42019458a39e6e0e WHIRLPOOL 8ff284b378bd6dba8c4ac314c7bdad24157d2462ad323822e72669507c1e3f49ef7a1456b2ffc02b538b014c456f3caf728ae3f242ae8e68f2c81d219a425ca2
AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
-AUX lvm.rc-2.02.105-r2 2966 SHA256 53aaa87749be5cc89942e2485ea76491e3f2ca98de4f9a392fac4cd88c87f548 SHA512 d235b31f5cd4cb62ce3ca695767d7e18742dd571b52c1b832de5400c49c727b754aa1c060b478e05fde0da5591f6b71ab5ccc51dcc38127c192516334b523bc4 WHIRLPOOL 7cefbc96859ab86eed470def186090f8c13deb12c2d4c9d54527997cd3173d8b88b5ea9fc6af38d0e75cdb5c5c091f8aead34895898bf09d49007dcc14c50a24
-AUX lvm.rc-2.02.95-r2 2895 SHA256 9fbaba826ab9cf2a58d7a89a0cabcd4b8aaf3ed4b4c4f727c0ced3a391cfee6f SHA512 f9643e3d28edecc56662efd3107a33dacc96e9d823537a7b16a3195390723ff6bcc3dfc7cad170fd2814223c115a7190484116c8874b8dc8ebb9b1e00e31e4be WHIRLPOOL 05e8055d4cd7d88d0b1a5fcab0768554fb0f419de1ec6f7e747f4ce7bc67362be507240b736d87c987a8221973956dbccd29da5aa40d608985355b02e32e4434
-AUX lvm2-2.02.100-selinux_and_udev_static.patch 3223 SHA256 15c20b1e16443932c560164ad9546ab01279601b0f0dd7fdc54f9cf3cd3ffee3 SHA512 232dc2908073254e23878098734cc65449c7be0707f7f0f7e73561e7b204bf71cf75ff5ee143b0f9f301ddabac1595c59cb0ec80c665464e8fe3f1b65a3eb0c2 WHIRLPOOL fdd908aa01cc3790be4ff8e7b2180cd526065c826657924edfccdc53f5c2266a12911c1ebface9de649b1974ff77401e94a64de507b5c72415614e5726dd4a2a
+AUX lvm.rc-2.02.105-r2 2967 SHA256 9750556b8d018f959d44f3361c3e7ca79147fce02dec38bd8137b08d8a8df1b1 SHA512 9c4e1abc85c96148b46d278668225369af5e8d1cb9b47b6de46baae51ffcfbd9c5dee49c285cf936e02ed6fda366ae866a60a2d9023b26842caa485a3bec92d3 WHIRLPOOL 5144ab76632702faefffa1bdda968da379b07e9f371874076461b500922bc5bbcfd6895adb7919e2ba4c54c694b3f23c8a92abe4350039ca3d7da7cc7a0a2a4b
+AUX lvm.rc-2.02.116-r4 3778 SHA256 9f768b7aa564f151241134b8c15f95f31038a3bfc3122b2a9dae25fa82cc053a SHA512 7ca6e1b25629145fc0bb33b5bf5fedcb30f4e69ae6401222488307d29d86abe3c3cae3c60a2cc4c53082b6fe28027e447ee01bc3ae8c2b3bf811a75678d80b7c WHIRLPOOL a6672253ebb94bd5b46c1fac3af0f985c765561e075526ead8b00c19907af77ce330c7a981f0d153a2fbe6798bcfb63e27e20a0d4fc18d68c03a9c63e384f5fb
+AUX lvm.rc-2.02.116-r6 3790 SHA256 5a790c590b09791f1803426d3f208b234b2513626560724e25caf089eb611753 SHA512 f31d292c19ea56161803237ae08948c3cabaa5276658615420359c30cb51e0257d26a183d860d4152edab6c80bcd3a7e810102b1162e330711a0ffea92257bc2 WHIRLPOOL fc2191bae785465285ec83828ee64710a05a3f5e425ed49b6ecc92c8cf0266b55f544a06a1eddb1ccde09eca10660a3f3205e0836efd87c421f43774c4f0cf58
AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
-AUX lvm2-2.02.107-static-pkgconfig-libs.patch 3607 SHA256 b3efe76e670fd45e363c62bc8a9965eff4bb1c12e98b6eebdf3b8690de24ddca SHA512 6cd6bbe2ff2dbbe012c20043f3b31e42cacc3379838358c58891ec8ce9593ced29a14fbb9e96b9c76e1b245c5aec2e38a26d3a599c78ff18c3d920e89f1d2f72 WHIRLPOOL 4acf0777694df20886b4e6bf06c91a86041f6e4d888c49dc26f582cd6220504550f54ea5d94c220a3a16b4768933e45e901f274dfaf616083db741aab81b612b
AUX lvm2-2.02.108-example.conf.in.patch 1681 SHA256 c9e0b46965f68c25495e21ca9504699031ed88dbb69407a08d53569ddc88ae4c SHA512 b4e983892b7ff47e5e7617376197daa62cfd063cf398235dc4a436fd9025ec4b1e263d7418e2c2943d53be494cba4209e9d4230d54a78762b0ca526f92e9746c WHIRLPOOL 0fc73d8e6f47596fa1789118aefebf931fb217342259da838d701bdeb96f21d7de59f29ac81c3c0f4a00db711e86b9fac6b4c889cf05ffc90ad8fd5a9ef77cd1
AUX lvm2-2.02.108-static-pkgconfig-libs.patch 3302 SHA256 5cbdb4c4db1a77767a8cf3a89490eb0e21a2d4cc7729a8ffb099e4d0746e2775 SHA512 246f1029f9346d6bc57c2062c8a223535d0b832fa6bd86947b8b91b094dbc388706a9914f9ca0531666f77e73544612e2819335435b7576b4e91cdb1b0e4f041 WHIRLPOOL 53e723bdcfe07f668abf6fe9e6093ae38d81b01bd10ade0b40a037d44c367a6945ed86d14d70c2af8af6e7063763fd3620591b5c7384bd255b98cceb7ee192f3
+AUX lvm2-2.02.129-example.conf.in.patch 1844 SHA256 0a5f5dfbeb36da9320c936752fa4e240c5ea82307321098e0c59e43e153548cc SHA512 a2bceec0d051fd2f7749e702d6bbabbc0edf98b11b3211256d2a49d781b1fe89071f36052045726b11b0e0bdd98242b88fc57128a048a7d6d6448c298a6233ed WHIRLPOOL a00b9e37be876377e9b156a9c4674a0d731766c73bb5b297d948ddfb4fb069732b159ea909a35682a95438647060b238303a85c97f350c47e45b97c90c536226
+AUX lvm2-2.02.129-static-pkgconfig-libs.patch 3299 SHA256 fb8ca89e330096a0a0abb80db1922b54b4ed84408863de07ec3dc7a2d882b302 SHA512 28906793a51737679e51bf83298388ea3ca081f513d34b4c38f3fa09f574c9957f4eedfde0179e31be90631e12d41c78b3bb4bb74c069a99a69ae703f3a2f2f7 WHIRLPOOL 9f0f25896dae3f750262514a0e2f8a29a8edb1f949fc41518da98cf991d24e8216003aff7a3fba535ac1a75e8686d8dc297375da52f2188cd7b309b8067758d6
+AUX lvm2-2.02.130-pthread-pkgconfig.patch 915 SHA256 7df0c39dcbb0e24381327e5b08e377fc80bc7e5d990abf4f3f2b3e0fc5158adc SHA512 1e45ccb3bf824fd2f8276b4ca103e95960e401e793944af68a16929040015b42d601b09adbb8f01e833071d501440a20381fe263fd1884d8fb2e7d7f5463da6d WHIRLPOOL bc5805586fd58db54c538d4d87621389ebfb4b7146b46390719c4c3d983222ec51616667b2871ff754a0348f47b210288f8fe3cbe17f95206d97a61cc1b32b8f
+AUX lvm2-2.02.139-dynamic-static-ldflags.patch 2874 SHA256 2f09df6fe503f426e9970e9243e6380654dd4037b8475a371e56ee6ed4287c46 SHA512 3486c6d0500f233cbedfe28a2c20f03e4a80301e011fa0fd41b3765eed71dc5e00c8f6f09d40c3702ea87e372db3e4dae64c32e4ffe45700bbbf137804b748fa WHIRLPOOL 427e8be7dab3afcd4bfa8bbec86d691ed99d98eb52ebe7c740eec7a90bb42dce92fc127ca3ef0a6f6da07041a3682f59b1937b836ccd0a8733200e538e53ccc0
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
-AUX lvm2-2.02.70-asneeded.patch 326 SHA256 b0f84dadc213a9daaa97ae7815f624f0bcdc883d627659c7fcf8b7131538b43e SHA512 e38d8ef5d13c8861f7d1ca5c16271b3da138e8747ba01442de3f55aab45265fdaf42513e596f5af1d024fa2cf0c959bd3e47da52bbe8b13c75e665dd95f81279 WHIRLPOOL 77143f2dafeca221f8b3cda4df1669111de44a4ae4916d9aa2228aa76d94b4d1c556cf90a6f90cae2f1938f7474fb678ec6eab1b4e57f7fd20eab473de667cda
+AUX lvm2-2.02.70-asneeded.patch 336 SHA256 0f1ec293f2cb37345c247bb4b8c3603f1b5d41bb4f62604520e708998f58ce4a SHA512 c4aa5b7120c5b28a3d646b50b561060553dedba766348260e5db6d56776f1474cec09daeab50e1aca2e1d2d166b9ed57e83673b92bc1c305669c13a719696600 WHIRLPOOL 1d1f0bcb62d8c6dcbe9f87c13de6f03d4e9ae0104373fc565bc83a75e299e5e9b3012ce659e73d551f468a9ba70991cefde7abb52061d39c405750f94c27be4c
AUX lvm2-2.02.92-dynamic-static-ldflags.patch 3031 SHA256 90b880572186d4d1abf049d39e5f11e4cfedb3707c29eeb9740ceccdb3b62468 SHA512 edb78081d12bebaccd31c2474cb531563b729f1ad966afaff7892556177ee7a68217cc699c65383318066139ba62183adc8334f46f8f8933d62b6b5dcd11a023 WHIRLPOOL 6880a29dfb6747f167c41506e1472c0d48ef7af3a545238c733949f85f3f8f36110fb6908c6f626260f7ed975e56a4e8ccf42ece4d758fa3570154cbe970f2a3
-AUX lvm2-2.02.99-example.conf.in.patch 1489 SHA256 55273a2bc6df33057f4efdd947b75f0282a7993acd5e57f0019f8ca57ca7df38 SHA512 0c92a0e454505219653500d4fb2ee57626bb30375782be941bda17d7b841cb05eeebb87bfc4f7aa397b26fb4908bcbd0f69d2c07e63bf4f070756a1894851869 WHIRLPOOL 3f6c94dd63fcf5e2d1406aa074aee27997fa6d58da3db9d22281b3080ec36277bc5225c3b62f042b38f5d0870fb1e3e19433f218f01e03323c7ad1210d45d4b3
-AUX lvm2-2.02.99-locale-muck.patch 395 SHA256 14e7c65fd9aa71b7f09cc1aecfaccb3048dbb09dd4eb4c342556708aa6adba77 SHA512 4014abbaeb1106dbaa360e2573340651adc0cccc6c0c05cc57695e74e7a3d0b5a73e2b72242bab0d0a10c2506a7c30c2a4de0275c0f81a14dfb068ec91492497 WHIRLPOOL 3383e94ca4dbaefd2c628d3a95b17a14602481c98425caf48f490185289eb3f1af2ef234ff5b5c431ea4624edd8e48764252bdf5b7159ab3bbbad699c3f936ab
+AUX lvm2-2.02.99-locale-muck.patch 405 SHA256 fa135beaec5a75a271852da44009390e040c53ca05d6932e9565315ee1cd28ef SHA512 1c898693f71d165d55458ab87886a25206930c202b5aea95eba394ad06162cc710c1435e598acb9bcd3fbf46abf5409be972f6ce73bd02b2e177e1af780ae7ad WHIRLPOOL 68f6383c23f23820c964ab11c7581c18661281703b8ae8ccffcf6ff5cbc52c7265f642a3f5130d901c0d44e75132868c47e60830b8bc296555c143aa4eb4f95e
AUX lvm2-avoid-mallinfo.patch 2772 SHA256 d4faa07ecbc6e0fe324f8d5ca65e0dab6e65dd42e871a95e52186c00f390e7e3 SHA512 55e5118aae081863acdb7cda1b9b10955545420a6a7a8048ec0f2b6759d9f1a4fdb21c6445597d43b7aef3b5db8123cc784fb1e897c89242e1d5541e58798280 WHIRLPOOL 5cbd2623c984ec3b66f57d904a9eb0814e192f214b12bc80cdc54498f5d318580dbfa33d7a9da7bbef5216553a2b33d8f2ad791d83336ba2c27453b8e80b13b3
AUX lvm2-fix-stdio-usage.patch 3666 SHA256 79c5379cbf660f8dabd45359463c77a40b5a83153b54c67ce36049260dac9071 SHA512 c4d55b366a60926baadf431dd382012eb808490c0bb514e01503d526cfd7ae573efa2d60a92bd5f6f451b54b11fb5cf827f45cec35cfcdee6aa291674cc776dd WHIRLPOOL 48be6a1205c2293fda51bb8b103db0eebe4b28794a6983c910e5761bb50712da4552eb339a485258f0f79032e10aa7589f65411de282f83ab910881c52a356ed
AUX lvm2-musl-fixes.patch 1537 SHA256 6516f64faeccaf87641f7c29823344baea0f3af9ac14701e98fa768cbccb703d SHA512 87bd64a0c7525cbf5d49f1fbdd4a86f23bade065362580a1f2ef3b73b5e76e865e620800c922aa6819ace78daf3d4e2ce96b7990c63dcdbf504d03e636d26c00 WHIRLPOOL 9aeabec1f8b0e3487cad583e359c729b5c45ecbc426b48c19260d1f3a8e377fe5e8f09297d893dc2588b9ee11537148558a372c029ac84c02282011cc07440fe
-AUX lvmetad.initd-2.02.105-r2 293 SHA256 84fe3d786652a0d73f3626923feffa1fcb0a0b0054260cb5f73b0485d99fa168 SHA512 279474bbdc6f5f2832749a28b7852f8c5bf2e258e9f72b97734ecbfc51103f1c069c6be462366e2df53d63228d88b4baf808b62f5ae31504093c5b8f2d096755 WHIRLPOOL 368dc235510c327ebc2e442723160740d7605b33797c4ec00a0a42a7969e118e4c491616ff59f1a9969212dbbf95e129f11365571b57112aec08f083872c7bdc
+AUX lvmetad.initd-2.02.105-r2 294 SHA256 6da831ad5d96fabb5cdfdf41e4f3228020764edcad5101b6eeb9a0edaa4af259 SHA512 6a74b5d82aeecfefe2ecf59285da68abe6fb83859bb7097c40795581a2281ca4aa3d563f63ecceb691c4e02d63e5a402f3bec5a206f32d58f92f9fe322d49245 WHIRLPOOL 3eabc58e707662d50469e4a46ba2fea8ba3102857b2ec9c53b213f38bc51d4605b1e9675539299c4ad2db9107b00473c551f3be8e110a3b5ee0a4c5eb33cfa88
+AUX lvmetad.initd-2.02.116-r3 355 SHA256 a447400a2b08828f5d63e9b4d3ccadd21a1cb3737823f935579376e2add8842c SHA512 d471258df5a4fedd506d3c75e986db4d27787b6e413a58a5d68bd6467f6d5583d79fe12711079e72be81911278ac0dc7f7887d15763e7455f61752687cf22b49 WHIRLPOOL c41abcbed340dfcc71ae110d4af08b6281b2da93babab8c2d1c5e4a9f38276d6cce72dcd15dce02ebb144ab700024af1b60d653df3701a575f7bccb96421e221
DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
-EBUILD lvm2-2.02.116-r99.ebuild 9378 SHA256 178813fbf16a50e53c91fe08360bf342e6d019f3f7ca8cd06f18ecbd8006b4bb SHA512 b83b1545a959197e520df42b4eb427bf0b0902e8909587c7db201331be28b7e00a0c593759a745968baab93ca447496daddb9c8365cfec784435691be5ce6aa6 WHIRLPOOL ec361069ef88fd42451978d442afbd5d322636b88978a7287fb53285c1ee5a85d1271b5786f8528083b2c77fd3d2a5a984b5e6a888dce1ee46f2f106aad9243e
-MISC metadata.xml 1196 SHA256 6fe8be64fbb7db1ef644c8b43909902c43cc9e884ffb349630e9860ee7b1faec SHA512 513bb657bb7e6bac2feb0573ab924cebbe09b42bd1e24a38d53c8cd63f94f08efd16391ecddd6d70b450db4a6ce4fc549598ead103d953d5a27448d300ff546f WHIRLPOOL 14b0213b457f27e88bbe465b9042cea93cf00a84a542bce03f121bb74e9bbbafda7d836f6d227a8241acc9d6ad3b4741584cace33404837c052a6513ff6aea49
+DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870
+EBUILD lvm2-2.02.116-r4.ebuild 9769 SHA256 805fd9f6b2a50cdee337df0c17841ad8cbfb783ec584f82ae99d18f4d4bd2cda SHA512 ff43be372bcfb7fd7a0cf22c85d2c4aaa790d89be56b9718bad0d635fa37fb29646074832b39a3a9f28e5c3f06c334ff9fa37bd128bfc3f67577234f1763615c WHIRLPOOL b22b87da6833266f929b0972772b573857a92858454974ca588e5cdf6d1e6412b19df49f89b432d022c51f61bf65590ad7802874efcbfd673ac8af78e1aa3f7f
+EBUILD lvm2-2.02.116.ebuild 9403 SHA256 4cd253d414f2f5a43877a46a29060b49370b7de1fb839b829148d41b452a30ea SHA512 b4341ff966c615dda3d3a15e63e227b1dea7942bcbf3d3ab3023461b6c059cf9e2149456052c698a0688314cfdb23eb86bad8c4c4e79cc8ed46f23cc7da371c7 WHIRLPOOL bddad07d3066a6e9c50a9f65b4a660bfb3211269e8dab12213f27811badfc74ec51aed6816c098ab7ef8279ba236d27e31b7b629e9428d505a85b2b0015853ab
+EBUILD lvm2-2.02.166.ebuild 9726 SHA256 910d4f469a8706cd10c1f8ab49155b871c56c82d84f7c2c0a3bd406a85d8f4b2 SHA512 96914be563cc0fd272f603ce3c4c7d33ad92b6c23a770e09d6717cfa69655fc2b1bc3f139375d253f581d06aa010fe62477a5b208c7956c54aecc1b987c33164 WHIRLPOOL 4d9eb4dd63c9bc9d61423e359d257a1a109428cb5f77135146baf93cd3a8e4eca68757d99b88294d96a51114a2e56d9e6d1208d2980d654d22155cc490b6c757
+MISC metadata.xml 1326 SHA256 f7cf280b3f275f568307e2d1f9c4164e41c262d6ce044c01897e577321f86ff5 SHA512 1cb659d57327fda2d14ac27d09801df79d6ef816c0a796711068c7dc4e6c038c023473e9d6f8dc08ef82be589d5641eb513bd5a7cf7e57e9800b73df423d14ba WHIRLPOOL adce1996947e7dca1627bed56bb7bf9716214a11488d2540159b70e74ed286801a63e3176379f7981b01f6c884936f0ac1c56e93ceda117f2526e369bb7440bb
diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
old mode 100755
new mode 100644
index 5bba99a..27125af
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -15,7 +15,7 @@ CLVMD_PIDFILE="/var/run/clvmd.pid"
depend() {
use net dns logger dmeventd
- need cman
+ want cman corosync openais
}
load_modules() {
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
index 5e3669d..a6ec42b 100644
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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
deleted file mode 100644
index 4cd506a..0000000
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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/dmeventd.initd-2.02.67-r1 b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
index 7067391..e91c5c6 100644
--- a/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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
index fd76d96..9181c95 100644
--- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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
deleted file mode 100644
index 2a96706..0000000
--- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r2
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
index 62ddac4..5217116 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.95-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
similarity index 69%
rename from sys-fs/lvm2/files/lvm.rc-2.02.95-r2
rename to sys-fs/lvm2/files/lvm.rc-2.02.116-r4
index d0d9e31..a09b0ef 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.95-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
@@ -1,12 +1,40 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+_get_lvm_path() {
+ local lvm_path=
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ echo "${lvm_path}"
+}
+
+_need_lvmetad()
+{
+ local lvm_path="$(_get_lvm_path)"
+ [ ! -x "${lvm_path}" ] && return 1
+ ${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1'
+}
+
depend() {
- use dmeventd
before checkfs fsck
- after dmeventd modules device-mapper
+ after modules device-mapper
+ # We may use lvmetad based on the configuration. If we added lvmetad
+ # support while lvm2 is running then we aren't dependent on it. For the
+ # more common case, if its disabled in the config we aren't dependent
+ # on it.
+ config /etc/lvm/lvm.conf
+ local _need=
+ if service_started; then
+ _need=$(service_get_value need)
+ else
+ if _need_lvmetad; then
+ _need="${_need} lvmetad"
+ fi
+ fi
+ need sysfs ${_need}
}
config='global { locking_dir = "/run/lock/lvm" }'
@@ -24,9 +52,10 @@ 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
+ lvm_path="$(_get_lvm_path)"
for lvm_path in /bin/lvm /sbin/lvm ; do
[ -x "$lvm_path" ] && break
done
@@ -55,6 +84,14 @@ start() {
fi
}
+start_post()
+{
+ # Save if we needed lvmetad
+ if _need_lvmetad; then
+ service_set_value need lvmetad
+ fi
+}
+
stop() {
for lvm_path in /bin/lvm /sbin/lvm ; do
[ -x "$lvm_path" ] && break
@@ -71,9 +108,8 @@ if [ -x /sbin/vgs ] && \
[ -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)
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
if [ "$VGS" ]
then
@@ -83,13 +119,14 @@ then
# 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"
+ 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"
+ eend $? "Failed (possibly some LVs still needed for /usr or root)"
fi
- einfo "Finished Shutting down the Logical Volume Manager"
+ einfo "Finished shutting down the Logical Volume Manager"
+ return 0
fi
}
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
similarity index 76%
copy from sys-fs/lvm2/files/lvm.rc-2.02.105-r2
copy to sys-fs/lvm2/files/lvm.rc-2.02.116-r6
index 62ddac4..990fd6c 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
@@ -1,12 +1,40 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+_get_lvm_path() {
+ local lvm_path=
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ echo "${lvm_path}"
+}
+
+_need_lvmetad()
+{
+ local lvm_path="$(_get_lvm_path)"
+ [ ! -x "${lvm_path}" ] && return 1
+ ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
+}
+
depend() {
before checkfs fsck
after modules device-mapper
- need lvmetad sysfs
+ # We may use lvmetad based on the configuration. If we added lvmetad
+ # support while lvm2 is running then we aren't dependent on it. For the
+ # more common case, if its disabled in the config we aren't dependent
+ # on it.
+ config /etc/lvm/lvm.conf
+ local _need=
+ if service_started; then
+ _need=$(service_get_value need)
+ else
+ if _need_lvmetad; then
+ _need="${_need} lvmetad"
+ fi
+ fi
+ need sysfs ${_need}
}
config='global { locking_dir = "/run/lock/lvm" }'
@@ -24,9 +52,10 @@ 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
+ lvm_path="$(_get_lvm_path)"
for lvm_path in /bin/lvm /sbin/lvm ; do
[ -x "$lvm_path" ] && break
done
@@ -55,6 +84,14 @@ start() {
fi
}
+start_post()
+{
+ # Save if we needed lvmetad
+ if _need_lvmetad; then
+ service_set_value need lvmetad
+ fi
+}
+
stop() {
for lvm_path in /bin/lvm /sbin/lvm ; do
[ -x "$lvm_path" ] && break
@@ -71,7 +108,6 @@ if [ -x /sbin/vgs ] && \
[ -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)
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
deleted file mode 100644
index d6c8e5f..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-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(SELINUX_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.129-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
new file mode 100644
index 0000000..076e060
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
@@ -0,0 +1,52 @@
+Maintainer note: Forward ported without editing from lvm2-2.02.108-example.conf.in.patch to apply cleanly.
+
+--- LVM2.2.02.129/conf/example.conf.in
++++ LVM2.2.02.129/conf/example.conf.in
+@@ -128,6 +128,9 @@
+ # Example
+ # 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/.*/" ]
+ # Reject the cdrom drive:
+ # filter = [ "r|/dev/cdrom|" ]
+ # Work with just loopback devices, e.g. for testing:
+@@ -620,7 +623,8 @@
+ # tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
+ # They will stop working once the lvm2 on-disk metadata format is used.
+ # This configuration option has an automatic default value.
+- # fallback_to_lvm1 = @DEFAULT_FALLBACK_TO_LVM1@
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # Configuration option global/format.
+ # The default metadata format that commands should use.
+@@ -1413,7 +1417,7 @@
+
+ # Configuration section metadata.
+ # This configuration section has an automatic default value.
+-# metadata {
++metadata {
+
+ # Configuration option metadata/pvmetadatacopies.
+ # Number of copies of metadata to store on each PV.
+@@ -1431,7 +1435,8 @@
+ #
+ # This configuration option is advanced.
+ # This configuration option has an automatic default value.
+- # pvmetadatacopies = 1
++ # Gentoo: enable for data safety, but PV resize is then disabled.
++ # pvmetadatacopies = 2
+
+ # Configuration option metadata/vgmetadatacopies.
+ # Number of copies of metadata to maintain for each VG.
+@@ -1486,7 +1491,7 @@
+ #
+ # This configuration option is advanced.
+ # This configuration option does not have a default value defined.
+-# }
++}
+
+ # Configuration section report.
+ # LVM report command output formatting.
diff --git a/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
similarity index 77%
rename from sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
rename to sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
index 723cd0e..2396945 100644
--- a/sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
@@ -1,15 +1,14 @@
-diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in LVM2.2.02.107/configure.in
---- LVM2.2.02.107.orig/configure.in 2014-07-15 12:57:55.867439868 -0700
-+++ LVM2.2.02.107/configure.in 2014-07-15 17:24:02.662666091 -0700
-@@ -997,6 +997,7 @@
+--- LVM2.2.02.129/configure.in
++++ LVM2.2.02.129/configure.in
+@@ -1287,6 +1287,7 @@
fi])
if test "$BLKID_WIPING" = yes; then
BLKID_PC="blkid"
+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ DEFAULT_USE_BLKID_WIPING=1
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
- fi
- fi
-@@ -1022,6 +1023,7 @@
+ else
+@@ -1332,6 +1333,7 @@
if test "$UDEV_SYNC" = yes; then
pkg_config_init
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
@@ -17,7 +16,7 @@ diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
fi
-@@ -1242,19 +1244,32 @@
+@@ -1558,19 +1560,32 @@
if test "$SELINUX" = yes; then
AC_CHECK_LIB([sepol], [sepol_check_context], [
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
@@ -52,15 +51,15 @@ diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in
fi
################################################################################
-@@ -1556,6 +1571,7 @@
+@@ -1902,6 +1917,7 @@
################################################################################
AC_SUBST(APPLIB)
AC_SUBST(AWK)
+AC_SUBST(BLKID_STATIC_LIBS)
AC_SUBST(BLKID_PC)
- AC_SUBST(BLKID_WIPING)
AC_SUBST(BUILD_CMIRRORD)
-@@ -1651,6 +1667,7 @@
+ AC_SUBST(BUILD_DMEVENTD)
+@@ -2005,6 +2021,7 @@
AC_SUBST(SALCK_CFLAGS)
AC_SUBST(SALCK_LIBS)
AC_SUBST(SELINUX_LIBS)
@@ -68,18 +67,17 @@ diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/configure.in
AC_SUBST(SELINUX_PC)
AC_SUBST(SNAPSHOTS)
AC_SUBST(STATICDIR)
-@@ -1662,6 +1679,7 @@
- AC_SUBST(THIN_DUMP_CMD)
- AC_SUBST(THIN_REPAIR_CMD)
- AC_SUBST(THIN_RESTORE_CMD)
+@@ -2020,6 +2037,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
+AC_SUBST(UDEV_STATIC_LIBS)
AC_SUBST(UDEV_PC)
AC_SUBST(UDEV_RULES)
AC_SUBST(UDEV_SYNC)
-diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/make.tmpl.in LVM2.2.02.107/make.tmpl.in
---- LVM2.2.02.107.orig/make.tmpl.in 2014-07-15 12:57:55.868439884 -0700
-+++ LVM2.2.02.107/make.tmpl.in 2014-07-15 17:23:24.060055838 -0700
-@@ -44,7 +44,7 @@
+--- LVM2.2.02.129/make.tmpl.in
++++ LVM2.2.02.129/make.tmpl.in
+@@ -43,7 +43,7 @@
LIBS = @LIBS@
# Extra libraries always linked with static binaries
@@ -87,8 +85,8 @@ diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/make.tmpl.in
+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
- CFLAGS += @CFLAGS@
-@@ -59,10 +59,13 @@
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+@@ -58,10 +58,13 @@
PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_LIBS = @READLINE_LIBS@
SELINUX_LIBS = @SELINUX_LIBS@
@@ -99,6 +97,6 @@ diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.107.orig/make.tmpl.in
BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
TESTING = @TESTING@
- # Setup directory variables
diff --git a/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch
new file mode 100644
index 0000000..11db632
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch
@@ -0,0 +1,32 @@
+Make sure that libdm usage always brings in pthread libraries, both in
+pkgconfig and during manual build.
+
+--- LVM2.2.02.130/libdm/libdevmapper.pc.in
++++ LVM2.2.02.130/libdm/libdevmapper.pc.in
+@@ -9,4 +9,4 @@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -ldevmapper
+ Requires.private: @SELINUX_PC@ @UDEV_PC@
+-Libs.private: -lm @RT_LIB@
++Libs.private: -lm @RT_LIB@ @PTHREAD_LIBS@
+--- LVM2.2.02.130/tools/Makefile.in
++++ LVM2.2.02.130/tools/Makefile.in
+@@ -90,6 +90,7 @@
+ INSTALL_LVM_TARGETS += install_tools_static
+ INSTALL_DMSETUP_TARGETS += install_dmsetup_static
+ INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++ STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+
+ LVMLIBS = $(LVMINTERNAL_LIBS)
+@@ -120,6 +121,10 @@
+
+ include $(top_builddir)/make.tmpl
+
++ifeq ("@STATIC_LINK@", "yes")
++ STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper: $(TARGETS_DM)
+
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch
new file mode 100644
index 0000000..312e546
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch
@@ -0,0 +1,63 @@
+diff -ur LVM2.2.02.139_O/configure.in LVM2.2.02.139/configure.in
+--- LVM2.2.02.139_O/configure.in 2016-01-19 12:54:33.155187005 +0000
++++ LVM2.2.02.139/configure.in 2016-01-19 12:56:39.487181372 +0000
+@@ -31,6 +31,7 @@
+ linux*)
+ 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"
+@@ -2009,6 +2010,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(TESTSUITE_DATA)
+diff -ur LVM2.2.02.139_O/daemons/dmeventd/Makefile.in LVM2.2.02.139/daemons/dmeventd/Makefile.in
+--- LVM2.2.02.139_O/daemons/dmeventd/Makefile.in 2016-01-19 12:54:33.278186999 +0000
++++ LVM2.2.02.139/daemons/dmeventd/Makefile.in 2016-01-19 12:57:44.277178484 +0000
+@@ -67,7 +67,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 -ur LVM2.2.02.139_O/make.tmpl.in LVM2.2.02.139/make.tmpl.in
+--- LVM2.2.02.139_O/make.tmpl.in 2016-01-19 12:54:33.529186988 +0000
++++ LVM2.2.02.139/make.tmpl.in 2016-01-19 12:58:31.514176378 +0000
+@@ -49,6 +49,7 @@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+ LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+diff -ur LVM2.2.02.139_O/tools/Makefile.in LVM2.2.02.139/tools/Makefile.in
+--- LVM2.2.02.139_O/tools/Makefile.in 2016-01-08 18:51:21.000000000 +0000
++++ LVM2.2.02.139/tools/Makefile.in 2016-01-19 13:00:08.349172060 +0000
+@@ -129,7 +129,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 $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
+
+ all: device-mapper
+@@ -146,7 +146,7 @@
+ endif
+
+ 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.70-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
index 7576e19..1bae0db 100644
--- a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
+++ b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
@@ -2,8 +2,8 @@ http://bugs.gentoo.org/330255
liblvm2app.so: undefined reference to `floor'
---- liblvm/Makefile.in
-+++ liblvm/Makefile.in
+--- LVM2/liblvm/Makefile.in
++++ LVM2/liblvm/Makefile.in
@@ -39,7 +39,7 @@
include $(top_builddir)/make.tmpl
diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
deleted file mode 100644
index 38be5df..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- conf/example.conf.in
-+++ conf/example.conf.in
-@@ -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/lvm2-2.02.99-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
index 364fbd4..fe7ec87 100644
--- a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
+++ b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
@@ -1,5 +1,5 @@
---- make.tmpl.in
-+++ make.tmpl.in
+--- LVM2/make.tmpl.in
++++ LVM2/make.tmpl.in
@@ -395,7 +395,7 @@
( cat $(srcdir)/.exported_symbols; \
if test x$(EXPORTED_HEADER) != x; then \
diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
old mode 100755
new mode 100644
index abeca75..2f9ab0c
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
old mode 100755
new mode 100644
similarity index 66%
copy from sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
copy to sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
index abeca75..d41239e
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -11,3 +11,8 @@ start_stop_daemon_args="--pidfile ${pidfile}"
depend() {
:
}
+
+start_pre()
+{
+ checkpath --directory /run/lvm || return 1
+}
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
similarity index 91%
copy from sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
copy to sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
index 7e2bccd..c0ff832 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
@@ -6,16 +6,17 @@ 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="https://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"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
- systemd? ( udev )"
+ systemd? ( udev )
+ clvm? ( !systemd )"
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
readline? ( sys-libs/readline:0= )
@@ -30,7 +31,10 @@ RDEPEND="${DEPEND_COMMON}
!!sys-fs/clvm
!!sys-fs/lvm-user
>=sys-apps/util-linux-2.16
- lvm2create_initrd? ( sys-apps/makedev )
+ lvm2create_initrd? (
+ app-arch/cpio
+ sys-apps/makedev
+ )
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
# USE 'static' currently only works with eudev, bug 520450
@@ -217,7 +221,9 @@ src_compile() {
src_install() {
local inst
- INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
+ INSTALL_TARGETS="install install_tmpfiles_configuration"
+ # install systemd related files only when requested, bug #522430
+ use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
for inst in ${INSTALL_TARGETS}; do
emake DESTDIR="${D}" ${inst}
@@ -228,11 +234,11 @@ src_install() {
if use !device-mapper-only ; then
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
- newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+ newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 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-r2 lvmetad
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
fi
if use clvm; then
@@ -268,6 +274,10 @@ pkg_postinst() {
ewarn
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
ewarn "to enable lvm autoactivation and metadata caching."
+ ewarn
+ ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
+ ewarn "run the following to update the init script dependencies: "
+ ewarn "# rc-update -u"
}
src_test() {
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild b/sys-fs/lvm2/lvm2-2.02.116.ebuild
similarity index 96%
copy from sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
copy to sys-fs/lvm2/lvm2-2.02.116.ebuild
index 7e2bccd..6879d2b 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116.ebuild
@@ -6,16 +6,17 @@ 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="https://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"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
- systemd? ( udev )"
+ systemd? ( udev )
+ static? ( !udev )" #520450
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
readline? ( sys-libs/readline:0= )
@@ -33,13 +34,12 @@ RDEPEND="${DEPEND_COMMON}
lvm2create_initrd? ( sys-apps/makedev )
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
static? (
selinux? ( sys-libs/libselinux[static-libs] )
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+ udev? ( >=virtual/libudev-208:=[static-libs] )
>=sys-apps/util-linux-2.16[static-libs]
)"
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild b/sys-fs/lvm2/lvm2-2.02.166.ebuild
similarity index 68%
rename from sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
rename to sys-fs/lvm2/lvm2-2.02.166.ebuild
index 7e2bccd..e83c143 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r99.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166.ebuild
@@ -2,23 +2,32 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://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"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm ~mips ppc x86"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
- systemd? ( udev )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
+ systemd? ( udev )
+ clvm? ( !systemd )"
+
+DEPEND_COMMON="
+ clvm? (
+ cman? ( =sys-cluster/cman-3* )
+ corosync? ( sys-cluster/corosync )
+ openais? ( sys-cluster/openais )
+ =sys-cluster/libdlm-3*
+ )
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
readline? ( sys-libs/readline:0= )
+ systemd? ( >=sys-apps/systemd-205:0= )
udev? ( >=virtual/libudev-208:=[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.
@@ -37,6 +46,7 @@ RDEPEND="${DEPEND_COMMON}
DEPEND="${DEPEND_COMMON}
virtual/pkgconfig
>=sys-devel/binutils-2.20.1-r1
+ sys-devel/autoconf-archive
static? (
selinux? ( sys-libs/libselinux[static-libs] )
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
@@ -45,6 +55,26 @@ DEPEND="${DEPEND_COMMON}
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+PATCHES=(
+ # Gentoo specific modification(s):
+ "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+ # Musl fixes
+ "${FILESDIR}"/${PN}-2.02.166-fix-stdio-usage.patch
+ "${FILESDIR}"/${PN}-2.02.166-portability.patch
+
+ # For upstream -- review and forward:
+ "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+ "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+ "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+ "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+ "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
+ "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+ "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+ #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+)
+
pkg_setup() {
local CONFIG_CHECK="~SYSVIPC"
@@ -70,8 +100,7 @@ pkg_setup() {
}
src_prepare() {
- # Gentoo specific modification(s):
- epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
+ default
sed -i \
-e "1iAR = $(tc-getAR)" \
@@ -89,20 +118,6 @@ src_prepare() {
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
- # 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.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
- epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
- # Patches for musl
- epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux
- epatch "${FILESDIR}"/${PN}-musl-fixes.patch
- epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch
-
# Without thin-privision-tools, there is nothing to install for target install_man7:
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
@@ -111,15 +126,15 @@ src_prepare() {
src_configure() {
filter-flags -flto
- local myconf
+ 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)"
- use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+ myconf+=( $(use_enable !device-mapper-only dmeventd) )
+ myconf+=( $(use_enable !device-mapper-only cmdlib) )
+ myconf+=( $(use_enable !device-mapper-only applib) )
+ myconf+=( $(use_enable !device-mapper-only fsadm) )
+ myconf+=( $(use_enable !device-mapper-only lvmetad) )
+ use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
# Most of this package does weird stuff.
# The build options are tristate, and --without is NOT supported
@@ -127,7 +142,7 @@ src_configure() {
if use static; then
buildmode="internal"
# This only causes the .static versions to become available
- myconf="${myconf} --enable-static_link"
+ myconf+=( --enable-static_link )
else
buildmode="shared"
fi
@@ -135,30 +150,30 @@ src_configure() {
# 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+=( --with-mirrors=${dmbuildmode} )
+ myconf+=( --with-snapshots=${dmbuildmode} )
if use thin; then
- myconf="${myconf} --with-thin=internal --with-cache=internal"
+ myconf+=( --with-thin=internal --with-cache=internal )
local texec
for texec in check dump repair restore; do
- myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
- myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+ myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+ myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
done
else
- myconf="${myconf} --with-thin=none --with-cache=none"
+ myconf+=( --with-thin=none --with-cache=none )
fi
if use lvm1; then
- myconf="${myconf} --with-lvm1=${buildmode}"
+ myconf+=( --with-lvm1=${buildmode} )
else
- myconf="${myconf} --with-lvm1=none"
+ myconf+=( --with-lvm1=none )
fi
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
- use hppa && myconf="${myconf} --disable-o_direct"
+ use hppa && myconf+=( --disable-o_direct )
if use clvm; then
- myconf="${myconf} --with-cluster=${buildmode}"
+ myconf+=( --with-cluster=${buildmode} )
# 4-state! Make sure we get it right, per bug 210879
# Valid options are: none, cman, gulm, all
#
@@ -172,11 +187,13 @@ src_configure() {
local clvmd=""
use cman && clvmd="cman"
#clvmd="${clvmd/cmangulm/all}"
+ use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+ use openais && clvmd="${clvmd:+$clvmd,}openais"
[ -z "${clvmd}" ] && clvmd="none"
- myconf="${myconf} --with-clvmd=${clvmd}"
- myconf="${myconf} --with-pool=${buildmode}"
+ myconf+=( --with-clvmd=${clvmd} )
+ myconf+=( --with-pool=${buildmode} )
else
- myconf="${myconf} --with-clvmd=none --with-cluster=none"
+ myconf+=( --with-clvmd=none --with-cluster=none )
fi
econf \
@@ -197,8 +214,8 @@ src_configure() {
$(use_enable udev udev_sync) \
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
$(use_enable systemd udev-systemd-background-jobs) \
- "$(systemd_with_unitdir)" \
- ${myconf} \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+ ${myconf[@]} \
CLDFLAGS="${LDFLAGS}"
}
@@ -217,7 +234,9 @@ src_compile() {
src_install() {
local inst
- INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
+ INSTALL_TARGETS="install install_tmpfiles_configuration"
+ # install systemd related files only when requested, bug #522430
+ use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
for inst in ${INSTALL_TARGETS}; do
emake DESTDIR="${D}" ${inst}
@@ -228,11 +247,11 @@ src_install() {
if use !device-mapper-only ; then
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
- newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+ newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 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-r2 lvmetad
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
fi
if use clvm; then
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index 67f78ec..33079b1 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -18,8 +18,10 @@
<use>
<flag name="clvm">Allow users to build clustered lvm2</flag>
<flag name="cman">Cman support for clustered lvm</flag>
+ <flag name="corosync">Corosync support for clustered lvm</flag>
<flag name="lvm1">Allow users to build lvm2 with lvm1 support</flag>
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
+ <flag name="openais">Openais support for clustered lvm</flag>
<flag name="thin">Support for thin volumes</flag>
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
</use>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2016-11-27 1:22 Aric Belsito
0 siblings, 0 replies; 8+ messages in thread
From: Aric Belsito @ 2016-11-27 1:22 UTC (permalink / raw
To: gentoo-commits
commit: dd9fb6a3d6ce7edde08be0493686bcca41381ed1
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Sun Nov 27 01:22:30 2016 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Sun Nov 27 01:22:30 2016 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=dd9fb6a3
sys-fs/lvm2: Forgot musl patches for 2.02.166
sys-fs/lvm2/Manifest | 2 +
.../lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch | 53 ++++++++++++++++++++++
sys-fs/lvm2/files/lvm2-2.02.166-portability.patch | 40 ++++++++++++++++
3 files changed, 95 insertions(+)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index f05d1e3..34abb31 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -16,6 +16,8 @@ AUX lvm2-2.02.129-example.conf.in.patch 1844 SHA256 0a5f5dfbeb36da9320c936752fa4
AUX lvm2-2.02.129-static-pkgconfig-libs.patch 3299 SHA256 fb8ca89e330096a0a0abb80db1922b54b4ed84408863de07ec3dc7a2d882b302 SHA512 28906793a51737679e51bf83298388ea3ca081f513d34b4c38f3fa09f574c9957f4eedfde0179e31be90631e12d41c78b3bb4bb74c069a99a69ae703f3a2f2f7 WHIRLPOOL 9f0f25896dae3f750262514a0e2f8a29a8edb1f949fc41518da98cf991d24e8216003aff7a3fba535ac1a75e8686d8dc297375da52f2188cd7b309b8067758d6
AUX lvm2-2.02.130-pthread-pkgconfig.patch 915 SHA256 7df0c39dcbb0e24381327e5b08e377fc80bc7e5d990abf4f3f2b3e0fc5158adc SHA512 1e45ccb3bf824fd2f8276b4ca103e95960e401e793944af68a16929040015b42d601b09adbb8f01e833071d501440a20381fe263fd1884d8fb2e7d7f5463da6d WHIRLPOOL bc5805586fd58db54c538d4d87621389ebfb4b7146b46390719c4c3d983222ec51616667b2871ff754a0348f47b210288f8fe3cbe17f95206d97a61cc1b32b8f
AUX lvm2-2.02.139-dynamic-static-ldflags.patch 2874 SHA256 2f09df6fe503f426e9970e9243e6380654dd4037b8475a371e56ee6ed4287c46 SHA512 3486c6d0500f233cbedfe28a2c20f03e4a80301e011fa0fd41b3765eed71dc5e00c8f6f09d40c3702ea87e372db3e4dae64c32e4ffe45700bbbf137804b748fa WHIRLPOOL 427e8be7dab3afcd4bfa8bbec86d691ed99d98eb52ebe7c740eec7a90bb42dce92fc127ca3ef0a6f6da07041a3682f59b1937b836ccd0a8733200e538e53ccc0
+AUX lvm2-2.02.166-fix-stdio-usage.patch 1554 SHA256 4569db8160a3d2cf93d5ef49589743dfabd4cd93c9c25c3a0f0189044cce268e SHA512 ebbbe2b7f3be8def90f4ebaeda879b3970da3ca3b3597ef2ee5406dc723e716d3887e5b21724f33f83745f70e3b0e63ed30426d90f40773da7adf8d5e132e259 WHIRLPOOL 605cd74484aaea84ff68c1b9fbc7d87f6faea83222a140926c626b331783980b3da0a0d1048b23e397f05cdae9585c0e565d121d93d8648bec0ed328e221a3de
+AUX lvm2-2.02.166-portability.patch 1289 SHA256 f22bb0c3b228fef0563b4ed2c19125710acf22156e3e698e08ad65a6d613cfe4 SHA512 d3b4600ed7ad1e1cf191c81eab4681023e4ea9e257808e2da8656841f70c6e1880642f5dc68ce1032e40d8a4bf7aedf82ec4d6b17fb24923a32c4afa83b6dd5f WHIRLPOOL 31e368f2c48dc6b85bd227ac25dbe47a19bff81c247d28bfc8b750e48bc6a0e45b3a20cfb0b5760dbfc3ac75f0bad9f75a9c0530e6a89edbe0c04f8700961d6a
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
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch
new file mode 100644
index 0000000..43964e2
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch
@@ -0,0 +1,53 @@
+diff -Naur LVM2.2.02.166.orig/lib/log/log.c LVM2.2.02.166/lib/log/log.c
+--- LVM2.2.02.166.orig/lib/log/log.c 2016-09-26 06:21:54.000000000 -0700
++++ LVM2.2.02.166/lib/log/log.c 2016-10-23 15:54:11.538608214 -0700
+@@ -161,6 +161,7 @@
+ * Close and reopen standard stream on file descriptor fd.
+ */
+ int reopen_standard_stream(FILE **stream, const char *mode)
++#if defined(__GLIBC__)
+ {
+ int fd, fd_copy, new_fd;
+ const char *name;
+@@ -207,6 +208,11 @@
+ *stream = new_stream;
+ return 1;
+ }
++#else
++{
++ return freopen(NULL, mode, *stream) != NULL;
++}
++#endif
+
+ void init_log_fn(lvm2_log_fn_t log_fn)
+ {
+diff -Naur LVM2.2.02.166.orig/tools/lvmcmdline.c LVM2.2.02.166/tools/lvmcmdline.c
+--- LVM2.2.02.166.orig/tools/lvmcmdline.c 2016-09-26 06:21:55.000000000 -0700
++++ LVM2.2.02.166/tools/lvmcmdline.c 2016-10-23 15:49:07.910610692 -0700
+@@ -1818,7 +1818,7 @@
+ int err = is_valid_fd(STDERR_FILENO);
+
+ if (!is_valid_fd(STDIN_FILENO) &&
+- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
++ !(freopen(_PATH_DEVNULL, "r", stdin))) {
+ if (err)
+ perror("stdin stream open");
+ else
+@@ -1828,7 +1828,7 @@
+ }
+
+ if (!is_valid_fd(STDOUT_FILENO) &&
+- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
++ !(freopen(_PATH_DEVNULL, "w", stdout))) {
+ if (err)
+ perror("stdout stream open");
+ /* else no stdout */
+@@ -1836,7 +1836,7 @@
+ }
+
+ if (!is_valid_fd(STDERR_FILENO) &&
+- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
++ !(freopen(_PATH_DEVNULL, "w", stderr))) {
+ printf("stderr stream open: %s\n",
+ strerror(errno));
+ return 0;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch
new file mode 100644
index 0000000..5957aef
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch
@@ -0,0 +1,40 @@
+diff -Naur LVM2.2.02.166.orig/lib/mm/memlock.c LVM2.2.02.166/lib/mm/memlock.c
+--- LVM2.2.02.166.orig/lib/mm/memlock.c 2016-09-26 06:21:54.000000000 -0700
++++ LVM2.2.02.166/lib/mm/memlock.c 2016-10-23 15:43:03.957002700 -0700
+@@ -173,6 +173,7 @@
+ * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the
+ * memory on free(), this is good enough for our purposes.
+ */
++#ifdef __GLIBC__
+ while (missing > 0) {
+ struct mallinfo inf = mallinfo();
+ hblks = inf.hblks;
+@@ -200,14 +201,17 @@
+ break;
+ }
+ }
++#endif
+
+ if ((_malloc_mem = malloc(_size_malloc)))
+ _touch_memory(_malloc_mem, _size_malloc);
+
++#ifdef __GLIBC__
+ /* free up the reserves so subsequent malloc's can use that memory */
+ for (i = 0; i < area; ++i)
+ free(areas[i]);
+ #endif
++#endif
+ }
+
+ static void _release_memory(void)
+diff -Naur LVM2.2.02.166.orig/libdaemon/server/daemon-server.c LVM2.2.02.166/libdaemon/server/daemon-server.c
+--- LVM2.2.02.166.orig/libdaemon/server/daemon-server.c 2016-09-26 06:21:55.000000000 -0700
++++ LVM2.2.02.166/libdaemon/server/daemon-server.c 2016-10-23 15:43:25.962220845 -0700
+@@ -18,6 +18,7 @@
+ #include "daemon-server.h"
+ #include "daemon-log.h"
+
++#include <fcntl.h>
+ #include <dlfcn.h>
+ #include <errno.h>
+ #include <pthread.h>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2018-12-29 20:06 Anthony G. Basile
0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2018-12-29 20:06 UTC (permalink / raw
To: gentoo-commits
commit: a51e6715937b32acc2e33ca76d54897b0fe05966
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 29 20:06:10 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 29 20:06:10 2018 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a51e6715
sys-fs/lvm2: sync with upstream
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
sys-fs/lvm2/Manifest | 5 +-
sys-fs/lvm2/files/lvm.rc-2.02.116-r4 | 132 ---------
.../files/{lvm.rc-2.02.166-r2 => lvm.rc-2.02.172} | 68 ++---
.../lvm2-2.02.129-dynamic-static-ldflags.patch | 59 ++++
.../files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch | 12 +
.../lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch | 53 ----
sys-fs/lvm2/files/lvm2-2.02.166-portability.patch | 40 ---
sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch | 13 +
.../files/lvm2-2.02.176-pthread-pkgconfig.patch | 29 ++
sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch | 15 +
.../lvm2-2.02.178-dynamic-static-ldflags.patch | 59 ++++
.../lvm2/files/lvm2-2.02.178-example.conf.in.patch | 50 ++++
.../lvm2-2.02.178-static-pkgconfig-libs.patch | 102 +++++++
sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch | 71 -----
sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch | 111 --------
sys-fs/lvm2/files/lvm2-musl-fixes.patch | 33 ---
sys-fs/lvm2/lvm2-2.02.116-r4.ebuild | 285 -------------------
sys-fs/lvm2/lvm2-2.02.116.ebuild | 275 -------------------
sys-fs/lvm2/lvm2-2.02.145-r2.ebuild | 58 +---
sys-fs/lvm2/lvm2-2.02.166-r2.ebuild | 301 ---------------------
sys-fs/lvm2/lvm2-2.02.171.ebuild | 301 ---------------------
sys-fs/lvm2/metadata.xml | 5 -
22 files changed, 388 insertions(+), 1689 deletions(-)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index ab4e667..353cb66 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,4 +1 @@
-DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
-DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549
-DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870
-DIST LVM2.2.02.171.tgz 2333643 SHA256 b815a711a2fabaa5c3dc1a4a284df0268bf0f325f0fc0f5c9530c9bbb54b9964 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883 WHIRLPOOL fedd62612c6bb4b7764277a0d4474ff3557f041858c71eb7bf2a1c06b646637fe719f91a12c1b5c58ccefa7f4d2daba6bf30409340c52fd3a1b8b01ce62467ab
+DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
deleted file mode 100644
index 74b4a41..0000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-_get_lvm_path() {
- local lvm_path=
- for lvm_path in /bin/lvm /sbin/lvm ; do
- [ -x "$lvm_path" ] && break
- done
- echo "${lvm_path}"
-}
-
-_need_lvmetad()
-{
- local lvm_path="$(_get_lvm_path)"
- [ ! -x "${lvm_path}" ] && return 1
- ${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1'
-}
-
-depend() {
- before checkfs fsck
- after modules device-mapper
- # We may use lvmetad based on the configuration. If we added lvmetad
- # support while lvm2 is running then we aren't dependent on it. For the
- # more common case, if its disabled in the config we aren't dependent
- # on it.
- config /etc/lvm/lvm.conf
- local _need=
- if service_started; then
- _need=$(service_get_value need)
- else
- if _need_lvmetad; then
- _need="${_need} lvmetad"
- fi
- fi
- need sysfs ${_need}
-}
-
-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
- lvm_path="$(_get_lvm_path)"
- 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
-}
-
-start_post()
-{
- # Save if we needed lvmetad
- if _need_lvmetad; then
- service_set_value need lvmetad
- 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/files/lvm.rc-2.02.166-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.172
similarity index 61%
rename from sys-fs/lvm2/files/lvm.rc-2.02.166-r2
rename to sys-fs/lvm2/files/lvm.rc-2.02.172
index 11329bb..4bc363c 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.172
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
_get_lvm_path() {
@@ -23,6 +23,7 @@ _need_lvmlockd()
[ ! -x "${lvm_path}" ] && return 1
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
}
+
depend() {
before checkfs fsck
after modules device-mapper
@@ -78,19 +79,19 @@ start() {
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"
+ lvm_commands="#!${lvm_path}\n"
# Extra PV find pass because some devices might not have been available until very recently
- lvm_commands="${lvm_commands}pvscan\n"
+ lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
# Now make the nodes
- lvm_commands="${lvm_commands}vgscan --mknodes\n"
+ lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
# And turn them on!
- lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
if _need_lvmlockd; then
# Start lockd VGs as required
- lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
fi
# 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
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
eend $? "Failed to setup the LVM"
fi
fi
@@ -112,34 +113,37 @@ stop() {
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)
+ # 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"
- 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
+ VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
+
+ if [ "$VGS" ]
+ then
+ local _ending="eend"
+ [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend"
+ ebegin " Shutting Down LVs & VGs"
+ #still echo stderr for debugging
+ lvm_commands="#!${lvm_path}\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --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
+ ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)"
+ fi
- einfo "Finished shutting down the Logical Volume Manager"
- return 0
-fi
+ einfo "Finished shutting down the Logical Volume Manager"
+ return 0
+ fi
}
# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch
new file mode 100644
index 0000000..efdfb81
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch
@@ -0,0 +1,59 @@
+--- LVM2.2.02.129/configure.in
++++ LVM2.2.02.129/configure.in
+@@ -31,6 +31,7 @@
+ linux*)
+ 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"
+@@ -2008,6 +2009,7 @@
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTING)
+ AC_SUBST(TESTSUITE_DATA)
+--- LVM2.2.02.129/daemons/dmeventd/Makefile.in
++++ LVM2.2.02.129/daemons/dmeventd/Makefile.in
+@@ -66,7 +66,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")
+--- LVM2.2.02.129/make.tmpl.in
++++ LVM2.2.02.129/make.tmpl.in
+@@ -48,6 +48,7 @@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+ LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+--- LVM2.2.02.129/tools/Makefile.in
++++ LVM2.2.02.129/tools/Makefile.in
+@@ -129,7 +129,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
+@@ -146,7 +146,7 @@
+ endif
+
+ 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.166-HPPA-no-O_DIRECT.patch b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
new file mode 100644
index 0000000..0f830e4
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
@@ -0,0 +1,12 @@
+--- a/lib/device/dev-io.c
++++ b/lib/device/dev-io.c
+@@ -505,7 +505,9 @@
+ dev->flags |= DEV_NOT_O_NOATIME;
+ if ((dev->fd = open(name, flags, 0777)) >= 0) {
+ log_debug_devs("%s: Not using O_NOATIME", name);
++#ifdef O_DIRECT_SUPPORT
+ goto opened;
++#endif
+ }
+ }
+ #endif
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch
deleted file mode 100644
index 43964e2..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.166-fix-stdio-usage.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff -Naur LVM2.2.02.166.orig/lib/log/log.c LVM2.2.02.166/lib/log/log.c
---- LVM2.2.02.166.orig/lib/log/log.c 2016-09-26 06:21:54.000000000 -0700
-+++ LVM2.2.02.166/lib/log/log.c 2016-10-23 15:54:11.538608214 -0700
-@@ -161,6 +161,7 @@
- * Close and reopen standard stream on file descriptor fd.
- */
- int reopen_standard_stream(FILE **stream, const char *mode)
-+#if defined(__GLIBC__)
- {
- int fd, fd_copy, new_fd;
- const char *name;
-@@ -207,6 +208,11 @@
- *stream = new_stream;
- return 1;
- }
-+#else
-+{
-+ return freopen(NULL, mode, *stream) != NULL;
-+}
-+#endif
-
- void init_log_fn(lvm2_log_fn_t log_fn)
- {
-diff -Naur LVM2.2.02.166.orig/tools/lvmcmdline.c LVM2.2.02.166/tools/lvmcmdline.c
---- LVM2.2.02.166.orig/tools/lvmcmdline.c 2016-09-26 06:21:55.000000000 -0700
-+++ LVM2.2.02.166/tools/lvmcmdline.c 2016-10-23 15:49:07.910610692 -0700
-@@ -1818,7 +1818,7 @@
- int err = is_valid_fd(STDERR_FILENO);
-
- if (!is_valid_fd(STDIN_FILENO) &&
-- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
-+ !(freopen(_PATH_DEVNULL, "r", stdin))) {
- if (err)
- perror("stdin stream open");
- else
-@@ -1828,7 +1828,7 @@
- }
-
- if (!is_valid_fd(STDOUT_FILENO) &&
-- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
-+ !(freopen(_PATH_DEVNULL, "w", stdout))) {
- if (err)
- perror("stdout stream open");
- /* else no stdout */
-@@ -1836,7 +1836,7 @@
- }
-
- if (!is_valid_fd(STDERR_FILENO) &&
-- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
-+ !(freopen(_PATH_DEVNULL, "w", stderr))) {
- printf("stderr stream open: %s\n",
- strerror(errno));
- return 0;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch
deleted file mode 100644
index 5957aef..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.166-portability.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -Naur LVM2.2.02.166.orig/lib/mm/memlock.c LVM2.2.02.166/lib/mm/memlock.c
---- LVM2.2.02.166.orig/lib/mm/memlock.c 2016-09-26 06:21:54.000000000 -0700
-+++ LVM2.2.02.166/lib/mm/memlock.c 2016-10-23 15:43:03.957002700 -0700
-@@ -173,6 +173,7 @@
- * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the
- * memory on free(), this is good enough for our purposes.
- */
-+#ifdef __GLIBC__
- while (missing > 0) {
- struct mallinfo inf = mallinfo();
- hblks = inf.hblks;
-@@ -200,14 +201,17 @@
- break;
- }
- }
-+#endif
-
- if ((_malloc_mem = malloc(_size_malloc)))
- _touch_memory(_malloc_mem, _size_malloc);
-
-+#ifdef __GLIBC__
- /* free up the reserves so subsequent malloc's can use that memory */
- for (i = 0; i < area; ++i)
- free(areas[i]);
- #endif
-+#endif
- }
-
- static void _release_memory(void)
-diff -Naur LVM2.2.02.166.orig/libdaemon/server/daemon-server.c LVM2.2.02.166/libdaemon/server/daemon-server.c
---- LVM2.2.02.166.orig/libdaemon/server/daemon-server.c 2016-09-26 06:21:55.000000000 -0700
-+++ LVM2.2.02.166/libdaemon/server/daemon-server.c 2016-10-23 15:43:25.962220845 -0700
-@@ -18,6 +18,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
-
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
diff --git a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
new file mode 100644
index 0000000..1cbf956
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
@@ -0,0 +1,13 @@
+diff --git a/make.tmpl.in b/make.tmpl.in
+index a40eaaa15..7eea943aa 100644
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
new file mode 100644
index 0000000..c0265e8
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
@@ -0,0 +1,29 @@
+--- LVM2.2.02.176/libdm/libdevmapper.pc.in
++++ LVM2.2.02.176/libdm/libdevmapper.pc.in
+@@ -9,4 +9,4 @@
+ Cflags: -I${includedir}
+ Libs: -L${libdir} -ldevmapper
+ Requires.private: @SELINUX_PC@ @UDEV_PC@
+-Libs.private: -lm @RT_LIBS@
++Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@
+--- LVM2.2.02.176/tools/Makefile.in
++++ LVM2.2.02.176/tools/Makefile.in
+@@ -93,6 +93,7 @@
+ INSTALL_LVM_TARGETS += install_tools_static
+ INSTALL_DMSETUP_TARGETS += install_dmsetup_static
+ INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++ STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+
+ LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper
+@@ -118,6 +119,10 @@
+
+ include $(top_builddir)/make.tmpl
+
++ifeq ("@STATIC_LINK@", "yes")
++ STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper: $(TARGETS_DM)
+
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
new file mode 100644
index 0000000..c831c6d
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/330255
+
+liblvm2app.so: undefined reference to `floor'
+
+--- LVM2.2.02.178/liblvm/Makefile.in
++++ LVM2.2.02.178/liblvm/Makefile.in
+@@ -43,7 +43,7 @@
+ include $(top_builddir)/make.tmpl
+
+ LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd
+-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
++LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm
+
+ .PHONY: install_dynamic install_static install_include install_pkgconfig
+
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
new file mode 100644
index 0000000..0a0e732
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
@@ -0,0 +1,59 @@
+--- LVM2.2.02.178/configure.ac
++++ LVM2.2.02.178/configure.ac
+@@ -33,6 +33,7 @@
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ # equivalent to -rdynamic
+ 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"
+@@ -2042,6 +2043,7 @@
+ AC_SUBST(SYSTEMD_LIBS)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTSUITE_DATA)
+ AC_SUBST(THIN)
+--- LVM2.2.02.178/daemons/dmeventd/Makefile.in
++++ LVM2.2.02.178/daemons/dmeventd/Makefile.in
+@@ -64,7 +64,7 @@
+ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS)
+
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+- $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
+ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
+
+ ifeq ("@PKGCONFIG@", "yes")
+--- LVM2.2.02.178/make.tmpl.in
++++ LVM2.2.02.178/make.tmpl.in
+@@ -64,6 +64,7 @@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+ LDFLAGS ?= @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+--- LVM2.2.02.178/tools/Makefile.in
++++ LVM2.2.02.178/tools/Makefile.in
+@@ -129,7 +129,7 @@
+
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+ @echo " [CC] $@"
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
+
+ all: device-mapper
+@@ -159,7 +159,7 @@
+
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
+ @echo " [CC] $@"
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++ $(Q) $(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.178-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
new file mode 100644
index 0000000..34c710d
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
@@ -0,0 +1,50 @@
+--- LVM2.2.02.178/conf/example.conf.in
++++ LVM2.2.02.178/conf/example.conf.in
+@@ -128,6 +128,9 @@
+ # Example
+ # 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/.*/" ]
+ # Reject the cdrom drive:
+ # filter = [ "r|/dev/cdrom|" ]
+ # Work with just loopback devices, e.g. for testing:
+@@ -704,7 +707,8 @@
+ # Configuration option global/fallback_to_lvm1.
+ # This setting is no longer used.
+ # This configuration option has an automatic default value.
+- # fallback_to_lvm1 = 0
++ # Gentoo: the LVM tools are a seperate package.
++ fallback_to_lvm1 = 0
+
+ # Configuration option global/format.
+ # This setting is no longer used.
+@@ -1508,7 +1512,7 @@
+
+ # Configuration section metadata.
+ # This configuration section has an automatic default value.
+-# metadata {
++metadata {
+
+ # Configuration option metadata/check_pv_device_sizes.
+ # Check device sizes are not smaller than corresponding PV sizes.
+@@ -1553,7 +1557,8 @@
+ #
+ # This configuration option is advanced.
+ # This configuration option has an automatic default value.
+- # pvmetadatacopies = 1
++ # Gentoo: enable for data safety, but PV resize is then disabled.
++ # pvmetadatacopies = 2
+
+ # Configuration option metadata/vgmetadatacopies.
+ # Number of copies of metadata to maintain for each VG.
+@@ -1608,7 +1613,7 @@
+ #
+ # This configuration option is advanced.
+ # This configuration option does not have a default value defined.
+-# }
++}
+
+ # Configuration section report.
+ # LVM report command output formatting.
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
new file mode 100644
index 0000000..989b308
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
@@ -0,0 +1,102 @@
+--- LVM2.2.02.178/configure.ac
++++ LVM2.2.02.178/configure.ac
+@@ -1238,6 +1238,7 @@
+ PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
+ [ BLKID_WIPING=yes
+ BLKID_PC="blkid"
++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ DEFAULT_USE_BLKID_WIPING=1
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ ], [if test "$BLKID_WIPING" = maybe; then
+@@ -1286,6 +1287,7 @@
+ if test "$UDEV_SYNC" = yes; then
+ pkg_config_init
+ 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.])
+
+ AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
+@@ -1564,19 +1566,32 @@
+ if test "$SELINUX" = yes; 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"])
++
++ dnl -- init pkgconfig if required
++ if test x$PKGCONFIG_INIT != x1; then
++ pkg_config_init
++ fi
++ PKG_CHECK_MODULES(SELINUX, libselinux, [
++ SELINUX_PC="libselinux"
++ 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 $SELINUX_LIBS"
++ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
+ SELINUX_PC="libselinux"
+ HAVE_SELINUX=yes ], [
+ AC_MSG_WARN(Disabling selinux)
+ SELINUX_LIBS=
+ SELINUX_PC=
+ HAVE_SELINUX=no ])
++ ])
+ fi
+
+ ################################################################################
+@@ -1927,6 +1942,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BUILD_CMIRRORD)
+ AC_SUBST(BUILD_DMEVENTD)
+@@ -2037,6 +2053,7 @@
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SBINDIR)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SYSCONFDIR)
+ AC_SUBST(SYSTEMD_LIBS)
+@@ -2053,6 +2070,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+--- LVM2.2.02.178/make.tmpl.in
++++ LVM2.2.02.178/make.tmpl.in
+@@ -59,7 +59,7 @@
+
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+@@ -75,10 +75,13 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_CFLAGS = @UDEV_CFLAGS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ SYSTEMD_LIBS = @SYSTEMD_LIBS@
+ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+
diff --git a/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch b/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch
deleted file mode 100644
index b7da941..0000000
--- a/sys-fs/lvm2/files/lvm2-avoid-mallinfo.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-File lvm2-2.02.116-r99.orig/.ipc_in is a fifo while file lvm2-2.02.116-r99/.ipc_in is a fifo
-File lvm2-2.02.116-r99.orig/.ipc_out is a fifo while file lvm2-2.02.116-r99/.ipc_out is a fifo
-diff -Naur lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c
---- lvm2-2.02.116-r99.orig/work/LVM2.2.02.116/lib/mm/memlock.c 2015-01-30 16:19:53.000000000 +0000
-+++ lvm2-2.02.116-r99/work/LVM2.2.02.116/lib/mm/memlock.c 2015-10-13 21:02:49.385224386 +0000
-@@ -134,10 +134,8 @@
- static void _allocate_memory(void)
- {
- #ifndef VALGRIND_POOL
-- void *stack_mem;
-+ void *stack_mem, *temp_malloc_mem;
- struct rlimit limit;
-- int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
-- char *areas[max_areas];
-
- /* Check if we could preallocate requested stack */
- if ((getrlimit (RLIMIT_STACK, &limit) == 0) &&
-@@ -146,50 +144,13 @@
- _touch_memory(stack_mem, _size_stack);
- /* FIXME else warn user setting got ignored */
-
-- /*
-- * When a brk() fails due to fragmented address space (which sometimes
-- * happens when we try to grab 8M or so), glibc will make a new
-- * arena. In this arena, the rules for using “direct” mmap are relaxed,
-- * circumventing the MAX_MMAPs and MMAP_THRESHOLD settings. We can,
-- * however, detect when this happens with mallinfo() and try to co-opt
-- * malloc into using MMAP as a MORECORE substitute instead of returning
-- * MMAP'd memory directly. Since MMAP-as-MORECORE does not munmap the
-- * memory on free(), this is good enough for our purposes.
-- */
-- while (missing > 0) {
-- struct mallinfo inf = mallinfo();
-- hblks = inf.hblks;
--
-- if ((areas[area] = malloc(_size_malloc_tmp)))
-- _touch_memory(areas[area], _size_malloc_tmp);
--
-- inf = mallinfo();
--
-- if (hblks < inf.hblks) {
-- /* malloc cheated and used mmap, even though we told it
-- not to; we try with twice as many areas, each half
-- the size, to circumvent the faulty logic in glibc */
-- free(areas[area]);
-- _size_malloc_tmp /= 2;
-- } else {
-- ++ area;
-- missing -= _size_malloc_tmp;
-- }
--
-- if (area == max_areas && missing > 0) {
-- /* Too bad. Warn the user and proceed, as things are
-- * most likely going to work out anyway. */
-- log_warn("WARNING: Failed to reserve memory, %d bytes missing.", missing);
-- break;
-- }
-- }
-+ if ((temp_malloc_mem = malloc(_size_malloc_tmp)))
-+ _touch_memory(temp_malloc_mem, _size_malloc_tmp);
-
- if ((_malloc_mem = malloc(_size_malloc)))
- _touch_memory(_malloc_mem, _size_malloc);
-
-- /* free up the reserves so subsequent malloc's can use that memory */
-- for (i = 0; i < area; ++i)
-- free(areas[i]);
-+ free(temp_malloc_mem);
- #endif
- }
-
diff --git a/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch
deleted file mode 100644
index 71fa5bf..0000000
--- a/sys-fs/lvm2/files/lvm2-fix-stdio-usage.patch
+++ /dev/null
@@ -1,111 +0,0 @@
---- LVM2.2.02.103.orig/lib/commands/toolcontext.c
-+++ LVM2.2.02.103/lib/commands/toolcontext.c
-@@ -1336,7 +1336,10 @@
- /*
- * Close and reopen stream on file descriptor fd.
- */
--static int _reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream)
-+#ifdef __GLIBC__
-+#define _reopen_stream(stream, fd, mode, name) __reopen_stream(stream, fd, mode, name, &stream)
-+
-+static int __reopen_stream(FILE *stream, int fd, const char *mode, const char *name, FILE **new_stream)
- {
- int fd_copy, new_fd;
-
-@@ -1363,6 +1366,9 @@
-
- return 1;
- }
-+#else
-+#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL)
-+#endif
-
- /* Entry point */
- struct cmd_context *create_toolcontext(unsigned is_long_lived,
-@@ -1371,7 +1377,6 @@
- unsigned threaded)
- {
- struct cmd_context *cmd;
-- FILE *new_stream;
- int flags;
-
- #ifdef M_MMAP_MAX
-@@ -1421,9 +1426,8 @@
- if (is_valid_fd(STDIN_FILENO) &&
- ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) &&
- (flags & O_ACCMODE) != O_WRONLY) {
-- if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream))
-+ if (!_reopen_stream(stdin, STDIN_FILENO, "r", "stdin"))
- goto_out;
-- stdin = new_stream;
- if (setvbuf(stdin, cmd->linebuffer, _IOLBF, linebuffer_size)) {
- log_sys_error("setvbuf", "");
- goto out;
-@@ -1433,9 +1437,8 @@
- if (is_valid_fd(STDOUT_FILENO) &&
- ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) &&
- (flags & O_ACCMODE) != O_RDONLY) {
-- if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream))
-+ if (!_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout"))
- goto_out;
-- stdout = new_stream;
- if (setvbuf(stdout, cmd->linebuffer + linebuffer_size,
- _IOLBF, linebuffer_size)) {
- log_sys_error("setvbuf", "");
-@@ -1715,7 +1718,6 @@
- void destroy_toolcontext(struct cmd_context *cmd)
- {
- struct dm_config_tree *cft_cmdline;
-- FILE *new_stream;
- int flags;
-
- if (cmd->dump_filter && cmd->filter && cmd->filter->dump &&
-@@ -1752,8 +1754,7 @@
- if (is_valid_fd(STDIN_FILENO) &&
- ((flags = fcntl(STDIN_FILENO, F_GETFL)) > 0) &&
- (flags & O_ACCMODE) != O_WRONLY) {
-- if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin", &new_stream)) {
-- stdin = new_stream;
-+ if (_reopen_stream(stdin, STDIN_FILENO, "r", "stdin")) {
- setlinebuf(stdin);
- } else
- cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */
-@@ -1762,8 +1763,7 @@
- if (is_valid_fd(STDOUT_FILENO) &&
- ((flags = fcntl(STDOUT_FILENO, F_GETFL)) > 0) &&
- (flags & O_ACCMODE) != O_RDONLY) {
-- if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout", &new_stream)) {
-- stdout = new_stream;
-+ if (_reopen_stream(stdout, STDOUT_FILENO, "w", "stdout")) {
- setlinebuf(stdout);
- } else
- cmd->linebuffer = NULL; /* Leave buffer in place (deliberate leak) */
---- LVM2.2.02.103.orig/tools/lvmcmdline.c
-+++ LVM2.2.02.103/tools/lvmcmdline.c
-@@ -1252,7 +1252,7 @@
- int err = is_valid_fd(STDERR_FILENO);
-
- if (!is_valid_fd(STDIN_FILENO) &&
-- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
-+ !freopen(_PATH_DEVNULL, "r", stdin)) {
- if (err)
- perror("stdin stream open");
- else
-@@ -1262,7 +1262,7 @@
- }
-
- if (!is_valid_fd(STDOUT_FILENO) &&
-- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
-+ !freopen(_PATH_DEVNULL, "w", stdout)) {
- if (err)
- perror("stdout stream open");
- /* else no stdout */
-@@ -1270,7 +1270,7 @@
- }
-
- if (!is_valid_fd(STDERR_FILENO) &&
-- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
-+ !freopen(_PATH_DEVNULL, "w", stderr)) {
- printf("stderr stream open: %s\n",
- strerror(errno));
- return 0;
diff --git a/sys-fs/lvm2/files/lvm2-musl-fixes.patch b/sys-fs/lvm2/files/lvm2-musl-fixes.patch
deleted file mode 100644
index b62e80a..0000000
--- a/sys-fs/lvm2/files/lvm2-musl-fixes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -uar LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c
---- LVM2.2.02.110-old/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:37:01.226755157 +0000
-+++ LVM2.2.02.110/daemons/lvmetad/lvmetad-core.c 2015-05-14 21:44:08.098585801 +0000
-@@ -124,7 +124,7 @@
- if (!(vg = dm_hash_lookup(s->lock.vg, id))) {
- if (!(vg = malloc(sizeof(pthread_mutex_t))) ||
- pthread_mutexattr_init(&rec) ||
-- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP) ||
-+ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE) ||
- pthread_mutex_init(vg, &rec))
- goto bad;
- if (!dm_hash_insert(s->lock.vg, id, vg)) {
-@@ -1152,7 +1152,7 @@
- ls->log = s->log;
-
- pthread_mutexattr_init(&rec);
-- pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE_NP);
-+ pthread_mutexattr_settype(&rec, PTHREAD_MUTEX_RECURSIVE);
- pthread_mutex_init(&ls->lock.pvid_to_pvmeta, &rec);
- pthread_mutex_init(&ls->lock.vgid_to_metadata, &rec);
- pthread_mutex_init(&ls->lock.pvid_to_vgid, NULL);
-Only in LVM2.2.02.110/lib/commands: toolcontext.c.orig
-diff -uar LVM2.2.02.110-old/libdaemon/server/daemon-server.c LVM2.2.02.110/libdaemon/server/daemon-server.c
---- LVM2.2.02.110-old/libdaemon/server/daemon-server.c 2015-05-14 21:37:01.256755555 +0000
-+++ LVM2.2.02.110/libdaemon/server/daemon-server.c 2015-05-14 21:37:51.108437752 +0000
-@@ -26,6 +26,7 @@
- #include <sys/un.h>
- #include <unistd.h>
- #include <signal.h>
-+#include <fcntl.h>
-
- #include <syslog.h> /* FIXME. For the global closelog(). */
-
diff --git a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
deleted file mode 100644
index ac14fae..0000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
+++ /dev/null
@@ -1,285 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ~x86"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
- systemd? ( udev )
- clvm? ( !systemd )"
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
- readline? ( sys-libs/readline:0= )
- udev? ( >=virtual/libudev-208:=[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? (
- app-arch/cpio
- sys-apps/makedev
- )
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
- virtual/pkgconfig
- >=sys-devel/binutils-2.20.1-r1
- static? (
- selinux? ( sys-libs/libselinux[static-libs] )
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
- >=sys-apps/util-linux-2.16[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.108-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
-
- if use udev && ! use device-mapper-only; then
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
- elog "if it was previously disabled."
- fi
-
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
- # 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.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
- epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
- # Patches for musl
- epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux
- epatch "${FILESDIR}"/${PN}-musl-fixes.patch
- epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch
-
- # Without thin-privision-tools, there is nothing to install for target install_man7:
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
- 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)"
- use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
- # 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}"
- if use thin; then
- myconf="${myconf} --with-thin=internal --with-cache=internal"
- local texec
- for texec in check dump repair restore; do
- myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
- myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
- done
- else
- myconf="${myconf} --with-thin=none --with-cache=none"
- fi
-
- 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) \
- $(use_enable systemd udev-systemd-background-jobs) \
- "$(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_tmpfiles_configuration"
- # install systemd related files only when requested, bug #522430
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
- 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.116-r4 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.116-r3 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."
- ewarn
- ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
- ewarn "run the following to update the init script dependencies: "
- ewarn "# rc-update -u"
-}
-
-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"
-}
diff --git a/sys-fs/lvm2/lvm2-2.02.116.ebuild b/sys-fs/lvm2/lvm2-2.02.116.ebuild
deleted file mode 100644
index 3d573a8..0000000
--- a/sys-fs/lvm2/lvm2-2.02.116.ebuild
+++ /dev/null
@@ -1,275 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc x86"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
- systemd? ( udev )
- static? ( !udev )" #520450
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
- readline? ( sys-libs/readline:0= )
- udev? ( >=virtual/libudev-208:=[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.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-DEPEND="${DEPEND_COMMON}
- virtual/pkgconfig
- >=sys-devel/binutils-2.20.1-r1
- static? (
- selinux? ( sys-libs/libselinux[static-libs] )
- udev? ( >=virtual/libudev-208:=[static-libs] )
- >=sys-apps/util-linux-2.16[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.108-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
-
- if use udev && ! use device-mapper-only; then
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
- elog "if it was previously disabled."
- fi
-
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
- # 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.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
- epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
- # Patches for musl
- epatch "${FILESDIR}"/${PN}-fix-stdio-usage.patch # Patch from alpine linux
- epatch "${FILESDIR}"/${PN}-musl-fixes.patch
- epatch "${FILESDIR}"/${PN}-avoid-mallinfo.patch
-
- # Without thin-privision-tools, there is nothing to install for target install_man7:
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
- 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)"
- use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
- # 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}"
- if use thin; then
- myconf="${myconf} --with-thin=internal --with-cache=internal"
- local texec
- for texec in check dump repair restore; do
- myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
- myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
- done
- else
- myconf="${myconf} --with-thin=none --with-cache=none"
- fi
-
- 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) \
- $(use_enable systemd udev-systemd-background-jobs) \
- "$(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-r2 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"
-}
diff --git a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
index f0fb589..80210ff 100644
--- a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,20 +11,12 @@ SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc x86"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
- systemd? ( udev )
- clvm? ( !systemd )"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !lvm1 !lvm2create_initrd !thin )
+ systemd? ( udev )"
DEPEND_COMMON="
- clvm? (
- cman? ( =sys-cluster/cman-3* )
- corosync? ( sys-cluster/corosync )
- openais? ( sys-cluster/openais )
- =sys-cluster/libdlm-3*
- )
-
readline? ( sys-libs/readline:0= )
systemd? ( >=sys-apps/systemd-205:0= )
udev? ( >=virtual/libudev-208:=[static-libs?] )"
@@ -35,7 +27,6 @@ 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 )
@@ -171,29 +162,7 @@ src_configure() {
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
use hppa && myconf+=( --disable-o_direct )
- if use clvm; then
- 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}"
- use corosync && clvmd="${clvmd:+$clvmd,}corosync"
- use openais && clvmd="${clvmd:+$clvmd,}openais"
- [ -z "${clvmd}" ] && clvmd="none"
- myconf+=( --with-clvmd=${clvmd} )
- myconf+=( --with-pool=${buildmode} )
- else
- myconf+=( --with-clvmd=none --with-cluster=none )
- fi
+ myconf+=( --with-clvmd=none --with-cluster=none )
econf \
$(use_enable readline) \
@@ -253,17 +222,14 @@ src_install() {
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 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
+ if use !device-mapper-only ; then
+ 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
+ fi
else
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
fi
diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
deleted file mode 100644
index 212f396..0000000
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
+++ /dev/null
@@ -1,301 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
- systemd? ( udev )
- clvm? ( !systemd )"
-
-DEPEND_COMMON="
- clvm? (
- cman? ( =sys-cluster/cman-3* )
- corosync? ( sys-cluster/corosync )
- openais? ( sys-cluster/openais )
- =sys-cluster/libdlm-3*
- )
-
- readline? ( sys-libs/readline:0= )
- sanlock? ( sys-cluster/sanlock )
- systemd? ( >=sys-apps/systemd-205:0= )
- udev? ( >=virtual/libudev-208:=[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.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
- virtual/pkgconfig
- >=sys-devel/binutils-2.20.1-r1
- sys-devel/autoconf-archive
- static? (
- selinux? ( sys-libs/libselinux[static-libs] )
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
- >=sys-apps/util-linux-2.16[static-libs]
- )"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-PATCHES=(
- # Gentoo specific modification(s):
- "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
- # Musl fixes
- "${FILESDIR}"/${PN}-2.02.166-fix-stdio-usage.patch
- "${FILESDIR}"/${PN}-2.02.166-portability.patch
-
- # For upstream -- review and forward:
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
- "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
- "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
- "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
- "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
- "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
- "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
- "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
- #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
-)
-
-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() {
- default
-
- 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
-
- if use udev && ! use device-mapper-only; then
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
- elog "if it was previously disabled."
- fi
-
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
- # Without thin-privision-tools, there is nothing to install for target install_man7:
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
- eautoreconf
-}
-
-src_configure() {
- filter-flags -flto
- local myconf=()
- local buildmode
-
- myconf+=( $(use_enable !device-mapper-only dmeventd) )
- myconf+=( $(use_enable !device-mapper-only cmdlib) )
- myconf+=( $(use_enable !device-mapper-only applib) )
- myconf+=( $(use_enable !device-mapper-only fsadm) )
- myconf+=( $(use_enable !device-mapper-only lvmetad) )
- use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
- # 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+=( --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+=( --with-mirrors=${dmbuildmode} )
- myconf+=( --with-snapshots=${dmbuildmode} )
- if use thin; then
- myconf+=( --with-thin=internal --with-cache=internal )
- local texec
- for texec in check dump repair restore; do
- myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
- myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
- done
- else
- myconf+=( --with-thin=none --with-cache=none )
- fi
-
- if use lvm1; then
- myconf+=( --with-lvm1=${buildmode} )
- else
- myconf+=( --with-lvm1=none )
- fi
-
- # disable O_DIRECT support on hppa, breaks pv detection (#99532)
- use hppa && myconf+=( --disable-o_direct )
-
- if use clvm; then
- 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}"
- use corosync && clvmd="${clvmd:+$clvmd,}corosync"
- use openais && clvmd="${clvmd:+$clvmd,}openais"
- [ -z "${clvmd}" ] && clvmd="none"
- myconf+=( --with-clvmd=${clvmd} )
- myconf+=( --with-pool=${buildmode} )
-
- else
- 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) \
- $(use_enable sanlock lockd-sanlock) \
- $(use_enable systemd udev-systemd-background-jobs) \
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- ${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_tmpfiles_configuration"
- # install systemd related files only when requested, bug #522430
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
- 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.166-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.116-r3 lvmetad
- fi
-
- if use sanlock; then
- newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
- 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"
-}
diff --git a/sys-fs/lvm2/lvm2-2.02.171.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild
deleted file mode 100644
index 9397471..0000000
--- a/sys-fs/lvm2/lvm2-2.02.171.ebuild
+++ /dev/null
@@ -1,301 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
- systemd? ( udev )
- clvm? ( !systemd )"
-
-DEPEND_COMMON="
- clvm? (
- cman? ( =sys-cluster/cman-3* )
- corosync? ( sys-cluster/corosync )
- openais? ( sys-cluster/openais )
- =sys-cluster/libdlm-3*
- )
-
- readline? ( sys-libs/readline:0= )
- sanlock? ( sys-cluster/sanlock )
- systemd? ( >=sys-apps/systemd-205:0= )
- udev? ( >=virtual/libudev-208:=[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.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
- virtual/pkgconfig
- >=sys-devel/binutils-2.20.1-r1
- sys-devel/autoconf-archive
- static? (
- selinux? ( sys-libs/libselinux[static-libs] )
- udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
- >=sys-apps/util-linux-2.16[static-libs]
- )"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-PATCHES=(
- # Gentoo specific modification(s):
- "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
- # Musl fixes
- "${FILESDIR}"/${PN}-2.02.166-fix-stdio-usage.patch
- "${FILESDIR}"/${PN}-2.02.166-portability.patch
-
- # For upstream -- review and forward:
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
- "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
- "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
- "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
- "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
- "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
- "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
- "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
- #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
-)
-
-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() {
- default
-
- 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
-
- if use udev && ! use device-mapper-only; then
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
- elog "if it was previously disabled."
- fi
-
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
- # Without thin-privision-tools, there is nothing to install for target install_man7:
- use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
- eautoreconf
-}
-
-src_configure() {
- filter-flags -flto
- local myconf=()
- local buildmode
-
- myconf+=( $(use_enable !device-mapper-only dmeventd) )
- myconf+=( $(use_enable !device-mapper-only cmdlib) )
- myconf+=( $(use_enable !device-mapper-only applib) )
- myconf+=( $(use_enable !device-mapper-only fsadm) )
- myconf+=( $(use_enable !device-mapper-only lvmetad) )
- use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
- # 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+=( --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+=( --with-mirrors=${dmbuildmode} )
- myconf+=( --with-snapshots=${dmbuildmode} )
- if use thin; then
- myconf+=( --with-thin=internal --with-cache=internal )
- local texec
- for texec in check dump repair restore; do
- myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
- myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
- done
- else
- myconf+=( --with-thin=none --with-cache=none )
- fi
-
- if use lvm1; then
- myconf+=( --with-lvm1=${buildmode} )
- else
- myconf+=( --with-lvm1=none )
- fi
-
- # disable O_DIRECT support on hppa, breaks pv detection (#99532)
- use hppa && myconf+=( --disable-o_direct )
-
- if use clvm; then
- 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}"
- use corosync && clvmd="${clvmd:+$clvmd,}corosync"
- use openais && clvmd="${clvmd:+$clvmd,}openais"
- [ -z "${clvmd}" ] && clvmd="none"
- myconf+=( --with-clvmd=${clvmd} )
- myconf+=( --with-pool=${buildmode} )
- myconf+=( --enable-lvmlockd-dlm )
- else
- 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) \
- $(use_enable sanlock lvmlockd-sanlock) \
- $(use_enable systemd udev-systemd-background-jobs) \
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- ${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_tmpfiles_configuration"
- # install systemd related files only when requested, bug #522430
- use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
- 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.166-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.116-r3 lvmetad
- fi
-
- if use sanlock; then
- newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
- 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"
-}
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index cca547c..7d493c0 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -16,15 +16,10 @@
<description>Backup to Robin. Please CC on bugs.</description>
</maintainer>
<use>
- <flag name="clvm">Allow users to build clustered lvm2</flag>
- <flag name="cman">Cman support for clustered lvm</flag>
- <flag name="corosync">Corosync support for clustered lvm</flag>
<flag name="lvm1">Allow users to build lvm2 with lvm1 support</flag>
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
- <flag name="openais">Openais support for clustered lvm</flag>
<flag name="thin">Support for thin volumes</flag>
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
- <flag name="sanlock">Enable lvmlockd with support for sanlock</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2019-01-20 2:56 Anthony G. Basile
0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2019-01-20 2:56 UTC (permalink / raw
To: gentoo-commits
commit: 42db1db01c7354108dd9d59dfa15915de8fd8928
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
AuthorDate: Sun Jan 20 02:45:09 2019 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Jan 20 02:55:47 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=42db1db0
sys-fs/lvm2: version bump to 2.02.183
Package-Manager: Portage-2.3.56, Repoman-2.3.12
Signed-off-by: Marty E. Plummer <hanetzer <AT> startmail.com>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
sys-fs/lvm2/Manifest | 1 +
.../lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch | 29 +++
sys-fs/lvm2/files/lvm2-2.02.183-portability.patch | 21 ++
sys-fs/lvm2/lvm2-2.02.183.ebuild | 262 +++++++++++++++++++++
sys-fs/lvm2/metadata.xml | 1 +
5 files changed, 314 insertions(+)
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 353cb66..bcbab95 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1 +1,2 @@
DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
+DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
new file mode 100644
index 0000000..8564d08
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
@@ -0,0 +1,29 @@
+--- a/tools/lvmcmdline.c
++++ b/tools/lvmcmdline.c
+@@ -3110,7 +3110,7 @@ static int _check_standard_fds(void)
+ int err = is_valid_fd(STDERR_FILENO);
+
+ if (!is_valid_fd(STDIN_FILENO) &&
+- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
++ !freopen(_PATH_DEVNULL, "r", stdin)) {
+ if (err)
+ perror("stdin stream open");
+ else
+@@ -3120,7 +3120,7 @@ static int _check_standard_fds(void)
+ }
+
+ if (!is_valid_fd(STDOUT_FILENO) &&
+- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
++ !freopen(_PATH_DEVNULL, "r", stdout)) {
+ if (err)
+ perror("stdout stream open");
+ /* else no stdout */
+@@ -3128,7 +3128,7 @@ static int _check_standard_fds(void)
+ }
+
+ if (!is_valid_fd(STDERR_FILENO) &&
+- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
++ !freopen(_PATH_DEVNULL, "w", stderr)) {
+ printf("stderr stream open: %s\n",
+ strerror(errno));
+ return 0;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
new file mode 100644
index 0000000..ecdcb1c
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
@@ -0,0 +1,21 @@
+--- a/lib/mm/memlock.c
++++ b/lib/mm/memlock.c
+@@ -159,7 +159,7 @@ static void _touch_memory(void *mem, siz
+
+ static void _allocate_memory(void)
+ {
+-#ifndef VALGRIND_POOL
++#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
+ void *stack_mem;
+ struct rlimit limit;
+ int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
+--- a/libdaemon/server/daemon-server.c
++++ b/libdaemon/server/daemon-server.c
+@@ -18,6 +18,7 @@
+ #include "daemon-server.h"
+ #include "daemon-log.h"
+
++#include <fcntl.h>
+ #include <dlfcn.h>
+ #include <errno.h>
+ #include <pthread.h>
diff --git a/sys-fs/lvm2/lvm2-2.02.183.ebuild b/sys-fs/lvm2/lvm2-2.02.183.ebuild
new file mode 100644
index 0000000..1a2fab5
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.183.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
+ systemd? ( udev )"
+
+DEPEND_COMMON="
+ dev-libs/libaio[static-libs?]
+ static? ( dev-libs/libaio[static-libs] )
+ !static? ( dev-libs/libaio[static-libs?] )
+ readline? ( sys-libs/readline:0= )
+ sanlock? ( sys-cluster/sanlock )
+ systemd? ( >=sys-apps/systemd-205:0= )
+ udev? ( >=virtual/libudev-208:=[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/lvm-user
+ >=sys-apps/util-linux-2.16
+ lvm2create_initrd? ( sys-apps/makedev )
+ thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig
+ >=sys-devel/binutils-2.20.1-r1
+ sys-devel/autoconf-archive
+ static? (
+ selinux? ( sys-libs/libselinux[static-libs] )
+ udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+ >=sys-apps/util-linux-2.16[static-libs]
+ )"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+ # Gentoo specific modification(s):
+ "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
+
+ # Musl fixes
+ "${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
+ "${FILESDIR}"/${PN}-2.02.183-portability.patch
+
+ # For upstream -- review and forward:
+ "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+ "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+ "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+ "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
+ "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
+ "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
+ "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
+ "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
+ "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
+ #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+)
+
+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() {
+ default
+
+ 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{.ac,} || die #480212
+
+ if use udev && ! use device-mapper-only; then
+ sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+ elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+ elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+ elog "if it was previously disabled."
+ fi
+
+ sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+ # Without thin-privision-tools, there is nothing to install for target install_man7:
+ if ! use thin ; then
+ sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -flto
+ local myeconfargs=()
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ myeconfargs+=(
+ $(use_enable !device-mapper-only dmeventd)
+ $(use_enable !device-mapper-only cmdlib)
+ $(use_enable !device-mapper-only applib)
+ $(use_enable !device-mapper-only fsadm)
+ $(use_enable !device-mapper-only lvmetad)
+ $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
+
+ # This only causes the .static versions to become available
+ $(usex static --enable-static_link '')
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ --with-mirrors="$(usex device-mapper-only none internal)"
+ --with-snapshots="$(usex device-mapper-only none internal)"
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ $(usex hppa --disable-o_direct '')
+ )
+
+ if use thin; then
+ myeconfargs+=( --with-thin=internal --with-cache=internal )
+ local texec
+ for texec in check dump repair restore; do
+ myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+ myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+ done
+ else
+ myeconfargs+=( --with-thin=none --with-cache=none )
+ fi
+
+ myeconfargs+=( --with-clvmd=none --with-cluster=none )
+
+ myeconfargs+=(
+ $(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)
+ $(use_enable sanlock lvmlockd-sanlock)
+ $(use_enable systemd udev-systemd-background-jobs)
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ CLDFLAGS="${LDFLAGS}"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+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_TARGETS=( install install_tmpfiles_configuration )
+ # install systemd related files only when requested, bug #522430
+ use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
+ 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.172 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.116-r3 lvmetad
+ fi
+
+ if use sanlock; then
+ newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
+ 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"
+}
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index 7d493c0..c1a65d7 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -20,6 +20,7 @@
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
<flag name="thin">Support for thin volumes</flag>
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
+ <flag name="sanlock">Enable lvmlockd with support for sanlock</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2019-05-10 0:55 Anthony G. Basile
0 siblings, 0 replies; 8+ messages in thread
From: Anthony G. Basile @ 2019-05-10 0:55 UTC (permalink / raw
To: gentoo-commits
commit: 34562518b28c188f62e8e3e6f12a917150d559f4
Author: thyrc <thyrc <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Thu May 9 10:54:31 2019 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri May 10 00:55:18 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=34562518
re-implement libc specific reopen_stream
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
...183-implement-libc-specific-reopen_stream.patch | 24 ++++++++++++++++++++++
sys-fs/lvm2/lvm2-2.02.183.ebuild | 1 +
2 files changed, 25 insertions(+)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
new file mode 100644
index 0000000..6034be3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
@@ -0,0 +1,24 @@
+diff --git a/lib/log/log.c b/lib/log/log.c
+index 79fbd7a..0999d10 100644
+--- a/lib/log/log.c
++++ b/lib/log/log.c
+@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
+ * Close and reopen standard stream on file descriptor fd.
+ */
+ int reopen_standard_stream(FILE **stream, const char *mode)
++#ifdef __GLIBC__
+ {
+ int fd, fd_copy, new_fd;
+ const char *name;
+@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
+ *stream = new_stream;
+ return 1;
+ }
++#else
++{
++ return (freopen(NULL, mode, *stream) != NULL);
++}
++#endif
+
+ void init_log_fn(lvm2_log_fn_t log_fn)
+ {
diff --git a/sys-fs/lvm2/lvm2-2.02.183.ebuild b/sys-fs/lvm2/lvm2-2.02.183.ebuild
index 9697b02..b3a7fb5 100644
--- a/sys-fs/lvm2/lvm2-2.02.183.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.183.ebuild
@@ -56,6 +56,7 @@ PATCHES=(
# Musl fixes
"${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
"${FILESDIR}"/${PN}-2.02.183-portability.patch
+ "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch
# For upstream -- review and forward:
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2019-07-22 22:06 Jory Pratt
0 siblings, 0 replies; 8+ messages in thread
From: Jory Pratt @ 2019-07-22 22:06 UTC (permalink / raw
To: gentoo-commits
commit: f428c974ff04e4e3b50305dc72d20b35289aa26b
Author: Matthew Thode <mthode <AT> mthode <DOT> org>
AuthorDate: Mon Jul 22 19:43:27 2019 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 22:06:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=f428c974
sys-fs/lvm2: update ebuild based on what's stable in tree
Package-Manager: Portage-2.3.66, Repoman-2.3.16
RepoMan-Options: --force
Manifest-Sign-Key: 0x33ED3FD25AFC78BA
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
Signed-off-by: Matthew Thode <mthode <AT> mthode.org>
sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 | 21 ++
sys-fs/lvm2/files/lvm.confd-2.02.184-r3 | 9 +
sys-fs/lvm2/files/lvm.rc-2.02.184-r3 | 154 ++++++++++++
...ading-metadata-with-invalid-creation_time.patch | 72 ++++++
.../lvm2-2.02.184-dmeventd-no-idle-exit.patch | 68 +++++
sys-fs/lvm2/lvm2-2.02.184-r4.ebuild | 274 +++++++++++++++++++++
6 files changed, 598 insertions(+)
diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
new file mode 100644
index 0000000..bc08c0a
--- /dev/null
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command=/sbin/dmeventd
+command_args_foreground='-f'
+extra_started_commands=reload
+pidfile=/run/dmeventd.pid
+# Control idle exit behavior of daemon
+export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1}
+
+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
+}
+
+reload() {
+ # TODO: this is not supported under supervisors
+ ${command} -R
+}
diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 b/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
new file mode 100644
index 0000000..b29e170
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
@@ -0,0 +1,9 @@
+# If LVM is built with udev, you must ensure udev is running first!
+# Otherwise it will hang
+rc_need="udev"
+
+# 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.184-r3 b/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
new file mode 100644
index 0000000..b48efb0
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
@@ -0,0 +1,154 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+_get_lvm_path() {
+ local lvm_path=
+ for lvm_path in /bin/lvm /sbin/lvm ; do
+ [ -x "$lvm_path" ] && break
+ done
+ echo "${lvm_path}"
+}
+
+_need_lvmetad()
+{
+ local lvm_path="$(_get_lvm_path)"
+ [ ! -x "${lvm_path}" ] && return 1
+ ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
+}
+
+_need_lvmlockd()
+{
+ local lvm_path="$(_get_lvm_path)"
+ [ ! -x "${lvm_path}" ] && return 1
+ ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
+}
+
+depend() {
+ before checkfs fsck
+ after modules device-mapper
+ # We may use lvmetad based on the configuration. If we added lvmetad
+ # support while lvm2 is running then we aren't dependent on it. For the
+ # more common case, if its disabled in the config we aren't dependent
+ # on it.
+ config /etc/lvm/lvm.conf
+ local _need=
+ if service_started; then
+ _need=$(service_get_value need)
+ else
+ if _need_lvmetad; then
+ _need="${_need} lvmetad"
+ fi
+ if _need_lvmlockd; then
+ _need="${_need} lvmlockd"
+ fi
+ fi
+ # Make sure you review /etc/conf.d/lvm as well!
+ # Depending on your system, it might also introduce udev & mdraid
+ need sysfs ${_need}
+}
+
+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
+ lvm_path="$(_get_lvm_path)"
+ 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}\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
+ # And turn them on!
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
+ if _need_lvmlockd; then
+ # Start lockd VGs as required
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
+ fi
+ # Order of this is important, have to work around dash and LVM readline
+ printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
+ eend $? "Failed to setup the LVM"
+ fi
+ fi
+}
+
+start_post()
+{
+ # Save if we needed lvmetad
+ if _need_lvmetad; then
+ service_set_value need lvmetad
+ 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
+ local _ending="eend"
+ [ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend"
+ ebegin " Shutting Down LVs & VGs"
+ #still echo stderr for debugging
+ lvm_commands="#!${lvm_path}\n"
+ # Extra PV find pass because some devices might not have been available until very recently
+ lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
+ # Now make the nodes
+ lvm_commands="${lvm_commands}vgchange --config '${config}' --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
+ rc=$?
+ msg="Failed (possibly some LVs still needed for /usr or root)"
+ [ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0
+ ${_ending} $rc "${msg}"
+ fi
+
+ einfo "Finished shutting down the Logical Volume Manager"
+ return 0
+ fi
+}
+
+# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch b/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
new file mode 100644
index 0000000..34968c7
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
@@ -0,0 +1,72 @@
+From a397b69ce33d811aba7d64d54b5c8e0efb86fd15 Mon Sep 17 00:00:00 2001
+From: Zdenek Kabelac <zkabelac@redhat.com>
+Date: Fri, 10 May 2019 14:40:11 +0200
+Subject: [PATCH] metadata: allow reading metadata with invalid creation_time
+
+lvm2 till version 2.02.169 (commit 78d004efa8a1809cea68283e6204edfa9d7c1091)
+was printing invalid creation_time argument into metadata on 32bit arch.
+
+However with commit ba9820b14223b731125c83dbc9709aa44fdcdbf1 we started
+to properly validate all input numbers and thus we refused to accept
+invalid metadata with 'garbage' string - but this results in the
+situation where metadata produced on older lvm2 on 32 bit architecture
+will become unreadable after upgrade.
+
+To fix this case - extend libdm parser in a way, that whenever we
+find error integer value, we also check if the parsed value is not for
+creation_time node and in this case we let the metadata pass through
+with made-up date 2018-05-24 (release date of 2.02.169).
+---
+ libdm/libdm-config.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c
+index 3f0d2510e..382f86bbf 100644
+--- a/libdm/libdm-config.c
++++ b/libdm/libdm-config.c
+@@ -51,6 +51,8 @@ struct parser {
+
+ struct dm_pool *mem;
+ int no_dup_node_check; /* whether to disable dup node checking */
++ const char *key; /* last obtained key */
++ unsigned ignored_creation_time;
+ };
+
+ struct config_output {
+@@ -176,7 +178,7 @@ static int _do_dm_config_parse(struct dm_config_tree *cft, const char *start, co
+ /* TODO? if (start == end) return 1; */
+
+ struct parser *p;
+- if (!(p = dm_pool_alloc(cft->mem, sizeof(*p))))
++ if (!(p = dm_pool_zalloc(cft->mem, sizeof(*p))))
+ return_0;
+
+ p->mem = cft->mem;
+@@ -615,6 +617,7 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
+ match(TOK_SECTION_E);
+ } else {
+ match(TOK_EQ);
++ p->key = root->key;
+ if (!(value = _value(p)))
+ return_NULL;
+ if (root->v)
+@@ -682,8 +685,17 @@ static struct dm_config_value *_type(struct parser *p)
+ errno = 0;
+ v->v.i = strtoll(p->tb, NULL, 0); /* FIXME: check error */
+ if (errno) {
+- log_error("Failed to read int token.");
+- return NULL;
++ if (errno == ERANGE && p->key &&
++ strcmp("creation_time", p->key) == 0) {
++ /* Due to a bug in some older 32bit builds (<2.02.169),
++ * lvm was able to produce invalid creation_time string */
++ v->v.i = 1527120000; /* Pick 2018-05-24 day instead */
++ if (!p->ignored_creation_time++)
++ log_warn("WARNING: Invalid creation_time found in metadata (repaired with next metadata update).");
++ } else {
++ log_error("Failed to read int token.");
++ return NULL;
++ }
+ }
+ match(TOK_INT);
+ break;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
new file mode 100644
index 0000000..c80bd2b
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
@@ -0,0 +1,68 @@
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 17 Apr 2019 06:54:27 +0000
+Subject: [PATCH] dmeventd configurable idle exit time
+
+dmeventd nominally exits after 1 hour of idle time. There are use cases for
+this, esp. with socket activation, but also cases where users don't expect
+dmeventd to exit.
+
+Provide a tuning knob via environment variable, DMEVENTD_IDLE_EXIT_TIMEOUT,
+that can be -1 to not exit, or a configurable time for different idle exit.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Fixes: https://bugs.gentoo.org/682556
+
+diff -Nuar LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.184/daemons/dmeventd/dmeventd.c
+--- LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c 2019-03-22 03:14:59.000000000 -0700
++++ LVM2.2.02.184/daemons/dmeventd/dmeventd.c 2019-04-17 00:18:23.535029906 -0700
+@@ -2158,6 +2158,18 @@
+ .server_path = DM_EVENT_FIFO_SERVER
+ };
+ time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
++
++ /* Provide a basic way to config the idle timeout */
++ char* idle_exit_timeout_env = getenv("DMEVENTD_IDLE_EXIT_TIMEOUT") ? : NULL;
++ if(NULL != idle_exit_timeout_env) {
++ char* endptr;
++ idle_exit_timeout = strtol(idle_exit_timeout_env, &endptr, 10);
++ if (errno == ERANGE || *endptr != '\0') {
++ fprintf(stderr, "DMEVENTD_IDLE_EXIT_TIMEOUT: bad time input\n");
++ exit(EXIT_FAILURE);
++ }
++ }
++
+ opterr = 0;
+ optind = 0;
+
+@@ -2253,7 +2265,7 @@
+ _process_initial_registrations();
+
+ for (;;) {
+- if (_idle_since) {
++ if (_idle_since || _exit_now) {
+ if (_exit_now) {
+ if (_exit_now == DM_SCHEDULED_EXIT)
+ break; /* Only prints shutdown message */
+@@ -2262,7 +2274,7 @@
+ (long) (time(NULL) - _idle_since));
+ break;
+ }
+- if (idle_exit_timeout) {
++ if (idle_exit_timeout && idle_exit_timeout > 0) {
+ now = time(NULL);
+ if (now < _idle_since)
+ _idle_since = now; /* clock change? */
+diff -Nuar LVM2.2.02.184.orig/man/dmeventd.8_main LVM2.2.02.184/man/dmeventd.8_main
+--- LVM2.2.02.184.orig/man/dmeventd.8_main 2019-03-22 03:15:00.000000000 -0700
++++ LVM2.2.02.184/man/dmeventd.8_main 2019-04-17 00:17:46.076023638 -0700
+@@ -143,6 +143,10 @@
+ Variable is set by thin plugin to prohibit recursive interation
+ with dmeventd by any executed lvm2 command from
+ a thin_command environment.
++.TP
++.B DMEVENTD_IDLE_EXIT_TIMEOUT
++Configure the dmeventd idle exit timeout behavior, value in seconds. Default
++is 3600 (1 hour). -1 means do not exit.
+ .
+ .SH SEE ALSO
+ .
diff --git a/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild
new file mode 100644
index 0000000..d1f411c
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic usr-ldscript
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+ ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
+ systemd? ( udev )"
+
+DEPEND_COMMON="
+ dev-libs/libaio[static-libs?]
+ static? ( dev-libs/libaio[static-libs] )
+ !static? ( dev-libs/libaio[static-libs?] )
+ readline? ( sys-libs/readline:0= )
+ sanlock? ( sys-cluster/sanlock )
+ systemd? ( >=sys-apps/systemd-205:0= )
+ udev? ( >=virtual/libudev-208:=[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/lvm-user
+ >=sys-apps/util-linux-2.16
+ lvm2create_initrd? ( sys-apps/makedev )
+ thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig
+ >=sys-devel/binutils-2.20.1-r1
+ sys-devel/autoconf-archive
+ static? (
+ selinux? ( sys-libs/libselinux[static-libs] )
+ udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+ >=sys-apps/util-linux-2.16[static-libs]
+ )"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+ # Gentoo specific modification(s):
+ "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
+
+ # Musl fixes
+ "${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
+ "${FILESDIR}"/${PN}-2.02.183-portability.patch
+
+ # For upstream -- review and forward:
+ "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+ "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+ "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+ "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
+ "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
+ "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
+ "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
+ "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
+ "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
+ #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+ "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
+ "${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380
+)
+
+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() {
+ default
+
+ 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{.ac,} || die #480212
+
+ if use udev && ! use device-mapper-only; then
+ sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+ elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+ elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+ elog "if it was previously disabled."
+ fi
+
+ sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+ # Without thin-privision-tools, there is nothing to install for target install_man7:
+ if ! use thin ; then
+ sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -flto
+ local myeconfargs=()
+
+ # Most of this package does weird stuff.
+ # The build options are tristate, and --without is NOT supported
+ # options: 'none', 'internal', 'shared'
+ myeconfargs+=(
+ $(use_enable !device-mapper-only dmfilemapd)
+ $(use_enable !device-mapper-only dmeventd)
+ $(use_enable !device-mapper-only cmdlib)
+ $(use_enable !device-mapper-only applib)
+ $(use_enable !device-mapper-only fsadm)
+ $(use_enable !device-mapper-only lvmetad)
+ $(use_enable !device-mapper-only lvmpolld)
+ $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
+
+ # This only causes the .static versions to become available
+ $(usex static --enable-static_link '')
+
+ # dmeventd requires mirrors to be internal, and snapshot available
+ # so we cannot disable them
+ --with-mirrors="$(usex device-mapper-only none internal)"
+ --with-snapshots="$(usex device-mapper-only none internal)"
+
+ # disable O_DIRECT support on hppa, breaks pv detection (#99532)
+ $(usex hppa --disable-o_direct '')
+ )
+
+ if use thin; then
+ myeconfargs+=( --with-thin=internal --with-cache=internal )
+ local texec
+ for texec in check dump repair restore; do
+ myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+ myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+ done
+ else
+ myeconfargs+=( --with-thin=none --with-cache=none )
+ fi
+
+ myeconfargs+=( --with-clvmd=none --with-cluster=none )
+
+ myeconfargs+=(
+ $(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)
+ $(use_enable sanlock lvmlockd-sanlock)
+ $(use_enable systemd udev-systemd-background-jobs)
+ $(use_enable systemd notify-dbus)
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ CLDFLAGS="${LDFLAGS}"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+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_TARGETS=( install install_tmpfiles_configuration )
+ # install systemd related files only when requested, bug #522430
+ use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
+ 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.184-r2 dmeventd
+ newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
+ newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
+ if ! use udev ; then
+ # We keep the variable but remove udev from it.
+ sed -r -i \
+ -e '/^rc_need=/s/\<udev\>//g' \
+ "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
+ fi
+
+ newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+ newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
+ newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
+ fi
+
+ if use sanlock; then
+ newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
+ 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"
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
@ 2020-04-30 21:55 Georgy Yakovlev
0 siblings, 0 replies; 8+ messages in thread
From: Georgy Yakovlev @ 2020-04-30 21:55 UTC (permalink / raw
To: gentoo-commits
commit: a5efd9c0877f5e41e6e33cb3ccbf09b69422ca6c
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 21:54:16 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 21:54:55 2020 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a5efd9c0
sys-fs/lvm2: re-add reopen_stream patch
reported by thyrc on IRC
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
...183-implement-libc-specific-reopen_stream.patch | 24 ++++++++++++++++++++++
...-2.02.187-r2.ebuild => lvm2-2.02.187-r3.ebuild} | 1 +
2 files changed, 25 insertions(+)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
new file mode 100644
index 0000000..6034be3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
@@ -0,0 +1,24 @@
+diff --git a/lib/log/log.c b/lib/log/log.c
+index 79fbd7a..0999d10 100644
+--- a/lib/log/log.c
++++ b/lib/log/log.c
+@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
+ * Close and reopen standard stream on file descriptor fd.
+ */
+ int reopen_standard_stream(FILE **stream, const char *mode)
++#ifdef __GLIBC__
+ {
+ int fd, fd_copy, new_fd;
+ const char *name;
+@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
+ *stream = new_stream;
+ return 1;
+ }
++#else
++{
++ return (freopen(NULL, mode, *stream) != NULL);
++}
++#endif
+
+ void init_log_fn(lvm2_log_fn_t log_fn)
+ {
diff --git a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.187-r3.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.02.187-r2.ebuild
rename to sys-fs/lvm2/lvm2-2.02.187-r3.ebuild
index a134187..91b6d1c 100644
--- a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.187-r3.ebuild
@@ -58,6 +58,7 @@ PATCHES=(
# Musl fixes
"${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
"${FILESDIR}"/${PN}-2.02.183-portability.patch
+ "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch
# For upstream -- review and forward:
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-04-30 21:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-27 1:19 [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/ Aric Belsito
-- strict thread matches above, loose matches on Subject: below --
2020-04-30 21:55 Georgy Yakovlev
2019-07-22 22:06 Jory Pratt
2019-05-10 0:55 Anthony G. Basile
2019-01-20 2:56 Anthony G. Basile
2018-12-29 20:06 Anthony G. Basile
2016-11-27 1:22 Aric Belsito
2015-10-13 21:20 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox