* update file to 5.46-3

This commit is contained in:
Alexander Baldeck 2025-02-04 07:39:04 +01:00
parent 68641d12ce
commit 3f0f215059
3 changed files with 65 additions and 5 deletions

View File

@ -1,7 +1,7 @@
pkgbase = file
pkgdesc = File type identification utility
pkgver = 5.46
pkgrel = 2
pkgrel = 3
url = https://www.darwinsys.com/file/
arch = x86_64
arch = powerpc64le
@ -23,9 +23,11 @@ pkgbase = file
source = https://astron.com/pub/file/file-5.46.tar.gz
source = https://astron.com/pub/file/file-5.46.tar.gz.asc
source = 0001-PR-579-net147-Fix-stack-overrun.patch
source = 0002-PR-571-jschleus-Some-zip-files-are-misclassified-as-data.patch
validpgpkeys = BE04995BA8F90ED0C0C176C471112AB16CB33B3A
sha256sums = c9cc77c7c560c543135edc555af609d5619dbef011997e988ce40a3d75d86088
sha256sums = SKIP
sha256sums = 2db041dcadaf8500a8e10d914890963f27a5b716e97f0baf839e01f7c3d8b576
sha256sums = c93c8ae784ba27c2eec02a94db7bc7080d1b116d4c8e4a9191bd67b4288f2b0e
pkgname = 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: 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 e6ff4570..e560523c 100644
--- a/magic/Magdir/archive
+++ b/magic/Magdir/archive
@@ -1795,6 +1795,17 @@
!: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

@ -5,7 +5,7 @@
pkgname=file
pkgver=5.46
pkgrel=2
pkgrel=3
pkgdesc='File type identification utility'
arch=(x86_64 powerpc64le powerpc64 powerpc espresso riscv64)
license=('custom')
@ -13,12 +13,17 @@ url='https://www.darwinsys.com/file/'
depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so' 'zstd' 'libzstd.so')
provides=('libmagic.so')
options=('!emptydirs')
# Warning: Upstream commits update file version and date inside each file!
# Remove these changes from patches when cherry-picking to avoid
# conflicts!
source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc}
'0001-PR-579-net147-Fix-stack-overrun.patch')
'0001-PR-579-net147-Fix-stack-overrun.patch'
'0002-PR-571-jschleus-Some-zip-files-are-misclassified-as-data.patch')
validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
sha256sums=('c9cc77c7c560c543135edc555af609d5619dbef011997e988ce40a3d75d86088'
'SKIP'
'2db041dcadaf8500a8e10d914890963f27a5b716e97f0baf839e01f7c3d8b576')
'2db041dcadaf8500a8e10d914890963f27a5b716e97f0baf839e01f7c3d8b576'
'c93c8ae784ba27c2eec02a94db7bc7080d1b116d4c8e4a9191bd67b4288f2b0e')
prepare() {
cd $pkgname-$pkgver
@ -47,7 +52,8 @@ build() {
./configure \
--prefix=/usr \
--datadir=/usr/share/file \
--enable-fsect-man5 ${_configure_flasg[@]}
--enable-fsect-man5 \
--enable-libseccomp ${_configure_flags[@]}
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}