summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author B. Watson2022-02-24 19:05:09 +0100
committer Willy Sudiarto Raharjo2022-02-25 16:58:03 +0100
commit336e3c7ee4663e6b89425b6cdce317950d24a68d (patch)
tree93e8ae69d050e8b1e8fb5ca50fecbf0e82c5ade6 /system
parent439c720542828410ee64c722ff091295319f0fa0 (diff)
downloadslackbuilds-336e3c7ee4663e6b89425b6cdce317950d24a68d.tar.gz
system/lvm2-cluster: 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-cluster/lvm2-cluster.SlackBuild27
1 files changed, 12 insertions, 15 deletions
diff --git a/system/lvm2-cluster/lvm2-cluster.SlackBuild b/system/lvm2-cluster/lvm2-cluster.SlackBuild
index 7534beac32..5037ddf107 100644
--- a/system/lvm2-cluster/lvm2-cluster.SlackBuild
+++ b/system/lvm2-cluster/lvm2-cluster.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-cluster
@@ -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,18 @@ 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
CFLAGS="$SLKCFLAGS" \
./configure \
--disable-readline \
--enable-cmdlib \
- --enable-dmeventd \
+ --disable-dmeventd \
--enable-applib \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-usrlibdir=/usr/lib${LIBDIRSUFFIX} \
@@ -105,7 +108,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 \
--with-clvmd \
--with-cluster=shared \
--build=$ARCH-slackware-linux
@@ -113,8 +115,9 @@ CFLAGS="$SLKCFLAGS" \
make daemons man
# Some assembly required
-install -D -m0755 -oroot -groot daemons/clvmd/clvmd $PKG/usr/sbin/clvmd
-install -D -m0644 -oroot -groot man/clvmd.8 $PKG/usr/man/man8/clvmd.8
+mkdir -p $PKG/usr/{sbin,man/man8}
+install -s -m0755 -oroot -groot daemons/clvmd/clvmd $PKG/usr/sbin/clvmd
+gzip -9c < man/clvmd.8 > $PKG/usr/man/man8/clvmd.8.gz
install -D -m0755 -oroot -groot scripts/clvmd_init_red_hat $PKG/etc/rc.d/rc.clvmd.new
sed -e "s|/etc/sysconfig|/etc/default|g" -i $PKG/etc/rc.d/rc.clvmd.new
@@ -124,12 +127,6 @@ install -D -m0755 -oroot -groot lib/locking/liblvm2clusterlock.so.${VERSION%.*}
ln -s liblvm2clusterlock.so.${VERSION%.*} \
$PKG/usr/lib${LIBDIRSUFFIX}/lvm2/liblvm2clusterlock.so
-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