public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-02-14  0:22 Aric Belsito
  0 siblings, 0 replies; 7+ messages in thread
From: Aric Belsito @ 2017-02-14  0:22 UTC (permalink / raw
  To: gentoo-commits

commit:     5f6fec97e1b893a8900a104a1c80b14f0aa18a1f
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Tue Feb 14 00:21:35 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Tue Feb 14 00:21:35 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=5f6fec97

sys-fs/lvm2: version bump to 2.02.166-r1

 sys-fs/lvm2/Manifest                                   |  7 ++++---
 .../files/{lvm.rc-2.02.116-r6 => lvm.rc-2.02.166-r1}   |  4 +++-
 sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1           | 18 ++++++++++++++++++
 .../{lvm2-2.02.166.ebuild => lvm2-2.02.166-r1.ebuild}  | 17 ++++++++++++-----
 sys-fs/lvm2/metadata.xml                               |  1 +
 5 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 34abb31..2801e9a 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -8,7 +8,7 @@ AUX lvm-monitoring.initd-2.02.105-r2 970 SHA256 3f2577f224a8f1594255c32e38aecdf3
 AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
 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 lvm.rc-2.02.166-r1 3896 SHA256 b94fd23ee624e5d881f08461768e378e7e30ab5cbe38a94275bdf930f1ecc536 SHA512 d585b1e0d32c1d2f011f57fcfda8066a99de83a3723f4ddc0d562fb3200ab506582004564f3b203fe9b7d846871088caad8ca49ecf59eb9e3e4bdc1570bd39ca WHIRLPOOL 5326f0697b8b47bf410f2d672d30d814bd772f904c8121462b169c63c6fc8f0aa740c418244b88862859495cbe65cfcc565bb29b1e24c19664071f1bfb66c985
 AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
 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
@@ -29,9 +29,10 @@ AUX lvm2-fix-stdio-usage.patch 3666 SHA256 79c5379cbf660f8dabd45359463c77a40b5a8
 AUX lvm2-musl-fixes.patch 1537 SHA256 6516f64faeccaf87641f7c29823344baea0f3af9ac14701e98fa768cbccb703d SHA512 87bd64a0c7525cbf5d49f1fbdd4a86f23bade065362580a1f2ef3b73b5e76e865e620800c922aa6819ace78daf3d4e2ce96b7990c63dcdbf504d03e636d26c00 WHIRLPOOL 9aeabec1f8b0e3487cad583e359c729b5c45ecbc426b48c19260d1f3a8e377fe5e8f09297d893dc2588b9ee11537148558a372c029ac84c02282011cc07440fe
 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
+AUX lvmlockd.initd-2.02.166-r1 400 SHA256 d87de4c635da9a083db56112c77d78a6d4834874ae87e4944e1e86047fe1e097 SHA512 157d468f05d05c1498ada8f5042280d29618e57f994cfae38ad31cef6936669ef19a18bfb59b6e37ee3217ac35ff3b1f3eb755aba4dd884ad895b9d637617ccd WHIRLPOOL 795a126654b826553075f8b29e23b1e4dd8f26b43392cbceaacf8bfaab8635b0944d3adeb90db2c02f7f26a1106bfe314df879b5c558b341aa406d7d59e379b9
 DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
 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
+EBUILD lvm2-2.02.166-r1.ebuild 9840 SHA256 dcce0c28e5c9a73107f635123a0e328901cc051751558ccd3016d682b8cf759b SHA512 c10225d16094d41d1bbee2ff21a939c82747b46962957faa324833252722dca55de8153838eb14a77c43c7f0af7fe7bae729c4d373bab8ac9250d1ff5fbffd87 WHIRLPOOL c1faadf0ce0d9b500a042d5de4e2943b913b6ae80d53bf5e51285cd68ebf97af6ee6c9745b82e820ae02367e44522741b054b4030057dd3a20cad47d07ce8170
+MISC metadata.xml 1397 SHA256 2b717cd8b25dab45bbf8e04e9d1ea312132ab7d969dbaabcf5ce3665da04dab1 SHA512 1ed97dbef323b6703097c20de99e9003c88663a887bcf87c9489baddfa180aa3d8645e4e60cd3eb3b9505603997ac3ab98a7ee96a813b77b9dc25862dd332d35 WHIRLPOOL f7d03ebb6752c774d7d0415a0cf1d936e9206e4a923cc9b670d593bbc412baa9a0c96f369fd8be1170642ca8d54ec5165cc1929b88e4267e73ec630ed6b82cde

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r1
similarity index 96%
rename from sys-fs/lvm2/files/lvm.rc-2.02.116-r6
rename to sys-fs/lvm2/files/lvm.rc-2.02.166-r1
index 990fd6c..e779d2f 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.166-r1
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -77,6 +77,8 @@ start() {
 			lvm_commands="${lvm_commands}vgscan --mknodes\n"
 			# And turn them on!
 			lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
+			# Start lockd VGs as required
+			lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\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"

diff --git a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
new file mode 100644
index 0000000..bf3292a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/run/lvmlockd.pid"
+command="/sbin/lvmlockd"
+command_args="${LVMLOCKD_OPTS:--p ${pidfile}} ${LVMLOCKD_TYPE:--g sanlock}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+	before sanlock
+}
+
+start_pre()
+{
+	checkpath --directory /run/lvm || return 1
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.166.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
similarity index 95%
rename from sys-fs/lvm2/lvm2-2.02.166.ebuild
rename to sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
index e83c143..f739153 100644
--- a/sys-fs/lvm2/lvm2-2.02.166.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -12,9 +12,9 @@ SRC_URI="ftp://sourceware.org/pub/lvm2/${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 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 )
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+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 )"
 
@@ -27,6 +27,7 @@ DEPEND_COMMON="
 	)
 
 	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
@@ -192,6 +193,7 @@ src_configure() {
 		[ -z "${clvmd}" ] && clvmd="none"
 		myconf+=( --with-clvmd=${clvmd} )
 		myconf+=( --with-pool=${buildmode} )
+
 	else
 		myconf+=( --with-clvmd=none --with-cluster=none )
 	fi
@@ -213,6 +215,7 @@ src_configure() {
 		$(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[@]} \
@@ -247,13 +250,17 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
+		newinitd "${FILESDIR}"/lvm.rc-2.02.166-r1 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

diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index 33079b1..cca547c 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -24,6 +24,7 @@
 		<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] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-02-19 21:07 Aric Belsito
  0 siblings, 0 replies; 7+ messages in thread
From: Aric Belsito @ 2017-02-19 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     4ca3673c18a618a6599aa232b642b9cdd29783c2
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Sun Feb 19 21:06:39 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Sun Feb 19 21:06:39 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=4ca3673c

sys-fs/lvm2: version bump to 2.02.166-r2

 sys-fs/lvm2/Manifest                                      |  4 ++--
 .../lvm2/files/{lvm.rc-2.02.166-r1 => lvm.rc-2.02.166-r2} | 15 +++++++++++++--
 .../{lvm2-2.02.166-r1.ebuild => lvm2-2.02.166-r2.ebuild}  |  2 +-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 2801e9a..0b156fb 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -8,7 +8,7 @@ AUX lvm-monitoring.initd-2.02.105-r2 970 SHA256 3f2577f224a8f1594255c32e38aecdf3
 AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
 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.166-r1 3896 SHA256 b94fd23ee624e5d881f08461768e378e7e30ab5cbe38a94275bdf930f1ecc536 SHA512 d585b1e0d32c1d2f011f57fcfda8066a99de83a3723f4ddc0d562fb3200ab506582004564f3b203fe9b7d846871088caad8ca49ecf59eb9e3e4bdc1570bd39ca WHIRLPOOL 5326f0697b8b47bf410f2d672d30d814bd772f904c8121462b169c63c6fc8f0aa740c418244b88862859495cbe65cfcc565bb29b1e24c19664071f1bfb66c985
+AUX lvm.rc-2.02.166-r2 4153 SHA256 3378d46fd17b7a7cdb5aa9aa41bc7b559ba5bda225bcbe7e73d2e2453e403a2b SHA512 ec3d2aa99aee486b61d6ae4f18fd140c4f61a5c341a2c437e97c5aaf60429e10fe3a5c5d7c1c9be25b2b3652c03f4ed19aa17e9916f585874b9c26829eea370d WHIRLPOOL e01aafb8abe689ac92b8fd2c23849753cdc70f008432f28e5b929d23c282015dac8de1cb99b1b4d2b2fd1e6fee30b3f311cb31326abdc58afed286f069745869
 AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
 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
@@ -34,5 +34,5 @@ DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c02
 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-r1.ebuild 9840 SHA256 dcce0c28e5c9a73107f635123a0e328901cc051751558ccd3016d682b8cf759b SHA512 c10225d16094d41d1bbee2ff21a939c82747b46962957faa324833252722dca55de8153838eb14a77c43c7f0af7fe7bae729c4d373bab8ac9250d1ff5fbffd87 WHIRLPOOL c1faadf0ce0d9b500a042d5de4e2943b913b6ae80d53bf5e51285cd68ebf97af6ee6c9745b82e820ae02367e44522741b054b4030057dd3a20cad47d07ce8170
+EBUILD lvm2-2.02.166-r2.ebuild 9840 SHA256 f274c3a719d3b8395810392d09c6d002bf863e7d236d3c7143306542959846c9 SHA512 0a5fbe9c91ea255d3f23c8dd039fd3d52c67fd93200cdd2915e487d3c2d1bd895aaf30ae8a0e36dd98c517b0095cf08582428f02deebc51de6cd1f68c3b3931f WHIRLPOOL 5528277f3f74dddf634d7774234efd1db513a596fec8d09325db897897fe62eead1aba618110d9ff299fe72b69daf18ba75f5c2c728699c2d0778b57d313f718
 MISC metadata.xml 1397 SHA256 2b717cd8b25dab45bbf8e04e9d1ea312132ab7d969dbaabcf5ce3665da04dab1 SHA512 1ed97dbef323b6703097c20de99e9003c88663a887bcf87c9489baddfa180aa3d8645e4e60cd3eb3b9505603997ac3ab98a7ee96a813b77b9dc25862dd332d35 WHIRLPOOL f7d03ebb6752c774d7d0415a0cf1d936e9206e4a923cc9b670d593bbc412baa9a0c96f369fd8be1170642ca8d54ec5165cc1929b88e4267e73ec630ed6b82cde

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r1 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
similarity index 91%
rename from sys-fs/lvm2/files/lvm.rc-2.02.166-r1
rename to sys-fs/lvm2/files/lvm.rc-2.02.166-r2
index e779d2f..d14292c 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r1
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
@@ -18,6 +18,12 @@ _need_lvmetad()
 	${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
@@ -33,6 +39,9 @@ depend() {
 		if _need_lvmetad; then
 			_need="${_need} lvmetad"
 		fi
+		if _need_lvmlockd; then
+			_need="${_need} lvmlockd"
+		fi
 	fi
 	need sysfs ${_need}
 }
@@ -77,8 +86,10 @@ start() {
 			lvm_commands="${lvm_commands}vgscan --mknodes\n"
 			# And turn them on!
 			lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
-			# Start lockd VGs as required
-			lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"
+			if _need_lvmlockd; then
+				# Start lockd VGs as required
+				lvm_commands="${lvm_commands}vgchange --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
 			eend $? "Failed to setup the LVM"

diff --git a/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
rename to sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
index f739153..4b4edeb 100644
--- a/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
@@ -250,7 +250,7 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.166-r1 lvm
+		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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-05-05  3:55 Aric Belsito
  0 siblings, 0 replies; 7+ messages in thread
From: Aric Belsito @ 2017-05-05  3:55 UTC (permalink / raw
  To: gentoo-commits

commit:     d40078e28cc87e25d184452d4c4c94b4d84f37c7
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Fri May  5 03:53:58 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Fri May  5 03:53:58 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=d40078e2

sys-fs/lvm2: version bump to 2.02.171

Also add 2.02.145-r2, which is now marked stable.
Sync with upstream.

 sys-fs/lvm2/Manifest                               |  36 +++---
 sys-fs/lvm2/files/clvmd.rc-2.02.39                 |   1 -
 sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2     |   1 -
 sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1        |   1 -
 sys-fs/lvm2/files/dmtab                            |   1 -
 sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 |   1 -
 sys-fs/lvm2/files/lvm.rc-2.02.105-r2               |   1 -
 sys-fs/lvm2/files/lvm.rc-2.02.116-r4               |   1 -
 .../{lvm.rc-2.02.116-r4 => lvm.rc-2.02.116-r6}     |   3 +-
 sys-fs/lvm2/files/lvm.rc-2.02.166-r2               |   1 -
 .../lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch | 112 ++++++++++++++++++
 sys-fs/lvm2/files/lvm2-2.02.136-portability.patch  |  44 +++++++
 sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch        | 127 +++++++++++++++++++++
 sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2        |   1 -
 sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3        |   1 -
 sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1       |   1 -
 sys-fs/lvm2/lvm2-2.02.116-r4.ebuild                |   1 -
 sys-fs/lvm2/lvm2-2.02.116.ebuild                   |   1 -
 ...-2.02.166-r2.ebuild => lvm2-2.02.145-r2.ebuild} |  22 ++--
 ...vm2-2.02.166-r2.ebuild => lvm2-2.02.171.ebuild} |   7 +-
 20 files changed, 315 insertions(+), 49 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 0b156fb..bb3e23b 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,21 +1,25 @@
 AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
-AUX clvmd.rc-2.02.39 3597 SHA256 51f46131b5955b399f4f4e5e456aeb56edd4239cdb6625c3b4f60d8b34e85352 SHA512 5adce1c19994296f890e59f56785bcee0a21cc3f4312c1e120d11431f25fba6225e0d1ee89443862d6ffe6fc381cea0f27863b2f241f44c2a9cf9b779f820ff0 WHIRLPOOL ac6e00e374778bd96635c1a14be8636908126b865226366bad9b8c88d5de43b91ff91fd5a551571f9bd1c6096c294dec235bf7d2f67dce28d67cf7b48a42af3d
+AUX clvmd.rc-2.02.39 3590 SHA256 50f7297c3a66656832dc7cacb4a6b8614a30748c59a19b56ed479a99e9068c7c SHA512 2a16b700f475a65477d548b4cb5fb26129c86d2244b7b5716ffdb4e9b13cf2e37bc1fc986c080c5c4d1c0e2b5436b0cc6fcb0527c9b98c1b29b85ca512551532 WHIRLPOOL e546e98765c8740b3893f25207694bc6b33fb3d46f15facbf856c41ded17071fbad4c969a826ecc13c8cef06b02198406de0760c685b31390034ee25f7922617
 AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
-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 970 SHA256 3f2577f224a8f1594255c32e38aecdf3e3fe9d921a2054d851ab0cf73c3b8413 SHA512 6cde5a492356e92df58c0260d00fef176228fb5ddac1ec9b289430373217528ed9459e24b4fdcb66519eb9c4be7c5219b697bef70052daac42019458a39e6e0e WHIRLPOOL 8ff284b378bd6dba8c4ac314c7bdad24157d2462ad323822e72669507c1e3f49ef7a1456b2ffc02b538b014c456f3caf728ae3f242ae8e68f2c81d219a425ca2
+AUX device-mapper.rc-2.02.105-r2 3707 SHA256 e8bfde63341f9e6136ee20a15ed9ea455e2259dbcaea756f8c3d0f710c1c2746 SHA512 9940b1154a8c07cf2f2c975e209bfb1e78913d3ea77ac6334684a9b38c4f4bd34b349b71c078c9ad5700f554046771ee05e17f07b75dc4e7d839f1df2305cc4f WHIRLPOOL 33516cc0046961718dbaf8a0fd3602d8975790d93aaadbb6905b858f411e1c88857bb7d8283dce0b44b0345911c0ad9a14edec3f4e702433d639fca1367a4016
+AUX dmeventd.initd-2.02.67-r1 565 SHA256 5edaaad292d4fd6b67fd5323636dd2e839be33ae16fbc7872dadb0499fcf22da SHA512 c0f5317ab0cba700eab3b643fd134d8a23fe4b332c47fd94728e43dfdf97250561f60ecb47808d2c65e55cdec65cccbd51f264540c0d973b2df7ded4ec129c34 WHIRLPOOL ee6306caba934ea4d52033631e4598b250a407c3e7a906a0109582c5f3453c8f8f3985a2410aacbd8966b897e389a4b67cb62ed22d75a98d60c7d495f5b1544b
+AUX dmtab 319 SHA256 f86d54983e26bb36ce1d1a46f15165fed90ec6c76e5881fb04978d77952de874 SHA512 a8cc69ff832eafd64d7e45854df3380a9c5f9648297e2606c5b9b47e0015c93c7da6ef3dfd35800f36a3371635fa1906605c524be82d6740fd435c7f6bf2807b WHIRLPOOL 2ba4aceb6a030421b9384c65e5836de886f67518491c3409f3df1b09c97a4095d66d03e5e726edcad4224572b723012e8b5ccbfca4cd3e1ea46917e50e54bc73
+AUX lvm-monitoring.initd-2.02.105-r2 963 SHA256 42847d8e6dabbcf2cc19846c6ad22cbab65e9a033c4add569b152504b16ab477 SHA512 dc13304e8d644a55f0490c84acc36b95f43fc0e86c4b44f85f54f6ed3213ad665454e7432b3621f307b3468af0c33525c24705f4a2783e35a26e02ff1c828779 WHIRLPOOL aa417a0dd3c62ed74240579ff56a1a34e5f13b9c2bf40c274290428ef581d971158efd3dacc7ba4e274db37d6d408b3b6bb438c51519fae4dbf540d1283ebffc
 AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
-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.166-r2 4153 SHA256 3378d46fd17b7a7cdb5aa9aa41bc7b559ba5bda225bcbe7e73d2e2453e403a2b SHA512 ec3d2aa99aee486b61d6ae4f18fd140c4f61a5c341a2c437e97c5aaf60429e10fe3a5c5d7c1c9be25b2b3652c03f4ed19aa17e9916f585874b9c26829eea370d WHIRLPOOL e01aafb8abe689ac92b8fd2c23849753cdc70f008432f28e5b929d23c282015dac8de1cb99b1b4d2b2fd1e6fee30b3f311cb31326abdc58afed286f069745869
+AUX lvm.rc-2.02.105-r2 2960 SHA256 e5bcc5aeed1ae95cf4199c10fcfa0488d7790e0bafe512c7947902cbd451928d SHA512 8d8ccac694110e3538aeb246244b1b129d960f35d54eb583d77e9d54bed243248b121262557fc0c69bc734a04ca35c0485428e65b1a4d06c438828a239053fae WHIRLPOOL 62d63d64ee444fd573e4511dd64bb799aacd5edabf817788155268b27f71004e7c44659f78b7f3e4e81e74054967da99b2569005866f98f020731815e95ab083
+AUX lvm.rc-2.02.116-r4 3771 SHA256 c7044358d8bde5f9786f40fa126011612c2255ee38bd540f5482608cbe8d9bef SHA512 aa19a17ea3c6626355ac6f82aa383e7a9b253248513d7ef876e381d1a58ab78267e0e39df95a53114675582312693a128cf517051f906aa17a244f8d398f3aed WHIRLPOOL 78b241ddfe9ed4b407d0e014074a87a0de7fb6cfbdd2293d631ff3fcd2fc458e26a8e0c870b7bdb3b9db13c604e9df93686c3dbb75378d28a1fd3a4b880fa3e4
+AUX lvm.rc-2.02.116-r6 3783 SHA256 088285a83ab2ea527126c36eeb72181f42815bd32b95e4442ad2b8a1c94600e5 SHA512 f819faf7844c3b946b437aee8eb5dd52bfdbb9b820a2024ad42166895e72e194898b16a34c44c69786539d19e5458c12a333f99db02c26589567bb6aabb23639 WHIRLPOOL bf10b0ba73200d17a71ecf6c4d8a3bcef9e23a2807d3e8ae432021bf2b1fe9c48931ac40af2d3f8bfd9a3cf3c4bd1e301ead404a3cd3e939d395b708963b07f6
+AUX lvm.rc-2.02.166-r2 4146 SHA256 257e6801b1d2890fe77b7d030489066d9129712eae395b77ae5e9e461d435f80 SHA512 a08891d52d1b7f38d09d15100ae19737ab6b65ae51f1e5d2ca43dd08988fee272972ea02fb3a04240d56812089a0744d215fed87e2ed29d09cfccba0de59d3c7 WHIRLPOOL 94bb01f3595869cd393994621b1e0e0770842d3e284dad0d109ba0fd6a64cd261d7ef55f19ce015c7e6d20609b66b21ee06d396f2230591bcbc5ad0ffe34d619
 AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
 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.136-fix-stdio-usage.patch 3969 SHA256 aa08181afe7d004d6f41c9dd76341164feb7d7c34a1367bad59ec776a7cbf69f SHA512 b74ea0dacc117dd6e4ede5b1f2c92dd81b6e902772928af4784d292a5174913f716c041ab26b107bcb18abb2e03bc51851b752ad64338a2dd863e8480466edde WHIRLPOOL b40906fd1c2353471b90a2817159c0c6736b3446a747292dea0102dac586f9c6aa9ed1a6ab9fadcbdc108738942af8eead169b279083046b3fe29198bdc911ca
+AUX lvm2-2.02.136-portability.patch 1952 SHA256 c296c52a39166ae895d53424a770f5b9f6825840ba61cd6ab4b5c8a1b907e673 SHA512 135f5bc5ad8b6e9b589d865060854de7a423db010d52e8f46e2bd4769dea50c01b2ab7d6d4a442d3a3ac6c12f05f2c0362e2f92af8f05c66bf83fc7c66acb8da WHIRLPOOL 235a5c0ab6377aff00fa36e7f962bdb4c753d73a6a2182e3e5b0a8709c4dfa953c6abde3e96050cfcdda259b616c2d6ebb72c763d207182fbe664c8d168b8056
 AUX lvm2-2.02.139-dynamic-static-ldflags.patch 2874 SHA256 2f09df6fe503f426e9970e9243e6380654dd4037b8475a371e56ee6ed4287c46 SHA512 3486c6d0500f233cbedfe28a2c20f03e4a80301e011fa0fd41b3765eed71dc5e00c8f6f09d40c3702ea87e372db3e4dae64c32e4ffe45700bbbf137804b748fa WHIRLPOOL 427e8be7dab3afcd4bfa8bbec86d691ed99d98eb52ebe7c740eec7a90bb42dce92fc127ca3ef0a6f6da07041a3682f59b1937b836ccd0a8733200e538e53ccc0
+AUX lvm2-2.02.145-mkdev.patch 4111 SHA256 d9a351f8d1321d5a374b648845ecdb51f74fa23a4ff8b58757d3e184649c42bc SHA512 f3953eb8bf73adc8d048edd2c560fad3c5afbfcee19ca354f06de2b10ea2e947c972cd180fa26cf0d3dc30b5aae8946e79faac3f3a1cfb6f31222244d308a588 WHIRLPOOL cd9b3148835afa9cbb15790438e2272aab0748f88080636fe477527dadcfc5b0ea293c5f75e3e16fe9705bc3f4384d86345052baeb153a489e00fc5ce02530f6
 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
@@ -27,12 +31,14 @@ AUX lvm2-2.02.99-locale-muck.patch 405 SHA256 fa135beaec5a75a271852da44009390e04
 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 294 SHA256 6da831ad5d96fabb5cdfdf41e4f3228020764edcad5101b6eeb9a0edaa4af259 SHA512 6a74b5d82aeecfefe2ecf59285da68abe6fb83859bb7097c40795581a2281ca4aa3d563f63ecceb691c4e02d63e5a402f3bec5a206f32d58f92f9fe322d49245 WHIRLPOOL 3eabc58e707662d50469e4a46ba2fea8ba3102857b2ec9c53b213f38bc51d4605b1e9675539299c4ad2db9107b00473c551f3be8e110a3b5ee0a4c5eb33cfa88
-AUX lvmetad.initd-2.02.116-r3 355 SHA256 a447400a2b08828f5d63e9b4d3ccadd21a1cb3737823f935579376e2add8842c SHA512 d471258df5a4fedd506d3c75e986db4d27787b6e413a58a5d68bd6467f6d5583d79fe12711079e72be81911278ac0dc7f7887d15763e7455f61752687cf22b49 WHIRLPOOL c41abcbed340dfcc71ae110d4af08b6281b2da93babab8c2d1c5e4a9f38276d6cce72dcd15dce02ebb144ab700024af1b60d653df3701a575f7bccb96421e221
-AUX lvmlockd.initd-2.02.166-r1 400 SHA256 d87de4c635da9a083db56112c77d78a6d4834874ae87e4944e1e86047fe1e097 SHA512 157d468f05d05c1498ada8f5042280d29618e57f994cfae38ad31cef6936669ef19a18bfb59b6e37ee3217ac35ff3b1f3eb755aba4dd884ad895b9d637617ccd WHIRLPOOL 795a126654b826553075f8b29e23b1e4dd8f26b43392cbceaacf8bfaab8635b0944d3adeb90db2c02f7f26a1106bfe314df879b5c558b341aa406d7d59e379b9
+AUX lvmetad.initd-2.02.105-r2 287 SHA256 5b4c806ef07acdb1d3a8c8a8eda7c43ebc88760a7e9034dd81269fb6c2a44cbf SHA512 5fe1a47a1c54546af70c64fc001db3111e519cb81d8672761b64f50b4c552d0fa79bd0770fb4f4f3e0e0ac584b1e13ea91ac1a33cea1cc1f484cff0dde1a3b0b WHIRLPOOL e9a12a7bf17e3bf8b76132a067a1cb395e92c53757e5a2e102aa5024e71b779fdcd23f32331eb628aff94eeb76bea6ef87ec575ea9528754ee349a0b9b6710a4
+AUX lvmetad.initd-2.02.116-r3 348 SHA256 e7f17004d505eae5d8a2fb336b22f1cdb20bb2ecf85a98daf2485bb4b0d4ff12 SHA512 19aafd07aa6ebe3f05e321048480f746a9aafd1ad4e0323486db5c54035430f607e171d2246e91bbbf8a2a7e15278d793ad13d84e824df7af65345070483a696 WHIRLPOOL d11b18ec2b933c0fcb89a1dc913130ba3f0bd003c65b5f703f92c108e6ca4d00190b9a0b948b0afde13d2017a34da3fab8f2354a2324228597fcac3676fc2265
+AUX lvmlockd.initd-2.02.166-r1 393 SHA256 c7c3c7dfa651030fd277ba6713bd8cc6bfa361068e90316cbf8d501f42eeabf9 SHA512 11d6f186799d8628220eccb4823e5bd251bc3c447e6c3f8a63c025dc4e08e0a7638a8439967ea2ee8a717264887597be4992afca59571ebaa651441782288081 WHIRLPOOL 8d0ace7512b27027a70211097ee661a877fe3c2da5d28c0d863dc21d207f6198cacba0a6f86d620e8387fda7c3f996689da5e971e96a9466a2ea9a713b88636b
 DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
-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-r2.ebuild 9840 SHA256 f274c3a719d3b8395810392d09c6d002bf863e7d236d3c7143306542959846c9 SHA512 0a5fbe9c91ea255d3f23c8dd039fd3d52c67fd93200cdd2915e487d3c2d1bd895aaf30ae8a0e36dd98c517b0095cf08582428f02deebc51de6cd1f68c3b3931f WHIRLPOOL 5528277f3f74dddf634d7774234efd1db513a596fec8d09325db897897fe62eead1aba618110d9ff299fe72b69daf18ba75f5c2c728699c2d0778b57d313f718
+DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549
+DIST LVM2.2.02.171.tgz 2333643 SHA256 b815a711a2fabaa5c3dc1a4a284df0268bf0f325f0fc0f5c9530c9bbb54b9964 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883 WHIRLPOOL fedd62612c6bb4b7764277a0d4474ff3557f041858c71eb7bf2a1c06b646637fe719f91a12c1b5c58ccefa7f4d2daba6bf30409340c52fd3a1b8b01ce62467ab
+EBUILD lvm2-2.02.116-r4.ebuild 9762 SHA256 6042ffe221d8740b3a58f7eaf56568c51f1934fe424879464184db51b297305a SHA512 68de2ebdaf16365295e14dfa51b5b393ef0a57287abbd6306d58138691fceb5f491aa5f1f4164c28aff73fd58dbfbd9ea5d21f8939b74ec5e25d2fbea982c4d9 WHIRLPOOL 017ea96ab12ae285470545143cbc7e859217247eaeedce9cf3c8fbf558732dd683bf9debb6d1617b798b75a4c7bbc98b5f34a2576dd02d6d8aee2189db82a162
+EBUILD lvm2-2.02.116.ebuild 9396 SHA256 7aeca48e18514f843ad3bb91631d11587d871a3896394161a5aa5471cfc16abe SHA512 e7882514a39e3393f12bfc388d8ec934bab8d6a3930e6101735cfc8cf44962d85820d1049292aeeb7ce9571c4ca6559e629c0c9df6b007350b89296c132165e1 WHIRLPOOL 267ed99a342417306e7b675743c3dd68a25682dca2ec4bd17d4bfb61509041d9efea4cad04eafb2ac58a2c4d9417c9ffa24646a88d46e43384b6383afcaa16e1
+EBUILD lvm2-2.02.145-r2.ebuild 9690 SHA256 ca55a4b820357bb7ef37fb1aad70fc41884a1a4a6ad16ed5861860f6af2efd58 SHA512 27c88ece1bae66d571e21ea820f29e218bac90f3453f11223522f822c7eee822586a92df71057081e36d9b06b1e93612b86f6e709c365ed58ddaf8fd58adf1e9 WHIRLPOOL edfe844fbc1758c7159448e78b4aec383428552836c4f4ba22761e61ad94394da2e8b4bd0cb5f70f66291db4bad6e8e6db17169a1405e66ba608869b4420c683
+EBUILD lvm2-2.02.171.ebuild 9895 SHA256 6e8bcb26f022e5f0aa6902af43ca613a5777ee1e73f9cfb8c9fb2feff9a0b4c1 SHA512 dfc4ea42c42435d4a704b68dce52be76a44544ce0116f9a7de773930f53eea6445ff2f5f38321f0d19fdee32b23d96c01f7fc5b0b9c912890c02c908a4e7834b WHIRLPOOL 3602cf70a70821b7df6b0adc6be53a285555de1bef694c4d04cc5f17d9aac2dbed93ec1782090d7c23d457d3fe75eafef0cf8a3c50bec0b4e3d3114816097c7c
 MISC metadata.xml 1397 SHA256 2b717cd8b25dab45bbf8e04e9d1ea312132ab7d969dbaabcf5ce3665da04dab1 SHA512 1ed97dbef323b6703097c20de99e9003c88663a887bcf87c9489baddfa180aa3d8645e4e60cd3eb3b9505603997ac3ab98a7ee96a813b77b9dc25862dd332d35 WHIRLPOOL f7d03ebb6752c774d7d0415a0cf1d936e9206e4a923cc9b670d593bbc412baa9a0c96f369fd8be1170642ca8d54ec5165cc1929b88e4267e73ec630ed6b82cde

diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
index 27125af..efadd89 100644
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 [ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
 

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 a6ec42b..7dbacce 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,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 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

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 e91c5c6..930e84b 100644
--- a/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 PIDFILE=/run/dmeventd.pid
 BIN=/sbin/dmeventd

diff --git a/sys-fs/lvm2/files/dmtab b/sys-fs/lvm2/files/dmtab
index 0f3f05a..37a0d28 100644
--- a/sys-fs/lvm2/files/dmtab
+++ b/sys-fs/lvm2/files/dmtab
@@ -1,5 +1,4 @@
 #/etc/dmraid: config file for adding device-mapper volumes at boot
-# $Id$
 
 # Format: <volume name>: <table>
 # Example: isw0: 0 312602976 striped 2 128 /dev/sda 0 /dev/sdb 0

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 9181c95..d603718 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,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 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

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 5217116..c59f9c3 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 depend() {
 	before checkfs fsck

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
index a09b0ef..74b4a41 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
@@ -1,7 +1,6 @@
 #!/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=

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
similarity index 98%
copy from sys-fs/lvm2/files/lvm.rc-2.02.116-r4
copy to sys-fs/lvm2/files/lvm.rc-2.02.116-r6
index a09b0ef..1bf075f 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
@@ -1,7 +1,6 @@
 #!/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=
@@ -15,7 +14,7 @@ _need_lvmetad()
 {
 	local lvm_path="$(_get_lvm_path)"
 	[ ! -x "${lvm_path}" ] && return 1
-	${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1'
+	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
 }
 
 depend() {

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
index d14292c..11329bb 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 _get_lvm_path() {
 	local lvm_path=

diff --git a/sys-fs/lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch
new file mode 100644
index 0000000..6492ec0
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch
@@ -0,0 +1,112 @@
+diff -Naurw LVM2.2.02.136.orig/lib/commands/toolcontext.c LVM2.2.02.136/lib/commands/toolcontext.c
+--- LVM2.2.02.136.orig/lib/commands/toolcontext.c	2015-11-27 17:29:19.000000000 -0800
++++ LVM2.2.02.136/lib/commands/toolcontext.c	2015-12-03 09:12:38.501331770 -0800
+@@ -1637,7 +1637,9 @@
+ /*
+  * 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)
++#if defined(__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;
+ 
+@@ -1664,6 +1666,9 @@
+ 
+ 	return 1;
+ }
++#else
++#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL)
++#endif
+ 
+ static int _init_lvmetad(struct cmd_context *cmd)
+ {
+@@ -1741,7 +1746,6 @@
+ 				       unsigned set_filters)
+ {
+ 	struct cmd_context *cmd;
+-	FILE *new_stream;
+ 	int flags;
+ 
+ #ifdef M_MMAP_MAX
+@@ -1791,9 +1795,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;
+@@ -1803,9 +1806,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", "");
+@@ -2131,7 +2133,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 &&
+@@ -2167,8 +2168,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) */
+@@ -2177,8 +2177,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) */
+diff -Naurw LVM2.2.02.136.orig/tools/lvmcmdline.c LVM2.2.02.136/tools/lvmcmdline.c
+--- LVM2.2.02.136.orig/tools/lvmcmdline.c	2015-11-27 17:29:22.000000000 -0800
++++ LVM2.2.02.136/tools/lvmcmdline.c	2015-12-03 09:14:19.984668128 -0800
+@@ -1744,7 +1744,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
+@@ -1754,7 +1754,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 */
+@@ -1762,7 +1762,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.136-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.136-portability.patch
new file mode 100644
index 0000000..4d3f8ab
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.136-portability.patch
@@ -0,0 +1,44 @@
+diff -Naurw LVM2.2.02.136.orig/daemons/lvmetad/lvmetad-core.c LVM2.2.02.136/daemons/lvmetad/lvmetad-core.c
+--- LVM2.2.02.136.orig/daemons/lvmetad/lvmetad-core.c	2015-11-27 17:29:18.000000000 -0800
++++ LVM2.2.02.136/daemons/lvmetad/lvmetad-core.c	2015-12-03 09:06:48.387988004 -0800
+@@ -300,7 +300,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)) {
+@@ -2890,7 +2890,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);
+diff -Naurw LVM2.2.02.136.orig/lib/mm/memlock.c LVM2.2.02.136/lib/mm/memlock.c
+--- LVM2.2.02.136.orig/lib/mm/memlock.c	2015-11-27 17:29:19.000000000 -0800
++++ LVM2.2.02.136/lib/mm/memlock.c	2015-12-03 09:06:20.917987185 -0800
+@@ -145,7 +145,7 @@
+ 
+ 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;
+diff -Naurw LVM2.2.02.136.orig/libdaemon/server/daemon-server.c LVM2.2.02.136/libdaemon/server/daemon-server.c
+--- LVM2.2.02.136.orig/libdaemon/server/daemon-server.c	2015-11-27 17:29:20.000000000 -0800
++++ LVM2.2.02.136/libdaemon/server/daemon-server.c	2015-12-03 09:07:09.767988641 -0800
+@@ -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.145-mkdev.patch b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
new file mode 100644
index 0000000..f91dccd
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
@@ -0,0 +1,127 @@
+https://bugs.gentoo.org/580062
+
+From 2a1d0fa8ea765604cd8274aac5aa7876f1c145c9 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 19 Apr 2016 23:53:22 -0400
+Subject: [PATCH] convert major/minor/makedev handling
+
+Most of the files in here use MAJOR/MINOR/MKDEV macros, but a few
+missed it.  Update the defines in those files to match them.
+---
+ daemons/cmirrord/functions.c                          | 16 ++++++++++++----
+ daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 12 ++++++++++--
+ lib/filters/filter-sysfs.c                            |  6 ++++--
+ 3 files changed, 26 insertions(+), 8 deletions(-)
+
+diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
+index e9d3c09..5b3cb38 100644
+--- a/daemons/cmirrord/functions.c
++++ b/daemons/cmirrord/functions.c
+@@ -20,6 +20,14 @@
+ #include <time.h>
+ #include <unistd.h>
+ 
++#ifdef __linux__
++#  include "kdev_t.h"
++#else
++#  define MAJOR(x) major((x))
++#  define MINOR(x) minor((x))
++#  define MKDEV(x,y) makedev((x),(y))
++#endif
++
+ #define BYTE_SHIFT 3
+ 
+ /*
+@@ -333,8 +341,8 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat
+ 			continue;
+ 		}
+ 		if (S_ISBLK(statbuf.st_mode) &&
+-		    (major(statbuf.st_rdev) == major) &&
+-		    (minor(statbuf.st_rdev) == minor)) {
++		    (MAJOR(statbuf.st_rdev) == major) &&
++		    (MINOR(statbuf.st_rdev) == minor)) {
+ 			LOG_DBG("  %s: YES", dep->d_name);
+ 			if (closedir(dp))
+ 				LOG_DBG("Unable to closedir /dev/mapper %s",
+@@ -1451,7 +1459,7 @@ static int disk_status_info(struct log_c *lc, struct dm_ulog_request *rq)
+ 	}
+ 
+ 	r = sprintf(data, "3 clustered-disk %d:%d %c",
+-		    major(statbuf.st_rdev), minor(statbuf.st_rdev),
++		    MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
+ 		    (lc->log_dev_failed) ? 'D' : 'A');
+ 	if (r < 0)
+ 		return r;
+@@ -1514,7 +1522,7 @@ static int disk_status_table(struct log_c *lc, struct dm_ulog_request *rq)
+ 	}
+ 
+ 	r = sprintf(data, "clustered-disk %d:%d %u %s%s ",
+-		    major(statbuf.st_rdev), minor(statbuf.st_rdev),
++		    MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
+ 		    lc->region_size,
+ 		    (lc->sync == DEFAULTSYNC) ? "" :
+ 		    (lc->sync == NOSYNC) ? "nosync " : "sync ",
+diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+index 7b060ed..4098203 100644
+--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
++++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+@@ -20,6 +20,14 @@
+ #include <stdarg.h>
+ #include <pthread.h>
+ 
++#ifdef __linux__
++#  include "kdev_t.h"
++#else
++#  define MAJOR(x) major((x))
++#  define MINOR(x) minor((x))
++#  define MKDEV(x,y) makedev((x),(y))
++#endif
++
+ /* First warning when snapshot is 80% full. */
+ #define WARNING_THRESH	(DM_PERCENT_1 * 80)
+ /* Run a check every 5%. */
+@@ -148,8 +156,8 @@ static void _umount(const char *device, int major, int minor)
+ 			continue; /* can't stat, skip this one */
+ 
+ 		if (S_ISBLK(st.st_mode) &&
+-		    major(st.st_rdev) == major &&
+-		    minor(st.st_rdev) == minor) {
++		    MAJOR(st.st_rdev) == major &&
++		    MINOR(st.st_rdev) == minor) {
+ 			log_error("Unmounting invalid snapshot %s from %s.", device, words[1]);
+ 			if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL))
+ 				log_error("Failed to umount snapshot %s from %s: %s.",
+diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c
+index 3115f86..5f76e8b 100644
+--- a/lib/filters/filter-sysfs.c
++++ b/lib/filters/filter-sysfs.c
+@@ -19,6 +19,8 @@
+ 
+ #include <dirent.h>
+ 
++#include "kdev_t.h"
++
+ static int _locate_sysfs_blocks(const char *sysfs_dir, char *path, size_t len,
+ 				unsigned *sysfs_depth)
+ {
+@@ -120,7 +122,7 @@ static struct dev_set *_dev_set_create(struct dm_pool *mem,
+ 
+ static unsigned _hash_dev(dev_t dev)
+ {
+-	return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
++	return (MAJOR(dev) ^ MINOR(dev)) & (SET_BUCKETS - 1);
+ }
+ 
+ /*
+@@ -171,7 +173,7 @@ static int _parse_dev(const char *file, FILE *fp, dev_t *result)
+ 		return 0;
+ 	}
+ 
+-	*result = makedev(major, minor);
++	*result = MKDEV(major, minor);
+ 	return 1;
+ }
+ 
+-- 
+2.7.4
+

diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
index 2f9ab0c..c95a47d 100644
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 pidfile="/run/lvmetad.pid"
 command="/sbin/lvmetad"

diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3 b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
index d41239e..2efce42 100644
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 pidfile="/run/lvmetad.pid"
 command="/sbin/lvmetad"

diff --git a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
index bf3292a..16e2cc3 100644
--- a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
+++ b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
@@ -1,7 +1,6 @@
 #!/sbin/openrc-run
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 pidfile="/run/lvmlockd.pid"
 command="/sbin/lvmlockd"

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
index c0ff832..42db024 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=5
 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic

diff --git a/sys-fs/lvm2/lvm2-2.02.116.ebuild b/sys-fs/lvm2/lvm2-2.02.116.ebuild
index 6879d2b..374abbc 100644
--- a/sys-fs/lvm2/lvm2-2.02.116.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=5
 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic

diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
similarity index 94%
copy from sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
copy to sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
index 4b4edeb..3f11e58 100644
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=6
 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
@@ -12,9 +11,9 @@ SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-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 )
+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 )"
 
@@ -27,7 +26,6 @@ DEPEND_COMMON="
 	)
 
 	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
@@ -61,8 +59,8 @@ PATCHES=(
 	"${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
+	"${FILESDIR}"/${PN}-2.02.136-fix-stdio-usage.patch
+	"${FILESDIR}"/${PN}-2.02.136-portability.patch
 
 	# For upstream -- review and forward:
 	"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
@@ -73,7 +71,7 @@ PATCHES=(
 	"${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
+	"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062
 )
 
 pkg_setup() {
@@ -193,7 +191,6 @@ src_configure() {
 		[ -z "${clvmd}" ] && clvmd="none"
 		myconf+=( --with-clvmd=${clvmd} )
 		myconf+=( --with-pool=${buildmode} )
-
 	else
 		myconf+=( --with-clvmd=none --with-cluster=none )
 	fi
@@ -215,7 +212,6 @@ src_configure() {
 		$(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[@]} \
@@ -250,17 +246,13 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.166-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.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

diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild
similarity index 98%
rename from sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
rename to sys-fs/lvm2/lvm2-2.02.171.ebuild
index 4b4edeb..076a53f 100644
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.171.ebuild
@@ -1,6 +1,5 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=6
 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
@@ -12,7 +11,7 @@ SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
 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 )
@@ -193,7 +192,7 @@ src_configure() {
 		[ -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
@@ -215,7 +214,7 @@ src_configure() {
 		$(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 sanlock lvmlockd-sanlock) \
 		$(use_enable systemd udev-systemd-background-jobs) \
 		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
 		${myconf[@]} \


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-04-16 20:42 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2019-04-16 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     6cb28982a11b0bbd9479ba40e9f9bfd78cd37f54
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 16 20:42:31 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Apr 16 20:42:31 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=6cb28982

sys-fs/lvm2: forward port patches to 2.02.184

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 sys-fs/lvm2/Manifest                      |   1 +
 sys-fs/lvm2/files/lvmpolld.initd-2.02.183 |  17 ++
 sys-fs/lvm2/lvm2-2.02.184-r1.ebuild       | 266 ++++++++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.184.ebuild          | 262 +++++++++++++++++++++++++++++
 4 files changed, 546 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index bcbab95..bad5158 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,2 +1,3 @@
 DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
 DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7
+DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390

diff --git a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 b/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
new file mode 100644
index 0000000..6b26010
--- /dev/null
+++ b/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/lvmpolld.pid"
+command="/sbin/lvmpolld"
+command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+	:
+}
+
+start_pre()
+{
+	checkpath --directory /run/lvm || return 1
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.184-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r1.ebuild
new file mode 100644
index 0000000..1da43dc
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184-r1.ebuild
@@ -0,0 +1,266 @@
+# 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="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+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 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.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
+		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"
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.184.ebuild b/sys-fs/lvm2/lvm2-2.02.184.ebuild
new file mode 100644
index 0000000..87f9ac2
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184.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="~amd64 ~arm ~arm64 ~mips ~ppc ~x86"
+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"
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-04-16 20:55 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2019-04-16 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     2caa8c41c00a6ad66c91f40e217d6a35756fa3d0
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 16 20:55:47 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Apr 16 20:55:47 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=2caa8c41

sys-fs/lvm2: remove 2.02.145-r2 and unused patches

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 sys-fs/lvm2/Manifest                               |   1 -
 sys-fs/lvm2/files/lvm.rc-2.02.105-r2               |  96 --------
 sys-fs/lvm2/files/lvm.rc-2.02.116-r6               | 132 -----------
 .../files/lvm2-2.02.106-pthread-pkgconfig.patch    |  32 ---
 .../lvm2/files/lvm2-2.02.108-example.conf.in.patch |  50 ----
 .../lvm2-2.02.108-static-pkgconfig-libs.patch      | 104 ---------
 .../lvm2-2.02.129-dynamic-static-ldflags.patch     |  59 -----
 .../lvm2/files/lvm2-2.02.129-example.conf.in.patch |  52 -----
 .../lvm2-2.02.129-static-pkgconfig-libs.patch      | 102 --------
 .../files/lvm2-2.02.130-pthread-pkgconfig.patch    |  32 ---
 .../lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch | 112 ---------
 sys-fs/lvm2/files/lvm2-2.02.136-portability.patch  |  44 ----
 .../lvm2-2.02.139-dynamic-static-ldflags.patch     |  63 -----
 sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch      |  15 --
 .../lvm2-2.02.92-dynamic-static-ldflags.patch      |  63 -----
 sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2        |  12 -
 sys-fs/lvm2/lvm2-2.02.145-r2.ebuild                | 260 ---------------------
 sys-fs/lvm2/metadata.xml                           |   1 -
 18 files changed, 1230 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index bad5158..789b3eb 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,3 +1,2 @@
-DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
 DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7
 DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
deleted file mode 100644
index c59f9c3..0000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-	before checkfs fsck
-	after modules device-mapper
-	need lvmetad sysfs
-}
-
-config='global { locking_dir = "/run/lock/lvm" }'
-
-dm_in_proc() {
-	local retval=0
-	for x in devices misc ; do
-		grep -qs 'device-mapper' /proc/${x}
-		retval=$((${retval} + $?))
-	done
-	return ${retval}
-}
-
-start() {
-	# LVM support for /usr, /home, /opt ....
-	# This should be done *before* checking local
-	# volumes, or they never get checked.
-	
-	# NOTE: Add needed modules for LVM or RAID, etc
-	#       to /etc/modules.autoload if needed
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-	if [ -z "${CDBOOT}" ] ; then
-		if [ -e /proc/modules ] && ! dm_in_proc ; then
-			modprobe dm-mod 2>/dev/null
-		fi
-		if [ -d /proc/lvm ] || dm_in_proc ; then
-			ebegin "Setting up the Logical Volume Manager"
-			#still echo stderr for debugging
-			lvm_commands="#! ${lvm_path} --config '${config}'\n"
-			# Extra PV find pass because some devices might not have been available until very recently
-			lvm_commands="${lvm_commands}pvscan\n"
-			# Now make the nodes
-			lvm_commands="${lvm_commands}vgscan --mknodes\n"
-			# And turn them on!
-			lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
-			# Order of this is important, have to work around dash and LVM readline
-			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
-			eend $? "Failed to setup the LVM"
-		fi
-	fi
-}
-
-stop() {
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-# Stop LVM2
-if [ -x /sbin/vgs ] && \
-   [ -x /sbin/vgchange ] && \
-   [ -x /sbin/lvchange ] && \
-   [ -f /etc/lvmtab -o -d /etc/lvm ] && \
-   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
-then
-	einfo "Shutting down the Logical Volume Manager"
-	
-
-        VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
-
-        if [ "$VGS" ]
-        then
-            ebegin "  Shutting Down LVs & VGs"
-			#still echo stderr for debugging
-			lvm_commands="#! ${lvm_path} --config '${config}'\n"
-			# Extra PV find pass because some devices might not have been available until very recently
-			lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
-			# Now make the nodes
-			lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
-			# Order of this is important, have to work around dash and LVM readline
-			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
-			eend $? "Failed (possibly some LVs still needed for /usr or root)"
-        fi
-
-	einfo "Finished shutting down the Logical Volume Manager"
-	return 0
-fi
-}
-
-# vim:ts=4

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
deleted file mode 100644
index 1bf075f..0000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
+++ /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 2>/dev/null | 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/lvm2-2.02.106-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch
deleted file mode 100644
index 594d606..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Make sure that libdm usage always brings in pthread libraries, both in
-pkgconfig and during manual build.
-
---- tools/Makefile.in
-+++ tools/Makefile.in
-@@ -87,6 +87,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)
-@@ -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)
---- libdm/libdevmapper.pc.in
-+++ libdm/libdevmapper.pc.in
-@@ -8,4 +8,5 @@
- Version: @DM_LIB_PATCHLEVEL@
- Cflags: -I${includedir} 
- Libs: -L${libdir} -ldevmapper
-+Libs.private: -L${libdir} @PTHREAD_LIBS@
- Requires.private: @SELINUX_PC@ @UDEV_PC@

diff --git a/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch
deleted file mode 100644
index af5a5af..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Maintainer note: Forward ported without editing from lvm2-2.02.99-example.conf.in.patch to apply cleanly.
-
---- conf/example.conf.in
-+++ conf/example.conf.in
-@@ -105,6 +105,10 @@
-     # 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|" ]
- 
-@@ -522,7 +526,8 @@
-     # e.g. vgscan.lvm1 and they will stop working after you start using
-     # 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.
-@@ -1182,12 +1187,13 @@
- 
- # 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
- 
-     # Default number of copies of metadata to maintain for each VG.
-     # If set to a non-zero value, LVM automatically chooses which of
-@@ -1222,7 +1228,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.108-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch
deleted file mode 100644
index 3ab6998..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-Maintainer note: Forward ported without editing from lvm2-2.02.107-static-pkgconfig-libs.patch to apply cleanly.
-
---- configure.in
-+++ configure.in
-@@ -1067,6 +1067,7 @@
- 			   fi])
- 	if test "$BLKID_WIPING" = yes; then
- 		BLKID_PC="blkid"
-+		BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
- 		AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
- 	fi
- fi
-@@ -1092,6 +1093,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.])
- fi
- 
-@@ -1312,19 +1314,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
- 
- ################################################################################
-@@ -1626,6 +1641,7 @@
- ################################################################################
- AC_SUBST(APPLIB)
- AC_SUBST(AWK)
-+AC_SUBST(BLKID_STATIC_LIBS)
- AC_SUBST(BLKID_PC)
- AC_SUBST(BLKID_WIPING)
- AC_SUBST(BUILD_CMIRRORD)
-@@ -1721,6 +1737,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)
-@@ -1735,6 +1752,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)
---- make.tmpl.in
-+++ make.tmpl.in
-@@ -43,7 +43,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 += @CFLAGS@
-@@ -57,10 +57,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@
- TESTING = @TESTING@
- 
- # Setup directory variables

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
deleted file mode 100644
index efdfb81..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.129-dynamic-static-ldflags.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- 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.129-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
deleted file mode 100644
index 076e060..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.129-example.conf.in.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-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.129-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
deleted file mode 100644
index 2396945..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.129-static-pkgconfig-libs.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- 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.])
- 	else
-@@ -1332,6 +1333,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.])
- fi
- 
-@@ -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.])
--		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
- 
- ################################################################################
-@@ -1902,6 +1917,7 @@
- ################################################################################
- AC_SUBST(APPLIB)
- AC_SUBST(AWK)
-+AC_SUBST(BLKID_STATIC_LIBS)
- AC_SUBST(BLKID_PC)
- AC_SUBST(BUILD_CMIRRORD)
- AC_SUBST(BUILD_DMEVENTD)
-@@ -2005,6 +2021,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)
-@@ -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)
---- 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
--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@
-@@ -58,10 +58,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@
- VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
- TESTING = @TESTING@
- 

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
deleted file mode 100644
index 11db632..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.130-pthread-pkgconfig.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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.136-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch
deleted file mode 100644
index 6492ec0..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.136-fix-stdio-usage.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-diff -Naurw LVM2.2.02.136.orig/lib/commands/toolcontext.c LVM2.2.02.136/lib/commands/toolcontext.c
---- LVM2.2.02.136.orig/lib/commands/toolcontext.c	2015-11-27 17:29:19.000000000 -0800
-+++ LVM2.2.02.136/lib/commands/toolcontext.c	2015-12-03 09:12:38.501331770 -0800
-@@ -1637,7 +1637,9 @@
- /*
-  * 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)
-+#if defined(__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;
- 
-@@ -1664,6 +1666,9 @@
- 
- 	return 1;
- }
-+#else
-+#define _reopen_stream(stream, fd, mode, name) (freopen(NULL, mode, stream) != NULL)
-+#endif
- 
- static int _init_lvmetad(struct cmd_context *cmd)
- {
-@@ -1741,7 +1746,6 @@
- 				       unsigned set_filters)
- {
- 	struct cmd_context *cmd;
--	FILE *new_stream;
- 	int flags;
- 
- #ifdef M_MMAP_MAX
-@@ -1791,9 +1795,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;
-@@ -1803,9 +1806,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", "");
-@@ -2131,7 +2133,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 &&
-@@ -2167,8 +2168,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) */
-@@ -2177,8 +2177,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) */
-diff -Naurw LVM2.2.02.136.orig/tools/lvmcmdline.c LVM2.2.02.136/tools/lvmcmdline.c
---- LVM2.2.02.136.orig/tools/lvmcmdline.c	2015-11-27 17:29:22.000000000 -0800
-+++ LVM2.2.02.136/tools/lvmcmdline.c	2015-12-03 09:14:19.984668128 -0800
-@@ -1744,7 +1744,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
-@@ -1754,7 +1754,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 */
-@@ -1762,7 +1762,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.136-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.136-portability.patch
deleted file mode 100644
index 4d3f8ab..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.136-portability.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naurw LVM2.2.02.136.orig/daemons/lvmetad/lvmetad-core.c LVM2.2.02.136/daemons/lvmetad/lvmetad-core.c
---- LVM2.2.02.136.orig/daemons/lvmetad/lvmetad-core.c	2015-11-27 17:29:18.000000000 -0800
-+++ LVM2.2.02.136/daemons/lvmetad/lvmetad-core.c	2015-12-03 09:06:48.387988004 -0800
-@@ -300,7 +300,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)) {
-@@ -2890,7 +2890,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);
-diff -Naurw LVM2.2.02.136.orig/lib/mm/memlock.c LVM2.2.02.136/lib/mm/memlock.c
---- LVM2.2.02.136.orig/lib/mm/memlock.c	2015-11-27 17:29:19.000000000 -0800
-+++ LVM2.2.02.136/lib/mm/memlock.c	2015-12-03 09:06:20.917987185 -0800
-@@ -145,7 +145,7 @@
- 
- 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;
-diff -Naurw LVM2.2.02.136.orig/libdaemon/server/daemon-server.c LVM2.2.02.136/libdaemon/server/daemon-server.c
---- LVM2.2.02.136.orig/libdaemon/server/daemon-server.c	2015-11-27 17:29:20.000000000 -0800
-+++ LVM2.2.02.136/libdaemon/server/daemon-server.c	2015-12-03 09:07:09.767988641 -0800
-@@ -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.139-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch
deleted file mode 100644
index 312e546..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.139-dynamic-static-ldflags.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-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
deleted file mode 100644
index 1bae0db..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://bugs.gentoo.org/330255
-
-liblvm2app.so: undefined reference to `floor'
-
---- LVM2/liblvm/Makefile.in
-+++ LVM2/liblvm/Makefile.in
-@@ -39,7 +39,7 @@
- 
- include $(top_builddir)/make.tmpl
- 
--LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
-+LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -lm
- 
- ifeq ("@DMEVENTD@", "yes")
-   LIBS += -ldevmapper-event

diff --git a/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
deleted file mode 100644
index de2b294..0000000
--- a/sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/configure.in LVM2.2.02.92/configure.in
---- LVM2.2.02.92.orig/configure.in	2012-02-20 11:36:27.000000000 -0800
-+++ LVM2.2.02.92/configure.in	2012-02-20 15:53:40.700124222 -0800
-@@ -32,6 +32,7 @@
- 		COPTIMISE_FLAG="-O2"
- 		CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
- 		ELDFLAGS="-Wl,--export-dynamic"
-+		STATIC_LDFLAGS="-Wl,--no-export-dynamic"
- 		# FIXME Generate list and use --dynamic-list=.dlopen.sym
- 		CLDWHOLEARCHIVE="-Wl,-whole-archive"
- 		CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
-@@ -1458,6 +1459,7 @@
- AC_SUBST(SELINUX_PC)
- AC_SUBST(SNAPSHOTS)
- AC_SUBST(STATICDIR)
-+AC_SUBST(STATIC_LDFLAGS)
- AC_SUBST(STATIC_LINK)
- AC_SUBST(TESTING)
- AC_SUBST(THIN)
-diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in LVM2.2.02.92/daemons/dmeventd/Makefile.in
---- LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in	2012-02-20 15:48:04.861683196 -0800
-+++ LVM2.2.02.92/daemons/dmeventd/Makefile.in	2012-02-20 15:52:50.732314588 -0800
-@@ -65,7 +65,7 @@
- 	$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
- 
- dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
--	$(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
- 	dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
- 
- ifeq ("@PKGCONFIG@", "yes")
-diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
---- LVM2.2.02.92.orig/make.tmpl.in	2012-02-20 15:48:05.034685963 -0800
-+++ LVM2.2.02.92/make.tmpl.in	2012-02-20 15:48:58.622550855 -0800
-@@ -38,6 +38,7 @@
- ELDFLAGS += @ELDFLAGS@
- LDDEPS += @LDDEPS@
- LDFLAGS += @LDFLAGS@
-+STATIC_LDFLAGS += @STATIC_LDFLAGS@
- LIB_SUFFIX = @LIB_SUFFIX@
- LVMINTERNAL_LIBS = -llvm-internal $(UDEV_LIBS) $(DL_LIBS)
- DL_LIBS = @DL_LIBS@
-diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/tools/Makefile.in LVM2.2.02.92/tools/Makefile.in
---- LVM2.2.02.92.orig/tools/Makefile.in	2011-11-14 13:30:36.000000000 -0800
-+++ LVM2.2.02.92/tools/Makefile.in	2012-02-20 15:52:25.242901501 -0800
-@@ -126,7 +126,7 @@
- 	      -o $@ dmsetup.o -ldevmapper $(LIBS)
- 
- dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
--	$(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
- 	      -o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
- 
- all: device-mapper
-@@ -136,7 +136,7 @@
- 		$(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
- 
- lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
--	$(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
- 	      $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
- 
- liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o

diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
deleted file mode 100644
index c95a47d..0000000
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmetad.pid"
-command="/sbin/lvmetad"
-command_args="${LVMETAD_OPTS:=-p ${pidfile}}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
-	:
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
deleted file mode 100644
index 80210ff..0000000
--- a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# 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="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="
-	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.
-# 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.129-example.conf.in.patch
-
-	# Musl fixes
-	"${FILESDIR}"/${PN}-2.02.136-fix-stdio-usage.patch
-	"${FILESDIR}"/${PN}-2.02.136-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
-)
-
-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 )
-
-	myconf+=( --with-clvmd=none --with-cluster=none )
-
-	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) \
-		--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.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.116-r3 lvmetad
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		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
-
-	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 c1a65d7..8eb6a41 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -16,7 +16,6 @@
 		<description>Backup to Robin. Please CC on bugs.</description>
 	</maintainer>
 	<use>
-		<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="thin">Support for thin volumes</flag>
 		<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-12-10 16:47 Anthony G. Basile
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2019-12-10 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3956e9e8826eefd12c06f680cb8a8f10a742ed93
Author:     Felix Neumärker <xdch47 <AT> posteo <DOT> de>
AuthorDate: Tue Dec 10 14:26:07 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 16:47:40 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=3956e9e8

sys-fs/lvm2: sync with tree

Package-Manager: Portage-2.3.79, Repoman-2.3.16
Manifest-Sign-Key: 0DEDF1A904568BAD1FC45C283DCC44782ED07E1C
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |  15 ++
 sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch   |  13 +
 ...2-2.02.186-udev_remove_unsupported_option.patch |  34 +++
 sys-fs/lvm2/lvm2-2.02.184-r5.ebuild                | 275 ++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.186-r2.ebuild                | 283 +++++++++++++++++++++
 5 files changed, 620 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 789b3eb..b7043ca 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,2 +1,17 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
 DIST LVM2.2.02.183.tgz 2380574 BLAKE2B b1fe71b6cdb8ee20dd53d0ad3399c553487baafa12657ec81a794c84ad161988afdb8693ac247877a2645d693a0740c74c8b991047ed2ba4adc9ec75f1c261a9 SHA512 3947523c6b0862ada40677ed171ed0cf95e070119e377296fc5ccb153e9c4212d34c0b16a887dbd68ccf265525345dabfed2aa59fb3604555429a7e2ecfff4d7
 DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390
+DIST LVM2.2.02.186.tgz 2389759 BLAKE2B e094c0135d455386ea5789208899d4dbdd5e78bebf52e49ab5587f881fbc2b94c6accecacf1b4ed182b0c87046402c00a47a1b724795a94fe3ec998b580a77ae SHA512 06a1c00142ee41d8a576a5e06a5beae70baced3020e753ce3b612355cc4d9e33be4acf58569d49436c4ee1118d288d884c7301b7d886074eaf9f2fa6b0248c03
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAEBCAAdFiEEDe3xqQRWi60fxFwoPcxEeC7QfhwFAl3vqfcACgkQPcxEeC7Q
+fhwSxwf/fiCH3bVA5161TlVLqLnt1U9L5kJBHnUzha2oB5Pl6zYC6FhYLQwbBBPP
+JFaquKMyd52GSwW5Bh+FoJPb5NUlYeVG5MGz2xSLzmv9crEajF+uBtbx4RbCy8l1
+bwu5Kvm0kl/wY16bjj32Nb1JC/NYJL48Hlp1ctHiWXwAIhMTIWyHmde1WwXncwRM
+xGoXAO2t3XQR3OWuJlvUfq2SJHIbd4IF4wlM6R4805Hks/kLePqCQ4gVp/PS5FMK
+PwcCuf5uC0Iad7nlxQAZzhKLKk819Sf9bAOEruRQmGddnZcb/sJFwOsttv4ykJxu
+a+mjZGkExGsjf2Zktse+9pl4EvE1qA==
+=ODib
+-----END PGP SIGNATURE-----

diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
new file mode 100644
index 0000000..49c6853
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/686652
+
+--- LVM2.2.02.184/tools/Makefile.in
++++ LVM2.2.02.184/tools/Makefile.in
+@@ -220,6 +220,6 @@
+ 	  echo "/* Do not edit. This file is generated by the Makefile. */" && \
+ 	  echo -en "const char _command_input[] =\n\n\"" && \
+ 	  $(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
+-	  echo "\\n\";" \
++	  printf "%s\n" "\\n\";" \
+ 	) > $@
+ 
+ $(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h

diff --git a/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch b/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
new file mode 100644
index 0000000..f895e19
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
@@ -0,0 +1,34 @@
+From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001
+From: Peter Rajnoha <prajnoha@redhat.com>
+Date: Tue, 13 Aug 2019 15:18:30 +0200
+Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
+
+The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
+that is ~5 years ago.
+
+Since systemd/udev version 243, there's a new message printed if unsupported
+OPTIONS value is used:
+
+  Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
+
+Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
+---
+ udev/11-dm-lvm.rules.in | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
+index 91cb991df9..7c589943b7 100644
+--- a/udev/11-dm-lvm.rules.in
++++ b/udev/11-dm-lvm.rules.in
+@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
+ 
+ ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
+ 
+-OPTIONS+="event_timeout=180"
+-
+ # Do not create symlinks for inappropriate subdevices.
+ ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
+ ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
+-- 
+2.24.0
+

diff --git a/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
new file mode 100644
index 0000000..82c54e3
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
@@ -0,0 +1,275 @@
+# 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 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}"
+	)
+	# Hard-wire this to bash as some shells (dash) don't know
+	# "-o pipefail" #682404
+	CONFIG_SHELL="/bin/bash" \
+	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
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+	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.186-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
new file mode 100644
index 0000000..5e94754
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
@@ -0,0 +1,283 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+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 ~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}
+	>=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]
+	)"
+BDEPEND="
+	sys-devel/autoconf-archive
+	virtual/pkgconfig
+"
+
+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 # merged upstream
+	"${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
+	"${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
+)
+
+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
+
+	# Don't install thin man page when not requested
+	if ! use thin ; then
+		sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' 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}"
+	)
+	# Hard-wire this to bash as some shells (dash) don't know
+	# "-o pipefail" #682404
+	CONFIG_SHELL="/bin/bash" \
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake V=1
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake V=1 device-mapper
+	else
+		emake V=1
+		emake V=1 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 V=1 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
+		if use !device-mapper-only; then
+			# depends on lvmetad
+			dolib.a libdaemon/client/libdaemonclient.a #462908
+			# depends on dmeventd
+			dolib.a daemons/dmeventd/libdevmapper-event.a
+		fi
+	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] 7+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2023-05-31  0:32 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2023-05-31  0:32 UTC (permalink / raw
  To: gentoo-commits

commit:     7dc13a152d23b3b2f885514f9c571dc8c6366535
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 00:31:42 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 31 00:31:42 2023 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=7dc13a15

sys-fs/lvm2: treeclean

::gentoo works fine now.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 -
 sys-fs/lvm2/files/clvmd.confd-2.02.39              |   9 -
 sys-fs/lvm2/files/clvmd.rc-2.02.39                 | 145 ----------
 sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3    |   1 -
 sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2     | 146 ----------
 sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2       |  21 --
 sys-fs/lvm2/files/dmtab                            |  11 -
 sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 |  38 ---
 sys-fs/lvm2/files/lvm.confd-2.02.184-r3            |   9 -
 sys-fs/lvm2/files/lvm.rc-2.02.187                  | 173 ------------
 sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch        | 127 ---------
 .../files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch     |  12 -
 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 -------
 .../lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch |  29 --
 ...183-implement-libc-specific-reopen_stream.patch |  24 --
 sys-fs/lvm2/files/lvm2-2.02.183-portability.patch  |  21 --
 ...ading-metadata-with-invalid-creation_time.patch |  72 -----
 .../lvm2-2.02.184-dmeventd-no-idle-exit.patch      |  68 -----
 sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch   |  13 -
 ...2-2.02.186-udev_remove_unsupported_option.patch |  34 ---
 .../files/lvm2-2.02.56-lvm2create_initrd.patch     |  72 -----
 .../lvm2-2.02.63-always-make-static-libdm.patch    |  42 ---
 sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch  |  18 --
 sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch   |  11 -
 sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3        |  17 --
 sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1       |  17 --
 sys-fs/lvm2/files/lvmpolld.initd-2.02.183          |  17 --
 sys-fs/lvm2/lvm2-2.02.188-r3.ebuild                | 303 ---------------------
 sys-fs/lvm2/metadata.xml                           |  26 --
 34 files changed, 1745 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
deleted file mode 100644
index 686afb06..00000000
--- a/sys-fs/lvm2/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca

diff --git a/sys-fs/lvm2/files/clvmd.confd-2.02.39 b/sys-fs/lvm2/files/clvmd.confd-2.02.39
deleted file mode 100644
index 57821709..00000000
--- a/sys-fs/lvm2/files/clvmd.confd-2.02.39
+++ /dev/null
@@ -1,9 +0,0 @@
-# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum.
-
-CLVMD_CLUSTER_TIMEOUT=30
-
-
-# CLVMD_NODES_TIMEOUT -- amount of time to wait for the other nodes to
-# join the cluster.
-
-CLVMD_NODES_TIMEOUT=60

diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
deleted file mode 100644
index efadd892..00000000
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
-
-[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30
-[ -n "$CLVMD_NODES_TIMEOUT" ] || CLVMD_NODES_TIMEOUT=60
-
-VGCHANGE="/sbin/vgchange"
-VGSCAN="/sbin/vgscan"
-VGDISPLAY="/sbin/vgdisplay"
-CLVMD_PIDFILE="/var/run/clvmd.pid"
-
-depend() {
-	use net dns logger dmeventd
-	want cman corosync openais
-}
-
-load_modules() {
-	local module modules
-	modules=$1
-	
-	for module in ${modules}; do
-		ebegin "Loading ${module} kernel module"
-		modprobe ${module}
-		eend $? "Failed to load ${module} kernel module"
-	done
-}
-
-unload_modules() {
-	local module modules
-	modules=$1
-	
-	for module in ${modules}; do
-		ebegin "Unloading ${module} kernel module"
-		modprobe -r ${module}
-		eend $? "Failed to unload ${module} kernel module"
-	done
-}
-
-umount_gfs_filesystems() {
-	local sig retry
-	local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
-
-	if [ -n "${remaining}" ]
-	then
-	        sig=
-	        retry=3
-	        while [ -n "${remaining}" -a "${retry}" -gt 0 ]
-	        do
-	                if [ "${retry}" -lt 3 ]
-			then
-	                        ebegin "Unmounting GFS filesystems (retry)"
-	                        umount ${remaining} &>/dev/null
-	                        eend $? "Failed to unmount GFS filesystems this retry"
-	                else
-	                        ebegin "Unmounting GFS filesystems"
-	                        umount ${remaining} &>/dev/null
-	                        eend $? "Failed to unmount GFS filesystems"
-	                fi
-	                remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
-	                [ -z "${remaining}" ] && break
-	                /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
-	                sleep 5
-	                retry=$((${retry} -1))
-	                sig=-9
-	        done
-	fi
-}
-
-
-start_volumes() {
-	ebegin "Scanning LVM volumes"
-	$VGSCAN > /dev/null 2>&1
-	eend $?
-
-	ret=$?
-	if [ "$ret" -eq 5 ]
-	then
-		einfo "  Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
-	fi
-
-	clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
-	for vg in $clustervgs; do
-		ebegin "  Activating Clustered VG: ${vg} "
-
-		wait=0
-		while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
-			if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
-				sleep 3
-				wait=$(($wait + 3))
-			else
-				eend 1
-			fi
-		done
-		eend 0
-	done
-}
-
-stop_volumes() {
-	# Deactivate only clustered volumes
-	clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
-	for vg in $clustervgs; do
-		ebegin "  Shutting Down Clustered VG: ${vg} "
-		$VGCHANGE -anl ${vg} >/dev/null
-		eend $?
-	done
-}
-
-
-start() {
-	local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
-
-	if [ -z "${module}" ]; then
-		load_modules "dm-mod"
-		sleep 1s
-	fi
-
-	ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
-
-	start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
-	eend $?
-
-	start_volumes
-}
-
-stop() {
-
-	# umount GFS filesystems
-	umount_gfs_filesystems
-
-	#stop_volumes
-
-	ebegin "Stopping clvmd"
-	#start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
-	killall -TERM ${CLVMD_BIN} >/dev/null
-	eend $?
-
-        #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
-
-	#if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
-        #        unload_modules "dm-mod"
-        #fi
-}

diff --git a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
deleted file mode 100644
index bc7a2515..00000000
--- a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
+++ /dev/null
@@ -1 +0,0 @@
-RC_AFTER="lvm"

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
deleted file mode 100644
index 7dbacce0..00000000
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
-	# means dmeventd is NOT notified, as it cannot be safely running
-	before dmeventd checkfs fsck
-	after modules
-}
-
-dm_in_proc() {
-	local retval=0
-	for x in devices misc ; do
-		grep -qs 'device-mapper' /proc/${x}
-		retval=$((${retval} + $?))
-	done
-	return ${retval}
-}
-
-# char **build_dmsetup_command(volume)
-#
-# Returns complete dmsetup command given single volume name
-build_dmsetup_command() {
-	local count dmsetup_cmd
-	
-	# Number of lines mentioning volume name
-	count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1})
-	
-	# If there's just one line:
-	if [ ${count} -eq 1 ] ; then
-		echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
-			  grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}"
-			  
-	# For all cases with more lines:
-	elif [ ${count} -gt 1 ] ; then
-		for c in $( seq 1 ${count} ) ; do
-			if [ ${c} -eq 1 ] ; then
-				# Heavy escaping in awk-statement because we cannot use apostrophes
-				dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
-							 grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
-			else
-				# Append starting with newline
-				dmsetup_cmd="${dmsetup_cmd}\\\\n \
-							 $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
-							 grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
-			fi
-		done
-		echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}"
-	fi
-
-	return 0
-}
-
-# char **get_new_dm_volumes(void)
-#
-#   Return unique volumes from /etc/dmtab
-get_new_dm_volumes() {
-	local volume
-
-	# Filter comments and blank lines
-	grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
-	awk '{ print $1 }' | \
-	uniq | \
-	while read volume ; do
-		# If it exists, skip it
-		dmvolume_exists "${volume%:}" && continue
-
-		echo "${volume%:}"
-	done
-
-	return 0
-}
-
-# int dmvolume_exists(volume)
-#
-#   Return true if volume exists in DM table
-dmvolume_exists() {
-	local x line volume=$1
-
-	[ -z "${volume}" ] && return 1
-
-	/sbin/dmsetup ls 2>/dev/null | \
-	while read line ; do
-		for x in ${line} ; do
-			# the following conditonal return only breaks out
-			# of the while loop, as it is running in a pipe.
-			[ "${x}" = "${volume}" ] && return 1
-			# We only want to check the volume name
-			break
-		done
-	done
-
-	# if 1 was returned from the above loop, then indicate that
-	# volume exists
-	[ $? = 1 ] && return 0
-
-	# otherwise the loop exited normally and the volume does not
-	# exist
-	return 1
-}
-
-# int is_empty_dm_volume(volume)
-#
-#   Return true if the volume exists in DM table, but is empty/non-valid
-is_empty_dm_volume() {
-	local table volume=$1
-
-	set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
-	[ "${volume}" = "$1" -a -z "$2" ]
-}
-
-
-start() {
-	if [ -e /proc/modules ] && ! dm_in_proc ; then
-		modprobe dm-mod 2>/dev/null
-	fi
-	# Ensure the dirs exist for locking and running
-	checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
-
-	local x volume
-	
-	if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
-		[ -n "$(get_new_dm_volumes)" ] && \
-			einfo " Setting up device-mapper volumes:"
-		
-		get_new_dm_volumes | \
-		while read x ; do
-			[ -n "${x}" ] || continue
-			
-			volume="${x##* }"
-			
-			ebegin "  Creating volume: ${volume}"
-			if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then
-				eend 1 "  Error creating volume: ${volume}"
-				# dmsetup still adds an empty volume in some cases,
-				#  so lets remove it
-				is_empty_dm_volume "${volume}" && \
-					/sbin/dmsetup remove "${volume}" 2>/dev/null
-			else
-				eend 0
-			fi
-		done
-	fi
-}
-

diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
deleted file mode 100644
index bc08c0a9..00000000
--- a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/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/dmtab b/sys-fs/lvm2/files/dmtab
deleted file mode 100644
index 37a0d286..00000000
--- a/sys-fs/lvm2/files/dmtab
+++ /dev/null
@@ -1,11 +0,0 @@
-#/etc/dmraid: config file for adding device-mapper volumes at boot
-
-# Format: <volume name>: <table>
-# Example: isw0: 0 312602976 striped 2 128 /dev/sda 0 /dev/sdb 0
-#
-# Alternatively you can create all your volumes the first time, and just run:
-#
-#   dmsetup table >> /etc/dmtab
-#
-# and verify that they are correct.
-

diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
deleted file mode 100644
index d603718c..00000000
--- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# This script is based on upstream file
-# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
-
-depend() {
-	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
-	# means dmeventd is NOT notified, as it cannot be safely running
-	need lvm dmeventd
-}
-
-VGCHANGE=/sbin/vgchange
-VGS=/sbin/vgs
-
-start() {
-	ret=0
-	# TODO do we want to separate out already active groups only?
-	VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
-	ebegin "Starting LVM monitoring for VGs ${VGSLIST}:"
-	$VGCHANGE --monitor y --poll y  ${VGSLIST}
-	ret=$?
-	eend $ret
-	return $ret
-
-}
-
-stop() {
-	ret=0
-	# TODO do we want to separate out already active groups only?
-	VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
-	ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:"
-	$VGCHANGE --monitor n ${VGSLIST}
-	ret=$?
-	eend $ret
-	return $ret
-}

diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 b/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
deleted file mode 100644
index b29e1702..00000000
--- a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187
deleted file mode 100644
index 3468adc9..00000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.187
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2020 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}"
-}
-
-_use_lvmetad() {
-	local lvm_path="$(_get_lvm_path)"
-	[ ! -x "${lvm_path}" ] && return 1
-	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
-}
-
-_use_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 want 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 _want=
-
-	if service_started ; then
-		_want=$(service_get_value want)
-	else
-		if _use_lvmetad ; then
-			_want="${_want} lvmetad"
-		fi
-
-		if _use_lvmlockd ; then
-			_want="${_want} 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
-
-	if [ -n "${_want}" ] ; then
-		want ${_want}
-	fi
-}
-
-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)"
-	if [ -z "${lvm_path}" ] ; then
-		eerror "Failed to find lvm binary in /bin or /sbin!"
-		return 1
-	fi
-
-	if [ -z "${CDBOOT}" ] ; then
-		if [ -e /proc/modules ] && ! dm_in_proc ; then
-			ebegin "Trying to load dm-mod module"
-			modprobe dm-mod 2>/dev/null
-			eend $?
-		fi
-
-		if [ -d /proc/lvm ] || dm_in_proc ; then
-			local has_errors=0 verbose_command
-
-			yesno "${rc_verbose}" && verbose_command=" -v"
-
-			ebegin "Starting the Logical Volume Manager"
-
-			if _use_lvmetad ; then
-				# Extra PV find pass because some devices might not have been available until very recently
-				${lvm_path} pvscan${verbose_command} --config "${config}" --cache
-				[ $? -ne 0 ] && has_errors=1
-			fi
-
-			# Now make the nodes
-			${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes
-			[ $? -ne 0 ] && has_errors=1
-
-			# Enable all VGs
-			${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y
-			[ $? -ne 0 ] && has_errors=1
-
-			if _use_lvmlockd ; then
-				# Start lockd VGs as required
-				${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto
-				[ $? -ne 0 ] && has_errors=1
-			fi
-
-			eend ${has_errors} "Failed to start the Logical Volume Manager"
-		fi
-	fi
-}
-
-start_post() {
-	local _want=
-	if _use_lvmetad ; then
-		_want="${_want} lvmetad"
-	fi
-
-	if _use_lvmlockd ; then
-		_want="${_want} lvmlockd"
-	fi
-
-	service_set_value want "${_want}"
-}
-
-stop() {
-	lvm_path="$(_get_lvm_path)"
-	if [ -z "${lvm_path}" ] ; then
-		eerror "Failed to find lvm binary in /bin or /sbin!"
-		return 1
-	fi
-
-	# Stop LVM2
-	if [ -f /etc/lvmtab -o -d /etc/lvm ] \
-		&& [ -d /proc/lvm  -o "$(grep device-mapper /proc/misc 2>/dev/null)" ]
-	then
-		local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
-		if [ -z "${VGS}" ] ; then
-			# nothing to do for us
-			return 0
-		fi
-
-		local has_errors=0 verbose_command eend_cmd="eend"
-
-		yesno "${rc_verbose}" && verbose_command=" -v"
-
-		local msg="Failed to stop Logical Volume Manager"
-		if [ "${RC_RUNLEVEL}" = shutdown ] ; then
-			# failures on shutdown are non-fatal
-			eend_cmd="ewend"
-			msg="${msg} (possibly some LVs still needed for /usr or root)"
-		fi
-
-		ebegin "Stopping the Logical Volume Manager"
-
-		${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n
-		[ $? -ne 0 ] && has_errors=1
-
-		${eend_cmd} ${has_errors} "${msg}"
-	fi
-
-	# at this point make sure we always exit without indicating an error
-	return 0
-}
-
-# vim:ts=4

diff --git a/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
deleted file mode 100644
index f91dccd5..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-https://bugs.gentoo.org/580062
-
-From 2a1d0fa8ea765604cd8274aac5aa7876f1c145c9 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 19 Apr 2016 23:53:22 -0400
-Subject: [PATCH] convert major/minor/makedev handling
-
-Most of the files in here use MAJOR/MINOR/MKDEV macros, but a few
-missed it.  Update the defines in those files to match them.
----
- daemons/cmirrord/functions.c                          | 16 ++++++++++++----
- daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 12 ++++++++++--
- lib/filters/filter-sysfs.c                            |  6 ++++--
- 3 files changed, 26 insertions(+), 8 deletions(-)
-
-diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
-index e9d3c09..5b3cb38 100644
---- a/daemons/cmirrord/functions.c
-+++ b/daemons/cmirrord/functions.c
-@@ -20,6 +20,14 @@
- #include <time.h>
- #include <unistd.h>
- 
-+#ifdef __linux__
-+#  include "kdev_t.h"
-+#else
-+#  define MAJOR(x) major((x))
-+#  define MINOR(x) minor((x))
-+#  define MKDEV(x,y) makedev((x),(y))
-+#endif
-+
- #define BYTE_SHIFT 3
- 
- /*
-@@ -333,8 +341,8 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat
- 			continue;
- 		}
- 		if (S_ISBLK(statbuf.st_mode) &&
--		    (major(statbuf.st_rdev) == major) &&
--		    (minor(statbuf.st_rdev) == minor)) {
-+		    (MAJOR(statbuf.st_rdev) == major) &&
-+		    (MINOR(statbuf.st_rdev) == minor)) {
- 			LOG_DBG("  %s: YES", dep->d_name);
- 			if (closedir(dp))
- 				LOG_DBG("Unable to closedir /dev/mapper %s",
-@@ -1451,7 +1459,7 @@ static int disk_status_info(struct log_c *lc, struct dm_ulog_request *rq)
- 	}
- 
- 	r = sprintf(data, "3 clustered-disk %d:%d %c",
--		    major(statbuf.st_rdev), minor(statbuf.st_rdev),
-+		    MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
- 		    (lc->log_dev_failed) ? 'D' : 'A');
- 	if (r < 0)
- 		return r;
-@@ -1514,7 +1522,7 @@ static int disk_status_table(struct log_c *lc, struct dm_ulog_request *rq)
- 	}
- 
- 	r = sprintf(data, "clustered-disk %d:%d %u %s%s ",
--		    major(statbuf.st_rdev), minor(statbuf.st_rdev),
-+		    MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
- 		    lc->region_size,
- 		    (lc->sync == DEFAULTSYNC) ? "" :
- 		    (lc->sync == NOSYNC) ? "nosync " : "sync ",
-diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-index 7b060ed..4098203 100644
---- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-@@ -20,6 +20,14 @@
- #include <stdarg.h>
- #include <pthread.h>
- 
-+#ifdef __linux__
-+#  include "kdev_t.h"
-+#else
-+#  define MAJOR(x) major((x))
-+#  define MINOR(x) minor((x))
-+#  define MKDEV(x,y) makedev((x),(y))
-+#endif
-+
- /* First warning when snapshot is 80% full. */
- #define WARNING_THRESH	(DM_PERCENT_1 * 80)
- /* Run a check every 5%. */
-@@ -148,8 +156,8 @@ static void _umount(const char *device, int major, int minor)
- 			continue; /* can't stat, skip this one */
- 
- 		if (S_ISBLK(st.st_mode) &&
--		    major(st.st_rdev) == major &&
--		    minor(st.st_rdev) == minor) {
-+		    MAJOR(st.st_rdev) == major &&
-+		    MINOR(st.st_rdev) == minor) {
- 			log_error("Unmounting invalid snapshot %s from %s.", device, words[1]);
- 			if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL))
- 				log_error("Failed to umount snapshot %s from %s: %s.",
-diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c
-index 3115f86..5f76e8b 100644
---- a/lib/filters/filter-sysfs.c
-+++ b/lib/filters/filter-sysfs.c
-@@ -19,6 +19,8 @@
- 
- #include <dirent.h>
- 
-+#include "kdev_t.h"
-+
- static int _locate_sysfs_blocks(const char *sysfs_dir, char *path, size_t len,
- 				unsigned *sysfs_depth)
- {
-@@ -120,7 +122,7 @@ static struct dev_set *_dev_set_create(struct dm_pool *mem,
- 
- static unsigned _hash_dev(dev_t dev)
- {
--	return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
-+	return (MAJOR(dev) ^ MINOR(dev)) & (SET_BUCKETS - 1);
- }
- 
- /*
-@@ -171,7 +173,7 @@ static int _parse_dev(const char *file, FILE *fp, dev_t *result)
- 		return 0;
- 	}
- 
--	*result = makedev(major, minor);
-+	*result = MKDEV(major, minor);
- 	return 1;
- }
- 
--- 
-2.7.4
-

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
deleted file mode 100644
index 0f830e42..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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.171-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
deleted file mode 100644
index 1cbf956d..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
deleted file mode 100644
index c0265e81..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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
deleted file mode 100644
index c831c6d6..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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
deleted file mode 100644
index 0a0e7320..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- 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
deleted file mode 100644
index 34c710d4..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- 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
deleted file mode 100644
index 989b3082..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- 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-2.02.183-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
deleted file mode 100644
index 8564d082..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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-implement-libc-specific-reopen_stream.patch b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
deleted file mode 100644
index 6034be36..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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/files/lvm2-2.02.183-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
deleted file mode 100644
index ecdcb1ce..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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/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
deleted file mode 100644
index 34968c7c..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-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
deleted file mode 100644
index c80bd2ba..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-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/files/lvm2-2.02.184-mksh_build.patch b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
deleted file mode 100644
index 49c6853f..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/686652
-
---- LVM2.2.02.184/tools/Makefile.in
-+++ LVM2.2.02.184/tools/Makefile.in
-@@ -220,6 +220,6 @@
- 	  echo "/* Do not edit. This file is generated by the Makefile. */" && \
- 	  echo -en "const char _command_input[] =\n\n\"" && \
- 	  $(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
--	  echo "\\n\";" \
-+	  printf "%s\n" "\\n\";" \
- 	) > $@
- 
- $(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h

diff --git a/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch b/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
deleted file mode 100644
index f895e192..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001
-From: Peter Rajnoha <prajnoha@redhat.com>
-Date: Tue, 13 Aug 2019 15:18:30 +0200
-Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
-
-The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
-that is ~5 years ago.
-
-Since systemd/udev version 243, there's a new message printed if unsupported
-OPTIONS value is used:
-
-  Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
-
-Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
----
- udev/11-dm-lvm.rules.in | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
-index 91cb991df9..7c589943b7 100644
---- a/udev/11-dm-lvm.rules.in
-+++ b/udev/11-dm-lvm.rules.in
-@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
- 
- ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
- 
--OPTIONS+="event_timeout=180"
--
- # Do not create symlinks for inappropriate subdevices.
- ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
- ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
--- 
-2.24.0
-

diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
deleted file mode 100644
index 59aaa9b3..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig	2006-11-21 22:41:56.000000000 +0000
-+++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd	2009-12-26 01:47:08.025224602 +0000
-@@ -54,7 +54,9 @@
- DEVRAM=/tmp/initrd.$$
- 
- # set defaults
--BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
-+LVM=`which lvm.static`
-+LVM=${LVM:-"`which lvm`"}
-+BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
- BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
- BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
- MAKEDEV=${MAKEDEV:-"debian"}
-@@ -119,6 +121,10 @@
- echo "$PRE Mounting /proc"
- mount -t proc none /proc
- 
-+# We need /sys for lvm
-+echo "$PRE Mounting /sys"
-+mount -t sysfs sysfs /sys
-+
- # plug in modules listed in /etc/modules
- if [ -f /etc/modules ]; then
-     echo -n "$PRE plugging in kernel modules:"
-@@ -179,26 +185,29 @@
- # run a shell if we're passed lvm2rescue on commandline
- grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
- if [ $? -eq 0 ]; then
--    lvm vgchange --ignorelockingfailure -P -a y
-+    $LVM vgchange --ignorelockingfailure -P -a y
-     do_shell
- else
--    lvm vgchange --ignorelockingfailure -a y
-+    $LVM vgchange --ignorelockingfailure -a y
- fi
- 
- echo "$PRE Mounting root filesystem $rootvol ro"
- mkdir /rootvol
- if ! mount -t auto -o ro $rootvol /rootvol; then
--	echo "\t*FAILED*";
-+	echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
- 	do_shell
- fi
- 
- echo "$PRE Umounting /proc"
- umount /proc
- 
-+echo "$PRE Umounting /sys"
-+umount /sys
-+
- echo "$PRE Changing roots"
- cd /rootvol
- if ! pivot_root . initrd ; then
--	echo "\t*FAILED*"
-+	echo "\t*FAILED PIVOT TO NEW ROOT*"
- 	do_shell
- fi
- 
-@@ -356,7 +365,7 @@
- fi
- 
- verbose "creating basic set of directories in $TMPMNT"
--(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
-+(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
- if [ $? -ne 0 ]; then
-    echo "$cmd -- ERROR creating directories in $TMPMNT"
-    cleanup 1
-@@ -499,4 +508,3 @@
- FINALTXT
- 
- cleanup 0
--

diff --git a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
deleted file mode 100644
index 5ddcb4e5..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in
---- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in	2010-04-09 14:42:48.000000000 -0700
-+++ LVM2.2.02.63/daemons/dmeventd/Makefile.in	2010-04-19 11:53:27.000000000 -0700
-@@ -28,11 +28,12 @@
- INSTALL_LIB_TARGETS = install_lib_dynamic
- 
- LIB_NAME = libdevmapper-event
-+LIB_STATIC = $(LIB_NAME).a
-+INSTALL_LIB_TARGETS += install_lib_static
-+TARGETS += $(LIB_STATIC)
- ifeq ("@STATIC_LINK@", "yes")
--  LIB_STATIC = $(LIB_NAME).a
--  TARGETS += $(LIB_STATIC) dmeventd.static
-+  TARGETS += dmeventd.static
-   INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
--  INSTALL_LIB_TARGETS += install_lib_static
- endif
- 
- LIB_VERSION = $(LIB_VERSION_DM)
-diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in
---- LVM2.2.02.63.orig/libdm/Makefile.in	2010-04-09 14:42:51.000000000 -0700
-+++ LVM2.2.02.63/libdm/Makefile.in	2010-04-19 11:52:20.000000000 -0700
-@@ -34,8 +34,8 @@
- 
- INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
- 
--ifeq ("@STATIC_LINK@", "yes")
- LIB_STATIC = $(interface)/libdevmapper.a
-+ifeq ("@STATIC_LINK@", "yes")
- endif
- 
- LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
-@@ -63,8 +63,8 @@
- 
- INSTALL_TYPE = install_dynamic
- 
--ifeq ("@STATIC_LINK@", "yes")
-   INSTALL_TYPE += install_static
-+ifeq ("@STATIC_LINK@", "yes")
- endif
- 
- ifeq ("@PKGCONFIG@", "yes")

diff --git a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
deleted file mode 100644
index 7f0bfb89..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331
-X-Gentoo-Bug: 301331
-
-diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd
---- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd	2010-06-07 18:44:34.182980475 +0000
-+++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd	2010-06-07 18:51:27.636312899 +0000
-@@ -469,9 +469,9 @@
- rmdir $TMPMNT/lost+found
- 
- echo "$cmd -- ummounting ram disk"
--umount $DEVRAM
-+umount $TMPMNT
- if [ $? -ne 0 ]; then
--   echo "$cmd -- ERROR umounting $DEVRAM"
-+   echo "$cmd -- ERROR umounting $TMPMNT"
-    cleanup 1
- fi
- 

diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
deleted file mode 100644
index fe7ec879..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- LVM2/make.tmpl.in
-+++ LVM2/make.tmpl.in
-@@ -395,7 +395,7 @@
- 	( cat $(srcdir)/.exported_symbols; \
- 	  if test x$(EXPORTED_HEADER) != x; then \
- 		$(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
--		$(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
-+		LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
- 	  fi \
- 	) > $@
- 

diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3 b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
deleted file mode 100644
index 2efce422..00000000
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmetad.pid"
-command="/sbin/lvmetad"
-command_args="${LVMETAD_OPTS:=-p ${pidfile}}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
-	:
-}
-
-start_pre()
-{
-	checkpath --directory /run/lvm || return 1
-}

diff --git a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
deleted file mode 100644
index 16e2cc3f..00000000
--- a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmlockd.pid"
-command="/sbin/lvmlockd"
-command_args="${LVMLOCKD_OPTS:--p ${pidfile}} ${LVMLOCKD_TYPE:--g sanlock}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
-	before sanlock
-}
-
-start_pre()
-{
-	checkpath --directory /run/lvm || return 1
-}

diff --git a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 b/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
deleted file mode 100644
index 6b260109..00000000
--- a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmpolld.pid"
-command="/sbin/lvmpolld"
-command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
-	:
-}
-
-start_pre()
-{
-	checkpath --directory /run/lvm || return 1
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild b/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild
deleted file mode 100644
index 493fc838..00000000
--- a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild
+++ /dev/null
@@ -1,303 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-TMPFILES_OPTIONAL=1
-inherit autotools linux-info systemd toolchain-funcs tmpfiles 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 ppc64 x86"
-IUSE="readline static static-libs systemd lvm2create-initrd sanlock selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !lvm2create-initrd !sanlock !thin )
-	static? ( !systemd !udev )
-	static-libs? ( !udev )
-	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:= )"
-# /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/util-linux-2.16
-	lvm2create-initrd? ( sys-apps/makedev )
-	!device-mapper-only? ( virtual/tmpfiles )
-	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}
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-BDEPEND="
-	sys-devel/autoconf-archive
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
-
-PATCHES=(
-	# Gentoo specific modification(s):
-	"${FILESDIR}"/${PN}-2.02.178-example.conf.in.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 # merged upstream
-	"${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
-	"${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
-
-	# 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
-)
-
-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
-
-	# Don't install thin man page when not requested
-	if ! use thin ; then
-		sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' 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}"
-	)
-	# Hard-wire this to bash as some shells (dash) don't know
-	# "-o pipefail" #682404
-	CONFIG_SHELL="/bin/bash" \
-	econf "${myeconfargs[@]}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake V=1
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake V=1 device-mapper
-	else
-		emake V=1
-		emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	local INSTALL_TARGETS=( install install_tmpfiles_configuration )
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS+=( SYSTEMD_GENERATOR_DIR="$(systemd_get_systemgeneratordir)" install_systemd_units install_systemd_generators )
-	use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
-	emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}"
-
-	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.187 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
-		if use !device-mapper-only; then
-			# depends on lvmetad
-			dolib.a libdaemon/client/libdaemonclient.a #462908
-			# depends on dmeventd
-			dolib.a daemons/dmeventd/libdevmapper-event.a
-		fi
-	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() {
-	if ! use device-mapper-only; then
-		tmpfiles_process lvm2.conf
-	fi
-
-	if [[ -z "${REPLACING_VERSIONS}" ]]; then
-		# This is a new installation
-		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."
-	fi
-
-	if use udev && [[ -d /run ]] ; then
-		local permission_run_expected="drwxr-xr-x"
-		local permission_run=$(stat -c "%A" /run)
-		if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then
-			ewarn "Found the following problematic permissions:"
-			ewarn ""
-			ewarn "    ${permission_run} /run"
-			ewarn ""
-			ewarn "Expected:"
-			ewarn ""
-			ewarn "    ${permission_run_expected} /run"
-			ewarn ""
-			ewarn "This is known to be causing problems for UDEV-enabled LVM services."
-		fi
-	fi
-}
-
-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
deleted file mode 100644
index e264bd79..00000000
--- a/sys-fs/lvm2/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>base-system@gentoo.org</email>
-		<name>Gentoo Base System</name>
-	</maintainer>
-	<maintainer type="person">
-		<email>robbat2@gentoo.org</email>
-		<name>Robin H. Johnson</name>
-	</maintainer>
-	<maintainer type="person" proxied="yes">
-		<email>agk@redhat.com</email>
-		<name>Alasdair Kergon</name>
-		<description>Upstream Maintainer (please CC on bugs)</description>
-	</maintainer>
-	<use>
-		<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>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-31  0:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14  0:22 [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/ Aric Belsito
  -- strict thread matches above, loose matches on Subject: below --
2017-02-19 21:07 Aric Belsito
2017-05-05  3:55 Aric Belsito
2019-04-16 20:42 Anthony G. Basile
2019-04-16 20:55 Anthony G. Basile
2019-12-10 16:47 Anthony G. Basile
2023-05-31  0:32 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox