4 Commits f9a6037a2d ... 6d2e45a13e

Author SHA1 Message Date
  Christoph Biedl 6d2e45a13e file 1:5.47-4 3 weeks ago
  Christoph Biedl 87e55cf166 Disable over-eagerly MSOOXML detection. Closes: #1138991 3 weeks ago
  Christoph Biedl ec40c19e2c Cherry-pick two commits to detect some compression 3 weeks ago
  Christoph Biedl 6f632b25d1 Packaging cleanup: Update patch metadata 3 weeks ago

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+file (1:5.47-4) unstable; urgency=medium
+
+  * Cherry-pick two commits to detect some compression
+  * Disable over-eagerly MSOOXML detection. Closes: #1138991
+
+ -- Christoph Biedl <debian.axhn@manchmal.in-ulm.de>  Sat, 06 Jun 2026 17:53:39 +0200
+
 file (1:5.47-3) unstable; urgency=low
 file (1:5.47-3) unstable; urgency=low
 
 
   * Finally upload 5.47 to unstable
   * Finally upload 5.47 to unstable

+ 26 - 0
debian/patches/cherry-pick/FILE5_47-17-g50fc7a6b.pr-166-flanglet-add-kanzi-magic.patch

@@ -0,0 +1,26 @@
+Subject: PR/166: flanglet: Add Kanzi magic
+Origin: upstream, commit FILE5_47-17-g50fc7a6b <https://github.com/file/file/commit/FILE5_47-17-g50fc7a6b>
+Author: Christos Zoulas <christos@zoulas.com>
+Date: Sun Apr 12 21:14:24 2026 +0000
+Forwarded: not-needed
+
+--- a/magic/Magdir/compress
++++ b/magic/Magdir/compress
+@@ -465,3 +465,17 @@
+ # https://github.com/xamarin/xamarin-android/pull/4686
+ 0	string	XALZ	Xamarin LZ4-compressed assembly
+ >8	ulelong	x	\b, uncompressed size %u
++
++#------------------------------------------------------------------------------
++# Kanzi:  Kanzi compressed data
++# From: Frederic Langlet <flanglet@gmail.com>
++# https://github.com/flanglet/kanzi-cpp/wiki/Bitstream-Format
++0       belong      0x4B414E5A  kanzi compressed data
++!:mime  application/x-knz
++!:ext   knz
++>4  byte/16     x       \b, version %u
++
++# Branch for Version > 5 (Uses Bits 3 and 2 for checksum)
++>4      byte/16         >5
++>>4     byte&0x0C       0x04            \b, 32-bit checksum
++>>4     byte&0x0C       0x08            \b, 64-bit checksum

+ 1 - 0
debian/patches/cherry-pick/FILE5_47-18-gc5460571.pr-725-inliniac-revert-previous-and-always-set-offset.patch

@@ -2,6 +2,7 @@ Subject: PR/725: inliniac: Revert previous and always set offset.
 Origin: upstream, commit FILE5_47-18-gc5460571 <https://github.com/file/file/commit/FILE5_47-18-gc5460571>
 Origin: upstream, commit FILE5_47-18-gc5460571 <https://github.com/file/file/commit/FILE5_47-18-gc5460571>
 Author: Christos Zoulas <christos@zoulas.com>
 Author: Christos Zoulas <christos@zoulas.com>
 Date: Sun Apr 12 22:15:14 2026 +0000
 Date: Sun Apr 12 22:15:14 2026 +0000
+Forwarded: not-needed
 
 
 --- a/src/softmagic.c
 --- a/src/softmagic.c
 +++ b/src/softmagic.c
 +++ b/src/softmagic.c

+ 1 - 0
debian/patches/cherry-pick/FILE5_47-57-g797a2755.add-le-be-guid.patch

@@ -2,6 +2,7 @@ Subject: Add LE/BE GUID
 Origin: upstream, commit FILE5_47-57-g797a2755 <https://github.com/file/file/commit/FILE5_47-57-g797a2755>
 Origin: upstream, commit FILE5_47-57-g797a2755 <https://github.com/file/file/commit/FILE5_47-57-g797a2755>
 Author: Christos Zoulas <christos@zoulas.com>
 Author: Christos Zoulas <christos@zoulas.com>
 Date: Sun Apr 19 19:56:49 2026 +0000
 Date: Sun Apr 19 19:56:49 2026 +0000
+Forwarded: not-needed
 
 
 --- a/doc/magic.man
 --- a/doc/magic.man
 +++ b/doc/magic.man
 +++ b/doc/magic.man

+ 1 - 0
debian/patches/cherry-pick/FILE5_47-62-g2866af2e.fix-typo.patch

@@ -2,6 +2,7 @@ Subject: Fix typo
 Origin: upstream, commit FILE5_47-62-g2866af2e <https://github.com/file/file/commit/FILE5_47-62-g2866af2e>
 Origin: upstream, commit FILE5_47-62-g2866af2e <https://github.com/file/file/commit/FILE5_47-62-g2866af2e>
 Author: Christos Zoulas <christos@zoulas.com>
 Author: Christos Zoulas <christos@zoulas.com>
 Date: Sun Apr 19 20:19:20 2026 +0000
 Date: Sun Apr 19 20:19:20 2026 +0000
+Forwarded: not-needed
 
 
 --- a/src/swap.h
 --- a/src/swap.h
 +++ b/src/swap.h
 +++ b/src/swap.h

+ 24 - 0
debian/patches/cherry-pick/FILE5_47-8-g5a42c66b.add-zxc-bertrand-lebonnois.patch

@@ -0,0 +1,24 @@
+Subject: Add ZXC (Bertrand Lebonnois)
+Origin: upstream, commit FILE5_47-8-g5a42c66b <https://github.com/file/file/commit/FILE5_47-8-g5a42c66b>
+Author: Christos Zoulas <christos@zoulas.com>
+Date: Fri Mar 20 13:42:47 2026 +0000
+Forwarded: not-needed
+
+--- a/magic/Magdir/compress
++++ b/magic/Magdir/compress
+@@ -443,6 +443,15 @@
+ 0	string/b	BZ3v1	bzip3 compressed data
+ >5	ulelong		x	\b, blocksize %u
+ 
++#------------------------------------------------------------------------------
++# ZXC:  ZXC compressed data
++# From: Bertrand Lebonnois <zxc.codec@gmail.com>
++# https://github.com/hellobertrand/zxc
++0       lelong      0x9CB02EF5  ZXC compressed data
++!:mime  application/x-zxc
++!:ext   zxc
++>4      byte        x           \b (v%u)
++>6      byte        &0x80       \b, checksum enabled
+ 
+ # https://support-docs.illumina.com/SW/ORA_Format_Specification/Content/\
+ # SW/ORA/ORAFormatSpecification.htm

+ 1 - 0
debian/patches/cherry-pick/FILE5_47-93-g7a2b2a4b.handle-parsing-guids-in-big-endian-machines.patch

@@ -2,6 +2,7 @@ Subject: Handle parsing guids in big endian machines (Christoph Biedl)
 Origin: upstream, commit FILE5_47-93-g7a2b2a4b <https://github.com/file/file/commit/FILE5_47-93-g7a2b2a4b>
 Origin: upstream, commit FILE5_47-93-g7a2b2a4b <https://github.com/file/file/commit/FILE5_47-93-g7a2b2a4b>
 Author: Christos Zoulas <christos@zoulas.com>
 Author: Christos Zoulas <christos@zoulas.com>
 Date: Sun May 17 17:10:25 2026 +0000
 Date: Sun May 17 17:10:25 2026 +0000
+Forwarded: not-needed
 
 
 --- a/src/compress.c
 --- a/src/compress.c
 +++ b/src/compress.c
 +++ b/src/compress.c

+ 3 - 0
debian/patches/series

@@ -1,6 +1,8 @@
 # reverted upstream commits
 # reverted upstream commits
 
 
 # cherry-picked commits. Keep in upstream's chronological order
 # cherry-picked commits. Keep in upstream's chronological order
+cherry-pick/FILE5_47-8-g5a42c66b.add-zxc-bertrand-lebonnois.patch
+cherry-pick/FILE5_47-17-g50fc7a6b.pr-166-flanglet-add-kanzi-magic.patch
 cherry-pick/FILE5_47-18-gc5460571.pr-725-inliniac-revert-previous-and-always-set-offset.patch
 cherry-pick/FILE5_47-18-gc5460571.pr-725-inliniac-revert-previous-and-always-set-offset.patch
 cherry-pick/FILE5_47-57-g797a2755.add-le-be-guid.patch
 cherry-pick/FILE5_47-57-g797a2755.add-le-be-guid.patch
 cherry-pick/FILE5_47-62-g2866af2e.fix-typo.patch
 cherry-pick/FILE5_47-62-g2866af2e.fix-typo.patch
@@ -9,6 +11,7 @@ cherry-pick/FILE5_47-93-g7a2b2a4b.handle-parsing-guids-in-big-endian-machines.pa
 # patches that should go upstream
 # patches that should go upstream
 upstream/disable.att3b.patch
 upstream/disable.att3b.patch
 upstream/stricter-postscript-magic.patch
 upstream/stricter-postscript-magic.patch
+upstream/disable-over-eagerly-msooxml-detection.patch
 
 
 # local modifications
 # local modifications
 local/support-local-definitions-in-etc-magic.patch
 local/support-local-definitions-in-etc-magic.patch

+ 25 - 0
debian/patches/upstream/disable-over-eagerly-msooxml-detection.patch

@@ -0,0 +1,25 @@
+Subject: Disable over-eagerly MSOOXML detection
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2026-06-06
+Bug-Debian: https://bugs.debian.org/1138991
+Forwarded: https://mailman.astron.com/pipermail/file/2026-June/001674.html
+
+    Upstream commit FILE5_46-106-g8cef37b5 ("PR/0644: omajid: Recognize
+    NuGet packages") enhanced the list of what files in the listing in a
+    ZIP archive might be an MS OOXML file. The rationale is not clear,
+    but under some circumstances this causes ZIP files to be
+    mis-detected.
+
+    Revert this part of the above commit for the time being.
+
+--- a/magic/Magdir/msooxml
++++ b/magic/Magdir/msooxml
+@@ -35,7 +35,7 @@
+ # make sure the first file is correct
+ >0x1E		use		msooxml
+ >0x1E		default		x
+->>0x1E		regex		\\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml|.*\\.md|.*\\.png
++>>0x1E		regex		\\[Content_Types\\]\\.xml|_rels/\\.rels|docProps|customXml
+ # skip to the second local file header
+ # since some documents include a 520-byte extra field following the file
+ # header, we need to scan for the next header

+ 1 - 1
debian/patches/upstream/disable.att3b.patch

@@ -2,7 +2,7 @@ Subject: Disable att3b/WE32K executables like 3B20
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Date: 2019-12-19
 Date: 2019-12-19
 Bug-Debian: https://bugs.debian.org/913867
 Bug-Debian: https://bugs.debian.org/913867
-Forwarded: Not yet
+Forwarded: no
 
 
 --- a/magic/Magdir/att3b
 --- a/magic/Magdir/att3b
 +++ b/magic/Magdir/att3b
 +++ b/magic/Magdir/att3b

+ 1 - 0
debian/patches/upstream/stricter-postscript-magic.patch

@@ -3,6 +3,7 @@ Author: Vincent Lefevre <vincent@vinc17.net>
 Bug: https://bugs.astron.com/view.php?id=618
 Bug: https://bugs.astron.com/view.php?id=618
 Bug-Debian: https://bugs.debian.org/988451
 Bug-Debian: https://bugs.debian.org/988451
 Last-Update: 2025-01-28
 Last-Update: 2025-01-28
+Forwarded: no
 
 
 --- a/magic/Magdir/printer
 --- a/magic/Magdir/printer
 +++ b/magic/Magdir/printer
 +++ b/magic/Magdir/printer