From e38294d0063890c9949fed6b460eb29de2cbb474 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 6 May 2026 20:56:22 +0300 Subject: [PATCH] Fix regressions --- pkg.info | 2 +- ...tches-too-many-unix-stanza-files-lik.patch | 23 ++++++++++++++++++ ...Revert-previous-and-always-set-offse.patch | 24 +++++++++++++++++++ source.sh | 8 +++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 source-files/0001-Revert-PR-679-matches-too-many-unix-stanza-files-lik.patch create mode 100644 source-files/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch diff --git a/pkg.info b/pkg.info index 148a8e5..113e07a 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: file description: File type detection program version: "5.47" -revision: 1 +revision: 2 url: https://www.darwinsys.com/file/ license: Custom maintainers: diff --git a/source-files/0001-Revert-PR-679-matches-too-many-unix-stanza-files-lik.patch b/source-files/0001-Revert-PR-679-matches-too-many-unix-stanza-files-lik.patch new file mode 100644 index 0000000..7ac303f --- /dev/null +++ b/source-files/0001-Revert-PR-679-matches-too-many-unix-stanza-files-lik.patch @@ -0,0 +1,23 @@ +From f37cc42c535a08598d3ec4b4fa7aa73af7a8e223 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Wed, 25 Mar 2026 22:10:22 +0000 +Subject: [PATCH 1/1] Revert PR/679: matches too many unix stanza files (like + toml). https://bbs.archlinux.org/viewtopic.php?pid=2292157#p2292157 + +--- + magic/Magdir/windows | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/magic/Magdir/windows b/magic/Magdir/windows +index eb5b8b3d..05eb1d01 100644 +--- a/magic/Magdir/windows ++++ b/magic/Magdir/windows +@@ -1260,7 +1260,7 @@ + >>>>>&0 ubyte x + # characters, digits, underscore and white space followed by right bracket + # terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT +->>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\][\r\n] Generic INItialization configuration [%-.40s ++>>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\]\r Generic INItialization configuration [%-.40s + # NETDEF.INF multiarc.ini + #!:mime application/x-setupscript + !:mime application/x-wine-extension-ini diff --git a/source-files/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch b/source-files/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch new file mode 100644 index 0000000..538eef0 --- /dev/null +++ b/source-files/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch @@ -0,0 +1,24 @@ +From c54605718190ad8fe9c25cb475f1f32ca7cd54f7 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 12 Apr 2026 22:15:14 +0000 +Subject: [PATCH] PR/725: inliniac: Revert previous and always set offset. + +--- + src/softmagic.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/softmagic.c b/src/softmagic.c +index 9aaf8b3e..7cf7c798 100644 +--- a/src/softmagic.c ++++ b/src/softmagic.c +@@ -1577,8 +1577,7 @@ normal: + ms->offset = offset; + ms->eoffset = 0; + } else { +- if (b->fd != -1) +- ms->offset = ms->eoffset + offset; ++ ms->offset = ms->eoffset + offset; + } + } + if ((ms->flags & MAGIC_DEBUG) != 0) { + diff --git a/source.sh b/source.sh index c85ae8c..9388213 100644 --- a/source.sh +++ b/source.sh @@ -2,6 +2,14 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/0001-Revert-PR-679-matches-too-many-unix-stanza-files-lik.patch + patch -Np1 -i "$BPM_WORKDIR"/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() {