From 8ac4c4d262c0256f41bb00cc77530549f8209f1cc379aca515357af95078b263 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 15 Oct 2018 11:15:31 +0000 Subject: [PATCH 1/5] Update to file 5.34 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=181 --- file-4.24-autoconf.dif | 10 +++--- file-5.12-zip.dif | 2 +- file-5.15-clear-invalid.patch | 2 +- file-5.16-ocloexec.patch | 6 ++-- file-5.19-biorad.dif | 2 +- file-5.19-printf.dif | 2 +- file-5.19-zip2.0.dif | 2 +- file-5.22-elf.dif | 4 +-- file-5.23-endian.patch | 4 +-- file-5.28-btrfs-image.dif | 2 +- file-5.33.tar.gz | 3 -- file-5.33.tar.gz.asc | 6 ---- file-5.33.dif => file-5.34.dif | 60 +++++++++++++++++----------------- file-5.34.tar.gz | 3 ++ file-5.34.tar.gz.asc | 6 ++++ file-a642587a9c.patch | 20 ------------ file-secure_getenv.patch | 6 ++-- file.changes | 14 ++++++++ file.spec | 7 ++-- python-magic.spec | 2 +- 20 files changed, 77 insertions(+), 86 deletions(-) delete mode 100644 file-5.33.tar.gz delete mode 100644 file-5.33.tar.gz.asc rename file-5.33.dif => file-5.34.dif (91%) create mode 100644 file-5.34.tar.gz create mode 100644 file-5.34.tar.gz.asc delete mode 100644 file-a642587a9c.patch diff --git a/file-4.24-autoconf.dif b/file-4.24-autoconf.dif index 28161b6..98fdbbb 100644 --- a/file-4.24-autoconf.dif +++ b/file-4.24-autoconf.dif @@ -4,7 +4,7 @@ 2 files changed, 8 insertions(+), 2 deletions(-) --- doc/Makefile.am -+++ doc/Makefile.am 2017-05-24 10:58:47.226494450 +0000 ++++ doc/Makefile.am 2018-07-26 10:42:25.474794639 +0000 @@ -5,7 +5,8 @@ else man_MAGIC = magic.4 endif @@ -26,7 +26,7 @@ sed -e s@__CSECTION__@1@g \ -e s@__FSECTION__@${fsect}@g \ --- src/readelf.h -+++ src/readelf.h 2017-05-24 10:58:47.226494450 +0000 ++++ src/readelf.h 2018-07-26 10:44:03.744990438 +0000 @@ -34,7 +34,10 @@ #ifndef __fake_elf_h__ #define __fake_elf_h__ @@ -38,9 +38,9 @@ #include #endif -@@ -430,4 +433,5 @@ typedef struct { - #define AV_386_SSE4_1 0x00800000 - #define AV_386_SSE4_2 0x01000000 +@@ -542,4 +545,5 @@ typedef struct { + #define DF_1_STUB 0x04000000 /* Stub */ + #define DF_1_PIE 0x08000000 /* Position Independent Executable */ +__END_DECLS #endif diff --git a/file-5.12-zip.dif b/file-5.12-zip.dif index 3a5ca0c..259ac5b 100644 --- a/file-5.12-zip.dif +++ b/file-5.12-zip.dif @@ -4,7 +4,7 @@ --- magic/Magdir/archive +++ magic/Magdir/archive 2018-06-12 14:15:56.676369965 +0000 -@@ -1020,6 +1020,25 @@ +@@ -1021,6 +1021,25 @@ !:mime application/zip !:ext zip/cbz 0 string PK\003\004 diff --git a/file-5.15-clear-invalid.patch b/file-5.15-clear-invalid.patch index 9879743..d48cfb6 100644 --- a/file-5.15-clear-invalid.patch +++ b/file-5.15-clear-invalid.patch @@ -13,7 +13,7 @@ fixed build warning: --- file-5.28/magic/Magdir/elf +++ file-5.28/magic/Magdir/elf 2016-08-16 11:50:06.748513191 +0000 -@@ -56,7 +56,6 @@ +@@ -61,7 +61,6 @@ #>>>(0x38+0xcc) string >\0 of '%s' #>>>(0x38+0x10) lelong >0 (signal %d), >16 leshort &0xff00 processor-specific, diff --git a/file-5.16-ocloexec.patch b/file-5.16-ocloexec.patch index 7a9fc99..be88b4d 100644 --- a/file-5.16-ocloexec.patch +++ b/file-5.16-ocloexec.patch @@ -16,7 +16,7 @@ if (f == NULL) { if (errno != ENOENT) file_error(ms, errno, "cannot read magic file `%s'", -@@ -3045,7 +3045,7 @@ apprentice_map(struct magic_set *ms, con +@@ -3051,7 +3051,7 @@ apprentice_map(struct magic_set *ms, con if (dbname == NULL) goto error; @@ -25,7 +25,7 @@ goto error; if (fstat(fd, &st) == -1) { -@@ -3182,7 +3182,7 @@ apprentice_compile(struct magic_set *ms, +@@ -3188,7 +3188,7 @@ apprentice_compile(struct magic_set *ms, if (dbname == NULL) goto out; @@ -36,7 +36,7 @@ goto out; --- src/compress.c +++ src/compress.c 2018-06-12 14:21:21.286557983 +0000 -@@ -396,7 +396,7 @@ file_pipe2file(struct magic_set *ms, int +@@ -411,7 +411,7 @@ file_pipe2file(struct magic_set *ms, int #else { int te; diff --git a/file-5.19-biorad.dif b/file-5.19-biorad.dif index ff586b6..fd5a1dc 100644 --- a/file-5.19-biorad.dif +++ b/file-5.19-biorad.dif @@ -4,7 +4,7 @@ --- magic/Magdir/images +++ magic/Magdir/images 2018-06-12 14:20:39.967297749 +0000 -@@ -1017,6 +1017,8 @@ +@@ -1023,6 +1023,8 @@ # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt # Samples: http://www.loci.wisc.edu/software/sample-data 14 leshort <2 diff --git a/file-5.19-printf.dif b/file-5.19-printf.dif index fd656f6..667baec 100644 --- a/file-5.19-printf.dif +++ b/file-5.19-printf.dif @@ -4,7 +4,7 @@ --- src/apprentice.c +++ src/apprentice.c 2018-06-12 14:15:19.109042630 +0000 -@@ -2411,6 +2411,12 @@ check_format_type(const char *ptr, int t +@@ -2417,6 +2417,12 @@ check_format_type(const char *ptr, int t ptr++; if (*ptr == '#') ptr++; diff --git a/file-5.19-zip2.0.dif b/file-5.19-zip2.0.dif index 0e3674e..c7683ff 100644 --- a/file-5.19-zip2.0.dif +++ b/file-5.19-zip2.0.dif @@ -4,7 +4,7 @@ --- magic/Magdir/archive +++ magic/Magdir/archive 2018-06-12 14:17:31.598670365 +0000 -@@ -1014,6 +1014,11 @@ +@@ -1015,6 +1015,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 diff --git a/file-5.22-elf.dif b/file-5.22-elf.dif index 4764317..62bf3bd 100644 --- a/file-5.22-elf.dif +++ b/file-5.22-elf.dif @@ -4,7 +4,7 @@ --- src/readelf.c +++ src/readelf.c 2018-06-12 14:14:14.054207494 +0000 -@@ -743,7 +743,7 @@ do_core_note(struct magic_set *ms, unsig +@@ -767,7 +767,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 -@@ -755,7 +755,9 @@ do_core_note(struct magic_set *ms, unsig +@@ -779,7 +779,9 @@ do_core_note(struct magic_set *ms, unsig * If the characters aren't all printable, * reject it. */ diff --git a/file-5.23-endian.patch b/file-5.23-endian.patch index 04b4207..312d094 100644 --- a/file-5.23-endian.patch +++ b/file-5.23-endian.patch @@ -28,7 +28,7 @@ private char *mkdbname(struct magic_set *, const char *, int); private struct magic_map *apprentice_buf(struct magic_set *, struct magic *, size_t); -@@ -3260,67 +3263,6 @@ byteswap(struct magic *magic, uint32_t n +@@ -3280,67 +3280,6 @@ byteswap(struct magic *magic, uint32_t n } /* @@ -106,7 +106,7 @@ #ifndef EFTYPE #define EFTYPE EINVAL -@@ -109,55 +110,9 @@ cdf_calloc(const char *file __attribute_ +@@ -112,55 +112,9 @@ cdf_calloc(const char *file __attribute_ return calloc(n, u); } diff --git a/file-5.28-btrfs-image.dif b/file-5.28-btrfs-image.dif index 73b0df9..31341c4 100644 --- a/file-5.28-btrfs-image.dif +++ b/file-5.28-btrfs-image.dif @@ -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 -@@ -2245,20 +2245,29 @@ +@@ -2267,20 +2267,29 @@ >>0x10060 string >\0 lockproto %s) # Russell Coker diff --git a/file-5.33.tar.gz b/file-5.33.tar.gz deleted file mode 100644 index 9d417c2..0000000 --- a/file-5.33.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c52c8c3d271cd898d5511c36a68059cda94036111ab293f01f83c3525b737c6 -size 817060 diff --git a/file-5.33.tar.gz.asc b/file-5.33.tar.gz.asc deleted file mode 100644 index 87e1d09..0000000 --- a/file-5.33.tar.gz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iEYEABECAAYFAlrToaMACgkQcREqsWyzOzrTHwCdG6Qlc1qsB9YcfZXYwRfXQivE -9SkAn0/ecDZhfJzgHtQM59gCgNXG4S9h -=nWes ------END PGP SIGNATURE----- diff --git a/file-5.33.dif b/file-5.34.dif similarity index 91% rename from file-5.33.dif rename to file-5.34.dif index 76c4b70..d4fe122 100644 --- a/file-5.33.dif +++ b/file-5.34.dif @@ -10,8 +10,8 @@ 8 files changed, 312 insertions(+), 67 deletions(-) --- magic/Magdir/elf -+++ magic/Magdir/elf 2018-06-12 14:34:49.439837299 +0000 -@@ -129,7 +129,7 @@ ++++ magic/Magdir/elf 2018-10-15 10:57:39.702000661 +0000 +@@ -133,7 +133,7 @@ >18 leshort 47 Renesas H8/300H, >18 leshort 48 Renesas H8S, >18 leshort 49 Renesas H8/500, @@ -21,8 +21,8 @@ >18 leshort 52 Motorola Coldfire, >18 leshort 53 Motorola M68HC12, --- magic/Magdir/linux -+++ magic/Magdir/linux 2018-06-12 14:34:49.439837299 +0000 -@@ -101,23 +101,27 @@ ++++ magic/Magdir/linux 2018-10-15 10:57:39.702000661 +0000 +@@ -111,23 +111,27 @@ # and Nicolas Lichtmaier # 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) @@ -67,7 +67,7 @@ 0 belong 0xb8c0078e Linux kernel >0x1e3 string Loading version 1.3.79 or older --- magic/Magdir/msad -+++ magic/Magdir/msad 2018-06-12 14:34:49.439837299 +0000 ++++ magic/Magdir/msad 2018-10-15 10:57:39.706000588 +0000 @@ -0,0 +1,5 @@ +#------------------------------------------------------------------------------ +# msad: file(1) magic for msad @@ -75,7 +75,7 @@ +# This must precede the heuristic for raw G3 data +4 string Standard\ Jet\ DB Microsoft Access Database --- magic/Magdir/msdos -+++ magic/Magdir/msdos 2018-06-12 14:34:49.439837299 +0000 ++++ magic/Magdir/msdos 2018-10-15 10:57:39.706000588 +0000 @@ -104,9 +104,9 @@ >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) >>>(0x3c.l+22) leshort&0x1000 >0 system file @@ -98,7 +98,7 @@ # updated by Joerg Jenderek at Oct 2008,2015 --- magic/Makefile.am -+++ magic/Makefile.am 2018-06-12 15:09:37.077835298 +0000 ++++ magic/Makefile.am 2018-10-15 10:57:39.706000588 +0000 @@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) @@ -116,7 +116,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/apt \ -@@ -89,7 +88,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ +@@ -90,7 +89,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ @@ -124,7 +124,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -131,6 +129,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -132,6 +130,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -133,7 +133,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -139,7 +139,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -140,7 +140,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -141,7 +141,7 @@ $(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/lua \ -@@ -147,7 +146,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ +@@ -148,7 +147,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ $(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/macos \ @@ -149,7 +149,7 @@ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/make \ -@@ -170,10 +168,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -171,10 +169,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ @@ -161,7 +161,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msvc \ -@@ -225,6 +223,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -226,6 +224,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -170,7 +170,7 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rtf \ -@@ -301,8 +301,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -302,8 +302,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ $(MAGIC_FRAGMENT_DIR)/zyxel @@ -192,7 +192,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 -@@ -314,19 +326,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ +@@ -315,19 +327,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ FILE_COMPILE_DEP = $(FILE_COMPILE) endif @@ -232,8 +232,8 @@ +# $(FILE_COMPILE) -C -m magic +# @rm -fr magic --- magic/Makefile.in -+++ magic/Makefile.in 2018-06-12 15:13:56.753087818 +0000 -@@ -237,7 +237,7 @@ top_srcdir = @top_srcdir@ ++++ magic/Makefile.in 2018-10-15 10:59:39.151808275 +0000 +@@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) @@ -242,7 +242,7 @@ EXTRA_DIST = \ $(MAGIC_DIR)/Header \ $(MAGIC_DIR)/Localstuff \ -@@ -254,7 +254,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ +@@ -295,7 +295,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ $(MAGIC_FRAGMENT_DIR)/aout \ $(MAGIC_FRAGMENT_DIR)/apache \ $(MAGIC_FRAGMENT_DIR)/apl \ @@ -250,7 +250,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/apt \ -@@ -320,7 +319,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ +@@ -362,7 +361,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ @@ -258,7 +258,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -362,6 +360,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -404,6 +402,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -267,7 +267,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -370,7 +370,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -412,7 +412,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -275,7 +275,7 @@ $(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/lua \ -@@ -378,7 +377,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ +@@ -420,7 +419,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ $(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/macos \ @@ -283,7 +283,7 @@ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/make \ -@@ -401,10 +399,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -443,10 +441,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ @@ -295,7 +295,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msvc \ -@@ -456,6 +454,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -498,6 +496,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -304,7 +304,7 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rtf \ -@@ -532,10 +532,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -574,10 +574,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ $(MAGIC_FRAGMENT_DIR)/zyxel @@ -328,9 +328,9 @@ # 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} -@@ -756,23 +768,25 @@ uninstall-am: uninstall-pkgdataDATA - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags-am uninstall uninstall-am uninstall-pkgdataDATA +@@ -799,23 +811,25 @@ uninstall-am: uninstall-pkgdataDATA + + .PRECIOUS: Makefile +${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW) + $(FILE_COMPILE) -C -m $(RAW) @@ -371,7 +371,7 @@ # 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 2018-06-12 14:34:49.487836425 +0000 ++++ src/Makefile.am 2018-10-15 10:57:39.706000588 +0000 @@ -1,4 +1,4 @@ -MAGIC = $(pkgdatadir)/magic +MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic @@ -379,7 +379,7 @@ nodist_include_HEADERS = magic.h --- src/dcore.c -+++ src/dcore.c 2018-06-12 14:34:49.487836425 +0000 ++++ src/dcore.c 2018-10-15 10:57:39.706000588 +0000 @@ -0,0 +1,207 @@ +/* + * Show goo about ELF core files diff --git a/file-5.34.tar.gz b/file-5.34.tar.gz new file mode 100644 index 0000000..332293d --- /dev/null +++ b/file-5.34.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f15a50dbbfa83fec0bd1161e8e191b092ec832720e30cd14536e044ac623b20a +size 840219 diff --git a/file-5.34.tar.gz.asc b/file-5.34.tar.gz.asc new file mode 100644 index 0000000..0b078a0 --- /dev/null +++ b/file-5.34.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iEYEABECAAYFAltYEXYACgkQcREqsWyzOzpnxwCfXZkGLqYAncdftwkXdBzWNGeM +bEkAoLHe7Q7/a0vgs1QI4ChwOnJbMkJA +=F+1u +-----END PGP SIGNATURE----- diff --git a/file-a642587a9c.patch b/file-a642587a9c.patch deleted file mode 100644 index 258d154..0000000 --- a/file-a642587a9c.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit a642587a9c9e2dd7feacdf513c3643ce26ad3c22 -Author: Christos Zoulas -Date: Sat Jun 9 16:00:06 2018 +0000 - - Avoid reading past the end of buffer (Rui Reis) - -diff --git src/readelf.c src/readelf.c -index 79c83f9f..1f41b461 100644 ---- src/readelf.c -+++ src/readelf.c -@@ -842,7 +842,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, - - cname = (unsigned char *) - &nbuf[doff + prpsoffsets(i)]; -- for (cp = cname; *cp && isprint(*cp); cp++) -+ for (cp = cname; cp < nbuf + size && *cp -+ && isprint(*cp); cp++) - continue; - /* - * Linux apparently appends a space at the end diff --git a/file-secure_getenv.patch b/file-secure_getenv.patch index 3eeacd2..3ee871d 100644 --- a/file-secure_getenv.patch +++ b/file-secure_getenv.patch @@ -7,7 +7,7 @@ --- file-5.29/configure.ac +++ file-5.29/configure.ac 2016-11-24 09:13:33.451612426 +0000 -@@ -97,6 +97,8 @@ AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_S +@@ -102,6 +102,8 @@ AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_S #include #endif]) @@ -18,7 +18,7 @@ AC_TYPE_OFF_T --- file-5.29/src/file.c +++ file-5.29/src/file.c 2016-11-24 09:13:33.451612426 +0000 -@@ -623,7 +623,7 @@ docprint(const char *opts, int def) +@@ -648,7 +648,7 @@ docprint(const char *opts, int def) private void help(void) { @@ -29,7 +29,7 @@ "Determine type of FILEs.\n" --- file-5.29/src/file.h +++ file-5.29/src/file.h 2016-11-24 09:13:33.451612426 +0000 -@@ -615,4 +615,12 @@ static const char *rcsid(const char *p) +@@ -652,4 +652,12 @@ static const char *rcsid(const char *p) #define __RCSID(a) #endif diff --git a/file.changes b/file.changes index 12ec77b..f7e6bb5 100644 --- a/file.changes +++ b/file.changes @@ -1,8 +1,22 @@ +------------------------------------------------------------------- +Mon Oct 15 11:08:06 UTC 2018 - Dr. Werner Fink + +- Update new signing key file as well + ------------------------------------------------------------------- Fri Aug 10 11:58:41 UTC 2018 - astieger@suse.com - add upstream signing key and verify source signature +------------------------------------------------------------------- +Thu Jul 26 11:47:32 UTC 2018 - werner@suse.de + +- Update to file version 5.33 + * Add Quad indirect offsets + * Enable parsing of ELF dynamic sections to handle PIE better +- Remove upstream patch file-a642587a9c.patch +- Rename patch file-5.33.dif which now becomes file-5.34.dif + ------------------------------------------------------------------- Tue Jun 12 15:16:15 UTC 2018 - werner@suse.de diff --git a/file.spec b/file.spec index 1ed2bec..f96ffcd 100644 --- a/file.spec +++ b/file.spec @@ -30,7 +30,7 @@ Obsoletes: file-64bit %endif # # Set Version also in python-magic.spec -Version: 5.33 +Version: 5.34 Release: 0 Summary: A Tool to Determine File Types License: BSD-2-Clause @@ -40,7 +40,7 @@ Source2: baselibs.conf Source3: file-rpmlintrc Source4: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz.asc Source5: file.keyring -Patch: file-5.33.dif +Patch: file-5.34.dif Patch1: file-5.19-misc.dif Patch4: file-4.24-autoconf.dif Patch5: file-5.14-tex.dif @@ -64,8 +64,6 @@ Patch35: file-5.24-nitpick.dif Patch36: file-5.15-clear-invalid.patch Patch37: file-secure_getenv.patch Patch39: file-5.28-btrfs-image.dif -# PATCH-FIX-USTREAM or bsc#1096974, bsc#1096984, and CVE-2018-10360 -- Avoid reading past the end of buffer -Patch54: file-a642587a9c.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _miscdir %{_datadir}/misc @@ -134,7 +132,6 @@ to develop applications that require the magic "file" interface. %patch36 -p1 -b .clear %patch37 -p1 -b .getenv %patch39 -p1 -b .btrfs -%patch54 %patch -b .0 test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in rm -fv src/magic.h diff --git a/python-magic.spec b/python-magic.spec index 2afc551..5b29b40 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -28,7 +28,7 @@ BuildRequires: libtool BuildRequires: python-rpm-macros BuildRequires: zlib-devel Url: http://www.darwinsys.com/file/ -Version: 5.33 +Version: 5.34 Release: 0 Summary: Python module to use libmagic License: BSD-3-Clause AND BSD-4-Clause From c99810fb57842816cdc587c1f46a8ec7f13d733b0cfc22a0a9f7c2c72833b32a Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 15 Oct 2018 11:20:52 +0000 Subject: [PATCH 2/5] Update to file 5.34 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=182 --- file.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.changes b/file.changes index f7e6bb5..629aa3e 100644 --- a/file.changes +++ b/file.changes @@ -11,7 +11,7 @@ Fri Aug 10 11:58:41 UTC 2018 - astieger@suse.com ------------------------------------------------------------------- Thu Jul 26 11:47:32 UTC 2018 - werner@suse.de -- Update to file version 5.33 +- Update to file version 5.34 * Add Quad indirect offsets * Enable parsing of ELF dynamic sections to handle PIE better - Remove upstream patch file-a642587a9c.patch From 650ab2cba79257fef4f5d1b80cc810e6df91fa715eb063f61f6e52e0e55e4a5d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 15 Oct 2018 14:02:58 +0000 Subject: [PATCH 3/5] Let python tree install OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=183 --- file.spec | 2 +- python-magic.spec | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/file.spec b/file.spec index f96ffcd..4deb726 100644 --- a/file.spec +++ b/file.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # diff --git a/python-magic.spec b/python-magic.spec index 5b29b40..f21dfd0 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -47,6 +47,7 @@ interface. %prep %{expand:%(sed -n -e '/^%%prep/,/^%%build/p' <%{_sourcedir}/file.spec | sed -e '1d' -e '$d')} +ln -sf README.md python/README %build pushd python From c8540fe22bf545f118e9976a9e4700169f74714d0bd14e17c7ccc83e697c3c3d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 22 Oct 2018 08:10:34 +0000 Subject: [PATCH 4/5] Update to file-5.35 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=184 --- file-5.16-ocloexec.patch | 46 +++++++++++++------------- file-5.17-option.dif | 8 ++--- file-5.19-biorad.dif | 2 +- file-5.19-printf.dif | 2 +- file-5.22-elf.dif | 4 +-- file-5.23-endian.patch | 43 ++++++++++++------------ file-5.24-nitpick.dif | 10 +++--- file-5.34.tar.gz | 3 -- file-5.34.tar.gz.asc | 6 ---- file-5.34.dif => file-5.35.dif | 60 +++++++++++++++++----------------- file-5.35.tar.gz | 3 ++ file-5.35.tar.gz.asc | 6 ++++ file-secure_getenv.patch | 40 +++++++++++------------ file.changes | 21 ++++++++++++ file.spec | 6 ++-- python-magic.spec | 2 +- 16 files changed, 142 insertions(+), 120 deletions(-) delete mode 100644 file-5.34.tar.gz delete mode 100644 file-5.34.tar.gz.asc rename file-5.34.dif => file-5.35.dif (91%) create mode 100644 file-5.35.tar.gz create mode 100644 file-5.35.tar.gz.asc diff --git a/file-5.16-ocloexec.patch b/file-5.16-ocloexec.patch index be88b4d..efd6fea 100644 --- a/file-5.16-ocloexec.patch +++ b/file-5.16-ocloexec.patch @@ -6,8 +6,8 @@ 4 files changed, 6 insertions(+), 6 deletions(-) --- src/apprentice.c -+++ src/apprentice.c 2018-06-12 14:21:21.286557983 +0000 -@@ -1146,7 +1146,7 @@ load_1(struct magic_set *ms, int action, ++++ src/apprentice.c 2018-10-22 07:46:50.986423768 +0000 +@@ -1154,7 +1154,7 @@ load_1(struct magic_set *ms, int action, ssize_t len; struct magic_entry me; @@ -16,7 +16,7 @@ if (f == NULL) { if (errno != ENOENT) file_error(ms, errno, "cannot read magic file `%s'", -@@ -3051,7 +3051,7 @@ apprentice_map(struct magic_set *ms, con +@@ -3061,7 +3061,7 @@ apprentice_map(struct magic_set *ms, con if (dbname == NULL) goto error; @@ -25,29 +25,29 @@ goto error; if (fstat(fd, &st) == -1) { -@@ -3188,7 +3188,7 @@ apprentice_compile(struct magic_set *ms, - if (dbname == NULL) +@@ -3198,7 +3198,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) +- 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 2018-06-12 14:21:21.286557983 +0000 -@@ -411,7 +411,7 @@ file_pipe2file(struct magic_set *ms, int - #else ++++ src/compress.c 2018-10-22 07:47:40.645502604 +0000 +@@ -423,7 +423,7 @@ file_pipe2file(struct magic_set *ms, int { int te; + int ou = umask(0); - tfd = mkstemp(buf); + tfd = mkostemp(buf, O_CLOEXEC); + (void)umask(ou); te = errno; (void)unlink(buf); - errno = te; --- src/file.c -+++ src/file.c 2018-06-12 14:22:13.777618129 +0000 -@@ -496,7 +496,7 @@ unwrap(struct magic_set *ms, const char ++++ src/file.c 2018-10-22 07:45:35.907816294 +0000 +@@ -499,7 +499,7 @@ unwrap(struct magic_set *ms, const char f = stdin; wid = 1; } else { @@ -57,13 +57,13 @@ return 1; } --- src/magic.c -+++ src/magic.c 2018-06-12 14:21:21.286557983 +0000 -@@ -442,7 +442,7 @@ file_or_fd(struct magic_set *ms, const c - else - pos = lseek(fd, (off_t)0, SEEK_CUR); - } else { -- int flags = O_RDONLY|O_BINARY; -+ int flags = O_RDONLY|O_BINARY|O_CLOEXEC; - int okstat = stat(inname, &sb) == 0; - - if (okstat && S_ISFIFO(sb.st_mode)) { ++++ src/magic.c 2018-10-22 07:49:39.471290675 +0000 +@@ -434,7 +434,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) { + int okstat = stat(inname, &sb) == 0; diff --git a/file-5.17-option.dif b/file-5.17-option.dif index af1f004..8d7825f 100644 --- a/file-5.17-option.dif +++ b/file-5.17-option.dif @@ -4,7 +4,7 @@ --- src/file.c +++ src/file.c 2018-06-12 14:16:45.847489541 +0000 -@@ -242,6 +242,8 @@ main(int argc, char *argv[]) +@@ -244,6 +244,8 @@ main(int argc, char *argv[]) flags |= MAGIC_ERROR; break; case 'e': @@ -13,7 +13,7 @@ for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++) if (strcmp(nv[i].name, optarg) == 0) break; -@@ -253,7 +255,7 @@ main(int argc, char *argv[]) +@@ -255,7 +257,7 @@ main(int argc, char *argv[]) break; case 'f': @@ -22,7 +22,7 @@ usage(); if (magic == NULL) if ((magic = load(magicfile, flags)) == NULL) -@@ -263,6 +265,8 @@ main(int argc, char *argv[]) +@@ -265,6 +267,8 @@ main(int argc, char *argv[]) ++didsomefiles; break; case 'F': @@ -31,7 +31,7 @@ separator = optarg; break; case 'i': -@@ -275,6 +279,8 @@ main(int argc, char *argv[]) +@@ -277,6 +281,8 @@ main(int argc, char *argv[]) action = FILE_LIST; break; case 'm': diff --git a/file-5.19-biorad.dif b/file-5.19-biorad.dif index fd5a1dc..1cb6a3b 100644 --- a/file-5.19-biorad.dif +++ b/file-5.19-biorad.dif @@ -4,7 +4,7 @@ --- magic/Magdir/images +++ magic/Magdir/images 2018-06-12 14:20:39.967297749 +0000 -@@ -1023,6 +1023,8 @@ +@@ -1026,6 +1026,8 @@ # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt # Samples: http://www.loci.wisc.edu/software/sample-data 14 leshort <2 diff --git a/file-5.19-printf.dif b/file-5.19-printf.dif index 667baec..96dd1b4 100644 --- a/file-5.19-printf.dif +++ b/file-5.19-printf.dif @@ -4,7 +4,7 @@ --- src/apprentice.c +++ src/apprentice.c 2018-06-12 14:15:19.109042630 +0000 -@@ -2417,6 +2417,12 @@ check_format_type(const char *ptr, int t +@@ -2427,6 +2427,12 @@ check_format_type(const char *ptr, int t ptr++; if (*ptr == '#') ptr++; diff --git a/file-5.22-elf.dif b/file-5.22-elf.dif index 62bf3bd..7d15c0c 100644 --- a/file-5.22-elf.dif +++ b/file-5.22-elf.dif @@ -4,7 +4,7 @@ --- src/readelf.c +++ src/readelf.c 2018-06-12 14:14:14.054207494 +0000 -@@ -767,7 +767,7 @@ do_core_note(struct magic_set *ms, unsig +@@ -796,7 +796,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 -@@ -779,7 +779,9 @@ do_core_note(struct magic_set *ms, unsig +@@ -808,7 +808,9 @@ do_core_note(struct magic_set *ms, unsig * If the characters aren't all printable, * reject it. */ diff --git a/file-5.23-endian.patch b/file-5.23-endian.patch index 312d094..1ee34ff 100644 --- a/file-5.23-endian.patch +++ b/file-5.23-endian.patch @@ -1,19 +1,20 @@ --- - src/apprentice.c | 70 ++++--------------------------------------------------- + src/apprentice.c | 71 ++++--------------------------------------------------- src/cdf.c | 53 +++-------------------------------------- - 2 files changed, 10 insertions(+), 113 deletions(-) + 2 files changed, 10 insertions(+), 114 deletions(-) --- src/apprentice.c -+++ src/apprentice.c 2017-09-13 10:32:39.981204996 +0000 -@@ -54,6 +54,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. - #if defined(HAVE_LIMITS_H) - #include ++++ src/apprentice.c 2018-10-22 07:53:29.562977637 +0000 +@@ -50,7 +50,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1. #endif + #include + #include +- +#include - #ifndef SSIZE_MAX - #define MAXMAGIC_SIZE ((ssize_t)0x7fffffff) -@@ -132,9 +133,11 @@ private struct mlist *mlist_alloc(void); + #define EATAB {while (isascii((unsigned char) *l) && \ + isspace((unsigned char) *l)) ++l;} +@@ -123,9 +123,11 @@ private struct mlist *mlist_alloc(void); private void mlist_free(struct mlist *); private void byteswap(struct magic *, uint32_t); private void bs1(struct magic *); @@ -28,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); -@@ -3280,67 +3280,6 @@ byteswap(struct magic *magic, uint32_t n +@@ -3290,67 +3292,6 @@ byteswap(struct magic *magic, uint32_t n } /* @@ -38,8 +39,8 @@ -swap2(uint16_t sv) -{ - uint16_t rv; -- uint8_t *s = (uint8_t *)(void *)&sv; -- uint8_t *d = (uint8_t *)(void *)&rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; - d[0] = s[1]; - d[1] = s[0]; - return rv; @@ -52,8 +53,8 @@ -swap4(uint32_t sv) -{ - uint32_t rv; -- uint8_t *s = (uint8_t *)(void *)&sv; -- uint8_t *d = (uint8_t *)(void *)&rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; - d[0] = s[3]; - d[1] = s[2]; - d[2] = s[1]; @@ -68,8 +69,8 @@ -swap8(uint64_t sv) -{ - uint64_t rv; -- uint8_t *s = (uint8_t *)(void *)&sv; -- uint8_t *d = (uint8_t *)(void *)&rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; -#if 0 - d[0] = s[3]; - d[1] = s[2]; @@ -97,16 +98,16 @@ */ private void --- src/cdf.c -+++ src/cdf.c 2017-09-13 10:32:39.981204996 +0000 -@@ -50,6 +50,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.106 201 - #ifdef HAVE_LIMITS_H ++++ src/cdf.c 2018-10-22 07:54:09.366231573 +0000 +@@ -48,6 +48,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.113 201 + #include + #include #include - #endif +#include #ifndef EFTYPE #define EFTYPE EINVAL -@@ -112,55 +112,9 @@ cdf_calloc(const char *file __attribute_ +@@ -113,55 +114,9 @@ cdf_calloc(const char *file __attribute_ return calloc(n, u); } diff --git a/file-5.24-nitpick.dif b/file-5.24-nitpick.dif index 2e84f70..a8c62be 100644 --- a/file-5.24-nitpick.dif +++ b/file-5.24-nitpick.dif @@ -4,7 +4,7 @@ 2 files changed, 10 insertions(+), 2 deletions(-) --- src/file.c -+++ src/file.c 2018-06-12 14:32:11.918707401 +0000 ++++ src/file.c 2018-10-22 07:56:59.735038350 +0000 @@ -108,10 +108,12 @@ private const struct option long_options #define OPT_MIME_ENCODING 5 #define OPT(shortname, longname, opt, def, doc) \ @@ -18,7 +18,7 @@ #undef OPT_LONGONLY {0, 0, NULL, 0} }; -@@ -646,6 +648,7 @@ docprint(const char *opts, int def) +@@ -649,6 +651,7 @@ docprint(const char *opts, int def) private void help(void) { @@ -26,7 +26,7 @@ (void)fputs( "Usage: file [OPTION...] [FILE...]\n" "Determine type of FILEs.\n" -@@ -653,11 +656,16 @@ help(void) +@@ -656,11 +659,16 @@ help(void) #define OPT(shortname, longname, opt, def, doc) \ fprintf(stdout, " -%c, --" longname, shortname), \ docprint(doc, def); @@ -41,10 +41,10 @@ #undef OPT +#undef OPT_POSIX #undef OPT_LONGONLY - fprintf(stdout, "\nReport bugs to http://bugs.gw.com/\n"); + fprintf(stdout, "\nReport bugs to https://bugs.astron.com/\n"); exit(EXIT_SUCCESS); --- src/file_opts.h -+++ src/file_opts.h 2018-06-12 14:23:04.096699503 +0000 ++++ src/file_opts.h 2018-10-22 07:55:03.281221021 +0000 @@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, " OPT('k', "keep-going", 0, 0, " don't stop at the first match\n") OPT('l', "list", 0, 0, " list magic strength\n") diff --git a/file-5.34.tar.gz b/file-5.34.tar.gz deleted file mode 100644 index 332293d..0000000 --- a/file-5.34.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f15a50dbbfa83fec0bd1161e8e191b092ec832720e30cd14536e044ac623b20a -size 840219 diff --git a/file-5.34.tar.gz.asc b/file-5.34.tar.gz.asc deleted file mode 100644 index 0b078a0..0000000 --- a/file-5.34.tar.gz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iEYEABECAAYFAltYEXYACgkQcREqsWyzOzpnxwCfXZkGLqYAncdftwkXdBzWNGeM -bEkAoLHe7Q7/a0vgs1QI4ChwOnJbMkJA -=F+1u ------END PGP SIGNATURE----- diff --git a/file-5.34.dif b/file-5.35.dif similarity index 91% rename from file-5.34.dif rename to file-5.35.dif index d4fe122..b59d380 100644 --- a/file-5.34.dif +++ b/file-5.35.dif @@ -10,7 +10,7 @@ 8 files changed, 312 insertions(+), 67 deletions(-) --- magic/Magdir/elf -+++ magic/Magdir/elf 2018-10-15 10:57:39.702000661 +0000 ++++ magic/Magdir/elf 2018-10-22 07:59:13.300535081 +0000 @@ -133,7 +133,7 @@ >18 leshort 47 Renesas H8/300H, >18 leshort 48 Renesas H8S, @@ -21,7 +21,7 @@ >18 leshort 52 Motorola Coldfire, >18 leshort 53 Motorola M68HC12, --- magic/Magdir/linux -+++ magic/Magdir/linux 2018-10-15 10:57:39.702000661 +0000 ++++ magic/Magdir/linux 2018-10-22 07:59:13.300535081 +0000 @@ -111,23 +111,27 @@ # and Nicolas Lichtmaier # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 @@ -67,7 +67,7 @@ 0 belong 0xb8c0078e Linux kernel >0x1e3 string Loading version 1.3.79 or older --- magic/Magdir/msad -+++ magic/Magdir/msad 2018-10-15 10:57:39.706000588 +0000 ++++ magic/Magdir/msad 2018-10-22 07:59:13.300535081 +0000 @@ -0,0 +1,5 @@ +#------------------------------------------------------------------------------ +# msad: file(1) magic for msad @@ -75,8 +75,8 @@ +# This must precede the heuristic for raw G3 data +4 string Standard\ Jet\ DB Microsoft Access Database --- magic/Magdir/msdos -+++ magic/Magdir/msdos 2018-10-15 10:57:39.706000588 +0000 -@@ -104,9 +104,9 @@ ++++ magic/Magdir/msdos 2018-10-22 07:59:13.300535081 +0000 +@@ -135,9 +135,9 @@ >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) >>>(0x3c.l+22) leshort&0x1000 >0 system file >>>(0x3c.l+24) leshort 0x010b @@ -88,7 +88,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) -@@ -473,7 +473,7 @@ +@@ -520,7 +520,7 @@ # negative offset, must not lead into PSP >1 short <-259 # that offset must be accessible @@ -98,7 +98,7 @@ # updated by Joerg Jenderek at Oct 2008,2015 --- magic/Makefile.am -+++ magic/Makefile.am 2018-10-15 10:57:39.706000588 +0000 ++++ magic/Makefile.am 2018-10-22 08:03:21.007892910 +0000 @@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) @@ -116,7 +116,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/apt \ -@@ -90,7 +89,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ +@@ -91,7 +90,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ @@ -124,7 +124,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -132,6 +130,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -135,6 +133,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -133,7 +133,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -140,7 +140,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -144,7 +144,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -141,7 +141,7 @@ $(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/lua \ -@@ -148,7 +147,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ +@@ -152,7 +151,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ $(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/macos \ @@ -149,7 +149,7 @@ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/make \ -@@ -171,10 +169,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -175,10 +173,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ @@ -161,7 +161,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msvc \ -@@ -226,6 +224,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -230,6 +228,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -170,14 +170,14 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rtf \ -@@ -302,8 +302,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -306,8 +306,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ - $(MAGIC_FRAGMENT_DIR)/zyxel + $(MAGIC_FRAGMENT_DIR)/zyxel +RAW = magic MAGIC = magic.mgc -CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff -+CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW} ++CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ${RAW} + +${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST) + cat /dev/null > $@ @@ -192,7 +192,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 -@@ -315,19 +327,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ +@@ -319,19 +331,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ FILE_COMPILE_DEP = $(FILE_COMPILE) endif @@ -232,7 +232,7 @@ +# $(FILE_COMPILE) -C -m magic +# @rm -fr magic --- magic/Makefile.in -+++ magic/Makefile.in 2018-10-15 10:59:39.151808275 +0000 ++++ magic/Makefile.in 2018-10-22 08:05:13.073792870 +0000 @@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -250,7 +250,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/apt \ -@@ -362,7 +361,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ +@@ -363,7 +362,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ @@ -258,7 +258,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -404,6 +402,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -407,6 +405,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -267,7 +267,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -412,7 +412,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -416,7 +416,6 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -275,7 +275,7 @@ $(MAGIC_FRAGMENT_DIR)/lisp \ $(MAGIC_FRAGMENT_DIR)/llvm \ $(MAGIC_FRAGMENT_DIR)/lua \ -@@ -420,7 +419,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ +@@ -424,7 +423,6 @@ $(MAGIC_FRAGMENT_DIR)/luks \ $(MAGIC_FRAGMENT_DIR)/m4 \ $(MAGIC_FRAGMENT_DIR)/mach \ $(MAGIC_FRAGMENT_DIR)/macos \ @@ -283,7 +283,7 @@ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/make \ -@@ -443,10 +441,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -447,10 +445,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ @@ -295,7 +295,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msx \ $(MAGIC_FRAGMENT_DIR)/msvc \ -@@ -498,6 +496,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -502,6 +500,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -304,14 +304,14 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rtf \ -@@ -574,10 +574,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -578,10 +578,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ - $(MAGIC_FRAGMENT_DIR)/zyxel + $(MAGIC_FRAGMENT_DIR)/zyxel +RAW = magic MAGIC = magic.mgc -CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff -+CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW} ++CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ${RAW} @IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file${EXEEXT} +${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST) @@ -328,7 +328,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} -@@ -799,23 +811,25 @@ uninstall-am: uninstall-pkgdataDATA +@@ -803,23 +815,25 @@ uninstall-am: uninstall-pkgdataDATA .PRECIOUS: Makefile @@ -371,7 +371,7 @@ # 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 2018-10-15 10:57:39.706000588 +0000 ++++ src/Makefile.am 2018-10-22 07:59:13.328534557 +0000 @@ -1,4 +1,4 @@ -MAGIC = $(pkgdatadir)/magic +MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic @@ -379,7 +379,7 @@ nodist_include_HEADERS = magic.h --- src/dcore.c -+++ src/dcore.c 2018-10-15 10:57:39.706000588 +0000 ++++ src/dcore.c 2018-10-22 07:59:13.344534255 +0000 @@ -0,0 +1,207 @@ +/* + * Show goo about ELF core files diff --git a/file-5.35.tar.gz b/file-5.35.tar.gz new file mode 100644 index 0000000..2194b98 --- /dev/null +++ b/file-5.35.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30c45e817440779be7aac523a905b123cba2a6ed0bf4f5439e1e99ba940b5546 +size 865425 diff --git a/file-5.35.tar.gz.asc b/file-5.35.tar.gz.asc new file mode 100644 index 0000000..672bc24 --- /dev/null +++ b/file-5.35.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iEYEABECAAYFAlvJGcMACgkQcREqsWyzOzpYYQCgsAWYc53UEoPl3kkJpFPn7wzX +IAQAnjfEPZBlmALT0+8OOy1jvP1Xgswb +=wYfS +-----END PGP SIGNATURE----- diff --git a/file-secure_getenv.patch b/file-secure_getenv.patch index 3ee871d..f69d4fd 100644 --- a/file-secure_getenv.patch +++ b/file-secure_getenv.patch @@ -1,24 +1,24 @@ --- - file-5.29/configure.ac | 2 ++ - file-5.29/src/file.c | 2 +- - file-5.29/src/file.h | 8 ++++++++ - file-5.29/src/magic.c | 10 +++++----- + file-5.35/configure.ac | 2 ++ + file-5.35/src/file.c | 2 +- + file-5.35/src/file.h | 8 ++++++++ + file-5.35/src/magic.c | 10 +++++----- 4 files changed, 16 insertions(+), 6 deletions(-) ---- file-5.29/configure.ac -+++ file-5.29/configure.ac 2016-11-24 09:13:33.451612426 +0000 -@@ -102,6 +102,8 @@ AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_S - #include - #endif]) +--- file-5.35/configure.ac ++++ file-5.35/configure.ac 2018-10-22 07:58:32.773294624 +0000 +@@ -99,6 +99,8 @@ if test "$enable_zlib" != "no"; then + fi + AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include ]) +AC_CHECK_FUNCS([__secure_getenv secure_getenv]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T ---- file-5.29/src/file.c -+++ file-5.29/src/file.c 2016-11-24 09:13:33.451612426 +0000 -@@ -648,7 +648,7 @@ docprint(const char *opts, int def) +--- file-5.35/src/file.c ++++ file-5.35/src/file.c 2018-10-22 07:57:43.206223603 +0000 +@@ -651,7 +651,7 @@ docprint(const char *opts, int def) private void help(void) { @@ -27,9 +27,9 @@ (void)fputs( "Usage: file [OPTION...] [FILE...]\n" "Determine type of FILEs.\n" ---- file-5.29/src/file.h -+++ file-5.29/src/file.h 2016-11-24 09:13:33.451612426 +0000 -@@ -652,4 +652,12 @@ static const char *rcsid(const char *p) +--- file-5.35/src/file.h ++++ file-5.35/src/file.h 2018-10-22 07:57:43.206223603 +0000 +@@ -658,4 +658,12 @@ static const char *rcsid(const char *p) #define __RCSID(a) #endif @@ -42,9 +42,9 @@ +#endif + #endif /* __file_h__ */ ---- file-5.29/src/magic.c -+++ file-5.29/src/magic.c 2016-11-24 09:13:33.451612426 +0000 -@@ -185,7 +185,7 @@ get_default_magic(void) +--- file-5.35/src/magic.c ++++ file-5.35/src/magic.c 2018-10-22 07:57:43.206223603 +0000 +@@ -183,7 +183,7 @@ get_default_magic(void) free(default_magic); default_magic = NULL; } @@ -53,7 +53,7 @@ return MAGIC; if (asprintf(&hmagicpath, "%s/.magic.mgc", home) < 0) -@@ -222,16 +222,16 @@ out: +@@ -220,16 +220,16 @@ out: } /* First, try to get a magic file from user-application data */ @@ -73,7 +73,7 @@ _w32_append_path(&hmagicpath, "%s%s", home, hmagic); /* Fourth, try to get magic file relative to exe location */ -@@ -252,7 +252,7 @@ magic_getpath(const char *magicfile, int +@@ -250,7 +250,7 @@ magic_getpath(const char *magicfile, int if (magicfile != NULL) return magicfile; diff --git a/file.changes b/file.changes index 629aa3e..5683349 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Mon Oct 22 08:07:33 UTC 2018 - Dr. Werner Fink + +- Update to file version 5.35 + * Add FreeBSD ELF core file support (John Baldwin) + * PR/30: Allow all parameter values to be set (don't treat 0 specially) + * handle default annotations on the softmagic match instead at the + end. + * PR/23: Recognize JSON files + * PR/18: file --mime-encoding should not print mime-type +- Modify the patches + * file-5.16-ocloexec.patch + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.22-elf.dif + * file-5.23-endian.patch + * file-5.24-nitpick.dif + * file-secure_getenv.patch +- Modify and rename patch file-5.34.dif which becomes file-5.35.dif + ------------------------------------------------------------------- Mon Oct 15 11:08:06 UTC 2018 - Dr. Werner Fink diff --git a/file.spec b/file.spec index 4deb726..ec53ab3 100644 --- a/file.spec +++ b/file.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -30,7 +30,7 @@ Obsoletes: file-64bit %endif # # Set Version also in python-magic.spec -Version: 5.34 +Version: 5.35 Release: 0 Summary: A Tool to Determine File Types License: BSD-2-Clause @@ -40,7 +40,7 @@ Source2: baselibs.conf Source3: file-rpmlintrc Source4: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz.asc Source5: file.keyring -Patch: file-5.34.dif +Patch: file-5.35.dif Patch1: file-5.19-misc.dif Patch4: file-4.24-autoconf.dif Patch5: file-5.14-tex.dif diff --git a/python-magic.spec b/python-magic.spec index f21dfd0..e467450 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # From 82db481f4d38d95277e019997f00d7e959ddc7348253b4adbf32845ac7e81865 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 25 Oct 2018 06:11:02 +0000 Subject: [PATCH 5/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=185 --- file.spec | 2 +- python-magic.changes | 5 +++++ python-magic.spec | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/file.spec b/file.spec index ec53ab3..8119e6d 100644 --- a/file.spec +++ b/file.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # diff --git a/python-magic.changes b/python-magic.changes index b85c724..04d1e36 100644 --- a/python-magic.changes +++ b/python-magic.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 25 06:09:52 UTC 2018 - Dr. Werner Fink + +- Correct version of file which is now 5.35 + ------------------------------------------------------------------- Wed Jun 13 07:49:54 UTC 2018 - werner@suse.de diff --git a/python-magic.spec b/python-magic.spec index e467450..b9912f1 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -28,7 +28,7 @@ BuildRequires: libtool BuildRequires: python-rpm-macros BuildRequires: zlib-devel Url: http://www.darwinsys.com/file/ -Version: 5.34 +Version: 5.35 Release: 0 Summary: Python module to use libmagic License: BSD-3-Clause AND BSD-4-Clause