diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-24 12:31:34 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-25 22:58:03 +0700 |
commit | 439c720542828410ee64c722ff091295319f0fa0 (patch) | |
tree | debf1b4a3aea66f84ce1de40b76ed85fe5a43b0c /system/lvm2-lockd/lvm2-lockd.SlackBuild | |
parent | d52079f9eaa3eb6eb770acd286118c6ce66532c5 (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/lvm2-lockd/lvm2-lockd.SlackBuild')
-rw-r--r-- | system/lvm2-lockd/lvm2-lockd.SlackBuild | 44 |
1 files changed, 24 insertions, 20 deletions
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 |