Skip to content

Commit b38dd95

Browse files
SolitudeSFDuncaen
authored andcommitted
file: add patch to fix zip misclassication
1 parent cc76167 commit b38dd95

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
From 60b2032b96fc185b37fb0f2152e834efb2edad6e Mon Sep 17 00:00:00 2001
2+
From: Christos Zoulas <christos@zoulas.com>
3+
Date: Thu, 5 Dec 2024 19:41:12 +0000
4+
Subject: PR/571: jschleus: Some zip files are misclassified as data
5+
6+
---
7+
magic/Magdir/archive | 25 +++++++++++++++----------
8+
1 file changed, 15 insertions(+), 10 deletions(-)
9+
10+
diff --git a/magic/Magdir/archive b/magic/Magdir/archive
11+
index e6ff4570..e560523c 100644
12+
--- a/magic/Magdir/archive
13+
+++ b/magic/Magdir/archive
14+
@@ -1795,6 +1795,17 @@
15+
!:ext zip/cbz
16+
17+
18+
+# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
19+
+# Next line excludes specialized formats:
20+
+0 name zipgeneric
21+
+>4 beshort x Zip archive data, at least
22+
+!:mime application/zip
23+
+>4 use zipversion
24+
+>4 beshort x to extract
25+
+>8 beshort x \b, compression method=
26+
+>8 use zipcompression
27+
+>0x161 string WINZIP \b, WinZIP self-extracting
28+
+
29+
0 string PK\003\004
30+
!:strength +1
31+
# IOS/IPadOS IPA file (Zip archive)
32+
@@ -2132,17 +2143,11 @@
33+
>>>>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File
34+
!:mime application/vnd.keyman.kmp+zip
35+
!:ext kmp
36+
+>>>>>+4 default x
37+
+>>>>>>0 use zipgeneric
38+
39+
-# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
40+
-# Next line excludes specialized formats:
41+
>>>>+4 default x
42+
->>>>>4 beshort x Zip archive data, at least
43+
-!:mime application/zip
44+
->>>>>4 use zipversion
45+
->>>>>4 beshort x to extract
46+
->>>>>8 beshort x \b, compression method=
47+
->>>>>8 use zipcompression
48+
->>>>>0x161 string WINZIP \b, WinZIP self-extracting
49+
+>>>>>0 use zipgeneric
50+
51+
# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
52+
0 string PK\005\006 Zip archive data (empty)

srcpkgs/file/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Template file for 'file'
22
pkgname=file
33
version=5.46
4-
revision=1
4+
revision=2
55
bootstrap=yes
66
build_style=gnu-configure
77
configure_args="--enable-static $(vopt_enable libseccomp)"

0 commit comments

Comments
 (0)