public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/file] f44: Update to 5.48; drop upstreamed patches
@ 2026-07-10 10:39 Vincent Mihalkovic
0 siblings, 0 replies; only message in thread
From: Vincent Mihalkovic @ 2026-07-10 10:39 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/file
Branch : f44
Commit : dfc42052ef55bd466173733649d286848d5093d2
Author : Vincent Mihalkovic <vmihalko@redhat.com>
Date : 2026-07-10T12:37:12+02:00
Stats : +23/-223 in 8 file(s)
URL : https://src.fedoraproject.org/rpms/file/c/dfc42052ef55bd466173733649d286848d5093d2?branch=f44
Log:
Update to 5.48; drop upstreamed patches
- Fixes zipfile detection (rhbz#2427330)
Assisted-by: Claude <noreply@anthropic.com>
---
diff --git a/file-5.45-readelf-limit-revert.patch b/file-5.45-readelf-limit-revert.patch
index a88d62d..637ca56 100644
--- a/file-5.45-readelf-limit-revert.patch
+++ b/file-5.45-readelf-limit-revert.patch
@@ -16,12 +16,12 @@ index 366e4c3..c895a44 100644
-.It Li elf_shsize Ta 128MB Ta max ELF section size processed
.It Li encoding Ta 65K Ta max number of bytes to determine encoding
.It Li indir Ta 50 Ta recursion limit for indirect magic
- .It Li name Ta 100 Ta use count limit for name/use magic
+ .It Li name Ta 150 Ta use count limit for name/use magic
diff --git a/src/apprentice.c b/src/apprentice.c
index 080cfe7..ecc6787 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
-@@ -580,7 +580,6 @@ file_ms_alloc(int flags)
+@@ -583,7 +583,6 @@ file_ms_alloc(int flags)
ms->indir_max = FILE_INDIR_MAX;
ms->name_max = FILE_NAME_MAX;
ms->elf_shnum_max = FILE_ELF_SHNUM_MAX;
@@ -33,7 +33,7 @@ diff --git a/src/file.c b/src/file.c
index 947fb76..56e4d1a 100644
--- a/src/file.c
+++ b/src/file.c
-@@ -156,8 +156,6 @@ file_private struct {
+@@ -155,8 +155,6 @@ file_private struct {
MAGIC_PARAM_ELF_PHNUM_MAX, 0 },
{ "elf_shnum", 0, FILE_ELF_SHNUM_MAX, "max ELF sections processed",
MAGIC_PARAM_ELF_SHNUM_MAX, 0 },
@@ -46,7 +46,7 @@ diff --git a/src/file.h b/src/file.h
index 9922632..82f6d2b 100644
--- a/src/file.h
+++ b/src/file.h
-@@ -504,14 +504,12 @@ struct magic_set {
+@@ -514,7 +513,6 @@ struct magic_set {
uint16_t magwarn_max;
size_t bytes_max; /* number of bytes to read from file */
size_t encoding_max; /* bytes to look for encoding */
@@ -54,14 +54,15 @@ index 9922632..82f6d2b 100644
#ifndef FILE_BYTES_MAX
# define FILE_BYTES_MAX (7 * 1024 * 1024)/* how much of the file to look at */
#endif /* above 0x6ab0f4 map offset for HelveticaNeue.dfont */
- #define FILE_ELF_NOTES_MAX 256
- #define FILE_ELF_PHNUM_MAX 2048
- #define FILE_ELF_SHNUM_MAX 32768
+-#define FILE_ELF_PHNUM_MAX 2048
+-#define FILE_ELF_SHNUM_MAX 32768
-#define FILE_ELF_SHSIZE_MAX (128 * 1024 * 1024)
++#define FILE_ELF_PHNUM_MAX 2048
++#define FILE_ELF_SHNUM_MAX 32768
#define FILE_INDIR_MAX 50
- #define FILE_NAME_MAX 100
+ #define FILE_NAME_MAX 150
#define FILE_REGEX_MAX 8192
-diff --git a/src/magic.c b/src/magic.c
+ diff --git a/src/magic.c b/src/magic.c
index def46fa..1eb6fae 100644
--- a/src/magic.c
+++ b/src/magic.c
@@ -75,7 +76,7 @@ index def46fa..1eb6fae 100644
case MAGIC_PARAM_ELF_NOTES_MAX:
ms->elf_notes_max = CAST(uint16_t, v);
return 0;
-@@ -668,9 +665,6 @@ magic_getparam(struct magic_set *ms, int param, void *val)
+@@ -665,9 +662,6 @@ magic_getparam(struct magic_set *ms, int param, void *val)
case MAGIC_PARAM_ELF_SHNUM_MAX:
*CAST(size_t *, val) = ms->elf_shnum_max;
return 0;
@@ -89,8 +90,7 @@ diff --git a/src/readelf.c b/src/readelf.c
index fe4cf54..1be2dcd 100644
--- a/src/readelf.c
+++ b/src/readelf.c
-@@ -1514,12 +1514,6 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- return -1;
+@@ -1528,12 +1528,6 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
return 0;
}
- if (xsh_size > ms->elf_shsize_max) {
@@ -102,3 +102,6 @@ index fe4cf54..1be2dcd 100644
if ((nbuf = malloc(xsh_size)) == NULL) {
file_error(ms, errno, "Cannot allocate memory"
" for note");
+ return -1;
+ }
+ offs = xsh_offset;
diff --git a/file-5.46-magic-python-bytecode.patch b/file-5.46-magic-python-bytecode.patch
deleted file mode 100644
index e88d690..0000000
--- a/file-5.46-magic-python-bytecode.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: Christos Zoulas <christos@zoulas.com>
-Date: Tue, 17 Jun 2025 21:14:40 +0000
-Subject: Update for python-3.1{4,5} and pypy-3.1{0,1} (Michal Gorny)
-
-# Backport: see spec comment for upstream commit URL.
-# https://github.com/file/file/commit/dd9e7f79d670ff228f46ee732fa6570bd7cb4781
-diff --git a/magic/Magdir/python b/magic/Magdir/python
-index e00a087..4a3fba6 100644
---- a/magic/Magdir/python
-+++ b/magic/Magdir/python
-@@ -1,6 +1,6 @@
-
- #------------------------------------------------------------------------------
--# $File: python,v 1.47 2024/08/27 18:50:57 christos Exp $
-+# $File: python,v 1.49 2025/06/17 21:14:40 christos Exp $
- # python: file(1) magic for python
- #
- # Outlook puts """ too for urgent messages
-@@ -205,7 +205,7 @@
- 2 string \x0d\x0a
- # extra check: only two bits of flag field are currently used
- >4 ulelong <0x4
--# \x0d as part of magic should suffice till Python 3.14 (magic 3600)
-+# \x0d as part of magic suffices up to Python 3.13
- >>1 ubyte 0x0d Byte-compiled Python module for
- !:mime application/x-bytecode.python
- # now look at the magic number to determine the version
-@@ -220,10 +220,17 @@
- >>>>>>>0 uleshort <3500 CPython 3.11
- >>>>>>>0 default x
- >>>>>>>>0 uleshort <3550 CPython 3.12
-->>>>>>>>0 default x
-->>>>>>>>>0 uleshort <3600 CPython 3.13
-->>>>>>>>>0 default x CPython 3.14 or newer
-+>>>>>>>>0 default x CPython 3.13
- >>>0 use pyc-pep552
-+# \x0e means Python 3.14 or newer
-+>>1 ubyte 0x0e Byte-compiled Python module for
-+!:mime application/x-bytecode.python
-+>>>0 uleshort <3650 CPython 3.14
-+>>>0 default x
-+>>>>0 uleshort <3700 CPython 3.15
-+>>>>0 default x CPython 3.16 or newer
-+>>>0 use pyc-pep552
-+# PyPy magic numbers
- >>0 uleshort 240 Byte-compiled Python module for PyPy3.7
- !:mime application/x-bytecode.python
- >>>0 use pyc-pep552
-@@ -233,6 +240,12 @@
- >>0 uleshort 336 Byte-compiled Python module for PyPy3.9
- !:mime application/x-bytecode.python
- >>>0 use pyc-pep552
-+>>0 uleshort 384 Byte-compiled Python module for PyPy3.10
-+!:mime application/x-bytecode.python
-+>>>0 use pyc-pep552
-+>>0 uleshort 416 Byte-compiled Python module for PyPy3.11
-+!:mime application/x-bytecode.python
-+>>>0 use pyc-pep552
-
- 0 search/1/w #!\040/usr/bin/python Python script text executable
- !:strength + 15
---
-2.53.0
-
diff --git a/file-5.47-buffer-overrun-1.patch b/file-5.47-buffer-overrun-1.patch
deleted file mode 100644
index 6c52012..0000000
--- a/file-5.47-buffer-overrun-1.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6bc6cf03ad4ad136088260e22f30c6d191c161a3 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sat, 29 Mar 2025 15:16:46 +0000
-Subject: [PATCH] PR/638: pbrook: fix buffer overrun
-
----
- src/readelf.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index 1be2dcd..43296c3 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -1718,7 +1718,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- {
- Elf32_Phdr ph32;
- Elf64_Phdr ph64;
-- const char *linking_style;
-+ const char *str;
- unsigned char nbuf[NBUFSIZE];
- char interp[128];
- ssize_t bufsize;
-@@ -1821,9 +1821,10 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- continue;
- if (bufsize && nbuf[0]) {
- nbuf[bufsize - 1] = '\0';
-- memcpy(interp, nbuf, CAST(size_t, bufsize));
-+ str = CAST(const char *, nbuf);
- } else
-- strlcpy(interp, "*empty*", sizeof(interp));
-+ str = "*empty*";
-+ strlcpy(interp, "*empty*", sizeof(interp));
- break;
- case PT_NOTE:
- if (ms->flags & MAGIC_MIME)
-@@ -1853,13 +1854,13 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- return 0;
- if (dynamic) {
- if (pie && need == 0)
-- linking_style = "static-pie";
-+ str = "static-pie";
- else
-- linking_style = "dynamically";
-+ str = "dynamically";
- } else {
-- linking_style = "statically";
-+ str = "statically";
- }
-- if (file_printf(ms, ", %s linked", linking_style) == -1)
-+ if (file_printf(ms, ", %s linked", str) == -1)
- return -1;
- if (interp[0])
- if (file_printf(ms, ", interpreter %s", file_printable(ms,
---
-2.49.0
-
diff --git a/file-5.47-buffer-overrun-2.patch b/file-5.47-buffer-overrun-2.patch
deleted file mode 100644
index 8a9a108..0000000
--- a/file-5.47-buffer-overrun-2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 83aab94724a226c04bf8b85c9ceb2be91dca8dd5 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Tue, 27 May 2025 18:54:56 +0000
-Subject: [PATCH] fix pasto (use proper variable) From Vincent Mihalkovic
-
----
- src/readelf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index 43296c3..aede140 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -1824,7 +1824,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- str = CAST(const char *, nbuf);
- } else
- str = "*empty*";
-- strlcpy(interp, "*empty*", sizeof(interp));
-+ strlcpy(interp, str, sizeof(interp));
- break;
- case PT_NOTE:
- if (ms->flags & MAGIC_MIME)
---
-2.49.0
-
diff --git a/file-5.47-magic-entries.patch b/file-5.47-magic-entries.patch
deleted file mode 100644
index 7431a5f..0000000
--- a/file-5.47-magic-entries.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From b874d520c592ecd55ebcae0d662dc6e54f5c5414 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sat, 25 Jan 2025 16:11:03 +0000
-Subject: [PATCH] /var/folders/6_/7gn53mmj3jgchfrd29b9704m0000gn/T//cvsMMb3m1
-
----
- src/apprentice.c | 2 ++--
- 1 file changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/apprentice.c b/src/apprentice.c
-index 3333e8da4..2151d013f 100644
---- a/src/apprentice.c
-+++ b/src/apprentice.c
-@@ -3391,7 +3391,7 @@ check_buffer(struct magic_set *ms, struct magic_map *map, const char *dbname)
- int i, needsbyteswap;
-
- entries = CAST(uint32_t, map->len / sizeof(struct magic));
-- if (entries < MAGIC_SETS + 1) {
-+ if (entries < MAGIC_SETS) {
- file_error(ms, 0, "Too few magic entries %u in `%s'",
- entries, dbname);
- return -1;
diff --git a/file-5.47-stack-overrun.patch b/file-5.47-stack-overrun.patch
deleted file mode 100644
index 2ffe815..0000000
--- a/file-5.47-stack-overrun.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index aede140..1cec09b 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -1720,7 +1720,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- Elf64_Phdr ph64;
- const char *str;
- unsigned char nbuf[NBUFSIZE];
-- char interp[128];
-+ char interp[NBUFSIZE];
- ssize_t bufsize;
- size_t offset, align, need = 0;
- int pie = 0, dynamic = 0;
---
-2.49.0
-
diff --git a/file.spec b/file.spec
index 5b1aebd..15ad027 100644
--- a/file.spec
+++ b/file.spec
@@ -14,8 +14,8 @@
Summary: Utility for determining file types
Name: file
-Version: 5.46
-Release: 10%{?dist}
+Version: 5.48
+Release: 1%{?dist}
# Main license is BSD-2-Clause-Darwin
# Shipped exceptions:
@@ -48,21 +48,6 @@ Patch3: file-5.45-readelf-limit-revert.patch
Patch4: file-5.46-fix-tests-rpm-magic.patch
-# upstream: https://github.com/file/file/commit/b874d520c592ecd55ebcae0d662dc6e54f5c5414
-Patch5: file-5.47-magic-entries.patch
-
-# upstream commit: https://github.com/file/file/commit/6bc6cf03ad4ad136088260e22f30c6d191c161a3
-Patch6: file-5.47-buffer-overrun-1.patch
-
-# upstream commit: https://github.com/file/file/commit/83aab94724a226c04bf8b85c9ceb2be91dca8dd5
-Patch7: file-5.47-buffer-overrun-2.patch
-
-# upstream commit: https://github.com/file/file/commit/b3384a1fbfa1fee99986e5750ab8e700de4f24ad
-Patch8: file-5.47-stack-overrun.patch
-
-# upstream commit: https://github.com/file/file/commit/dd9e7f79d670ff228f46ee732fa6570bd7cb4781
-Patch9: file-5.46-magic-python-bytecode.patch
-
URL: https://www.darwinsys.com/file/
Requires: file-libs%{?_isa} = %{version}-%{release}
BuildRequires: zlib-devel
@@ -244,6 +229,10 @@ make -C tests check
%endif
%changelog
+* Fri Jul 10 2026 Vincent Mihalkovic <vmihalko@redhat.com> - 5.48-1
+- New upstream release 5.48; drop upstreamed patches
+- Fixes zipfile detection (rhbz#2427330)
+
* Tue Mar 24 2026 Vincent Mihalkovic <vmihalko@redhat.com> - 5.46-10
- Update python bytecode magic for 3.14+ / 3.15 and PyPy 3.10/3.11 (upstream dd9e7f7)
diff --git a/sources b/sources
index f4593b7..c84d648 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (file-5.46.tar.gz) = a6cb7325c49fd4af159b7555bdd38149e48a5097207acbe5e36deb5b7493ad6ea94d703da6e0edece5bb32959581741f4213707e5cb0528cd46d75a97a5242dc
-SHA512 (file-5.46.tar.gz.asc) = 93f99b468bbda29eab6e37fdee1f1806a10b18206a85c68e888e967678cfd128bb9c34bc9835a699e447623ddf0e2ea041039a682f7be1db2ab37935fd4aafa0
+SHA512 (file-5.48.tar.gz) = 9672504f9473e41ed047bb019f1a003965b3f12e16b77d090e819e094805e42d66d07582402eb9df6be98932161ee6a014a549dbcca9cef10c236b0a3a71a642
+SHA512 (file-5.48.tar.gz.asc) = a4501efcee2ee446f1e5e25d78c864a688ce1d40b5630392be5e286ba3fbe38ebb9b8366b8b48cbfa0de978b5a64ae2c67495e8ae37417a8f0d57c7a23b5cc08
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-10 10:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-10 10:39 [rpms/file] f44: Update to 5.48; drop upstreamed patches Vincent Mihalkovic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox