aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-24 12:31:34 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-25 22:58:03 +0700
commit439c720542828410ee64c722ff091295319f0fa0 (patch)
treedebf1b4a3aea66f84ce1de40b76ed85fe5a43b0c /system
parentd52079f9eaa3eb6eb770acd286118c6ce66532c5 (diff)
system/lvm2-lockd: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/lvm2-lockd/README19
-rw-r--r--system/lvm2-lockd/doinst.sh3
-rw-r--r--system/lvm2-lockd/lvm2-lockd.SlackBuild44
3 files changed, 34 insertions, 32 deletions
diff --git a/system/lvm2-lockd/README b/system/lvm2-lockd/README
index 6b49d6c7a893e..9a04831ba3cf2 100644
--- a/system/lvm2-lockd/README
+++ b/system/lvm2-lockd/README
@@ -1,21 +1,22 @@
-Logical Volume Management (LVM) commands use lvmlockd to coordinate access
-to shared storage.
+Logical Volume Management (LVM) commands use lvmlockd to coordinate
+access to shared storage.
NOTE: lvm2 package that comes with Slackware includes lvmlockd
-support. However, since neither sanlock or dlm were present at build time,
-empty functions were compiled in. In order for lvm commands (such as lvmcreate,
-etc) to discover and leverage lvmlockd support, stock lvm binary has to
-be replaced:
+support. However, since neither sanlock or dlm were present at build
+time, empty functions were compiled in. In order for lvm commands
+(such as lvmcreate, etc) to discover and leverage lvmlockd support,
+stock lvm binary has to be replaced:
CLOBBER_STOCK_BINARY=yes ./lvm2-lockd.SlackBuild
-The original binary can be restored by reinstalling the stock lvm2 package.
+The original binary can be restored by reinstalling the stock lvm2
+package.
By default, lock type is set to sanlock, dlm can be selected with:
LOCK_TYPE=dlm ./lvm2-lockd.SlackBuild
-This will change package dependancy from sanlock to dlm (also found here
-on SlackBuilds.org).
+This will change package dependency from sanlock to dlm (also found
+here on SlackBuilds.org).
More information post-install can be found in README.SLACKWARE
diff --git a/system/lvm2-lockd/doinst.sh b/system/lvm2-lockd/doinst.sh
index 2133933ddefb0..9be93b50caebb 100644
--- a/system/lvm2-lockd/doinst.sh
+++ b/system/lvm2-lockd/doinst.sh
@@ -1,14 +1,11 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
rm $NEW
fi
- # Otherwise, we leave the .new copy for the admin to consider...
}
preserve_perms() {
diff --git a/system/lvm2-lockd/lvm2-lockd.SlackBuild b/system/lvm2-lockd/lvm2-lockd.SlackBuild
index df0cb1c7b125a..56027864eac3e 100644
--- a/system/lvm2-lockd/lvm2-lockd.SlackBuild
+++ b/system/lvm2-lockd/lvm2-lockd.SlackBuild
@@ -22,6 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+# This should probably be updated to match the version of lvm2 in
+# Slackware 15.0, but I leave that up to the maintainer to decide.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lvm2-lockd
@@ -40,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -77,16 +78,20 @@ cd $SRCNAM.$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+sed -i '1i#include <sys/sysmacros.h>' lib/filters/filter-sysfs.c
# Copied from lvm2.SlackBuild
+# 20220224 bkw: and modified a bit, dmeventd wouldn't compile and we
+# don't need it in this build, so disable it.
CFLAGS="$SLKCFLAGS" \
./configure \
--disable-readline \
--enable-cmdlib \
- --enable-dmeventd \
+ --disable-dmeventd \
--enable-applib \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-usrlibdir=/usr/lib${LIBDIRSUFFIX} \
@@ -105,7 +110,6 @@ CFLAGS="$SLKCFLAGS" \
--with-default-dm-run-dir=/run/lvm \
--with-clvmd-pidfile=/run/lvm/clvmd.pid \
--with-cmirrord-pidfile=/run/lvm/cmirrord.pid \
- --with-dmeventd-pidfile=/run/lvm/dmeventd.pid \
--enable-use-lvmlockd \
--enable-lockd-${LOCK_TYPE:-sanlock} \
--build=$ARCH-slackware-linux
@@ -113,12 +117,18 @@ CFLAGS="$SLKCFLAGS" \
make daemons man tools
# Some assembly required
-install -D -m0755 -oroot -groot daemons/lvmlockd/lvmlockd $PKG/usr/sbin/lvmlockd
-install -D -m0755 -oroot -groot daemons/lvmlockd/lvmlockctl $PKG/usr/sbin/lvmlockctl
-install -D -m0755 -oroot -groot daemons/lvmetad/lvmetad $PKG/usr/sbin/lvmetad
-install -D -m0644 -oroot -groot man/lvmlockd.8 $PKG/usr/man/man8/lvmlockd.8
-install -D -m0644 -oroot -groot man/lvmlockctl.8 $PKG/usr/man/man8/lvmlockctl.8
-install -D -m0644 -oroot -groot man/lvmetad.8 $PKG/usr/man/man8/lvmetad.8
+mkdir -p $PKG/usr/{sbin,man/man8}
+install -s -m0755 -oroot -groot \
+ daemons/lvmlockd/lvmlock{d,ctl} \
+ daemons/lvmetad/lvmetad \
+ $PKG/usr/sbin/
+
+install -m0644 -oroot -groot \
+ man/lvmlock{d,ctl}.8 \
+ man/lvmetad.8 \
+ $PKG/usr/man/man8/
+
+gzip -9 $PKG/usr/man/man*/*
install -D -m0755 -oroot -groot scripts/lvm2_lvmetad_init_red_hat $PKG/etc/rc.d/rc.lvmetad.new
@@ -129,15 +139,9 @@ sed -e "s|metadata|locking|g" \
-i $PKG/etc/rc.d/rc.lvmlockd.new
if [ "${CLOBBER_STOCK_BINARY:-no}" = "yes" ]; then
- install -D -m0755 -oroot -groot tools/lvm $PKG/sbin/lvm
+ install -s -D -m0755 -oroot -groot tools/lvm $PKG/sbin/lvm
fi
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild