Sync from SUSE:SLFO:Main file revision 25fd6bd2bd601d5b892330825075c659

This commit is contained in:
2025-06-18 16:21:40 +02:00
parent ea88ae3534
commit b8378f29f5
4 changed files with 67 additions and 8 deletions

View File

@@ -1,7 +0,0 @@
libmagic1
requires "file-magic = <version>"
targettype 32bit provides "file-<targettype>:/usr/lib/libmagic.so.1"
file-devel
requires -file-<targettype>
requires "libmagic1-<targettype> = <version>"

52
file-zipdata.patch Normal file
View File

@@ -0,0 +1,52 @@
From 60b2032b96fc185b37fb0f2152e834efb2edad6e Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 5 Dec 2024 19:41:12 +0000
Subject: [PATCH] PR/571: jschleus: Some zip files are misclassified as data
---
magic/Magdir/archive | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/magic/Magdir/archive b/magic/Magdir/archive
index e6ff4570a..e560523cb 100644
--- a/magic/Magdir/archive
+++ b/magic/Magdir/archive
@@ -1794,6 +1794,17 @@
!:mime application/unknown+zip
!:ext zip/cbz
+# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
+# Next line excludes specialized formats:
+0 name zipgeneric
+>4 beshort x Zip archive data, at least
+!:mime application/zip
+>4 use zipversion
+>4 beshort x to extract
+>8 beshort x \b, compression method=
+>8 use zipcompression
+>0x161 string WINZIP \b, WinZIP self-extracting
+
0 string PK\003\004
!:strength +1
# IOS/IPadOS IPA file (Zip archive)
@@ -2132,17 +2143,11 @@
>>>>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File
!:mime application/vnd.keyman.kmp+zip
!:ext kmp
+>>>>>+4 default x
+>>>>>>0 use zipgeneric
-# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
-# Next line excludes specialized formats:
>>>>+4 default x
->>>>>4 beshort x Zip archive data, at least
-!:mime application/zip
->>>>>4 use zipversion
->>>>>4 beshort x to extract
->>>>>8 beshort x \b, compression method=
->>>>>8 use zipcompression
->>>>>0x161 string WINZIP \b, WinZIP self-extracting
+>>>>>0 use zipgeneric
# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\005\006 Zip archive data (empty)

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Sun May 25 06:23:18 UTC 2025 - munix9@googlemail.com
- Add file-zipdata.patch
* Fix "Some zip files are misclassified as data"
see https://bugs.astron.com/view.php?id=571
based on https://github.com/file/file/commit/60b2032b96fc185b37fb0f2152e834efb2edad6e
-------------------------------------------------------------------
Wed Mar 26 14:21:59 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- baselibs.conf: drop it
-------------------------------------------------------------------
Wed Mar 19 09:31:52 UTC 2025 - Dr. Werner Fink <werner@suse.de>

View File

@@ -42,7 +42,6 @@ Summary: A Tool to Determine File Types
License: BSD-2-Clause
Group: Productivity/File utilities
Source0: https://www.astron.com/pub/file/file-%{version}.tar.gz
Source2: baselibs.conf
Source3: file-rpmlintrc
Source4: https://www.astron.com/pub/file/file-%{version}.tar.gz.asc
Source5: file.keyring
@@ -68,6 +67,7 @@ Patch39: file-5.28-btrfs-image.dif
Patch42: boo1237209.patch
Patch43: file-seccomp.patch
Patch44: file-seccomp-ppc.patch
Patch45: file-zipdata.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global magicdir %{_datadir}/file
@@ -134,6 +134,7 @@ to develop applications that require the magic "file" interface.
%patch -P 42 -p1
%patch -P 43 -p1 -b .seccomp
%patch -P 44 -p1 -b .ppc
%patch -P 45 -p1 -b .zipdata
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
rm -fv src/magic.h