summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch')
-rw-r--r--meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch b/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch
new file mode 100644
index 0000000000..7601e6dead
--- /dev/null
+++ b/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch
@@ -0,0 +1,93 @@
1From b310a0c2d3e4a1c12d579ad5c0266f1092a91340 Mon Sep 17 00:00:00 2001
2From: Christos Zoulas <christos@zoulas.com>
3Date: Wed, 27 Nov 2024 15:37:46 +0000
4Subject: [PATCH] Use +4 in default reset previous negative offset in magic in
5 zip entry
6
7Upstream-Status: Backport [https://github.com/file/file/commit/b310a0c2d3e4a1c12d579ad5c0266f1092a91340]
8Signed-off-by: Alexander Kanavin <alex@linutronix.de>
9---
10 magic/Magdir/archive | 50 +++++++++++++++++++++++---------------------
11 1 file changed, 26 insertions(+), 24 deletions(-)
12
13diff --git a/magic/Magdir/archive b/magic/Magdir/archive
14index c8f440dc..b920f993 100644
15--- a/magic/Magdir/archive
16+++ b/magic/Magdir/archive
17@@ -1,5 +1,5 @@
18 #------------------------------------------------------------------------------
19-# $File: archive,v 1.206 2024/11/26 19:39:14 christos Exp $
20+# $File: archive,v 1.207 2024/11/27 15:37:46 christos Exp $
21 # archive: file(1) magic for archive formats (see also "msdos" for self-
22 # extracting compressed archives)
23 #
24@@ -1875,15 +1875,6 @@
25 >>>>>-22 string PK\005\006
26 >>>>>>(-6.l-16) string APK\x20Sig\x20Block\x2042 \b, with APK Signing Block
27
28-# Keyman Compiled Package File (keyman.com)
29-# https://help.keyman.com/developer/current-version/reference/file-types/kmp
30-# Find start of central directory
31->>>(-6.l) string PK\001\002
32-# Scan central directory for string 'kmp.json', will suffice for a
33-# package containing about 150 files
34->>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File
35-!:mime application/vnd.keyman.kmp+zip
36-!:ext kmp
37
38 # Specialised zip formats which start with a member named 'mimetype'
39 # (stored uncompressed, with no 'extra field') containing the file's MIME type.
40@@ -2123,25 +2114,36 @@
41 #>30 search/100/b application/epub+zip EPUB document
42 #!:mime application/epub+zip
43
44-# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
45-# Next line excludes specialized formats:
46+# APK Signing Block
47 >(26.s+30) leshort !0xcafe
48 >>30 search/100/b !application/epub+zip
49->>>26 string !\x8\0\0\0mimetype Zip archive data
50-!:mime application/zip
51->>>>4 beshort x \b, at least
52->>>>4 use zipversion
53->>>>4 beshort x to extract
54->>>>8 beshort x \b, compression method=
55->>>>8 use zipcompression
56->>>>0x161 string WINZIP \b, WinZIP self-extracting
57-# APK Signing Block
58->0 default x
59->>-22 string PK\005\006
60->>>(-6.l-16) string APK\x20Sig\x20Block\x2042 Android package (APK), with APK Signing Block
61+>>>26 string !\x8\0\0\0mimetype
62+>>>>-22 string PK\005\006
63+>>>>>(-6.l-16) string APK\x20Sig\x20Block\x2042 Android package (APK), with APK Signing Block
64 !:mime application/vnd.android.package-archive
65 !:ext apk
66
67+# Keyman Compiled Package File (keyman.com)
68+# https://help.keyman.com/developer/current-version/reference/file-types/kmp
69+# Find start of central directory
70+>>>>>(-6.l) string PK\001\002
71+# Scan central directory for string 'kmp.json', will suffice for a
72+# package containing about 150 files
73+>>>>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File
74+!:mime application/vnd.keyman.kmp+zip
75+!:ext kmp
76+
77+# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
78+# Next line excludes specialized formats:
79+>>>>+4 default x
80+>>>>>4 beshort x Zip archive data, at least
81+!:mime application/zip
82+>>>>>4 use zipversion
83+>>>>>4 beshort x to extract
84+>>>>>8 beshort x \b, compression method=
85+>>>>>8 use zipcompression
86+>>>>>0x161 string WINZIP \b, WinZIP self-extracting
87+
88 # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
89 0 string PK\005\006 Zip archive data (empty)
90 !:mime application/zip
91--
922.39.5
93