summaryrefslogtreecommitdiff
path: root/source/a/udisks2
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-10-28 20:19:37 +0000
committerEric Hameleers <alien@slackware.com>2020-10-29 08:59:45 +0100
commit037917abe789c55171028a20ce56284921260d2a (patch)
tree8460773d2753bd9e953d37f5e59e54d1fa0b2e4d /source/a/udisks2
parentaa7512c31f7b3672d1605cf788d8e481b507949e (diff)
downloadcurrent-037917abe789c55171028a20ce56284921260d2a.tar.gz
Wed Oct 28 20:19:37 UTC 202020201028201937
a/libblockdev-2.24-x86_64-1.txz: Added. This is required by the new version of udisks2. a/libbytesize-2.4-x86_64-1.txz: Added. This is required by the new version of udisks2. a/ndctl-70.1-x86_64-1.txz: Added. This is required by libblockdev, which in turn is required by the new version of udisks2. a/udisks2-2.9.1-x86_64-1.txz: Upgraded. Thanks to Robby Workman for this update and the deps for it. a/volume_key-0.3.12-x86_64-1.txz: Added. This is required by the new version of udisks2. ap/qpdf-10.0.2-x86_64-1.txz: Upgraded. n/openvpn-2.5.0-x86_64-1.txz: Upgraded. n/php-7.4.12-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/udisks2')
-rw-r--r--source/a/udisks2/doinst.sh16
-rwxr-xr-xsource/a/udisks2/udisks2.SlackBuild125
-rw-r--r--source/a/udisks2/udisks2.url1
3 files changed, 76 insertions, 66 deletions
diff --git a/source/a/udisks2/doinst.sh b/source/a/udisks2/doinst.sh
index c186599a..bec03519 100644
--- a/source/a/udisks2/doinst.sh
+++ b/source/a/udisks2/doinst.sh
@@ -1,3 +1,18 @@
+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...
+}
+
+config etc/udisks2/udisks2.conf.new
+
# udisks2 is stupid about testing files before using them. If /etc/crypttab
# does not exist, it will fill the log with "errors" as it tries to open the
# nonexistent file. There's really no reason that a system without encrypted
@@ -9,4 +24,3 @@ if [ ! -r etc/crypttab ]; then
# echo "HEY, EVERYONE SHOULD HAVE A CRYPTTAB!!!" (just kidding)
touch etc/crypttab
fi
-
diff --git a/source/a/udisks2/udisks2.SlackBuild b/source/a/udisks2/udisks2.SlackBuild
index 78e61e73..8886f015 100755
--- a/source/a/udisks2/udisks2.SlackBuild
+++ b/source/a/udisks2/udisks2.SlackBuild
@@ -1,8 +1,7 @@
#!/bin/bash
-# Slackware build script for udisks
-
-# Copyright 2010, 2011 Robby Workman, Northport, Alabama, USA
+# Copyright 2010, 2011, 2018 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,7 +10,7 @@
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -22,27 +21,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
-
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=udisks2
SRCNAM=udisks
-VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
-
-NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i586 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
@@ -53,95 +47,96 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
+NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
-case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
-esac
-
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
+
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z || exit 1
cd $SRCNAM-$VERSION || exit 1
+
chown -R root:root .
find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \+ -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \+
-
-# Temporarily omit LVM2 support since it uses a removed API. We'll upgrade
-# udisks2 soon (and add newly required deps) to handle this, but since it
-# was broken after the LVM2 upgrade recently and nobody noticed yet it's
-# probably OK for it to be like this for a little while.
-if [ "$VERSION" = "2.6.5" ]; then
- LVM2_SUPPORT="--disable-lvm2"
-else
- LVM2_SUPPORT="--enable-lvm2"
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Configure, build, and install:
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
fi
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
+# --enable-zram (removed since it appears to require systemd... but perhaps there's a way around that)
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --disable-static \
- --mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
- $LVM2_SUPPORT \
- --build=$TARGET || exit 1
-
+ --mandir=/usr/man \
+ --disable-static \
+ --enable-lvm2 \
+ --enable-btrfs \
+ --enable-bcache \
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
# Don't ship .la files:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- for manpagedir in $(find . -type d -name "man*") ; do
- ( cd $manpagedir
- for eachpage in $( find . -type l -maxdepth 1) ; do
- ln -s $( readlink $eachpage ).gz $eachpage.gz
- rm $eachpage
- done
- gzip -9 *.?
- )
- done
- )
-fi
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Don't overwrite config file, but leave mount_options.conf.example alone
+mv $PKG/etc/udisks2/udisks2.conf $PKG/etc/udisks2/udisks2.conf.new
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+# Compress manual pages:
+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
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS COPYING* HACKING INSTALL NEWS README* \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ AUTHORS* ChangeLog CHANGES COPYING* HACKING* LICENSE* NEWS* README* THANKS* TODO* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+if [ -d $PKG/usr/share/gtk-doc/html/$PKGNAM ]; then
+ ln -s /usr/share/gtk-doc/html/$PKGNAM $PKG/usr/doc/$PKGNAM-$VERSION/html
+fi
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
diff --git a/source/a/udisks2/udisks2.url b/source/a/udisks2/udisks2.url
new file mode 100644
index 00000000..e2d993ee
--- /dev/null
+++ b/source/a/udisks2/udisks2.url
@@ -0,0 +1 @@
+https://github.com/storaged-project/udisks/releases