* update file to 5.46-2

This commit is contained in:
Alexander Baldeck 2024-12-31 11:08:22 +01:00
parent f57e17b71a
commit eb67db8e85
4 changed files with 73 additions and 15 deletions

31
file/.SRCINFO Normal file
View File

@ -0,0 +1,31 @@
pkgbase = file
pkgdesc = File type identification utility
pkgver = 5.46
pkgrel = 2
url = https://www.darwinsys.com/file/
arch = x86_64
arch = powerpc64le
arch = powerpc64
arch = powerpc
arch = espresso
arch = riscv64
license = custom
depends = glibc
depends = zlib
depends = xz
depends = bzip2
depends = libseccomp
depends = libseccomp.so
depends = zstd
depends = libzstd.so
provides = libmagic.so
options = !emptydirs
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
validpgpkeys = BE04995BA8F90ED0C0C176C471112AB16CB33B3A
sha256sums = c9cc77c7c560c543135edc555af609d5619dbef011997e988ce40a3d75d86088
sha256sums = SKIP
sha256sums = 2db041dcadaf8500a8e10d914890963f27a5b716e97f0baf839e01f7c3d8b576
pkgname = file

4
file/.nvchecker.toml Normal file
View File

@ -0,0 +1,4 @@
[file]
source = "regex"
url = "https://astron.com/pub/file/"
regex = "file-(\\d+\\.\\d+).tar.gz"

View File

@ -0,0 +1,31 @@
From b3384a1fbfa1fee99986e5750ab8e700de4f24ad Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Thu, 5 Dec 2024 18:35:40 +0000
Subject: [PATCH] PR/579: net147: Fix stack overrun.
---
src/readelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/readelf.c b/src/readelf.c
index fe4cf5413..d209d86df 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.196 2024/11/11 15:49:11 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.197 2024/12/05 18:35:40 christos Exp $")
#endif
#ifdef BUILTIN_ELF
@@ -1726,7 +1726,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
Elf64_Phdr ph64;
const char *linking_style;
unsigned char nbuf[NBUFSIZE];
- char interp[128];
+ char interp[NBUFSIZE];
ssize_t bufsize;
size_t offset, align, need = 0;
int pie = 0, dynamic = 0;

View File

@ -4,8 +4,8 @@
# Contributor: Andreas Radke <andyrtr@archlinux.org>
pkgname=file
pkgver=5.45
pkgrel=1.2
pkgver=5.46
pkgrel=2
pkgdesc='File type identification utility'
arch=(x86_64 powerpc64le powerpc64 powerpc espresso riscv64)
license=('custom')
@ -14,17 +14,11 @@ depends=('glibc' 'zlib' 'xz' 'bzip2' 'libseccomp' 'libseccomp.so' 'zstd' 'libzst
provides=('libmagic.so')
options=('!emptydirs')
source=("https://astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc}
file-5.45-32-bit-time_t-deux.patch
file-5.45-32-bit-time_t.patch
file-5.45-seccomp-sandbox.patch
file-5.45-weak-magic-shell.patch)
'0001-PR-579-net147-Fix-stack-overrun.patch')
validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
sha256sums=('fc97f51029bb0e2c9f4e3bffefdaf678f0e039ee872b9de5c002a6d09c784d82'
sha256sums=('c9cc77c7c560c543135edc555af609d5619dbef011997e988ce40a3d75d86088'
'SKIP'
'c6fd7ce3d90dad6378169b4f6ee09db637148b2f92651aaca59953d5140a104f'
'bacf14d3aa5c2cd160ab1fcf9e2d25ca2bb6d0643a793176e93031bbbc646335'
'a6b67702ab2e0ed9d518849abfc8b73b6f5835b3f9fb5be6e52bf049f6c6780d'
'1447ff7f9cdd5005c63f78266f3fa9be9b02279c01ae05a2cffe994efd00c6ac')
'2db041dcadaf8500a8e10d914890963f27a5b716e97f0baf839e01f7c3d8b576')
prepare() {
cd $pkgname-$pkgver
@ -37,8 +31,6 @@ prepare() {
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
autoreconf -fiv
}
build() {
@ -55,8 +47,8 @@ build() {
./configure \
--prefix=/usr \
--datadir=/usr/share/file \
--enable-fsect-man5 ${_configure_flags[@]}
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
--enable-fsect-man5 ${_configure_flasg[@]}
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}