summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-07-24 11:51:33 +0200
committerLars Wendler <polynomial-c@gentoo.org>2019-07-24 11:51:33 +0200
commit1ad73742ac898bddf1328bb91d8f02813cc6f35f (patch)
treed58a3a24ab8f06431faffaaa08edb56a8538f19d /sys-fs/lvm2
parentdev-vcs/subversion: Fixed java dependency. (diff)
downloadgentoo-1ad73742ac898bddf1328bb91d8f02813cc6f35f.tar.gz
gentoo-1ad73742ac898bddf1328bb91d8f02813cc6f35f.tar.bz2
gentoo-1ad73742ac898bddf1328bb91d8f02813cc6f35f.zip
sys-fs/lvm2: Improvements for 2.03 series
- EAPI-7 - Forward-ported a couple of patches - lvmetad has been removed - Removed a couple of unused configure options Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.03.05132
-rw-r--r--sys-fs/lvm2/files/lvm2-2.03.05-dmeventd-no-idle-exit.patch81
-rw-r--r--sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch75
-rw-r--r--sys-fs/lvm2/files/lvm2-2.03.05-example.conf.in.patch56
-rw-r--r--sys-fs/lvm2/files/lvm2-2.03.05-pthread-pkgconfig.patch48
-rw-r--r--sys-fs/lvm2/lvm2-2.03.05.ebuild56
6 files changed, 414 insertions, 34 deletions
diff --git a/sys-fs/lvm2/files/lvm.rc-2.03.05 b/sys-fs/lvm2/files/lvm.rc-2.03.05
new file mode 100644
index 000000000000..7b7d90b98269
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm.rc-2.03.05
@@ -0,0 +1,132 @@
+#!/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/files/lvm2-2.03.05-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.03.05-dmeventd-no-idle-exit.patch
new file mode 100644
index 000000000000..ec37e5da1dc7
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.05-dmeventd-no-idle-exit.patch
@@ -0,0 +1,81 @@
+From ab3ae0a22dfbe20e2d17e7dc60e0f76184ec098c Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 24 Jul 2019 11:22:32 +0200
+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
+
+Forward-ported from 2.02.184 to 2.03.05
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ 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
+@@ -2158,6 +2158,18 @@ int main(int argc, char *argv[])
+ .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 @@ int main(int argc, char *argv[])
+ _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 @@ int main(int argc, char *argv[])
+ (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 --git a/man/dmeventd.8_main b/man/dmeventd.8_main
+index dc4abf627e..4b0e522041 100644
+--- a/man/dmeventd.8_main
++++ b/man/dmeventd.8_main
+@@ -178,6 +178,10 @@ is processed.
+ Variable is set by thin and vdo plugin to prohibit recursive interation
+ with dmeventd by any executed lvm2 command from
+ a thin_command, vdo_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
+ .
+--
+2.22.0
+
diff --git a/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch
new file mode 100644
index 000000000000..2b9a5dd945c5
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch
@@ -0,0 +1,75 @@
+From 93101699f5e1190184c00c99ab7b6e9717e5019a Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 24 Jul 2019 11:11:35 +0200
+Subject: [PATCH] Add dynamic static ldflags
+
+Forward-ported from 2.02.178 to 2.03.05
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 2 ++
+ daemons/dmeventd/Makefile.in | 2 +-
+ make.tmpl.in | 1 +
+ tools/Makefile.in | 2 +-
+ 4 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1e45c0edcb..cc2625294a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,6 +33,7 @@ case "$host_os" in
+ CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -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"
+@@ -1758,6 +1759,7 @@ AC_SUBST(SYSCONFDIR)
+ 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)
+diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in
+index 6bd36d0325..a3c30ec1a0 100644
+--- a/daemons/dmeventd/Makefile.in
++++ b/daemons/dmeventd/Makefile.in
+@@ -66,7 +66,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o
+
+ dmeventd.static: $(LIB_STATIC) dmeventd.o
+ @echo " [CC] $@"
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
+ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
+
+ ifeq ("@PKGCONFIG@", "yes")
+diff --git a/make.tmpl.in b/make.tmpl.in
+index f3332e91c1..1489c2afad 100644
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -68,6 +68,7 @@ DEFS += @DEFS@
+ # 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@
+diff --git a/tools/Makefile.in b/tools/Makefile.in
+index 2620daa17c..e5fc9c4ae4 100644
+--- a/tools/Makefile.in
++++ b/tools/Makefile.in
+@@ -136,7 +136,7 @@ man-generator: man-generator.o
+
+ lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS)
+ @echo " [CC] $@"
+- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \
++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \
+ $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS)
+
+ liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
+--
+2.22.0
+
diff --git a/sys-fs/lvm2/files/lvm2-2.03.05-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.03.05-example.conf.in.patch
new file mode 100644
index 000000000000..a79250b8b4fd
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.05-example.conf.in.patch
@@ -0,0 +1,56 @@
+From d5755288f23fdeaca4c6d317583f5f119ea8801c Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 24 Jul 2019 11:01:03 +0200
+Subject: [PATCH] Add Gentoo specific changes
+
+Forward-ported from 2.02.178 to 2.03.05
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ conf/example.conf.in | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/conf/example.conf.in b/conf/example.conf.in
+index 154f621bcf..83124ddea3 100644
+--- a/conf/example.conf.in
++++ b/conf/example.conf.in
+@@ -143,6 +143,9 @@ devices {
+ # 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:
+@@ -1677,7 +1680,7 @@ activation {
+
+ # 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.
+@@ -1722,7 +1725,8 @@ activation {
+ #
+ # 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.
+@@ -1766,7 +1770,7 @@ activation {
+ # This configuration option is advanced.
+ # This configuration option has an automatic default value.
+ # stripesize = 64
+-# }
++}
+
+ # Configuration section report.
+ # LVM report command output formatting.
+--
+2.22.0
+
diff --git a/sys-fs/lvm2/files/lvm2-2.03.05-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.03.05-pthread-pkgconfig.patch
new file mode 100644
index 000000000000..56aa2a7b79fc
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.05-pthread-pkgconfig.patch
@@ -0,0 +1,48 @@
+From dbb68df8d02eff87f10df331e17bd0940e158f56 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Wed, 24 Jul 2019 11:15:59 +0200
+Subject: [PATCH] Add pthread to libdevmapper pkgconfig file
+
+Forward-ported from 2.02.176 to 2.03.05
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ libdm/libdevmapper.pc.in | 2 +-
+ tools/Makefile.in | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/libdm/libdevmapper.pc.in b/libdm/libdevmapper.pc.in
+index a325aeb9e0..aa0980378f 100644
+--- a/libdm/libdevmapper.pc.in
++++ b/libdm/libdevmapper.pc.in
+@@ -9,4 +9,4 @@ Version: @DM_LIB_PATCHLEVEL@
+ 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@
+diff --git a/tools/Makefile.in b/tools/Makefile.in
+index e5fc9c4ae4..12e4de2c63 100644
+--- a/tools/Makefile.in
++++ b/tools/Makefile.in
+@@ -87,6 +87,7 @@ ifeq ("@STATIC_LINK@", "yes")
+ TARGETS += lvm.static
+ INSTALL_LVM_TARGETS += install_tools_static
+ INSTALL_CMDLIB_TARGETS += install_cmdlib_static
++ STATIC_LIBS += @PTHREAD_LIBS@
+ endif
+
+ LVMLIBS = $(SYSTEMD_LIBS) -L$(top_builddir)/libdm -ldevmapper $(LIBS) -laio
+@@ -113,6 +114,10 @@ CFLOW_TARGET = lvm
+
+ include $(top_builddir)/make.tmpl
+
++ifeq ("@STATIC_LINK@", "yes")
++ STATIC_LIBS += @PTHREAD_LIBS@
++endif
++
+ device-mapper:
+
+ all: device-mapper
+--
+2.22.0
+
diff --git a/sys-fs/lvm2/lvm2-2.03.05.ebuild b/sys-fs/lvm2/lvm2-2.03.05.ebuild
index c605404faf84..d4cb83b032c7 100644
--- a/sys-fs/lvm2/lvm2-2.03.05.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.05.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit autotools linux-info multilib systemd toolchain-funcs udev flag-o-matic usr-ldscript
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
@@ -38,35 +38,38 @@ RDEPEND="${DEPEND_COMMON}
# 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]
)"
+BDEPEND="
+ sys-devel/autoconf-archive
+ virtual/pkgconfig
+"
-S=${WORKDIR}/${PN/lvm/LVM}.${PV}
+S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
PATCHES=(
# Gentoo specific modification(s):
- "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
+ "${FILESDIR}"/${PN}-2.03.05-example.conf.in.patch
# For upstream -- review and forward:
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
+ #"${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.02.178-dynamic-static-ldflags.patch #332905
+ #"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
+ "${FILESDIR}"/${PN}-2.03.05-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.03.05-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.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
)
pkg_setup() {
@@ -76,7 +79,7 @@ pkg_setup() {
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
+ 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
@@ -103,13 +106,6 @@ src_prepare() {
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:
@@ -131,9 +127,7 @@ src_configure() {
$(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 '')
@@ -160,8 +154,6 @@ src_configure() {
myeconfargs+=( --with-thin=none --with-cache=none )
fi
- myeconfargs+=( --with-clvmd=none --with-cluster=none )
-
myeconfargs+=(
$(use_enable readline)
$(use_enable selinux)
@@ -178,7 +170,7 @@ src_configure() {
--with-default-pid-dir=/run
$(use_enable udev udev_rules)
$(use_enable udev udev_sync)
- $(use_with udev udevdir "$(get_udevdir)"/rules.d)
+ $(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)
@@ -190,14 +182,14 @@ src_configure() {
src_compile() {
pushd include >/dev/null
- emake
+ emake V=1
popd >/dev/null
if use device-mapper-only ; then
- emake device-mapper
+ emake V=1 device-mapper
else
- emake
- emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
+ emake V=1
+ emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
fi
}
@@ -208,7 +200,7 @@ src_install() {
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}
+ emake V=1 DESTDIR="${D}" ${inst}
done
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
@@ -216,7 +208,7 @@ src_install() {
if use !device-mapper-only ; then
newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
- newinitd "${FILESDIR}"/lvm.rc-2.02.184-r3 lvm
+ newinitd "${FILESDIR}"/lvm.rc-2.03.05 lvm
newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
if ! use udev ; then
# We keep the variable but remove udev from it.
@@ -226,7 +218,6 @@ src_install() {
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
@@ -241,7 +232,7 @@ src_install() {
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
+ rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
fi
if use lvm2create_initrd; then
@@ -259,9 +250,6 @@ src_install() {
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() {