diff options
Diffstat (limited to 'sys-fs/lvm2/files')
-rw-r--r-- | sys-fs/lvm2/files/lvm.rc-2.02.116-r4 | 132 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm.rc-2.02.166-r2 | 145 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch | 104 |
3 files changed, 0 insertions, 381 deletions
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 b/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 deleted file mode 100644 index 74b4a41b9ea0..000000000000 --- a/sys-fs/lvm2/files/lvm.rc-2.02.116-r4 +++ /dev/null @@ -1,132 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -_get_lvm_path() { - local lvm_path= - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - echo "${lvm_path}" -} - -_need_lvmetad() -{ - local lvm_path="$(_get_lvm_path)" - [ ! -x "${lvm_path}" ] && return 1 - ${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1' -} - -depend() { - before checkfs fsck - after modules device-mapper - # We may use lvmetad based on the configuration. If we added lvmetad - # support while lvm2 is running then we aren't dependent on it. For the - # more common case, if its disabled in the config we aren't dependent - # on it. - config /etc/lvm/lvm.conf - local _need= - if service_started; then - _need=$(service_get_value need) - else - if _need_lvmetad; then - _need="${_need} lvmetad" - fi - fi - need sysfs ${_need} -} - -config='global { locking_dir = "/run/lock/lvm" }' - -dm_in_proc() { - local retval=0 - for x in devices misc ; do - grep -qs 'device-mapper' /proc/${x} - retval=$((${retval} + $?)) - done - return ${retval} -} - -start() { - # LVM support for /usr, /home, /opt .... - # This should be done *before* checking local - # volumes, or they never get checked. - - # NOTE: Add needed modules for LVM or RAID, etc - # to /etc/modules.autoload if needed - lvm_path="$(_get_lvm_path)" - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - if [ ! -x "$lvm_path" ]; then - eerror "Cannot find lvm binary in /sbin or /bin!" - return 1 - fi - if [ -z "${CDBOOT}" ] ; then - if [ -e /proc/modules ] && ! dm_in_proc ; then - modprobe dm-mod 2>/dev/null - fi - if [ -d /proc/lvm ] || dm_in_proc ; then - ebegin "Setting up the Logical Volume Manager" - #still echo stderr for debugging - lvm_commands="#! ${lvm_path} --config '${config}'\n" - # Extra PV find pass because some devices might not have been available until very recently - lvm_commands="${lvm_commands}pvscan\n" - # Now make the nodes - lvm_commands="${lvm_commands}vgscan --mknodes\n" - # And turn them on! - lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" - # Order of this is important, have to work around dash and LVM readline - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null - eend $? "Failed to setup the LVM" - fi - fi -} - -start_post() -{ - # Save if we needed lvmetad - if _need_lvmetad; then - service_set_value need lvmetad - fi -} - -stop() { - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - if [ ! -x "$lvm_path" ]; then - eerror "Cannot find lvm binary in /sbin or /bin!" - return 1 - fi -# Stop LVM2 -if [ -x /sbin/vgs ] && \ - [ -x /sbin/vgchange ] && \ - [ -x /sbin/lvchange ] && \ - [ -f /etc/lvmtab -o -d /etc/lvm ] && \ - [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] -then - einfo "Shutting down the Logical Volume Manager" - - VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) - - if [ "$VGS" ] - then - ebegin " Shutting Down LVs & VGs" - #still echo stderr for debugging - lvm_commands="#! ${lvm_path} --config '${config}'\n" - # Extra PV find pass because some devices might not have been available until very recently - lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n" - # Now make the nodes - lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n" - # Order of this is important, have to work around dash and LVM readline - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null - eend $? "Failed (possibly some LVs still needed for /usr or root)" - fi - - einfo "Finished shutting down the Logical Volume Manager" - return 0 -fi -} - -# vim:ts=4 diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 deleted file mode 100644 index 11329bbeaf33..000000000000 --- a/sys-fs/lvm2/files/lvm.rc-2.02.166-r2 +++ /dev/null @@ -1,145 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -_get_lvm_path() { - local lvm_path= - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - echo "${lvm_path}" -} - -_need_lvmetad() -{ - local lvm_path="$(_get_lvm_path)" - [ ! -x "${lvm_path}" ] && return 1 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1' -} - -_need_lvmlockd() -{ - local lvm_path="$(_get_lvm_path)" - [ ! -x "${lvm_path}" ] && return 1 - ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' -} -depend() { - before checkfs fsck - after modules device-mapper - # We may use lvmetad based on the configuration. If we added lvmetad - # support while lvm2 is running then we aren't dependent on it. For the - # more common case, if its disabled in the config we aren't dependent - # on it. - config /etc/lvm/lvm.conf - local _need= - if service_started; then - _need=$(service_get_value need) - else - if _need_lvmetad; then - _need="${_need} lvmetad" - fi - if _need_lvmlockd; then - _need="${_need} lvmlockd" - fi - fi - need sysfs ${_need} -} - -config='global { locking_dir = "/run/lock/lvm" }' - -dm_in_proc() { - local retval=0 - for x in devices misc ; do - grep -qs 'device-mapper' /proc/${x} - retval=$((${retval} + $?)) - done - return ${retval} -} - -start() { - # LVM support for /usr, /home, /opt .... - # This should be done *before* checking local - # volumes, or they never get checked. - - # NOTE: Add needed modules for LVM or RAID, etc - # to /etc/modules.autoload if needed - lvm_path="$(_get_lvm_path)" - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - if [ ! -x "$lvm_path" ]; then - eerror "Cannot find lvm binary in /sbin or /bin!" - return 1 - fi - if [ -z "${CDBOOT}" ] ; then - if [ -e /proc/modules ] && ! dm_in_proc ; then - modprobe dm-mod 2>/dev/null - fi - if [ -d /proc/lvm ] || dm_in_proc ; then - ebegin "Setting up the Logical Volume Manager" - #still echo stderr for debugging - lvm_commands="#! ${lvm_path} --config '${config}'\n" - # Extra PV find pass because some devices might not have been available until very recently - lvm_commands="${lvm_commands}pvscan\n" - # Now make the nodes - lvm_commands="${lvm_commands}vgscan --mknodes\n" - # And turn them on! - lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n" - if _need_lvmlockd; then - # Start lockd VGs as required - lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n" - fi - # Order of this is important, have to work around dash and LVM readline - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null - eend $? "Failed to setup the LVM" - fi - fi -} - -start_post() -{ - # Save if we needed lvmetad - if _need_lvmetad; then - service_set_value need lvmetad - fi -} - -stop() { - for lvm_path in /bin/lvm /sbin/lvm ; do - [ -x "$lvm_path" ] && break - done - if [ ! -x "$lvm_path" ]; then - eerror "Cannot find lvm binary in /sbin or /bin!" - return 1 - fi -# Stop LVM2 -if [ -x /sbin/vgs ] && \ - [ -x /sbin/vgchange ] && \ - [ -x /sbin/lvchange ] && \ - [ -f /etc/lvmtab -o -d /etc/lvm ] && \ - [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] -then - einfo "Shutting down the Logical Volume Manager" - - VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) - - if [ "$VGS" ] - then - ebegin " Shutting Down LVs & VGs" - #still echo stderr for debugging - lvm_commands="#! ${lvm_path} --config '${config}'\n" - # Extra PV find pass because some devices might not have been available until very recently - lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n" - # Now make the nodes - lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n" - # Order of this is important, have to work around dash and LVM readline - printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null - eend $? "Failed (possibly some LVs still needed for /usr or root)" - fi - - einfo "Finished shutting down the Logical Volume Manager" - return 0 -fi -} - -# vim:ts=4 diff --git a/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch deleted file mode 100644 index e25cb760ea89..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.02.172-static-pkgconfig-libs.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/configure.in LVM2.2.02.172/configure.in ---- LVM2.2.02.172.orig/configure.in 2017-06-28 08:54:27.000000000 -0700 -+++ LVM2.2.02.172/configure.in 2017-07-09 14:58:11.933777531 -0700 -@@ -1324,6 +1324,7 @@ - PKG_CHECK_MODULES(BLKID, blkid >= 2.24, - [ BLKID_WIPING=yes - BLKID_PC="blkid" -+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC` - DEFAULT_USE_BLKID_WIPING=1 - AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.]) - ], [if test "$BLKID_WIPING" = maybe; then -@@ -1372,6 +1373,7 @@ - if test "$UDEV_SYNC" = yes; then - pkg_config_init - PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) -+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev` - AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) - - AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1, -@@ -1653,19 +1655,32 @@ - if test "$SELINUX" = yes; then - AC_CHECK_LIB([sepol], [sepol_check_context], [ - AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) -- SELINUX_LIBS="-lsepol"]) -+ SEPOL_LIBS="-lsepol"]) -+ -+ dnl -- init pkgconfig if required -+ if test x$PKGCONFIG_INIT != x1; then -+ pkg_config_init -+ fi -+ PKG_CHECK_MODULES(SELINUX, libselinux, [ -+ SELINUX_PC="libselinux" -+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux` -+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS" -+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) -+ ],[ -+ dnl -- old non-pkgconfig method, is buggy with static builds - - AC_CHECK_LIB([selinux], [is_selinux_enabled], [ - AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) - AC_CHECK_HEADERS([selinux/label.h]) - AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) -- SELINUX_LIBS="-lselinux $SELINUX_LIBS" -+ SELINUX_LIBS="-lselinux $SEPOL_LIBS" - SELINUX_PC="libselinux" - HAVE_SELINUX=yes ], [ - AC_MSG_WARN(Disabling selinux) - SELINUX_LIBS= - SELINUX_PC= - HAVE_SELINUX=no ]) -+ ]) - fi - - ################################################################################ -@@ -2011,6 +2026,7 @@ - ################################################################################ - AC_SUBST(APPLIB) - AC_SUBST(AWK) -+AC_SUBST(BLKID_STATIC_LIBS) - AC_SUBST(BLKID_PC) - AC_SUBST(BUILD_CMIRRORD) - AC_SUBST(BUILD_DMEVENTD) -@@ -2125,6 +2141,7 @@ - AC_SUBST(SALCK_CFLAGS) - AC_SUBST(SALCK_LIBS) - AC_SUBST(SELINUX_LIBS) -+AC_SUBST(SELINUX_STATIC_LIBS) - AC_SUBST(SELINUX_PC) - AC_SUBST(SNAPSHOTS) - AC_SUBST(STATICDIR) -@@ -2140,6 +2157,7 @@ - AC_SUBST(CACHE_DUMP_CMD) - AC_SUBST(CACHE_REPAIR_CMD) - AC_SUBST(CACHE_RESTORE_CMD) -+AC_SUBST(UDEV_STATIC_LIBS) - AC_SUBST(UDEV_PC) - AC_SUBST(UDEV_RULES) - AC_SUBST(UDEV_SYNC) -diff -Nuar --exclude '*.orig' --exclude '*.rej' LVM2.2.02.172.orig/make.tmpl.in LVM2.2.02.172/make.tmpl.in ---- LVM2.2.02.172.orig/make.tmpl.in 2017-06-28 08:54:28.000000000 -0700 -+++ LVM2.2.02.172/make.tmpl.in 2017-07-09 14:56:38.262933483 -0700 -@@ -53,7 +53,7 @@ - - LIBS = @LIBS@ - # Extra libraries always linked with static binaries --STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) -+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) - DEFS += @DEFS@ - # FIXME set this only where it's needed, not globally? - CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ -@@ -68,10 +68,13 @@ - PTHREAD_LIBS = @PTHREAD_LIBS@ - READLINE_LIBS = @READLINE_LIBS@ - SELINUX_LIBS = @SELINUX_LIBS@ -+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@ - UDEV_CFLAGS = @UDEV_CFLAGS@ - UDEV_LIBS = @UDEV_LIBS@ -+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@ - BLKID_CFLAGS = @BLKID_CFLAGS@ - BLKID_LIBS = @BLKID_LIBS@ -+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@ - VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ - TESTING = @TESTING@ - |