public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2015-12-28  0:30 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2015-12-28  0:30 UTC (permalink / raw
  To: gentoo-commits

commit:     ef66b97c3c1778c3c8e9f96d80057ad7a1a3e2f4
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 24 23:28:35 2015 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 00:29:01 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef66b97c

sys-fs/lvm2: conditionally depend on lvmetad

If the user has configured their system to be dependent on lvmetad in
/etc/lvm/lvm.conf then we need to depend on lvmetad starting up.
Otherwise it shouldn't be necessary and won't be started.

Gentoo-Bug: 503016
Gentoo-Bug: 525614
Gentoo-Bug: 554918
Gentoo-Bug: 565154
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.02.116-r3 | 134 +++++++++++++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.116-r3.ebuild  |   2 +-
 2 files changed, 135 insertions(+), 1 deletion(-)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r3 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r3
new file mode 100644
index 0000000..059e880
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r3
@@ -0,0 +1,134 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+_get_lvm_path() {
+	local lvm_path=
+	for lvm_path in /bin/lvm /sbin/lvm ; do
+		[ -x "$lvm_path" ] && break
+	done
+	echo "${lvm_path}"
+}
+
+_need_lvmetad()
+{
+	local lvm_path="$(_get_lvm_path)"
+	[ ! -x "${lvm_path}" ] && return 1
+	${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1'
+}
+
+depend() {
+	before checkfs fsck
+	after modules device-mapper
+	need lvmetad sysfs
+	# We may use lvmetad based on the configuration. If we added lvmetad
+	# support while lvm2 is running then we aren't dependent on it. For the
+	# more common case, if its disabled in the config we aren't dependent
+	# on it.
+	config /etc/lvm/lvm.conf
+	local _need=
+	if service_started; then
+		_need=$(service_get_value need)
+	else
+		if _need_lvmetad; then
+			_need="${_need} lvmetad"
+		fi
+	fi
+	need ${_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/lvm2-2.02.116-r3.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r3.ebuild
index 3146e3c..e62a3b6 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r3.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r3.ebuild
@@ -227,7 +227,7 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r3 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] 31+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2016-01-05  2:56 Doug Goldstein
  0 siblings, 0 replies; 31+ messages in thread
From: Doug Goldstein @ 2016-01-05  2:56 UTC (permalink / raw
  To: gentoo-commits

commit:     f5a9734bbb67f004930c8bf8e03ad5e61a4c2d7f
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 02:55:40 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 02:56:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5a9734b

sys-fs/lvm2: bump to fix lvmetad init script depend

In my previous bump I incorrectly left the hardcoded dependency on
lvmetad so the lvm script still always depended on lvmetad. This fixes
that and makes it truly dynamic and adds instructions so that people
can ensure their next boot works properly.

Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 sys-fs/lvm2/files/{lvm.rc-2.02.116-r3 => lvm.rc-2.02.116-r4}     | 3 +--
 sys-fs/lvm2/{lvm2-2.02.116-r3.ebuild => lvm2-2.02.116-r4.ebuild} | 8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r3 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
similarity index 99%
rename from sys-fs/lvm2/files/lvm.rc-2.02.116-r3
rename to sys-fs/lvm2/files/lvm.rc-2.02.116-r4
index 059e880..8478c23 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r3
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
@@ -21,7 +21,6 @@ _need_lvmetad()
 depend() {
 	before checkfs fsck
 	after modules device-mapper
-	need lvmetad sysfs
 	# We may use lvmetad based on the configuration. If we added lvmetad
 	# support while lvm2 is running then we aren't dependent on it. For the
 	# more common case, if its disabled in the config we aren't dependent
@@ -35,7 +34,7 @@ depend() {
 			_need="${_need} lvmetad"
 		fi
 	fi
-	need ${_need}
+	need sysfs ${_need}
 }
 
 config='global { locking_dir = "/run/lock/lvm" }'

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r3.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
similarity index 97%
rename from sys-fs/lvm2/lvm2-2.02.116-r3.ebuild
rename to sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
index bbb4279..5d54576 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r3.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -230,7 +230,7 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r3 lvm
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm
 		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
 
 		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
@@ -270,6 +270,10 @@ pkg_postinst() {
 	ewarn
 	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
 	ewarn "to enable lvm autoactivation and metadata caching."
+	ewarn
+	ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
+	ewarn "run the following to update the init script dependencies: "
+	ewarn "# rc-update -u"
 }
 
 src_test() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2016-03-10 15:37 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2016-03-10 15:37 UTC (permalink / raw
  To: gentoo-commits

commit:     e70838bfc11e3489550eac72831216afa2af2424
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 15:36:24 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 15:37:37 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e70838bf

sys-fs/lvm2: EAPI6 conversion from Lars Wendler (polynomial-c).

Package-Manager: portage-2.2.27

 sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch    |   4 +-
 sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch |   4 +-
 sys-fs/lvm2/lvm2-2.02.145-r1.ebuild              | 289 +++++++++++++++++++++++
 3 files changed, 293 insertions(+), 4 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
index 7576e19..1bae0db 100644
--- a/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
+++ b/sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch
@@ -2,8 +2,8 @@ http://bugs.gentoo.org/330255
 
 liblvm2app.so: undefined reference to `floor'
 
---- liblvm/Makefile.in
-+++ liblvm/Makefile.in
+--- LVM2/liblvm/Makefile.in
++++ LVM2/liblvm/Makefile.in
 @@ -39,7 +39,7 @@
  
  include $(top_builddir)/make.tmpl

diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
index 364fbd4..fe7ec87 100644
--- a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
+++ b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
@@ -1,5 +1,5 @@
---- make.tmpl.in
-+++ make.tmpl.in
+--- LVM2/make.tmpl.in
++++ LVM2/make.tmpl.in
 @@ -395,7 +395,7 @@
  	( cat $(srcdir)/.exported_symbols; \
  	  if test x$(EXPORTED_HEADER) != x; then \

diff --git a/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild
new file mode 100644
index 0000000..64b00ea
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2016 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
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+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 )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	# 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
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf=()
+	local buildmode
+
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf+=( --enable-static_link )
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
+	if use thin; then
+		myconf+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myconf+=( --with-thin=none --with-cache=none )
+	fi
+
+	if use lvm1; then
+		myconf+=( --with-lvm1=${buildmode} )
+	else
+		myconf+=( --with-lvm1=none )
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf+=( --disable-o_direct )
+
+	if use clvm; then
+		myconf+=( --with-cluster=${buildmode} )
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
+	else
+		myconf+=( --with-clvmd=none --with-cluster=none )
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable 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.105-r2 lvm
+		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
+
+		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
+	fi
+
+	if use clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2016-03-15  3:59 Doug Goldstein
  0 siblings, 0 replies; 31+ messages in thread
From: Doug Goldstein @ 2016-03-15  3:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d537027f4c66273bd05b9b9105f8fd1b5ab25f31
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 03:56:59 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 03:58:54 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d537027f

sys-fs/lvm2: make depend() in lvm init script quiet

The depend() function makes a call to lvm which can produce output on
stderr which might seem concerning to some but is really just harmless.
We are checking to see if we need lvmetad to be able to start up properly.
At the same time make sure all possible versions receive updated init
scripts.

Gentoo-Bug: 577308
Gentoo-Bug: 573384

Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.02.116-r6 | 133 ++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.116-r6.ebuild  | 291 +++++++++++++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.136-r2.ebuild  | 284 ++++++++++++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.139-r1.ebuild  | 284 ++++++++++++++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.145-r2.ebuild  | 289 ++++++++++++++++++++++++++++++++++
 5 files changed, 1281 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
new file mode 100644
index 0000000..db7c3a4
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
@@ -0,0 +1,133 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+_get_lvm_path() {
+	local lvm_path=
+	for lvm_path in /bin/lvm /sbin/lvm ; do
+		[ -x "$lvm_path" ] && break
+	done
+	echo "${lvm_path}"
+}
+
+_need_lvmetad()
+{
+	local lvm_path="$(_get_lvm_path)"
+	[ ! -x "${lvm_path}" ] && return 1
+	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
+}
+
+depend() {
+	before checkfs fsck
+	after modules device-mapper
+	# 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/lvm2-2.02.116-r6.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r6.ebuild
new file mode 100644
index 0000000..2cc173a
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.116-r6.ebuild
@@ -0,0 +1,291 @@
+# 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
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+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 )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? (
+		app-arch/cpio
+		sys-apps/makedev
+	)
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	# Gentoo specific modification(s):
+	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# For upstream -- review and forward:
+	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
+	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf
+	local buildmode
+
+	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
+	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
+	myconf="${myconf} $(use_enable !device-mapper-only applib)"
+	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
+	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
+	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf="${myconf} --enable-static_link"
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf="${myconf} --with-mirrors=${dmbuildmode}"
+	myconf="${myconf} --with-snapshots=${dmbuildmode}"
+	if use thin; then
+		myconf="${myconf} --with-thin=internal --with-cache=internal"
+		local texec
+		for texec in check dump repair restore; do
+			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
+			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+		done
+	else
+		myconf="${myconf} --with-thin=none --with-cache=none"
+	fi
+
+	if use lvm1; then
+		myconf="${myconf} --with-lvm1=${buildmode}"
+	else
+		myconf="${myconf} --with-lvm1=none"
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf="${myconf} --disable-o_direct"
+
+	if use clvm; then
+		myconf="${myconf} --with-cluster=${buildmode}"
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf="${myconf} --with-clvmd=${clvmd}"
+		myconf="${myconf} --with-pool=${buildmode}"
+	else
+		myconf="${myconf} --with-clvmd=none --with-cluster=none"
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		"$(systemd_with_unitdir)" \
+		${myconf} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+	ewarn
+	ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
+	ewarn "run the following to update the init script dependencies: "
+	ewarn "# rc-update -u"
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild
new file mode 100644
index 0000000..9c1f239
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild
@@ -0,0 +1,284 @@
+# 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
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+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 )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	# Gentoo specific modification(s):
+	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# For upstream -- review and forward:
+	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+	epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
+	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf
+	local buildmode
+
+	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
+	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
+	myconf="${myconf} $(use_enable !device-mapper-only applib)"
+	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
+	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
+	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf="${myconf} --enable-static_link"
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf="${myconf} --with-mirrors=${dmbuildmode}"
+	myconf="${myconf} --with-snapshots=${dmbuildmode}"
+	if use thin; then
+		myconf="${myconf} --with-thin=internal --with-cache=internal"
+		local texec
+		for texec in check dump repair restore; do
+			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
+			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+		done
+	else
+		myconf="${myconf} --with-thin=none --with-cache=none"
+	fi
+
+	if use lvm1; then
+		myconf="${myconf} --with-lvm1=${buildmode}"
+	else
+		myconf="${myconf} --with-lvm1=none"
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf="${myconf} --disable-o_direct"
+
+	if use clvm; then
+		myconf="${myconf} --with-cluster=${buildmode}"
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf="${myconf} --with-clvmd=${clvmd}"
+		myconf="${myconf} --with-pool=${buildmode}"
+	else
+		myconf="${myconf} --with-clvmd=none --with-cluster=none"
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		"$(systemd_with_unitdir)" \
+		${myconf} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild
new file mode 100644
index 0000000..3902dda
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild
@@ -0,0 +1,284 @@
+# 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
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+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 )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	# Gentoo specific modification(s):
+	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# For upstream -- review and forward:
+	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+	epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
+	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf
+	local buildmode
+
+	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
+	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
+	myconf="${myconf} $(use_enable !device-mapper-only applib)"
+	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
+	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
+	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf="${myconf} --enable-static_link"
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf="${myconf} --with-mirrors=${dmbuildmode}"
+	myconf="${myconf} --with-snapshots=${dmbuildmode}"
+	if use thin; then
+		myconf="${myconf} --with-thin=internal --with-cache=internal"
+		local texec
+		for texec in check dump repair restore; do
+			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
+			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+		done
+	else
+		myconf="${myconf} --with-thin=none --with-cache=none"
+	fi
+
+	if use lvm1; then
+		myconf="${myconf} --with-lvm1=${buildmode}"
+	else
+		myconf="${myconf} --with-lvm1=none"
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf="${myconf} --disable-o_direct"
+
+	if use clvm; then
+		myconf="${myconf} --with-cluster=${buildmode}"
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf="${myconf} --with-clvmd=${clvmd}"
+		myconf="${myconf} --with-pool=${buildmode}"
+	else
+		myconf="${myconf} --with-clvmd=none --with-cluster=none"
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		"$(systemd_with_unitdir)" \
+		${myconf} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}

diff --git a/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
new file mode 100644
index 0000000..d1d4d4a
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.145-r2.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2016 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
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sources.redhat.com/lvm2/"
+SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+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 )
+	systemd? ( udev )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	# 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
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf=()
+	local buildmode
+
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf+=( --enable-static_link )
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
+	if use thin; then
+		myconf+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myconf+=( --with-thin=none --with-cache=none )
+	fi
+
+	if use lvm1; then
+		myconf+=( --with-lvm1=${buildmode} )
+	else
+		myconf+=( --with-lvm1=none )
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf+=( --disable-o_direct )
+
+	if use clvm; then
+		myconf+=( --with-cluster=${buildmode} )
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
+	else
+		myconf+=( --with-clvmd=none --with-cluster=none )
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable 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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2016-10-21 23:15 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2016-10-21 23:15 UTC (permalink / raw
  To: gentoo-commits

commit:     cdb3ab396f48a446d0f51ab2e147816a2823ea37
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 21 23:14:24 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 21 23:15:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdb3ab39

sys-fs/lvm2: bump.

Package-Manager: portage-2.3.2
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 +
 sys-fs/lvm2/files/clvmd.rc-2.02.39                 |   2 +-
 sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2     |   2 +-
 sys-fs/lvm2/files/dmeventd.initd-2.02.67-r1        |   2 +-
 sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 |   2 +-
 sys-fs/lvm2/files/lvm.rc-2.02.105-r2               |   2 +-
 sys-fs/lvm2/files/lvm.rc-2.02.116-r4               |   2 +-
 sys-fs/lvm2/files/lvm.rc-2.02.116-r6               |   2 +-
 sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2        |   2 +-
 sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3        |   2 +-
 sys-fs/lvm2/lvm2-2.02.116-r1.ebuild                |   2 +-
 sys-fs/lvm2/lvm2-2.02.116-r2.ebuild                |   2 +-
 sys-fs/lvm2/lvm2-2.02.116.ebuild                   |   2 +-
 sys-fs/lvm2/lvm2-2.02.136.ebuild                   |   2 +-
 ...vm2-2.02.116-r2.ebuild => lvm2-2.02.166.ebuild} | 100 ++++++++++++---------
 15 files changed, 72 insertions(+), 55 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 3ff8f23..16a2de5 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -2,3 +2,4 @@ DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c02
 DIST LVM2.2.02.136.tgz 1891010 SHA256 c6af90097d8f7cd851d38c4f57bb3ad7039cfa123f1e336dba957814a298bd8c SHA512 ebda683e7dbeb2c4860a583d47e60756d18127e37a373ab2958af8e54b9bee0d2e3370b7803d88fa4b08564345c88af55bfbac317081160118ce4b3733b69f9d WHIRLPOOL 8020fdddac648e32084801ffaf9b00b8a683870c8dd8dd5969851fd081eb1efd578decd82cd4a7a24fb6150c55afafdd819a76eb7eb6926cdc057455cc1d1618
 DIST LVM2.2.02.139.tgz 1897293 SHA256 f423b1f2eee70efd671afc0982caa92e9413a582404057244021314172ec3a07 SHA512 f112207d7447606915026495b931bffc4c0d68d36b9a8792fe4b7abf8b743bc4559da5c79145cb4d457337118e60552f9df511e31f2799001d29d006f7946cc0 WHIRLPOOL 8a1ca0bb6946b1f6761223a4a9e7c5e3e5247ff4b85bc08734258f4616fbabb0ea7a3b22b4a245367997ad810b4b304b747d8da0bd128c241fbafe645855b7f9
 DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549
+DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870

diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
index f279c9d..27125af 100644
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
index f305b09..a6ec42b 100644
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

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

diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
index f07c157..9181c95 100644
--- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
index 8ddb7d7..5217116 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
index 9f8f753..a09b0ef 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
index 35ddbe8..990fd6c 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.116-r6
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
index 150e10a..2f9ab0c 100644
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvmetad.initd-2.02.105-r2
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

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

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild
index c393e7a..8bae579 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
index 6ecd225..bc1463d 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/lvm2-2.02.116.ebuild b/sys-fs/lvm2/lvm2-2.02.116.ebuild
index b4744cf..48cc2d99 100644
--- a/sys-fs/lvm2/lvm2-2.02.116.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.116.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/lvm2-2.02.136.ebuild b/sys-fs/lvm2/lvm2-2.02.136.ebuild
index 78a2994..ace28c7 100644
--- a/sys-fs/lvm2/lvm2-2.02.136.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.136.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.166.ebuild
similarity index 74%
copy from sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
copy to sys-fs/lvm2/lvm2-2.02.166.ebuild
index 6ecd225..8fd309c 100644
--- a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
 
 DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
@@ -13,13 +13,21 @@ 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 lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
+IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
+REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
 	systemd? ( udev )
 	clvm? ( !systemd )"
 
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
 	readline? ( sys-libs/readline:0= )
+	systemd? ( >=sys-apps/systemd-205:0= )
 	udev? ( >=virtual/libudev-208:=[static-libs?] )"
 # /run is now required for locking during early boot. /var cannot be assumed to
 # be available -- thus, pull in recent enough baselayout for /run.
@@ -38,6 +46,7 @@ RDEPEND="${DEPEND_COMMON}
 DEPEND="${DEPEND_COMMON}
 	virtual/pkgconfig
 	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
 	static? (
 		selinux? ( sys-libs/libselinux[static-libs] )
 		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
@@ -46,6 +55,22 @@ DEPEND="${DEPEND_COMMON}
 
 S=${WORKDIR}/${PN/lvm/LVM}.${PV}
 
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.129-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.70-asneeded.patch # -Wl,--as-needed
+	"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
+	"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+)
+
 pkg_setup() {
 	local CONFIG_CHECK="~SYSVIPC"
 
@@ -71,8 +96,7 @@ pkg_setup() {
 }
 
 src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
+	default
 
 	sed -i \
 		-e "1iAR = $(tc-getAR)" \
@@ -90,16 +114,6 @@ src_prepare() {
 
 	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
 
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
 	# 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; }
 
@@ -108,15 +122,15 @@ src_prepare() {
 
 src_configure() {
 	filter-flags -flto
-	local myconf
+	local myconf=()
 	local buildmode
 
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
 
 	# Most of this package does weird stuff.
 	# The build options are tristate, and --without is NOT supported
@@ -124,7 +138,7 @@ src_configure() {
 	if use static; then
 		buildmode="internal"
 		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
+		myconf+=( --enable-static_link )
 	else
 		buildmode="shared"
 	fi
@@ -132,30 +146,30 @@ src_configure() {
 
 	# dmeventd requires mirrors to be internal, and snapshot available
 	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
 	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
+		myconf+=( --with-thin=internal --with-cache=internal )
 		local texec
 		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
 		done
 	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
+		myconf+=( --with-thin=none --with-cache=none )
 	fi
 
 	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
+		myconf+=( --with-lvm1=${buildmode} )
 	else
-		myconf="${myconf} --with-lvm1=none"
+		myconf+=( --with-lvm1=none )
 	fi
 
 	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
+	use hppa && myconf+=( --disable-o_direct )
 
 	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
+		myconf+=( --with-cluster=${buildmode} )
 		# 4-state! Make sure we get it right, per bug 210879
 		# Valid options are: none, cman, gulm, all
 		#
@@ -169,11 +183,13 @@ src_configure() {
 		local clvmd=""
 		use cman && clvmd="cman"
 		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
 		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
 	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
+		myconf+=( --with-clvmd=none --with-cluster=none )
 	fi
 
 	econf \
@@ -194,8 +210,8 @@ src_configure() {
 		$(use_enable udev udev_sync) \
 		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
 		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		${myconf[@]} \
 		CLDFLAGS="${LDFLAGS}"
 }
 
@@ -227,11 +243,11 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
+		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
 		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
 
 		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
+		newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
 	fi
 
 	if use clvm; then


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-02-13 20:09 Marc Schiffbauer
  0 siblings, 0 replies; 31+ messages in thread
From: Marc Schiffbauer @ 2017-02-13 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     513cc0319dca99422e0a6f6f52dc37c281d05234
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 20:08:57 2017 +0000
Commit:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 20:08:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=513cc031

sys-fs/lvm2: Add sanlock USE flag for lvmlockd, fixes #604334

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-fs/lvm2/files/lvm.rc-2.02.166-r1         | 135 ++++++++++++
 sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 |  18 ++
 sys-fs/lvm2/lvm2-2.02.166-r1.ebuild          | 298 +++++++++++++++++++++++++++
 sys-fs/lvm2/metadata.xml                     |   1 +
 4 files changed, 452 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r1 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r1
new file mode 100644
index 0000000000..e779d2fb09
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.166-r1
@@ -0,0 +1,135 @@
+#!/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=
+	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"
+			# 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"
+		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/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
new file mode 100644
index 0000000000..bf3292a797
--- /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-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
new file mode 100644
index 0000000000..8be6acbd8f
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
@@ -0,0 +1,298 @@
+# 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
+
+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 ~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 )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	sanlock? ( sys-cluster/sanlock )
+	systemd? ( >=sys-apps/systemd-205:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	# For upstream -- review and forward:
+	"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
+	"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
+	"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf=()
+	local buildmode
+
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf+=( --enable-static_link )
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
+	if use thin; then
+		myconf+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myconf+=( --with-thin=none --with-cache=none )
+	fi
+
+	if use lvm1; then
+		myconf+=( --with-lvm1=${buildmode} )
+	else
+		myconf+=( --with-lvm1=none )
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf+=( --disable-o_direct )
+
+	if use clvm; then
+		myconf+=( --with-cluster=${buildmode} )
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
+
+	else
+		myconf+=( --with-clvmd=none --with-cluster=none )
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable sanlock lockd-sanlock) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		${myconf[@]} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.166-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
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}

diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index 33079b1d9c..cca547ca5c 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] 31+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-02-18 21:29 Marc Schiffbauer
  0 siblings, 0 replies; 31+ messages in thread
From: Marc Schiffbauer @ 2017-02-18 21:29 UTC (permalink / raw
  To: gentoo-commits

commit:     97c76ba0a6628a8c72d7a4aadebddac0c3b44559
Author:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 18 21:28:37 2017 +0000
Commit:     Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 21:29:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97c76ba0

sys-fs/lvm2: revbump 2.02.166 to fix #609416

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../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 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

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 e779d2fb09..d14292c2c4 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 8be6acbd8f..89fbbd63bb 100644
--- a/sys-fs/lvm2/lvm2-2.02.166-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
@@ -246,7 +246,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] 31+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2017-07-09 22:05 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2017-07-09 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     9d2680f05f8389cdee3496c427d430e4b728c916
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  9 22:03:53 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 22:05:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d2680f0

sys-fs/lvm2: bump incl. init script fix for bug #617578.

Please test init script changes cautiously!

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=617578
Package-Manager: portage-2.3.6
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 +
 sys-fs/lvm2/files/lvm.rc-2.02.172                  | 145 ++++++++++
 .../lvm2-2.02.172-static-pkgconfig-libs.patch      | 104 ++++++++
 sys-fs/lvm2/lvm2-2.02.172.ebuild                   | 297 +++++++++++++++++++++
 4 files changed, 547 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 1875a4de597..cfbec6371c8 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -4,3 +4,4 @@ DIST LVM2.2.02.139.tgz 1897293 SHA256 f423b1f2eee70efd671afc0982caa92e9413a58240
 DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549
 DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870
 DIST LVM2.2.02.171.tgz 2333643 SHA256 b815a711a2fabaa5c3dc1a4a284df0268bf0f325f0fc0f5c9530c9bbb54b9964 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883 WHIRLPOOL fedd62612c6bb4b7764277a0d4474ff3557f041858c71eb7bf2a1c06b646637fe719f91a12c1b5c58ccefa7f4d2daba6bf30409340c52fd3a1b8b01ce62467ab
+DIST LVM2.2.02.172.tgz 2351684 SHA256 eab09d4132e6ade4db22249e554919045948efb908ffa40409e8e8e0c316f708 SHA512 402612667f279be5f1c682b9037022788e9b76e3157907a0832e8b7847c3aa96e4b44a3bd880657a7e577ab46db0e4f283ac6edbb52502e365617633c802ae40 WHIRLPOOL 618123038cbfce1cba7e90e22e5ffccc9d92ddad4b60dd92dedc46ea26729700c6c7003e701c4f2a511f4a34a834ea277f619c557e2865540e4dd9826a8aa76b

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.172 b/sys-fs/lvm2/files/lvm.rc-2.02.172
new file mode 100644
index 00000000000..9e22c2801ff
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.172
@@ -0,0 +1,145 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 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'
+}
+
+_need_lvmlockd()
+{
+	local lvm_path="$(_get_lvm_path)"
+	[ ! -x "${lvm_path}" ] && return 1
+	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
+}
+depend() {
+	before checkfs fsck
+	after modules device-mapper
+	# We may use lvmetad based on the configuration. If we added lvmetad
+	# support while lvm2 is running then we aren't dependent on it. For the
+	# more common case, if its disabled in the config we aren't dependent
+	# on it.
+	config /etc/lvm/lvm.conf
+	local _need=
+	if service_started; then
+		_need=$(service_get_value need)
+	else
+		if _need_lvmetad; then
+			_need="${_need} lvmetad"
+		fi
+		if _need_lvmlockd; then
+			_need="${_need} lvmlockd"
+		fi
+	fi
+	need sysfs ${_need}
+}
+
+config='global { locking_dir = "/run/lock/lvm" }'
+
+dm_in_proc() {
+	local retval=0
+	for x in devices misc ; do
+		grep -qs 'device-mapper' /proc/${x}
+		retval=$((${retval} + $?))
+	done
+	return ${retval}
+}
+
+start() {
+	# LVM support for /usr, /home, /opt ....
+	# This should be done *before* checking local
+	# volumes, or they never get checked.
+
+	# NOTE: Add needed modules for LVM or RAID, etc
+	#       to /etc/modules.autoload if needed
+	lvm_path="$(_get_lvm_path)"
+	for lvm_path in /bin/lvm /sbin/lvm ; do
+		[ -x "$lvm_path" ] && break
+	done
+	if [ ! -x "$lvm_path" ]; then
+		eerror "Cannot find lvm binary in /sbin or /bin!"
+		return 1
+	fi
+	if [ -z "${CDBOOT}" ] ; then
+		if [ -e /proc/modules ] && ! dm_in_proc ; then
+			modprobe dm-mod 2>/dev/null
+		fi
+		if [ -d /proc/lvm ] || dm_in_proc ; then
+			ebegin "Setting up the Logical Volume Manager"
+			#still echo stderr for debugging
+			lvm_commands="#!${lvm_path}\n"
+			# Extra PV find pass because some devices might not have been available until very recently
+			lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
+			# Now make the nodes
+			lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
+			# And turn them on!
+			lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
+			if _need_lvmlockd; then
+				# Start lockd VGs as required
+				lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
+			fi
+			# Order of this is important, have to work around dash and LVM readline
+			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
+			eend $? "Failed to setup the LVM"
+		fi
+	fi
+}
+
+start_post()
+{
+	# Save if we needed lvmetad
+	if _need_lvmetad; then
+		service_set_value need lvmetad
+	fi
+}
+
+stop() {
+	for lvm_path in /bin/lvm /sbin/lvm ; do
+		[ -x "$lvm_path" ] && break
+	done
+	if [ ! -x "$lvm_path" ]; then
+		eerror "Cannot find lvm binary in /sbin or /bin!"
+		return 1
+	fi
+# Stop LVM2
+if [ -x /sbin/vgs ] && \
+   [ -x /sbin/vgchange ] && \
+   [ -x /sbin/lvchange ] && \
+   [ -f /etc/lvmtab -o -d /etc/lvm ] && \
+   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
+then
+	einfo "Shutting down the Logical Volume Manager"
+
+        VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
+
+        if [ "$VGS" ]
+        then
+            ebegin "  Shutting Down LVs & VGs"
+			#still echo stderr for debugging
+			lvm_commands="#!${lvm_path}\n"
+			# Extra PV find pass because some devices might not have been available until very recently
+			lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
+			# Now make the nodes
+			lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
+			# Order of this is important, have to work around dash and LVM readline
+			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
+			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.172-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch
new file mode 100644
index 00000000000..e25cb760ea8
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch
@@ -0,0 +1,104 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/configure.in LVM2.2.02.172/configure.in
+--- LVM2.2.02.172.orig/configure.in	2017-06-28 08:54:27.000000000 -0700
++++ LVM2.2.02.172/configure.in	2017-07-09 14:58:11.933777531 -0700
+@@ -1324,6 +1324,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
+@@ -1372,6 +1373,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,
+@@ -1653,19 +1655,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
+ 
+ ################################################################################
+@@ -2011,6 +2026,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BUILD_CMIRRORD)
+ AC_SUBST(BUILD_DMEVENTD)
+@@ -2125,6 +2141,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)
+@@ -2140,6 +2157,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/make.tmpl.in LVM2.2.02.172/make.tmpl.in
+--- LVM2.2.02.172.orig/make.tmpl.in	2017-06-28 08:54:28.000000000 -0700
++++ LVM2.2.02.172/make.tmpl.in	2017-07-09 14:56:38.262933483 -0700
+@@ -53,7 +53,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@
+@@ -68,10 +68,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/lvm2-2.02.172.ebuild b/sys-fs/lvm2/lvm2-2.02.172.ebuild
new file mode 100644
index 00000000000..90acec45760
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.172.ebuild
@@ -0,0 +1,297 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~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 )
+	clvm? ( !systemd )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	sanlock? ( sys-cluster/sanlock )
+	systemd? ( >=sys-apps/systemd-205:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
+
+	# 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.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
+	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf=()
+	local buildmode
+
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf+=( --enable-static_link )
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
+	if use thin; then
+		myconf+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myconf+=( --with-thin=none --with-cache=none )
+	fi
+
+	if use lvm1; then
+		myconf+=( --with-lvm1=${buildmode} )
+	else
+		myconf+=( --with-lvm1=none )
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf+=( --disable-o_direct )
+
+	if use clvm; then
+		myconf+=( --with-cluster=${buildmode} )
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
+		myconf+=( --enable-lvmlockd-dlm )
+	else
+		myconf+=( --with-clvmd=none --with-cluster=none )
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable sanlock lvmlockd-sanlock) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		${myconf[@]} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2018-05-08 17:11 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2018-05-08 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     da222eb668e9d0743688b0bd1608fd0824b1b8b1
Author:     Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Sat May  5 00:35:07 2018 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue May  8 17:11:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da222eb6

sys-fs/lvm2-2.02.17{1,2,3}: Fix static build

Closes: https://bugs.gentoo.org/617756
Package-Manager: Portage-2.3.35, Repoman-2.3.9
(cherry picked from commit 0d57a354c5b3ab9db2b8e2ea6adbdad2dd6a1c03)
Closes: https://github.com/gentoo/gentoo/pull/8265
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch | 13 +++++++++++++
 sys-fs/lvm2/lvm2-2.02.171.ebuild                  |  3 ++-
 sys-fs/lvm2/lvm2-2.02.172.ebuild                  |  3 ++-
 sys-fs/lvm2/lvm2-2.02.173.ebuild                  |  3 ++-
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
new file mode 100644
index 00000000000..1cbf956db25
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
@@ -0,0 +1,13 @@
+diff --git a/make.tmpl.in b/make.tmpl.in
+index a40eaaa15..7eea943aa 100644
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
+ 
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@

diff --git a/sys-fs/lvm2/lvm2-2.02.171.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild
index 63f12d1d8cd..fccd403cbc9 100644
--- a/sys-fs/lvm2/lvm2-2.02.171.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.171.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -66,6 +66,7 @@ PATCHES=(
 	"${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.171-static-libm.patch #617756
 	"${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

diff --git a/sys-fs/lvm2/lvm2-2.02.172.ebuild b/sys-fs/lvm2/lvm2-2.02.172.ebuild
index 4c21fcf3446..0d9e8e6dc47 100644
--- a/sys-fs/lvm2/lvm2-2.02.172.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.172.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -66,6 +66,7 @@ PATCHES=(
 	"${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.171-static-libm.patch #617756
 	"${FILESDIR}"/${PN}-2.02.172-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

diff --git a/sys-fs/lvm2/lvm2-2.02.173.ebuild b/sys-fs/lvm2/lvm2-2.02.173.ebuild
index 4c21fcf3446..0d9e8e6dc47 100644
--- a/sys-fs/lvm2/lvm2-2.02.173.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.173.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -66,6 +66,7 @@ PATCHES=(
 	"${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.171-static-libm.patch #617756
 	"${FILESDIR}"/${PN}-2.02.172-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


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2018-06-06  5:31 Jeroen Roovers
  0 siblings, 0 replies; 31+ messages in thread
From: Jeroen Roovers @ 2018-06-06  5:31 UTC (permalink / raw
  To: gentoo-commits

commit:     821d166ba7658561661d82b8efd0a38553318515
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  6 05:30:52 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jun  6 05:31:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=821d166b

sys-fs/lvm2: Add patch for bug #657446.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch | 12 ++++++++++++
 sys-fs/lvm2/lvm2-2.02.166-r2.ebuild                    |  1 +
 sys-fs/lvm2/lvm2-2.02.166.ebuild                       |  3 ++-
 sys-fs/lvm2/lvm2-2.02.171.ebuild                       |  1 +
 sys-fs/lvm2/lvm2-2.02.172.ebuild                       |  1 +
 sys-fs/lvm2/lvm2-2.02.173.ebuild                       |  1 +
 6 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
new file mode 100644
index 00000000000..0f830e428b1
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
@@ -0,0 +1,12 @@
+--- a/lib/device/dev-io.c
++++ b/lib/device/dev-io.c
+@@ -505,7 +505,9 @@
+ 			dev->flags |= DEV_NOT_O_NOATIME;
+ 			if ((dev->fd = open(name, flags, 0777)) >= 0) {
+ 				log_debug_devs("%s: Not using O_NOATIME", name);
++#ifdef O_DIRECT_SUPPORT
+ 				goto opened;
++#endif
+ 			}
+ 		}
+ #endif

diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
index a3c5716ea49..fdb4989247e 100644
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
@@ -68,6 +68,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.166-HPPA-no-O_DIRECT.patch #657446
 	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
 )
 

diff --git a/sys-fs/lvm2/lvm2-2.02.166.ebuild b/sys-fs/lvm2/lvm2-2.02.166.ebuild
index 64406fb5ae3..b8cb4920dfd 100644
--- a/sys-fs/lvm2/lvm2-2.02.166.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.166.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -67,6 +67,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.166-HPPA-no-O_DIRECT.patch #657446
 	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
 )
 

diff --git a/sys-fs/lvm2/lvm2-2.02.171.ebuild b/sys-fs/lvm2/lvm2-2.02.171.ebuild
index 28862e26bce..ecb100973ac 100644
--- a/sys-fs/lvm2/lvm2-2.02.171.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.171.ebuild
@@ -69,6 +69,7 @@ PATCHES=(
 	"${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.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
 )
 

diff --git a/sys-fs/lvm2/lvm2-2.02.172.ebuild b/sys-fs/lvm2/lvm2-2.02.172.ebuild
index 7d02c914775..dc9bc01f9ae 100644
--- a/sys-fs/lvm2/lvm2-2.02.172.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.172.ebuild
@@ -69,6 +69,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.02.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
 	"${FILESDIR}"/${PN}-2.02.130-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
 )
 

diff --git a/sys-fs/lvm2/lvm2-2.02.173.ebuild b/sys-fs/lvm2/lvm2-2.02.173.ebuild
index 7d02c914775..dc9bc01f9ae 100644
--- a/sys-fs/lvm2/lvm2-2.02.173.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.173.ebuild
@@ -69,6 +69,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.02.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
 	"${FILESDIR}"/${PN}-2.02.130-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
 )
 


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2018-08-04 22:13 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2018-08-04 22:13 UTC (permalink / raw
  To: gentoo-commits

commit:     8824d7cd4c9edd30b727559ecc5fb0e8d985b7dd
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  4 21:45:48 2018 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Aug  4 22:10:46 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8824d7cd

sys-fs/lvm2: bump to 2.02.181

Fixes: https://bugs.gentoo.org/631016
Fixes: https://bugs.gentoo.org/662650
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 +
 .../files/lvm2-2.02.176-pthread-pkgconfig.patch    |  29 ++
 sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch     |  15 ++
 .../lvm2-2.02.178-dynamic-static-ldflags.patch     |  59 ++++
 .../lvm2/files/lvm2-2.02.178-example.conf.in.patch |  50 ++++
 .../lvm2-2.02.178-static-pkgconfig-libs.patch      | 102 +++++++
 sys-fs/lvm2/lvm2-2.02.181.ebuild                   | 299 +++++++++++++++++++++
 7 files changed, 555 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index bec7881f969..c7ab460dfd3 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -6,3 +6,4 @@ DIST LVM2.2.02.166.tgz 2148324 BLAKE2B a57ad21b1f31a6e78c56e4cf77e0d6fd99262c95a
 DIST LVM2.2.02.171.tgz 2333643 BLAKE2B 169155354ba1de7f97a4f9e9156f3f7ba8553a2313883152371637986e8c3355906831368cd2e2c8c30d85045865c24667dc624fdbd36ae6a632a1a678c5cd23 SHA512 801adcc2ae483f81edf6bfba73090b6b8f710370e48764f08a62da71d617157075bea01593c2535ad5ba71dcb5e0cfe83cec9a65180a6e8b9e0d214bdee79883
 DIST LVM2.2.02.172.tgz 2351684 BLAKE2B d303bceab0f30ac726563cbf6491439b0528223c1cb0351aff348b08502912b53b6df449b261ead011c3c40c63603840bfcbc8432f79d047733b7da673ff2b76 SHA512 402612667f279be5f1c682b9037022788e9b76e3157907a0832e8b7847c3aa96e4b44a3bd880657a7e577ab46db0e4f283ac6edbb52502e365617633c802ae40
 DIST LVM2.2.02.173.tgz 2363504 BLAKE2B a516bc9b68b7b7529f4436d8849ca741eb3ca1b5ac2eb2fb2915507935bdd28b5e234e74c1bce827e5761f57b5936510d08107e0dc1c320190f952c706f128d3 SHA512 c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e
+DIST LVM2.2.02.181.tgz 2375093 BLAKE2B 4e4e7c65511af5902e765254a4316a9f887a6ec5c079333d78f19bff71ed3ed9d0e2e2367b0bb5e619ec6778adc9ddf944156921cec67af4d73aafc08196b73e SHA512 599d992823510e27f3ec3ceaf0d2332402b731afc0d2df88096ab55ed98dba8c3bdc5408d51b9f5b0ffbbb9ac3760ee37b878a0f36ab379449dc076c58e59511

diff --git a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
new file mode 100644
index 00000000000..c0265e81268
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
@@ -0,0 +1,29 @@
+--- LVM2.2.02.176/libdm/libdevmapper.pc.in
++++ LVM2.2.02.176/libdm/libdevmapper.pc.in
+@@ -9,4 +9,4 @@
+ Cflags: -I${includedir} 
+ Libs: -L${libdir} -ldevmapper
+ Requires.private: @SELINUX_PC@ @UDEV_PC@
+-Libs.private: -lm @RT_LIBS@
++Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@
+--- LVM2.2.02.176/tools/Makefile.in
++++ LVM2.2.02.176/tools/Makefile.in
+@@ -93,6 +93,7 @@
+   INSTALL_LVM_TARGETS += install_tools_static
+   INSTALL_DMSETUP_TARGETS += install_dmsetup_static
+   INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++  STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+ 
+ LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper
+@@ -118,6 +119,10 @@
+ 
+ include $(top_builddir)/make.tmpl
+ 
++ifeq ("@STATIC_LINK@", "yes")
++  STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper: $(TARGETS_DM)
+ 
+ CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)

diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
new file mode 100644
index 00000000000..c831c6d6e60
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/330255
+
+liblvm2app.so: undefined reference to `floor'
+
+--- LVM2.2.02.178/liblvm/Makefile.in
++++ LVM2.2.02.178/liblvm/Makefile.in
+@@ -43,7 +43,7 @@
+ include $(top_builddir)/make.tmpl
+ 
+ LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd
+-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
++LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm
+ 
+ .PHONY: install_dynamic install_static install_include install_pkgconfig
+ 

diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
new file mode 100644
index 00000000000..0a0e7320906
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
@@ -0,0 +1,59 @@
+--- LVM2.2.02.178/configure.ac
++++ LVM2.2.02.178/configure.ac
+@@ -33,6 +33,7 @@
+ 		CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ 		# equivalent to -rdynamic
+ 		ELDFLAGS="-Wl,--export-dynamic"
++		STATIC_LDFLAGS="-Wl,--no-export-dynamic"
+ 		# FIXME Generate list and use --dynamic-list=.dlopen.sym
+ 		CLDWHOLEARCHIVE="-Wl,-whole-archive"
+ 		CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
+@@ -2042,6 +2043,7 @@
+ AC_SUBST(SYSTEMD_LIBS)
+ AC_SUBST(SNAPSHOTS)
+ AC_SUBST(STATICDIR)
++AC_SUBST(STATIC_LDFLAGS)
+ AC_SUBST(STATIC_LINK)
+ AC_SUBST(TESTSUITE_DATA)
+ AC_SUBST(THIN)
+--- LVM2.2.02.178/daemons/dmeventd/Makefile.in
++++ LVM2.2.02.178/daemons/dmeventd/Makefile.in
+@@ -64,7 +64,7 @@
+ 		-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS)
+ 
+ dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
+-	$(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
++	$(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
+ 		-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
+ 
+ ifeq ("@PKGCONFIG@", "yes")
+--- LVM2.2.02.178/make.tmpl.in
++++ LVM2.2.02.178/make.tmpl.in
+@@ -64,6 +64,7 @@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+ LDFLAGS ?= @LDFLAGS@
++STATIC_LDFLAGS += @STATIC_LDFLAGS@
+ CLDFLAGS += @CLDFLAGS@
+ ELDFLAGS += @ELDFLAGS@
+ LDDEPS += @LDDEPS@
+--- LVM2.2.02.178/tools/Makefile.in
++++ LVM2.2.02.178/tools/Makefile.in
+@@ -129,7 +129,7 @@
+ 
+ dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
+ 	@echo "    [CC] $@"
+-	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
++	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
+ 	      -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
+ 
+ all: device-mapper
+@@ -159,7 +159,7 @@
+ 
+ lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
+ 	@echo "    [CC] $@"
+-	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
++	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
+ 	      $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
+ 
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o

diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
new file mode 100644
index 00000000000..34c710d4392
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
@@ -0,0 +1,50 @@
+--- LVM2.2.02.178/conf/example.conf.in
++++ LVM2.2.02.178/conf/example.conf.in
+@@ -128,6 +128,9 @@
+ 	# Example
+ 	# Accept every block device:
+ 	# filter = [ "a|.*/|" ]
++	# Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
++	# noise when you probed while not available.
++	filter = [ "r|/dev/nbd.*|", "a/.*/" ]
+ 	# Reject the cdrom drive:
+ 	# filter = [ "r|/dev/cdrom|" ]
+ 	# Work with just loopback devices, e.g. for testing:
+@@ -704,7 +707,8 @@
+ 	# Configuration option global/fallback_to_lvm1.
+ 	# This setting is no longer used.
+ 	# This configuration option has an automatic default value.
+-	# fallback_to_lvm1 = 0
++	# Gentoo: the LVM tools are a seperate package.
++	fallback_to_lvm1 = 0
+ 
+ 	# Configuration option global/format.
+ 	# This setting is no longer used.
+@@ -1508,7 +1512,7 @@
+ 
+ # Configuration section metadata.
+ # This configuration section has an automatic default value.
+-# metadata {
++metadata {
+ 
+ 	# Configuration option metadata/check_pv_device_sizes.
+ 	# Check device sizes are not smaller than corresponding PV sizes.
+@@ -1553,7 +1557,8 @@
+ 	# 
+ 	# This configuration option is advanced.
+ 	# This configuration option has an automatic default value.
+-	# pvmetadatacopies = 1
++	# Gentoo: enable for data safety, but PV resize is then disabled.
++	# pvmetadatacopies = 2
+ 
+ 	# Configuration option metadata/vgmetadatacopies.
+ 	# Number of copies of metadata to maintain for each VG.
+@@ -1608,7 +1613,7 @@
+ 	# 
+ 	# This configuration option is advanced.
+ 	# This configuration option does not have a default value defined.
+-# }
++}
+ 
+ # Configuration section report.
+ # LVM report command output formatting.

diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
new file mode 100644
index 00000000000..989b3082576
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
@@ -0,0 +1,102 @@
+--- LVM2.2.02.178/configure.ac
++++ LVM2.2.02.178/configure.ac
+@@ -1238,6 +1238,7 @@
+ 	PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
+ 			  [ BLKID_WIPING=yes
+ 			    BLKID_PC="blkid"
++			    BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
+ 			    DEFAULT_USE_BLKID_WIPING=1
+ 			    AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ 			  ], [if test "$BLKID_WIPING" = maybe; then
+@@ -1286,6 +1287,7 @@
+ if test "$UDEV_SYNC" = yes; then
+ 	pkg_config_init
+ 	PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
++	UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
+ 	AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
+ 
+ 	AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
+@@ -1564,19 +1566,32 @@
+ if test "$SELINUX" = yes; then
+ 	AC_CHECK_LIB([sepol], [sepol_check_context], [
+ 		AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
+-		SELINUX_LIBS="-lsepol"])
++		SEPOL_LIBS="-lsepol"])
++
++	dnl -- init pkgconfig if required
++	if  test x$PKGCONFIG_INIT != x1; then
++		pkg_config_init
++	fi
++	PKG_CHECK_MODULES(SELINUX, libselinux, [
++		SELINUX_PC="libselinux"
++		SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
++		SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
++		AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
++	],[
++		dnl -- old non-pkgconfig method, is buggy with static builds
+ 
+ 	AC_CHECK_LIB([selinux], [is_selinux_enabled], [
+ 		AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
+ 		AC_CHECK_HEADERS([selinux/label.h])
+ 		AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
+-		SELINUX_LIBS="-lselinux $SELINUX_LIBS"
++		SELINUX_LIBS="-lselinux $SEPOL_LIBS"
+ 		SELINUX_PC="libselinux"
+ 		HAVE_SELINUX=yes ], [
+ 		AC_MSG_WARN(Disabling selinux)
+ 		SELINUX_LIBS=
+ 		SELINUX_PC=
+ 		HAVE_SELINUX=no ])
++	])
+ fi
+ 
+ ################################################################################
+@@ -1927,6 +1942,7 @@
+ ################################################################################
+ AC_SUBST(APPLIB)
+ AC_SUBST(AWK)
++AC_SUBST(BLKID_STATIC_LIBS)
+ AC_SUBST(BLKID_PC)
+ AC_SUBST(BUILD_CMIRRORD)
+ AC_SUBST(BUILD_DMEVENTD)
+@@ -2037,6 +2053,7 @@
+ AC_SUBST(SALCK_LIBS)
+ AC_SUBST(SBINDIR)
+ AC_SUBST(SELINUX_LIBS)
++AC_SUBST(SELINUX_STATIC_LIBS)
+ AC_SUBST(SELINUX_PC)
+ AC_SUBST(SYSCONFDIR)
+ AC_SUBST(SYSTEMD_LIBS)
+@@ -2053,6 +2070,7 @@
+ AC_SUBST(CACHE_DUMP_CMD)
+ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(CACHE_RESTORE_CMD)
++AC_SUBST(UDEV_STATIC_LIBS)
+ AC_SUBST(UDEV_PC)
+ AC_SUBST(UDEV_RULES)
+ AC_SUBST(UDEV_SYNC)
+--- LVM2.2.02.178/make.tmpl.in
++++ LVM2.2.02.178/make.tmpl.in
+@@ -59,7 +59,7 @@
+ 
+ LIBS = @LIBS@
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+@@ -75,10 +75,13 @@
+ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ SELINUX_LIBS = @SELINUX_LIBS@
++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ UDEV_CFLAGS = @UDEV_CFLAGS@
+ UDEV_LIBS = @UDEV_LIBS@
++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ SYSTEMD_LIBS = @SYSTEMD_LIBS@
+ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
+ 

diff --git a/sys-fs/lvm2/lvm2-2.02.181.ebuild b/sys-fs/lvm2/lvm2-2.02.181.ebuild
new file mode 100644
index 00000000000..1363c1d32cf
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.181.ebuild
@@ -0,0 +1,299 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~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 )"
+
+DEPEND_COMMON="
+	clvm? (
+		cman? ( =sys-cluster/cman-3* )
+		corosync? ( sys-cluster/corosync )
+		openais? ( sys-cluster/openais )
+		=sys-cluster/libdlm-3*
+	)
+
+	readline? ( sys-libs/readline:0= )
+	sanlock? ( sys-cluster/sanlock )
+	systemd? ( >=sys-apps/systemd-205:0= )
+	udev? ( >=virtual/libudev-208:=[static-libs?] )"
+# /run is now required for locking during early boot. /var cannot be assumed to
+# be available -- thus, pull in recent enough baselayout for /run.
+# This version of LVM is incompatible with cryptsetup <1.1.2.
+RDEPEND="${DEPEND_COMMON}
+	>=sys-apps/baselayout-2.2
+	!<sys-apps/openrc-0.11
+	!<sys-fs/cryptsetup-1.1.2
+	!!sys-fs/clvm
+	!!sys-fs/lvm-user
+	>=sys-apps/util-linux-2.16
+	lvm2create_initrd? ( sys-apps/makedev )
+	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
+# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
+# USE 'static' currently only works with eudev, bug 520450
+DEPEND="${DEPEND_COMMON}
+	virtual/pkgconfig
+	>=sys-devel/binutils-2.20.1-r1
+	sys-devel/autoconf-archive
+	static? (
+		selinux? ( sys-libs/libselinux[static-libs] )
+		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
+		>=sys-apps/util-linux-2.16[static-libs]
+	)"
+
+S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+
+PATCHES=(
+	# Gentoo specific modification(s):
+	"${FILESDIR}"/${PN}-2.02.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
+)
+
+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:
+	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myconf=()
+	local buildmode
+
+	myconf+=( $(use_enable !device-mapper-only dmeventd) )
+	myconf+=( $(use_enable !device-mapper-only cmdlib) )
+	myconf+=( $(use_enable !device-mapper-only applib) )
+	myconf+=( $(use_enable !device-mapper-only fsadm) )
+	myconf+=( $(use_enable !device-mapper-only lvmetad) )
+	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	if use static; then
+		buildmode="internal"
+		# This only causes the .static versions to become available
+		myconf+=( --enable-static_link )
+	else
+		buildmode="shared"
+	fi
+	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
+
+	# dmeventd requires mirrors to be internal, and snapshot available
+	# so we cannot disable them
+	myconf+=( --with-mirrors=${dmbuildmode} )
+	myconf+=( --with-snapshots=${dmbuildmode} )
+	if use thin; then
+		myconf+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myconf+=( --with-thin=none --with-cache=none )
+	fi
+
+	if use lvm1; then
+		myconf+=( --with-lvm1=${buildmode} )
+	else
+		myconf+=( --with-lvm1=none )
+	fi
+
+	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+	use hppa && myconf+=( --disable-o_direct )
+
+	if use clvm; then
+		myconf+=( --with-cluster=${buildmode} )
+		# 4-state! Make sure we get it right, per bug 210879
+		# Valid options are: none, cman, gulm, all
+		#
+		# 2009/02:
+		# gulm is removed now, now dual-state:
+		# cman, none
+		# all still exists, but is not needed
+		#
+		# 2009/07:
+		# TODO: add corosync and re-enable ALL
+		local clvmd=""
+		use cman && clvmd="cman"
+		#clvmd="${clvmd/cmangulm/all}"
+		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
+		use openais && clvmd="${clvmd:+$clvmd,}openais"
+		[ -z "${clvmd}" ] && clvmd="none"
+		myconf+=( --with-clvmd=${clvmd} )
+		myconf+=( --with-pool=${buildmode} )
+		myconf+=( --enable-lvmlockd-dlm )
+	else
+		myconf+=( --with-clvmd=none --with-cluster=none )
+	fi
+
+	econf \
+		$(use_enable readline) \
+		$(use_enable selinux) \
+		--enable-pkgconfig \
+		--with-confdir="${EPREFIX}"/etc \
+		--exec-prefix="${EPREFIX}" \
+		--sbindir="${EPREFIX}/sbin" \
+		--with-staticdir="${EPREFIX}"/sbin \
+		--libdir="${EPREFIX}/$(get_libdir)" \
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
+		--with-default-dm-run-dir=/run \
+		--with-default-run-dir=/run/lvm \
+		--with-default-locking-dir=/run/lock/lvm \
+		--with-default-pid-dir=/run \
+		$(use_enable udev udev_rules) \
+		$(use_enable udev udev_sync) \
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
+		$(use_enable sanlock lvmlockd-sanlock) \
+		$(use_enable systemd udev-systemd-background-jobs) \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		${myconf[@]} \
+		CLDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst
+	INSTALL_TARGETS="install install_tmpfiles_configuration"
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
+	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
+	for inst in ${INSTALL_TARGETS}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.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 clvm; then
+		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
+		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2018-10-11 10:39 Lars Wendler
  0 siblings, 0 replies; 31+ messages in thread
From: Lars Wendler @ 2018-10-11 10:39 UTC (permalink / raw
  To: gentoo-commits

commit:     4ef0b1ec340269010d1f080e55bd05271580ea37
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 11 10:35:58 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Oct 11 10:39:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ef0b1ec

sys-fs/lvm2: Removed old.

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-fs/lvm2/Manifest                               |   4 -
 sys-fs/lvm2/files/lvm.rc-2.02.116-r4               | 132 ---------
 sys-fs/lvm2/files/lvm.rc-2.02.166-r2               | 145 ----------
 .../lvm2-2.02.172-static-pkgconfig-libs.patch      | 104 -------
 sys-fs/lvm2/lvm2-2.02.116-r1.ebuild                | 271 -------------------
 sys-fs/lvm2/lvm2-2.02.116-r2.ebuild                | 274 -------------------
 sys-fs/lvm2/lvm2-2.02.116-r4.ebuild                | 281 -------------------
 sys-fs/lvm2/lvm2-2.02.116-r5.ebuild                | 290 --------------------
 sys-fs/lvm2/lvm2-2.02.116-r6.ebuild                | 290 --------------------
 sys-fs/lvm2/lvm2-2.02.136-r1.ebuild                | 283 -------------------
 sys-fs/lvm2/lvm2-2.02.136-r2.ebuild                | 284 -------------------
 sys-fs/lvm2/lvm2-2.02.136.ebuild                   | 274 -------------------
 sys-fs/lvm2/lvm2-2.02.139-r1.ebuild                | 284 -------------------
 sys-fs/lvm2/lvm2-2.02.139.ebuild                   | 283 -------------------
 sys-fs/lvm2/lvm2-2.02.145-r1.ebuild                | 288 --------------------
 sys-fs/lvm2/lvm2-2.02.145.ebuild                   | 284 -------------------
 sys-fs/lvm2/lvm2-2.02.166-r2.ebuild                | 298 --------------------
 sys-fs/lvm2/lvm2-2.02.166.ebuild                   | 291 --------------------
 sys-fs/lvm2/lvm2-2.02.173.ebuild                   | 299 ---------------------
 19 files changed, 4659 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 93b881c90a8..80ab44e8d75 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,7 +1,3 @@
 DIST LVM2.2.02.116.tgz 1538340 BLAKE2B 718261b60626f2eca5ba13011646bf551523ed8e59aaceceb9097221c000268b7533ac43151ff1d9229911d87e764fbdb29ffa1d305f2aae99220a68e301559a SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d
-DIST LVM2.2.02.136.tgz 1891010 BLAKE2B 606900337eec96a5a124518b1cc20712763f0c79b2b3a726210e5b4ad8f775d9f5951ff12894ab7b1d8c8271febd318417a86fc3d5bb7209af40bd4c164472b9 SHA512 ebda683e7dbeb2c4860a583d47e60756d18127e37a373ab2958af8e54b9bee0d2e3370b7803d88fa4b08564345c88af55bfbac317081160118ce4b3733b69f9d
-DIST LVM2.2.02.139.tgz 1897293 BLAKE2B cad5f37a9190c40147e80edcec6af1717f87c2cce01e6e4cbd8cf8b594d995a08b52070b0d45dd9f1f8b5120c2babaf0ced158e70227dde516fca838369f7664 SHA512 f112207d7447606915026495b931bffc4c0d68d36b9a8792fe4b7abf8b743bc4559da5c79145cb4d457337118e60552f9df511e31f2799001d29d006f7946cc0
 DIST LVM2.2.02.145.tgz 1986370 BLAKE2B 0c9e5efae17f26ff86152cecbf0b11a74e85007b2fa9491f44dec03ac8c11375bacf6685213b4be19037c8fbf70e13549516716ecf8fa262919a44625e6aab34 SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27
-DIST LVM2.2.02.166.tgz 2148324 BLAKE2B a57ad21b1f31a6e78c56e4cf77e0d6fd99262c95a0093fe3eb9d6b0a82b675c0d39c3337af4a4bea87cba0c0a816bc98f7052afda6b850dc4712f5539942b7d5 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21
-DIST LVM2.2.02.173.tgz 2363504 BLAKE2B a516bc9b68b7b7529f4436d8849ca741eb3ca1b5ac2eb2fb2915507935bdd28b5e234e74c1bce827e5761f57b5936510d08107e0dc1c320190f952c706f128d3 SHA512 c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e
 DIST LVM2.2.02.181.tgz 2375093 BLAKE2B 4e4e7c65511af5902e765254a4316a9f887a6ec5c079333d78f19bff71ed3ed9d0e2e2367b0bb5e619ec6778adc9ddf944156921cec67af4d73aafc08196b73e SHA512 599d992823510e27f3ec3ceaf0d2332402b731afc0d2df88096ab55ed98dba8c3bdc5408d51b9f5b0ffbbb9ac3760ee37b878a0f36ab379449dc076c58e59511

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

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
deleted file mode 100644
index 11329bbeaf3..00000000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 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'
-}
-
-_need_lvmlockd()
-{
-	local lvm_path="$(_get_lvm_path)"
-	[ ! -x "${lvm_path}" ] && return 1
-	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
-}
-depend() {
-	before checkfs fsck
-	after modules device-mapper
-	# We may use lvmetad based on the configuration. If we added lvmetad
-	# support while lvm2 is running then we aren't dependent on it. For the
-	# more common case, if its disabled in the config we aren't dependent
-	# on it.
-	config /etc/lvm/lvm.conf
-	local _need=
-	if service_started; then
-		_need=$(service_get_value need)
-	else
-		if _need_lvmetad; then
-			_need="${_need} lvmetad"
-		fi
-		if _need_lvmlockd; then
-			_need="${_need} lvmlockd"
-		fi
-	fi
-	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"
-			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"
-		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.172-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch
deleted file mode 100644
index e25cb760ea8..00000000000
--- a/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/configure.in LVM2.2.02.172/configure.in
---- LVM2.2.02.172.orig/configure.in	2017-06-28 08:54:27.000000000 -0700
-+++ LVM2.2.02.172/configure.in	2017-07-09 14:58:11.933777531 -0700
-@@ -1324,6 +1324,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
-@@ -1372,6 +1373,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,
-@@ -1653,19 +1655,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
- 
- ################################################################################
-@@ -2011,6 +2026,7 @@
- ################################################################################
- AC_SUBST(APPLIB)
- AC_SUBST(AWK)
-+AC_SUBST(BLKID_STATIC_LIBS)
- AC_SUBST(BLKID_PC)
- AC_SUBST(BUILD_CMIRRORD)
- AC_SUBST(BUILD_DMEVENTD)
-@@ -2125,6 +2141,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)
-@@ -2140,6 +2157,7 @@
- AC_SUBST(CACHE_DUMP_CMD)
- AC_SUBST(CACHE_REPAIR_CMD)
- AC_SUBST(CACHE_RESTORE_CMD)
-+AC_SUBST(UDEV_STATIC_LIBS)
- AC_SUBST(UDEV_PC)
- AC_SUBST(UDEV_RULES)
- AC_SUBST(UDEV_SYNC)
-diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/make.tmpl.in LVM2.2.02.172/make.tmpl.in
---- LVM2.2.02.172.orig/make.tmpl.in	2017-06-28 08:54:28.000000000 -0700
-+++ LVM2.2.02.172/make.tmpl.in	2017-07-09 14:56:38.262933483 -0700
-@@ -53,7 +53,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@
-@@ -68,10 +68,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/lvm2-2.02.116-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild
deleted file mode 100644
index 7bf32bb4ee6..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r1.ebuild
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
-	systemd? ( udev )"
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
deleted file mode 100644
index b75896fd51a..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r2.ebuild
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
deleted file mode 100644
index a57c5a4e6c5..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r4.ebuild
+++ /dev/null
@@ -1,281 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? (
-		app-arch/cpio
-		sys-apps/makedev
-	)
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-	ewarn
-	ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
-	ewarn "run the following to update the init script dependencies: "
-	ewarn "# rc-update -u"
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r5.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r5.ebuild
deleted file mode 100644
index edc9aaf28c1..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r5.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? (
-		app-arch/cpio
-		sys-apps/makedev
-	)
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-	ewarn
-	ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
-	ewarn "run the following to update the init script dependencies: "
-	ewarn "# rc-update -u"
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.116-r6.ebuild b/sys-fs/lvm2/lvm2-2.02.116-r6.ebuild
deleted file mode 100644
index 7bfc87028dc..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.116-r6.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? (
-		app-arch/cpio
-		sys-apps/makedev
-	)
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-	ewarn
-	ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
-	ewarn "run the following to update the init script dependencies: "
-	ewarn "# rc-update -u"
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.136-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.136-r1.ebuild
deleted file mode 100644
index 850400f1e6d..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.136-r1.ebuild
+++ /dev/null
@@ -1,283 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild
deleted file mode 100644
index 033673bad6d..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.136-r2.ebuild
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	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/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.136.ebuild b/sys-fs/lvm2/lvm2-2.02.136.ebuild
deleted file mode 100644
index 27ff76be110..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.136.ebuild
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild
deleted file mode 100644
index f53818cede0..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.139-r1.ebuild
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	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/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.116-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 clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.139.ebuild b/sys-fs/lvm2/lvm2-2.02.139.ebuild
deleted file mode 100644
index 6c0d688e3f0..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.139.ebuild
+++ /dev/null
@@ -1,283 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild
deleted file mode 100644
index cb4b2497860..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.145-r1.ebuild
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# 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
-
-	# 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
-)
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	default
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf=()
-	local buildmode
-
-	myconf+=( $(use_enable !device-mapper-only dmeventd) )
-	myconf+=( $(use_enable !device-mapper-only cmdlib) )
-	myconf+=( $(use_enable !device-mapper-only applib) )
-	myconf+=( $(use_enable !device-mapper-only fsadm) )
-	myconf+=( $(use_enable !device-mapper-only lvmetad) )
-	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf+=( --enable-static_link )
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf+=( --with-mirrors=${dmbuildmode} )
-	myconf+=( --with-snapshots=${dmbuildmode} )
-	if use thin; then
-		myconf+=( --with-thin=internal --with-cache=internal )
-		local texec
-		for texec in check dump repair restore; do
-			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
-			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
-		done
-	else
-		myconf+=( --with-thin=none --with-cache=none )
-	fi
-
-	if use lvm1; then
-		myconf+=( --with-lvm1=${buildmode} )
-	else
-		myconf+=( --with-lvm1=none )
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf+=( --disable-o_direct )
-
-	if use clvm; then
-		myconf+=( --with-cluster=${buildmode} )
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf+=( --with-clvmd=${clvmd} )
-		myconf+=( --with-pool=${buildmode} )
-	else
-		myconf+=( --with-clvmd=none --with-cluster=none )
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable 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.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.145.ebuild b/sys-fs/lvm2/lvm2-2.02.145.ebuild
deleted file mode 100644
index 342b7c91066..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.145.ebuild
+++ /dev/null
@@ -1,284 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# 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}
-
-pkg_setup() {
-	local CONFIG_CHECK="~SYSVIPC"
-
-	if use udev; then
-		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
-		if linux_config_exists; then
-			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
-			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
-				ewarn "It's recommended to set an empty value to the following kernel config option:"
-				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
-			fi
-		fi
-	fi
-
-	check_extra_config
-
-	# 1. Genkernel no longer copies /sbin/lvm blindly.
-	if use static; then
-		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
-		elog "their static versions. If you need the static binaries,"
-		elog "you must append .static to the filename!"
-	fi
-}
-
-src_prepare() {
-	# Gentoo specific modification(s):
-	epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	sed -i \
-		-e "1iAR = $(tc-getAR)" \
-		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
-		make.tmpl.in || die #444082
-
-	sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# For upstream -- review and forward:
-	epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
-	epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
-	epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
-	epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
-	epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf
-	local buildmode
-
-	myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
-	myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
-	myconf="${myconf} $(use_enable !device-mapper-only applib)"
-	myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
-	myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
-	use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf="${myconf} --enable-static_link"
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf="${myconf} --with-mirrors=${dmbuildmode}"
-	myconf="${myconf} --with-snapshots=${dmbuildmode}"
-	if use thin; then
-		myconf="${myconf} --with-thin=internal --with-cache=internal"
-		local texec
-		for texec in check dump repair restore; do
-			myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
-			myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
-		done
-	else
-		myconf="${myconf} --with-thin=none --with-cache=none"
-	fi
-
-	if use lvm1; then
-		myconf="${myconf} --with-lvm1=${buildmode}"
-	else
-		myconf="${myconf} --with-lvm1=none"
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf="${myconf} --disable-o_direct"
-
-	if use clvm; then
-		myconf="${myconf} --with-cluster=${buildmode}"
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf="${myconf} --with-clvmd=${clvmd}"
-		myconf="${myconf} --with-pool=${buildmode}"
-	else
-		myconf="${myconf} --with-clvmd=none --with-cluster=none"
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		"$(systemd_with_unitdir)" \
-		${myconf} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
deleted file mode 100644
index 52adb6bb332..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.166-r2.ebuild
+++ /dev/null
@@ -1,298 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~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 )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	sanlock? ( sys-cluster/sanlock )
-	systemd? ( >=sys-apps/systemd-205:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	sys-devel/autoconf-archive
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-PATCHES=(
-	# Gentoo specific modification(s):
-	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	# 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.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{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf=()
-	local buildmode
-
-	myconf+=( $(use_enable !device-mapper-only dmeventd) )
-	myconf+=( $(use_enable !device-mapper-only cmdlib) )
-	myconf+=( $(use_enable !device-mapper-only applib) )
-	myconf+=( $(use_enable !device-mapper-only fsadm) )
-	myconf+=( $(use_enable !device-mapper-only lvmetad) )
-	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf+=( --enable-static_link )
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf+=( --with-mirrors=${dmbuildmode} )
-	myconf+=( --with-snapshots=${dmbuildmode} )
-	if use thin; then
-		myconf+=( --with-thin=internal --with-cache=internal )
-		local texec
-		for texec in check dump repair restore; do
-			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
-			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
-		done
-	else
-		myconf+=( --with-thin=none --with-cache=none )
-	fi
-
-	if use lvm1; then
-		myconf+=( --with-lvm1=${buildmode} )
-	else
-		myconf+=( --with-lvm1=none )
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf+=( --disable-o_direct )
-
-	if use clvm; then
-		myconf+=( --with-cluster=${buildmode} )
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf+=( --with-clvmd=${clvmd} )
-		myconf+=( --with-pool=${buildmode} )
-
-	else
-		myconf+=( --with-clvmd=none --with-cluster=none )
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable sanlock lockd-sanlock) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
-		${myconf[@]} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm
-		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
-
-		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
-		newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
-	fi
-
-	if use sanlock; then
-		newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
-	fi
-
-	if use clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.166.ebuild b/sys-fs/lvm2/lvm2-2.02.166.ebuild
deleted file mode 100644
index b8cb4920dfd..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.166.ebuild
+++ /dev/null
@@ -1,291 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
-	systemd? ( udev )
-	clvm? ( !systemd )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	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/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	sys-devel/autoconf-archive
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-PATCHES=(
-	# Gentoo specific modification(s):
-	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	# 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.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{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf=()
-	local buildmode
-
-	myconf+=( $(use_enable !device-mapper-only dmeventd) )
-	myconf+=( $(use_enable !device-mapper-only cmdlib) )
-	myconf+=( $(use_enable !device-mapper-only applib) )
-	myconf+=( $(use_enable !device-mapper-only fsadm) )
-	myconf+=( $(use_enable !device-mapper-only lvmetad) )
-	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf+=( --enable-static_link )
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf+=( --with-mirrors=${dmbuildmode} )
-	myconf+=( --with-snapshots=${dmbuildmode} )
-	if use thin; then
-		myconf+=( --with-thin=internal --with-cache=internal )
-		local texec
-		for texec in check dump repair restore; do
-			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
-			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
-		done
-	else
-		myconf+=( --with-thin=none --with-cache=none )
-	fi
-
-	if use lvm1; then
-		myconf+=( --with-lvm1=${buildmode} )
-	else
-		myconf+=( --with-lvm1=none )
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf+=( --disable-o_direct )
-
-	if use clvm; then
-		myconf+=( --with-cluster=${buildmode} )
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf+=( --with-clvmd=${clvmd} )
-		myconf+=( --with-pool=${buildmode} )
-	else
-		myconf+=( --with-clvmd=none --with-cluster=none )
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable 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 clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.173.ebuild b/sys-fs/lvm2/lvm2-2.02.173.ebuild
deleted file mode 100644
index 64a75336d32..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.173.ebuild
+++ /dev/null
@@ -1,299 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
-	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~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 )"
-
-DEPEND_COMMON="
-	clvm? (
-		cman? ( =sys-cluster/cman-3* )
-		corosync? ( sys-cluster/corosync )
-		openais? ( sys-cluster/openais )
-		=sys-cluster/libdlm-3*
-	)
-
-	readline? ( sys-libs/readline:0= )
-	sanlock? ( sys-cluster/sanlock )
-	systemd? ( >=sys-apps/systemd-205:0= )
-	udev? ( >=virtual/libudev-208:=[static-libs?] )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
-	>=sys-apps/baselayout-2.2
-	!<sys-apps/openrc-0.11
-	!<sys-fs/cryptsetup-1.1.2
-	!!sys-fs/clvm
-	!!sys-fs/lvm-user
-	>=sys-apps/util-linux-2.16
-	lvm2create_initrd? ( sys-apps/makedev )
-	thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-# USE 'static' currently only works with eudev, bug 520450
-DEPEND="${DEPEND_COMMON}
-	virtual/pkgconfig
-	>=sys-devel/binutils-2.20.1-r1
-	sys-devel/autoconf-archive
-	static? (
-		selinux? ( sys-libs/libselinux[static-libs] )
-		udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
-		>=sys-apps/util-linux-2.16[static-libs]
-	)"
-
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
-
-PATCHES=(
-	# Gentoo specific modification(s):
-	"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
-
-	# 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.172-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	"${FILESDIR}"/${PN}-2.02.130-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{.in,} || die #480212
-
-	if use udev && ! use device-mapper-only; then
-		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
-		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
-		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
-		elog "if it was previously disabled."
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	# Without thin-privision-tools, there is nothing to install for target install_man7:
-	use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-	local myconf=()
-	local buildmode
-
-	myconf+=( $(use_enable !device-mapper-only dmeventd) )
-	myconf+=( $(use_enable !device-mapper-only cmdlib) )
-	myconf+=( $(use_enable !device-mapper-only applib) )
-	myconf+=( $(use_enable !device-mapper-only fsadm) )
-	myconf+=( $(use_enable !device-mapper-only lvmetad) )
-	use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	if use static; then
-		buildmode="internal"
-		# This only causes the .static versions to become available
-		myconf+=( --enable-static_link )
-	else
-		buildmode="shared"
-	fi
-	dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
-
-	# dmeventd requires mirrors to be internal, and snapshot available
-	# so we cannot disable them
-	myconf+=( --with-mirrors=${dmbuildmode} )
-	myconf+=( --with-snapshots=${dmbuildmode} )
-	if use thin; then
-		myconf+=( --with-thin=internal --with-cache=internal )
-		local texec
-		for texec in check dump repair restore; do
-			myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
-			myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
-		done
-	else
-		myconf+=( --with-thin=none --with-cache=none )
-	fi
-
-	if use lvm1; then
-		myconf+=( --with-lvm1=${buildmode} )
-	else
-		myconf+=( --with-lvm1=none )
-	fi
-
-	# disable O_DIRECT support on hppa, breaks pv detection (#99532)
-	use hppa && myconf+=( --disable-o_direct )
-
-	if use clvm; then
-		myconf+=( --with-cluster=${buildmode} )
-		# 4-state! Make sure we get it right, per bug 210879
-		# Valid options are: none, cman, gulm, all
-		#
-		# 2009/02:
-		# gulm is removed now, now dual-state:
-		# cman, none
-		# all still exists, but is not needed
-		#
-		# 2009/07:
-		# TODO: add corosync and re-enable ALL
-		local clvmd=""
-		use cman && clvmd="cman"
-		#clvmd="${clvmd/cmangulm/all}"
-		use corosync && clvmd="${clvmd:+$clvmd,}corosync"
-		use openais && clvmd="${clvmd:+$clvmd,}openais"
-		[ -z "${clvmd}" ] && clvmd="none"
-		myconf+=( --with-clvmd=${clvmd} )
-		myconf+=( --with-pool=${buildmode} )
-		myconf+=( --enable-lvmlockd-dlm )
-	else
-		myconf+=( --with-clvmd=none --with-cluster=none )
-	fi
-
-	econf \
-		$(use_enable readline) \
-		$(use_enable selinux) \
-		--enable-pkgconfig \
-		--with-confdir="${EPREFIX}"/etc \
-		--exec-prefix="${EPREFIX}" \
-		--sbindir="${EPREFIX}/sbin" \
-		--with-staticdir="${EPREFIX}"/sbin \
-		--libdir="${EPREFIX}/$(get_libdir)" \
-		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
-		--with-default-dm-run-dir=/run \
-		--with-default-run-dir=/run/lvm \
-		--with-default-locking-dir=/run/lock/lvm \
-		--with-default-pid-dir=/run \
-		$(use_enable udev udev_rules) \
-		$(use_enable udev udev_sync) \
-		$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
-		$(use_enable sanlock lvmlockd-sanlock) \
-		$(use_enable systemd udev-systemd-background-jobs) \
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
-		${myconf[@]} \
-		CLDFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	pushd include >/dev/null
-	emake
-	popd >/dev/null
-
-	if use device-mapper-only ; then
-		emake device-mapper
-	else
-		emake
-		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
-	fi
-}
-
-src_install() {
-	local inst
-	INSTALL_TARGETS="install install_tmpfiles_configuration"
-	# install systemd related files only when requested, bug #522430
-	use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
-	use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
-	for inst in ${INSTALL_TARGETS}; do
-		emake DESTDIR="${D}" ${inst}
-	done
-
-	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
-	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
-	if use !device-mapper-only ; then
-		newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.02.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 clvm; then
-		newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
-		newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		dolib.a libdaemon/client/libdaemonclient.a #462908
-		#gen_usr_ldscript libdevmapper.so
-		dolib.a daemons/dmeventd/libdevmapper-event.a
-		#gen_usr_ldscript libdevmapper-event.so
-	else
-		rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
-	fi
-
-	if use lvm2create_initrd; then
-		dosbin scripts/lvm2create_initrd/lvm2create_initrd
-		doman scripts/lvm2create_initrd/lvm2create_initrd.8
-		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
-	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
-	ewarn "# rc-update add lvm boot"
-	ewarn
-	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
-	ewarn "to enable lvm autoactivation and metadata caching."
-}
-
-src_test() {
-	einfo "Tests are disabled because of device-node mucking, if you want to"
-	einfo "run tests, compile the package and see ${S}/tests"
-}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-04-08 19:11 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2019-04-08 19:11 UTC (permalink / raw
  To: gentoo-commits

commit:     db137f8ae8978cefd4f00fc1829b8b21a44b62ef
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 19:11:42 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 19:11:42 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db137f8a

sys-fs/lvm2: add dmfilemapd and lvmpolld

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/files/lvmpolld.initd-2.02.183 |  17 ++
 sys-fs/lvm2/lvm2-2.02.184-r1.ebuild       | 262 ++++++++++++++++++++++++++++++
 2 files changed, 279 insertions(+)

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 00000000000..6b260109a66
--- /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 00000000000..dcbcd854bf3
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184-r1.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic
+
+DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
+HOMEPAGE="https://sourceware.org/lvm2/"
+SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~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
+
+	# 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"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-04-17  7:26 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2019-04-17  7:26 UTC (permalink / raw
  To: gentoo-commits

commit:     04b17140f5801dc924927a418f43cfe765afc778
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 17 07:04:10 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 17 07:25:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04b17140

sys-fs/lvm2: improve dmeventd init

Upstream dmeventd has an exit-on-idle behavior that leads openrc to
decide that it has crashed, when it just exited "normally".

Provide multiple ways around this:
- supervisor support in the init script
- patch the daemon to make the idle timeout configurable (submitted upstream)

Co-authored-by: William Hubbs <williamh <AT> gentoo.org>
Fixes: https://bugs.gentoo.org/682556
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2       | 21 +++++++
 .../lvm2-2.02.184-dmeventd-no-idle-exit.patch      | 68 ++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.184-r2.ebuild                |  3 +-
 3 files changed, 91 insertions(+), 1 deletion(-)

diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
new file mode 100644
index 00000000000..bc08c0a94f4
--- /dev/null
+++ b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command=/sbin/dmeventd
+command_args_foreground='-f'
+extra_started_commands=reload
+pidfile=/run/dmeventd.pid
+# Control idle exit behavior of daemon
+export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1}
+
+depend() {
+	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
+	# means dmeventd is NOT notified, as it cannot be safely running
+	after lvm device-mapper
+}
+
+reload() {
+	# TODO: this is not supported under supervisors
+	${command} -R
+}

diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
new file mode 100644
index 00000000000..c80bd2ba2be
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
@@ -0,0 +1,68 @@
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 17 Apr 2019 06:54:27 +0000
+Subject: [PATCH] dmeventd configurable idle exit time
+
+dmeventd nominally exits after 1 hour of idle time. There are use cases for
+this, esp. with socket activation, but also cases where users don't expect
+dmeventd to exit.
+
+Provide a tuning knob via environment variable, DMEVENTD_IDLE_EXIT_TIMEOUT,
+that can be -1 to not exit, or a configurable time for different idle exit.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Fixes: https://bugs.gentoo.org/682556
+
+diff -Nuar LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.184/daemons/dmeventd/dmeventd.c
+--- LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c	2019-03-22 03:14:59.000000000 -0700
++++ LVM2.2.02.184/daemons/dmeventd/dmeventd.c	2019-04-17 00:18:23.535029906 -0700
+@@ -2158,6 +2158,18 @@
+ 		.server_path = DM_EVENT_FIFO_SERVER
+ 	};
+ 	time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
++
++	/* Provide a basic way to config the idle timeout */
++	char* idle_exit_timeout_env = getenv("DMEVENTD_IDLE_EXIT_TIMEOUT") ? : NULL;
++	if(NULL != idle_exit_timeout_env) {
++		char* endptr;
++		idle_exit_timeout = strtol(idle_exit_timeout_env, &endptr, 10);
++		if (errno == ERANGE || *endptr != '\0') {
++			fprintf(stderr, "DMEVENTD_IDLE_EXIT_TIMEOUT: bad time input\n");
++			exit(EXIT_FAILURE);
++		}
++	}
++
+ 	opterr = 0;
+ 	optind = 0;
+ 
+@@ -2253,7 +2265,7 @@
+ 		_process_initial_registrations();
+ 
+ 	for (;;) {
+-		if (_idle_since) {
++		if (_idle_since || _exit_now) {
+ 			if (_exit_now) {
+ 				if (_exit_now == DM_SCHEDULED_EXIT)
+ 					break; /* Only prints shutdown message */
+@@ -2262,7 +2274,7 @@
+ 					 (long) (time(NULL) - _idle_since));
+ 				break;
+ 			}
+-			if (idle_exit_timeout) {
++			if (idle_exit_timeout && idle_exit_timeout > 0) {
+ 				now = time(NULL);
+ 				if (now < _idle_since)
+ 					_idle_since = now; /* clock change? */
+diff -Nuar LVM2.2.02.184.orig/man/dmeventd.8_main LVM2.2.02.184/man/dmeventd.8_main
+--- LVM2.2.02.184.orig/man/dmeventd.8_main	2019-03-22 03:15:00.000000000 -0700
++++ LVM2.2.02.184/man/dmeventd.8_main	2019-04-17 00:17:46.076023638 -0700
+@@ -143,6 +143,10 @@
+ Variable is set by thin plugin to prohibit recursive interation
+ with dmeventd by any executed lvm2 command from
+ a thin_command environment.
++.TP
++.B DMEVENTD_IDLE_EXIT_TIMEOUT
++Configure the dmeventd idle exit timeout behavior, value in seconds. Default
++is 3600 (1 hour). -1 means do not exit.
+ .
+ .SH SEE ALSO
+ .

diff --git a/sys-fs/lvm2/lvm2-2.02.184-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r2.ebuild
index 64a1656d31b..8ff1308f584 100644
--- a/sys-fs/lvm2/lvm2-2.02.184-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.184-r2.ebuild
@@ -65,6 +65,7 @@ PATCHES=(
 	"${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
 )
 
 pkg_setup() {
@@ -213,7 +214,7 @@ src_install() {
 	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}"/dmeventd.initd-2.02.184-r2 dmeventd
 		newinitd "${FILESDIR}"/lvm.rc-2.02.183 lvm
 		newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
 


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-06-02 22:31 Thomas Deutschmann
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Deutschmann @ 2019-06-02 22:31 UTC (permalink / raw
  To: gentoo-commits

commit:     5280d91e79ababa0c952b703fb0f1e1146b68207
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 22:31:26 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 22:31:26 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5280d91e

sys-fs/lvm2: allow reading metadata with invalid creation_time

Closes: https://bugs.gentoo.org/682380
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...ading-metadata-with-invalid-creation_time.patch |  72 ++++++
 sys-fs/lvm2/lvm2-2.02.184-r4.ebuild                | 270 +++++++++++++++++++++
 2 files changed, 342 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch b/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
new file mode 100644
index 00000000000..34968c7c2eb
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
@@ -0,0 +1,72 @@
+From a397b69ce33d811aba7d64d54b5c8e0efb86fd15 Mon Sep 17 00:00:00 2001
+From: Zdenek Kabelac <zkabelac@redhat.com>
+Date: Fri, 10 May 2019 14:40:11 +0200
+Subject: [PATCH] metadata: allow reading metadata with invalid creation_time
+
+lvm2 till version 2.02.169 (commit 78d004efa8a1809cea68283e6204edfa9d7c1091)
+was printing invalid creation_time argument into metadata on 32bit arch.
+
+However with commit ba9820b14223b731125c83dbc9709aa44fdcdbf1 we started
+to properly validate all input numbers and thus we refused to accept
+invalid metadata with 'garbage' string - but this results in the
+situation where metadata produced on older lvm2 on 32 bit architecture
+will become unreadable after upgrade.
+
+To fix this case - extend libdm parser in a way, that whenever we
+find error integer value, we also check if the parsed value is not for
+creation_time node and in this case we let the metadata pass through
+with made-up date 2018-05-24 (release date of 2.02.169).
+---
+ libdm/libdm-config.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c
+index 3f0d2510e..382f86bbf 100644
+--- a/libdm/libdm-config.c
++++ b/libdm/libdm-config.c
+@@ -51,6 +51,8 @@ struct parser {
+ 
+ 	struct dm_pool *mem;
+ 	int no_dup_node_check;	/* whether to disable dup node checking */
++	const char *key;        /* last obtained key */
++	unsigned ignored_creation_time;
+ };
+ 
+ struct config_output {
+@@ -176,7 +178,7 @@ static int _do_dm_config_parse(struct dm_config_tree *cft, const char *start, co
+ 	/* TODO? if (start == end) return 1; */
+ 
+ 	struct parser *p;
+-	if (!(p = dm_pool_alloc(cft->mem, sizeof(*p))))
++	if (!(p = dm_pool_zalloc(cft->mem, sizeof(*p))))
+ 		return_0;
+ 
+ 	p->mem = cft->mem;
+@@ -615,6 +617,7 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
+ 		match(TOK_SECTION_E);
+ 	} else {
+ 		match(TOK_EQ);
++		p->key = root->key;
+ 		if (!(value = _value(p)))
+ 			return_NULL;
+ 		if (root->v)
+@@ -682,8 +685,17 @@ static struct dm_config_value *_type(struct parser *p)
+ 		errno = 0;
+ 		v->v.i = strtoll(p->tb, NULL, 0);	/* FIXME: check error */
+ 		if (errno) {
+-			log_error("Failed to read int token.");
+-			return NULL;
++			if (errno == ERANGE && p->key &&
++			    strcmp("creation_time", p->key) == 0) {
++				/* Due to a bug in some older 32bit builds (<2.02.169),
++				 * lvm was able to produce invalid creation_time string */
++				v->v.i = 1527120000; /* Pick 2018-05-24 day instead */
++				if (!p->ignored_creation_time++)
++					log_warn("WARNING: Invalid creation_time found in metadata (repaired with next metadata update).");
++			} else {
++				log_error("Failed to read int token.");
++				return NULL;
++			}
+ 		}
+ 		match(TOK_INT);
+ 		break;

diff --git a/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild
new file mode 100644
index 00000000000..9100bbfa3e2
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.184-r4.ebuild
@@ -0,0 +1,270 @@
+# 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
+
+	# For upstream -- review and forward:
+	"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+	"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
+	"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
+	"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
+	"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
+	"${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
+	"${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
+	"${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
+	"${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
+	#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
+	"${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
+	"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~SYSVIPC"
+
+	if use udev; then
+		local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
+		if linux_config_exists; then
+			local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+			if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
+				ewarn "It's recommended to set an empty value to the following kernel config option:"
+				ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+			fi
+		fi
+	fi
+
+	check_extra_config
+
+	# 1. Genkernel no longer copies /sbin/lvm blindly.
+	if use static; then
+		elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
+		elog "their static versions. If you need the static binaries,"
+		elog "you must append .static to the filename!"
+	fi
+}
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e "1iAR = $(tc-getAR)" \
+		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
+		make.tmpl.in || die #444082
+
+	sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
+
+	if use udev && ! use device-mapper-only; then
+		sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
+		elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
+		elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
+		elog "if it was previously disabled."
+	fi
+
+	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
+
+	# Without thin-privision-tools, there is nothing to install for target install_man7:
+	if ! use thin ; then
+		sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	filter-flags -flto
+	local myeconfargs=()
+
+	# Most of this package does weird stuff.
+	# The build options are tristate, and --without is NOT supported
+	# options: 'none', 'internal', 'shared'
+	myeconfargs+=(
+		$(use_enable !device-mapper-only dmfilemapd)
+		$(use_enable !device-mapper-only dmeventd)
+		$(use_enable !device-mapper-only cmdlib)
+		$(use_enable !device-mapper-only applib)
+		$(use_enable !device-mapper-only fsadm)
+		$(use_enable !device-mapper-only lvmetad)
+		$(use_enable !device-mapper-only lvmpolld)
+		$(usex device-mapper-only --disable-udev-systemd-background-jobs '')
+
+		# This only causes the .static versions to become available
+		$(usex static --enable-static_link '')
+
+		# dmeventd requires mirrors to be internal, and snapshot available
+		# so we cannot disable them
+		--with-mirrors="$(usex device-mapper-only none internal)"
+		--with-snapshots="$(usex device-mapper-only none internal)"
+
+		# disable O_DIRECT support on hppa, breaks pv detection (#99532)
+		$(usex hppa --disable-o_direct '')
+	)
+
+	if use thin; then
+		myeconfargs+=( --with-thin=internal --with-cache=internal )
+		local texec
+		for texec in check dump repair restore; do
+			myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
+			myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
+		done
+	else
+		myeconfargs+=( --with-thin=none --with-cache=none )
+	fi
+
+	myeconfargs+=( --with-clvmd=none --with-cluster=none )
+
+	myeconfargs+=(
+		$(use_enable readline)
+		$(use_enable selinux)
+		--enable-pkgconfig
+		--with-confdir="${EPREFIX}"/etc
+		--exec-prefix="${EPREFIX}"
+		--sbindir="${EPREFIX}/sbin"
+		--with-staticdir="${EPREFIX}"/sbin
+		--libdir="${EPREFIX}/$(get_libdir)"
+		--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
+		--with-default-dm-run-dir=/run
+		--with-default-run-dir=/run/lvm
+		--with-default-locking-dir=/run/lock/lvm
+		--with-default-pid-dir=/run
+		$(use_enable udev udev_rules)
+		$(use_enable udev udev_sync)
+		$(use_with udev udevdir "$(get_udevdir)"/rules.d)
+		$(use_enable sanlock lvmlockd-sanlock)
+		$(use_enable systemd udev-systemd-background-jobs)
+		$(use_enable systemd notify-dbus)
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		CLDFLAGS="${LDFLAGS}"
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	pushd include >/dev/null
+	emake
+	popd >/dev/null
+
+	if use device-mapper-only ; then
+		emake device-mapper
+	else
+		emake
+		emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+	fi
+}
+
+src_install() {
+	local inst INSTALL_TARGETS
+	INSTALL_TARGETS=( install install_tmpfiles_configuration )
+	# install systemd related files only when requested, bug #522430
+	use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
+	use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
+	for inst in ${INSTALL_TARGETS[@]}; do
+		emake DESTDIR="${D}" ${inst}
+	done
+
+	newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
+	newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
+
+	if use !device-mapper-only ; then
+		newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
+		newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
+		newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
+		if ! use udev ; then
+			# We keep the variable but remove udev from it.
+			sed -r -i \
+				-e '/^rc_need=/s/\<udev\>//g' \
+				"${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
+		fi
+
+		newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
+		newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
+		newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
+	fi
+
+	if use sanlock; then
+		newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
+	fi
+
+	if use static-libs; then
+		dolib.a libdm/ioctl/libdevmapper.a
+		dolib.a libdaemon/client/libdaemonclient.a #462908
+		#gen_usr_ldscript libdevmapper.so
+		dolib.a daemons/dmeventd/libdevmapper-event.a
+		#gen_usr_ldscript libdevmapper-event.so
+	else
+		rm -f "${ED%/}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
+	fi
+
+	if use lvm2create_initrd; then
+		dosbin scripts/lvm2create_initrd/lvm2create_initrd
+		doman scripts/lvm2create_initrd/lvm2create_initrd.8
+		newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
+	fi
+
+	insinto /etc
+	doins "${FILESDIR}"/dmtab
+
+	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
+}
+
+pkg_postinst() {
+	ewarn "Make sure the \"lvm\" init script is in the runlevels:"
+	ewarn "# rc-update add lvm boot"
+	ewarn
+	ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
+	ewarn "to enable lvm autoactivation and metadata caching."
+}
+
+src_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2019-11-27 16:03 Lars Wendler
  0 siblings, 0 replies; 31+ messages in thread
From: Lars Wendler @ 2019-11-27 16:03 UTC (permalink / raw
  To: gentoo-commits

commit:     fed0e418dfcf0de536820fcb24546c2544a4a89c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 16:02:31 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 16:02:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fed0e418

sys-fs/lvm2: Revbump to fix unsupported udev option

Closes: https://bugs.gentoo.org/700160
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...2-2.02.186-udev_remove_unsupported_option.patch | 34 ++++++++++++++++++++++
 ...-2.02.186-r1.ebuild => lvm2-2.02.186-r2.ebuild} |  1 +
 2 files changed, 35 insertions(+)

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 00000000000..f895e1921e0
--- /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.186-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.02.186-r1.ebuild
rename to sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
index ec678f7044b..759415d9d98 100644
--- a/sys-fs/lvm2/lvm2-2.02.186-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
@@ -70,6 +70,7 @@ PATCHES=(
 	"${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() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2020-04-14 18:34 Thomas Deutschmann
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Deutschmann @ 2020-04-14 18:34 UTC (permalink / raw
  To: gentoo-commits

commit:     265392d1454bc2d73c546a748e95ddd076bdfa06
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 14 14:11:18 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 18:34:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=265392d1

sys-fs/lvm2: change "need lvmetad lvmlockd" to "use lvmetad lvmlockd"

Closes: https://bugs.gentoo.org/689292
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.02.187   | 163 +++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.187-r1.ebuild | 279 ++++++++++++++++++++++++++++++++++++
 2 files changed, 442 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187
new file mode 100644
index 00000000000..6b4e3df715f
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.187
@@ -0,0 +1,163 @@
+#!/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 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 _use=
+
+	if service_started ; then
+		_use=$(service_get_value use)
+	else
+		if _use_lvmetad ; then
+			_use="${_use} lvmetad"
+		fi
+
+		if _use_lvmlockd ; then
+			_use="${_use} 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 "${_use}" ] ; then
+		use ${_use}
+	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)"
+	for lvm_path in /bin/lvm /sbin/lvm ; do
+		[ -x "${lvm_path}" ] && break
+	done
+	if [ ! -x "${lvm_path}" ] ; then
+		eerror "Cannot find lvm binary in /sbin or /bin!"
+		return 1
+	fi
+	if [ -z "${CDBOOT}" ] ; then
+		if [ -e /proc/modules ] && ! dm_in_proc ; then
+			modprobe dm-mod 2>/dev/null
+		fi
+
+		if [ -d /proc/lvm ] || dm_in_proc ; then
+			ebegin "Setting up the Logical Volume Manager"
+			#still echo stderr for debugging
+			lvm_commands="#!${lvm_path}\n"
+			# Extra PV find pass because some devices might not have been available until very recently
+			lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
+			# Now make the nodes
+			lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
+			# And turn them on!
+			lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
+
+			if _use_lvmlockd ; then
+				# Start lockd VGs as required
+				lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
+			fi
+
+			# Order of this is important, have to work around dash and LVM readline
+			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
+			eend $? "Failed to setup the LVM"
+		fi
+	fi
+}
+
+start_post() {
+	# Save if we needed lvmetad
+	if _use_lvmetad ; then
+		service_set_value use 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 [ -n "${VGS}" ] ; then
+			local _ending="eend"
+			[ "${RC_RUNLEVEL}" = shutdown ] && _ending="ewend"
+
+			ebegin "  Shutting Down LVs & VGs"
+				#still echo stderr for debugging
+				lvm_commands="#!${lvm_path}\n"
+				# Extra PV find pass because some devices might not have been available until very recently
+				lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
+				# Now make the nodes
+				lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
+				# Order of this is important, have to work around dash and LVM readline
+				printf "%b\n" "${lvm_commands}" | ${lvm_path} /proc/self/fd/0 --config "${config}" >/dev/null
+
+				rc=${?}
+				msg="Failed (possibly some LVs still needed for /usr or root)"
+				[ "${RC_RUNLEVEL}" = shutdown ] && msg="${msg} [rc=${rc}]" && rc=0
+			${_ending} ${rc} "${msg}"
+		fi
+
+		einfo "Finished shutting down the Logical Volume Manager"
+		return 0
+	fi
+}
+
+# vim:ts=4

diff --git a/sys-fs/lvm2/lvm2-2.02.187-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.187-r1.ebuild
new file mode 100644
index 00000000000..12522e077cc
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.02.187-r1.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2020 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 ~riscv ~s390 ~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
+
+	# 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.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() {
+	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] 31+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2020-04-22 15:45 Thomas Deutschmann
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Deutschmann @ 2020-04-22 15:45 UTC (permalink / raw
  To: gentoo-commits

commit:     171bc0144212041972ae2e877078cf073b8252a5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 22 15:44:44 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 22 15:44:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=171bc014

sys-fs/lvm2: use rc_want instead of rc_use

Closes: https://bugs.gentoo.org/718748
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.02.187                  | 22 +++++++++++-----------
 ...-2.02.187-r1.ebuild => lvm2-2.02.187-r2.ebuild} |  0
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187
index 84e799c32f0..3468adc90f6 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.187
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.187
@@ -25,22 +25,22 @@ _use_lvmlockd() {
 depend() {
 	before checkfs fsck
 	after modules device-mapper
-	# We may use lvmetad based on the configuration. If we added lvmetad
+	# 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 _use=
+	local _want=
 
 	if service_started ; then
-		_use=$(service_get_value use)
+		_want=$(service_get_value want)
 	else
 		if _use_lvmetad ; then
-			_use="${_use} lvmetad"
+			_want="${_want} lvmetad"
 		fi
 
 		if _use_lvmlockd ; then
-			_use="${_use} lvmlockd"
+			_want="${_want} lvmlockd"
 		fi
 	fi
 
@@ -48,8 +48,8 @@ depend() {
 	# Depending on your system, it might also introduce udev & mdraid
 	need sysfs
 
-	if [ -n "${_use}" ] ; then
-		use ${_use}
+	if [ -n "${_want}" ] ; then
+		want ${_want}
 	fi
 }
 
@@ -118,16 +118,16 @@ start() {
 }
 
 start_post() {
-	local _use=
+	local _want=
 	if _use_lvmetad ; then
-		_use="${_use} lvmetad"
+		_want="${_want} lvmetad"
 	fi
 
 	if _use_lvmlockd ; then
-		_use="${_use} lvmlockd"
+		_want="${_want} lvmlockd"
 	fi
 
-	service_set_value use "${_use}"
+	service_set_value want "${_want}"
 }
 
 stop() {

diff --git a/sys-fs/lvm2/lvm2-2.02.187-r1.ebuild b/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild
similarity index 100%
rename from sys-fs/lvm2/lvm2-2.02.187-r1.ebuild
rename to sys-fs/lvm2/lvm2-2.02.187-r2.ebuild


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2020-04-27  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Deutschmann @ 2020-04-27  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     1881836d0d33dcd9636e8ce903e3f4c46ef01f3f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 27 00:46:57 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 27 00:49:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1881836d

sys-fs/lvm2: security cleanup

Bug: https://bugs.gentoo.org/709686
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 sys-fs/lvm2/Manifest                 |   2 -
 sys-fs/lvm2/files/lvm.rc-2.02.184-r3 | 154 -------------------
 sys-fs/lvm2/lvm2-2.02.184-r5.ebuild  | 273 ----------------------------------
 sys-fs/lvm2/lvm2-2.02.186-r2.ebuild  | 279 -----------------------------------
 sys-fs/lvm2/lvm2-2.02.187.ebuild     | 279 -----------------------------------
 5 files changed, 987 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 70cf42f7af5..b6e98da43b4 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,4 +1,2 @@
-DIST LVM2.2.02.184.tgz 2383698 BLAKE2B b6e308d76d541b9461dfcc6e82db256a175ccdabfae9c9d57d84eabd0d5ea50e3e09954b34741903e027412c2c26f72a5005fe934261576337a810738139deb8 SHA512 9db74f675e7c58f663a39afb79b6f33a33ad2cfbda63e9783ef5027f33977b4a1262a2e6754aa67c586eed083ee119a2e837c32a7746dcc53f13877c9d65c390
-DIST LVM2.2.02.186.tgz 2389759 BLAKE2B e094c0135d455386ea5789208899d4dbdd5e78bebf52e49ab5587f881fbc2b94c6accecacf1b4ed182b0c87046402c00a47a1b724795a94fe3ec998b580a77ae SHA512 06a1c00142ee41d8a576a5e06a5beae70baced3020e753ce3b612355cc4d9e33be4acf58569d49436c4ee1118d288d884c7301b7d886074eaf9f2fa6b0248c03
 DIST LVM2.2.02.187.tgz 2405544 BLAKE2B be804be3c64927a8848e8ea8de228fb563b6f8c22628b785aabb33fc993629e5370788216bd814246aeb3a5546fd5446383ce24342e716579887556edf2bbed2 SHA512 3ce56f0c0d2e7dbcdae5be263199f73ee5c4c052599d53cde9b16500a326d0340893344f4671839be06b5b4225d592175d01c9974db14f2dc220d6e9a1d47e91
 DIST LVM2.2.03.09.tgz 2476346 BLAKE2B 0987b19bc39ef218fe5a79d6035d6e3d5b59fc75ee94e401148f91437faedfa73295fcaefd97a7606ae9d158b000fa5de4e2a72e89da1e1ad27759f7b821489b SHA512 8540e46a6025ab14b592ccd9493b3224ffc0f962739a0a8de6d7b25c65c6ad96fc83ddb0e3d877b123a5e1b104476d0c20ccee2ead6d322257ec82ad1e3362d4

diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.184-r3 b/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
deleted file mode 100644
index b48efb0c99a..00000000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.184-r3
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-_get_lvm_path() {
-	local lvm_path=
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	echo "${lvm_path}"
-}
-
-_need_lvmetad()
-{
-	local lvm_path="$(_get_lvm_path)"
-	[ ! -x "${lvm_path}" ] && return 1
-	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
-}
-
-_need_lvmlockd()
-{
-	local lvm_path="$(_get_lvm_path)"
-	[ ! -x "${lvm_path}" ] && return 1
-	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
-}
-
-depend() {
-	before checkfs fsck
-	after modules device-mapper
-	# We may use lvmetad based on the configuration. If we added lvmetad
-	# support while lvm2 is running then we aren't dependent on it. For the
-	# more common case, if its disabled in the config we aren't dependent
-	# on it.
-	config /etc/lvm/lvm.conf
-	local _need=
-	if service_started; then
-		_need=$(service_get_value need)
-	else
-		if _need_lvmetad; then
-			_need="${_need} lvmetad"
-		fi
-		if _need_lvmlockd; then
-			_need="${_need} lvmlockd"
-		fi
-	fi
-	# Make sure you review /etc/conf.d/lvm as well!
-	# Depending on your system, it might also introduce udev & mdraid
-	need sysfs ${_need}
-}
-
-config='global { locking_dir = "/run/lock/lvm" }'
-
-dm_in_proc() {
-	local retval=0
-	for x in devices misc ; do
-		grep -qs 'device-mapper' /proc/${x}
-		retval=$((${retval} + $?))
-	done
-	return ${retval}
-}
-
-start() {
-	# LVM support for /usr, /home, /opt ....
-	# This should be done *before* checking local
-	# volumes, or they never get checked.
-
-	# NOTE: Add needed modules for LVM or RAID, etc
-	#       to /etc/modules.autoload if needed
-	lvm_path="$(_get_lvm_path)"
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-	if [ -z "${CDBOOT}" ] ; then
-		if [ -e /proc/modules ] && ! dm_in_proc ; then
-			modprobe dm-mod 2>/dev/null
-		fi
-		if [ -d /proc/lvm ] || dm_in_proc ; then
-			ebegin "Setting up the Logical Volume Manager"
-			#still echo stderr for debugging
-			lvm_commands="#!${lvm_path}\n"
-			# Extra PV find pass because some devices might not have been available until very recently
-			lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
-			# Now make the nodes
-			lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
-			# And turn them on!
-			lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
-			if _need_lvmlockd; then
-				# Start lockd VGs as required
-				lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
-			fi
-			# Order of this is important, have to work around dash and LVM readline
-			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
-			eend $? "Failed to setup the LVM"
-		fi
-	fi
-}
-
-start_post()
-{
-	# Save if we needed lvmetad
-	if _need_lvmetad; then
-		service_set_value need lvmetad
-	fi
-}
-
-stop() {
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-
-	# Stop LVM2
-	if [ -x /sbin/vgs ] && \
-		[ -x /sbin/vgchange ] && \
-		[ -x /sbin/lvchange ] && \
-		[ -f /etc/lvmtab -o -d /etc/lvm ] && \
-		[ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
-	then
-		einfo "Shutting down the Logical Volume Manager"
-
-		VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
-
-		if [ "$VGS" ]
-		then
-			local _ending="eend"
-			[ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend"
-			ebegin "  Shutting Down LVs & VGs"
-				#still echo stderr for debugging
-				lvm_commands="#!${lvm_path}\n"
-				# Extra PV find pass because some devices might not have been available until very recently
-				lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
-				# Now make the nodes
-				lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
-				# Order of this is important, have to work around dash and LVM readline
-				printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
-			rc=$?
-			msg="Failed (possibly some LVs still needed for /usr or root)"
-			[ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0
-			${_ending} $rc "${msg}"
-		fi
-
-		einfo "Finished shutting down the Logical Volume Manager"
-		return 0
-	fi
-}
-
-# vim:ts=4

diff --git a/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild b/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
deleted file mode 100644
index 474d4866558..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.184-r5.ebuild
+++ /dev/null
@@ -1,273 +0,0 @@
-# Copyright 1999-2020 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 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
-
-	# 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
-		if use !device-mapper-only ; then
-			dolib.a libdaemon/client/libdaemonclient.a #462908
-			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"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
deleted file mode 100644
index b8abffaea8a..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.186-r2.ebuild
+++ /dev/null
@@ -1,279 +0,0 @@
-# Copyright 1999-2020 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 ~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
-
-	# 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"
-}

diff --git a/sys-fs/lvm2/lvm2-2.02.187.ebuild b/sys-fs/lvm2/lvm2-2.02.187.ebuild
deleted file mode 100644
index 687e69b34e6..00000000000
--- a/sys-fs/lvm2/lvm2-2.02.187.ebuild
+++ /dev/null
@@ -1,279 +0,0 @@
-# Copyright 1999-2020 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 ~riscv ~s390 ~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
-
-	# 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] 31+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2020-04-27  0:50 Thomas Deutschmann
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Deutschmann @ 2020-04-27  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     512c60d6f092070e2fab9dfed8fa28a9e05dc591
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 27 00:49:05 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 27 00:49:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=512c60d6

sys-fs/lvm2: use latest runscript

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.03.05 | 132 ---------------------------------------
 sys-fs/lvm2/lvm2-2.03.09.ebuild  |   2 +-
 2 files changed, 1 insertion(+), 133 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm.rc-2.03.05 b/sys-fs/lvm2/files/lvm.rc-2.03.05
deleted file mode 100644
index 7b7d90b9826..00000000000
--- a/sys-fs/lvm2/files/lvm.rc-2.03.05
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-_get_lvm_path() {
-	local lvm_path=
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	echo "${lvm_path}"
-}
-
-_need_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
-	config /etc/lvm/lvm.conf
-	local _need=
-	if service_started; then
-		_need=$(service_get_value need)
-	else
-		if _need_lvmlockd; then
-			_need="${_need} lvmlockd"
-		fi
-	fi
-	# Make sure you review /etc/conf.d/lvm as well!
-	# Depending on your system, it might also introduce udev & mdraid
-	need sysfs ${_need}
-}
-
-config='global { locking_dir = "/run/lock/lvm" }'
-
-dm_in_proc() {
-	local retval=0
-	for x in devices misc ; do
-		grep -qs 'device-mapper' /proc/${x}
-		retval=$((${retval} + $?))
-	done
-	return ${retval}
-}
-
-start() {
-	# LVM support for /usr, /home, /opt ....
-	# This should be done *before* checking local
-	# volumes, or they never get checked.
-
-	# NOTE: Add needed modules for LVM or RAID, etc
-	#       to /etc/modules.autoload if needed
-	lvm_path="$(_get_lvm_path)"
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-	if [ -z "${CDBOOT}" ] ; then
-		if [ -e /proc/modules ] && ! dm_in_proc ; then
-			modprobe dm-mod 2>/dev/null
-		fi
-		if [ -d /proc/lvm ] || dm_in_proc ; then
-			ebegin "Setting up the Logical Volume Manager"
-			#still echo stderr for debugging
-			lvm_commands="#!${lvm_path}\n"
-			# Extra PV find pass because some devices might not have been available until very recently
-			lvm_commands="${lvm_commands}pvscan --config '${config}'\n"
-			# Now make the nodes
-			lvm_commands="${lvm_commands}vgscan --config '${config}' --mknodes\n"
-			# And turn them on!
-			lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ly\n"
-			if _need_lvmlockd; then
-				# Start lockd VGs as required
-				lvm_commands="${lvm_commands}vgchange --config '${config}' --lock-start --lock-opt auto\n"
-			fi
-			# Order of this is important, have to work around dash and LVM readline
-			printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 >/dev/null
-			eend $? "Failed to setup the LVM"
-		fi
-	fi
-}
-
-stop() {
-	for lvm_path in /bin/lvm /sbin/lvm ; do
-		[ -x "$lvm_path" ] && break
-	done
-	if [ ! -x "$lvm_path" ]; then
-		eerror "Cannot find lvm binary in /sbin or /bin!"
-		return 1
-	fi
-
-	# Stop LVM2
-	if [ -x /sbin/vgs ] && \
-		[ -x /sbin/vgchange ] && \
-		[ -x /sbin/lvchange ] && \
-		[ -f /etc/lvmtab -o -d /etc/lvm ] && \
-		[ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
-	then
-		einfo "Shutting down the Logical Volume Manager"
-
-		VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
-
-		if [ "$VGS" ]
-		then
-			local _ending="eend"
-			[ "$RC_RUNLEVEL" = shutdown ] && _ending="ewend"
-			ebegin "  Shutting Down LVs & VGs"
-				#still echo stderr for debugging
-				lvm_commands="#!${lvm_path}\n"
-				# Extra PV find pass because some devices might not have been available until very recently
-				lvm_commands="${lvm_commands}lvchange --config '${config}' --sysinit -a ln ${VGS}\n"
-				# Now make the nodes
-				lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n"
-				# Order of this is important, have to work around dash and LVM readline
-				printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
-			rc=$?
-			msg="Failed (possibly some LVs still needed for /usr or root)"
-			[ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0
-			${_ending} $rc "${msg}"
-		fi
-
-		einfo "Finished shutting down the Logical Volume Manager"
-		return 0
-	fi
-}
-
-# vim:ts=4

diff --git a/sys-fs/lvm2/lvm2-2.03.09.ebuild b/sys-fs/lvm2/lvm2-2.03.09.ebuild
index 17bc946ea78..40418f6bae3 100644
--- a/sys-fs/lvm2/lvm2-2.03.09.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.09.ebuild
@@ -211,7 +211,7 @@ src_install() {
 
 	if use !device-mapper-only ; then
 		newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
-		newinitd "${FILESDIR}"/lvm.rc-2.03.05 lvm
+		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.


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2021-07-12 14:45 Mike Gilbert
  0 siblings, 0 replies; 31+ messages in thread
From: Mike Gilbert @ 2021-07-12 14:45 UTC (permalink / raw
  To: gentoo-commits

commit:     16f1bcaa8abae55ad46bfa3c4bb49882834977a5
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 12 14:44:39 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jul 12 14:45:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16f1bcaa

sys-fs/lvm2: fix static link failure for dmsetup.static

Bug: https://bugs.gentoo.org/762017
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../lvm2-2.03.12-static-pkgconfig-libs-2.patch     | 38 ++++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.03.12.ebuild                    |  1 +
 2 files changed, 39 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs-2.patch b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs-2.patch
new file mode 100644
index 00000000000..a3a4642e828
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs-2.patch
@@ -0,0 +1,38 @@
+From 27ab05863dc56fcd7254bccf30797f9e3c448cac Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 12 Jul 2021 10:36:04 -0400
+Subject: [PATCH] libdm: add SELINUX_STATIC_LIBS and UDEV_STATIC_LIBS to
+ make.tmpl.in
+
+Fixes link failure for dmsetup.static.
+---
+ libdm/make.tmpl.in | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
+index a306101d5..2309fb3e5 100644
+--- a/libdm/make.tmpl.in
++++ b/libdm/make.tmpl.in
+@@ -55,7 +55,7 @@ RM = rm -f
+ 
+ LIBS += @LIBS@ $(PTHREAD_LIBS) $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
+ # Extra libraries always linked with static binaries
+-STATIC_LIBS = $(PTHREAD_LIBS)
++STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS)
+ DEFS += @DEFS@
+ # FIXME set this only where it's needed, not globally?
+ CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
+@@ -71,8 +71,10 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_LIBS = @READLINE_LIBS@
+ EDITLINE_LIBS = @EDITLINE_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@
+ SYSTEMD_LIBS = @SYSTEMD_LIBS@
+-- 
+2.32.0
+

diff --git a/sys-fs/lvm2/lvm2-2.03.12.ebuild b/sys-fs/lvm2/lvm2-2.03.12.ebuild
index a75dcf33246..93957db3a69 100644
--- a/sys-fs/lvm2/lvm2-2.03.12.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.12.ebuild
@@ -61,6 +61,7 @@ PATCHES=(
 	#"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
 	"${FILESDIR}"/${PN}-2.03.12-dynamic-static-ldflags.patch #332905
 	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch
 	"${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450
 	"${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756
 	"${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2021-10-20 12:20 Lars Wendler
  0 siblings, 0 replies; 31+ messages in thread
From: Lars Wendler @ 2021-10-20 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     64f3d67b87fc69c50d285b463e533173208f0f7f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 20 12:19:27 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Oct 20 12:20:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64f3d67b

sys-fs/lvm2: Bump to version 2.03.14. Removed old

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |  2 +-
 ...ch => lvm2-2.03.14-static-pkgconfig-libs.patch} | 43 +++++++++++++---------
 ...{lvm2-2.03.13-r2.ebuild => lvm2-2.03.14.ebuild} |  2 +-
 3 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 184ba81578f..f62db729f46 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,2 +1,2 @@
 DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca
-DIST LVM2.2.03.13.tgz 2619537 BLAKE2B 8f93896105e4d392ab88f027bbc0ea874b179a73d10ff8d0850ead2625e86468fe69d55c6fb0108f57a1efc1d3e8cc94647f1bc06636e4a714d0817224bbbfd7 SHA512 8b4fb6da5dd46ddeb754436189072bea79be594fab6d57d9be63c6ce3e3cb68d38601a2c031c493681321281cfb1f1459ace19974c00beb569364f44863cfc4a
+DIST LVM2.2.03.14.tgz 2639538 BLAKE2B 806f5e9cb76a05febef6f8ce8cfc42c92927b9538f62a21029c5ffc426a4fd7c3f32709be08dbd8028b53891b1075d1d13cb3b0d7b1815071ee8eb927d8f3ed3 SHA512 6a93bed1d5cf36f0f48d4d413d028b0e480cd4fc20e25d173770a892f265d2a0cc68d01a720b1513469953649e989532cd0c45f9538f92a4190eb3dc4555857d

diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.03.14-static-pkgconfig-libs.patch
similarity index 82%
rename from sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch
rename to sys-fs/lvm2/files/lvm2-2.03.14-static-pkgconfig-libs.patch
index 083a7327c6a..e259547a47b 100644
--- a/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch
+++ b/sys-fs/lvm2/files/lvm2-2.03.14-static-pkgconfig-libs.patch
@@ -1,4 +1,4 @@
-From 88aeb306dfd1e0174bf02cc208d46f0d722204dc Mon Sep 17 00:00:00 2001
+From ac7cce039825ff779795b5c2ae0ecf00ba43a401 Mon Sep 17 00:00:00 2001
 From: "Robin H. Johnson" <robbat2@gentoo.org>
 Date: Sun, 9 May 2021 11:00:22 +0200
 Subject: [PATCH] Use pkgconfig to detect static libs
@@ -9,10 +9,10 @@ Subject: [PATCH] Use pkgconfig to detect static libs
  2 files changed, 22 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 354b53b5ec..e872d70256 100644
+index 6cdf1a7e65..90452ebf7c 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1097,6 +1097,7 @@ if test "$BLKID_WIPING" != no; then
+@@ -1168,6 +1168,7 @@ if test "$BLKID_WIPING" != no; then
  	PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
  			  [ BLKID_WIPING=yes
  			    BLKID_PC="blkid"
@@ -20,7 +20,7 @@ index 354b53b5ec..e872d70256 100644
  			    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
-@@ -1145,6 +1146,7 @@ AC_MSG_RESULT($UDEV_SYNC)
+@@ -1213,6 +1214,7 @@ AC_MSG_RESULT($UDEV_SYNC)
  if test "$UDEV_SYNC" = yes; then
  	pkg_config_init
  	PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
@@ -28,7 +28,7 @@ index 354b53b5ec..e872d70256 100644
  	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,
-@@ -1369,19 +1371,30 @@ dnl -- Check for selinux
+@@ -1432,19 +1434,30 @@ dnl -- Check for selinux
  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.])
@@ -61,7 +61,7 @@ index 354b53b5ec..e872d70256 100644
  fi
  
  ################################################################################
-@@ -1755,6 +1768,7 @@ AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command lin
+@@ -1834,6 +1847,7 @@ AC_ARG_VAR([UDEV_LIBS], [linker flags for udev])
  ################################################################################
  AC_SUBST(AWK)
  AC_SUBST(BLKID_PC)
@@ -69,15 +69,15 @@ index 354b53b5ec..e872d70256 100644
  AC_SUBST(BUILD_CMIRRORD)
  AC_SUBST(BUILD_DMEVENTD)
  AC_SUBST(BUILD_LVMDBUSD)
-@@ -1857,6 +1871,7 @@ AC_SUBST(SALCK_LIBS)
+@@ -1934,6 +1948,7 @@ AC_SUBST(SALCK_LIBS)
  AC_SUBST(SBINDIR)
  AC_SUBST(SELINUX_LIBS)
  AC_SUBST(SELINUX_PC)
 +AC_SUBST(SELINUX_STATIC_LIBS)
  AC_SUBST(SYSCONFDIR)
- AC_SUBST(SYSTEMD_LIBS)
  AC_SUBST(SNAPSHOTS)
-@@ -1875,6 +1890,7 @@ AC_SUBST(CACHE_REPAIR_CMD)
+ AC_SUBST(STATICDIR)
+@@ -1950,6 +1965,7 @@ AC_SUBST(CACHE_REPAIR_CMD)
  AC_SUBST(CACHE_RESTORE_CMD)
  AC_SUBST(UDEV_PC)
  AC_SUBST(UDEV_RULES)
@@ -86,7 +86,7 @@ index 354b53b5ec..e872d70256 100644
  AC_SUBST(UDEV_SYSTEMD_BACKGROUND_JOBS)
  AC_SUBST(UDEV_RULE_EXEC_DETECTION)
 diff --git a/make.tmpl.in b/make.tmpl.in
-index 99f02e8b77..ae189546d0 100644
+index cccda10d6f..bf6c3e5596 100644
 --- a/make.tmpl.in
 +++ b/make.tmpl.in
 @@ -64,7 +64,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
@@ -98,20 +98,27 @@ index 99f02e8b77..ae189546d0 100644
  DEFS += @DEFS@
  # FIXME set this only where it's needed, not globally?
  CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
-@@ -83,10 +83,13 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
+@@ -82,6 +82,7 @@ AIO_CFLAGS = @AIO_CFLAGS@
+ AIO_LIBS = @AIO_LIBS@
+ BLKID_CFLAGS = @BLKID_CFLAGS@
+ BLKID_LIBS = @BLKID_LIBS@
++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
+ CPG_CFLAGS = @CPG_CFLAGS@
+ CPG_LIBS = @CPG_LIBS@
+ EDITLINE_CFLAGS = @EDITLINE_CFLAGS@
+@@ -90,10 +91,12 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
+ READLINE_CFLAGS = @READLINE_CFLAGS@
  READLINE_LIBS = @READLINE_LIBS@
- EDITLINE_LIBS = @EDITLINE_LIBS@
  SELINUX_LIBS = @SELINUX_LIBS@
 +SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
+ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
+ SYSTEMD_LIBS = @SYSTEMD_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@
- USE_TRACKING = @USE_TRACKING@
+ VALGRIND_LIBS = @VALGRIND_LIBS@
+ 
 -- 
-2.31.1
+2.33.1
 

diff --git a/sys-fs/lvm2/lvm2-2.03.13-r2.ebuild b/sys-fs/lvm2/lvm2-2.03.14.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.03.13-r2.ebuild
rename to sys-fs/lvm2/lvm2-2.03.14.ebuild
index f23621e8619..1cc2795b71b 100644
--- a/sys-fs/lvm2/lvm2-2.03.13-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.14.ebuild
@@ -63,7 +63,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
 	#"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
 	"${FILESDIR}"/${PN}-2.03.12-dynamic-static-ldflags.patch #332905
-	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.03.14-static-pkgconfig-libs.patch #370217, #439414 + blkid
 	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch
 	"${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450
 	"${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2021-12-27  0:05 Lars Wendler
  0 siblings, 0 replies; 31+ messages in thread
From: Lars Wendler @ 2021-12-27  0:05 UTC (permalink / raw
  To: gentoo-commits

commit:     c52ed8996b70a39521a5f6a82d2d64d7ddc08d99
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 27 00:01:54 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Dec 27 00:05:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c52ed899

sys-fs/lvm2: Don't use systemd-run on openrc systems

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../lvm2-2.03.14-dm_lvm_rules_no_systemd.patch     | 37 ++++++++++++++++++++++
 ...{lvm2-2.03.14.ebuild => lvm2-2.03.14-r1.ebuild} |  5 +++
 2 files changed, 42 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch b/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch
new file mode 100644
index 000000000000..0b4a156c630f
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch
@@ -0,0 +1,37 @@
+From 88d5b3d711c8546864e57dbfba7591a19be80c4d Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 27 Dec 2021 00:53:21 +0100
+Subject: [PATCH] Don't use systemd-run in 69-dm-lvm.rules
+
+some people don't run systemd
+---
+ udev/69-dm-lvm.rules.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 39e5b9807..6ba4efa0f 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -62,8 +62,8 @@ ENV{SYSTEMD_READY}="1"
+ # LVM_VG_NAME_COMPLETE='foo'
+ #
+ # When the VG is complete it can be activated, so
+-# vgchange -aay <vgname> is run.  It is run via
+-# systemd since it can take longer to run than
++# vgchange -aay <vgname> is run.  It can take
++# longer to run than
+ # udev wants to block when processing rules.
+ # (if there are hundreds of LVs to activate,
+ # the vgchange can take many seconds.)
+@@ -80,7 +80,7 @@ ENV{SYSTEMD_READY}="1"
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} lvm vgchange -aay --nohints $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --nohints $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
+ LABEL="lvm_end"
+-- 
+2.34.1
+

diff --git a/sys-fs/lvm2/lvm2-2.03.14.ebuild b/sys-fs/lvm2/lvm2-2.03.14-r1.ebuild
similarity index 98%
rename from sys-fs/lvm2/lvm2-2.03.14.ebuild
rename to sys-fs/lvm2/lvm2-2.03.14-r1.ebuild
index f27b82cc4ef0..a0f3b38b6ae8 100644
--- a/sys-fs/lvm2/lvm2-2.03.14.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.14-r1.ebuild
@@ -99,6 +99,11 @@ pkg_setup() {
 src_prepare() {
 	default
 
+	# Users without systemd get no auto-activation of any logical volume
+	if ! use systemd ; then
+		eapply "${FILESDIR}"/${PN}-2.03.14-dm_lvm_rules_no_systemd.patch
+	fi
+
 	sed -i \
 		-e "1iAR = $(tc-getAR)" \
 		-e "s:CC ?= @CC@:CC = $(tc-getCC):" \


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2022-10-26 23:11 Robin H. Johnson
  0 siblings, 0 replies; 31+ messages in thread
From: Robin H. Johnson @ 2022-10-26 23:11 UTC (permalink / raw
  To: gentoo-commits

commit:     5a38d92cc5ca6e989a8cb0daec006e299e01f27b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 26 23:11:13 2022 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Oct 26 23:11:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a38d92c

sys-fs/lvm2: bump

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-fs/lvm2/Manifest                               |   1 +
 .../lvm2-2.03.16-dm_lvm_rules_no_systemd.patch     |  11 +
 sys-fs/lvm2/lvm2-2.03.16.ebuild                    | 310 +++++++++++++++++++++
 3 files changed, 322 insertions(+)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 040ecbb191f0..27b129ed6b96 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1 +1,2 @@
 DIST LVM2.2.03.14.tgz 2639538 BLAKE2B 806f5e9cb76a05febef6f8ce8cfc42c92927b9538f62a21029c5ffc426a4fd7c3f32709be08dbd8028b53891b1075d1d13cb3b0d7b1815071ee8eb927d8f3ed3 SHA512 6a93bed1d5cf36f0f48d4d413d028b0e480cd4fc20e25d173770a892f265d2a0cc68d01a720b1513469953649e989532cd0c45f9538f92a4190eb3dc4555857d
+DIST LVM2.2.03.16.tgz 2658805 BLAKE2B 05c6089adff0c61ff1281a05a917f75480ad4acc28cb0214a42589d206a61168f68de07891b9af9814ed7998f16aff6f29ba29b85b23de36f38bf3b5f27802c1 SHA512 084ba4080537359458db936637fc7f83bb9bfcf2de9f3660882551b5c31c7e9900c7d381b238ce1bb7629942c740c121f0dea5e404c302d31ed028b5c65efaa5

diff --git a/sys-fs/lvm2/files/lvm2-2.03.16-dm_lvm_rules_no_systemd.patch b/sys-fs/lvm2/files/lvm2-2.03.16-dm_lvm_rules_no_systemd.patch
new file mode 100644
index 000000000000..c4f74a49b8d0
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.16-dm_lvm_rules_no_systemd.patch
@@ -0,0 +1,11 @@
+--- LVM2.2.03.16/udev/69-dm-lvm.rules.in.orig	2022-10-26 15:58:07.504434946 -0700
++++ LVM2.2.03.16/udev/69-dm-lvm.rules.in	2022-10-26 16:01:52.122204592 -0700
+@@ -80,7 +80,7 @@
+ # it's better suited to appearing in the journal.
+ 
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --nohints --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+ 
+ LABEL="lvm_end"

diff --git a/sys-fs/lvm2/lvm2-2.03.16.ebuild b/sys-fs/lvm2/lvm2-2.03.16.ebuild
new file mode 100644
index 000000000000..1068870be0ea
--- /dev/null
+++ b/sys-fs/lvm2/lvm2-2.03.16.ebuild
@@ -0,0 +1,310 @@
+# 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="https://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
+	https://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~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 )
+	static? ( !systemd !udev )
+	static-libs? ( static !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? (
+		readline? ( sys-libs/readline[static-libs] )
+		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.03.06-example.conf.in.patch
+
+	# For upstream -- review and forward:
+	#"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch # FIXME: breaks libdm/dm-tools build
+	"${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.03.12-dynamic-static-ldflags.patch #332905
+	"${FILESDIR}"/${PN}-2.03.14-static-pkgconfig-libs.patch #370217, #439414 + blkid
+	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch
+	"${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450
+	"${FILESDIR}"/${PN}-2.03.12-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.03.05-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 # fixed differently upstream
+	"${FILESDIR}"/${PN}-2.03.14-r1-add-fcntl.patch
+	"${FILESDIR}"/${PN}-2.03.14-r1-fopen-to-freopen.patch
+	"${FILESDIR}"/${PN}-2.03.14-r1-mallinfo.patch
+	"${FILESDIR}"/${PN}-2.03.14-freopen_n2.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
+
+	# Users without systemd get no auto-activation of any logical volume
+	if ! use systemd ; then
+		eapply "${FILESDIR}"/${PN}-2.03.16-dm_lvm_rules_no_systemd.patch
+	fi
+
+	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
+
+	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
+
+	# Workaround for bug #822210
+	tc-ld-disable-gold
+
+	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 fsadm)
+		$(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+=(
+		$(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 "${EPREFIX}$(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_test() {
+	einfo "Tests are disabled because of device-node mucking, if you want to"
+	einfo "run tests, compile the package and see ${S}/tests"
+}
+
+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}"/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 use udev; then
+		udev_reload
+	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
+}
+
+pkg_postrm() {
+	if use udev && [[ -z ${REPLACED_BY_VERSION} ]]; then
+		udev_reload
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2022-12-22  3:12 Sam James
  0 siblings, 0 replies; 31+ messages in thread
From: Sam James @ 2022-12-22  3:12 UTC (permalink / raw
  To: gentoo-commits

commit:     cbd2c8fc7512b60176979181780468d3de852e1a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 03:11:56 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 03:11:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbd2c8fc

sys-fs/lvm2: fix musl build

Closes: https://bugs.gentoo.org/887259
Thanks-to: Jory A. Pratt <anarchy <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/lvm2/files/lvm2-2.03.17-musl-LOCK_EX.patch | 20 ++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.03.17-r1.ebuild                |  1 +
 2 files changed, 21 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-musl-LOCK_EX.patch b/sys-fs/lvm2/files/lvm2-2.03.17-musl-LOCK_EX.patch
new file mode 100644
index 000000000000..acb5e903b45a
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.17-musl-LOCK_EX.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/887259
+
+From ab715e56feec4bbb135cc97d2d1e8e7340a8ee44 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 20 Dec 2022 08:12:49 -0600
+Subject: [PATCH] Add missing include for LOCK_EX
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/tools/vgimportdevices.c
++++ b/tools/vgimportdevices.c
+@@ -15,6 +15,7 @@
+ #include "tools.h"
+ #include "lib/cache/lvmcache.h"
+ #include "lib/device/device_id.h"
++#include <sys/file.h>
+ 
+ struct vgimportdevices_params {
+ 	uint32_t added_devices;
+-- 
+2.38.2

diff --git a/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild b/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild
index bfffdec912d5..6fa0f49415ea 100644
--- a/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild
@@ -72,6 +72,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.03.14-freopen_n2.patch
 	"${FILESDIR}"/${PN}-2.03.16-musl-strerror_r.patch
 	"${FILESDIR}"/${PN}-2.03.17-readelf.patch
+	"${FILESDIR}"/${PN}-2.03.17-musl-LOCK_EX.patch #887259
 )
 
 QA_CONFIGURE_OPTIONS="--disable-static"


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2023-01-29 11:55 David Seifert
  0 siblings, 0 replies; 31+ messages in thread
From: David Seifert @ 2023-01-29 11:55 UTC (permalink / raw
  To: gentoo-commits

commit:     03a6945711dd5aeded336d51f022a353ecf67350
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 29 11:55:20 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 11:55:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03a69457

sys-fs/lvm2: fix botched musl patch on glibc

Closes: https://bugs.gentoo.org/892487
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch         | 15 +++++++++------
 .../lvm2/{lvm2-2.03.18.ebuild => lvm2-2.03.18-r1.ebuild}  |  0
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch
index 13afb81796ac..94fb99e04025 100644
--- a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch
+++ b/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch
@@ -1,4 +1,4 @@
-From c2817ff30c4ad1e1a171ee0e914dbecdd486e3cf Mon Sep 17 00:00:00 2001
+From a2b9c9d2fe4d3f3869e8748dd44da44b67ba5a66 Mon Sep 17 00:00:00 2001
 From: David Seifert <soap@gentoo.org>
 Date: Sat, 28 Jan 2023 14:22:42 +0100
 Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr}
@@ -7,20 +7,23 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr}
   lvalues. Glibc even calls out this behaviour as non-portable:
     https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html
 ---
- lib/log/log.c      | 2 +-
+ lib/log/log.c      | 4 ++++
  tools/lvmcmdline.c | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
+ 2 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/lib/log/log.c b/lib/log/log.c
-index 118a3ba42..aecc72611 100644
+index 118a3ba42..a94016d81 100644
 --- a/lib/log/log.c
 +++ b/lib/log/log.c
-@@ -208,7 +208,7 @@ int reopen_standard_stream(FILE **stream, const char *mode)
+@@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
  
  	_check_and_replace_standard_log_streams(old_stream, new_stream);
  
--	*stream = new_stream;
++#ifdef __GLIBC__
+ 	*stream = new_stream;
++#else
 +	freopen(NULL, mode, *stream);
++#endif
  	return 1;
  }
  

diff --git a/sys-fs/lvm2/lvm2-2.03.18.ebuild b/sys-fs/lvm2/lvm2-2.03.18-r1.ebuild
similarity index 100%
rename from sys-fs/lvm2/lvm2-2.03.18.ebuild
rename to sys-fs/lvm2/lvm2-2.03.18-r1.ebuild


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2023-03-07 14:20 David Seifert
  0 siblings, 0 replies; 31+ messages in thread
From: David Seifert @ 2023-03-07 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     d31a213d16d4c516cc1ee5ef5535b964ee15467a
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  7 14:20:43 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 14:20:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d31a213d

sys-fs/lvm2: drop 2.03.18-r1

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-fs/lvm2/Manifest                              |   1 -
 sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch |  63 -----
 sys-fs/lvm2/lvm2-2.03.18-r1.ebuild                | 315 ----------------------
 3 files changed, 379 deletions(-)

diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index c1c32f79b536..fc5b8a7fd6cb 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,3 +1,2 @@
 DIST LVM2.2.03.17.tgz 2726793 BLAKE2B 425e52fe2d7832f8440203d2b6ffc3a097903abea8be07bbbf4864001d5f55083954e561a92b0fe4fc467533e465af3958b25cf33d2693f50f077dc3d9b74bd2 SHA512 ce9f4c10a7e89b397fa021098976117c062227da4f25996296dd3678c0aeb826edf9b7e4f5d3992f42156865ae47cb98671ec37a26868710174a473b42cc70a9
-DIST LVM2.2.03.18.tgz 2728113 BLAKE2B 59df1a6ece11473d3f15a8b81701faa363be556f7668a34d2cbbf9221a014f268c230f08d3bd873bbebee89480c787a6f358b2edf8777c990c62e7c6a36aecad SHA512 58043bdcad882065f15d772401d29fc7fb2d0a6b6b75063915dc38bb11cd847517dd18ae7e2acb3935e6c32ef620a275c2b2b9c307434f7457ea3203b87254c1
 DIST LVM2.2.03.19.tgz 2732219 BLAKE2B 7a5bd024312f149d95361ea24a282c8c68e371687fe8f7c853fa0748ce854bc991cdade999835666a5ece569e80dd9be85d4fae7fc5cc75b912de00f170cf66e SHA512 a40691f6f4c9300c95784be0fcb055a2b8e07bfdc87f000f2357ccb54fdb814a679fb79f5c9790a7440ef538e9997e46d56e539814bfdf138b4e76603aeb2994

diff --git a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch
deleted file mode 100644
index 94fb99e04025..000000000000
--- a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From a2b9c9d2fe4d3f3869e8748dd44da44b67ba5a66 Mon Sep 17 00:00:00 2001
-From: David Seifert <soap@gentoo.org>
-Date: Sat, 28 Jan 2023 14:22:42 +0100
-Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr}
-
-* ISO C does not guarantee that the standard streams are modifiable
-  lvalues. Glibc even calls out this behaviour as non-portable:
-    https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html
----
- lib/log/log.c      | 4 ++++
- tools/lvmcmdline.c | 6 +++---
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/lib/log/log.c b/lib/log/log.c
-index 118a3ba42..a94016d81 100644
---- a/lib/log/log.c
-+++ b/lib/log/log.c
-@@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
- 
- 	_check_and_replace_standard_log_streams(old_stream, new_stream);
- 
-+#ifdef __GLIBC__
- 	*stream = new_stream;
-+#else
-+	freopen(NULL, mode, *stream);
-+#endif
- 	return 1;
- }
- 
-diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
-index a5bb6a5c5..0ebfa375c 100644
---- a/tools/lvmcmdline.c
-+++ b/tools/lvmcmdline.c
-@@ -3422,7 +3422,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
-@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void)
- 	}
- 
- 	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 */
-@@ -3440,7 +3440,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;
--- 
-2.39.1
-

diff --git a/sys-fs/lvm2/lvm2-2.03.18-r1.ebuild b/sys-fs/lvm2/lvm2-2.03.18-r1.ebuild
deleted file mode 100644
index b93eea6a507f..000000000000
--- a/sys-fs/lvm2/lvm2-2.03.18-r1.ebuild
+++ /dev/null
@@ -1,315 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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="https://sourceware.org/ftp/lvm2/${PN^^}.${PV}.tgz"
-S="${WORKDIR}/${PN^^}.${PV}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="lvm lvm2create-initrd readline sanlock selinux static static-libs systemd thin +udev"
-REQUIRED_USE="
-	static? ( !systemd !udev )
-	static-libs? ( static !udev )
-	systemd? ( udev )
-	thin? ( lvm )"
-
-DEPEND_COMMON="
-	udev? ( virtual/libudev:= )
-	lvm? (
-		dev-libs/libaio
-		sys-apps/util-linux
-		readline? ( sys-libs/readline:= )
-		sanlock? ( sys-cluster/sanlock )
-		systemd? ( sys-apps/systemd:= )
-	)"
-# /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
-	lvm? (
-		virtual/tmpfiles
-		lvm2create-initrd? ( sys-apps/makedev )
-		thin? ( sys-block/thin-provisioning-tools )
-	)"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-DEPEND="${DEPEND_COMMON}
-	static? (
-		lvm? (
-			dev-libs/libaio[static-libs]
-			sys-apps/util-linux[static-libs]
-			readline? ( sys-libs/readline[static-libs] )
-		)
-		selinux? ( sys-libs/libselinux[static-libs] )
-	)"
-BDEPEND="
-	sys-devel/autoconf-archive
-	virtual/pkgconfig"
-
-PATCHES=(
-	# Gentoo specific modification(s):
-	"${FILESDIR}"/${PN}-2.03.17-example.conf.in.patch
-
-	# For upstream -- review and forward:
-	"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
-	"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
-	"${FILESDIR}"/${PN}-2.03.17-locale-muck.patch #330373
-	"${FILESDIR}"/${PN}-2.03.17-dynamic-static-ldflags.patch #332905
-	"${FILESDIR}"/${PN}-2.03.14-static-pkgconfig-libs.patch #370217, #439414 + blkid
-	"${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch
-	"${FILESDIR}"/${PN}-2.03.17-pthread-pkgconfig.patch #492450
-	"${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756
-	"${FILESDIR}"/${PN}-2.03.05-dmeventd-no-idle-exit.patch
-	"${FILESDIR}"/${PN}-2.03.18-freopen-musl.patch
-	"${FILESDIR}"/${PN}-2.03.17-musl-LOCK_EX.patch #887259
-)
-
-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
-
-	# Users without systemd get no auto-activation of any logical volume
-	if ! use systemd ; then
-		eapply "${FILESDIR}"/${PN}-2.03.16-dm_lvm_rules_no_systemd.patch
-		sed -i -e '/^USE_SD_NOTIFY=yes$/s/yes/no/' daemons/lvmlockd/Makefile.in || die
-	fi
-
-	sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
-	eautoreconf
-}
-
-src_configure() {
-	filter-flags -flto
-
-	# Workaround for bug #822210
-	tc-ld-disable-gold
-
-	# Most of this package does weird stuff.
-	# The build options are tristate, and --without is NOT supported
-	# options: 'none', 'internal', 'shared'
-	local myeconfargs=(
-		$(use_enable lvm dmfilemapd)
-		$(use_enable lvm dmeventd)
-		$(use_enable lvm cmdlib)
-		$(use_enable lvm fsadm)
-		$(use_enable lvm lvmpolld)
-		$(usev !lvm --disable-udev-systemd-background-jobs)
-
-		# This only causes the .static versions to become available
-		$(usev static --enable-static_link)
-
-		# dmeventd requires mirrors to be internal, and snapshot available
-		# so we cannot disable them
-		--with-mirrors="$(usex lvm internal none)"
-		--with-snapshots="$(usex lvm internal none)"
-	)
-
-	if use lvm && 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+=(
-		# musl doesn't do symbol versioning so can end up with
-		# runtime breakage.
-		--with-symvers=$(usex elibc_glibc 'gnu' 'no')
-		$(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 "${EPREFIX}$(get_udevdir)"/rules.d)
-		# USE=sanlock requires USE=lvm
-		$(use_enable $(usex lvm sanlock lvm) lvmlockd-sanlock)
-		$(use_enable systemd udev-systemd-background-jobs)
-		$(use_enable systemd notify-dbus)
-		$(use_enable systemd app-machineid)
-		$(use_enable systemd systemd-journal)
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		CLDFLAGS="${LDFLAGS}"
-	)
-
-	# Hard-wire this to bash as some shells (dash) don't know
-	# "-o pipefail" #682404
-	CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}"
-}
-
-src_compile() {
-	emake V=1 -C include
-
-	if use lvm ; then
-		emake V=1
-		emake V=1 CC="$(tc-getCC)" -C scripts
-	else
-		emake V=1 device-mapper
-		# https://bugs.gentoo.org/878131
-		emake V=1 -C libdm/dm-tools device-mapper
-	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"
-}
-
-src_install() {
-	local INSTALL_TARGETS=(
-		# full LVM2
-		$(usev lvm "install install_tmpfiles_configuration")
-		# install systemd related files only when requested, bug #522430
-		$(usev $(usex lvm systemd lvm) "SYSTEMD_GENERATOR_DIR=$(systemd_get_systemgeneratordir) install_systemd_units install_systemd_generators")
-
-		# install dm unconditionally
-		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 lvm ; 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}"/lvmpolld.initd-2.02.183 lvmpolld
-
-		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
-
-		if use sanlock; then
-			newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
-		fi
-	fi
-
-	if use static-libs; then
-		dolib.a libdm/ioctl/libdevmapper.a
-		if use lvm; 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 || die
-	fi
-
-	insinto /etc
-	doins "${FILESDIR}"/dmtab
-
-	dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_preinst() {
-	HAD_LVM=0
-
-	if has_version 'sys-fs/lvm2[lvm(+)]' ; then
-		HAD_LVM=1
-	fi
-}
-
-pkg_postinst() {
-	use lvm && tmpfiles_process lvm2.conf
-	use udev && udev_reload
-
-	# This is a new installation
-	if [[ -z "${REPLACING_VERSIONS}" ]]; then
-		if use lvm ; then
-			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 ${EROOT}/etc/lvm/lvm.conf if you want"
-			ewarn "to enable lvm autoactivation and metadata caching."
-		else
-			ewarn "Please enable USE=lvm if you need the LVM daemon and"
-			ewarn "tools like 'lvchange', 'vgchange', etc!"
-		fi
-	else
-		if ! use lvm && [[ ${HAD_LVM} -eq 1 ]] ; then
-			ewarn "LVM was previously enabled but is now disabled."
-			ewarn "Please enable USE=lvm if you need the LVM daemon and"
-			ewarn "tools like 'lvchange', 'vgchange', etc!"
-			ewarn "See the 2022-11-19-lvm2-default-USE-flags news item for more details."
-		fi
-	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 cause problems for udev-enabled LVM services."
-		fi
-	fi
-}
-
-pkg_postrm() {
-	if use udev && [[ -z ${REPLACED_BY_VERSION} ]]; then
-		udev_reload
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2023-05-10 17:47 David Seifert
  0 siblings, 0 replies; 31+ messages in thread
From: David Seifert @ 2023-05-10 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     ab7de53bd7d9d3f1051320ba07476a99876efb71
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 17:47:48 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed May 10 17:47:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab7de53b

sys-fs/lvm2: scrub patches

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch     | 18 ------------------
 .../files/lvm2-2.03.20-dmeventd-no-idle-exit.patch    |  7 -------
 sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch     |  9 ---------
 .../lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch   | 19 +++++++++++++------
 sys-fs/lvm2/lvm2-2.03.20.ebuild                       |  1 -
 sys-fs/lvm2/lvm2-2.03.21.ebuild                       |  1 -
 6 files changed, 13 insertions(+), 42 deletions(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch
deleted file mode 100644
index 7f0bfb894f02..000000000000
--- a/sys-fs/lvm2/files/lvm2-2.03.20-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.03.20-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch
index b7030ccc084d..8f3cb5534d95 100644
--- a/sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch
+++ b/sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch
@@ -12,13 +12,6 @@ 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
----
- daemons/dmeventd/dmeventd.c | 16 ++++++++++++++--
- man/dmeventd.8_main         |  4 ++++
- 2 files changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
-index 33859ef414..ac0b9743fc 100644
 --- a/daemons/dmeventd/dmeventd.c
 +++ b/daemons/dmeventd/dmeventd.c
 @@ -2169,6 +2169,18 @@

diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch
index cc231d9251bd..2b3f0a91f2a7 100644
--- a/sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch
+++ b/sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch
@@ -6,13 +6,6 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr}
 * ISO C does not guarantee that the standard streams are modifiable
   lvalues. Glibc even calls out this behaviour as non-portable:
     https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html
----
- lib/log/log.c      | 4 ++++
- tools/lvmcmdline.c | 6 +++---
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/lib/log/log.c b/lib/log/log.c
-index 118a3ba42..a94016d81 100644
 --- a/lib/log/log.c
 +++ b/lib/log/log.c
 @@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
@@ -27,8 +20,6 @@ index 118a3ba42..a94016d81 100644
  	return 1;
  }
  
-diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
-index a5bb6a5c5..0ebfa375c 100644
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
 @@ -3422,7 +3422,7 @@ static int _check_standard_fds(void)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch
index 59aaa9b34a08..007b2b5c1e3a 100644
--- a/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch
+++ b/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch
@@ -1,5 +1,5 @@
---- 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
+--- a/scripts/lvm2create_initrd/lvm2create_initrd
++++ b/scripts/lvm2create_initrd/lvm2create_initrd
 @@ -54,7 +54,9 @@
  DEVRAM=/tmp/initrd.$$
  
@@ -65,8 +65,15 @@
  if [ $? -ne 0 ]; then
     echo "$cmd -- ERROR creating directories in $TMPMNT"
     cleanup 1
-@@ -499,4 +508,3 @@
- FINALTXT
+@@ -460,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
  
- cleanup 0
--

diff --git a/sys-fs/lvm2/lvm2-2.03.20.ebuild b/sys-fs/lvm2/lvm2-2.03.20.ebuild
index 4ea94fc558fe..1c7fd041e178 100644
--- a/sys-fs/lvm2/lvm2-2.03.20.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.20.ebuild
@@ -60,7 +60,6 @@ PATCHES=(
 
 	# For upstream -- review and forward:
 	"${FILESDIR}"/${PN}-2.03.20-lvm2create_initrd.patch
-	"${FILESDIR}"/${PN}-2.03.20-createinitrd.patch #301331
 	"${FILESDIR}"/${PN}-2.03.20-locale-muck.patch #330373
 	"${FILESDIR}"/${PN}-2.03.20-dmeventd-no-idle-exit.patch
 	"${FILESDIR}"/${PN}-2.03.20-freopen-musl.patch

diff --git a/sys-fs/lvm2/lvm2-2.03.21.ebuild b/sys-fs/lvm2/lvm2-2.03.21.ebuild
index 12b85fc8045c..90e10e22c007 100644
--- a/sys-fs/lvm2/lvm2-2.03.21.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.21.ebuild
@@ -60,7 +60,6 @@ PATCHES=(
 
 	# For upstream -- review and forward:
 	"${FILESDIR}"/${PN}-2.03.20-lvm2create_initrd.patch
-	"${FILESDIR}"/${PN}-2.03.20-createinitrd.patch #301331
 	"${FILESDIR}"/${PN}-2.03.20-locale-muck.patch #330373
 	"${FILESDIR}"/${PN}-2.03.20-dmeventd-no-idle-exit.patch
 	"${FILESDIR}"/${PN}-2.03.20-freopen-musl.patch


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2023-12-27 22:22 Sam James
  0 siblings, 0 replies; 31+ messages in thread
From: Sam James @ 2023-12-27 22:22 UTC (permalink / raw
  To: gentoo-commits

commit:     2af83a21b451b1738fdb04d7216312af4a078efe
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 27 22:03:37 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 22:22:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2af83a21

sys-fs/lvm2: fix autoconf-2.72 compat

Revbump as @EGREP@ isn't substituted without it but it installs "successfully".

Closes: https://bugs.gentoo.org/920798
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/lvm2-2.03.22-autoconf-2.72-egrep.patch   | 30 ++++++++++++++++++++++
 ...m2-2.03.22-r2.ebuild => lvm2-2.03.22-r3.ebuild} |  1 +
 2 files changed, 31 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.22-autoconf-2.72-egrep.patch b/sys-fs/lvm2/files/lvm2-2.03.22-autoconf-2.72-egrep.patch
new file mode 100644
index 000000000000..9ce7d540200e
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.22-autoconf-2.72-egrep.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/920798
+https://gitlab.com/lvmteam/lvm2/-/merge_requests/4
+
+From 39cb34e56b8c04b4d652eb9dbd643e10a05ff21c Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Mon, 6 Nov 2023 16:44:41 +0800
+Subject: [PATCH] configure.ac: check egrep
+
+The macro AC_HEADER_STDC which requires AC_PROG_EGREP has been removed
+from configure.ac, then it fails to substitute '@EGREP@':
+
+|     [GEN] command-lines-input.h
+| /bin/bash: line 2: @EGREP@: command not found
+|     [GEN] command-count.h
+
+Call AC_PROG_EGREP to fix the error.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,6 +78,7 @@ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_MKDIR_P
+ AC_PROG_RANLIB
++AC_PROG_EGREP
+ AC_CHECK_TOOL([READELF], [readelf])
+ AC_CHECK_TOOL(AR, ar)
+ AC_PATH_TOOL(CFLOW_CMD, cflow)
+-- 
+GitLab

diff --git a/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild b/sys-fs/lvm2/lvm2-2.03.22-r3.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.03.22-r2.ebuild
rename to sys-fs/lvm2/lvm2-2.03.22-r3.ebuild
index a53c83765217..68e624c6d31d 100644
--- a/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.22-r3.ebuild
@@ -68,6 +68,7 @@ PATCHES=(
 	# For upstream -- review and forward:
 	"${FILESDIR}"/${PN}-2.03.20-dmeventd-no-idle-exit.patch
 	"${FILESDIR}"/${PN}-2.03.20-freopen-musl.patch
+	"${FILESDIR}"/${PN}-2.03.22-autoconf-2.72-egrep.patch
 )
 
 pkg_setup() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2024-11-17 16:15 Mike Gilbert
  0 siblings, 0 replies; 31+ messages in thread
From: Mike Gilbert @ 2024-11-17 16:15 UTC (permalink / raw
  To: gentoo-commits

commit:     3303524ef17c4d9cf627bfc8405d29c835da895c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 15:57:22 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Nov 17 16:14:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3303524e

sys-fs/lvm2: fix thin automagic

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../lvm2/files/lvm2-2.03.22-thin-autodetect.patch  | 135 +++++++++++++++++++++
 ...m2-2.03.22-r5.ebuild => lvm2-2.03.22-r6.ebuild} |   8 +-
 2 files changed, 142 insertions(+), 1 deletion(-)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.22-thin-autodetect.patch b/sys-fs/lvm2/files/lvm2-2.03.22-thin-autodetect.patch
new file mode 100644
index 000000000000..b02c9518f1d2
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.22-thin-autodetect.patch
@@ -0,0 +1,135 @@
+From 25f0398b1c9d108160a39de43af6f2fa3f952db5 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 17 Nov 2024 10:45:29 -0500
+Subject: [PATCH] configure: update thin_check_needs_check logic
+
+If the user has explicitly passed a value for thin_check_needs_check,
+skip the autodetection logic entirely. Same for cache_check_needs_check.
+
+This allows lvm2 to be built consistently without having
+thin-provisioning-tools installed.
+---
+ configure.ac | 84 ++++++++++++++++++++++++++++------------------------
+ 1 file changed, 46 insertions(+), 38 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cbea6adc6..4f77b4e6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -422,7 +422,7 @@ dnl -- thin_check needs-check flag
+ AC_ARG_ENABLE(thin_check_needs_check,
+ 	      AS_HELP_STRING([--disable-thin_check_needs_check],
+ 			     [required if thin_check version is < 0.3.0]),
+-	      THIN_CHECK_NEEDS_CHECK=$enableval, THIN_CHECK_NEEDS_CHECK="yes")
++	      THIN_CHECK_NEEDS_CHECK=$enableval, THIN_CHECK_NEEDS_CHECK="autodetect")
+ 
+ # Test if necessary thin tools are available
+ # if not - use plain defaults and warn user
+@@ -437,20 +437,24 @@ AS_CASE(["$THIN"],
+ 			THIN_CONFIGURE_WARN="y"
+ 		])
+ 	])
+-	AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "yes" && test "$THIN_CONFIGURE_WARN" != "y"], [
+-		THIN_CHECK_VSN=$("$THIN_CHECK_CMD" -V 2>/dev/null)
+-		THIN_CHECK_VSN=${THIN_CHECK_VSN##* }  # trim away all before the first space
+-		THIN_CHECK_VSN_MAJOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}')
+-		THIN_CHECK_VSN_MINOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}')
+-
+-		AS_IF([test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"], [
+-			AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
+-			THIN_CHECK_VERSION_WARN="y"
+-			THIN_CHECK_NEEDS_CHECK="no"
+-		], [test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3], [
+-			AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
+-			THIN_CHECK_VERSION_WARN="y"
+-			THIN_CHECK_NEEDS_CHECK="no"
++	AS_IF([test "$THIN_CHECK_NEEDS_CHECK" = "autodetect"], [
++		AS_IF([test "$THIN_CONFIGURE_WARN" != "y"], [
++			THIN_CHECK_VSN=$("$THIN_CHECK_CMD" -V 2>/dev/null)
++			THIN_CHECK_VSN=${THIN_CHECK_VSN##* }  # trim away all before the first space
++			THIN_CHECK_VSN_MAJOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}')
++			THIN_CHECK_VSN_MINOR=$(echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}')
++
++			AS_IF([test -z "$THIN_CHECK_VSN_MAJOR" || test -z "$THIN_CHECK_VSN_MINOR"], [
++				AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
++				THIN_CHECK_VERSION_WARN="y"
++				THIN_CHECK_NEEDS_CHECK="no"
++			], [test "$THIN_CHECK_VSN_MAJOR" -eq 0 && test "$THIN_CHECK_VSN_MINOR" -lt 3], [
++				AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
++				THIN_CHECK_VERSION_WARN="y"
++				THIN_CHECK_NEEDS_CHECK="no"
++			], [
++				THIN_CHECK_NEEDS_CHECK="yes"
++			])
+ 		])
+ 	])
+ 	# Empty means a config way to ignore thin dumping
+@@ -535,7 +539,7 @@ dnl -- cache_check needs-check flag
+ AC_ARG_ENABLE(cache_check_needs_check,
+ 	      AS_HELP_STRING([--disable-cache_check_needs_check],
+ 			     [required if cache_check version is < 0.5]),
+-	      CACHE_CHECK_NEEDS_CHECK=$enableval, CACHE_CHECK_NEEDS_CHECK="yes")
++	      CACHE_CHECK_NEEDS_CHECK=$enableval, CACHE_CHECK_NEEDS_CHECK="autodetect")
+ 
+ # Test if necessary cache tools are available
+ # if not - use plain defaults and warn user
+@@ -550,30 +554,34 @@ AS_CASE(["$CACHE"],
+ 			CACHE_CONFIGURE_WARN="y"
+ 		])
+ 	])
+-	AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "yes" && test "$CACHE_CONFIGURE_WARN" != "y"], [
+-		"$CACHE_CHECK_CMD" -V 2>/dev/null >conftest.tmp
+-		read -r CACHE_CHECK_VSN < conftest.tmp
+-		IFS=.- read -r CACHE_CHECK_VSN_MAJOR CACHE_CHECK_VSN_MINOR CACHE_CHECK_VSN_PATCH LEFTOVER < conftest.tmp
+-		rm -f conftest.tmp
+-
+-		# Require version >= 0.5.4 for --clear-needs-check-flag
+-		CACHE_CHECK_VSN_MAJOR=${CACHE_CHECK_VSN_MAJOR##* }
+-		AS_IF([test -z "$CACHE_CHECK_VSN_MAJOR" \
+-			|| test -z "$CACHE_CHECK_VSN_MINOR" \
+-			|| test -z "$CACHE_CHECK_VSN_PATCH"], [
+-			AC_MSG_WARN([$CACHE_CHECK_CMD: Bad version "$CACHE_CHECK_VSN" found])
+-			CACHE_CHECK_VERSION_WARN="y"
+-			CACHE_CHECK_NEEDS_CHECK="no"
+-		], [test "$CACHE_CHECK_VSN_MAJOR" -eq 0], [
+-			AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
+-				|| ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 )], [
+-				AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
++	AS_IF([test "$CACHE_CHECK_NEEDS_CHECK" = "autodetect"], [
++		AS_IF([test "$CACHE_CONFIGURE_WARN" != "y"], [
++			"$CACHE_CHECK_CMD" -V 2>/dev/null >conftest.tmp
++			read -r CACHE_CHECK_VSN < conftest.tmp
++			IFS=.- read -r CACHE_CHECK_VSN_MAJOR CACHE_CHECK_VSN_MINOR CACHE_CHECK_VSN_PATCH LEFTOVER < conftest.tmp
++			rm -f conftest.tmp
++
++			# Require version >= 0.5.4 for --clear-needs-check-flag
++			CACHE_CHECK_VSN_MAJOR=${CACHE_CHECK_VSN_MAJOR##* }
++			AS_IF([test -z "$CACHE_CHECK_VSN_MAJOR" \
++				|| test -z "$CACHE_CHECK_VSN_MINOR" \
++				|| test -z "$CACHE_CHECK_VSN_PATCH"], [
++				AC_MSG_WARN([$CACHE_CHECK_CMD: Bad version "$CACHE_CHECK_VSN" found])
+ 				CACHE_CHECK_VERSION_WARN="y"
+ 				CACHE_CHECK_NEEDS_CHECK="no"
+-			])
+-			AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 7], [
+-				AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" does not support new cache format V2])
+-				CACHE_CHECK_VERSION_WARN=y
++			], [test "$CACHE_CHECK_VSN_MAJOR" -eq 0], [
++				AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 5 \
++					|| ( test "$CACHE_CHECK_VSN_MINOR" -eq 5 && test "$CACHE_CHECK_VSN_PATCH" -lt 4 )], [
++					AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
++					CACHE_CHECK_VERSION_WARN="y"
++					CACHE_CHECK_NEEDS_CHECK="no"
++				])
++				AS_IF([test "$CACHE_CHECK_VSN_MINOR" -lt 7], [
++					AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" does not support new cache format V2])
++					CACHE_CHECK_VERSION_WARN=y
++				])
++			], [
++				CACHE_CHECK_NEEDS_CHECK="yes"
+ 			])
+ 		])
+ 	])
+-- 
+2.47.0
+

diff --git a/sys-fs/lvm2/lvm2-2.03.22-r5.ebuild b/sys-fs/lvm2/lvm2-2.03.22-r6.ebuild
similarity index 97%
rename from sys-fs/lvm2/lvm2-2.03.22-r5.ebuild
rename to sys-fs/lvm2/lvm2-2.03.22-r6.ebuild
index e0a1e2d36d8c..0a46f4913903 100644
--- a/sys-fs/lvm2/lvm2-2.03.22-r5.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.22-r6.ebuild
@@ -70,6 +70,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.03.20-freopen-musl.patch
 	"${FILESDIR}"/${PN}-2.03.22-autoconf-2.72-egrep.patch
 	"${FILESDIR}"/${PN}-2.03.22-thin-version-checking.patch
+	"${FILESDIR}"/${PN}-2.03.22-thin-autodetect.patch
 )
 
 pkg_setup() {
@@ -133,7 +134,12 @@ src_configure() {
 	)
 
 	if use lvm && use thin; then
-		myeconfargs+=( --with-thin=internal --with-cache=internal )
+		myeconfargs+=(
+			--with-thin=internal
+			--enable-thin_check_needs_check
+			--with-cache=internal
+			--enable-cache_check_needs_check
+		)
 		local texec
 		for texec in check dump repair restore; do
 			myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/usr/sbin/thin_${texec} )


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

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/
@ 2024-11-22 18:45 Sam James
  0 siblings, 0 replies; 31+ messages in thread
From: Sam James @ 2024-11-22 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1ae04cdfda5f7923c42ddf21e4267b12f7ed6135
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Nov 22 17:28:19 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 18:44:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae04cdf

sys-fs/lvm2: fix build with musl

Fixes implicit declaration of function basename on musl systems.

[sam: Add revbump for modern C fixes.]

Closes: https://bugs.gentoo.org/937239
Upstream-Commit: https://github.com/lvmteam/lvm2/commit/f98d2ffe8753895c84160a7abce4223bd127cd9e
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/39416
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/lvm2/files/lvm2-2.03.22-basename-musl.patch | 34 ++++++++++++++++++++++
 ...m2-2.03.22-r6.ebuild => lvm2-2.03.22-r7.ebuild} |  1 +
 2 files changed, 35 insertions(+)

diff --git a/sys-fs/lvm2/files/lvm2-2.03.22-basename-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.22-basename-musl.patch
new file mode 100644
index 000000000000..2dd9f8ff524c
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.22-basename-musl.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/937239
+https://github.com/lvmteam/lvm2/commit/f98d2ffe8753895c84160a7abce4223bd127cd9e
+
+From f98d2ffe8753895c84160a7abce4223bd127cd9e Mon Sep 17 00:00:00 2001
+From: Zdenek Kabelac <zkabelac@redhat.com>
+Date: Wed, 27 Mar 2024 00:28:14 +0100
+Subject: [PATCH] device_id: use dm_basename
+
+Avoid problems for other libc like muslc and use dm_basename.
+
+Prototype for basename has been removed from string.h from latest musl [1]
+compilers e.g. clang-18 flags the absense of prototype as error. therefore
+include libgen.h for providing it.
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Reported-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/device/device_id.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/device/device_id.c b/lib/device/device_id.c
+index 7d67a1cb7..200d39432 100644
+--- a/lib/device/device_id.c
++++ b/lib/device/device_id.c
+@@ -740,7 +740,7 @@ static int _dev_read_sys_serial(struct cmd_context *cmd, struct device *dev,
+ 		int ret;
+ 
+ 		/* /dev/vda to vda */
+-		base = basename(devname);
++		base = dm_basename(devname);
+ 
+ 		/* vda1 to vda */
+ 		for (i = 0; i < strlen(base); i++) {

diff --git a/sys-fs/lvm2/lvm2-2.03.22-r6.ebuild b/sys-fs/lvm2/lvm2-2.03.22-r7.ebuild
similarity index 99%
rename from sys-fs/lvm2/lvm2-2.03.22-r6.ebuild
rename to sys-fs/lvm2/lvm2-2.03.22-r7.ebuild
index 28276a453367..ac084f2eed9c 100644
--- a/sys-fs/lvm2/lvm2-2.03.22-r6.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.22-r7.ebuild
@@ -74,6 +74,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.03.22-autoconf-2.72-egrep.patch
 	"${FILESDIR}"/${PN}-2.03.22-thin-version-checking.patch
 	"${FILESDIR}"/${PN}-2.03.22-thin-autodetect.patch
+	"${FILESDIR}"/${PN}-2.03.22-basename-musl.patch
 )
 
 pkg_setup() {


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

end of thread, other threads:[~2024-11-22 18:45 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 14:20 [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/files/, sys-fs/lvm2/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2024-11-22 18:45 Sam James
2024-11-17 16:15 Mike Gilbert
2023-12-27 22:22 Sam James
2023-05-10 17:47 David Seifert
2023-01-29 11:55 David Seifert
2022-12-22  3:12 Sam James
2022-10-26 23:11 Robin H. Johnson
2021-12-27  0:05 Lars Wendler
2021-10-20 12:20 Lars Wendler
2021-07-12 14:45 Mike Gilbert
2020-04-27  0:50 Thomas Deutschmann
2020-04-27  0:50 Thomas Deutschmann
2020-04-22 15:45 Thomas Deutschmann
2020-04-14 18:34 Thomas Deutschmann
2019-11-27 16:03 Lars Wendler
2019-06-02 22:31 Thomas Deutschmann
2019-04-17  7:26 Robin H. Johnson
2019-04-08 19:11 Robin H. Johnson
2018-10-11 10:39 Lars Wendler
2018-08-04 22:13 Robin H. Johnson
2018-06-06  5:31 Jeroen Roovers
2018-05-08 17:11 Robin H. Johnson
2017-07-09 22:05 Robin H. Johnson
2017-02-18 21:29 Marc Schiffbauer
2017-02-13 20:09 Marc Schiffbauer
2016-10-21 23:15 Robin H. Johnson
2016-03-15  3:59 Doug Goldstein
2016-03-10 15:37 Robin H. Johnson
2016-01-05  2:56 Doug Goldstein
2015-12-28  0:30 Robin H. Johnson

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