summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2023-08-29 09:20:34 +0200
committer Willy Sudiarto Raharjo2023-09-02 13:02:30 +0200
commit79675726a53ca8caa5aa2253a34de943ca6f6ef1 (patch)
tree71b79addf3787f6571b6e58ce99cbb372db1d418
parentebf9a08e0b0ea9e091ce5692faf575eeef443940 (diff)
downloadslackbuilds-79675726a53ca8caa5aa2253a34de943ca6f6ef1.tar.gz
system/mount-zip: Updated for version 1.0.9, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/mount-zip/README5
-rw-r--r--system/mount-zip/mount-zip.SlackBuild50
-rw-r--r--system/mount-zip/mount-zip.info10
-rw-r--r--system/mount-zip/slack-desc8
-rw-r--r--system/mount-zip/slackware-15.0-libzip.diff21
5 files changed, 64 insertions, 30 deletions
diff --git a/system/mount-zip/README b/system/mount-zip/README
index bf84380c12..0977216aca 100644
--- a/system/mount-zip/README
+++ b/system/mount-zip/README
@@ -1,7 +1,8 @@
-mount-zip is a tool allowing to open, explore and extract ZIP
-archives.
+mount-zip (FUSE file system for zip archives)
+
mount-zip mounts a ZIP archive as a read-only FUSE file system, which
can then be explored and read by any application.
+
mount-zip aspires to be an excellent ZIP mounter. It starts quickly,
uses little memory, decodes encrypted files, and provides on-the-go
decompression and caching for maximum efficiency.
diff --git a/system/mount-zip/mount-zip.SlackBuild b/system/mount-zip/mount-zip.SlackBuild
index e082e8484c..c09d8c68fe 100644
--- a/system/mount-zip/mount-zip.SlackBuild
+++ b/system/mount-zip/mount-zip.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for mount-zip
# Copyright 2022 Charadon
+# Copyright 2023 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230828 bkw: take over maintenance, update for v1.0.9.
+# - actually use SLKCFLAGS.
+# - add CONTRIBUTING.md to the doc dir.
+# - add patch to allow v1.0.9 to build on Slackware 15.0.
+# - trim down README and slack-desc a bit.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mount-zip
-VERSION=${VERSION:-1.0.7}
+VERSION=${VERSION:-1.0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -49,16 +56,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -70,25 +73,34 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make
-install -Dm755 mount-zip $PKG/usr/bin/mount-zip
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+# 20230829 bkw: Stop mount-zip from requiring a version of libzip
+# greater than 1.8.0. Long explanation:
+# mount-zip calls zip_file_is_seekable() to decide whether it should
+# bother to cache the zip file it's working with. This call was added
+# to libzip in its version 1.9.0, and Slackware 15.0 only has 1.8.0.
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+# It turns out, zip_file_is_seekable() only returns true for zip
+# files that are not compressed (and not encrypted). This means that
+# "stored" zip files are the only ones that don't get cached. This
+# patch causes all zip files to get cached. It won't have much impact
+# because non-compressed zip files are pretty rare anyway.
-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
+# This patch should go away when Slackware 15.1 get released.
+
+patch -p1 < $CWD/slackware-15.0-libzip.diff
+
+# 20230829 bkw: actually use SLKCFLAGS.
+sed -i "/^CXXFLAGS/s,-O2,$SLKCFLAGS," Makefile lib/Makefile
+make
+install -s -Dm755 mount-zip $PKG/usr/bin/mount-zip
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE changelog README.md $PKG/usr/doc/$PRGNAM-$VERSION
+rm -f INSTALL.md
+cp -a LICENSE changelog *.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/system/mount-zip/mount-zip.info b/system/mount-zip/mount-zip.info
index f9ef8af860..2fa6f83900 100644
--- a/system/mount-zip/mount-zip.info
+++ b/system/mount-zip/mount-zip.info
@@ -1,10 +1,10 @@
PRGNAM="mount-zip"
-VERSION="1.0.7"
+VERSION="1.0.9"
HOMEPAGE="https://github.com/google/mount-zip"
-DOWNLOAD="https://github.com/google/mount-zip/archive/v1.0.7/mount-zip-1.0.7.tar.gz"
-MD5SUM="38b59f61fd30c524a660502659d1b3e8"
+DOWNLOAD="https://github.com/google/mount-zip/archive/v1.0.9/mount-zip-1.0.9.tar.gz"
+MD5SUM="e6fec7d09427d46d0233f33a5da48246"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Charadon"
-EMAIL="dev@iotib.net"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/mount-zip/slack-desc b/system/mount-zip/slack-desc
index c47c430a79..99285a79e6 100644
--- a/system/mount-zip/slack-desc
+++ b/system/mount-zip/slack-desc
@@ -6,10 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-mount-zip: mount-zip (FUSE file system for ZIP archives)
-mount-zip:
-mount-zip: mount-zip is a tool allowing to open, explore and extract ZIP
-mount-zip: archives.
+mount-zip: mount-zip (FUSE file system for zip archives)
mount-zip:
mount-zip: mount-zip mounts a ZIP archive as a read-only FUSE file system, which
mount-zip: can then be explored and read by any application.
@@ -17,3 +14,6 @@ mount-zip:
mount-zip: mount-zip aspires to be an excellent ZIP mounter. It starts quickly,
mount-zip: uses little memory, decodes encrypted files, and provides on-the-go
mount-zip: decompression and caching for maximum efficiency.
+mount-zip:
+mount-zip:
+mount-zip:
diff --git a/system/mount-zip/slackware-15.0-libzip.diff b/system/mount-zip/slackware-15.0-libzip.diff
new file mode 100644
index 0000000000..f3cc7c34b7
--- /dev/null
+++ b/system/mount-zip/slackware-15.0-libzip.diff
@@ -0,0 +1,21 @@
+diff -Naur mount-zip-1.0.9/lib/data_node.cc mount-zip-1.0.9.patched/lib/data_node.cc
+--- mount-zip-1.0.9/lib/data_node.cc 2023-08-17 01:41:40.000000000 -0400
++++ mount-zip-1.0.9.patched/lib/data_node.cc 2023-08-29 02:59:18.342998941 -0400
+@@ -269,7 +269,7 @@
+ ZipFile file = Reader::Open(zip, id);
+ assert(file);
+
+- const bool seekable = zip_file_is_seekable(file.get()) > 0;
++ const bool seekable = false;
+ if (seekable) {
+ Log(LOG_DEBUG, "No need to cache ", file_node, ": File is seekable");
+ return false;
+@@ -293,7 +293,7 @@
+ ZipFile file = Reader::Open(zip, id);
+ assert(file);
+
+- const bool seekable = zip_file_is_seekable(file.get()) > 0;
++ const bool seekable = false;
+ Reader::Ptr reader(seekable ? new UnbufferedReader(std::move(file), id, size)
+ : new BufferedReader(zip, std::move(file), id,
+ size, &cached_reader));