diff options
Diffstat (limited to 'system/lvm2-lockd/lvm2-lockd.SlackBuild')
-rw-r--r-- | system/lvm2-lockd/lvm2-lockd.SlackBuild | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/system/lvm2-lockd/lvm2-lockd.SlackBuild b/system/lvm2-lockd/lvm2-lockd.SlackBuild index 143390df28..56027864ea 100644 --- a/system/lvm2-lockd/lvm2-lockd.SlackBuild +++ b/system/lvm2-lockd/lvm2-lockd.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for lvm2-lockd @@ -22,10 +22,17 @@ # 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 VERSION=${VERSION:-2.02.154} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} SRCNAM=LVM2 @@ -37,7 +44,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -67,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} \ @@ -95,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 @@ -103,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 @@ -119,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 @@ -138,4 +152,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |