aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-31 01:31:42 +0100
committerSam James <sam@gentoo.org>2023-05-31 01:31:42 +0100
commit7dc13a152d23b3b2f885514f9c571dc8c6366535 (patch)
tree4adc5947019e796553ea051368cee5aa0a11fde1
parentsys-devel/gdb: treeclean (diff)
downloadmusl-7dc13a152d23b3b2f885514f9c571dc8c6366535.tar.gz
musl-7dc13a152d23b3b2f885514f9c571dc8c6366535.tar.bz2
musl-7dc13a152d23b3b2f885514f9c571dc8c6366535.zip
sys-fs/lvm2: treeclean
::gentoo works fine now. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-fs/lvm2/Manifest1
-rw-r--r--sys-fs/lvm2/files/clvmd.confd-2.02.399
-rw-r--r--sys-fs/lvm2/files/clvmd.rc-2.02.39145
-rw-r--r--sys-fs/lvm2/files/device-mapper.conf-1.02.22-r31
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2146
-rw-r--r--sys-fs/lvm2/files/dmeventd.initd-2.02.184-r221
-rw-r--r--sys-fs/lvm2/files/dmtab11
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r238
-rw-r--r--sys-fs/lvm2/files/lvm.confd-2.02.184-r39
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.187173
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch127
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch12
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch13
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch29
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch59
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch50
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch102
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch29
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch24
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.183-portability.patch21
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch72
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch68
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch13
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch34
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch72
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch42
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch18
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch11
-rw-r--r--sys-fs/lvm2/files/lvmetad.initd-2.02.116-r317
-rw-r--r--sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r117
-rw-r--r--sys-fs/lvm2/files/lvmpolld.initd-2.02.18317
-rw-r--r--sys-fs/lvm2/lvm2-2.02.188-r3.ebuild303
-rw-r--r--sys-fs/lvm2/metadata.xml26
34 files changed, 0 insertions, 1745 deletions
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
deleted file mode 100644
index 686afb06..00000000
--- a/sys-fs/lvm2/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca
diff --git a/sys-fs/lvm2/files/clvmd.confd-2.02.39 b/sys-fs/lvm2/files/clvmd.confd-2.02.39
deleted file mode 100644
index 57821709..00000000
--- a/sys-fs/lvm2/files/clvmd.confd-2.02.39
+++ /dev/null
@@ -1,9 +0,0 @@
-# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum.
-
-CLVMD_CLUSTER_TIMEOUT=30
-
-
-# CLVMD_NODES_TIMEOUT -- amount of time to wait for the other nodes to
-# join the cluster.
-
-CLVMD_NODES_TIMEOUT=60
diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
deleted file mode 100644
index efadd892..00000000
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
-
-[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30
-[ -n "$CLVMD_NODES_TIMEOUT" ] || CLVMD_NODES_TIMEOUT=60
-
-VGCHANGE="/sbin/vgchange"
-VGSCAN="/sbin/vgscan"
-VGDISPLAY="/sbin/vgdisplay"
-CLVMD_PIDFILE="/var/run/clvmd.pid"
-
-depend() {
- use net dns logger dmeventd
- want cman corosync openais
-}
-
-load_modules() {
- local module modules
- modules=$1
-
- for module in ${modules}; do
- ebegin "Loading ${module} kernel module"
- modprobe ${module}
- eend $? "Failed to load ${module} kernel module"
- done
-}
-
-unload_modules() {
- local module modules
- modules=$1
-
- for module in ${modules}; do
- ebegin "Unloading ${module} kernel module"
- modprobe -r ${module}
- eend $? "Failed to unload ${module} kernel module"
- done
-}
-
-umount_gfs_filesystems() {
- local sig retry
- local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
-
- if [ -n "${remaining}" ]
- then
- sig=
- retry=3
- while [ -n "${remaining}" -a "${retry}" -gt 0 ]
- do
- if [ "${retry}" -lt 3 ]
- then
- ebegin "Unmounting GFS filesystems (retry)"
- umount ${remaining} &>/dev/null
- eend $? "Failed to unmount GFS filesystems this retry"
- else
- ebegin "Unmounting GFS filesystems"
- umount ${remaining} &>/dev/null
- eend $? "Failed to unmount GFS filesystems"
- fi
- remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
- [ -z "${remaining}" ] && break
- /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
- sleep 5
- retry=$((${retry} -1))
- sig=-9
- done
- fi
-}
-
-
-start_volumes() {
- ebegin "Scanning LVM volumes"
- $VGSCAN > /dev/null 2>&1
- eend $?
-
- ret=$?
- if [ "$ret" -eq 5 ]
- then
- einfo " Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
- fi
-
- clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
- for vg in $clustervgs; do
- ebegin " Activating Clustered VG: ${vg} "
-
- wait=0
- while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
- if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
- sleep 3
- wait=$(($wait + 3))
- else
- eend 1
- fi
- done
- eend 0
- done
-}
-
-stop_volumes() {
- # Deactivate only clustered volumes
- clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
- for vg in $clustervgs; do
- ebegin " Shutting Down Clustered VG: ${vg} "
- $VGCHANGE -anl ${vg} >/dev/null
- eend $?
- done
-}
-
-
-start() {
- local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
-
- if [ -z "${module}" ]; then
- load_modules "dm-mod"
- sleep 1s
- fi
-
- ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
-
- start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
- eend $?
-
- start_volumes
-}
-
-stop() {
-
- # umount GFS filesystems
- umount_gfs_filesystems
-
- #stop_volumes
-
- ebegin "Stopping clvmd"
- #start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
- killall -TERM ${CLVMD_BIN} >/dev/null
- eend $?
-
- #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
-
- #if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
- # unload_modules "dm-mod"
- #fi
-}
diff --git a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3 b/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
deleted file mode 100644
index bc7a2515..00000000
--- a/sys-fs/lvm2/files/device-mapper.conf-1.02.22-r3
+++ /dev/null
@@ -1 +0,0 @@
-RC_AFTER="lvm"
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
deleted file mode 100644
index 7dbacce0..00000000
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
- # means dmeventd is NOT notified, as it cannot be safely running
- before dmeventd checkfs fsck
- after modules
-}
-
-dm_in_proc() {
- local retval=0
- for x in devices misc ; do
- grep -qs 'device-mapper' /proc/${x}
- retval=$((${retval} + $?))
- done
- return ${retval}
-}
-
-# char **build_dmsetup_command(volume)
-#
-# Returns complete dmsetup command given single volume name
-build_dmsetup_command() {
- local count dmsetup_cmd
-
- # Number of lines mentioning volume name
- count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1})
-
- # If there's just one line:
- if [ ${count} -eq 1 ] ; then
- echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}"
-
- # For all cases with more lines:
- elif [ ${count} -gt 1 ] ; then
- for c in $( seq 1 ${count} ) ; do
- if [ ${c} -eq 1 ] ; then
- # Heavy escaping in awk-statement because we cannot use apostrophes
- dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
- else
- # Append starting with newline
- dmsetup_cmd="${dmsetup_cmd}\\\\n \
- $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
- fi
- done
- echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}"
- fi
-
- return 0
-}
-
-# char **get_new_dm_volumes(void)
-#
-# Return unique volumes from /etc/dmtab
-get_new_dm_volumes() {
- local volume
-
- # Filter comments and blank lines
- grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- awk '{ print $1 }' | \
- uniq | \
- while read volume ; do
- # If it exists, skip it
- dmvolume_exists "${volume%:}" && continue
-
- echo "${volume%:}"
- done
-
- return 0
-}
-
-# int dmvolume_exists(volume)
-#
-# Return true if volume exists in DM table
-dmvolume_exists() {
- local x line volume=$1
-
- [ -z "${volume}" ] && return 1
-
- /sbin/dmsetup ls 2>/dev/null | \
- while read line ; do
- for x in ${line} ; do
- # the following conditonal return only breaks out
- # of the while loop, as it is running in a pipe.
- [ "${x}" = "${volume}" ] && return 1
- # We only want to check the volume name
- break
- done
- done
-
- # if 1 was returned from the above loop, then indicate that
- # volume exists
- [ $? = 1 ] && return 0
-
- # otherwise the loop exited normally and the volume does not
- # exist
- return 1
-}
-
-# int is_empty_dm_volume(volume)
-#
-# Return true if the volume exists in DM table, but is empty/non-valid
-is_empty_dm_volume() {
- local table volume=$1
-
- set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
- [ "${volume}" = "$1" -a -z "$2" ]
-}
-
-
-start() {
- if [ -e /proc/modules ] && ! dm_in_proc ; then
- modprobe dm-mod 2>/dev/null
- fi
- # Ensure the dirs exist for locking and running
- checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
-
- local x volume
-
- if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
- [ -n "$(get_new_dm_volumes)" ] && \
- einfo " Setting up device-mapper volumes:"
-
- get_new_dm_volumes | \
- while read x ; do
- [ -n "${x}" ] || continue
-
- volume="${x##* }"
-
- ebegin " Creating volume: ${volume}"
- if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then
- eend 1 " Error creating volume: ${volume}"
- # dmsetup still adds an empty volume in some cases,
- # so lets remove it
- is_empty_dm_volume "${volume}" && \
- /sbin/dmsetup remove "${volume}" 2>/dev/null
- else
- eend 0
- fi
- done
- fi
-}
-
diff --git a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2 b/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
deleted file mode 100644
index bc08c0a9..00000000
--- a/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-command=/sbin/dmeventd
-command_args_foreground='-f'
-extra_started_commands=reload
-pidfile=/run/dmeventd.pid
-# Control idle exit behavior of daemon
-export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1}
-
-depend() {
- # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
- # means dmeventd is NOT notified, as it cannot be safely running
- after lvm device-mapper
-}
-
-reload() {
- # TODO: this is not supported under supervisors
- ${command} -R
-}
diff --git a/sys-fs/lvm2/files/dmtab b/sys-fs/lvm2/files/dmtab
deleted file mode 100644
index 37a0d286..00000000
--- a/sys-fs/lvm2/files/dmtab
+++ /dev/null
@@ -1,11 +0,0 @@
-#/etc/dmraid: config file for adding device-mapper volumes at boot
-
-# Format: <volume name>: <table>
-# Example: isw0: 0 312602976 striped 2 128 /dev/sda 0 /dev/sdb 0
-#
-# Alternatively you can create all your volumes the first time, and just run:
-#
-# dmsetup table >> /etc/dmtab
-#
-# and verify that they are correct.
-
diff --git a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2 b/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
deleted file mode 100644
index d603718c..00000000
--- a/sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r2
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# This script is based on upstream file
-# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in
-
-depend() {
- # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
- # means dmeventd is NOT notified, as it cannot be safely running
- need lvm dmeventd
-}
-
-VGCHANGE=/sbin/vgchange
-VGS=/sbin/vgs
-
-start() {
- ret=0
- # TODO do we want to separate out already active groups only?
- VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
- ebegin "Starting LVM monitoring for VGs ${VGSLIST}:"
- $VGCHANGE --monitor y --poll y ${VGSLIST}
- ret=$?
- eend $ret
- return $ret
-
-}
-
-stop() {
- ret=0
- # TODO do we want to separate out already active groups only?
- VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`
- ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:"
- $VGCHANGE --monitor n ${VGSLIST}
- ret=$?
- eend $ret
- return $ret
-}
diff --git a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3 b/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
deleted file mode 100644
index b29e1702..00000000
--- a/sys-fs/lvm2/files/lvm.confd-2.02.184-r3
+++ /dev/null
@@ -1,9 +0,0 @@
-# If LVM is built with udev, you must ensure udev is running first!
-# Otherwise it will hang
-rc_need="udev"
-
-# LVM should normally only be started after mdraid is available
-# this is because LVM physical volumes are very often MD devices.
-rc_after="mdraid"
-
-# vim: ft=gentoo-conf-d
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.187 b/sys-fs/lvm2/files/lvm.rc-2.02.187
deleted file mode 100644
index 3468adc9..00000000
--- a/sys-fs/lvm2/files/lvm.rc-2.02.187
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-_get_lvm_path() {
- local lvm_path=
- for lvm_path in /bin/lvm /sbin/lvm ; do
- [ -x "${lvm_path}" ] && break
- done
- echo "${lvm_path}"
-}
-
-_use_lvmetad() {
- local lvm_path="$(_get_lvm_path)"
- [ ! -x "${lvm_path}" ] && return 1
- ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
-}
-
-_use_lvmlockd() {
- local lvm_path="$(_get_lvm_path)"
- [ ! -x "${lvm_path}" ] && return 1
- ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
-}
-
-depend() {
- before checkfs fsck
- after modules device-mapper
- # We may want lvmetad based on the configuration. If we added lvmetad
- # support while lvm2 is running then we aren't dependent on it. For the
- # more common case, if its disabled in the config we aren't dependent
- # on it.
- config /etc/lvm/lvm.conf
- local _want=
-
- if service_started ; then
- _want=$(service_get_value want)
- else
- if _use_lvmetad ; then
- _want="${_want} lvmetad"
- fi
-
- if _use_lvmlockd ; then
- _want="${_want} lvmlockd"
- fi
- fi
-
- # Make sure you review /etc/conf.d/lvm as well!
- # Depending on your system, it might also introduce udev & mdraid
- need sysfs
-
- if [ -n "${_want}" ] ; then
- want ${_want}
- fi
-}
-
-config='global { locking_dir = "/run/lock/lvm" }'
-
-dm_in_proc() {
- local retval=0
- for x in devices misc ; do
- grep -qs 'device-mapper' /proc/${x}
- retval=$((${retval} + $?))
- done
- return ${retval}
-}
-
-start() {
- # LVM support for /usr, /home, /opt ....
- # This should be done *before* checking local
- # volumes, or they never get checked.
-
- # NOTE: Add needed modules for LVM or RAID, etc
- # to /etc/modules.autoload if needed
-
- lvm_path="$(_get_lvm_path)"
- if [ -z "${lvm_path}" ] ; then
- eerror "Failed to find lvm binary in /bin or /sbin!"
- return 1
- fi
-
- if [ -z "${CDBOOT}" ] ; then
- if [ -e /proc/modules ] && ! dm_in_proc ; then
- ebegin "Trying to load dm-mod module"
- modprobe dm-mod 2>/dev/null
- eend $?
- fi
-
- if [ -d /proc/lvm ] || dm_in_proc ; then
- local has_errors=0 verbose_command
-
- yesno "${rc_verbose}" && verbose_command=" -v"
-
- ebegin "Starting the Logical Volume Manager"
-
- if _use_lvmetad ; then
- # Extra PV find pass because some devices might not have been available until very recently
- ${lvm_path} pvscan${verbose_command} --config "${config}" --cache
- [ $? -ne 0 ] && has_errors=1
- fi
-
- # Now make the nodes
- ${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes
- [ $? -ne 0 ] && has_errors=1
-
- # Enable all VGs
- ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y
- [ $? -ne 0 ] && has_errors=1
-
- if _use_lvmlockd ; then
- # Start lockd VGs as required
- ${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto
- [ $? -ne 0 ] && has_errors=1
- fi
-
- eend ${has_errors} "Failed to start the Logical Volume Manager"
- fi
- fi
-}
-
-start_post() {
- local _want=
- if _use_lvmetad ; then
- _want="${_want} lvmetad"
- fi
-
- if _use_lvmlockd ; then
- _want="${_want} lvmlockd"
- fi
-
- service_set_value want "${_want}"
-}
-
-stop() {
- lvm_path="$(_get_lvm_path)"
- if [ -z "${lvm_path}" ] ; then
- eerror "Failed to find lvm binary in /bin or /sbin!"
- return 1
- fi
-
- # Stop LVM2
- if [ -f /etc/lvmtab -o -d /etc/lvm ] \
- && [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ]
- then
- local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
- if [ -z "${VGS}" ] ; then
- # nothing to do for us
- return 0
- fi
-
- local has_errors=0 verbose_command eend_cmd="eend"
-
- yesno "${rc_verbose}" && verbose_command=" -v"
-
- local msg="Failed to stop Logical Volume Manager"
- if [ "${RC_RUNLEVEL}" = shutdown ] ; then
- # failures on shutdown are non-fatal
- eend_cmd="ewend"
- msg="${msg} (possibly some LVs still needed for /usr or root)"
- fi
-
- ebegin "Stopping the Logical Volume Manager"
-
- ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n
- [ $? -ne 0 ] && has_errors=1
-
- ${eend_cmd} ${has_errors} "${msg}"
- fi
-
- # at this point make sure we always exit without indicating an error
- return 0
-}
-
-# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch b/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
deleted file mode 100644
index f91dccd5..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.145-mkdev.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-https://bugs.gentoo.org/580062
-
-From 2a1d0fa8ea765604cd8274aac5aa7876f1c145c9 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 19 Apr 2016 23:53:22 -0400
-Subject: [PATCH] convert major/minor/makedev handling
-
-Most of the files in here use MAJOR/MINOR/MKDEV macros, but a few
-missed it. Update the defines in those files to match them.
----
- daemons/cmirrord/functions.c | 16 ++++++++++++----
- daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 12 ++++++++++--
- lib/filters/filter-sysfs.c | 6 ++++--
- 3 files changed, 26 insertions(+), 8 deletions(-)
-
-diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
-index e9d3c09..5b3cb38 100644
---- a/daemons/cmirrord/functions.c
-+++ b/daemons/cmirrord/functions.c
-@@ -20,6 +20,14 @@
- #include <time.h>
- #include <unistd.h>
-
-+#ifdef __linux__
-+# include "kdev_t.h"
-+#else
-+# define MAJOR(x) major((x))
-+# define MINOR(x) minor((x))
-+# define MKDEV(x,y) makedev((x),(y))
-+#endif
-+
- #define BYTE_SHIFT 3
-
- /*
-@@ -333,8 +341,8 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat
- continue;
- }
- if (S_ISBLK(statbuf.st_mode) &&
-- (major(statbuf.st_rdev) == major) &&
-- (minor(statbuf.st_rdev) == minor)) {
-+ (MAJOR(statbuf.st_rdev) == major) &&
-+ (MINOR(statbuf.st_rdev) == minor)) {
- LOG_DBG(" %s: YES", dep->d_name);
- if (closedir(dp))
- LOG_DBG("Unable to closedir /dev/mapper %s",
-@@ -1451,7 +1459,7 @@ static int disk_status_info(struct log_c *lc, struct dm_ulog_request *rq)
- }
-
- r = sprintf(data, "3 clustered-disk %d:%d %c",
-- major(statbuf.st_rdev), minor(statbuf.st_rdev),
-+ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
- (lc->log_dev_failed) ? 'D' : 'A');
- if (r < 0)
- return r;
-@@ -1514,7 +1522,7 @@ static int disk_status_table(struct log_c *lc, struct dm_ulog_request *rq)
- }
-
- r = sprintf(data, "clustered-disk %d:%d %u %s%s ",
-- major(statbuf.st_rdev), minor(statbuf.st_rdev),
-+ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
- lc->region_size,
- (lc->sync == DEFAULTSYNC) ? "" :
- (lc->sync == NOSYNC) ? "nosync " : "sync ",
-diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-index 7b060ed..4098203 100644
---- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
-@@ -20,6 +20,14 @@
- #include <stdarg.h>
- #include <pthread.h>
-
-+#ifdef __linux__
-+# include "kdev_t.h"
-+#else
-+# define MAJOR(x) major((x))
-+# define MINOR(x) minor((x))
-+# define MKDEV(x,y) makedev((x),(y))
-+#endif
-+
- /* First warning when snapshot is 80% full. */
- #define WARNING_THRESH (DM_PERCENT_1 * 80)
- /* Run a check every 5%. */
-@@ -148,8 +156,8 @@ static void _umount(const char *device, int major, int minor)
- continue; /* can't stat, skip this one */
-
- if (S_ISBLK(st.st_mode) &&
-- major(st.st_rdev) == major &&
-- minor(st.st_rdev) == minor) {
-+ MAJOR(st.st_rdev) == major &&
-+ MINOR(st.st_rdev) == minor) {
- log_error("Unmounting invalid snapshot %s from %s.", device, words[1]);
- if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL))
- log_error("Failed to umount snapshot %s from %s: %s.",
-diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c
-index 3115f86..5f76e8b 100644
---- a/lib/filters/filter-sysfs.c
-+++ b/lib/filters/filter-sysfs.c
-@@ -19,6 +19,8 @@
-
- #include <dirent.h>
-
-+#include "kdev_t.h"
-+
- static int _locate_sysfs_blocks(const char *sysfs_dir, char *path, size_t len,
- unsigned *sysfs_depth)
- {
-@@ -120,7 +122,7 @@ static struct dev_set *_dev_set_create(struct dm_pool *mem,
-
- static unsigned _hash_dev(dev_t dev)
- {
-- return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
-+ return (MAJOR(dev) ^ MINOR(dev)) & (SET_BUCKETS - 1);
- }
-
- /*
-@@ -171,7 +173,7 @@ static int _parse_dev(const char *file, FILE *fp, dev_t *result)
- return 0;
- }
-
-- *result = makedev(major, minor);
-+ *result = MKDEV(major, minor);
- return 1;
- }
-
---
-2.7.4
-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch b/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
deleted file mode 100644
index 0f830e42..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.166-HPPA-no-O_DIRECT.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/lib/device/dev-io.c
-+++ b/lib/device/dev-io.c
-@@ -505,7 +505,9 @@
- dev->flags |= DEV_NOT_O_NOATIME;
- if ((dev->fd = open(name, flags, 0777)) >= 0) {
- log_debug_devs("%s: Not using O_NOATIME", name);
-+#ifdef O_DIRECT_SUPPORT
- goto opened;
-+#endif
- }
- }
- #endif
diff --git a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
deleted file mode 100644
index 1cbf956d..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/make.tmpl.in b/make.tmpl.in
-index a40eaaa15..7eea943aa 100644
---- a/make.tmpl.in
-+++ b/make.tmpl.in
-@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
-
- LIBS = @LIBS@
- # Extra libraries always linked with static binaries
--STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
-+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
- DEFS += @DEFS@
- # FIXME set this only where it's needed, not globally?
- CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
diff --git a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch b/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
deleted file mode 100644
index c0265e81..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.176-pthread-pkgconfig.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- LVM2.2.02.176/libdm/libdevmapper.pc.in
-+++ LVM2.2.02.176/libdm/libdevmapper.pc.in
-@@ -9,4 +9,4 @@
- Cflags: -I${includedir}
- Libs: -L${libdir} -ldevmapper
- Requires.private: @SELINUX_PC@ @UDEV_PC@
--Libs.private: -lm @RT_LIBS@
-+Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@
---- LVM2.2.02.176/tools/Makefile.in
-+++ LVM2.2.02.176/tools/Makefile.in
-@@ -93,6 +93,7 @@
- INSTALL_LVM_TARGETS += install_tools_static
- INSTALL_DMSETUP_TARGETS += install_dmsetup_static
- INSTALL_CMDLIB_TARGETS += install_cmdlib_static
-+ STATIC_LIBS += @PTHREAD_LIBS@
- endif
-
- LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper
-@@ -118,6 +119,10 @@
-
- include $(top_builddir)/make.tmpl
-
-+ifeq ("@STATIC_LINK@", "yes")
-+ STATIC_LIBS += @PTHREAD_LIBS@
-+endif
-+
- device-mapper: $(TARGETS_DM)
-
- CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch b/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
deleted file mode 100644
index c831c6d6..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://bugs.gentoo.org/330255
-
-liblvm2app.so: undefined reference to `floor'
-
---- LVM2.2.02.178/liblvm/Makefile.in
-+++ LVM2.2.02.178/liblvm/Makefile.in
-@@ -43,7 +43,7 @@
- include $(top_builddir)/make.tmpl
-
- LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd
--LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
-+LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm
-
- .PHONY: install_dynamic install_static install_include install_pkgconfig
-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
deleted file mode 100644
index 0a0e7320..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-dynamic-static-ldflags.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- LVM2.2.02.178/configure.ac
-+++ LVM2.2.02.178/configure.ac
-@@ -33,6 +33,7 @@
- CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
- # equivalent to -rdynamic
- ELDFLAGS="-Wl,--export-dynamic"
-+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
- # FIXME Generate list and use --dynamic-list=.dlopen.sym
- CLDWHOLEARCHIVE="-Wl,-whole-archive"
- CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
-@@ -2042,6 +2043,7 @@
- AC_SUBST(SYSTEMD_LIBS)
- AC_SUBST(SNAPSHOTS)
- AC_SUBST(STATICDIR)
-+AC_SUBST(STATIC_LDFLAGS)
- AC_SUBST(STATIC_LINK)
- AC_SUBST(TESTSUITE_DATA)
- AC_SUBST(THIN)
---- LVM2.2.02.178/daemons/dmeventd/Makefile.in
-+++ LVM2.2.02.178/daemons/dmeventd/Makefile.in
-@@ -64,7 +64,7 @@
- -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS)
-
- dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
-- $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
- -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
-
- ifeq ("@PKGCONFIG@", "yes")
---- LVM2.2.02.178/make.tmpl.in
-+++ LVM2.2.02.178/make.tmpl.in
-@@ -64,6 +64,7 @@
- # FIXME set this only where it's needed, not globally?
- CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
- LDFLAGS ?= @LDFLAGS@
-+STATIC_LDFLAGS += @STATIC_LDFLAGS@
- CLDFLAGS += @CLDFLAGS@
- ELDFLAGS += @ELDFLAGS@
- LDDEPS += @LDDEPS@
---- LVM2.2.02.178/tools/Makefile.in
-+++ LVM2.2.02.178/tools/Makefile.in
-@@ -129,7 +129,7 @@
-
- dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
- @echo " [CC] $@"
-- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
-+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
- -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
-
- all: device-mapper
-@@ -159,7 +159,7 @@
-
- lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
- @echo " [CC] $@"
-- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
-+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
- $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
-
- liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch b/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
deleted file mode 100644
index 34c710d4..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-example.conf.in.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- LVM2.2.02.178/conf/example.conf.in
-+++ LVM2.2.02.178/conf/example.conf.in
-@@ -128,6 +128,9 @@
- # Example
- # Accept every block device:
- # filter = [ "a|.*/|" ]
-+ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
-+ # noise when you probed while not available.
-+ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
- # Reject the cdrom drive:
- # filter = [ "r|/dev/cdrom|" ]
- # Work with just loopback devices, e.g. for testing:
-@@ -704,7 +707,8 @@
- # Configuration option global/fallback_to_lvm1.
- # This setting is no longer used.
- # This configuration option has an automatic default value.
-- # fallback_to_lvm1 = 0
-+ # Gentoo: the LVM tools are a seperate package.
-+ fallback_to_lvm1 = 0
-
- # Configuration option global/format.
- # This setting is no longer used.
-@@ -1508,7 +1512,7 @@
-
- # Configuration section metadata.
- # This configuration section has an automatic default value.
--# metadata {
-+metadata {
-
- # Configuration option metadata/check_pv_device_sizes.
- # Check device sizes are not smaller than corresponding PV sizes.
-@@ -1553,7 +1557,8 @@
- #
- # This configuration option is advanced.
- # This configuration option has an automatic default value.
-- # pvmetadatacopies = 1
-+ # Gentoo: enable for data safety, but PV resize is then disabled.
-+ # pvmetadatacopies = 2
-
- # Configuration option metadata/vgmetadatacopies.
- # Number of copies of metadata to maintain for each VG.
-@@ -1608,7 +1613,7 @@
- #
- # This configuration option is advanced.
- # This configuration option does not have a default value defined.
--# }
-+}
-
- # Configuration section report.
- # LVM report command output formatting.
diff --git a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
deleted file mode 100644
index 989b3082..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.178-static-pkgconfig-libs.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- LVM2.2.02.178/configure.ac
-+++ LVM2.2.02.178/configure.ac
-@@ -1238,6 +1238,7 @@
- PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
- [ BLKID_WIPING=yes
- BLKID_PC="blkid"
-+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
- DEFAULT_USE_BLKID_WIPING=1
- AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
- ], [if test "$BLKID_WIPING" = maybe; then
-@@ -1286,6 +1287,7 @@
- if test "$UDEV_SYNC" = yes; then
- pkg_config_init
- PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
-+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
- AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
-
- AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
-@@ -1564,19 +1566,32 @@
- if test "$SELINUX" = yes; then
- AC_CHECK_LIB([sepol], [sepol_check_context], [
- AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
-- SELINUX_LIBS="-lsepol"])
-+ SEPOL_LIBS="-lsepol"])
-+
-+ dnl -- init pkgconfig if required
-+ if test x$PKGCONFIG_INIT != x1; then
-+ pkg_config_init
-+ fi
-+ PKG_CHECK_MODULES(SELINUX, libselinux, [
-+ SELINUX_PC="libselinux"
-+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
-+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
-+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
-+ ],[
-+ dnl -- old non-pkgconfig method, is buggy with static builds
-
- AC_CHECK_LIB([selinux], [is_selinux_enabled], [
- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
- AC_CHECK_HEADERS([selinux/label.h])
- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
-- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
-+ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
- SELINUX_PC="libselinux"
- HAVE_SELINUX=yes ], [
- AC_MSG_WARN(Disabling selinux)
- SELINUX_LIBS=
- SELINUX_PC=
- HAVE_SELINUX=no ])
-+ ])
- fi
-
- ################################################################################
-@@ -1927,6 +1942,7 @@
- ################################################################################
- AC_SUBST(APPLIB)
- AC_SUBST(AWK)
-+AC_SUBST(BLKID_STATIC_LIBS)
- AC_SUBST(BLKID_PC)
- AC_SUBST(BUILD_CMIRRORD)
- AC_SUBST(BUILD_DMEVENTD)
-@@ -2037,6 +2053,7 @@
- AC_SUBST(SALCK_LIBS)
- AC_SUBST(SBINDIR)
- AC_SUBST(SELINUX_LIBS)
-+AC_SUBST(SELINUX_STATIC_LIBS)
- AC_SUBST(SELINUX_PC)
- AC_SUBST(SYSCONFDIR)
- AC_SUBST(SYSTEMD_LIBS)
-@@ -2053,6 +2070,7 @@
- AC_SUBST(CACHE_DUMP_CMD)
- AC_SUBST(CACHE_REPAIR_CMD)
- AC_SUBST(CACHE_RESTORE_CMD)
-+AC_SUBST(UDEV_STATIC_LIBS)
- AC_SUBST(UDEV_PC)
- AC_SUBST(UDEV_RULES)
- AC_SUBST(UDEV_SYNC)
---- LVM2.2.02.178/make.tmpl.in
-+++ LVM2.2.02.178/make.tmpl.in
-@@ -59,7 +59,7 @@
-
- LIBS = @LIBS@
- # Extra libraries always linked with static binaries
--STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
-+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
- DEFS += @DEFS@
- # FIXME set this only where it's needed, not globally?
- CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
-@@ -75,10 +75,13 @@
- PTHREAD_LIBS = @PTHREAD_LIBS@
- READLINE_LIBS = @READLINE_LIBS@
- SELINUX_LIBS = @SELINUX_LIBS@
-+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
- UDEV_CFLAGS = @UDEV_CFLAGS@
- UDEV_LIBS = @UDEV_LIBS@
-+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
- BLKID_CFLAGS = @BLKID_CFLAGS@
- BLKID_LIBS = @BLKID_LIBS@
-+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
- SYSTEMD_LIBS = @SYSTEMD_LIBS@
- VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch b/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
deleted file mode 100644
index 8564d082..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-fix-stdio-usage.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/tools/lvmcmdline.c
-+++ b/tools/lvmcmdline.c
-@@ -3110,7 +3110,7 @@ static int _check_standard_fds(void)
- int err = is_valid_fd(STDERR_FILENO);
-
- if (!is_valid_fd(STDIN_FILENO) &&
-- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
-+ !freopen(_PATH_DEVNULL, "r", stdin)) {
- if (err)
- perror("stdin stream open");
- else
-@@ -3120,7 +3120,7 @@ static int _check_standard_fds(void)
- }
-
- if (!is_valid_fd(STDOUT_FILENO) &&
-- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
-+ !freopen(_PATH_DEVNULL, "r", stdout)) {
- if (err)
- perror("stdout stream open");
- /* else no stdout */
-@@ -3128,7 +3128,7 @@ static int _check_standard_fds(void)
- }
-
- if (!is_valid_fd(STDERR_FILENO) &&
-- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
-+ !freopen(_PATH_DEVNULL, "w", stderr)) {
- printf("stderr stream open: %s\n",
- strerror(errno));
- return 0;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
deleted file mode 100644
index 6034be36..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/lib/log/log.c b/lib/log/log.c
-index 79fbd7a..0999d10 100644
---- a/lib/log/log.c
-+++ b/lib/log/log.c
-@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
- * Close and reopen standard stream on file descriptor fd.
- */
- int reopen_standard_stream(FILE **stream, const char *mode)
-+#ifdef __GLIBC__
- {
- int fd, fd_copy, new_fd;
- const char *name;
-@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
- *stream = new_stream;
- return 1;
- }
-+#else
-+{
-+ return (freopen(NULL, mode, *stream) != NULL);
-+}
-+#endif
-
- void init_log_fn(lvm2_log_fn_t log_fn)
- {
diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch b/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
deleted file mode 100644
index ecdcb1ce..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.183-portability.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/lib/mm/memlock.c
-+++ b/lib/mm/memlock.c
-@@ -159,7 +159,7 @@ static void _touch_memory(void *mem, siz
-
- static void _allocate_memory(void)
- {
--#ifndef VALGRIND_POOL
-+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
- void *stack_mem;
- struct rlimit limit;
- int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
---- a/libdaemon/server/daemon-server.c
-+++ b/libdaemon/server/daemon-server.c
-@@ -18,6 +18,7 @@
- #include "daemon-server.h"
- #include "daemon-log.h"
-
-+#include <fcntl.h>
- #include <dlfcn.h>
- #include <errno.h>
- #include <pthread.h>
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch b/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
deleted file mode 100644
index 34968c7c..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From a397b69ce33d811aba7d64d54b5c8e0efb86fd15 Mon Sep 17 00:00:00 2001
-From: Zdenek Kabelac <zkabelac@redhat.com>
-Date: Fri, 10 May 2019 14:40:11 +0200
-Subject: [PATCH] metadata: allow reading metadata with invalid creation_time
-
-lvm2 till version 2.02.169 (commit 78d004efa8a1809cea68283e6204edfa9d7c1091)
-was printing invalid creation_time argument into metadata on 32bit arch.
-
-However with commit ba9820b14223b731125c83dbc9709aa44fdcdbf1 we started
-to properly validate all input numbers and thus we refused to accept
-invalid metadata with 'garbage' string - but this results in the
-situation where metadata produced on older lvm2 on 32 bit architecture
-will become unreadable after upgrade.
-
-To fix this case - extend libdm parser in a way, that whenever we
-find error integer value, we also check if the parsed value is not for
-creation_time node and in this case we let the metadata pass through
-with made-up date 2018-05-24 (release date of 2.02.169).
----
- libdm/libdm-config.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c
-index 3f0d2510e..382f86bbf 100644
---- a/libdm/libdm-config.c
-+++ b/libdm/libdm-config.c
-@@ -51,6 +51,8 @@ struct parser {
-
- struct dm_pool *mem;
- int no_dup_node_check; /* whether to disable dup node checking */
-+ const char *key; /* last obtained key */
-+ unsigned ignored_creation_time;
- };
-
- struct config_output {
-@@ -176,7 +178,7 @@ static int _do_dm_config_parse(struct dm_config_tree *cft, const char *start, co
- /* TODO? if (start == end) return 1; */
-
- struct parser *p;
-- if (!(p = dm_pool_alloc(cft->mem, sizeof(*p))))
-+ if (!(p = dm_pool_zalloc(cft->mem, sizeof(*p))))
- return_0;
-
- p->mem = cft->mem;
-@@ -615,6 +617,7 @@ static struct dm_config_node *_section(struct parser *p, struct dm_config_node *
- match(TOK_SECTION_E);
- } else {
- match(TOK_EQ);
-+ p->key = root->key;
- if (!(value = _value(p)))
- return_NULL;
- if (root->v)
-@@ -682,8 +685,17 @@ static struct dm_config_value *_type(struct parser *p)
- errno = 0;
- v->v.i = strtoll(p->tb, NULL, 0); /* FIXME: check error */
- if (errno) {
-- log_error("Failed to read int token.");
-- return NULL;
-+ if (errno == ERANGE && p->key &&
-+ strcmp("creation_time", p->key) == 0) {
-+ /* Due to a bug in some older 32bit builds (<2.02.169),
-+ * lvm was able to produce invalid creation_time string */
-+ v->v.i = 1527120000; /* Pick 2018-05-24 day instead */
-+ if (!p->ignored_creation_time++)
-+ log_warn("WARNING: Invalid creation_time found in metadata (repaired with next metadata update).");
-+ } else {
-+ log_error("Failed to read int token.");
-+ return NULL;
-+ }
- }
- match(TOK_INT);
- break;
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch b/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
deleted file mode 100644
index c80bd2ba..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-dmeventd-no-idle-exit.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From: "Robin H. Johnson" <robbat2@gentoo.org>
-Date: Wed, 17 Apr 2019 06:54:27 +0000
-Subject: [PATCH] dmeventd configurable idle exit time
-
-dmeventd nominally exits after 1 hour of idle time. There are use cases for
-this, esp. with socket activation, but also cases where users don't expect
-dmeventd to exit.
-
-Provide a tuning knob via environment variable, DMEVENTD_IDLE_EXIT_TIMEOUT,
-that can be -1 to not exit, or a configurable time for different idle exit.
-
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-Fixes: https://bugs.gentoo.org/682556
-
-diff -Nuar LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.184/daemons/dmeventd/dmeventd.c
---- LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c 2019-03-22 03:14:59.000000000 -0700
-+++ LVM2.2.02.184/daemons/dmeventd/dmeventd.c 2019-04-17 00:18:23.535029906 -0700
-@@ -2158,6 +2158,18 @@
- .server_path = DM_EVENT_FIFO_SERVER
- };
- time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
-+
-+ /* Provide a basic way to config the idle timeout */
-+ char* idle_exit_timeout_env = getenv("DMEVENTD_IDLE_EXIT_TIMEOUT") ? : NULL;
-+ if(NULL != idle_exit_timeout_env) {
-+ char* endptr;
-+ idle_exit_timeout = strtol(idle_exit_timeout_env, &endptr, 10);
-+ if (errno == ERANGE || *endptr != '\0') {
-+ fprintf(stderr, "DMEVENTD_IDLE_EXIT_TIMEOUT: bad time input\n");
-+ exit(EXIT_FAILURE);
-+ }
-+ }
-+
- opterr = 0;
- optind = 0;
-
-@@ -2253,7 +2265,7 @@
- _process_initial_registrations();
-
- for (;;) {
-- if (_idle_since) {
-+ if (_idle_since || _exit_now) {
- if (_exit_now) {
- if (_exit_now == DM_SCHEDULED_EXIT)
- break; /* Only prints shutdown message */
-@@ -2262,7 +2274,7 @@
- (long) (time(NULL) - _idle_since));
- break;
- }
-- if (idle_exit_timeout) {
-+ if (idle_exit_timeout && idle_exit_timeout > 0) {
- now = time(NULL);
- if (now < _idle_since)
- _idle_since = now; /* clock change? */
-diff -Nuar LVM2.2.02.184.orig/man/dmeventd.8_main LVM2.2.02.184/man/dmeventd.8_main
---- LVM2.2.02.184.orig/man/dmeventd.8_main 2019-03-22 03:15:00.000000000 -0700
-+++ LVM2.2.02.184/man/dmeventd.8_main 2019-04-17 00:17:46.076023638 -0700
-@@ -143,6 +143,10 @@
- Variable is set by thin plugin to prohibit recursive interation
- with dmeventd by any executed lvm2 command from
- a thin_command environment.
-+.TP
-+.B DMEVENTD_IDLE_EXIT_TIMEOUT
-+Configure the dmeventd idle exit timeout behavior, value in seconds. Default
-+is 3600 (1 hour). -1 means do not exit.
- .
- .SH SEE ALSO
- .
diff --git a/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch b/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
deleted file mode 100644
index 49c6853f..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/686652
-
---- LVM2.2.02.184/tools/Makefile.in
-+++ LVM2.2.02.184/tools/Makefile.in
-@@ -220,6 +220,6 @@
- echo "/* Do not edit. This file is generated by the Makefile. */" && \
- echo -en "const char _command_input[] =\n\n\"" && \
- $(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
-- echo "\\n\";" \
-+ printf "%s\n" "\\n\";" \
- ) > $@
-
- $(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h
diff --git a/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch b/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
deleted file mode 100644
index f895e192..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.186-udev_remove_unsupported_option.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001
-From: Peter Rajnoha <prajnoha@redhat.com>
-Date: Tue, 13 Aug 2019 15:18:30 +0200
-Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
-
-The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
-that is ~5 years ago.
-
-Since systemd/udev version 243, there's a new message printed if unsupported
-OPTIONS value is used:
-
- Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
-
-Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
----
- udev/11-dm-lvm.rules.in | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
-index 91cb991df9..7c589943b7 100644
---- a/udev/11-dm-lvm.rules.in
-+++ b/udev/11-dm-lvm.rules.in
-@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
-
- ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
-
--OPTIONS+="event_timeout=180"
--
- # Do not create symlinks for inappropriate subdevices.
- ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
- ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
---
-2.24.0
-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch b/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
deleted file mode 100644
index 59aaa9b3..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000
-+++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000
-@@ -54,7 +54,9 @@
- DEVRAM=/tmp/initrd.$$
-
- # set defaults
--BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"}
-+LVM=`which lvm.static`
-+LVM=${LVM:-"`which lvm`"}
-+BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
- BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
- BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
- MAKEDEV=${MAKEDEV:-"debian"}
-@@ -119,6 +121,10 @@
- echo "$PRE Mounting /proc"
- mount -t proc none /proc
-
-+# We need /sys for lvm
-+echo "$PRE Mounting /sys"
-+mount -t sysfs sysfs /sys
-+
- # plug in modules listed in /etc/modules
- if [ -f /etc/modules ]; then
- echo -n "$PRE plugging in kernel modules:"
-@@ -179,26 +185,29 @@
- # run a shell if we're passed lvm2rescue on commandline
- grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
- if [ $? -eq 0 ]; then
-- lvm vgchange --ignorelockingfailure -P -a y
-+ $LVM vgchange --ignorelockingfailure -P -a y
- do_shell
- else
-- lvm vgchange --ignorelockingfailure -a y
-+ $LVM vgchange --ignorelockingfailure -a y
- fi
-
- echo "$PRE Mounting root filesystem $rootvol ro"
- mkdir /rootvol
- if ! mount -t auto -o ro $rootvol /rootvol; then
-- echo "\t*FAILED*";
-+ echo "\t*FAILED TRYING TO MOUNT ROOTVOL*";
- do_shell
- fi
-
- echo "$PRE Umounting /proc"
- umount /proc
-
-+echo "$PRE Umounting /sys"
-+umount /sys
-+
- echo "$PRE Changing roots"
- cd /rootvol
- if ! pivot_root . initrd ; then
-- echo "\t*FAILED*"
-+ echo "\t*FAILED PIVOT TO NEW ROOT*"
- do_shell
- fi
-
-@@ -356,7 +365,7 @@
- fi
-
- verbose "creating basic set of directories in $TMPMNT"
--(cd $TMPMNT; mkdir bin dev etc lib proc sbin var)
-+(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var)
- if [ $? -ne 0 ]; then
- echo "$cmd -- ERROR creating directories in $TMPMNT"
- cleanup 1
-@@ -499,4 +508,3 @@
- FINALTXT
-
- cleanup 0
--
diff --git a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch b/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
deleted file mode 100644
index 5ddcb4e5..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in
---- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700
-+++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700
-@@ -28,11 +28,12 @@
- INSTALL_LIB_TARGETS = install_lib_dynamic
-
- LIB_NAME = libdevmapper-event
-+LIB_STATIC = $(LIB_NAME).a
-+INSTALL_LIB_TARGETS += install_lib_static
-+TARGETS += $(LIB_STATIC)
- ifeq ("@STATIC_LINK@", "yes")
-- LIB_STATIC = $(LIB_NAME).a
-- TARGETS += $(LIB_STATIC) dmeventd.static
-+ TARGETS += dmeventd.static
- INSTALL_DMEVENTD_TARGETS += install_dmeventd_static
-- INSTALL_LIB_TARGETS += install_lib_static
- endif
-
- LIB_VERSION = $(LIB_VERSION_DM)
-diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in
---- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700
-+++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700
-@@ -34,8 +34,8 @@
-
- INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
-
--ifeq ("@STATIC_LINK@", "yes")
- LIB_STATIC = $(interface)/libdevmapper.a
-+ifeq ("@STATIC_LINK@", "yes")
- endif
-
- LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
-@@ -63,8 +63,8 @@
-
- INSTALL_TYPE = install_dynamic
-
--ifeq ("@STATIC_LINK@", "yes")
- INSTALL_TYPE += install_static
-+ifeq ("@STATIC_LINK@", "yes")
- endif
-
- ifeq ("@PKGCONFIG@", "yes")
diff --git a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch b/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
deleted file mode 100644
index 7f0bfb89..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331
-X-Gentoo-Bug: 301331
-
-diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd
---- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000
-+++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000
-@@ -469,9 +469,9 @@
- rmdir $TMPMNT/lost+found
-
- echo "$cmd -- ummounting ram disk"
--umount $DEVRAM
-+umount $TMPMNT
- if [ $? -ne 0 ]; then
-- echo "$cmd -- ERROR umounting $DEVRAM"
-+ echo "$cmd -- ERROR umounting $TMPMNT"
- cleanup 1
- fi
-
diff --git a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch b/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
deleted file mode 100644
index fe7ec879..00000000
--- a/sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- LVM2/make.tmpl.in
-+++ LVM2/make.tmpl.in
-@@ -395,7 +395,7 @@
- ( cat $(srcdir)/.exported_symbols; \
- if test x$(EXPORTED_HEADER) != x; then \
- $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \
-- $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
-+ LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \
- fi \
- ) > $@
-
diff --git a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3 b/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
deleted file mode 100644
index 2efce422..00000000
--- a/sys-fs/lvm2/files/lvmetad.initd-2.02.116-r3
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmetad.pid"
-command="/sbin/lvmetad"
-command_args="${LVMETAD_OPTS:=-p ${pidfile}}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
- :
-}
-
-start_pre()
-{
- checkpath --directory /run/lvm || return 1
-}
diff --git a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1 b/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
deleted file mode 100644
index 16e2cc3f..00000000
--- a/sys-fs/lvm2/files/lvmlockd.initd-2.02.166-r1
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmlockd.pid"
-command="/sbin/lvmlockd"
-command_args="${LVMLOCKD_OPTS:--p ${pidfile}} ${LVMLOCKD_TYPE:--g sanlock}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
- before sanlock
-}
-
-start_pre()
-{
- checkpath --directory /run/lvm || return 1
-}
diff --git a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183 b/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
deleted file mode 100644
index 6b260109..00000000
--- a/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/run/lvmpolld.pid"
-command="/sbin/lvmpolld"
-command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}"
-start_stop_daemon_args="--pidfile ${pidfile}"
-
-depend() {
- :
-}
-
-start_pre()
-{
- checkpath --directory /run/lvm || return 1
-}
diff --git a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild b/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild
deleted file mode 100644
index 493fc838..00000000
--- a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild
+++ /dev/null
@@ -1,303 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-TMPFILES_OPTIONAL=1
-inherit autotools linux-info systemd toolchain-funcs tmpfiles udev flag-o-matic
-
-DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
-HOMEPAGE="https://sourceware.org/lvm2/"
-SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
- ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86"
-IUSE="readline static static-libs systemd lvm2create-initrd sanlock selinux +udev +thin device-mapper-only"
-REQUIRED_USE="device-mapper-only? ( !lvm2create-initrd !sanlock !thin )
- static? ( !systemd !udev )
- static-libs? ( !udev )
- systemd? ( udev )"
-
-DEPEND_COMMON="
- dev-libs/libaio[static-libs?]
- static? ( dev-libs/libaio[static-libs] )
- !static? ( dev-libs/libaio[static-libs?] )
- readline? ( sys-libs/readline:0= )
- sanlock? ( sys-cluster/sanlock )
- systemd? ( >=sys-apps/systemd-205:0= )
- udev? ( >=virtual/libudev-208:= )"
-# /run is now required for locking during early boot. /var cannot be assumed to
-# be available -- thus, pull in recent enough baselayout for /run.
-# This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
- >=sys-apps/baselayout-2.2
- >=sys-apps/util-linux-2.16
- lvm2create-initrd? ( sys-apps/makedev )
- !device-mapper-only? ( virtual/tmpfiles )
- thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-DEPEND="${DEPEND_COMMON}
- static? (
- selinux? ( sys-libs/libselinux[static-libs] )
- >=sys-apps/util-linux-2.16[static-libs]
- )"
-BDEPEND="
- sys-devel/autoconf-archive
- virtual/pkgconfig
-"
-
-S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
-
-PATCHES=(
- # Gentoo specific modification(s):
- "${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
-
- # For upstream -- review and forward:
- "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
- "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
- "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
- "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
- "${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
- "${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
- "${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
- "${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
- "${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
- "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
- #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
- "${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
- #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream
- "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
- "${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
-
- # Musl fixes
- "${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
- "${FILESDIR}"/${PN}-2.02.183-portability.patch
- "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch
-)
-
-pkg_setup() {
- local CONFIG_CHECK="~SYSVIPC"
-
- if use udev; then
- local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
- if linux_config_exists; then
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
- if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then
- ewarn "It's recommended to set an empty value to the following kernel config option:"
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
- fi
- fi
- fi
-
- check_extra_config
-
- # 1. Genkernel no longer copies /sbin/lvm blindly.
- if use static; then
- elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
- elog "their static versions. If you need the static binaries,"
- elog "you must append .static to the filename!"
- fi
-}
-
-src_prepare() {
- default
-
- sed -i \
- -e "1iAR = $(tc-getAR)" \
- -e "s:CC ?= @CC@:CC = $(tc-getCC):" \
- make.tmpl.in || die #444082
-
- sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
-
- if use udev && ! use device-mapper-only; then
- sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
- elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
- elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
- elog "if it was previously disabled."
- fi
-
- sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
-
- # Don't install thin man page when not requested
- if ! use thin ; then
- sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- filter-flags -flto
- local myeconfargs=()
-
- # Most of this package does weird stuff.
- # The build options are tristate, and --without is NOT supported
- # options: 'none', 'internal', 'shared'
- myeconfargs+=(
- $(use_enable !device-mapper-only dmfilemapd)
- $(use_enable !device-mapper-only dmeventd)
- $(use_enable !device-mapper-only cmdlib)
- $(use_enable !device-mapper-only applib)
- $(use_enable !device-mapper-only fsadm)
- $(use_enable !device-mapper-only lvmetad)
- $(use_enable !device-mapper-only lvmpolld)
- $(usex device-mapper-only --disable-udev-systemd-background-jobs '')
-
- # This only causes the .static versions to become available
- $(usex static --enable-static_link '')
-
- # dmeventd requires mirrors to be internal, and snapshot available
- # so we cannot disable them
- --with-mirrors="$(usex device-mapper-only none internal)"
- --with-snapshots="$(usex device-mapper-only none internal)"
-
- # disable O_DIRECT support on hppa, breaks pv detection (#99532)
- $(usex hppa --disable-o_direct '')
- )
-
- if use thin; then
- myeconfargs+=( --with-thin=internal --with-cache=internal )
- local texec
- for texec in check dump repair restore; do
- myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
- myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
- done
- else
- myeconfargs+=( --with-thin=none --with-cache=none )
- fi
-
- myeconfargs+=( --with-clvmd=none --with-cluster=none )
-
- myeconfargs+=(
- $(use_enable readline)
- $(use_enable selinux)
- --enable-pkgconfig
- --with-confdir="${EPREFIX}"/etc
- --exec-prefix="${EPREFIX}"
- --sbindir="${EPREFIX}/sbin"
- --with-staticdir="${EPREFIX}"/sbin
- --libdir="${EPREFIX}/$(get_libdir)"
- --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
- --with-default-dm-run-dir=/run
- --with-default-run-dir=/run/lvm
- --with-default-locking-dir=/run/lock/lvm
- --with-default-pid-dir=/run
- $(use_enable udev udev_rules)
- $(use_enable udev udev_sync)
- $(use_with udev udevdir "$(get_udevdir)"/rules.d)
- $(use_enable sanlock lvmlockd-sanlock)
- $(use_enable systemd udev-systemd-background-jobs)
- $(use_enable systemd notify-dbus)
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- CLDFLAGS="${LDFLAGS}"
- )
- # Hard-wire this to bash as some shells (dash) don't know
- # "-o pipefail" #682404
- CONFIG_SHELL="/bin/bash" \
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- pushd include >/dev/null
- emake V=1
- popd >/dev/null
-
- if use device-mapper-only ; then
- emake V=1 device-mapper
- else
- emake V=1
- emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
- fi
-}
-
-src_install() {
- local inst
- local INSTALL_TARGETS=( install install_tmpfiles_configuration )
- # install systemd related files only when requested, bug #522430
- use systemd && INSTALL_TARGETS+=( SYSTEMD_GENERATOR_DIR="$(systemd_get_systemgeneratordir)" install_systemd_units install_systemd_generators )
- use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
- emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}"
-
- newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
- newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
-
- if use !device-mapper-only ; then
- newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
- newinitd "${FILESDIR}"/lvm.rc-2.02.187 lvm
- newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
- if ! use udev ; then
- # We keep the variable but remove udev from it.
- sed -r -i \
- -e '/^rc_need=/s/\<udev\>//g' \
- "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
- fi
-
- newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
- newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
- newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
- fi
-
- if use sanlock; then
- newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
- fi
-
- if use static-libs; then
- dolib.a libdm/ioctl/libdevmapper.a
- if use !device-mapper-only; then
- # depends on lvmetad
- dolib.a libdaemon/client/libdaemonclient.a #462908
- # depends on dmeventd
- dolib.a daemons/dmeventd/libdevmapper-event.a
- fi
- else
- rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
- fi
-
- if use lvm2create-initrd; then
- dosbin scripts/lvm2create_initrd/lvm2create_initrd
- doman scripts/lvm2create_initrd/lvm2create_initrd.8
- newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
- fi
-
- insinto /etc
- doins "${FILESDIR}"/dmtab
-
- dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
-}
-
-pkg_postinst() {
- if ! use device-mapper-only; then
- tmpfiles_process lvm2.conf
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]]; then
- # This is a new installation
- ewarn "Make sure the \"lvm\" init script is in the runlevels:"
- ewarn "# rc-update add lvm boot"
- ewarn
- ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
- ewarn "to enable lvm autoactivation and metadata caching."
- fi
-
- if use udev && [[ -d /run ]] ; then
- local permission_run_expected="drwxr-xr-x"
- local permission_run=$(stat -c "%A" /run)
- if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then
- ewarn "Found the following problematic permissions:"
- ewarn ""
- ewarn " ${permission_run} /run"
- ewarn ""
- ewarn "Expected:"
- ewarn ""
- ewarn " ${permission_run_expected} /run"
- ewarn ""
- ewarn "This is known to be causing problems for UDEV-enabled LVM services."
- fi
- fi
-}
-
-src_test() {
- einfo "Tests are disabled because of device-node mucking, if you want to"
- einfo "run tests, compile the package and see ${S}/tests"
-}
diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
deleted file mode 100644
index e264bd79..00000000
--- a/sys-fs/lvm2/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
- <maintainer type="person">
- <email>robbat2@gentoo.org</email>
- <name>Robin H. Johnson</name>
- </maintainer>
- <maintainer type="person" proxied="yes">
- <email>agk@redhat.com</email>
- <name>Alasdair Kergon</name>
- <description>Upstream Maintainer (please CC on bugs)</description>
- </maintainer>
- <use>
- <flag name="lvm2create-initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
- <flag name="thin">Support for thin volumes</flag>
- <flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
- <flag name="sanlock">Enable lvmlockd with support for sanlock</flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id>
- </upstream>
-</pkgmetadata>