From f1d8b9e871854b3bb0f5c810a4883ab8d8f114eb Mon Sep 17 00:00:00 2001 From: David Seifert Date: Wed, 10 May 2023 10:56:54 +0200 Subject: sys-fs/lvm2: clean up patches Signed-off-by: David Seifert --- sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 | 1 - sys-fs/lvm2/files/device-mapper.conf-r4 | 1 + sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 | 146 ----------------- sys-fs/lvm2/files/device-mapper.rc-r3 | 146 +++++++++++++++++ sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 | 21 --- sys-fs/lvm2/files/dmeventd.initd-r3 | 21 +++ sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 | 38 ----- sys-fs/lvm2/files/lvm-monitoring.initd-r3 | 38 +++++ sys-fs/lvm2/files/lvm.confd-2.02.184-r3 | 9 -- sys-fs/lvm2/files/lvm.confd-r4 | 9 ++ sys-fs/lvm2/files/lvm.rc-2.02.187 | 173 --------------------- sys-fs/lvm2/files/lvm.rc-r1 | 173 +++++++++++++++++++++ .../files/lvm2-2.02.56-lvm2create_initrd.patch | 72 --------- sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch | 18 --- .../lvm2/files/lvm2-2.03.17-example.conf.in.patch | 42 ----- sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch | 11 -- .../lvm2-2.03.19-dm_lvm_rules_no_systemd.patch | 11 -- .../files/lvm2-2.03.19-dmeventd-no-idle-exit.patch | 73 --------- sys-fs/lvm2/files/lvm2-2.03.19-freopen-musl.patch | 63 -------- sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch | 18 +++ .../lvm2-2.03.20-dm_lvm_rules_no_systemd.patch | 11 ++ .../files/lvm2-2.03.20-dmeventd-no-idle-exit.patch | 73 +++++++++ .../lvm2/files/lvm2-2.03.20-example.conf.in.patch | 42 +++++ sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch | 63 ++++++++ sys-fs/lvm2/files/lvm2-2.03.20-locale-muck.patch | 11 ++ .../files/lvm2-2.03.20-lvm2create_initrd.patch | 72 +++++++++ sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 | 17 -- sys-fs/lvm2/files/lvmlockd.initd-r2 | 17 ++ sys-fs/lvm2/files/lvmpolld.initd-2.02.183 | 17 -- sys-fs/lvm2/files/lvmpolld.initd-r1 | 17 ++ sys-fs/lvm2/lvm2-2.03.20.ebuild | 30 ++-- sys-fs/lvm2/lvm2-2.03.21.ebuild | 30 ++-- 32 files changed, 742 insertions(+), 742 deletions(-) delete mode 100644 sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 create mode 100644 sys-fs/lvm2/files/device-mapper.conf-r4 delete mode 100644 sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 create mode 100644 sys-fs/lvm2/files/device-mapper.rc-r3 delete mode 100644 sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 create mode 100644 sys-fs/lvm2/files/dmeventd.initd-r3 delete mode 100644 sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 create mode 100644 sys-fs/lvm2/files/lvm-monitoring.initd-r3 delete mode 100644 sys-fs/lvm2/files/lvm.confd-2.02.184-r3 create mode 100644 sys-fs/lvm2/files/lvm.confd-r4 delete mode 100644 sys-fs/lvm2/files/lvm.rc-2.02.187 create mode 100644 sys-fs/lvm2/files/lvm.rc-r1 delete mode 100644 sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.03.19-dm_lvm_rules_no_systemd.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.03.19-dmeventd-no-idle-exit.patch delete mode 100644 sys-fs/lvm2/files/lvm2-2.03.19-freopen-musl.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-example.conf.in.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-locale-muck.patch create mode 100644 sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch delete mode 100644 sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 create mode 100644 sys-fs/lvm2/files/lvmlockd.initd-r2 delete mode 100644 sys-fs/lvm2/files/lvmpolld.initd-2.02.183 create mode 100644 sys-fs/lvm2/files/lvmpolld.initd-r1 diff --git a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 deleted file mode 100644 index bc7a25158635..000000000000 --- a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 +++ /dev/null @@ -1 +0,0 @@ -RC_AFTER="lvm" diff --git a/sys-fs/lvm2/files/device-mapper.conf-r4 b/sys-fs/lvm2/files/device-mapper.conf-r4 new file mode 100644 index 000000000000..bc7a25158635 --- /dev/null +++ b/sys-fs/lvm2/files/device-mapper.conf-r4 @@ -0,0 +1 @@ +RC_AFTER="lvm" diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 deleted file mode 100644 index 79fdff246fb7..000000000000 --- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 +++ /dev/null @@ -1,146 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -depend() { - # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that - # means dmeventd is NOT notified, as it cannot be safely running - before dmeventd checkfs fsck - after modules -} - -dm_in_proc() { - local retval=0 - for x in devices misc ; do - grep -qs 'device-mapper' /proc/${x} - retval=$((${retval} + $?)) - done - return ${retval} -} - -# char **build_dmsetup_command(volume) -# -# Returns complete dmsetup command given single volume name -build_dmsetup_command() { - local count dmsetup_cmd - - # Number of lines mentioning volume name - count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1}) - - # If there's just one line: - if [ ${count} -eq 1 ] ; then - echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ - grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}" - - # For all cases with more lines: - elif [ ${count} -gt 1 ] ; then - for c in $( seq 1 ${count} ) ; do - if [ ${c} -eq 1 ] ; then - # Heavy escaping in awk-statement because we cannot use apostrophes - dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ - grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" - else - # Append starting with newline - dmsetup_cmd="${dmsetup_cmd}\\\\n \ - $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ - grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" - fi - done - echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}" - fi - - return 0 -} - -# char **get_new_dm_volumes(void) -# -# Return unique volumes from /etc/dmtab -get_new_dm_volumes() { - local volume - - # Filter comments and blank lines - grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ - awk '{ print $1 }' | \ - uniq | \ - while read volume ; do - # If it exists, skip it - dmvolume_exists "${volume%:}" && continue - - echo "${volume%:}" - done - - return 0 -} - -# int dmvolume_exists(volume) -# -# Return true if volume exists in DM table -dmvolume_exists() { - local x line volume=$1 - - [ -z "${volume}" ] && return 1 - - /sbin/dmsetup ls 2>/dev/null | \ - while read line ; do - for x in ${line} ; do - # the following conditonal return only breaks out - # of the while loop, as it is running in a pipe. - [ "${x}" = "${volume}" ] && return 1 - # We only want to check the volume name - break - done - done - - # if 1 was returned from the above loop, then indicate that - # volume exists - [ $? = 1 ] && return 0 - - # otherwise the loop exited normally and the volume does not - # exist - return 1 -} - -# int is_empty_dm_volume(volume) -# -# Return true if the volume exists in DM table, but is empty/non-valid -is_empty_dm_volume() { - local table volume=$1 - - set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:") - [ "${volume}" = "$1" -a -z "$2" ] -} - - -start() { - if [ -e /proc/modules ] && ! dm_in_proc ; then - modprobe dm-mod 2>/dev/null - fi - # Ensure the dirs exist for locking and running - checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm - - local x volume - - if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then - [ -n "$(get_new_dm_volumes)" ] && \ - einfo " Setting up device-mapper volumes:" - - get_new_dm_volumes | \ - while read x ; do - [ -n "${x}" ] || continue - - volume="${x##* }" - - ebegin " Creating volume: ${volume}" - if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then - eend 1 " Error creating volume: ${volume}" - # dmsetup still adds an empty volume in some cases, - # so lets remove it - is_empty_dm_volume "${volume}" && \ - /sbin/dmsetup remove "${volume}" 2>/dev/null - else - eend 0 - fi - done - fi -} - diff --git a/sys-fs/lvm2/files/device-mapper.rc-r3 b/sys-fs/lvm2/files/device-mapper.rc-r3 new file mode 100644 index 000000000000..79fdff246fb7 --- /dev/null +++ b/sys-fs/lvm2/files/device-mapper.rc-r3 @@ -0,0 +1,146 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +depend() { + # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that + # means dmeventd is NOT notified, as it cannot be safely running + before dmeventd checkfs fsck + after modules +} + +dm_in_proc() { + local retval=0 + for x in devices misc ; do + grep -qs 'device-mapper' /proc/${x} + retval=$((${retval} + $?)) + done + return ${retval} +} + +# char **build_dmsetup_command(volume) +# +# Returns complete dmsetup command given single volume name +build_dmsetup_command() { + local count dmsetup_cmd + + # Number of lines mentioning volume name + count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1}) + + # If there's just one line: + if [ ${count} -eq 1 ] ; then + echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}" + + # For all cases with more lines: + elif [ ${count} -gt 1 ] ; then + for c in $( seq 1 ${count} ) ; do + if [ ${c} -eq 1 ] ; then + # Heavy escaping in awk-statement because we cannot use apostrophes + dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" + else + # Append starting with newline + dmsetup_cmd="${dmsetup_cmd}\\\\n \ + $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})" + fi + done + echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}" + fi + + return 0 +} + +# char **get_new_dm_volumes(void) +# +# Return unique volumes from /etc/dmtab +get_new_dm_volumes() { + local volume + + # Filter comments and blank lines + grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \ + awk '{ print $1 }' | \ + uniq | \ + while read volume ; do + # If it exists, skip it + dmvolume_exists "${volume%:}" && continue + + echo "${volume%:}" + done + + return 0 +} + +# int dmvolume_exists(volume) +# +# Return true if volume exists in DM table +dmvolume_exists() { + local x line volume=$1 + + [ -z "${volume}" ] && return 1 + + /sbin/dmsetup ls 2>/dev/null | \ + while read line ; do + for x in ${line} ; do + # the following conditonal return only breaks out + # of the while loop, as it is running in a pipe. + [ "${x}" = "${volume}" ] && return 1 + # We only want to check the volume name + break + done + done + + # if 1 was returned from the above loop, then indicate that + # volume exists + [ $? = 1 ] && return 0 + + # otherwise the loop exited normally and the volume does not + # exist + return 1 +} + +# int is_empty_dm_volume(volume) +# +# Return true if the volume exists in DM table, but is empty/non-valid +is_empty_dm_volume() { + local table volume=$1 + + set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:") + [ "${volume}" = "$1" -a -z "$2" ] +} + + +start() { + if [ -e /proc/modules ] && ! dm_in_proc ; then + modprobe dm-mod 2>/dev/null + fi + # Ensure the dirs exist for locking and running + checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm + + local x volume + + if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then + [ -n "$(get_new_dm_volumes)" ] && \ + einfo " Setting up device-mapper volumes:" + + get_new_dm_volumes | \ + while read x ; do + [ -n "${x}" ] || continue + + volume="${x##* }" + + ebegin " Creating volume: ${volume}" + if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then + eend 1 " Error creating volume: ${volume}" + # dmsetup still adds an empty volume in some cases, + # so lets remove it + is_empty_dm_volume "${volume}" && \ + /sbin/dmsetup remove "${volume}" 2>/dev/null + else + eend 0 + fi + done + fi +} + diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 deleted file mode 100644 index bc08c0a94f41..000000000000 --- a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 +++ /dev/null @@ -1,21 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -command=/sbin/dmeventd -command_args_foreground='-f' -extra_started_commands=reload -pidfile=/run/dmeventd.pid -# Control idle exit behavior of daemon -export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1} - -depend() { - # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that - # means dmeventd is NOT notified, as it cannot be safely running - after lvm device-mapper -} - -reload() { - # TODO: this is not supported under supervisors - ${command} -R -} diff --git a/sys-fs/lvm2/files/dmeventd.initd-r3 b/sys-fs/lvm2/files/dmeventd.initd-r3 new file mode 100644 index 000000000000..bc08c0a94f41 --- /dev/null +++ b/sys-fs/lvm2/files/dmeventd.initd-r3 @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command=/sbin/dmeventd +command_args_foreground='-f' +extra_started_commands=reload +pidfile=/run/dmeventd.pid +# Control idle exit behavior of daemon +export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1} + +depend() { + # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that + # means dmeventd is NOT notified, as it cannot be safely running + after lvm device-mapper +} + +reload() { + # TODO: this is not supported under supervisors + ${command} -R +} diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 deleted file mode 100644 index 914d6637c7a6..000000000000 --- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 +++ /dev/null @@ -1,38 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# This script is based on upstream file -# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in - -depend() { - # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that - # means dmeventd is NOT notified, as it cannot be safely running - need lvm dmeventd -} - -VGCHANGE=/sbin/vgchange -VGS=/sbin/vgs - -start() { - ret=0 - # TODO do we want to separate out already active groups only? - VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` - ebegin "Starting LVM monitoring for VGs ${VGSLIST}:" - $VGCHANGE --monitor y --poll y ${VGSLIST} - ret=$? - eend $ret - return $ret - -} - -stop() { - ret=0 - # TODO do we want to separate out already active groups only? - VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` - ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:" - $VGCHANGE --monitor n ${VGSLIST} - ret=$? - eend $ret - return $ret -} diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-r3 b/sys-fs/lvm2/files/lvm-monitoring.initd-r3 new file mode 100644 index 000000000000..914d6637c7a6 --- /dev/null +++ b/sys-fs/lvm2/files/lvm-monitoring.initd-r3 @@ -0,0 +1,38 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# This script is based on upstream file +# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in + +depend() { + # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that + # means dmeventd is NOT notified, as it cannot be safely running + need lvm dmeventd +} + +VGCHANGE=/sbin/vgchange +VGS=/sbin/vgs + +start() { + ret=0 + # TODO do we want to separate out already active groups only? + VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` + ebegin "Starting LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor y --poll y ${VGSLIST} + ret=$? + eend $ret + return $ret + +} + +stop() { + ret=0 + # TODO do we want to separate out already active groups only? + VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` + ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor n ${VGSLIST} + ret=$? + eend $ret + return $ret +} diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 b/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 deleted file mode 100644 index b29e1702b35d..000000000000 --- a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 +++ /dev/null @@ -1,9 +0,0 @@ -# If LVM is built with udev, you must ensure udev is running first! -# Otherwise it will hang -rc_need="udev" - -# LVM should normally only be started after mdraid is available -# this is because LVM physical volumes are very often MD devices. -rc_after="mdraid" - -# vim: ft=gentoo-conf-d diff --git a/sys-fs/lvm2/files/lvm.confd-r4 b/sys-fs/lvm2/files/lvm.confd-r4 new file mode 100644 index 000000000000..b29e1702b35d --- /dev/null +++ b/sys-fs/lvm2/files/lvm.confd-r4 @@ -0,0 +1,9 @@ +# If LVM is built with udev, you must ensure udev is running first! +# Otherwise it will hang +rc_need="udev" + +# LVM should normally only be started after mdraid is available +# this is because LVM physical volumes are very often MD devices. +rc_after="mdraid" + +# vim: ft=gentoo-conf-d diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187 deleted file mode 100644 index 3468adc90f61..000000000000 --- a/sys-fs/lvm2/files/lvm.rc-2.02.187 +++ /dev/null @@ -1,173 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -_get_lvm_path() { - local lvm_path= - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "${lvm_path}" ] && break - done - echo "${lvm_path}" -} - -_use_lvmetad() { - local lvm_path="$(_get_lvm_path)" - [ ! -x "${lvm_path}" ] && return 1 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1' -} - -_use_lvmlockd() { - local lvm_path="$(_get_lvm_path)" - [ ! -x "${lvm_path}" ] && return 1 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' -} - -depend() { - before checkfs fsck - after modules device-mapper - # We may want lvmetad based on the configuration. If we added lvmetad - # support while lvm2 is running then we aren't dependent on it. For the - # more common case, if its disabled in the config we aren't dependent - # on it. - config /etc/lvm/lvm.conf - local _want= - - if service_started ; then - _want=$(service_get_value want) - else - if _use_lvmetad ; then - _want="${_want} lvmetad" - fi - - if _use_lvmlockd ; then - _want="${_want} lvmlockd" - fi - fi - - # Make sure you review /etc/conf.d/lvm as well! - # Depending on your system, it might also introduce udev & mdraid - need sysfs - - if [ -n "${_want}" ] ; then - want ${_want} - fi -} - -config='global { locking_dir = "/run/lock/lvm" }' - -dm_in_proc() { - local retval=0 - for x in devices misc ; do - grep -qs 'device-mapper' /proc/${x} - retval=$((${retval} + $?)) - done - return ${retval} -} - -start() { - # LVM support for /usr, /home, /opt .... - # This should be done *before* checking local - # volumes, or they never get checked. - - # NOTE: Add needed modules for LVM or RAID, etc - # to /etc/modules.autoload if needed - - lvm_path="$(_get_lvm_path)" - if [ -z "${lvm_path}" ] ; then - eerror "Failed to find lvm binary in /bin or /sbin!" - return 1 - fi - - if [ -z "${CDBOOT}" ] ; then - if [ -e /proc/modules ] && ! dm_in_proc ; then - ebegin "Trying to load dm-mod module" - modprobe dm-mod 2>/dev/null - eend $? - fi - - if [ -d /proc/lvm ] || dm_in_proc ; then - local has_errors=0 verbose_command - - yesno "${rc_verbose}" && verbose_command=" -v" - - ebegin "Starting the Logical Volume Manager" - - if _use_lvmetad ; then - # Extra PV find pass because some devices might not have been available until very recently - ${lvm_path} pvscan${verbose_command} --config "${config}" --cache - [ $? -ne 0 ] && has_errors=1 - fi - - # Now make the nodes - ${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes - [ $? -ne 0 ] && has_errors=1 - - # Enable all VGs - ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y - [ $? -ne 0 ] && has_errors=1 - - if _use_lvmlockd ; then - # Start lockd VGs as required - ${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto - [ $? -ne 0 ] && has_errors=1 - fi - - eend ${has_errors} "Failed to start the Logical Volume Manager" - fi - fi -} - -start_post() { - local _want= - if _use_lvmetad ; then - _want="${_want} lvmetad" - fi - - if _use_lvmlockd ; then - _want="${_want} lvmlockd" - fi - - service_set_value want "${_want}" -} - -stop() { - lvm_path="$(_get_lvm_path)" - if [ -z "${lvm_path}" ] ; then - eerror "Failed to find lvm binary in /bin or /sbin!" - return 1 - fi - - # Stop LVM2 - if [ -f /etc/lvmtab -o -d /etc/lvm ] \ - && [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ] - then - local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) - if [ -z "${VGS}" ] ; then - # nothing to do for us - return 0 - fi - - local has_errors=0 verbose_command eend_cmd="eend" - - yesno "${rc_verbose}" && verbose_command=" -v" - - local msg="Failed to stop Logical Volume Manager" - if [ "${RC_RUNLEVEL}" = shutdown ] ; then - # failures on shutdown are non-fatal - eend_cmd="ewend" - msg="${msg} (possibly some LVs still needed for /usr or root)" - fi - - ebegin "Stopping the Logical Volume Manager" - - ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n - [ $? -ne 0 ] && has_errors=1 - - ${eend_cmd} ${has_errors} "${msg}" - fi - - # at this point make sure we always exit without indicating an error - return 0 -} - -# vim:ts=4 diff --git a/sys-fs/lvm2/files/lvm.rc-r1 b/sys-fs/lvm2/files/lvm.rc-r1 new file mode 100644 index 000000000000..3468adc90f61 --- /dev/null +++ b/sys-fs/lvm2/files/lvm.rc-r1 @@ -0,0 +1,173 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +_get_lvm_path() { + local lvm_path= + for lvm_path in /bin/lvm /sbin/lvm ; do + [ -x "${lvm_path}" ] && break + done + echo "${lvm_path}" +} + +_use_lvmetad() { + local lvm_path="$(_get_lvm_path)" + [ ! -x "${lvm_path}" ] && return 1 + ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1' +} + +_use_lvmlockd() { + local lvm_path="$(_get_lvm_path)" + [ ! -x "${lvm_path}" ] && return 1 + ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' +} + +depend() { + before checkfs fsck + after modules device-mapper + # We may want lvmetad based on the configuration. If we added lvmetad + # support while lvm2 is running then we aren't dependent on it. For the + # more common case, if its disabled in the config we aren't dependent + # on it. + config /etc/lvm/lvm.conf + local _want= + + if service_started ; then + _want=$(service_get_value want) + else + if _use_lvmetad ; then + _want="${_want} lvmetad" + fi + + if _use_lvmlockd ; then + _want="${_want} lvmlockd" + fi + fi + + # Make sure you review /etc/conf.d/lvm as well! + # Depending on your system, it might also introduce udev & mdraid + need sysfs + + if [ -n "${_want}" ] ; then + want ${_want} + fi +} + +config='global { locking_dir = "/run/lock/lvm" }' + +dm_in_proc() { + local retval=0 + for x in devices misc ; do + grep -qs 'device-mapper' /proc/${x} + retval=$((${retval} + $?)) + done + return ${retval} +} + +start() { + # LVM support for /usr, /home, /opt .... + # This should be done *before* checking local + # volumes, or they never get checked. + + # NOTE: Add needed modules for LVM or RAID, etc + # to /etc/modules.autoload if needed + + lvm_path="$(_get_lvm_path)" + if [ -z "${lvm_path}" ] ; then + eerror "Failed to find lvm binary in /bin or /sbin!" + return 1 + fi + + if [ -z "${CDBOOT}" ] ; then + if [ -e /proc/modules ] && ! dm_in_proc ; then + ebegin "Trying to load dm-mod module" + modprobe dm-mod 2>/dev/null + eend $? + fi + + if [ -d /proc/lvm ] || dm_in_proc ; then + local has_errors=0 verbose_command + + yesno "${rc_verbose}" && verbose_command=" -v" + + ebegin "Starting the Logical Volume Manager" + + if _use_lvmetad ; then + # Extra PV find pass because some devices might not have been available until very recently + ${lvm_path} pvscan${verbose_command} --config "${config}" --cache + [ $? -ne 0 ] && has_errors=1 + fi + + # Now make the nodes + ${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes + [ $? -ne 0 ] && has_errors=1 + + # Enable all VGs + ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y + [ $? -ne 0 ] && has_errors=1 + + if _use_lvmlockd ; then + # Start lockd VGs as required + ${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto + [ $? -ne 0 ] && has_errors=1 + fi + + eend ${has_errors} "Failed to start the Logical Volume Manager" + fi + fi +} + +start_post() { + local _want= + if _use_lvmetad ; then + _want="${_want} lvmetad" + fi + + if _use_lvmlockd ; then + _want="${_want} lvmlockd" + fi + + service_set_value want "${_want}" +} + +stop() { + lvm_path="$(_get_lvm_path)" + if [ -z "${lvm_path}" ] ; then + eerror "Failed to find lvm binary in /bin or /sbin!" + return 1 + fi + + # Stop LVM2 + if [ -f /etc/lvmtab -o -d /etc/lvm ] \ + && [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ] + then + local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) + if [ -z "${VGS}" ] ; then + # nothing to do for us + return 0 + fi + + local has_errors=0 verbose_command eend_cmd="eend" + + yesno "${rc_verbose}" && verbose_command=" -v" + + local msg="Failed to stop Logical Volume Manager" + if [ "${RC_RUNLEVEL}" = shutdown ] ; then + # failures on shutdown are non-fatal + eend_cmd="ewend" + msg="${msg} (possibly some LVs still needed for /usr or root)" + fi + + ebegin "Stopping the Logical Volume Manager" + + ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n + [ $? -ne 0 ] && has_errors=1 + + ${eend_cmd} ${has_errors} "${msg}" + fi + + # at this point make sure we always exit without indicating an error + return 0 +} + +# vim:ts=4 diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch deleted file mode 100644 index 59aaa9b34a08..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000 -+++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000 -@@ -54,7 +54,9 @@ - DEVRAM=/tmp/initrd.$$ - - # set defaults --BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} -+LVM=`which lvm.static` -+LVM=${LVM:-"`which lvm`"} -+BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"} - BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"} - BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"} - MAKEDEV=${MAKEDEV:-"debian"} -@@ -119,6 +121,10 @@ - echo "$PRE Mounting /proc" - mount -t proc none /proc - -+# We need /sys for lvm -+echo "$PRE Mounting /sys" -+mount -t sysfs sysfs /sys -+ - # plug in modules listed in /etc/modules - if [ -f /etc/modules ]; then - echo -n "$PRE plugging in kernel modules:" -@@ -179,26 +185,29 @@ - # run a shell if we're passed lvm2rescue on commandline - grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1 - if [ $? -eq 0 ]; then -- lvm vgchange --ignorelockingfailure -P -a y -+ $LVM vgchange --ignorelockingfailure -P -a y - do_shell - else -- lvm vgchange --ignorelockingfailure -a y -+ $LVM vgchange --ignorelockingfailure -a y - fi - - echo "$PRE Mounting root filesystem $rootvol ro" - mkdir /rootvol - if ! mount -t auto -o ro $rootvol /rootvol; then -- echo "\t*FAILED*"; -+ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*"; - do_shell - fi - - echo "$PRE Umounting /proc" - umount /proc - -+echo "$PRE Umounting /sys" -+umount /sys -+ - echo "$PRE Changing roots" - cd /rootvol - if ! pivot_root . initrd ; then -- echo "\t*FAILED*" -+ echo "\t*FAILED PIVOT TO NEW ROOT*" - do_shell - fi - -@@ -356,7 +365,7 @@ - fi - - verbose "creating basic set of directories in $TMPMNT" --(cd $TMPMNT; mkdir bin dev etc lib proc sbin var) -+(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var) - if [ $? -ne 0 ]; then - echo "$cmd -- ERROR creating directories in $TMPMNT" - cleanup 1 -@@ -499,4 +508,3 @@ - FINALTXT - - cleanup 0 -- diff --git a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch deleted file mode 100644 index 7f0bfb894f02..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch +++ /dev/null @@ -1,18 +0,0 @@ -X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331 -X-Gentoo-Bug: 301331 - -diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd ---- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000 -+++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000 -@@ -469,9 +469,9 @@ - rmdir $TMPMNT/lost+found - - echo "$cmd -- ummounting ram disk" --umount $DEVRAM -+umount $TMPMNT - if [ $? -ne 0 ]; then -- echo "$cmd -- ERROR umounting $DEVRAM" -+ echo "$cmd -- ERROR umounting $TMPMNT" - cleanup 1 - fi - diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch deleted file mode 100644 index b63b681e5fab..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.17-example.conf.in.patch +++ /dev/null @@ -1,42 +0,0 @@ -Add Gentoo specific changes - ---- a/conf/example.conf.in -+++ b/conf/example.conf.in -@@ -170,6 +170,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: -@@ -1843,7 +1846,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. -@@ -1888,7 +1891,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. -@@ -1931,7 +1935,7 @@ - # This configuration option is advanced. - # This configuration option has an automatic default value. - # stripesize = 64 --# } -+} - - # Configuration section report. - # LVM report command output formatting. diff --git a/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch deleted file mode 100644 index c672a10e2cf6..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.17-locale-muck.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/make.tmpl.in -+++ b/make.tmpl.in -@@ -571,7 +571,7 @@ - ( cat $(srcdir)/.exported_symbols; \ - if test -n "$(EXPORTED_HEADER)"; then \ - $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \ -- $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ -+ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ - fi \ - ) > $@ - diff --git a/sys-fs/lvm2/files/lvm2-2.03.19-dm_lvm_rules_no_systemd.patch b/sys-fs/lvm2/files/lvm2-2.03.19-dm_lvm_rules_no_systemd.patch deleted file mode 100644 index e39d7959b331..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.19-dm_lvm_rules_no_systemd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/udev/69-dm-lvm.rules.in -+++ b/udev/69-dm-lvm.rules.in -@@ -76,7 +76,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+="(SYSTEMDRUN) --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/files/lvm2-2.03.19-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.03.19-dmeventd-no-idle-exit.patch deleted file mode 100644 index b7030ccc084d..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.19-dmeventd-no-idle-exit.patch +++ /dev/null @@ -1,73 +0,0 @@ -From ab3ae0a22dfbe20e2d17e7dc60e0f76184ec098c Mon Sep 17 00:00:00 2001 -From: "Robin H. Johnson" -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 -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 @@ - .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; - -@@ -2265,7 +2277,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 */ -@@ -2274,7 +2286,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? */ ---- a/man/dmeventd.8_main -+++ b/man/dmeventd.8_main -@@ -169,6 +169,10 @@ - Variable is set by thin and vdo plugin to prohibit recursive interaction - 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 - . diff --git a/sys-fs/lvm2/files/lvm2-2.03.19-freopen-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.19-freopen-musl.patch deleted file mode 100644 index cc231d9251bd..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.19-freopen-musl.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 4cf08811e112100a2b10c60047f3c537ad21d674 Mon Sep 17 00:00:00 2001 -From: David Seifert -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.2 - diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch new file mode 100644 index 000000000000..7f0bfb894f02 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-createinitrd.patch @@ -0,0 +1,18 @@ +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-dm_lvm_rules_no_systemd.patch b/sys-fs/lvm2/files/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch new file mode 100644 index 000000000000..e39d7959b331 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch @@ -0,0 +1,11 @@ +--- a/udev/69-dm-lvm.rules.in ++++ b/udev/69-dm-lvm.rules.in +@@ -76,7 +76,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+="(SYSTEMDRUN) --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/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch new file mode 100644 index 000000000000..b7030ccc084d --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-dmeventd-no-idle-exit.patch @@ -0,0 +1,73 @@ +From ab3ae0a22dfbe20e2d17e7dc60e0f76184ec098c Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" +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 +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 @@ + .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; + +@@ -2265,7 +2277,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 */ +@@ -2274,7 +2286,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? */ +--- a/man/dmeventd.8_main ++++ b/man/dmeventd.8_main +@@ -169,6 +169,10 @@ + Variable is set by thin and vdo plugin to prohibit recursive interaction + 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 + . diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.03.20-example.conf.in.patch new file mode 100644 index 000000000000..b63b681e5fab --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-example.conf.in.patch @@ -0,0 +1,42 @@ +Add Gentoo specific changes + +--- a/conf/example.conf.in ++++ b/conf/example.conf.in +@@ -170,6 +170,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: +@@ -1843,7 +1846,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. +@@ -1888,7 +1891,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. +@@ -1931,7 +1935,7 @@ + # This configuration option is advanced. + # This configuration option has an automatic default value. + # stripesize = 64 +-# } ++} + + # Configuration section report. + # LVM report command output formatting. 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 new file mode 100644 index 000000000000..cc231d9251bd --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-freopen-musl.patch @@ -0,0 +1,63 @@ +From 4cf08811e112100a2b10c60047f3c537ad21d674 Mon Sep 17 00:00:00 2001 +From: David Seifert +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.2 + diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.03.20-locale-muck.patch new file mode 100644 index 000000000000..c672a10e2cf6 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-locale-muck.patch @@ -0,0 +1,11 @@ +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -571,7 +571,7 @@ + ( cat $(srcdir)/.exported_symbols; \ + if test -n "$(EXPORTED_HEADER)"; then \ + $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \ +- $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ ++ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ + fi \ + ) > $@ + diff --git a/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch new file mode 100644 index 000000000000..59aaa9b34a08 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.20-lvm2create_initrd.patch @@ -0,0 +1,72 @@ +--- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000 ++++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000 +@@ -54,7 +54,9 @@ + DEVRAM=/tmp/initrd.$$ + + # set defaults +-BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} ++LVM=`which lvm.static` ++LVM=${LVM:-"`which lvm`"} ++BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"} + BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"} + BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"} + MAKEDEV=${MAKEDEV:-"debian"} +@@ -119,6 +121,10 @@ + echo "$PRE Mounting /proc" + mount -t proc none /proc + ++# We need /sys for lvm ++echo "$PRE Mounting /sys" ++mount -t sysfs sysfs /sys ++ + # plug in modules listed in /etc/modules + if [ -f /etc/modules ]; then + echo -n "$PRE plugging in kernel modules:" +@@ -179,26 +185,29 @@ + # run a shell if we're passed lvm2rescue on commandline + grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1 + if [ $? -eq 0 ]; then +- lvm vgchange --ignorelockingfailure -P -a y ++ $LVM vgchange --ignorelockingfailure -P -a y + do_shell + else +- lvm vgchange --ignorelockingfailure -a y ++ $LVM vgchange --ignorelockingfailure -a y + fi + + echo "$PRE Mounting root filesystem $rootvol ro" + mkdir /rootvol + if ! mount -t auto -o ro $rootvol /rootvol; then +- echo "\t*FAILED*"; ++ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*"; + do_shell + fi + + echo "$PRE Umounting /proc" + umount /proc + ++echo "$PRE Umounting /sys" ++umount /sys ++ + echo "$PRE Changing roots" + cd /rootvol + if ! pivot_root . initrd ; then +- echo "\t*FAILED*" ++ echo "\t*FAILED PIVOT TO NEW ROOT*" + do_shell + fi + +@@ -356,7 +365,7 @@ + fi + + verbose "creating basic set of directories in $TMPMNT" +-(cd $TMPMNT; mkdir bin dev etc lib proc sbin var) ++(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var) + if [ $? -ne 0 ]; then + echo "$cmd -- ERROR creating directories in $TMPMNT" + cleanup 1 +@@ -499,4 +508,3 @@ + FINALTXT + + cleanup 0 +- diff --git a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 deleted file mode 100644 index 8b5986fae242..000000000000 --- a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -pidfile="/run/lvmlockd.pid" -command="/sbin/lvmlockd" -command_args="${LVMLOCKD_OPTS:--p ${pidfile}} ${LVMLOCKD_TYPE:--g sanlock}" -start_stop_daemon_args="--pidfile ${pidfile}" - -depend() { - before sanlock -} - -start_pre() -{ - checkpath --directory /run/lvm || return 1 -} diff --git a/sys-fs/lvm2/files/lvmlockd.initd-r2 b/sys-fs/lvm2/files/lvmlockd.initd-r2 new file mode 100644 index 000000000000..8b5986fae242 --- /dev/null +++ b/sys-fs/lvm2/files/lvmlockd.initd-r2 @@ -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/lvmlockd.pid" +command="/sbin/lvmlockd" +command_args="${LVMLOCKD_OPTS:--p ${pidfile}} ${LVMLOCKD_TYPE:--g sanlock}" +start_stop_daemon_args="--pidfile ${pidfile}" + +depend() { + before sanlock +} + +start_pre() +{ + checkpath --directory /run/lvm || return 1 +} diff --git a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 b/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 deleted file mode 100644 index 6b260109a668..000000000000 --- a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 +++ /dev/null @@ -1,17 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -pidfile="/run/lvmpolld.pid" -command="/sbin/lvmpolld" -command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}" -start_stop_daemon_args="--pidfile ${pidfile}" - -depend() { - : -} - -start_pre() -{ - checkpath --directory /run/lvm || return 1 -} diff --git a/sys-fs/lvm2/files/lvmpolld.initd-r1 b/sys-fs/lvm2/files/lvmpolld.initd-r1 new file mode 100644 index 000000000000..6b260109a668 --- /dev/null +++ b/sys-fs/lvm2/files/lvmpolld.initd-r1 @@ -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.03.20.ebuild b/sys-fs/lvm2/lvm2-2.03.20.ebuild index 84c67872e4f6..4ea94fc558fe 100644 --- a/sys-fs/lvm2/lvm2-2.03.20.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.20.ebuild @@ -56,14 +56,14 @@ BDEPEND=" PATCHES=( # Gentoo specific modification(s): - "${FILESDIR}"/${PN}-2.03.17-example.conf.in.patch + "${FILESDIR}"/${PN}-2.03.20-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.19-dmeventd-no-idle-exit.patch - "${FILESDIR}"/${PN}-2.03.19-freopen-musl.patch + "${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 ) pkg_setup() { @@ -95,7 +95,7 @@ src_prepare() { # Users without systemd get no auto-activation of any logical volume if ! use systemd ; then - eapply "${FILESDIR}"/${PN}-2.03.19-dm_lvm_rules_no_systemd.patch + eapply "${FILESDIR}"/${PN}-2.03.20-dm_lvm_rules_no_systemd.patch fi eautoreconf @@ -200,13 +200,13 @@ src_install() { ) 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 + newinitd "${FILESDIR}"/device-mapper.rc-r3 device-mapper + newconfd "${FILESDIR}"/device-mapper.conf-r4 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 + newinitd "${FILESDIR}"/dmeventd.initd-r3 dmeventd + newinitd "${FILESDIR}"/lvm.rc-r1 lvm + newconfd "${FILESDIR}"/lvm.confd-r4 lvm if ! use udev ; then # We keep the variable but remove udev from it. sed -r -i \ @@ -214,8 +214,8 @@ src_install() { "${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 + newinitd "${FILESDIR}"/lvm-monitoring.initd-r3 lvm-monitoring + newinitd "${FILESDIR}"/lvmpolld.initd-r1 lvmpolld if use lvm2create-initrd; then dosbin scripts/lvm2create_initrd/lvm2create_initrd @@ -224,7 +224,7 @@ src_install() { fi if use sanlock; then - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd + newinitd "${FILESDIR}"/lvmlockd.initd-r2 lvmlockd fi fi diff --git a/sys-fs/lvm2/lvm2-2.03.21.ebuild b/sys-fs/lvm2/lvm2-2.03.21.ebuild index 5d9eb0ac9398..12b85fc8045c 100644 --- a/sys-fs/lvm2/lvm2-2.03.21.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.21.ebuild @@ -56,14 +56,14 @@ BDEPEND=" PATCHES=( # Gentoo specific modification(s): - "${FILESDIR}"/${PN}-2.03.17-example.conf.in.patch + "${FILESDIR}"/${PN}-2.03.20-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.19-dmeventd-no-idle-exit.patch - "${FILESDIR}"/${PN}-2.03.19-freopen-musl.patch + "${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 ) pkg_setup() { @@ -95,7 +95,7 @@ src_prepare() { # Users without systemd get no auto-activation of any logical volume if ! use systemd ; then - eapply "${FILESDIR}"/${PN}-2.03.19-dm_lvm_rules_no_systemd.patch + eapply "${FILESDIR}"/${PN}-2.03.20-dm_lvm_rules_no_systemd.patch fi eautoreconf @@ -201,13 +201,13 @@ src_install() { ) 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 + newinitd "${FILESDIR}"/device-mapper.rc-r3 device-mapper + newconfd "${FILESDIR}"/device-mapper.conf-r4 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 + newinitd "${FILESDIR}"/dmeventd.initd-r3 dmeventd + newinitd "${FILESDIR}"/lvm.rc-r1 lvm + newconfd "${FILESDIR}"/lvm.confd-r4 lvm if ! use udev ; then # We keep the variable but remove udev from it. sed -r -i \ @@ -215,8 +215,8 @@ src_install() { "${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 + newinitd "${FILESDIR}"/lvm-monitoring.initd-r3 lvm-monitoring + newinitd "${FILESDIR}"/lvmpolld.initd-r1 lvmpolld if use lvm2create-initrd; then dosbin scripts/lvm2create_initrd/lvm2create_initrd @@ -225,7 +225,7 @@ src_install() { fi if use sanlock; then - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd + newinitd "${FILESDIR}"/lvmlockd.initd-r2 lvmlockd fi fi -- cgit v1.2.3-65-gdbad