summaryrefslogtreecommitdiffstats
path: root/source/a/file
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/file')
-rw-r--r--source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch33
-rwxr-xr-xsource/a/file/file.SlackBuild10
2 files changed, 40 insertions, 3 deletions
diff --git a/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch b/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch
new file mode 100644
index 000000000..c71d2f817
--- /dev/null
+++ b/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch
@@ -0,0 +1,33 @@
+From 94ab14414606b794b7ccf60595493cd8715e195b Mon Sep 17 00:00:00 2001
+From: ProgAndy <code@progandy.de>
+Date: Fri, 2 Apr 2021 14:33:18 +0200
+Subject: [PATCH] Fix mime type XZ after "Add checksum for XZ"
+
+---
+ magic/Magdir/compress | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/magic/Magdir/compress b/magic/Magdir/compress
+index 64d11a73..aef4bb49 100644
+--- a/magic/Magdir/compress
++++ b/magic/Magdir/compress
+@@ -265,14 +265,13 @@
+
+ # http://tukaani.org/xz/xz-file-format.txt
+ 0 ustring \xFD7zXZ\x00 XZ compressed data, checksum
++!:strength * 2
++!:mime application/x-xz
+ >7 byte&0xf 0x0 NONE
+ >7 byte&0xf 0x1 CRC32
+ >7 byte&0xf 0x4 CRC64
+ >7 byte&0xf 0xa SHA-256
+
+-!:strength * 2
+-!:mime application/x-xz
+-
+ # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
+ 0 string LRZI LRZIP compressed data
+ >4 byte x - version %d
+--
+2.31.1
+
diff --git a/source/a/file/file.SlackBuild b/source/a/file/file.SlackBuild
index e70f55a1f..1a5e65011 100755
--- a/source/a/file/file.SlackBuild
+++ b/source/a/file/file.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=file
VERSION=${VERSION:-$(echo file-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -78,8 +78,6 @@ find . \
# Make the default data directory /etc/file like it has always been:
zcat $CWD/file.etc.file.diff.gz | patch -p1 --verbose || exit 1
-# This is needed after the patch above:
-autoreconf -vif || exit 1
# Since we're going to include the compiled magic database now (otherwise
# there seem to be libmagic related crashes), this patch probably doesn't
@@ -109,6 +107,12 @@ zcat $CWD/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch.gz | patch
zcat $CWD/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch.gz | patch -p1 --verbose || exit 1
+# Fix detection of XZ compressed data:
+zcat $CWD/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch.gz | patch -p1 --verbose || exit 1
+
+# This is needed after the default data directory patch above:
+autoreconf -vif || exit 1
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \