Accepting request 888046 from Base:System
- Add patch file-5.40-ascii.patch * fix regressions on dection of smaller ASCII files (boo#1184899) - Add upstream comitts as patches * file-5.40-9b0459af.patch put attributes inside the xz magic. (boo#1184888, boo#1184891) * file-5.40-749e1ecf.patch If the file is less than 3 bytes, use the file length to determine type * file-5.40-f0601504.patch Fix regression after unsigned/signed printing changes * file-5.40-f7705dca.patch fix previous (cast >>) * file-5.40-3096f87f.patch Correct return values to exptexted * file-5.40-4c5fe1ad.patch Add missing parens - Port patch * file-5.28-btrfs-image.dif due patch file-5.40-f0601504.patch - Add upstream commits as patches * file-5.40-1c677c04.patch Don't count each byte encounter as 1, count the total number of bytes found (Anatol Belski). This makes it behave like 5.39 * file-5.40-6b34436a.patch remove "u" from the pattern (Joerg Jenderek) * file-5.40-9e2becec.patch Encoding bug fix - Fix offsets of patches * file-5.17-option.dif OBS-URL: https://build.opensuse.org/request/show/888046 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=122
This commit is contained in:
commit
cd8347f899
@ -1,69 +0,0 @@
|
||||
---
|
||||
src/apprentice.c | 6 +++---
|
||||
src/compress.c | 2 +-
|
||||
src/file.c | 2 +-
|
||||
src/magic.c | 2 +-
|
||||
4 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- src/apprentice.c
|
||||
+++ src/apprentice.c 2019-05-27 08:53:31.057488035 +0000
|
||||
@@ -1184,7 +1184,7 @@ load_1(struct magic_set *ms, int action,
|
||||
ssize_t len;
|
||||
struct magic_entry me;
|
||||
|
||||
- FILE *f = fopen(ms->file = fn, "r");
|
||||
+ FILE *f = fopen(ms->file = fn, "re");
|
||||
if (f == NULL) {
|
||||
if (errno != ENOENT)
|
||||
file_error(ms, errno, "cannot read magic file `%s'",
|
||||
@@ -3108,7 +3108,7 @@ apprentice_map(struct magic_set *ms, con
|
||||
if (dbname == NULL)
|
||||
goto error;
|
||||
|
||||
- if ((fd = open(dbname, O_RDONLY|O_BINARY)) == -1)
|
||||
+ if ((fd = open(dbname, O_RDONLY|O_BINARY|O_CLOEXEC)) == -1)
|
||||
goto error;
|
||||
|
||||
if (fstat(fd, &st) == -1) {
|
||||
@@ -3243,7 +3243,7 @@ apprentice_compile(struct magic_set *ms,
|
||||
if (dbname == NULL)
|
||||
goto out;
|
||||
|
||||
- if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644)) == -1)
|
||||
+ if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY|O_CLOEXEC, 0644)) == -1)
|
||||
{
|
||||
file_error(ms, errno, "cannot open `%s'", dbname);
|
||||
goto out;
|
||||
--- src/compress.c
|
||||
+++ src/compress.c 2019-05-27 08:53:31.057488035 +0000
|
||||
@@ -462,7 +462,7 @@ file_pipe2file(struct magic_set *ms, int
|
||||
{
|
||||
int te;
|
||||
mode_t ou = umask(0);
|
||||
- tfd = mkstemp(buf);
|
||||
+ tfd = mkostemp(buf, O_CLOEXEC);
|
||||
(void)umask(ou);
|
||||
te = errno;
|
||||
(void)unlink(buf);
|
||||
--- src/file.c
|
||||
+++ src/file.c 2019-05-27 08:53:31.057488035 +0000
|
||||
@@ -509,7 +509,7 @@ unwrap(struct magic_set *ms, const char
|
||||
f = stdin;
|
||||
wid = 1;
|
||||
} else {
|
||||
- if ((f = fopen(fn, "r")) == NULL) {
|
||||
+ if ((f = fopen(fn, "re")) == NULL) {
|
||||
file_warn("Cannot open `%s'", fn);
|
||||
return 1;
|
||||
}
|
||||
--- src/magic.c
|
||||
+++ src/magic.c 2019-05-27 09:00:04.010005617 +0000
|
||||
@@ -436,7 +436,7 @@ file_or_fd(struct magic_set *ms, const c
|
||||
_setmode(STDIN_FILENO, O_BINARY);
|
||||
#endif
|
||||
if (inname != NULL) {
|
||||
- int flags = O_RDONLY|O_BINARY|O_NONBLOCK;
|
||||
+ int flags = O_RDONLY|O_BINARY|O_NONBLOCK|O_CLOEXEC;
|
||||
errno = 0;
|
||||
if ((fd = open(inname, flags)) < 0) {
|
||||
okstat = stat(inname, &sb) == 0;
|
@ -1,6 +1,6 @@
|
||||
--- file-5.39/src/file.c.orig 2020-06-17 16:13:36.625305367 +0200
|
||||
+++ file-5.39/src/file.c 2020-06-17 16:15:12.429553163 +0200
|
||||
@@ -249,6 +249,8 @@
|
||||
@@ -251,6 +251,8 @@
|
||||
break;
|
||||
case 'e':
|
||||
case OPT_EXCLUDE_QUIET:
|
||||
@ -9,7 +9,7 @@
|
||||
for (i = 0; i < __arraycount(nv); i++)
|
||||
if (strcmp(nv[i].name, optarg) == 0)
|
||||
break;
|
||||
@@ -261,7 +263,7 @@
|
||||
@@ -263,7 +265,7 @@
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
@ -18,7 +18,7 @@
|
||||
usage();
|
||||
if (magic == NULL)
|
||||
if ((magic = load(magicfile, flags)) == NULL)
|
||||
@@ -271,6 +273,8 @@
|
||||
@@ -273,6 +275,8 @@
|
||||
++didsomefiles;
|
||||
break;
|
||||
case 'F':
|
||||
@ -27,7 +27,7 @@
|
||||
separator = optarg;
|
||||
break;
|
||||
case 'i':
|
||||
@@ -283,6 +287,8 @@
|
||||
@@ -285,6 +289,8 @@
|
||||
action = FILE_LIST;
|
||||
break;
|
||||
case 'm':
|
||||
|
@ -1,11 +1,13 @@
|
||||
--- magic/Magdir/cafebabe
|
||||
+++ magic/Magdir/cafebabe 2014-03-28 10:15:13.354235294 +0000
|
||||
@@ -15,7 +15,7 @@
|
||||
# might add another one or two as time goes by...
|
||||
#
|
||||
Index: magic/Magdir/cafebabe
|
||||
===================================================================
|
||||
--- magic/Magdir/cafebabe.orig
|
||||
+++ magic/Magdir/cafebabe
|
||||
@@ -17,7 +17,7 @@
|
||||
### JAVA START ###
|
||||
# Reference: http://en.wikipedia.org/wiki/Java_class_file
|
||||
# Update: Joerg Jenderek
|
||||
-0 belong 0xcafebabe
|
||||
+0 belong 0xcafebabe Cafe Babe
|
||||
>4 belong >30 compiled Java class data,
|
||||
>4 ubelong >30 compiled Java class data,
|
||||
!:mime application/x-java-applet
|
||||
>>6 beshort x version %d.
|
||||
#!:mime application/java-byte-code
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- magic/Magdir/images
|
||||
+++ magic/Magdir/images 2019-05-27 08:52:51.674238380 +0000
|
||||
@@ -1290,6 +1290,8 @@
|
||||
@@ -1348,6 +1348,8 @@
|
||||
# https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
|
||||
# Samples: https://www.loci.wisc.edu/software/sample-data
|
||||
14 leshort <2
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- src/apprentice.c
|
||||
+++ src/apprentice.c 2019-02-21 06:39:25.249091320 +0000
|
||||
@@ -2465,6 +2465,12 @@ check_format_type(const char *ptr, int t
|
||||
@@ -2476,6 +2476,12 @@ check_format_type(const char *ptr, int t
|
||||
ptr++;
|
||||
if (*ptr == '#')
|
||||
ptr++;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- magic/Magdir/archive
|
||||
+++ magic/Magdir/archive 2019-02-21 06:49:05.298138025 +0000
|
||||
@@ -1102,6 +1102,11 @@
|
||||
@@ -1117,6 +1117,11 @@
|
||||
0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
|
||||
!:mime application/zip
|
||||
!:ext zip/cbz
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
--- src/readelf.c
|
||||
+++ src/readelf.c 2019-02-21 06:41:38.598573505 +0000
|
||||
@@ -818,7 +818,7 @@ do_core_note(struct magic_set *ms, unsig
|
||||
@@ -824,7 +824,7 @@ do_core_note(struct magic_set *ms, unsig
|
||||
|
||||
default:
|
||||
if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
|
||||
@ -13,7 +13,7 @@
|
||||
unsigned char c;
|
||||
/*
|
||||
* Extract the program name. We assume
|
||||
@@ -830,7 +830,9 @@ do_core_note(struct magic_set *ms, unsig
|
||||
@@ -836,7 +836,9 @@ do_core_note(struct magic_set *ms, unsig
|
||||
* If the characters aren't all printable,
|
||||
* reject it.
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@
|
||||
private char *mkdbname(struct magic_set *, const char *, int);
|
||||
private struct magic_map *apprentice_buf(struct magic_set *, struct magic *,
|
||||
size_t);
|
||||
@@ -3336,67 +3338,6 @@ byteswap(struct magic *magic, uint32_t n
|
||||
@@ -3347,67 +3349,6 @@ byteswap(struct magic *magic, uint32_t n
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -16,7 +16,7 @@ contained within the image.
|
||||
diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
--- a/magic/Magdir/filesystems
|
||||
+++ b/magic/Magdir/filesystems
|
||||
@@ -2281,20 +2281,29 @@
|
||||
@@ -2296,20 +2296,29 @@
|
||||
>>0x10060 string >\0 lockproto %s)
|
||||
|
||||
# Russell Coker <russell@coker.com.au>
|
||||
@ -25,12 +25,12 @@ diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
->0x10090 lelong x sectorsize %d,
|
||||
->0x10094 lelong x nodesize %d,
|
||||
->0x10098 lelong x leafsize %d,
|
||||
->0x10020 belong x UUID=%08x-
|
||||
->0x10024 beshort x \b%04x-
|
||||
->0x10026 beshort x \b%04x-
|
||||
->0x10028 beshort x \b%04x-
|
||||
->0x1002a beshort x \b%04x
|
||||
->0x1002c belong x \b%08x,
|
||||
->0x10020 ubelong x UUID=%08x-
|
||||
->0x10024 ubeshort x \b%04x-
|
||||
->0x10026 ubeshort x \b%04x-
|
||||
->0x10028 ubeshort x \b%04x-
|
||||
->0x1002a ubeshort x \b%04x
|
||||
->0x1002c ubelong x \b%08x,
|
||||
->0x10078 lequad x %lld/
|
||||
->0x10070 lequad x \b%lld bytes used,
|
||||
->0x10088 lequad x %lld devices
|
||||
@ -42,12 +42,12 @@ diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
|
||||
+>0x90 lelong x sectorsize %d,
|
||||
+>0x94 lelong x nodesize %d,
|
||||
+>0x98 lelong x leafsize %d,
|
||||
+>0x20 belong x UUID=%08x-
|
||||
+>0x24 beshort x \b%04x-
|
||||
+>0x26 beshort x \b%04x-
|
||||
+>0x28 beshort x \b%04x-
|
||||
+>0x2a beshort x \b%04x
|
||||
+>0x2c belong x \b%08x,
|
||||
+>0x20 ubelong x UUID=%08x-
|
||||
+>0x24 ubeshort x \b%04x-
|
||||
+>0x26 ubeshort x \b%04x-
|
||||
+>0x28 ubeshort x \b%04x-
|
||||
+>0x2a ubeshort x \b%04x
|
||||
+>0x2c ubelong x \b%08x,
|
||||
+>0x78 lequad x %lld/
|
||||
+>0x70 lequad x \b%lld bytes used,
|
||||
+>0x88 lequad x %lld devices
|
||||
|
@ -2,7 +2,7 @@ Index: file-5.38/src/seccomp.c
|
||||
===================================================================
|
||||
--- file-5.38.orig/src/seccomp.c
|
||||
+++ file-5.38/src/seccomp.c
|
||||
@@ -206,6 +206,9 @@ enable_sandbox_full(void)
|
||||
@@ -205,6 +205,9 @@ enable_sandbox_full(void)
|
||||
#ifdef __NR_newfstatat
|
||||
ALLOW_RULE(newfstatat);
|
||||
#endif
|
||||
|
@ -1,20 +0,0 @@
|
||||
commit 85b7ab83257b3191a1a7ca044589a092bcef2bb3
|
||||
Author: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Thu Jun 25 16:52:48 2020 +0000
|
||||
|
||||
Include # (alternate format) to the list of uninteresting formats
|
||||
Reported by Werner Fink
|
||||
|
||||
diff --git src/funcs.c src/funcs.c
|
||||
index 299b8f02..ecbfa28c 100644
|
||||
--- src/funcs.c
|
||||
+++ src/funcs.c
|
||||
@@ -93,7 +93,7 @@ file_checkfmt(char *msg, size_t mlen, const char *fmt)
|
||||
if (*++p == '%')
|
||||
continue;
|
||||
// Skip uninteresting.
|
||||
- while (strchr("0.'+- ", *p) != NULL)
|
||||
+ while (strchr("#0.'+- ", *p) != NULL)
|
||||
p++;
|
||||
if (*p == '*') {
|
||||
if (msg)
|
@ -9,9 +9,11 @@
|
||||
src/dcore.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
8 files changed, 312 insertions(+), 67 deletions(-)
|
||||
|
||||
--- magic/Magdir/elf
|
||||
+++ magic/Magdir/elf 2020-07-01 07:22:26.488294151 +0000
|
||||
@@ -136,7 +136,7 @@
|
||||
Index: magic/Magdir/elf
|
||||
===================================================================
|
||||
--- magic/Magdir/elf.orig
|
||||
+++ magic/Magdir/elf
|
||||
@@ -152,7 +152,7 @@
|
||||
>18 leshort 47 Renesas H8/300H,
|
||||
>18 leshort 48 Renesas H8S,
|
||||
>18 leshort 49 Renesas H8/500,
|
||||
@ -20,8 +22,10 @@
|
||||
>18 leshort 51 Stanford MIPS-X,
|
||||
>18 leshort 52 Motorola Coldfire,
|
||||
>18 leshort 53 Motorola M68HC12,
|
||||
--- magic/Magdir/linux
|
||||
+++ magic/Magdir/linux 2020-07-01 07:22:26.488294151 +0000
|
||||
Index: magic/Magdir/linux
|
||||
===================================================================
|
||||
--- magic/Magdir/linux.orig
|
||||
+++ magic/Magdir/linux
|
||||
@@ -140,27 +140,31 @@
|
||||
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
|
||||
# Linux kernel boot images (i386 arch) (Wolfram Kleff)
|
||||
@ -70,17 +74,21 @@
|
||||
# This also matches new kernels, which were caught above by "HdrS".
|
||||
0 belong 0xb8c0078e Linux kernel
|
||||
>0x1e3 string Loading version 1.3.79 or older
|
||||
--- magic/Magdir/msad
|
||||
+++ magic/Magdir/msad 2020-07-01 07:22:26.488294151 +0000
|
||||
Index: magic/Magdir/msad
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ magic/Magdir/msad
|
||||
@@ -0,0 +1,5 @@
|
||||
+#------------------------------------------------------------------------------
|
||||
+# msad: file(1) magic for msad
|
||||
+# Microsoft visual C
|
||||
+# This must precede the heuristic for raw G3 data
|
||||
+4 string Standard\ Jet\ DB Microsoft Access Database
|
||||
--- magic/Magdir/msdos
|
||||
+++ magic/Magdir/msdos 2020-07-01 07:22:26.492294076 +0000
|
||||
@@ -143,9 +143,9 @@
|
||||
Index: magic/Magdir/msdos
|
||||
===================================================================
|
||||
--- magic/Magdir/msdos.orig
|
||||
+++ magic/Magdir/msdos
|
||||
@@ -145,9 +145,9 @@
|
||||
>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
|
||||
>>(0x3c.l+22) leshort&0x1000 >0 system file
|
||||
>>(0x3c.l+24) leshort 0x010b
|
||||
@ -92,7 +100,7 @@
|
||||
|
||||
# hooray, there's a DOS extender using the PE format, with a valid PE
|
||||
# executable inside (which just prints a message and exits if run in win)
|
||||
@@ -532,7 +532,7 @@
|
||||
@@ -554,7 +554,7 @@
|
||||
# negative offset, must not lead into PSP
|
||||
>1 short <-259
|
||||
# that offset must be accessible
|
||||
@ -101,8 +109,10 @@
|
||||
>>>0 use msdos-com
|
||||
|
||||
# updated by Joerg Jenderek at Oct 2008,2015
|
||||
--- magic/Makefile.am
|
||||
+++ magic/Makefile.am 2020-07-01 07:22:26.492294076 +0000
|
||||
Index: magic/Makefile.am
|
||||
===================================================================
|
||||
--- magic/Makefile.am.orig
|
||||
+++ magic/Makefile.am
|
||||
@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
|
||||
MAGIC_DIR = $(top_srcdir)/magic
|
||||
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
|
||||
@ -112,7 +122,7 @@
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(MAGIC_DIR)/Header \
|
||||
@@ -23,7 +23,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
|
||||
@@ -24,7 +24,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
|
||||
$(MAGIC_FRAGMENT_DIR)/aout \
|
||||
$(MAGIC_FRAGMENT_DIR)/apache \
|
||||
$(MAGIC_FRAGMENT_DIR)/apl \
|
||||
@ -120,7 +130,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/application \
|
||||
$(MAGIC_FRAGMENT_DIR)/applix \
|
||||
$(MAGIC_FRAGMENT_DIR)/apt \
|
||||
@@ -96,7 +95,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
|
||||
@@ -100,7 +99,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
|
||||
$(MAGIC_FRAGMENT_DIR)/espressif \
|
||||
$(MAGIC_FRAGMENT_DIR)/esri \
|
||||
$(MAGIC_FRAGMENT_DIR)/fcs \
|
||||
@ -128,7 +138,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/finger \
|
||||
$(MAGIC_FRAGMENT_DIR)/flash \
|
||||
$(MAGIC_FRAGMENT_DIR)/flif \
|
||||
@@ -142,6 +140,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
|
||||
@@ -146,6 +144,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
|
||||
$(MAGIC_FRAGMENT_DIR)/java \
|
||||
$(MAGIC_FRAGMENT_DIR)/javascript \
|
||||
$(MAGIC_FRAGMENT_DIR)/jpeg \
|
||||
@ -137,14 +147,15 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/karma \
|
||||
$(MAGIC_FRAGMENT_DIR)/kde \
|
||||
$(MAGIC_FRAGMENT_DIR)/keepass \
|
||||
@@ -151,14 +151,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \
|
||||
@@ -156,7 +156,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
|
||||
$(MAGIC_FRAGMENT_DIR)/lecter \
|
||||
$(MAGIC_FRAGMENT_DIR)/lex \
|
||||
$(MAGIC_FRAGMENT_DIR)/lif \
|
||||
-$(MAGIC_FRAGMENT_DIR)/linux \
|
||||
$(MAGIC_FRAGMENT_DIR)/lisp \
|
||||
$(MAGIC_FRAGMENT_DIR)/llvm \
|
||||
$(MAGIC_FRAGMENT_DIR)/lua \
|
||||
$(MAGIC_FRAGMENT_DIR)/locoscript \
|
||||
@@ -164,7 +163,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
|
||||
$(MAGIC_FRAGMENT_DIR)/luks \
|
||||
$(MAGIC_FRAGMENT_DIR)/m4 \
|
||||
$(MAGIC_FRAGMENT_DIR)/mach \
|
||||
@ -152,7 +163,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/macos \
|
||||
$(MAGIC_FRAGMENT_DIR)/magic \
|
||||
$(MAGIC_FRAGMENT_DIR)/mail.news \
|
||||
@@ -182,11 +180,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
|
||||
@@ -188,11 +186,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
|
||||
$(MAGIC_FRAGMENT_DIR)/mkid \
|
||||
$(MAGIC_FRAGMENT_DIR)/mlssa \
|
||||
$(MAGIC_FRAGMENT_DIR)/mmdf \
|
||||
@ -165,7 +176,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/msooxml \
|
||||
$(MAGIC_FRAGMENT_DIR)/msvc \
|
||||
$(MAGIC_FRAGMENT_DIR)/msx \
|
||||
@@ -242,6 +240,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
|
||||
@@ -250,6 +248,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
|
||||
$(MAGIC_FRAGMENT_DIR)/qt \
|
||||
$(MAGIC_FRAGMENT_DIR)/revision \
|
||||
$(MAGIC_FRAGMENT_DIR)/riff \
|
||||
@ -174,7 +185,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/rpi \
|
||||
$(MAGIC_FRAGMENT_DIR)/rpm \
|
||||
$(MAGIC_FRAGMENT_DIR)/rpmsg \
|
||||
@@ -325,8 +325,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
|
||||
@@ -334,8 +334,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
|
||||
$(MAGIC_FRAGMENT_DIR)/zip \
|
||||
$(MAGIC_FRAGMENT_DIR)/zyxel
|
||||
|
||||
@ -196,7 +207,7 @@
|
||||
|
||||
# FIXME: Build file natively as well so that it can be used to compile
|
||||
# the target's magic file; for now we bail if the local version does not match
|
||||
@@ -338,19 +350,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
|
||||
@@ -347,19 +359,22 @@ FILE_COMPILE = $(top_builddir)/src/file$
|
||||
FILE_COMPILE_DEP = $(FILE_COMPILE)
|
||||
endif
|
||||
|
||||
@ -235,8 +246,10 @@
|
||||
+# fi)
|
||||
+# $(FILE_COMPILE) -C -m magic
|
||||
+# @rm -fr magic
|
||||
--- magic/Makefile.in
|
||||
+++ magic/Makefile.in 2020-07-01 07:22:26.492294076 +0000
|
||||
Index: magic/Makefile.in
|
||||
===================================================================
|
||||
--- magic/Makefile.in.orig
|
||||
+++ magic/Makefile.in
|
||||
@@ -279,7 +279,7 @@ top_srcdir = @top_srcdir@
|
||||
MAGIC_FRAGMENT_BASE = Magdir
|
||||
MAGIC_DIR = $(top_srcdir)/magic
|
||||
@ -246,7 +259,7 @@
|
||||
EXTRA_DIST = \
|
||||
$(MAGIC_DIR)/Header \
|
||||
$(MAGIC_DIR)/Localstuff \
|
||||
@@ -296,7 +296,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
|
||||
@@ -297,7 +297,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \
|
||||
$(MAGIC_FRAGMENT_DIR)/aout \
|
||||
$(MAGIC_FRAGMENT_DIR)/apache \
|
||||
$(MAGIC_FRAGMENT_DIR)/apl \
|
||||
@ -254,7 +267,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/application \
|
||||
$(MAGIC_FRAGMENT_DIR)/applix \
|
||||
$(MAGIC_FRAGMENT_DIR)/apt \
|
||||
@@ -369,7 +368,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
|
||||
@@ -373,7 +372,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \
|
||||
$(MAGIC_FRAGMENT_DIR)/espressif \
|
||||
$(MAGIC_FRAGMENT_DIR)/esri \
|
||||
$(MAGIC_FRAGMENT_DIR)/fcs \
|
||||
@ -262,7 +275,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/finger \
|
||||
$(MAGIC_FRAGMENT_DIR)/flash \
|
||||
$(MAGIC_FRAGMENT_DIR)/flif \
|
||||
@@ -415,6 +413,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
|
||||
@@ -419,6 +417,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \
|
||||
$(MAGIC_FRAGMENT_DIR)/java \
|
||||
$(MAGIC_FRAGMENT_DIR)/javascript \
|
||||
$(MAGIC_FRAGMENT_DIR)/jpeg \
|
||||
@ -271,14 +284,15 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/karma \
|
||||
$(MAGIC_FRAGMENT_DIR)/kde \
|
||||
$(MAGIC_FRAGMENT_DIR)/keepass \
|
||||
@@ -424,14 +424,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \
|
||||
@@ -429,7 +429,6 @@ $(MAGIC_FRAGMENT_DIR)/lammps \
|
||||
$(MAGIC_FRAGMENT_DIR)/lecter \
|
||||
$(MAGIC_FRAGMENT_DIR)/lex \
|
||||
$(MAGIC_FRAGMENT_DIR)/lif \
|
||||
-$(MAGIC_FRAGMENT_DIR)/linux \
|
||||
$(MAGIC_FRAGMENT_DIR)/lisp \
|
||||
$(MAGIC_FRAGMENT_DIR)/llvm \
|
||||
$(MAGIC_FRAGMENT_DIR)/lua \
|
||||
$(MAGIC_FRAGMENT_DIR)/locoscript \
|
||||
@@ -437,7 +436,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \
|
||||
$(MAGIC_FRAGMENT_DIR)/luks \
|
||||
$(MAGIC_FRAGMENT_DIR)/m4 \
|
||||
$(MAGIC_FRAGMENT_DIR)/mach \
|
||||
@ -286,7 +300,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/macos \
|
||||
$(MAGIC_FRAGMENT_DIR)/magic \
|
||||
$(MAGIC_FRAGMENT_DIR)/mail.news \
|
||||
@@ -455,11 +453,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
|
||||
@@ -461,11 +459,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
|
||||
$(MAGIC_FRAGMENT_DIR)/mkid \
|
||||
$(MAGIC_FRAGMENT_DIR)/mlssa \
|
||||
$(MAGIC_FRAGMENT_DIR)/mmdf \
|
||||
@ -299,7 +313,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/msooxml \
|
||||
$(MAGIC_FRAGMENT_DIR)/msvc \
|
||||
$(MAGIC_FRAGMENT_DIR)/msx \
|
||||
@@ -515,6 +513,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
|
||||
@@ -523,6 +521,8 @@ $(MAGIC_FRAGMENT_DIR)/python \
|
||||
$(MAGIC_FRAGMENT_DIR)/qt \
|
||||
$(MAGIC_FRAGMENT_DIR)/revision \
|
||||
$(MAGIC_FRAGMENT_DIR)/riff \
|
||||
@ -308,7 +322,7 @@
|
||||
$(MAGIC_FRAGMENT_DIR)/rpi \
|
||||
$(MAGIC_FRAGMENT_DIR)/rpm \
|
||||
$(MAGIC_FRAGMENT_DIR)/rpmsg \
|
||||
@@ -598,10 +598,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
|
||||
@@ -607,10 +607,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
|
||||
$(MAGIC_FRAGMENT_DIR)/zip \
|
||||
$(MAGIC_FRAGMENT_DIR)/zyxel
|
||||
|
||||
@ -332,7 +346,7 @@
|
||||
# FIXME: Build file natively as well so that it can be used to compile
|
||||
# the target's magic file; for now we bail if the local version does not match
|
||||
@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file${EXEEXT}
|
||||
@@ -826,23 +838,25 @@ uninstall-am: uninstall-pkgdataDATA
|
||||
@@ -835,23 +847,25 @@ uninstall-am: uninstall-pkgdataDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
@ -374,16 +388,20 @@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
--- src/Makefile.am
|
||||
+++ src/Makefile.am 2020-07-01 07:22:26.504293856 +0000
|
||||
Index: src/Makefile.am
|
||||
===================================================================
|
||||
--- src/Makefile.am.orig
|
||||
+++ src/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-MAGIC = $(pkgdatadir)/magic
|
||||
+MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic
|
||||
lib_LTLIBRARIES = libmagic.la
|
||||
nodist_include_HEADERS = magic.h
|
||||
|
||||
--- src/dcore.c
|
||||
+++ src/dcore.c 2020-07-01 07:22:26.504293856 +0000
|
||||
Index: src/dcore.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ src/dcore.c
|
||||
@@ -0,0 +1,207 @@
|
||||
+/*
|
||||
+ * Show goo about ELF core files
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1
|
||||
size 954266
|
@ -1,6 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iEYEABECAAYFAl7mu3AACgkQcREqsWyzOzppXACgoqokKabq7bwN9aKvd/H/yhF+
|
||||
9PUAoOPrAtxFkfNUvtqK/trY+v/Gk5JM
|
||||
=tA6a
|
||||
-----END PGP SIGNATURE-----
|
36
file-5.40-1c677c04.patch
Normal file
36
file-5.40-1c677c04.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 1c677c04c0fa43ecfeccdb9705dbbd19fb356891 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 4 Apr 2021 21:02:19 +0000
|
||||
Subject: [PATCH] Don't count each byte encounter as 1, count the total number
|
||||
of bytes found (Anatol Belski). This makes it behave like 5.39.
|
||||
|
||||
---
|
||||
src/encoding.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index c8b40439..c66703bb 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: encoding.c,v 1.27 2021/02/05 21:33:49 christos Exp $")
|
||||
+FILE_RCSID("@(#)$File: encoding.c,v 1.28 2021/04/04 21:02:19 christos Exp $")
|
||||
#endif /* lint */
|
||||
|
||||
#include "magic.h"
|
||||
@@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
|
||||
} \
|
||||
u = 0; \
|
||||
for (i = 0; i < __arraycount(dist); i++) { \
|
||||
- if (dist[i]) \
|
||||
- u++; \
|
||||
+ u+= dist[i]; \
|
||||
} \
|
||||
if (u < 3) \
|
||||
return 0; \
|
||||
--
|
||||
2.26.2
|
||||
|
105
file-5.40-3096f87f.patch
Normal file
105
file-5.40-3096f87f.patch
Normal file
@ -0,0 +1,105 @@
|
||||
From 3096f87f823e1e936139e48d6a3bae9a95557861 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 9 Apr 2021 19:16:19 +0000
|
||||
Subject: [PATCH] No point returning 0 twice, also don't return -1 as an error
|
||||
where 0 is expected.
|
||||
|
||||
---
|
||||
src/encoding.c | 14 +++++++++++---
|
||||
src/readelf.c | 19 ++++++++-----------
|
||||
2 files changed, 19 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index c66703bb..691e3e16 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -1,3 +1,5 @@
|
||||
+/* $NetBSD: encoding.c,v 1.1.1.13 2021/04/09 18:58:01 christos Exp $ */
|
||||
+
|
||||
/*
|
||||
* Copyright (c) Ian F. Darwin 1986-1995.
|
||||
* Software written by Ian F. Darwin and others;
|
||||
@@ -35,7 +37,11 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: encoding.c,v 1.28 2021/04/04 21:02:19 christos Exp $")
|
||||
+#if 0
|
||||
+FILE_RCSID("@(#)$File: encoding.c,v 1.29 2021/04/09 19:16:19 christos Exp $")
|
||||
+#else
|
||||
+__RCSID("$NetBSD: encoding.c,v 1.1.1.13 2021/04/09 18:58:01 christos Exp $");
|
||||
+#endif
|
||||
#endif /* lint */
|
||||
|
||||
#include "magic.h"
|
||||
@@ -282,7 +288,8 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
|
||||
} \
|
||||
u = 0; \
|
||||
for (i = 0; i < __arraycount(dist); i++) { \
|
||||
- u+= dist[i]; \
|
||||
+ if (dist[i]) \
|
||||
+ u++; \
|
||||
} \
|
||||
if (u < 3) \
|
||||
return 0; \
|
||||
@@ -386,7 +393,8 @@ file_looks_utf8(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf,
|
||||
} else { /* 11xxxxxx begins UTF-8 */
|
||||
int following;
|
||||
uint8_t x = first[buf[i]];
|
||||
- const struct accept_range *ar = &accept_ranges[x >> 4];
|
||||
+ const struct accept_range *ar =
|
||||
+ &accept_ranges[(unsigned int)x >> 4];
|
||||
if (x == XX)
|
||||
return -1;
|
||||
|
||||
diff --git src/readelf.c src/readelf.c
|
||||
index 0cd119a6..633fd2e8 100644
|
||||
--- src/readelf.c
|
||||
+++ src/readelf.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: readelf.c,v 1.175 2020/12/17 20:43:37 christos Exp $")
|
||||
+FILE_RCSID("@(#)$File: readelf.c,v 1.176 2021/04/09 19:16:19 christos Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef BUILTIN_ELF
|
||||
@@ -982,9 +982,8 @@ get_string_on_virtaddr(struct magic_set *ms,
|
||||
fsize, virtaddr);
|
||||
if (offset < 0 ||
|
||||
(buflen = pread(fd, buf, CAST(size_t, buflen), offset)) <= 0) {
|
||||
- if (file_printf(ms, ", can't read elf string at %jd",
|
||||
- (intmax_t)offset) == -1)
|
||||
- return -1;
|
||||
+ (void)file_printf(ms, ", can't read elf string at %jd",
|
||||
+ (intmax_t)offset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1185,17 +1184,15 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
|
||||
}
|
||||
|
||||
if (namesz & 0x80000000) {
|
||||
- if (file_printf(ms, ", bad note name size %#lx",
|
||||
- CAST(unsigned long, namesz)) == -1)
|
||||
- return -1;
|
||||
+ (void)file_printf(ms, ", bad note name size %#lx",
|
||||
+ CAST(unsigned long, namesz);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (descsz & 0x80000000) {
|
||||
- if (file_printf(ms, ", bad note description size %#lx",
|
||||
- CAST(unsigned long, descsz)) == -1)
|
||||
- return -1;
|
||||
- return 0;
|
||||
+ (void)file_printf(ms, ", bad note description size %#lx",
|
||||
+ CAST(unsigned long, descsz);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
noff = offset;
|
||||
--
|
||||
2.28.0
|
||||
|
50
file-5.40-4c5fe1ad.patch
Normal file
50
file-5.40-4c5fe1ad.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 4c5fe1ad1daa798eda3265e09a382d4ede548981 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 9 Apr 2021 20:40:56 +0000
|
||||
Subject: [PATCH] Add missing parens, use reinterpret-casr
|
||||
|
||||
---
|
||||
src/readelf.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git src/readelf.c src/readelf.c
|
||||
index 633fd2e8..10902f09 100644
|
||||
--- src/readelf.c
|
||||
+++ src/readelf.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: readelf.c,v 1.176 2021/04/09 19:16:19 christos Exp $")
|
||||
+FILE_RCSID("@(#)$File: readelf.c,v 1.177 2021/04/09 20:40:56 christos Exp $")
|
||||
#endif
|
||||
|
||||
#ifdef BUILTIN_ELF
|
||||
@@ -918,7 +918,7 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
|
||||
if (file_printf(ms, ", from '%s'",
|
||||
file_copystr(buf, sizeof(buf),
|
||||
CAST(size_t, cp - cname),
|
||||
- CAST(const char *, cname))) == -1)
|
||||
+ RCAST(char *, cname))) == -1)
|
||||
return -1;
|
||||
*flags |= FLAGS_DID_CORE;
|
||||
return 1;
|
||||
@@ -1185,13 +1185,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
|
||||
|
||||
if (namesz & 0x80000000) {
|
||||
(void)file_printf(ms, ", bad note name size %#lx",
|
||||
- CAST(unsigned long, namesz);
|
||||
+ CAST(unsigned long, namesz));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (descsz & 0x80000000) {
|
||||
(void)file_printf(ms, ", bad note description size %#lx",
|
||||
- CAST(unsigned long, descsz);
|
||||
+ CAST(unsigned long, descsz));
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
29
file-5.40-6b34436a.patch
Normal file
29
file-5.40-6b34436a.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 6b34436ac766dae64749b8d14f18c6910be40131 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 5 Apr 2021 16:36:14 +0000
|
||||
Subject: [PATCH] remove "u" from the pattern (Joerg Jenderek)
|
||||
|
||||
---
|
||||
magic/Magdir/mail.news | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git magic/Magdir/mail.news magic/Magdir/mail.news
|
||||
index 3a2eeb96..6a222910 100644
|
||||
--- magic/Magdir/mail.news
|
||||
+++ magic/Magdir/mail.news
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
-# $File: mail.news,v 1.26 2021/03/21 14:37:03 christos Exp $
|
||||
+# $File: mail.news,v 1.27 2021/04/05 16:36:14 christos Exp $
|
||||
# mail.news: file(1) magic for mail and news
|
||||
#
|
||||
# Unfortunately, saved netnews also has From line added in some news software.
|
||||
@@ -81,4 +81,4 @@
|
||||
# File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format
|
||||
# From: Stephen Gildea
|
||||
0 string CRYPTED\003\007 Dovecot encrypted message
|
||||
->9 byte xu \b, dcrypt version %d
|
||||
+>9 byte x \b, dcrypt version %d
|
||||
--
|
||||
2.26.2
|
||||
|
35
file-5.40-749e1ecf.patch
Normal file
35
file-5.40-749e1ecf.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 749e1ecfc3d333e5ec8b1a2e639da7ccb2498c34 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 19 Apr 2021 18:38:04 +0000
|
||||
Subject: [PATCH] PR/256: mutableVoid: If the file is less than 3 bytes, use
|
||||
the file length to determine type
|
||||
|
||||
---
|
||||
src/encoding.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index 0fb1f47b..31d4d125 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-FILE_RCSID("@(#)$File: encoding.c,v 1.30 2021/04/09 19:16:51 christos Exp $")
|
||||
+FILE_RCSID("@(#)$File: encoding.c,v 1.31 2021/04/19 18:38:04 christos Exp $")
|
||||
#endif /* lint */
|
||||
|
||||
#include "magic.h"
|
||||
@@ -285,7 +285,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
|
||||
if (dist[i]) \
|
||||
u++; \
|
||||
} \
|
||||
- if (u < 3) \
|
||||
+ if (u < MIN(nbytes, 3)) \
|
||||
return 0; \
|
||||
\
|
||||
return 1; \
|
||||
--
|
||||
2.28.0
|
||||
|
40
file-5.40-9b0459af.patch
Normal file
40
file-5.40-9b0459af.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 9b0459afab309a82aa4e46f73a4e50dd641f3d39 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Mon, 19 Apr 2021 17:01:45 +0000
|
||||
Subject: [PATCH] PR/257: cuihao: put attributes inside the xz magic.
|
||||
|
||||
---
|
||||
magic/Magdir/compress | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git magic/Magdir/compress magic/Magdir/compress
|
||||
index 64d11a73..41a65738 100644
|
||||
--- magic/Magdir/compress
|
||||
+++ magic/Magdir/compress
|
||||
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
-# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $
|
||||
+# $File: compress,v 1.81 2021/04/19 17:01:45 christos Exp $
|
||||
# compress: file(1) magic for pure-compression formats (no archives)
|
||||
#
|
||||
# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
|
||||
@@ -265,14 +265,13 @@
|
||||
|
||||
# http://tukaani.org/xz/xz-file-format.txt
|
||||
0 ustring \xFD7zXZ\x00 XZ compressed data, checksum
|
||||
+!:strength * 2
|
||||
+!:mime application/x-xz
|
||||
>7 byte&0xf 0x0 NONE
|
||||
>7 byte&0xf 0x1 CRC32
|
||||
>7 byte&0xf 0x4 CRC64
|
||||
>7 byte&0xf 0xa SHA-256
|
||||
|
||||
-!:strength * 2
|
||||
-!:mime application/x-xz
|
||||
-
|
||||
# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
|
||||
0 string LRZI LRZIP compressed data
|
||||
>4 byte x - version %d
|
||||
--
|
||||
2.28.0
|
||||
|
25
file-5.40-9e2becec.patch
Normal file
25
file-5.40-9e2becec.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 9e2becec20d023409a1671bf10a682f699350e85 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Sun, 4 Apr 2021 21:03:43 +0000
|
||||
Subject: [PATCH] Encoding bug fix.
|
||||
|
||||
---
|
||||
ChangeLog | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git ChangeLog ChangeLog
|
||||
index 23a93cf4..2238ba6f 100644
|
||||
--- ChangeLog
|
||||
+++ ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2021-04-04 17:02 Christos Zoulas <christos@zoulas.com>
|
||||
+
|
||||
+ * count the total bytes found not the total byte positions
|
||||
+ in order to determine encoding (Anatol Belski)
|
||||
+
|
||||
2021-03-30 20:21 Christos Zoulas <christos@zoulas.com>
|
||||
|
||||
* release 5.40
|
||||
--
|
||||
2.26.2
|
||||
|
27
file-5.40-ascii.patch
Normal file
27
file-5.40-ascii.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From a806b7c99870f76c5fcf3d34f9d91f37685e1a1c Mon Sep 17 00:00:00 2001
|
||||
From: Werner Fink <werner@suse.de>
|
||||
Date: Fri, 23 Apr 2021 09:32:09 +0200
|
||||
Subject: [PATCH] Count every ASCII character
|
||||
|
||||
Signed-off-by: Werner Fink <werner@suse.de>
|
||||
---
|
||||
src/encoding.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index 31d4d125..686be210 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
|
||||
} \
|
||||
u = 0; \
|
||||
for (i = 0; i < __arraycount(dist); i++) { \
|
||||
- if (dist[i]) \
|
||||
- u++; \
|
||||
+ u += dist[i]; \
|
||||
} \
|
||||
if (u < MIN(nbytes, 3)) \
|
||||
return 0; \
|
||||
--
|
||||
2.28.0
|
||||
|
BIN
file-5.40-f0601504.patch
Normal file
BIN
file-5.40-f0601504.patch
Normal file
Binary file not shown.
35
file-5.40-f7705dca.patch
Normal file
35
file-5.40-f7705dca.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From f7705dca0be7aacc8ce96d842860c419f755c26e Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 9 Apr 2021 19:16:51 +0000
|
||||
Subject: [PATCH] fix previous (cast >>)
|
||||
|
||||
---
|
||||
src/encoding.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git src/encoding.c src/encoding.c
|
||||
index 691e3e16..0fb1f47b 100644
|
||||
--- src/encoding.c
|
||||
+++ src/encoding.c
|
||||
@@ -1,5 +1,3 @@
|
||||
-/* $NetBSD: encoding.c,v 1.1.1.13 2021/04/09 18:58:01 christos Exp $ */
|
||||
-
|
||||
/*
|
||||
* Copyright (c) Ian F. Darwin 1986-1995.
|
||||
* Software written by Ian F. Darwin and others;
|
||||
@@ -37,11 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
#ifndef lint
|
||||
-#if 0
|
||||
-FILE_RCSID("@(#)$File: encoding.c,v 1.29 2021/04/09 19:16:19 christos Exp $")
|
||||
-#else
|
||||
-__RCSID("$NetBSD: encoding.c,v 1.1.1.13 2021/04/09 18:58:01 christos Exp $");
|
||||
-#endif
|
||||
+FILE_RCSID("@(#)$File: encoding.c,v 1.30 2021/04/09 19:16:51 christos Exp $")
|
||||
#endif /* lint */
|
||||
|
||||
#include "magic.h"
|
||||
--
|
||||
2.28.0
|
||||
|
3
file-5.40.tar.gz
Normal file
3
file-5.40.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57
|
||||
size 1004214
|
6
file-5.40.tar.gz.asc
Normal file
6
file-5.40.tar.gz.asc
Normal file
@ -0,0 +1,6 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iEYEABECAAYFAmBjwi8ACgkQcREqsWyzOzqPZACg3n6WHlN341UvKicQmlHzHH4k
|
||||
pAEAoM0y5+X+eyLF2gMhUpFMI5CCvZZG
|
||||
=5WpY
|
||||
-----END PGP SIGNATURE-----
|
@ -22,7 +22,7 @@ Index: file-5.38/src/file.h
|
||||
===================================================================
|
||||
--- file-5.38.orig/src/file.h
|
||||
+++ file-5.38/src/file.h
|
||||
@@ -676,4 +676,12 @@ static const char *rcsid(const char *p)
|
||||
@@ -691,4 +691,12 @@ static const char *rcsid(const char *p)
|
||||
#define __RCSID(a)
|
||||
#endif
|
||||
|
||||
|
62
file.changes
62
file.changes
@ -1,3 +1,65 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 23 10:26:49 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch file-5.40-ascii.patch
|
||||
* fix regressions on dection of smaller ASCII files (boo#1184899)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 22 13:42:49 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream comitts as patches
|
||||
* file-5.40-9b0459af.patch
|
||||
put attributes inside the xz magic. (boo#1184888, boo#1184891)
|
||||
* file-5.40-749e1ecf.patch
|
||||
If the file is less than 3 bytes, use the file length to determine type
|
||||
* file-5.40-f0601504.patch
|
||||
Fix regression after unsigned/signed printing changes
|
||||
* file-5.40-f7705dca.patch
|
||||
fix previous (cast >>)
|
||||
* file-5.40-3096f87f.patch
|
||||
Correct return values to exptexted
|
||||
* file-5.40-4c5fe1ad.patch
|
||||
Add missing parens
|
||||
- Port patch
|
||||
* file-5.28-btrfs-image.dif
|
||||
due patch file-5.40-f0601504.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 6 07:39:00 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream commits as patches
|
||||
* file-5.40-1c677c04.patch
|
||||
Don't count each byte encounter as 1, count the total number
|
||||
of bytes found (Anatol Belski). This makes it behave like 5.39
|
||||
* file-5.40-6b34436a.patch
|
||||
remove "u" from the pattern (Joerg Jenderek)
|
||||
* file-5.40-9e2becec.patch
|
||||
Encoding bug fix
|
||||
- Fix offsets of patches
|
||||
* file-5.17-option.dif
|
||||
* file-5.19-biorad.dif
|
||||
* file-5.19-printf.dif
|
||||
* file-5.19-zip2.0.dif
|
||||
* file-5.22-elf.dif
|
||||
* file-5.23-endian.patch
|
||||
* file-5.28-btrfs-image.dif
|
||||
* file-5.38-allow-readlinkat.dif
|
||||
* file-secure_getenv.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 3 07:32:11 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 5.40:
|
||||
* Add limit to the number of bytes to scan for encoding
|
||||
* Fix /T (trim flag) for regex
|
||||
* Trim trailing separator.
|
||||
* Convert system read errors from corrupt ELF
|
||||
files into human readable error messages
|
||||
* Exclude surrogate pairs from utf-8 detection
|
||||
- drop upstreamed patches:
|
||||
* file-5.16-ocloexec.patch
|
||||
* file-5.39-alternate_format.dif
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 10 13:41:42 UTC 2021 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
28
file.spec
28
file.spec
@ -33,7 +33,7 @@ Obsoletes: file-64bit
|
||||
%endif
|
||||
#
|
||||
# Set Version also in python-magic.spec
|
||||
Version: 5.39
|
||||
Version: 5.40
|
||||
Release: 0
|
||||
Summary: A Tool to Determine File Types
|
||||
License: BSD-2-Clause
|
||||
@ -60,12 +60,22 @@ Patch26: file-5.19-solv.dif
|
||||
Patch27: file-5.19-zip2.0.dif
|
||||
Patch31: file-5.19-biorad.dif
|
||||
Patch32: file-5.19-clicfs.dif
|
||||
Patch33: file-5.16-ocloexec.patch
|
||||
Patch34: file-5.23-endian.patch
|
||||
Patch37: file-secure_getenv.patch
|
||||
Patch39: file-5.28-btrfs-image.dif
|
||||
Patch40: file-5.38-allow-readlinkat.dif
|
||||
Patch42: file-5.39-alternate_format.dif
|
||||
# Upstream commits as patches
|
||||
Patch41: file-5.40-1c677c04.patch
|
||||
Patch42: file-5.40-9e2becec.patch
|
||||
Patch43: file-5.40-6b34436a.patch
|
||||
Patch44: file-5.40-9b0459af.patch
|
||||
Patch45: file-5.40-f0601504.patch
|
||||
Patch46: file-5.40-3096f87f.patch
|
||||
Patch47: file-5.40-f7705dca.patch
|
||||
Patch48: file-5.40-749e1ecf.patch
|
||||
Patch49: file-5.40-4c5fe1ad.patch
|
||||
# My fix of the ASCII count bug
|
||||
Patch60: file-5.40-ascii.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global _sysconfdir /etc
|
||||
%global _miscdir %{_datadir}/misc
|
||||
@ -109,6 +119,16 @@ to develop applications that require the magic "file" interface.
|
||||
|
||||
%prep
|
||||
%setup -q -n file-%{version}
|
||||
%patch41 -p0
|
||||
%patch42 -p0
|
||||
%patch43 -p0
|
||||
%patch44 -p0
|
||||
%patch45 -p0
|
||||
%patch46 -p0
|
||||
%patch47 -p0
|
||||
%patch48 -p0
|
||||
%patch49 -p0
|
||||
%patch60 -p0
|
||||
%patch1 -p0 -b .misc
|
||||
%patch4 -p0 -b .conf
|
||||
%patch5 -p0 -b .tex
|
||||
@ -125,12 +145,10 @@ to develop applications that require the magic "file" interface.
|
||||
%patch27 -p0 -b .zip2.0
|
||||
%patch31 -p0 -b .biorad
|
||||
%patch32 -p0 -b .clicfs
|
||||
%patch33 -p0 -b .clexe
|
||||
%patch34 -p0 -b .endian
|
||||
%patch37 -p1 -b .getenv
|
||||
%patch39 -p1 -b .btrfs
|
||||
%patch40 -p1 -b .readlinkat
|
||||
%patch42 -p0 -b .af
|
||||
%patch -b .0
|
||||
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
|
||||
rm -fv src/magic.h
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 3 07:32:11 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 5.40:
|
||||
* file 5.40, no changes specific to python-magic
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 17 14:03:49 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
|
@ -27,7 +27,7 @@ BuildRequires: libtool
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: zlib-devel
|
||||
URL: http://www.darwinsys.com/file/
|
||||
Version: 5.39
|
||||
Version: 5.40
|
||||
Release: 0
|
||||
Summary: Python module to use libmagic
|
||||
License: BSD-3-Clause AND BSD-4-Clause
|
||||
|
Loading…
Reference in New Issue
Block a user