From f8673cfbc7ebcc18e4d1a7bd3f7b60db5c63314e7f95e12b0ad54b685c48c9c6 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 12 Aug 2024 07:31:23 +0000 Subject: [PATCH] - Don't use `setup.py test`, that is now not allowed. OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=278 --- .gitattributes | 23 + .gitignore | 1 + _multibuild | 4 + baselibs.conf | 7 + file-4.20-ssd.dif | 15 + file-4.20-xen.dif | 12 + file-4.21-scribus.dif | 10 + file-4.21-xcursor.dif | 9 + file-4.24-autoconf.dif | 46 + file-5.14-tex.dif | 15 + file-5.17-option.dif | 40 + file-5.18-javacheck.dif | 13 + file-5.19-biorad.dif | 17 + file-5.19-clicfs.dif | 14 + file-5.19-cromfs.dif | 19 + file-5.19-misc.dif | 11 + file-5.19-printf.dif | 17 + file-5.19-solv.dif | 10 + file-5.19-zip2.0.dif | 18 + file-5.22-elf.dif | 28 + file-5.28-btrfs-image.dif | 63 ++ file-5.45-type_t.dif | 42 + file-5.45.dif | 598 ++++++++++++ file-5.45.tar.gz | 3 + file-5.45.tar.gz.asc | 6 + file-rpmlintrc | 2 + file-secure_getenv.patch | 77 ++ file.changes | 1925 +++++++++++++++++++++++++++++++++++++ file.keyring | 43 + file.spec | 215 +++++ pre_checkin.sh | 4 + python-magic.changes | 222 +++++ python-magic.spec | 72 ++ 33 files changed, 3601 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 baselibs.conf create mode 100644 file-4.20-ssd.dif create mode 100644 file-4.20-xen.dif create mode 100644 file-4.21-scribus.dif create mode 100644 file-4.21-xcursor.dif create mode 100644 file-4.24-autoconf.dif create mode 100644 file-5.14-tex.dif create mode 100644 file-5.17-option.dif create mode 100644 file-5.18-javacheck.dif create mode 100644 file-5.19-biorad.dif create mode 100644 file-5.19-clicfs.dif create mode 100644 file-5.19-cromfs.dif create mode 100644 file-5.19-misc.dif create mode 100644 file-5.19-printf.dif create mode 100644 file-5.19-solv.dif create mode 100644 file-5.19-zip2.0.dif create mode 100644 file-5.22-elf.dif create mode 100644 file-5.28-btrfs-image.dif create mode 100644 file-5.45-type_t.dif create mode 100644 file-5.45.dif create mode 100644 file-5.45.tar.gz create mode 100644 file-5.45.tar.gz.asc create mode 100644 file-rpmlintrc create mode 100644 file-secure_getenv.patch create mode 100644 file.changes create mode 100644 file.keyring create mode 100644 file.spec create mode 100644 pre_checkin.sh create mode 100644 python-magic.changes create mode 100644 python-magic.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..055bd16 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + python-magic + + diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..2145d8e --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,7 @@ +libmagic1 + requires "file-magic = " + targettype 32bit provides "file-:/usr/lib/libmagic.so.1" + +file-devel + requires -file- + requires "libmagic1- = " diff --git a/file-4.20-ssd.dif b/file-4.20-ssd.dif new file mode 100644 index 0000000..7ca3f27 --- /dev/null +++ b/file-4.20-ssd.dif @@ -0,0 +1,15 @@ +--- magic/Localstuff ++++ magic/Localstuff 2013-09-30 00:00:00.000000000 +0000 +@@ -14,3 +14,12 @@ + >33 string >\0 (%s) + 2 string \000\022 TeX font metric data + >33 string >\0 (%s) ++ ++# XXX some MS Structured Storage Documents such as Adobe PageMaker[tm] ++# files interfere with the Microsoft Office Document and the SSD starting ++# sequence \320\317\021\340\241\261\032\341. Anyone who knows ++# more details about the scheme of such SSDs and can help to extend this to all ++# type of SSD, please let us know. E.g. how is the offset to the `Root Entry' ++# determined? ++512 search/531 R\0o\0o\0t\0\ \0E\0n\0t\0r\0y Structured Storage ++>&109 search/17 P\0a\0g\0e\0M\0a\0k\0e\0r PageMaker diff --git a/file-4.20-xen.dif b/file-4.20-xen.dif new file mode 100644 index 0000000..36f51ea --- /dev/null +++ b/file-4.20-xen.dif @@ -0,0 +1,12 @@ +--- magic/Localstuff ++++ magic/Localstuff 2013-09-30 00:00:00.000000000 +0000 +@@ -23,3 +23,9 @@ + # determined? + 512 search/531 R\0o\0o\0t\0\ \0E\0n\0t\0r\0y Structured Storage + >&109 search/17 P\0a\0g\0e\0M\0a\0k\0e\0r PageMaker ++ ++# File magic for Xen, the virtual machine monitor for x86 ++0 string LinuxGuestRecord Xen saved domain ++#>2 regex \(name\ [^)]*\) %s ++>20 search/256 (name (name ++>>&1 string x %s...) diff --git a/file-4.21-scribus.dif b/file-4.21-scribus.dif new file mode 100644 index 0000000..31a0327 --- /dev/null +++ b/file-4.21-scribus.dif @@ -0,0 +1,10 @@ +--- magic/Localstuff ++++ magic/Localstuff 2013-09-30 00:00:00.000000000 +0000 +@@ -29,3 +29,7 @@ + #>2 regex \(name\ [^)]*\) %s + >20 search/256 (name (name + >>&1 string x %s...) ++ ++# File magic for Scribus, an Open Source Desktop Publishing system ++0 string \ $@ + +-magic.${fsect}: Makefile magic.man ++#magic.${fsect}: Makefile magic.man ++magic.5: Makefile magic.man + @rm -f $@ + sed -e s@__CSECTION__@1@g \ + -e s@__FSECTION__@${fsect}@g \ +--- src/readelf.h ++++ src/readelf.h 2018-07-26 10:44:03.744990438 +0000 +@@ -34,7 +34,10 @@ + #ifndef __fake_elf_h__ + #define __fake_elf_h__ + ++#include ++ + #if HAVE_STDINT_H ++__BEGIN_DECLS + #include + #endif + +@@ -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.14-tex.dif b/file-5.14-tex.dif new file mode 100644 index 0000000..663b0ed --- /dev/null +++ b/file-5.14-tex.dif @@ -0,0 +1,15 @@ +--- magic/Localstuff ++++ magic/Localstuff 2013-09-30 00:00:00.000000000 +0000 +@@ -5,3 +5,12 @@ + # $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $ + # Add any locally observed files here. Remember: + # text if readable, executable if runnable binary, data if unreadable. ++ ++# XXX promoted from tex so that *.tfm is not mis-identified as mc68k file. ++# There is no way to detect TeX Font Metric (*.tfm) files without ++# breaking them apart and reading the data. The following patterns ++# match most *.tfm files generated by METAFONT or afm2tfm. ++2 string \000\021 TeX font metric data ++>33 string >\0 (%s) ++2 string \000\022 TeX font metric data ++>33 string >\0 (%s) diff --git a/file-5.17-option.dif b/file-5.17-option.dif new file mode 100644 index 0000000..a3d6273 --- /dev/null +++ b/file-5.17-option.dif @@ -0,0 +1,40 @@ +Index: file-5.43/src/file.c +=================================================================== +--- file-5.43.orig/src/file.c ++++ file-5.43/src/file.c +@@ -263,6 +263,8 @@ main(int argc, char *argv[]) + break; + case 'e': + case OPT_EXCLUDE_QUIET: ++ if (!optarg) ++ usage(); + for (i = 0; i < __arraycount(nv); i++) + if (strcmp(nv[i].name, optarg) == 0) + break; +@@ -275,7 +277,7 @@ main(int argc, char *argv[]) + break; + + case 'f': +- if(action) ++ if(action || !optarg) + usage(); + if (magic == NULL) + if ((magic = load(magicfile, flags)) == NULL) +@@ -285,6 +287,8 @@ main(int argc, char *argv[]) + ++didsomefiles; + break; + case 'F': ++ if(!optarg) ++ usage(); + separator = optarg; + break; + case 'i': +@@ -297,6 +301,8 @@ main(int argc, char *argv[]) + action = FILE_LIST; + break; + case 'm': ++ if(!optarg) ++ usage(); + magicfile = optarg; + break; + case 'n': diff --git a/file-5.18-javacheck.dif b/file-5.18-javacheck.dif new file mode 100644 index 0000000..f8178cf --- /dev/null +++ b/file-5.18-javacheck.dif @@ -0,0 +1,13 @@ +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 ubelong >30 compiled Java class data, + !:mime application/x-java-applet + #!:mime application/java-byte-code diff --git a/file-5.19-biorad.dif b/file-5.19-biorad.dif new file mode 100644 index 0000000..a997a17 --- /dev/null +++ b/file-5.19-biorad.dif @@ -0,0 +1,17 @@ +--- + magic/Magdir/images | 2 ++ + 1 file changed, 2 insertions(+) + +Index: magic/Magdir/images +=================================================================== +--- magic/Magdir/images.orig ++++ magic/Magdir/images +@@ -2180,6 +2180,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 uleshort <2 ++>4 uleshort >0 ++>49 byte 0 + >62 uleshort <2 + >>54 uleshort 12345 Bio-Rad .PIC Image File + >>>0 uleshort >0 %d x diff --git a/file-5.19-clicfs.dif b/file-5.19-clicfs.dif new file mode 100644 index 0000000..8f25d1c --- /dev/null +++ b/file-5.19-clicfs.dif @@ -0,0 +1,14 @@ +--- magic/Localstuff ++++ magic/Localstuff 2013-09-30 00:00:00.000000000 +0000 +@@ -53,3 +53,11 @@ + + 0 string SOLV Sat-solver solv file, + >4 belong x version %d ++ ++# coolo's clicfs ++ ++0 string/b CLIC ClicFS ++>4 byte x \b Version %c ++>5 byte x \b%c ++>6 long >0 ++>>6 pstring/l >0 \b, Target "%s" diff --git a/file-5.19-cromfs.dif b/file-5.19-cromfs.dif new file mode 100644 index 0000000..6319028 --- /dev/null +++ b/file-5.19-cromfs.dif @@ -0,0 +1,19 @@ +--- magic/Localstuff ++++ magic/Localstuff 2014-06-25 08:49:53.486735323 +0000 +@@ -36,3 +36,16 @@ + + # File magic for X11 cursor data files + 0 string Xcur\020\000 X11 cursor data ++ ++# File magic for CROM File System ++ ++0 string CROMFS CROMFS ++>6 string >\0 \b version %2.2s, ++>8 ulequad >0 \b block data at %lld, ++>16 ulequad >0 \b fblock table at %lld, ++>24 ulequad >0 \b inode table at %lld, ++>32 ulequad >0 \b root at %lld, ++>40 ulelong >0 \b fblock size = %d, ++>44 ulelong >0 \b block size = %d, ++>48 ulequad >0 \b bytes = %lld ++ diff --git a/file-5.19-misc.dif b/file-5.19-misc.dif new file mode 100644 index 0000000..e55ea26 --- /dev/null +++ b/file-5.19-misc.dif @@ -0,0 +1,11 @@ +--- magic/Magdir/audio ++++ magic/Magdir/audio 2013-09-30 00:00:00.000000000 +0000 +@@ -129,7 +129,7 @@ + # Oct 31, 1995 + # fixed by 2003-06-24 + # Too short... +-#0 string MTM MultiTracker Module sound file ++#0 string MTM MultiTracker Module sound data + #0 string if Composer 669 Module sound data + #0 string JN Composer 669 Module sound data (extended format) + 0 string MAS_U ULT(imate) Module sound data diff --git a/file-5.19-printf.dif b/file-5.19-printf.dif new file mode 100644 index 0000000..f2a2636 --- /dev/null +++ b/file-5.19-printf.dif @@ -0,0 +1,17 @@ +--- + src/apprentice.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: src/apprentice.c +=================================================================== +--- src/apprentice.c.orig ++++ src/apprentice.c +@@ -2623,7 +2623,7 @@ check_format_type(const char *ptr, int t + } + } else + h = 0; +- while (*ptr && strchr("-.#", *ptr) != NULL) ++ while (*ptr && strchr("-.# +'", *ptr) != NULL) + ptr++; + #define CHECKLEN() do { \ + for (len = cnt = 0; isdigit(CAST(unsigned char, *ptr)); ptr++, cnt++) \ diff --git a/file-5.19-solv.dif b/file-5.19-solv.dif new file mode 100644 index 0000000..1fca437 --- /dev/null +++ b/file-5.19-solv.dif @@ -0,0 +1,10 @@ +--- magic/Localstuff ++++ magic/Localstuff 2014-06-25 08:53:43.110735387 +0000 +@@ -49,3 +49,7 @@ + >44 ulelong >0 \b block size = %d, + >48 ulequad >0 \b bytes = %lld + ++# libsatsolver solv file ++ ++0 string SOLV Sat-solver solv file, ++>4 belong x version %d diff --git a/file-5.19-zip2.0.dif b/file-5.19-zip2.0.dif new file mode 100644 index 0000000..82cc635 --- /dev/null +++ b/file-5.19-zip2.0.dif @@ -0,0 +1,18 @@ +--- + magic/Magdir/archive | 5 +++++ + 1 file changed, 5 insertions(+) + +--- magic/Magdir/archive ++++ magic/Magdir/archive 2023-07-28 09:40:12.243809381 +0000 +@@ -1622,6 +1622,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 ++>30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to extract ++>>34 ubelong 0x74797065 \b, mime type ++>>>38 regex application/[a-z+-]+ \b %s ++!:mime application/unknown+zip ++!:ext zip/cbz + + # Android APK file (Zip archive) + 0 string PK\003\004 diff --git a/file-5.22-elf.dif b/file-5.22-elf.dif new file mode 100644 index 0000000..09bfa98 --- /dev/null +++ b/file-5.22-elf.dif @@ -0,0 +1,28 @@ +--- + src/readelf.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: src/readelf.c +=================================================================== +--- src/readelf.c.orig ++++ src/readelf.c +@@ -825,7 +825,7 @@ do_core_note(struct magic_set *ms, unsig + + default: + if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) { +- size_t i, j; ++ size_t i, j, m = 0; + unsigned char c; + /* + * Extract the program name. We assume +@@ -837,7 +837,9 @@ do_core_note(struct magic_set *ms, unsig + * If the characters aren't all printable, + * reject it. + */ +- for (i = 0; i < NOFFSETS; i++) { ++ if (os_style == OS_STYLE_SVR4) ++ m = 1; ++ for (i = m; i < NOFFSETS; i++) { + unsigned char *cname, *cp; + size_t reloffset = prpsoffsets(i); + size_t noffset = doff + reloffset; diff --git a/file-5.28-btrfs-image.dif b/file-5.28-btrfs-image.dif new file mode 100644 index 0000000..1150383 --- /dev/null +++ b/file-5.28-btrfs-image.dif @@ -0,0 +1,63 @@ +From 27ec95a88943d858433a492940c694bac4bc54d0 Mon Sep 17 00:00:00 2001 +From: Jeff Mahoney +Date: Thu, 20 Oct 2016 11:29:21 -0400 +Subject: [PATCH] Add BTRFS Filesystem Metadata Image +Patch-mainline: Submitted to file@mx.gw.com, 20 Oct 2016 + +The btrfs-image in its uncompressed form contains a directly usable +superblock. Rather than duplicate the superblock printer, split +that out and use it with both the on-disk superblock and the ones +contained within the image. + +--- + magic/Magdir/filesystems | 37 +++++++++++++++++++++++-------------- + 1 file changed, 23 insertions(+), 14 deletions(-) + +Index: file-5.43/magic/Magdir/filesystems +=================================================================== +--- file-5.43.orig/magic/Magdir/filesystems ++++ file-5.43/magic/Magdir/filesystems +@@ -2257,20 +2257,29 @@ + >>0x10060 string >\0 lockproto %s) + + # Russell Coker +-0x10040 string _BHRfS_M BTRFS Filesystem +->0x1012b string >\0 label "%s", +->0x10090 lelong x sectorsize %d, +->0x10094 lelong x nodesize %d, +->0x10098 lelong x leafsize %d, +->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 ++0x10040 string _BHRfS_M ++>0x10000 use btrfs_super_block ++0 name btrfs_super_block ++>0x40 string _BHRfS_M BTRFS Filesystem ++>0x12b string >\0 label "%s", ++>0x90 lelong x sectorsize %d, ++>0x94 lelong x nodesize %d, ++>0x98 lelong x leafsize %d, ++>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 ++ ++0 lequad 0xbd5c25e27295668b BTRFS Filesystem Metadata Image ++>20 byte 1 \b, zlib compressed ++>20 byte 0 \b, uncompressed ++>>0x440 string _BHRfS_M \b, contains ++>>>0x400 use btrfs_super_block + + 0 string btrfs-stream BTRFS stream file + diff --git a/file-5.45-type_t.dif b/file-5.45-type_t.dif new file mode 100644 index 0000000..adcb5f5 --- /dev/null +++ b/file-5.45-type_t.dif @@ -0,0 +1,42 @@ +--- + configure.ac | 12 ++++++++++++ + src/file.h | 6 ++++-- + 2 files changed, 16 insertions(+), 2 deletions(-) + +--- src/file.h ++++ src/file.h 2023-07-28 14:37:17.000000000 +0000 +@@ -159,9 +159,11 @@ + /* + * Dec 31, 23:59:59 9999 + * we need to make sure that we don't exceed 9999 because some libc +- * implementations like muslc crash otherwise ++ * implementations like muslc crash otherwise. If you are unlucky ++ * to be running on a system with a 32 bit time_t, then it is even less. + */ +-#define MAX_CTIME CAST(time_t, 0x3afff487cfULL) ++#define MAX_CTIME \ ++ CAST(time_t, sizeof(time_t) > 4 ? 0x3afff487cfULL : 0x7fffffffULL) + + #define FILE_BADSIZE CAST(size_t, ~0ul) + #define MAXDESC 64 /* max len of text description/MIME type */ +--- configure.ac ++++ configure.ac 2023-07-31 06:45:39.269468700 +0000 +@@ -152,6 +152,18 @@ AC_TYPE_UINT64_T + AC_TYPE_INT64_T + AC_TYPE_INTPTR_T + AC_TYPE_UINTPTR_T ++m4_ifdef([AC_SYS_YEAR2038], [AC_SYS_YEAR2038], [ ++# GNU libc only allows setting _TIME_BITS when FILE_OFFSET_BITS is also set. ++# GNU libc defines __TIMESIZE on systems where _TIME_BITS can be set. ++AS_IF([test X"$ac_cv_sys_file_offset_bits" = X"64"], [ ++ AC_CHECK_DECL(__TIMESIZE, [ ++ AC_DEFINE([_TIME_BITS], [64], [Number of bits in a timestamp, on hosts where this is settable.]) ++ ], [], [ ++AC_INCLUDES_DEFAULT ++#include ++ ]) ++ ]) ++]) + AC_FUNC_MMAP + AC_FUNC_FORK + AC_FUNC_MBRTOWC diff --git a/file-5.45.dif b/file-5.45.dif new file mode 100644 index 0000000..1a39199 --- /dev/null +++ b/file-5.45.dif @@ -0,0 +1,598 @@ +--- + magic/Magdir/elf | 2 + magic/Magdir/linux | 36 +++++---- + magic/Magdir/msad | 5 + + magic/Magdir/msdos | 6 - + magic/Makefile.am | 63 +++++++++------- + magic/Makefile.in | 60 +++++++++------ + src/Makefile.am | 2 + src/dcore.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 8 files changed, 313 insertions(+), 68 deletions(-) + +--- magic/Magdir/elf ++++ magic/Magdir/elf 2023-07-28 09:42:01.845813939 +0000 +@@ -154,7 +154,7 @@ + >18 leshort 47 Renesas H8/300H, + >18 leshort 48 Renesas H8S, + >18 leshort 49 Renesas H8/500, +->18 leshort 50 IA-64, ++>18 leshort 50 IA-64 (Intel 64 bit architecture), + >18 leshort 51 Stanford MIPS-X, + >18 leshort 52 Motorola Coldfire, + >18 leshort 53 Motorola M68HC12, +--- magic/Magdir/linux ++++ magic/Magdir/linux 2023-07-28 09:42:01.845813939 +0000 +@@ -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) + # URL: https://www.kernel.org/doc/Documentation/x86/boot.txt +-514 string HdrS Linux kernel ++514 string HdrS Linux + !:strength + 55 + # often no extension like in linux, vmlinuz, bzimage or memdisk but sometimes + # Acronis Recovery kernel64.dat and Plop Boot Manager plpbtrom.bin + # DamnSmallLinux 1.5 damnsmll.lnx + !:ext /dat/bin/lnx +->510 leshort 0xAA55 x86 boot executable +->>518 leshort >0x1ff +->>>529 byte 0 zImage, +->>>529 byte 1 bzImage, +->>>526 lelong >0 +->>>>(526.s+0x200) string >\0 version %s, +->>498 leshort 1 RO-rootFS, +->>498 leshort 0 RW-rootFS, +->>508 leshort >0 root_dev %#X, +->>502 leshort >0 swap_dev %#X, +->>504 leshort >0 RAMdisksize %u KB, +->>506 leshort 0xFFFF Normal VGA +->>506 leshort 0xFFFE Extended VGA +->>506 leshort 0xFFFD Prompt for Videomode +->>506 leshort >0 Video mode %d ++>510 leshort 0xAA55 \b/x86 Kernel ++>510 leshort <0xAA55 Kernel ++>510 leshort >0xAA55 Kernel ++>518 leshort 0x0105 \b, Setup Version 0x105, zImage ++>518 leshort >0x0105 \b, Setup Version %#x ++>518 leshort >0x1ff ++>>529 byte 0 \b, zImage ++>>529 byte 1 \b, bzImage ++>>526 lelong >0 ++>>>(526.s+0x200) string >\0 \b, Version %s ++>>498 leshort 1 \b, RO-rootFS ++>>498 leshort 0 \b, RW-rootFS ++>>508 leshort >0 \b, root_dev %#X ++>>502 leshort >0 \b, swap_dev %#X ++>>504 leshort >0 \b, RAMdisksize %u KB ++>>506 leshort 0xFFFF \b, Normal VGA ++>>506 leshort 0xFFFE \b, Extended VGA ++>>506 leshort 0xFFFD \b, Prompt for Videomode ++>>506 leshort >0 \b, Video mode %d + # 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 2023-07-28 09:42:01.845813939 +0000 +@@ -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 2023-07-28 09:42:01.845813939 +0000 +@@ -298,9 +298,9 @@ + >>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) + >>(0x3c.l+22) leshort&0x1000 >0 system file + >>(0x3c.l+24) leshort 0x010b +->>>(0x3c.l+232) lelong >0 Mono/.Net assembly ++>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly + >>(0x3c.l+24) leshort 0x020b +->>>(0x3c.l+248) lelong >0 Mono/.Net assembly ++>>>(0x3c.l+248) lelong >0 \b, Mono/.Net assembly + + # 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) +@@ -1026,7 +1026,7 @@ + >1 leshort <-259 + # that offset must be accessible + # add 10000h to jump at end of 64 KiB segment, add 1 for jump instruction and 2 for 16-bit offset +->>(1,s+65539) byte x ++>>(1.s+65539) byte x + # after jump next instruction for DEBUGGING! + #>>>&-1 ubelong x \b, NEXT instruction %#8.8x + >>>0 use msdos-com +--- magic/Makefile.am ++++ magic/Makefile.am 2023-07-28 09:42:01.849813866 +0000 +@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir + MAGIC_DIR = $(top_srcdir)/magic + MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) + +-pkgdata_DATA = magic.mgc ++pkgdata_DATA = magic.mgc magic + + MAGIC_FRAGMENTS = \ + $(MAGIC_DIR)/Header \ +@@ -24,7 +24,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ + $(MAGIC_FRAGMENT_DIR)/aout \ + $(MAGIC_FRAGMENT_DIR)/apache \ + $(MAGIC_FRAGMENT_DIR)/apl \ +-$(MAGIC_FRAGMENT_DIR)/apple \ + $(MAGIC_FRAGMENT_DIR)/application \ + $(MAGIC_FRAGMENT_DIR)/applix \ + $(MAGIC_FRAGMENT_DIR)/apt \ +@@ -106,7 +105,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ + $(MAGIC_FRAGMENT_DIR)/espressif \ + $(MAGIC_FRAGMENT_DIR)/esri \ + $(MAGIC_FRAGMENT_DIR)/fcs \ +-$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/finger \ + $(MAGIC_FRAGMENT_DIR)/firmware \ + $(MAGIC_FRAGMENT_DIR)/flash \ +@@ -153,6 +151,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ + $(MAGIC_FRAGMENT_DIR)/java \ + $(MAGIC_FRAGMENT_DIR)/javascript \ + $(MAGIC_FRAGMENT_DIR)/jpeg \ ++$(MAGIC_FRAGMENT_DIR)/linux \ ++$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/karma \ + $(MAGIC_FRAGMENT_DIR)/kde \ + $(MAGIC_FRAGMENT_DIR)/keepass \ +@@ -163,7 +163,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)/locoscript \ +@@ -171,7 +170,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \ + $(MAGIC_FRAGMENT_DIR)/luks \ + $(MAGIC_FRAGMENT_DIR)/m4 \ + $(MAGIC_FRAGMENT_DIR)/mach \ +-$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/macos \ + $(MAGIC_FRAGMENT_DIR)/magic \ + $(MAGIC_FRAGMENT_DIR)/mail.news \ +@@ -195,11 +193,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ + $(MAGIC_FRAGMENT_DIR)/mkid \ + $(MAGIC_FRAGMENT_DIR)/mlssa \ + $(MAGIC_FRAGMENT_DIR)/mmdf \ +-$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/modulefile \ + $(MAGIC_FRAGMENT_DIR)/motorola \ + $(MAGIC_FRAGMENT_DIR)/mozilla \ + $(MAGIC_FRAGMENT_DIR)/msdos \ ++$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/msooxml \ + $(MAGIC_FRAGMENT_DIR)/msvc \ + $(MAGIC_FRAGMENT_DIR)/msx \ +@@ -263,6 +261,8 @@ $(MAGIC_FRAGMENT_DIR)/qt \ + $(MAGIC_FRAGMENT_DIR)/revision \ + $(MAGIC_FRAGMENT_DIR)/ringdove \ + $(MAGIC_FRAGMENT_DIR)/riff \ ++$(MAGIC_FRAGMENT_DIR)/apple \ ++$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/rpi \ + $(MAGIC_FRAGMENT_DIR)/rpm \ + $(MAGIC_FRAGMENT_DIR)/rpmsg \ +@@ -355,9 +355,21 @@ EXTRA_DIST = \ + $(MAGIC_DIR)/scripts/create_filemagic_flac \ + $(MAGIC_FRAGMENTS) + +- ++RAW = magic + MAGIC = magic.mgc +-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ++CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ${RAW} ++ ++${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(MAGIC_FRAGMENTS) ++ cat /dev/null > $@ ++ for frag in $(MAGIC_FRAGMENTS); do \ ++ if test -f $(srcdir)/$$frag; then \ ++ f=$(srcdir)/$$frag; \ ++ else \ ++ f=$$frag; \ ++ fi; \ ++ cat $$f; \ ++ done >> $@ ++ + + # 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 +@@ -369,19 +381,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ + FILE_COMPILE_DEP = $(FILE_COMPILE) + endif + +-${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) +- @rm -fr magic +- @mkdir magic && cp -p $(MAGIC_FRAGMENTS) magic +- @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ +- echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ +- else \ +- v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ +- if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ +- echo "Cannot use the installed version of file ($$v) to"; \ +- echo "cross-compile file ${PACKAGE_VERSION}"; \ +- echo "Please install file ${PACKAGE_VERSION} locally first"; \ +- exit 1; \ +- fi; \ +- fi) +- $(FILE_COMPILE) -C -m magic +- @rm -fr magic ++${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) $(RAW) ++ $(FILE_COMPILE) -C -m $(RAW) ++ ++#${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) ++# @rm -fr magic ++# @mkdir magic && cp -p $(MAGIC_FRAGMENTS) magic ++# @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ ++# echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ ++# else \ ++# v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ ++# if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ ++# echo "Cannot use the installed version of file ($$v) to"; \ ++# echo "cross-compile file ${PACKAGE_VERSION}"; \ ++# echo "Please install file ${PACKAGE_VERSION} locally first"; \ ++# exit 1; \ ++# fi; \ ++# fi) ++# $(FILE_COMPILE) -C -m magic ++# @rm -fr magic +--- magic/Makefile.in ++++ magic/Makefile.in 2023-07-28 09:42:01.849813866 +0000 +@@ -283,7 +283,7 @@ top_srcdir = @top_srcdir@ + MAGIC_FRAGMENT_BASE = Magdir + MAGIC_DIR = $(top_srcdir)/magic + MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) +-pkgdata_DATA = magic.mgc ++pkgdata_DATA = magic.mgc magic + MAGIC_FRAGMENTS = \ + $(MAGIC_DIR)/Header \ + $(MAGIC_DIR)/Localstuff \ +@@ -301,7 +301,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ + $(MAGIC_FRAGMENT_DIR)/aout \ + $(MAGIC_FRAGMENT_DIR)/apache \ + $(MAGIC_FRAGMENT_DIR)/apl \ +-$(MAGIC_FRAGMENT_DIR)/apple \ + $(MAGIC_FRAGMENT_DIR)/application \ + $(MAGIC_FRAGMENT_DIR)/applix \ + $(MAGIC_FRAGMENT_DIR)/apt \ +@@ -383,7 +382,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ + $(MAGIC_FRAGMENT_DIR)/espressif \ + $(MAGIC_FRAGMENT_DIR)/esri \ + $(MAGIC_FRAGMENT_DIR)/fcs \ +-$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/finger \ + $(MAGIC_FRAGMENT_DIR)/firmware \ + $(MAGIC_FRAGMENT_DIR)/flash \ +@@ -430,6 +428,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ + $(MAGIC_FRAGMENT_DIR)/java \ + $(MAGIC_FRAGMENT_DIR)/javascript \ + $(MAGIC_FRAGMENT_DIR)/jpeg \ ++$(MAGIC_FRAGMENT_DIR)/linux \ ++$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/karma \ + $(MAGIC_FRAGMENT_DIR)/kde \ + $(MAGIC_FRAGMENT_DIR)/keepass \ +@@ -440,7 +440,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)/locoscript \ +@@ -448,7 +447,6 @@ $(MAGIC_FRAGMENT_DIR)/lua \ + $(MAGIC_FRAGMENT_DIR)/luks \ + $(MAGIC_FRAGMENT_DIR)/m4 \ + $(MAGIC_FRAGMENT_DIR)/mach \ +-$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/macos \ + $(MAGIC_FRAGMENT_DIR)/magic \ + $(MAGIC_FRAGMENT_DIR)/mail.news \ +@@ -472,11 +470,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ + $(MAGIC_FRAGMENT_DIR)/mkid \ + $(MAGIC_FRAGMENT_DIR)/mlssa \ + $(MAGIC_FRAGMENT_DIR)/mmdf \ +-$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/modulefile \ + $(MAGIC_FRAGMENT_DIR)/motorola \ + $(MAGIC_FRAGMENT_DIR)/mozilla \ + $(MAGIC_FRAGMENT_DIR)/msdos \ ++$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/msooxml \ + $(MAGIC_FRAGMENT_DIR)/msvc \ + $(MAGIC_FRAGMENT_DIR)/msx \ +@@ -540,6 +538,8 @@ $(MAGIC_FRAGMENT_DIR)/qt \ + $(MAGIC_FRAGMENT_DIR)/revision \ + $(MAGIC_FRAGMENT_DIR)/ringdove \ + $(MAGIC_FRAGMENT_DIR)/riff \ ++$(MAGIC_FRAGMENT_DIR)/apple \ ++$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/rpi \ + $(MAGIC_FRAGMENT_DIR)/rpm \ + $(MAGIC_FRAGMENT_DIR)/rpmsg \ +@@ -632,10 +632,22 @@ EXTRA_DIST = \ + $(MAGIC_DIR)/scripts/create_filemagic_flac \ + $(MAGIC_FRAGMENTS) + ++RAW = magic + MAGIC = magic.mgc +-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ++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 $(MAGIC_FRAGMENTS) ++ cat /dev/null > $@ ++ for frag in $(MAGIC_FRAGMENTS); do \ ++ if test -f $(srcdir)/$$frag; then \ ++ f=$(srcdir)/$$frag; \ ++ else \ ++ f=$$frag; \ ++ fi; \ ++ cat $$f; \ ++ done >> $@ ++ + # 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} +@@ -859,23 +871,25 @@ uninstall-am: uninstall-pkgdataDATA + + .PRECIOUS: Makefile + ++${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) $(RAW) ++ $(FILE_COMPILE) -C -m $(RAW) + +-${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) +- @rm -fr magic +- @mkdir magic && cp -p $(MAGIC_FRAGMENTS) magic +- @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ +- echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ +- else \ +- v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ +- if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ +- echo "Cannot use the installed version of file ($$v) to"; \ +- echo "cross-compile file ${PACKAGE_VERSION}"; \ +- echo "Please install file ${PACKAGE_VERSION} locally first"; \ +- exit 1; \ +- fi; \ +- fi) +- $(FILE_COMPILE) -C -m magic +- @rm -fr magic ++#${MAGIC}: $(MAGIC_FRAGMENTS) $(FILE_COMPILE_DEP) ++# @rm -fr magic ++# @mkdir magic && cp -p $(MAGIC_FRAGMENTS) magic ++# @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \ ++# echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \ ++# else \ ++# v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \ ++# if [ "$$v" != "${PACKAGE_VERSION}" ]; then \ ++# echo "Cannot use the installed version of file ($$v) to"; \ ++# echo "cross-compile file ${PACKAGE_VERSION}"; \ ++# echo "Please install file ${PACKAGE_VERSION} locally first"; \ ++# exit 1; \ ++# fi; \ ++# fi) ++# $(FILE_COMPILE) -C -m magic ++# @rm -fr magic + + # 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 2023-07-28 09:42:01.849813866 +0000 +@@ -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 2023-07-28 09:42:01.865813574 +0000 +@@ -0,0 +1,207 @@ ++/* ++ * Show goo about ELF core files ++ * Jeremy Fitzhardinge 1996 ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#if defined __GLIBC__ && __GLIBC__ >= 2 ++#include ++#include ++# ifndef NT_PRFPREG ++# define NT_PRFPREG 2 ++# endif ++# ifndef NT_TASKSTRUCT ++# define NT_TASKSTRUCT 4 ++# endif ++#else ++#include ++#include ++#endif ++ ++static void fperror(const char *str) ++{ ++ perror(str); ++ exit(1); ++} ++ ++static size_t myread(int fd, void *buf, size_t sz) ++{ ++ size_t ret; ++ ++ if ((ret = read(fd, buf, sz)) != sz) ++ fperror("read failed"); ++ return ret; ++} ++ ++static void print_prstatus(const prstatus_t *pr) ++{ ++ unsigned i; ++ static const char *regs[] = { "ebx", "ecx", "edx", "esi", "edi", "ebp", ++ "eax", "ds", "es", "fs", "gs", ++ "orig_eax", "eip", "cs", ++ "efl", "uesp", "ss"}; ++ ++ printf(" pid=%d ppid=%d pgrp=%d sid=%d\n", ++ pr->pr_pid, pr->pr_ppid, pr->pr_pgrp, pr->pr_sid); ++ for(i = 0; i < NGREG; i++) ++ { ++ unsigned long val = pr->pr_reg[i]; ++ printf(" %-2u %-5s=%08lx %lu\n", i, regs[i], val, val); ++ } ++} ++ ++static void print_prpsinfo(const prpsinfo_t *ps) ++{ ++ printf(" uid=%d gid=%d\n", ps->pr_uid, ps->pr_gid); ++ printf(" comm=%s\n", ps->pr_fname); ++ printf(" psargs=%s\n", ps->pr_psargs); ++} ++ ++#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) ++ ++static void do_note(int fd, Elf32_Phdr *phdr) ++{ ++ off_t here = lseek(fd, 0, SEEK_CUR); ++ int size = phdr->p_filesz; ++ char *raw = alloca(size), *end; ++ end = raw+size; ++ ++ lseek(fd, phdr->p_offset, SEEK_SET); ++ myread(fd, raw, size); ++ ++ while(raw < end) ++ { ++ Elf32_Nhdr *note = (Elf32_Nhdr *)raw; ++ const char *str; ++ const char *name, *desc; ++ ++ raw += sizeof(*note); ++ name = raw; ++ raw += roundup(note->n_namesz, sizeof(long)); ++ desc = raw; ++ raw += roundup(note->n_descsz, sizeof(long)); ++ ++ printf(" name=%.*s", (int)note->n_namesz, name); ++ ++ if(strncmp(name, "CORE", note->n_namesz) != 0) ++ { ++ printf("\n"); ++ continue; ++ } ++ ++ switch(note->n_type) ++ { ++#define X(x) case x: str = #x; break; ++ X(NT_PRSTATUS); ++ X(NT_PRFPREG); ++ X(NT_PRPSINFO); ++ X(NT_TASKSTRUCT); ++#undef X ++ default: ++ str = "???"; ++ } ++ printf(" n_type=%s n_descsz=%ld\n", ++ str, note->n_descsz); ++ switch(note->n_type) ++ { ++ case NT_PRSTATUS: ++ print_prstatus((prstatus_t *)desc); ++ break; ++ case NT_PRPSINFO: ++ print_prpsinfo((prpsinfo_t *)desc); ++ break; ++ } ++ } ++ lseek(fd, here, SEEK_SET); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int fd; ++ Elf32_Ehdr elf; ++ int i; ++ ++ if (argc != 2) ++ { ++ fprintf(stderr, "Usage: %s corefile\n", argv[0]); ++ exit(1); ++ } ++ ++ if ((fd = open(argv[1], O_RDONLY)) == -1) ++ fperror("open of core"); ++ ++ myread(fd, &elf, sizeof(elf)); ++ ++ if (memcmp(ELFMAG, elf.e_ident, SELFMAG) != 0) ++ printf("bad magic\n"); ++ ++ if (elf.e_ident[EI_CLASS] != ELFCLASS32) ++ printf("wrong class\n"); ++ ++ if (elf.e_ident[EI_DATA] != ELFDATA2LSB) ++ printf("wrong endianess\n"); ++ ++ if (elf.e_ident[EI_VERSION] != EV_CURRENT) ++ printf("wrong version\n"); ++ ++ { ++ const char *str; ++ switch(elf.e_type) ++ { ++#define C(x) case ET_##x: str = #x; break; ++ C(NONE); ++ C(REL); ++ C(EXEC); ++ C(DYN); ++ C(CORE); ++#undef C ++ default: str = "???"; break; ++ } ++ printf("elf file type ET_%s\n", str); ++ } ++ ++ if (elf.e_machine != EM_386 && elf.e_machine != EM_486) ++ printf("not i386 or i486\n"); ++ ++ if (elf.e_ehsize != sizeof(elf)) ++ printf("wrong header size\n"); ++ ++ if (elf.e_phentsize != sizeof(Elf32_Phdr)) ++ printf("wrong phdr size\n"); ++ ++ if (lseek(fd, elf.e_phoff, SEEK_SET) != (off_t)elf.e_phoff) ++ fperror("lseek to phdr failed\n"); ++ ++ for(i = 0; i < elf.e_phnum; i++) ++ { ++ Elf32_Phdr phdr; ++ const char *str; ++ ++ myread(fd, &phdr, sizeof(phdr)); ++ switch(phdr.p_type) ++ { ++#define C(x) case PT_##x: str = #x; break; ++ C(NULL); ++ C(LOAD); ++ C(DYNAMIC); ++ C(INTERP); ++ C(NOTE); ++ C(SHLIB); ++ C(PHDR); ++#undef C ++ default: ++ str = "???"; break; ++ } ++ printf("type PT_%s off=%ld vaddr=%lx filesz=%ld flags=%lx\n", ++ str, phdr.p_offset, phdr.p_vaddr, phdr.p_filesz, ++ (unsigned long)phdr.p_flags); ++ if (phdr.p_type == PT_NOTE) ++ do_note(fd, &phdr); ++ } ++ exit(0); ++} ++ diff --git a/file-5.45.tar.gz b/file-5.45.tar.gz new file mode 100644 index 0000000..884bfaa --- /dev/null +++ b/file-5.45.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc97f51029bb0e2c9f4e3bffefdaf678f0e039ee872b9de5c002a6d09c784d82 +size 1246503 diff --git a/file-5.45.tar.gz.asc b/file-5.45.tar.gz.asc new file mode 100644 index 0000000..34e10a0 --- /dev/null +++ b/file-5.45.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iEYEABECAAYFAmTCz2IACgkQcREqsWyzOzpvCgCcDRR1icCs3FF4dXiIXCS3mykf +T5wAoI4+RrEesZEWRBl641Z1lshkK+4c +=bF1Y +-----END PGP SIGNATURE----- diff --git a/file-rpmlintrc b/file-rpmlintrc new file mode 100644 index 0000000..a124502 --- /dev/null +++ b/file-rpmlintrc @@ -0,0 +1,2 @@ +addFilter(".*W:.*name-repeated-in-summary.*") +addFilter(".*:.*shlib-fixed-dependency.*") diff --git a/file-secure_getenv.patch b/file-secure_getenv.patch new file mode 100644 index 0000000..5e6ddaa --- /dev/null +++ b/file-secure_getenv.patch @@ -0,0 +1,77 @@ +--- + file-5.42/configure.ac | 2 ++ + file-5.42/src/file.h | 8 ++++++++ + file-5.42/src/magic.c | 12 ++++++------ + 3 files changed, 16 insertions(+), 6 deletions(-) + +--- file-5.42/configure.ac ++++ file-5.42/configure.ac 2022-06-13 08:34:50.347521415 +0000 +@@ -130,6 +130,8 @@ if test "$enable_xzlib" != "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_TYPE_OFF_T + AC_TYPE_SIZE_T +--- file-5.42/src/file.h ++++ file-5.42/src/file.h 2022-06-13 08:34:50.347521415 +0000 +@@ -726,4 +726,12 @@ static const char *rcsid(const char *p) + #define __RCSID(a) + #endif + ++#ifndef HAVE_SECURE_GETENV ++# ifdef HAVE___SECURE_GETENV ++# define secure_getenv __secure_getenv ++# else ++# error neither secure_getenv nor __secure_getenv is available ++# endif ++#endif ++ + #endif /* __file_h__ */ +--- file-5.42/src/magic.c ++++ file-5.42/src/magic.c 2022-06-13 08:36:49.997304349 +0000 +@@ -185,7 +185,7 @@ get_default_magic(void) + free(default_magic); + default_magic = NULL; + } +- if ((home = getenv("HOME")) == NULL) ++ if ((home = secure_getenv("HOME")) == NULL) + return MAGIC; + + if (asprintf(&hmagicpath, "%s/.magic.mgc", home) < 0) +@@ -222,20 +222,20 @@ out: + } + + /* Before anything else, try to get a magic file from user HOME */ +- if ((home = getenv("HOME")) != NULL) ++ if ((home = secure_getenv("HOME")) != NULL) + _w32_append_path(&hmagicpath, "%s%s", home, hmagic); + + /* First, try to get a magic file from user-application data */ +- if ((home = getenv("LOCALAPPDATA")) != NULL) ++ if ((home = secure_getenv("LOCALAPPDATA")) != NULL) + _w32_append_path(&hmagicpath, "%s%s", home, hmagic); + + /* Second, try to get a magic file from the user profile data */ +- if ((home = getenv("USERPROFILE")) != NULL) ++ if ((home = secure_getenv("USERPROFILE")) != NULL) + _w32_append_path(&hmagicpath, + "%s/Local Settings/Application Data%s", home, hmagic); + + /* Third, try to get a magic file from Common Files */ +- if ((home = getenv("COMMONPROGRAMFILES")) != NULL) ++ if ((home = secure_getenv("COMMONPROGRAMFILES")) != NULL) + _w32_append_path(&hmagicpath, "%s%s", home, hmagic); + + /* Fourth, try to get magic file relative to exe location */ +@@ -256,7 +256,7 @@ magic_getpath(const char *magicfile, int + if (magicfile != NULL) + return magicfile; + +- magicfile = getenv("MAGIC"); ++ magicfile = secure_getenv("MAGIC"); + if (magicfile != NULL) + return magicfile; + diff --git a/file.changes b/file.changes new file mode 100644 index 0000000..4f85e60 --- /dev/null +++ b/file.changes @@ -0,0 +1,1925 @@ +------------------------------------------------------------------- +Mon Feb 26 09:11:40 UTC 2024 - Dr. Werner Fink + +- Prepare for RPM 4.20 + +------------------------------------------------------------------- +Mon Jul 31 09:44:14 UTC 2023 - Dr. Werner Fink + +- Add patch file-5.45-type_t.dif + * Partly upstream check of type_t is wide on 32bit systems + * Extend (auto)configure to enable wide type_t type if possible + +------------------------------------------------------------------- +Fri Jul 28 11:51:24 UTC 2023 - Dr. Werner Fink + +- On 32bit systems define _TIME_BITS=64 to make it build + +------------------------------------------------------------------- +Fri Jul 28 09:48:53 UTC 2023 - Dr. Werner Fink + +- Update to 5.45: + * PR/465: psrok1: Avoid muslc asctime_r crash + * add SIMH tape format support + * bump the max size of the elf section notes to be read to 128K + and make it configurable + * PR/415: Fix decompression with program returning empty + * PR/408: fix -p with seccomp + * PR/412: fix MinGW compilation +- Remove upstream patch dc71304b.patch +- Modify patches + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-zip2.0.dif + * file-5.22-elf.dif + * file-secure_getenv.patch +- Port and rename patch file-5.44.dif now file-5.45.dif + +------------------------------------------------------------------- +Thu May 4 14:15:38 UTC 2023 - Frederic Crozat + +- Add _multibuild to define additional spec files as additional + flavors. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Wed Jan 11 13:06:56 UTC 2023 - Dr. Werner Fink + +- Add patch dc71304b.patch + * Handle script executable Zip archives + +------------------------------------------------------------------- +Tue Jan 10 13:28:51 UTC 2023 - Dr. Werner Fink + +- Use [Pp]atch0 explicit to avoid warning as python.magic build time + +------------------------------------------------------------------- +Mon Jan 9 14:30:30 UTC 2023 - Dr. Werner Fink + +- Modifying patches + * file-5.22-elf.dif + * file-5.19-printf.dif + * file-5.19-zip2.0.dif + * file-5.19-biorad.dif + * file-secure_getenv.patch + * file-5.28-btrfs-image.dif +- Remove patch file-zstd.patch now upstream +- Port patch file-5.42.dif and rename it to file-5.44.dif +- Update to 5.44: + * Handle nan's so that we don't get internal floating point exceptions + when they are enabled (Vincent Mihalkovic) + * PR/397: Restore the ability to process files from stdin immediately. + * fixed various clustefuzz issues + * Fix error detection for decompression code (Vincent Mihalkovic) + * Add MAGIC_NO_COMPRESS_FORK and use it to produce a more + meaningful error message if we are sandboxing. + * Add built-in lzip decompression support (Michal Gorny) + * Add built-in zstd decompression support (Martin Rodriguez Reboredo) + +------------------------------------------------------------------- +Wed Sep 14 08:58:50 UTC 2022 - Dr. Werner Fink + +- Add patch file-zstd.patch from upstream mailing list + * Add zstd decompression support +- Run also upstream standard checks + +------------------------------------------------------------------- +Tue Sep 13 20:09:35 UTC 2022 - Dirk Müller + +- update to 5.43: + * Add octal indirect magic + * avoid infinite loop in non-wide code + * Obey MAGIC_CONTINUE with multiple magic files + * Fix bug with large flist + * PR/364: Detect non-nul-terminated core filenames from QEMU + * PR/359: Add support for http://ndjson.org/ + * PR/362: Fix wide printing + * PR/358: Fix width for -f - +- drop file-boo1201350.patch (upstream) + +------------------------------------------------------------------- +Thu Aug 25 19:31:39 UTC 2022 - Callum Farmer + +- Move magic files to /usr/share/file from /usr/share/misc, and + then create symlinks from /usr/share/misc back to /usr/share/file + as per FHS 3.0 + +------------------------------------------------------------------- +Wed Jul 13 11:01:16 UTC 2022 - Dr. Werner Fink + +- Add upstream patch to fix boo#1201350 + * file-boo1201350.patch which combines the commits + c80065fe6900be5e794941e29b32440e9969b1c3 + 7e59d34206d7c962e093d4239e5367a2cd8b7623 + f042050f59bfc037677871c4d1037c33273f5213 + d471022b2772071877895759f209f2c346757a4c + 441ac2b15508909e82ad467960df4ac0adf9644c + +------------------------------------------------------------------- +Mon Jun 13 08:45:48 UTC 2022 - Dr. Werner Fink + +- Update to 5.42: + * PR/348: add missing cases to prevent file from aborting on + random magic files. + * PR/351: octalify filenames when not raw before printing. + * fix regex cacheing bug (Dirk Mueller) + * merge file_regcomp and file_regerror() to simplify the code + and reduce memory requirements for storing regexes (Dirk Mueller) + * cache regex (Dirk Mueller) + * detect filesystem full by flushing output (Dirk Mueller) + * implement running decompressor programs using + posix_spawnp(2) instead of vfork(2) + * Add support for msdos dates and times + * use the system byte swapping functions if available (Werner Fink) +- Port patches + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.19-zip2.0.dif + * file-5.28-btrfs-image.dif + * file-secure_getenv.patch +- Remove patches now upstream + * file-5.23-endian.patch + * file-5.41-cache-regexps-locale-restore.patch + * file-5.41-cache-regexps.patch +- Port and rename patch file-5.41.dif which is now file-5.42.dif + +------------------------------------------------------------------- +Tue Apr 26 09:03:32 UTC 2022 - Dr. Werner Fink + +- Try to solve 32bit import dependency problems (boo#1198788) + +------------------------------------------------------------------- +Wed Apr 13 20:41:49 UTC 2022 - Dirk Müller + +- update file-5.41-cache-regexps.patch to fix cache offset + miscalculation (bsc#1197780) + +------------------------------------------------------------------- +Wed Mar 23 09:02:37 UTC 2022 - Dirk Müller + +- add file-5.41-cache-regexps-locale-restore.patch to restore + previous locale handling behavior + +------------------------------------------------------------------- +Sat Mar 19 18:00:32 UTC 2022 - Dirk Müller + +- add file-5.41-cache-regexps.patch to cache regexp lookups + +------------------------------------------------------------------- +Thu Feb 24 10:05:17 UTC 2022 - Dr. Werner Fink + +- Reenable libseccomp sandboxing + +------------------------------------------------------------------- +Thu Feb 24 08:41:32 UTC 2022 - Dominique Leuenberger + +- Fix previous entry: remove stray pkg-config call in CFLAGS (as it + was called without parameters, it only made output on stderr, + which did not impact CFLAGS; so de facto only a cleanup change). + +------------------------------------------------------------------- +Mon Feb 21 17:09:56 UTC 2022 - Dominique Leuenberger + +- Drop pkgconfig(libseccomp) BuildRequires and stop injecting + libseccomp cflags into CFLAGS: libseccomp has been disabled for a + long time already. +- Move the special 'check' part from install to %check. + +------------------------------------------------------------------- +Thu Oct 21 06:24:35 UTC 2021 - Dr. Werner Fink + +- Remove file-5.38-allow-readlinkat.dif as already done in latest + file 5.41 + +------------------------------------------------------------------- +Tue Oct 19 09:52:12 UTC 2021 - Dr. Werner Fink + +- Update to 5.41: + * Avinash Sonawane: Fix tzname detection + * Fix relationship tests with "search" magic, don't short circuit + logic + * Fix memory leak in compile mode + * PR/272: kiefermat: Only set returnval = 1 when we printed something + (in all cases print or !print). This simplifies the logic and fixes + the issue in the PR with -k and --mime-type there was no continuation + printed before the default case. + * PR/270: Don't translate unprintable characters in %s magic formats + when -r + * PR/269: Avoid undefined behavior with clang (adding offset to NULL) + * Add a new flag (f) that requires that the match is a full word, + not a partial word match. + * Add varint types (unused) + * PR/256: mutableVoid: If the file is less than 3 bytes, use the file + length to determine type + * PR/259: aleksandr.v.novichkov: mime printing through indirect magic + is not taken into account, use match directly so that it does. +- Remove patches now upstream + * file-5.40-1c677c04.patch + * file-5.40-3096f87f.patch + * file-5.40-4c5fe1ad.patch + * file-5.40-6b34436a.patch + * file-5.40-749e1ecf.patch + * file-5.40-9b0459af.patch + * file-5.40-9e2becec.patch + * file-5.40-ascii.patch + * file-5.40-f0601504.patch + * file-5.40-f7705dca.patch +- Port patches + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.19-zip2.0.dif + * file-5.23-endian.patch + * file-5.28-btrfs-image.dif + * file-5.38-allow-readlinkat.dif + * file-secure_getenv.patch +- Port and rename patch file-5.39.dif which is now file-5.41.dif + +------------------------------------------------------------------- +Fri Apr 23 10:26:49 UTC 2021 - Dr. Werner Fink + +- 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 + +- 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 + +- 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 + +- 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 + +- Remove patch file-5.12-zip.dif as it is upstream solved (boo#1183143) + +------------------------------------------------------------------- +Wed Jul 1 07:52:11 UTC 2020 - Dr. Werner Fink + +- Add upstream commit 85b7ab832 as patch file-5.39-alternate_format.dif + to also allow alternate format switch '#' +- Replace patch file-5.38.dif with file-5.39.dif + +------------------------------------------------------------------- +Wed Jun 17 14:01:25 UTC 2020 - Paolo Stivanin + +- Update to 5.39 + * Remove unused subtype_mime (Steve Grubb) + * Remove unused check in okstat (Steve Grubb) + * Fix mime-type in elf binaries by making sure $x is set + * Fix indirect negative offsets broken by OFFNEGATIVE + * Fix GUID equality check + * PR/165: Handle empty array and strings in JSON + * PR/162: Add --exclude-quiet + * Various fixes + * add guid support +- Removed undo-24c9c0.patch as it is now part of upstream +- Updated file-5.17-option.dif + +------------------------------------------------------------------- +Mon May 4 13:51:18 UTC 2020 - Dr. Werner Fink + +- Add temporary patch undo-24c9c0.patch to undo commit 24c9c0 (boo#1169192) + +------------------------------------------------------------------- +Tue Apr 14 20:36:31 UTC 2020 - Andreas Schwab + +- file-5.24-nitpick.dif: remove obsolete patch (bsc#1169512) +- file-secure_getenv.patch: refresh + +------------------------------------------------------------------- +Wed Jan 15 09:17:43 UTC 2020 - Dr. Werner Fink + +- Looks like libseccomp filter stumble over decompressors like + xz (without liblmza) or zstd hence disable it (boo#1160649) +- Require at build devel packages for liblzma and libbz2 + +------------------------------------------------------------------- +Wed Jan 8 13:55:46 UTC 2020 - Marcus Meissner + +- file-5.38-allow-readlinkat.dif: allow readlinkat() systemcall, + reenable sandboxing. (bsc#1160303) + +------------------------------------------------------------------- +Tue Jan 7 11:22:04 UTC 2020 - Dr. Werner Fink + +- Currently file command receives SIGSYS/31 with sandboxing enabled + via libseccomp + +------------------------------------------------------------------- +Fri Dec 20 14:00:22 UTC 2019 - Dr. Werner Fink + +- Require pkgconfig(libseccomp) to enable the sandboxing feature + +------------------------------------------------------------------- +Tue Dec 17 09:42:55 UTC 2019 - Dr. Werner Fink + +- Update to file version 5.38 + * Always accept -S (no sandbox) even if we don't support sandboxing + * More syscalls elided for sandboxiing + * For ELF dynamic means having an interpreter not just PT_DYNAMIC + * Check for large ELF session header offset + * When saving and restoring a locale, keep the locale name in our + own storage. + * Add a flag to disable CSV file detection. + * Don't pass NULL/0 to memset to appease sanitizers. + * Avoid spurious prints when looks for extensions or apple strings + in fsmagic. + * Add builtin decompressors for xz and and bzip. + * Add a limit for the number of CDF elements. + * More checks for overflow in CDF. +- Removed patches fixed upstream + * CVE-2019-18218-46a8443f.patch + * file-5.15-clear-invalid.patch + * file-upstream.patch +- Modify patches + * file-5.12-zip.dif + * file-5.16-ocloexec.patch + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.19-zip2.0.dif + * file-5.23-endian.patch + * file-5.24-nitpick.dif + * file-5.28-btrfs-image.dif + * file-secure_getenv.patch +- Modify and rename patch file-5.37.dif which becomes now file-5.38.dif + +------------------------------------------------------------------- +Tue Oct 22 13:24:26 UTC 2019 - Dr. Werner Fink + +- Add temporary patch CVE-2019-18218-46a8443f.patch from upstream + to fix bsc#1154661 -- heap-based buffer overflow in cdf_read_property_info in cdf.c + +------------------------------------------------------------------- +Mon Oct 21 11:44:02 UTC 2019 - Stefan Brüns + +- Replace find invocation in self test by recursive bash glob, + drop findutils BuildRequires. + +------------------------------------------------------------------- +Mon Oct 14 13:40:13 UTC 2019 - Dr. Werner Fink + +- Let python-magic build with latest rpm + +------------------------------------------------------------------- +Tue Jun 11 10:42:01 UTC 2019 - Dr. Werner Fink + +- Add temporary patch file-upstream.patch + * Detect Android LOKI'd boot bootimgs + * buffer_fill: fix double free of `ebuf` on read error + (https://bugzilla.redhat.com/1685217) + +------------------------------------------------------------------- +Mon May 27 09:26:52 UTC 2019 - Dr. Werner Fink + +- Update to file version 5.37 + * Make sure that continuation separators are printed + with -k within softmagic + * Change SIGPIPE saving and restoring during compression to use + sigaction(2) instead of signal(3) and cache it. (Denys Vlasenko) + * Cache stat(2) calls more to reduce number of calls (Denys Vlasenko) + * PR/77: Handle --mime-type and -k correctly. + * Switch decompression code to use vfork() because + tools like rpmdiff and rpmbuild call libmagic + with large process footprints (Denys Vlasenko) + * PR/75: --enable-zlib, did not work. + * Improve regex efficiency (Michael Schroeder) by: + 1. Prefixing regex searches with regular search + for keywords where possible + 2. Using memmem(3) where available +- Modify the patches + * file-5.12-zip.dif + * file-5.16-ocloexec.patch + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-zip2.0.dif + * file-5.22-elf.dif + * file-5.24-nitpick.dif + * file-5.28-btrfs-image.dif + * file-secure_getenv.patch +- Modify and rename patch file-5.36.dif which becomes file-5.37.dif + +------------------------------------------------------------------- +Thu Feb 21 07:12:21 UTC 2019 - Dr. Werner Fink + +- Update to file version 5.36 (bsc#1126117, bsc#1126118, bsc#1126119, + and bsc#1126121 which is CVE-2019-8904, CVE-2019-8905, CVE-2019-8906, + and CVE-2019-8907) + * Fix cast to use cast macros + * Add UCS-32 builtin detection (PR/61) reported by tmc + * Fix stack read (PR/62) and write (PR/64) stack overflows + reported by spinpx +- Modify the patches + * file-5.12-zip.dif + * file-5.15-clear-invalid.patch + * file-5.16-ocloexec.patch + * 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 +- Modify and rename patch file-5.35.dif which becomes file-5.36.dif + +------------------------------------------------------------------- +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 + +- 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.34 + * 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 + +- Update to file version 5.33 + * extend the support for ${x?:} expansions for magic descriptions + * add support for ${x?:} in mime types to handle + pie binaries. + * add support for negative offsets (offsets from the end of file) + * close the file on error when writing magic (Steve Grubb) + * seccomp support (Paul Moore) +- Rename patch file-5.32.dif to file-5.33.dif +- Remove patch file-5.32-ncurses-6.1.patch now upstream +- Modify and port patches + * file-5.12-zip.dif + * file-5.16-ocloexec.patch + * 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.24-nitpick.dif +- Add patch file-a642587a9c.patch for bsc#1096974, bsc#1096984, and + CVE-2018-10360 -- Avoid reading past the end of buffer + +------------------------------------------------------------------- +Fri Apr 6 07:08:24 UTC 2018 - werner@suse.de + +- Correct line break in patch file-5.24-nitpick.dif (boo#1087924) + +------------------------------------------------------------------- +Thu Feb 22 15:13:16 UTC 2018 - fvogt@suse.com + +- Use %license (boo#1082318) + +------------------------------------------------------------------- +Mon Jan 22 10:37:39 UTC 2018 - werner@suse.de + +- Add patch file-5.32-ncurses-6.1.patch to support extend magic + format for new ncurses 6.1 + +------------------------------------------------------------------- +Sun Oct 8 00:06:58 UTC 2017 - jengelh@inai.de + +- Update package summaries. Replace old RPM constructs. +- Remove --with-pic which is useless with --disable-static. +- Edit pre_checkin.sh to remove dead python3 file. + +------------------------------------------------------------------- +Tue Sep 26 15:20:23 UTC 2017 - jmatejek@suse.com + +- remove python build instructions from master spec file, move completely + into python-magic.spec + +------------------------------------------------------------------- +Wed Sep 13 10:35:43 UTC 2017 - werner@suse.de + +- Update to file version 5.32 + * Always reset state in {file,buffer}_apprentice (Krzysztof Wilczynski) + * Fix always true condition (Thomas Jarosch) + * pickier parsing of numeric values in magic files. + * PR/615 add magic_getflags() +- This release fix the bug bsc#1056838 for CVE-2017-1000249 +- Remove patch file-5.31-fix-tga.dif as now upstream +- Rename patch file-5.31.dif which now becomes file-5.32.dif +- Modify the patches + * file-5.16-ocloexec.patch + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.23-endian.patch + * file-5.28-btrfs-image.dif + +------------------------------------------------------------------- +Mon Jun 5 18:48:22 UTC 2017 - coolo@suse.com + +- add file-5.31-fix-tga.dif upstream commited after I reported + a failure in File::Unpack's test suite + +------------------------------------------------------------------- +Wed May 24 10:54:28 UTC 2017 - werner@suse.de + +- Update to file version 5.31 + * remove trailing spaces from magic files + * refactor is_tar + * better bounds checks for cdf +- Remove patches now upstream + * file-5.30-150735.patch + * file-5.30-3c60e5.patch +- Rename patch file-5.30.dif which becomes file-5.31.dif +- Modify the patches + * file-4.24-autoconf.dif + * file-5.14-tex.dif + * file-5.16-ocloexec.patch + * file-5.19-printf.dif + * file-5.23-endian.patch + +------------------------------------------------------------------- +Thu Mar 2 13:22:39 UTC 2017 - werner@suse.de + +- Update to file version 5.30 + * If we exceeded the offset in a search return no match + (Christoph Biedl) + * Be more lenient on corrupt CDF files (Christoph Biedl) + * pacify ubsan sign extension (oss-fuzz/524) + * off by one in cdf parsing (PR/593) + * report debugging sections in elf (PR/591) + * Allow @@@ in extensions + * Add missing overflow check in der magic (Jonas Wagner) +- Mofify the patches + file-5.16-ocloexec.patch + file-5.19-biorad.dif + file-5.28-btrfs-image.dif +- Rename patch file-5.29.dif to file-5.30.dif +- Add upstream patches + file-5.30-150735.patch + file-5.30-3c60e5.patch + +------------------------------------------------------------------- +Wed Nov 30 12:49:11 UTC 2016 - werner@suse.de + +- Modify patch file-5.29.dif that is + replace colon with dot in offset (boo#1012779) + +------------------------------------------------------------------- +Thu Nov 24 09:17:37 UTC 2016 - werner@suse.de + +- Update to file version 5.29 + * der getlength overflow (Jonas Wagner) + * multiple magic file load failure (Christoph Biedl) + * CDF parsing improvements (Guy Helmer) + * Add support for signed indirect offsets + * cat /dev/null | file - should print empty (Christoph Biedl) + * Bump string size from 64 to 96. + * PR/556: Fix separators on annotations. +- Remove patch file-5.28-compress.patch now upstream +- Rename patch file-5.28.dif which becomes now file-5.29.dif + +------------------------------------------------------------------- +Thu Oct 20 15:54:20 UTC 2016 - jeffm@suse.com + +- Add patch file-5.28-btrfs-image.dif + to add support for files output by btrfs-image. + +------------------------------------------------------------------- +Wed Aug 24 14:16:09 UTC 2016 - dimstar@opensuse.org + +- Fix boo#995089: + * Do not attempt to produce a file-magic-32bit package: there is + nothing arch-dependant in this package (for completeness, this + was already fixed just before by Marcus) + * Fix baselibs.conf for libmagic1-32bit to require file-magic + instead of file-magic-32bit. + * Build file-magic as noarch on openSUSE >= 1200 (where rpm is + new enough to support this). + +------------------------------------------------------------------- +Wed Aug 24 14:16:08 UTC 2016 - meissner@suse.com + +- file-magic is architecture independend, no need for a baselibs + package. + +------------------------------------------------------------------- +Thu Aug 18 12:24:36 UTC 2016 - werner@suse.de + +- Add patch file-5.28-compress.patch + to fix crash as found in build system + +------------------------------------------------------------------- +Tue Aug 16 11:59:36 UTC 2016 - werner@suse.de + +- Update to file version 5.28 + * fix leak on allocation failure + * PR/555: Avoid overflow for offset > nbytes + * PR/550: Segv on DER parsing: + - use the correct variable for length + - set offset to 0 on failure. +- Port patches to 5.28 + file-4.24-autoconf.dif + file-5.15-clear-invalid.patch + file-5.16-ocloexec.patch + file-5.19-biorad.dif + file-5.23-endian.patch + file-5.24-nitpick.dif + file-secure_getenv.patch +- Remove patches now upstream + file-5.26-revert-close.patch +- Rename patches + file-5.26.dif becomes file-5.28.dif + +------------------------------------------------------------------- +Wed Jun 1 10:17:08 UTC 2016 - werner@suse.de + +- Update to file version 5.27 + * Errors comparing DER entries or computing offsets + are just indications of malformed non-DER files. + Don't print them. + * Offset comparison was off-by-one. + * Fix compression code (Werner Fink) + * Put new bytes constant in the right file (not the generated one) +- Remove patches + file-5.26-version.patch + file-5.26-downgrade_DER.patch + file-5.26-console.diff + file-5.26-zmagic.patch + as now upstream +- Disable patch file-5.26-revert-close.patch for test +- Modify patches + file-5.17-option.dif + file-5.26.dif + +------------------------------------------------------------------- +Wed Apr 20 07:14:15 UTC 2016 - werner@suse.de + +- Add and revert upstream patch file-5.26-revert-close.patch + (commit 0177f6dd30e1f8c5639c058dcdf1d9edd9f8528c) to help + rpmbuild not to loose stdin + +------------------------------------------------------------------- +Tue Apr 19 11:52:49 UTC 2016 - werner@suse.de + +- Add patch file-5.26-zmagic.patch + to fix detection chain if for compresses files are expanded + +------------------------------------------------------------------- +Tue Apr 19 09:38:07 UTC 2016 - werner@suse.de + +- Add upstream patch file-5.26-console.diff + to fix wrong detection of UNIF edb files + +------------------------------------------------------------------- +Tue Apr 19 09:35:28 UTC 2016 - werner@suse.de + +- Add upstream patch file-5.26-downgrade_DER.patch + to fix DER error messages as well oas offset handling + +------------------------------------------------------------------- +Mon Apr 18 12:13:33 UTC 2016 - werner@suse.de + +- Update to file version 5.26 + * make the number of bytes read from files configurable. + * Add bounds checks for DER code (discovered by Thomas Jarosch) + * Change indirect recursion limit to indirect use count and + bump from 15 to 50 to prevent abuse. + * Add -00 which prints filename\0description\0 + * Fix ID3 indirect parsing + * add DER parsing capability + * provide dprintf(3) for the OS's that don't have it. + * redo the compression code report decompression errors + * REG_STARTEND code is not working as expected, delete it. + * Add zlib support if we have it. + * PR/492: compression forking was broken with magic_buffer. +- Removed patches as upstream now + file-4.24-mips.dif + file-5.25-avoid-double-evaluation-in-python-bindings.dif +- Modified patches + file-5.12-zip.dif + file-5.16-ocloexec.patch + file-5.19-printf.dif + file-5.19-zip2.0.dif + file-5.22-elf.dif + file-5.23-endian.patch + file-5.24-nitpick.dif + file-secure_getenv.patch +- Renamed patches + file-5.23.dif becomes file-5.26.dif +- Added patch from upstream to fix version handling of PHP files + file-5.26-version.patch + +------------------------------------------------------------------- +Tue Feb 16 12:40:33 UTC 2016 - rolf@rotkraut.de + +- Make the python command a macro. + +------------------------------------------------------------------- +Thu Jan 21 11:32:14 UTC 2016 - dmueller@suse.com + +- add file-5.25-avoid-double-evaluation-in-python-bindings.dif (bsc#949905) + +------------------------------------------------------------------- +Sun Oct 4 15:55:51 UTC 2015 - astieger@suse.com + +- file 5.25: + * add a limit to the length of regex searches + * fix problems with --parameter + +------------------------------------------------------------------- +Tue Jul 14 11:48:47 UTC 2015 - werner@suse.de + +- Update to file version 5.24 + * redo long option encoding to fix off-by-one in 5.23 +- Adapt and rename patch + file-5.12-nitpick.dif becomes file-5.24-nitpick.dif + +------------------------------------------------------------------- +Thu Jun 11 15:14:32 UTC 2015 - werner@suse.de + +- Update to file version 5.23 + * Fix issue with regex range for magic with offset + * Always return true from mget with USE (success to mget not match + indication). Fixes mime evaluation after USE magic + * PR/459: Don't insert magic entries to the list if there are parsing + errors for them. + * PR/455: Add utf-7 encoding + * PR/455: Implement -Z, look inside, but don't report on compression + * PR/454: Fix allocation error on bad magic. + * handle MAGIC_CONTINUE everywhere, not just in softmagic + * don't print descriptions for NAME types when mime. + * Add --extension to list the known extensions for this file type + Idea by Andrew J Roazen + * Bump file search buffer size to 1M. + * Fix multiple issues with date formats reported by Christoph Biedl: + - T_LOCAL meaning was reversed + - Arithmetic did not work + Also stop adjusting daylight savings for gmt printing. + * PR/411: Fix memory corruption from corrupt cdf file. +- Refresh and rename patches + file-5.20-endian.patch becomes file-5.23-endian.patch + file-5.22.dif becomes file-5.23.dif + Refresh patch file-secure_getenv.patch + +------------------------------------------------------------------- +Mon Jan 19 10:48:12 UTC 2015 - werner@suse.de + +- Update to file version 5.22 (also related to bsc#913650 and bsc#913651) + * add indirect relative for TIFF/Exif + * restructure elf note printing to avoid repeated messages + * add note limit, suggested by Alexander Cherepanov + * Bail out on partial pread()'s (Alexander Cherepanov) + * Fix incorrect bounds check in file_printable (Alexander Cherepanov) + * PR/405: ignore SIGPIPE from uncompress programs + * change printable -> file_printable and use it in + more places for safety + * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP + is present print the interpreter name. +- Patch file-5.18-elf.dif is modified and renamed to file-5.22-elf.dif +- Patch file-5.20.dif s modified and renamed to file-5.22.dif + +------------------------------------------------------------------- +Sat Dec 20 08:57:15 UTC 2014 - meissner@suse.com + +- build with PIE + +------------------------------------------------------------------- +Wed Dec 17 13:08:34 UTC 2014 - werner@suse.de + +- Drop patch file-5.20-CVE-2014-3710.patch as now part of upstream +- Update to file version 5.21 + * Fix CVE-2014-8116 and CVE-2014-8117 (bsc#910252 and bsc#910253) + * there was an incorrect free in magic_load_buffers() + * there was an out of bounds read for some pascal strings + * there was a memory leak in magic lists + * don't interpret strings printed from files using the current + locale, convert them to ascii format first. + * there was an out of bounds read in elf note reads + * fix MacOS/X locale.h vs. xlocale.h issues + +------------------------------------------------------------------- +Thu Oct 23 11:36:19 UTC 2014 - werner@suse.de + +- Add patch file-5.20-CVE-2014-3710.patch to fic bsc#902367 + CVE-2014-3710: file: out-of-bounds read in elf note headers + +------------------------------------------------------------------- +Mon Oct 13 10:57:42 UTC 2014 - werner@suse.de + +- Update to file version 5.20 + * recognize encrypted CDF documents + * add magic_load_buffers from Brooks Davis + * add thumbs.db support +- Remove file-5.07-iso9660.dif as now upstream +- Remove file-5.19-gdbm.patch as now upstream +- Adapt and rename file-5.18-endian.patch to file-5.20-endian.patch +- Adapt and rename file-5.19.dif file-5.20.dif + +------------------------------------------------------------------- +Tue Aug 19 09:30:38 UTC 2014 - pgajdos@suse.com + +- correctly identify GDBM files created by libgdbm4 [bnc#888308] + * add file-5.19-gdbm.patch + +------------------------------------------------------------------- +Mon Aug 18 17:05:34 UTC 2014 - werner@suse.de + +- Add file-rpmlintrc to file list + +------------------------------------------------------------------- +Mon Aug 18 16:28:10 UTC 2014 - fcrozat@suse.com + +- Add obsoletes/provides to baselibs.conf. + +------------------------------------------------------------------- +Tue Jun 24 16:27:38 UTC 2014 - werner@suse.de + +- Update to file version 5.19 + * Misc buffer overruns and missing buffer size tests in cdf parsing + (Francisco Alonso, Jan Kaluza) + * Enforce limit of 8K on regex searches that have no limits + * Allow the l modifier for regex to mean line count. Default + to byte count. If line count is specified, assume a max + of 80 characters per line to limit the byte count. + * Don't allow conversions to be used for dates, allowing + the mask field to be used as an offset. + * Make the range operator limit the length of the + regex search. + * PR/347: Windows fixes + * PR/352: Hangul word processor recognition + * PR/354: Encoding irregularities in text files + * Fix uninitialized title in CDF files (Jan Kaluza) + * PR/351: Fix compilation of empty files + * Fix integer formats: We don't specify 'l' or + 'h' and 'hh' specifiers anymore, only 'll' for + quads and nothing for the rest. This is so that + magic writing is simpler. + * PR/341: Jan Kaluza, fix memory leak + * PR/342: Jan Kaluza, fix out of bounds read + * Fix issue with long formats not matching fmtcheck +- Rename and change patch file-5.14-misc.dif to file-5.19-misc.dif +- Rename and change patch file-5.14-printf.dif to file-5.19-printf.dif +- Rename and change patch file-5.07-biorad.dif to file-5.19-biorad.dif +- Rename and change patch file-5.19.dif to file-5.17.dif +- Rename and change patch file-4.24-cromfs.dif to file-5.19-cromfs.dif +- Rename and change patch file-4.24-solv.dif to file-5.19-solv.dif +- Rename and change patch file-5.12-zip2.0.dif to file-5.19-zip2.0.dif +- Rename and change patch file-5.07-clicfs.dif to file-5.19-clicfs.dif + +------------------------------------------------------------------- +Thu May 8 19:56:07 UTC 2014 - crrodriguez@opensuse.org + +- file-secure_getenv.patch use secure_getenv only as we + can't know in which context the shared library is used. + +------------------------------------------------------------------- +Fri Mar 28 10:24:18 UTC 2014 - werner@suse.de + +- Update to file version 5.18 + * add fmtcheck(3) for those who don't have it + * prevent mime entries from being attached to magic + entries with no descriptions + * adjust magic strength for regex type + * remove superfluous ascmagic with encoding test + * fix regression fix echo -ne "\012\013\014" | file -i - + which printed "binary" instead of "application/octet-stream" + * add size_t overflow check for magic file size + * experimental support for matching with CFD CLSID + * Cache old LC_CTYPE locale before setting it to "C", so + we can use it to restore LC_CTYPE instead of asking + setlocale() to scan the environment variables. +- Refresh patches + file-5.07-elf.dif becomes file-5.18-elf.dif + file-5.12-javacheck.dif becomes file-5.18-javacheck.dif + file-5.12-endian.patch becomes file-5.18-endian.patch + file-5.15-clear-invalid.patch +- Drop patch + 0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch + now part of upstream + +------------------------------------------------------------------- +Mon Mar 17 14:04:24 UTC 2014 - werner@suse.de + +- Add patch + 0001-off-by-one-in-out-of-bounds-calculations-Jan-Kaluza.patch + to finally fix bnc#866750 + +------------------------------------------------------------------- +Tue Feb 18 10:21:11 UTC 2014 - werner@suse.de + +- Update to file version 5.17 (bug fix release) + * Count recursion levels through indirect magic + * Prevent infinite recursion on files with indirect offsets of 0 + * Add -E flag that makes file print filesystem errors to stderr + and exit. + * mime printing could print results from multiple magic entries + if there were multiple matches. + * in some cases overflow was not detected when computing offsets + in softmagic. + * use strcasestr() to for cdf strings + * reset to the "C" locale while doing regex operations, or case + insensitive comparisons; this is provisional + +------------------------------------------------------------------- +Mon Dec 2 11:29:44 UTC 2013 - werner@suse.de + +- Update to file version 5.16 (bug fix release) + * always leave magic file loaded, don't unload for magic_check, etc. + * fix default encoding to binary instead of unknown which broke recently + * handle empty and one byte files, less specially so that + --mime-encoding does not break completely. + * fix erroneous non-zero exit code from non-existant file and message + * add CDF MSI file detection (Guy Helmer) + +------------------------------------------------------------------- +Mon Nov 4 00:30:41 UTC 2013 - jengelh@inai.de + +- Set RPM groups + +------------------------------------------------------------------- +Tue Oct 1 10:42:40 UTC 2013 - werner@suse.de + +- Add changes of Andreas Stieger + +------------------------------------------------------------------- +Mon Sep 30 14:27:34 UTC 2013 - werner@suse.de + +- Update to file version 5.15 (bug fix release, no new featuress) + * Don't mix errors and regular output if there was an error + * in magic_descriptor() don't close the file and try to restore + its position + * Don't treat magic as an error if offset was past EOF (Christoph Biedl) + * Fix spacing issues in softmagic and elf (Jan Kaluza) + * Fix segmentation fault with multiple magic_load commands. + * The way "default" was implemented was not very useful because + the "if something was printed at that level" was not easily + controlled by the user, and the format was bound to a string + which is too restrictive. Add a "clear" for that level keyword + and make "default" void. + * disallow strength setting in "name" entries +- Adjust for upstream changes: + * file-5.14-tex.dif + * file-5.07-elf.dif + * file-5.12-ocloexec.patch + * file-5.12-nitpick.dif + * file-5.13.dif +- Drop patches, applied upstream: + * file-5.13-whitespace.patch + * elf-invalid-byte-order.patch + +------------------------------------------------------------------- +Sun Sep 29 00:46:01 UTC 2013 - andreas.stieger@gmx.de + +- add file-5.15-clear-invalid.patch to fix an invalid format + +------------------------------------------------------------------- +Sun May 26 10:31:25 UTC 2013 - schwab@suse.de + +- elf-invalid-byte-order.patch: remove bogus "invalid byte order" from elf + magic + +------------------------------------------------------------------- +Sun May 26 08:01:55 UTC 2013 - schwab@suse.de + +- file-5.13-whitespace.patch: remove extra whitespace in ELF magic, breaks + libtool + +------------------------------------------------------------------- +Fri Mar 29 06:56:37 UTC 2013 - crrodriguez@opensuse.org + +- Refresh patches and remove the visibility patch that I + upstreamed few releases ago in a different form. + +------------------------------------------------------------------- +Fri Mar 22 10:13:29 UTC 2013 - werner@suse.de + +- Update to file version 5.14 (also mainly bug fixes) + * fix recursive magic separator printing + * limit recursion level for mget + * fix pread() related breakage in cdf + * handle offsets properly in recursive "use" +- Remove patch file-5.13-return.patch + +------------------------------------------------------------------- +Tue Feb 26 17:33:36 UTC 2013 - werner@suse.de + +- Add patch file-5.13-return.patch: avoid doubled return + +------------------------------------------------------------------- +Fri Feb 22 10:14:36 UTC 2013 - werner@suse.de + +- Update to file version 5.13 (mainly bug fixes) + * add elf reading of debug info to determine if file is stripped + * use pread() + * change mime description size from 64 to 80 to accommodate OOXML. + * Warn about inconsistent continuation levels. + * Change fsmagic to add a space after it prints. + * Make getline public so that file can link against it. + Perhaps it is better to rename it, or hide it differently. + Fixes builds on platforms that do not provide it. + * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document + what long, int, short, etc is (Guy Harris) + * add magic_version function and constant + * Redo memory allocation and de-allocation. + (prevents double frees on non mmap platforms) + * Fix bug with name/use having to do with passing + found state from the parent to the child and back. + +------------------------------------------------------------------- +Tue Feb 19 09:05:31 UTC 2013 - werner@suse.de + +- Use %libname macro and make that file-magic obsoletes libmagic-data + compare with bnc# 804323 to avoid trouble with interim package name + +------------------------------------------------------------------- +Wed Jan 23 13:00:47 UTC 2013 - werner@suse.de + +- Make if build on ppc64, that is re-add the configure check for + sizeof long long otherwise readelf fail on ppc64 + +------------------------------------------------------------------- +Tue Jan 22 16:22:05 UTC 2013 - werner@suse.de + +- Update to file version 5.12 + * Warn about inconsistent continuation levels. + * Change fsmagic to add a space after it prints. + * Make getline public so that file can link against it. + Perhaps it is better to rename it, or hide it differently. + Fixes builds on platforms that do not provide it. + * Add SuS d{,1,2,4,8}, u{,1,2,4,8} and document + what long, int, short, etc is (Guy Harris) + * add magic_version function and constant + * Redo memory allocation and de-allocation. + (prevents double frees on non mmap platforms) + * Fix bug with name/use having to do with passing + found state from the parent to the child and back. + * Only print elf capabilities for archs we know (Jan Kaluza) + * Add "name" and "use" file types in order to look + inside mach-o files. + * add string/T (Jan Kaluza) + * search for $HOME/.magic.mgc if it is there first + * fix reads from a pipe, and preserve errno + * use ctime_r, asctime_r + * Fixes for indirect offsets to handle apple disk formats +- Also includes our extfs-minix patch + +------------------------------------------------------------------- +Mon Nov 26 15:23:01 UTC 2012 - werner@suse.de + +- Add file-5.11-extfs-minix.dif: Change detection order of ext2/3/4 + fs and minix to avoid the for the free inode numbers 4991,5007, + 9320,9336 and multiple of 65536 the ext2/3/4 fs will be detected + as minix fs (bnc#788435) + +------------------------------------------------------------------- +Sat Oct 27 18:37:13 UTC 2012 - coolo@suse.com + +- implement shared library policy for libmagic1 + +------------------------------------------------------------------- +Tue Sep 18 10:24:58 UTC 2012 - werner@suse.de + +- Add small patch to make clear if file follows symbloc links or not + as tihs depend on the environment variable POSIXLY_CORRECT +- Remove the README file as this is for packagers and not for users + +------------------------------------------------------------------- +Sun Aug 19 19:22:01 UTC 2012 - giecrilj@stegny.2a.pl + +- add documentation (bnc#776532) + +------------------------------------------------------------------- +Tue Aug 14 04:06:35 UTC 2012 - crrodriguez@opensuse.org + +- Use the OS's byteswapping routines. + +------------------------------------------------------------------- +Tue Jun 26 07:45:16 UTC 2012 - cfarrell@suse.com + +- license update: BSD-2-Clause + SPDX format + +------------------------------------------------------------------- +Wed Mar 21 12:39:50 UTC 2012 - werner@suse.de + +- Update to file version 5.11 (bnc#753303, CVE-2012-1571) + * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) + +------------------------------------------------------------------- +Mon Jan 16 13:42:35 UTC 2012 - werner@suse.de + +- Update to file version 5.10 + * Add magic for /usr/bin/env Perl scripts + * Weaken generic script magic to avoid clashing with + language-specific magic. + * Remove hardwired token finding (names.h), turning it into soft + magic. Patterns are either anchored regexs or search/8192. English + language detection and PL/1 detection have been removed as they + were too fragile. -e tokens is still accepted for backwards + compatibility. + * Move 3ds patterns (which are commented out anyway) into autodesk + (they were, oddly, in c-lang). + * Tweak strength of generic hash-bang detectors to be less than + specific ones. + * Make an inconsistent description of Python scripts consistent. + * Python3 binding fixes from Kelly Anderson + * If a string type magic entry is marked as text or binary + only match text files against text entries and binary + files against binary entries. + * If the application name is not set in a cdf file, try to see + if it has a directory with the application name on it. + * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza + * Don't use variable string formats. + +------------------------------------------------------------------- +Sat Nov 5 18:37:25 UTC 2011 - crrodriguez@opensuse.org + +- libmagic: use O_CLOEXEC where needed, as there is no warranty + that calling applications will not fork() and we end up leaking + file descriptors to their child processes. + +------------------------------------------------------------------- +Sat Oct 1 05:39:05 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Apply packaging guidelines (remove redundant/obsolete + tags/sections from specfile, etc.) + +------------------------------------------------------------------- +Tue Aug 23 14:55:19 UTC 2011 - werner@suse.de + +- Update to file version 5.08 + * Fix detection of Zip files (Mantis #128). + * Make some minor improvements to file(1). + * Rename MIME types for filesystem objects for consistency with + xdg-utils. Typically this means that application/x-foo becomes + inode/foo, but some names also change slightly, e.g. + application/x-character-device becomes inode/chardevice. + +------------------------------------------------------------------- +Mon Jul 18 12:00:20 CEST 2011 - werner@suse.de + +- Fixed regression on zip archive detection (bnc#706310) + +------------------------------------------------------------------- +Tue Jun 14 19:50:04 CEST 2011 - werner@suse.de + +- Update to file version 5.07 + * Several regressions in magic were fixed. A buffer overflow was + corrected. The program version is now recorded in only one place. + Several documentation improvements were made. + * The Python bindings were updated and fixed. Magic support for + OCF (EPUB) files and for lrzip files was added. Zip file magic + was adapted for files with unsupported special types. Many + more magic updates and fixes were made. + * Several minor bugs were fixed. +- Add magic for clicfs evne if upstream does not support it (bnc#681329) + +------------------------------------------------------------------- +Wed Nov 24 13:17:11 CET 2010 - werner@suse.de + +- Add patch for Bio-Rad image format to avoid conflicts with other + magic records like RPM and even some ACII files (bnc#654696) + +------------------------------------------------------------------- +Fri Nov 5 22:41:23 UTC 2010 - cristian.rodriguez@opensuse.org + +- libmagic: export only public interface symbols listed + in magic.h, this also avoids exporting interesting stuff + like strlcat, strlcpy... + +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + +------------------------------------------------------------------- +Mon Apr 19 16:18:08 CEST 2010 - werner@suse.de + +- Add llvm bicode magic (bnc#597752) + +------------------------------------------------------------------- +Fri Feb 5 17:15:51 CET 2010 - werner@suse.de + +- Update to file version 5.04 + * print proper mime for crystal reports file + * print the last summary information of a cdf document, not the + first so that nested documents print the right info + * ctime/asctime can return NULL on some OS's although + they should not (Toshit Antani) + * Centralize magic path handling routines and remove the + special-casing from file.c so that the python module for + example comes up with the same magic path (Fixes ~/.magic + handling) (from Gab) + * When magic argument is a directory, read the files in + strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). + * Combine overlapping epoc and psion magic files into one (epoc). + * Add some more EPOC MIME types. + * Fix 3 bugs (From Ian Darwin): + - file_showstr could move one past the end of the array + - parse_apple did not nul terminate the string in the overflow case + - parse_mime truncated the wrong string in the overflow case + * Add the necessary field handling for crystal reports files to work + * Stop "(if" identifying Lisp files, that's plain dumb! + * Add a couple of missing MP3 MIME types. + * Add full range of hash-bang tests for Python and Ruby. + * Add MIME types for Python and Ruby scripts. + * off by one in parsing hw capabilities in elf (Cheng Renquan) + +------------------------------------------------------------------- +Sat Dec 12 22:08:00 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Tue Nov 3 19:12:13 UTC 2009 - coolo@novell.com + +- updated patches to apply with fuzz=0 + +------------------------------------------------------------------- +Tue Oct 27 17:04:51 CET 2009 - werner@suse.de + +- Make ISO9660 magic entry working with file 5.xx (bnc#547683) + +------------------------------------------------------------------- +Wed Sep 30 21:15:33 UTC 2009 - crrodriguez@opensuse.org + +- file-devel only requires glibc-devel + +------------------------------------------------------------------- +Tue Jun 9 12:51:31 CEST 2009 - werner@suse.de + +- Do _not_ touch change log of python-magic +- Update to file version 5.03 + * Avoid null dereference in cdf code (Drew Yao) + * More cdf bounds checks and overflow checks + +------------------------------------------------------------------- +Tue Jun 2 13:49:08 CEST 2009 - coolo@novell.com + +- sync Version using pre_checkin.sh + +------------------------------------------------------------------- +Thu May 7 17:45:10 CEST 2009 - werner@suse.de + +- Add support for special zip archives (bnc#500511) + +------------------------------------------------------------------- +Wed May 6 14:37:51 CEST 2009 - werner@suse.de + +- Update to file version 5.02 + * Read ~/.magic in addition to the default magic file not instead + of, as documented in the man page. + * filesystem and msdos patches (Joerg Jenderek) + * Added CDF parsing + * Add text/x-lua MIME type for Lua scripts. + * >= <= is not supported, so fix the magic and warn about it. + reported by: Thien-Thi Nguyen + * use memchr instead of strchr because the string + might not be NUL terminated (Scott MacVicar) + * Fix --mime, --mime-type and --mime-encoding under new scheme. + * add loop limits to avoid DoS attacks by constructing + looping sector references. + * Allow escaping of relation characters, so that we can say \^[A-Z] + and the ^ is not eaten as a relation char. + +------------------------------------------------------------------- +Mon Jan 26 21:17:45 CET 2009 - crrodriguez@suse.de + +- remove "la" files and static libraries + +------------------------------------------------------------------- +Wed Dec 10 12:34:56 CET 2008 - olh@suse.de + +- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade + (bnc#437293) + +------------------------------------------------------------------- +Thu Nov 27 13:17:54 CET 2008 - werner@suse.de + +- Add libsatsolver file magic +- Re-enable detection of old LZW (.Z) format (bnc#448984) + +------------------------------------------------------------------- +Thu Oct 30 12:34:56 CET 2008 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Tue Aug 19 18:51:46 CEST 2008 - ro@suse.de + +- fix detection for java bytecode + +------------------------------------------------------------------- +Tue May 6 21:21:24 CEST 2008 - aj@suse.de + +- Do not return random data. + +------------------------------------------------------------------- +Thu Apr 24 19:27:57 CEST 2008 - werner@suse.de + +- Don't slip into Mp3 channel for ext file systems (bnc#383431) + +------------------------------------------------------------------- +Mon Apr 14 17:35:43 CEST 2008 - werner@suse.de + +- Add CROM File System to Localstuff (bnc#379027) +- Update to file bugfix version 4.24 + * ELF core file command name/line bug fixes and enhancements + * Change strength of ! from MULT to 0, as it matches almost anything (Reuben Thomas) + * Clarify UTF-8 BOM message (Reuben Thomas) + * Add HTML comment to token list in names.h + * !:mime annotations in magic files (Reuben Thomas) + * zero out utime/utimes structs (Gavin Atkinson) + * reduce writable data from Diego "Flameeyes" Petten + * strtof detection + * remove bogus regex magic that could cause a DoS + * better mismatch version message + * bring back some fixes from OpenBSD + * treat ELF dynamic objects as executables + * fix gcc warnings + * make sure we have zlib.h and libz to compile the builtin + decompress code + * float and double magic support (Behan Webster) + * Convert fortran to a soft test (Reuben Thomas) + * Add --with-filename, and --no-filename (Reuben Thomas) + * Rest of the mime split (Reuben Thomas) + * Make usage message generated from the flags so that + they stay consistent (Reuben Thomas) + * typo in comment, missing ifdef QUICK, remove unneeded code + * Fix problem printing -\012 in some entries + * Separate magic type and encoding flags (Reuben Thomas) + * configure fix for int64 and strndup (Reuben Thomas) + * Add magic_descriptor() function. + * Fix regression in elf reading code where the core name was + not being printed. + * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson) + * Make mime format consistent so that it can + Remove 7/8bit classifications, since they were arbitrary + and not based on the file data. + +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + +------------------------------------------------------------------- +Thu Mar 13 19:19:56 CET 2008 - werner@suse.de + +- Remember ReiserFS V3.6.19 (bnc#370535) + +------------------------------------------------------------------- +Mon Jan 28 18:09:01 CET 2008 - rguenther@suse.de + +- Split python-magic off to separate spec file to avoid pulling + python into the base build cycle + +------------------------------------------------------------------- +Tue Jan 15 10:46:05 CET 2008 - werner@suse.de + +- Move python-base to python + +------------------------------------------------------------------- +Wed Dec 5 12:11:32 CET 2007 - werner@suse.de + +- Add X11 cursor magic to Localstuff (bug #346132) +- New package python-magic, the python API for the libmagic + +------------------------------------------------------------------- +Fri Aug 31 17:32:04 CEST 2007 - werner@suse.de + +- Make regex for awk more robust to avoid conflict with PostScript, + thanks goes to Werner Lemberg for the report + +------------------------------------------------------------------- +Wed Aug 29 19:01:31 CEST 2007 - werner@suse.de + +- Add Scribus to local magic (bug #298009) + +------------------------------------------------------------------- +Wed Jun 6 17:08:25 CEST 2007 - werner@suse.de + +- Update to file version 4.21 including the last three bug fixes + +------------------------------------------------------------------- +Thu May 24 11:58:09 CEST 2007 - werner@suse.de + +- Fix of the fix for bug #256290 with CVE-2007-2799 + +------------------------------------------------------------------- +Mon May 21 11:49:45 CEST 2007 - werner@suse.de + +- Expand search area used before regex (also bug #263754) + +------------------------------------------------------------------- +Mon May 14 13:19:00 CEST 2007 - werner@suse.de + +- More on DoS attack with regex (bug #263754) +- Avoid crash on unknown option and enable option `-e' + +------------------------------------------------------------------- +Mon Apr 16 14:56:02 CEST 2007 - werner@suse.de + +- Avoid DoS attack with regex (bug #263754) + +------------------------------------------------------------------- +Thu Apr 5 17:09:05 CEST 2007 - werner@suse.de + +- Avoid trouble with variable/macro on ppc64 + +------------------------------------------------------------------- +Mon Mar 26 15:46:17 CEST 2007 - rguenther@suse.de + +- Add zlib-devel BuildRequires + +------------------------------------------------------------------- +Wed Mar 21 12:57:57 CET 2007 - werner@suse.de + +- Update to file 4.20 due security reason CVE-2007-1536 (#256290) + +------------------------------------------------------------------- +Tue Mar 6 23:20:41 CET 2007 - rguenther@suse.de + +- Fix order of changelog entries + +------------------------------------------------------------------- +Thu Nov 23 17:15:17 CET 2006 - werner@suse.de + +- Initialize variable in elf patch + +------------------------------------------------------------------- +Wed Nov 22 16:14:33 CET 2006 - werner@suse.de + +- Update to new file 4.18 + * Includes most of our extensions (elf, fifo, softmagic) + +------------------------------------------------------------------- +Mon Jun 12 15:11:07 CEST 2006 - werner@suse.de + +- Reenable file to display process name from a core dump (#183685) + +------------------------------------------------------------------- +Mon Mar 27 13:26:50 CEST 2006 - werner@suse.de + +- Add Mono/.Net identfiers to msdos magics (bug #159708) + +------------------------------------------------------------------- +Fri Mar 24 15:35:48 CET 2006 - werner@suse.de + +- Update to file version 4.17 + * This version supports new key like `search' and `regex' + * Port our patches to this version + +------------------------------------------------------------------- +Wed Jan 25 21:30:11 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Jan 16 17:23:26 CET 2006 - werner@suse.de + +- Add Xen magics + +------------------------------------------------------------------- +Tue Dec 6 14:03:06 CET 2005 - werner@suse.de + +- Add Structured Storage Entry for PageMaker to local (bug #134895) + +------------------------------------------------------------------- +Thu Oct 20 11:19:53 CEST 2005 - werner@suse.de + +- Update to file version 4.16 + +------------------------------------------------------------------- +Tue Aug 23 13:58:51 CEST 2005 - werner@suse.de + +- Fix broken cracklib magic (bug #106007) + +------------------------------------------------------------------- +Mon Jul 25 17:05:17 CEST 2005 - werner@suse.de + +- Update to new file 4.14 +- Split of the development version as own package + +------------------------------------------------------------------- +Fri Jul 1 12:26:09 CEST 2005 - werner@suse.de + +- Even for netware the columns in the magic entry are seperated + by tabs +- Add cracklib magics (bug #93673) + +------------------------------------------------------------------- +Mon Jun 13 09:38:51 CEST 2005 - mmj@suse.de + +- Add primitive magic for detecting netware loadable modules (NLMs) +- Don't remove buildroot before install +- Don't strip binaries explicitly +- %doc is implied by %man + +------------------------------------------------------------------- +Thu Mar 17 20:22:49 CET 2005 - werner@suse.de + +- Be sure that the pipe/fifo patch works (bug #73644) + +------------------------------------------------------------------- +Thu Mar 10 13:40:18 CET 2005 - werner@suse.de + +- Be able to use the -s option even on pipes (bug #71074) +- Do not hang on sockets or pipes not opened on the write side + +------------------------------------------------------------------- +Fri Feb 18 14:08:21 CET 2005 - werner@suse.de + +- Update to file 4.13 for fixes in handling of bzip2 and DOS files +- Do not be fooled by minix filesystems magics on jpeg files + +------------------------------------------------------------------- +Fri Nov 26 16:24:37 CET 2004 - werner@suse.de + +- Update to file 4.12, this may fix a security issue (bug #48576) + +------------------------------------------------------------------- +Tue Sep 28 18:08:51 CEST 2004 - werner@suse.de + +- Correct PCP entries (bug #46111) + +------------------------------------------------------------------- +Thu Sep 16 15:56:46 CEST 2004 - werner@suse.de + +- Read HOWMANY bytes even from a pipe (reported by max) + +------------------------------------------------------------------- +Thu Aug 26 18:51:28 CEST 2004 - werner@suse.de + +- Update to bugfix release 4.09 + +------------------------------------------------------------------- +Tue Aug 24 13:35:39 CEST 2004 - lmuelle@suse.de + +- Add -fPIC to the CFLAGS. + +------------------------------------------------------------------- +Wed May 26 13:47:36 CEST 2004 - werner@suse.de + +- Don't trap into string formats if integers are provided (#41209) + +------------------------------------------------------------------- +Mon May 24 12:25:30 CEST 2004 - werner@suse.de + +- Check for random data within ELF header (bug #40909) + +------------------------------------------------------------------- +Thu Feb 12 16:30:51 CET 2004 - werner@suse.de + +- Add name offsets for CORE dumps even for 64bit ELF (bug #34461) + +------------------------------------------------------------------- +Tue Jan 20 14:59:22 CET 2004 - werner@suse.de + +- Update to 4.07 + +------------------------------------------------------------------- +Mon Dec 15 13:07:13 CET 2003 - werner@suse.de + +- Add workaround for new automake `feature' of ignoring man pages +- Ensure that the correct break condition is returned if readelf + past the end of the buffer (bug #33644). + +------------------------------------------------------------------- +Mon Dec 8 19:26:20 CET 2003 - werner@suse.de + +- Update to 4.06 +- Use /etc/magic:/usr/share/misc/magic as magic and move /etc/magic + to a real configuration file for _local_ settings (bug #32725). + +------------------------------------------------------------------- +Sat Oct 18 08:06:01 CEST 2003 - kukuk@suse.de + +- Add patch to detect policy file for SE Linux +- Build as normal user +- Clean up build root + +------------------------------------------------------------------- +Mon Sep 29 14:47:23 CEST 2003 - werner@suse.de + +- Avoid endless loop due wrong alignment in old ELF binaries + +------------------------------------------------------------------- +Tue Sep 16 13:29:50 CEST 2003 - werner@suse.de + +- Extend buffer from 64kb upto 68kB to find ReiserFS (bug #30736) + +------------------------------------------------------------------- +Wed Jul 2 14:15:20 CEST 2003 - werner@suse.de + +- Use _libdir + +------------------------------------------------------------------- +Tue Jul 1 18:38:23 CEST 2003 - werner@suse.de + +- Update to file 4.03 + +------------------------------------------------------------------- +Thu Apr 17 11:59:21 CEST 2003 - coolo@suse.de + +- use BuildRoot + +------------------------------------------------------------------- +Tue Mar 4 14:54:09 CET 2003 - werner@suse.de + +- Fix buffer overflow in elf detection + +------------------------------------------------------------------- +Tue Dec 17 22:36:09 CET 2002 - olh@suse.de + +- use RPM_BUILD_ROOT, not BUILD_ROOT in testsuite + +------------------------------------------------------------------- +Mon Nov 11 00:13:30 CET 2002 - ro@suse.de + +- fix deprecated multiline string literal (from longopt patch) + +------------------------------------------------------------------- +Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de + +- removed bogus self-provides + +------------------------------------------------------------------- +Tue Jul 23 14:36:03 CEST 2002 - werner@suse.de + +- Add mySQL bytes to magic (bug #16138) + +------------------------------------------------------------------- +Fri Jun 7 23:06:48 CEST 2002 - olh@suse.de + +- don't change the union u in readelf.c:tryelf() on ppc64 + +------------------------------------------------------------------- +Mon Feb 4 14:47:40 CET 2002 - werner@suse.de + +- Fix looking of manual page + +------------------------------------------------------------------- +Mon Feb 4 14:35:18 CET 2002 - werner@suse.de + +- Add some magics for METAFONT format files +- Add inofficial long options for LSB + +------------------------------------------------------------------- +Thu Dec 27 15:47:53 MET 2001 - adrian@suse.de + +- fix file output for mips binaries. The old output broke several + ltconfig scripts in other packages and was wrong anyway. +- recompress tar ball with bz2 + +------------------------------------------------------------------- +Wed Dec 19 15:50:32 CET 2001 - werner@suse.de + +- update to version 3.37 + +------------------------------------------------------------------- +Sat Jun 30 21:20:57 CEST 2001 - bk@suse.de + +- update to version 3.33 +- don't change the union u in readelf.c:tryelf() on s390x. +- option i: fix one-byte memory underallocation - strcat adds '\0' + +------------------------------------------------------------------- +Thu Jun 7 13:54:55 CEST 2001 - werner@suse.de + +- Autoconf and Elf header: make it work again + +------------------------------------------------------------------- +Fri May 4 11:12:55 CEST 2001 - werner@suse.de + +- Make symlink /etc/magic a relative one + +------------------------------------------------------------------- +Tue Jan 16 14:00:37 CET 2001 - werner@suse.de + +- Change order to find WAVE and TTF data before G3, apple and + macintosh data. +- Change string detection of PFM data to bit comparision masking + out the third bit to make raw G3 work. + +------------------------------------------------------------------- +Sun Dec 3 17:54:36 CET 2000 - schwab@suse.de + +- Don't match against artificial null byte. +- Fix resource leaks. + +------------------------------------------------------------------- +Tue Nov 28 10:03:56 CET 2000 - aj@suse.de + +- Add LFS support. + +------------------------------------------------------------------- +Tue Nov 14 15:43:16 CET 2000 - werner@suse.de + +- Correct version handling of Linux/i386 Kernel setup header + +------------------------------------------------------------------- +Mon Nov 13 17:18:05 CET 2000 - werner@suse.de + +- Fix handling of Microsoft Access Database in comparision + with Digifax-G3-File. + +------------------------------------------------------------------- +Tue Oct 3 21:40:00 CEST 2000 - kukuk@suse.de + +- fix inclusion of config.h +- Add group tag + +------------------------------------------------------------------- +Thu Sep 28 18:49:19 CEST 2000 - werner@suse.de + +- Move Magdir changes into misc dif +- Remove exectuable from text scripts + +------------------------------------------------------------------- +Fri Sep 15 19:17:54 CEST 2000 - werner@suse.de + +- Update to version 3.32 + +------------------------------------------------------------------- +Tue Jun 20 16:11:05 CEST 2000 - werner@suse.de + +- /usr/lib/magic -> /usr/share/misc/magic + +------------------------------------------------------------------- +Thu Feb 3 11:58:07 CET 2000 - schwab@suse.de + +- Ignore SHT_DYNSYM sections when deciding whether object is stripped. + +------------------------------------------------------------------- +Fri Jan 28 12:59:13 CET 2000 - schwab@suse.de + +- Fix int32 vs long problem. + +------------------------------------------------------------------- +Thu Jan 27 14:51:31 CET 2000 - schwab@suse.de + +- Fix non-ascii literal characters in string +- Specfile cleanup, get rid of Makefile.Linux +- /usr/man -> /usr/share/man + +------------------------------------------------------------------- +Thu Nov 25 17:49:30 CET 1999 - schwab@suse.de + +- Fix location of magic file. + +------------------------------------------------------------------- +Tue Nov 23 16:48:00 MET 1999 - kukuk@suse.de + +- Update to version 3.27 +- Add patches for SPARC + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Tue Aug 24 16:44:40 MEST 1999 - uli@suse.de + +- added -fsigned-char to CFLAGS (PPC) + +------------------------------------------------------------------- +Wed Nov 4 23:56:49 MET 1998 - ro@suse.de + +- disabled dcore (won't build with glibc-2.0) + +------------------------------------------------------------------- +Thu Oct 1 11:14:10 MEST 1998 - ro@suse.de + +- update to 3.26 +- hacked dcore.c to build with glibc-2.1 + +------------------------------------------------------------------- +Fri Oct 10 12:28:47 MEST 1997 - florian@suse.de + + +- add some more entries to magic + + +------------------------------------------------------------------- +Wed Jun 25 11:28:39 MEST 1997 - florian@suse.de + + +- add additional entries to recognize LaTeX files + + +------------------------------------------------------------------- +Tue May 27 20:03:59 MEST 1997 - florian@suse.de + + +- add some additional entries from mgetty/vgetty + +- add additional entries for CLISP and GNU gettext from Bruno Haible + + + +------------------------------------------------------------------- +Wed Jan 22 22:24:11 CET 1997 - florian@suse.de + + +- update to version 3.22 + + +------------------------------------------------------------------- +Tue Nov 26 20:15:03 CET 1996 - florian@suse.de + + +- recognise german umlauts as text: dirty hack, but also call "setlocale" + for correctly installed systems... + +- add "dcore"-program to show some information about core-files + + +------------------------------------------------------------------- +Sat Nov 2 17:35:11 CET 1996 - florian@suse.de + + +- update to version 3.21 + +- mv /etc/magic /usr/lib/magic (/etc/magic is still a symlink to new + location) + +------------------------------------------------------------------- +Tue Sep 3 00:33:45 MET DST 1996 - florian@suse.de + +- added missing entries for G3-fax (from mgetty source) + diff --git a/file.keyring b/file.keyring new file mode 100644 index 0000000..aa6c7c5 --- /dev/null +++ b/file.keyring @@ -0,0 +1,43 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGiBEg60Q8RBAC89+Oyi+iU1dMftAqXKh9Ml2PDCRk+Q6gwSY2BwmnKrPYvLSx9 +/YApjDp4BzhjaMCiDtDkbVDO3JuLQqUsCUWRJr9UxgfkQPMx3obkgoyCCvUcG5eK +9CHeztjz5UK3jOzD939UtupUXs+5z4dK1oAFFEL3sV6m5O4cuHyeWpjLCwCg9LYw +mG2wIB65/2619W2kRMShDwkD/1KweB5mmXdQCDpzSg02Q4kGOzWmN2Dpv5kvKd9L +j/qxkj5PFOJ56Rmm04K0lPE6AnDgvEeuSqO8pkA8OY5IQNIjlgg3tshoMBRdsj9J +LKv67smQXy01eQmadJWoiIZFuSLX7nrRLm3x3i1K4/tcKorXoD5QBgOWaYFzkOcQ +5jrwA/9tn0MEkkVqez88xGhOjq6jooRWrP2lhNWb+Q7ayEvW9Wm9CYS0dXxlCCJf +qBOc+cZo8iVVbqiOzwAQ7uAAUv8azuaeRWpOD7MSjkXjYtkPwZevEd6xFKODaB2B +DO4WMlxO9mp3Q/gPfrM41v9n33tYsAzQMW7c9W5mX/XH2Cv/57QyQ2hyaXN0b3Mg +Wm91bGFzIChOZXRCU0Qga2V5KSA8Y2hyaXN0b3NAbmV0YnNkLm9yZz6IZAQTEQIA +JAIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAUCV7RsLgUJIkWeFwAKCRBxESqxbLM7 +Oi/LAKC1PdNLcoP06p6nsGh4ApH0gkSlfgCg7k7lwLPdN0djOMUPMFnqN+TYAoa0 +NENocmlzdG9zIFpvdWxhcyAocGVyc29uYWwga2V5KSA8Y2hyaXN0b3NAem91bGFz +LmNvbT6IZAQTEQIAJAIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAUCV7RsMQUJIkWe +FwAKCRBxESqxbLM7OlxlAJ9pp4BbcFdb2tmnQQ1K8eGaVx0DQQCfcBGfGyKgJsk6 +wBPK9Ijl3tW81qy5BA0ESDrSMxAQAMhxRX8vheZdeqMa+CVbZkA+f8Uib43gYz+9 +OPFRcBzZyKIixMO477X57iwH143Tmty+1PK3bxbo3qEvwd9AgWrlYSx3zq935xKI +GWKyrUGCU2AWIB9HL+C6gseJicGVJ1Lr8ZpvzrNHiboGDUlk5xXRz0it9+/lcuVP +8tfjlXjqO7c9BIlgZugp0RpfiNRZxJCBRDj4fLI/YOxY/J+smPiwUDRPvxvXLCzI +orY46/spRCT8fCrYLrxobpiW+9UrLC5yhJfa6TRmdaMILCA61fHIcjKyoDFzP0g9 +Fu0nc+ONJwyS/00ytvlIOzDBnLW98vyzWxrzDu5mBeWk5oVv/Jgy7O/ApHAk3Gm1 +VbRNNxnwAN6ZGIeAPMnQxtdhyZIfwJeVrvjoGDuhdoIw+9+K86ciyP/p3dhk9PV6 +fAGmuAvdWqVY8Dh+NbIyHr4Gge5qTtDiTaHaxJejb21Hopdhtz4r6pQH5CuMYOQ4 +vomo3mcEuK7cf3kHtkSbzAOhiK0Om3ui31LmNr51w3JS75ddQZe9zxK/MSawMoyr +FlLG8LIh8+FoXFXKUsrTZ+F9eqkEia9npSYc7PKU2WROonMMbgs46IL+Se/vKmCv +tUfxMnY8P2nYhHv2EqOdUaZi9O1nXfap1r56ts1v/3DADM54bj1+B2INKxSa+XXm +QQj6AG1nAAMFD/4+5lr0IQqvJmlDqFzPMA3yiSyTsxBpMFh0B3rbN9o1r9BAgPc/ +kjwWx1cwJwpGKk/3lxljxlAqMEa3s7bpOz3nlDvVBLnysJfF4s/3+ZumbeQLBesC +RkezasfZrAs6Dqnxq3Y0kKfnoCSV0rU/JW0vRC+XucQ576VxQup8s0RsYSDN6/5k +rS/pKjqUDa2Lx16sXleQgzMIV2NwLWt5m9/A2fF3+lDO4x9k58+M8Po4poERadY1 +mxxT+5w2SBCm/4zaEICloLc1o2JeXRNawOnv3zVZJad/phlFOMsrI5t0aamjtn4L +25W7YNtGVSJEAPdrMGji3TcRlUFcyj/Wim6rHJToUtVbSbEsjbCHYzUm39EC9cub +n9n3Mac+rAA5vGQDnXx7vVBfIz4ZD4zwrKk8evTSgL7fY+sqcUAMjezWgrnMxfS2 +NdvS+gCBdNY0WyaL55+PsDfC3obXlqLvSk5JO4WX2RsGqYIjg2YPnBX64hH+NyZN +/uNkpflA+MNIl10nkR4Cw9e26vTAVn0nA8zYXI1p4v3YGNFhA9YL29G0BSMlrY9I +uh8wNoSz5UPvpZEjcTyQ8gmIV5Ko4uKdyWjV7jWrefKPkkGfCDnQLCyFbuDD9tT4 +hvMvR5kWMnt+0n5eL++Ua19vGO4q6HIPY8zcM1/25eZwhXiV0QnPCHDYqYhPBBgR +AgAPAhsMBQJXtGxGBQkiRZ0QAAoJEHERKrFsszs6IlQAnjLT4D/+k6uneuOjbxTK +3fhT6pGrAJ42qJm0ptKqlSBwuYo2Ci36ZIQCaQ== +=IJYi +-----END PGP PUBLIC KEY BLOCK----- diff --git a/file.spec b/file.spec new file mode 100644 index 0000000..75b6d53 --- /dev/null +++ b/file.spec @@ -0,0 +1,215 @@ +# +# spec file for package file +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ +# + + +%define somajor 1 +%define libname libmagic%{somajor} + +Name: file +BuildRequires: bash >= 4.0 +BuildRequires: libtool +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libseccomp) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(zlib) +URL: http://www.darwinsys.com/file/ +# bug437293 +%ifarch ppc64 +Obsoletes: file-64bit +%endif +# +# Set Version also in python-magic.spec +Version: 5.45 +Release: 0 +Summary: A Tool to Determine File Types +License: BSD-2-Clause +Group: Productivity/File utilities +Source0: https://www.astron.com/pub/file/file-%{version}.tar.gz +Source2: baselibs.conf +Source3: file-rpmlintrc +Source4: https://www.astron.com/pub/file/file-%{version}.tar.gz.asc +Source5: file.keyring +Patch0: file-5.45.dif +Patch1: file-5.19-misc.dif +Patch4: file-4.24-autoconf.dif +Patch5: file-5.14-tex.dif +Patch7: file-4.20-ssd.dif +Patch8: file-4.20-xen.dif +Patch9: file-5.22-elf.dif +Patch10: file-5.19-printf.dif +Patch12: file-5.17-option.dif +Patch13: file-4.21-scribus.dif +Patch15: file-4.21-xcursor.dif +Patch22: file-5.19-cromfs.dif +Patch25: file-5.18-javacheck.dif +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 +Patch37: file-secure_getenv.patch +Patch39: file-5.28-btrfs-image.dif +# PATCH-FIX-UPSTREAM: Support max time_t on 32bit +Patch42: file-5.45-type_t.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%global _sysconfdir /etc +%global magicdir %{_datadir}/file +%global _miscdir %{_datadir}/misc + +%description +With the file command, you can obtain information on the file type of a +specified file. File type recognition is controlled by the file +/etc/magic, which contains the classification criteria. This command is +used by apsfilter to permit automatic printing of different file types. + +%package magic +Summary: Database for libmagic to help identify files +Group: Productivity/File utilities +Obsoletes: libmagic-data < %{version} +Provides: libmagic-data = %{version} +BuildArch: noarch + +%description magic +This package contains the basic magic files that libmagic reads and uses +to estimate a file's type. + +%package -n %libname +Summary: Library for heuristic file type identification +Group: System/Libraries +Provides: file:%{_libdir}/libmagic.so.%{somajor} +Requires: file-magic = %{version} + +%description -n %libname +This library reads magic files and detects file types. Used by file command + +%package devel +Summary: Development files for libmagic, a library to determine file types +Group: Development/Libraries/C and C++ +Provides: file:/usr/include/magic.h +Requires: %libname = %{version} +Requires: glibc-devel + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require the magic "file" interface. + +%prep +%setup -q -n file-%{version} +%patch -P 42 -p0 -b .t_t +%patch -P 1 -p0 -b .misc +%patch -P 4 -p0 -b .conf +%patch -P 5 -p0 -b .tex +%patch -P 7 -p0 -b .ssd +%patch -P 8 -p0 -b .xen +%patch -P 9 -p0 -b .elf +%patch -P 10 -p0 -b .prtf +%patch -P 12 -p1 -b .opt +%patch -P 13 -p0 -b .scri +%patch -P 15 -p0 -b .xcur +%patch -P 22 -p0 -b .cromfs +%patch -P 25 -p0 -b .javacheck +%patch -P 26 -p0 -b .solv +%patch -P 27 -p0 -b .zip2.0 +%patch -P 31 -p0 -b .biorad +%patch -P 32 -p0 -b .clicfs +%patch -P 37 -p1 -b .getenv +%patch -P 39 -p1 -b .btrfs +%patch -P 0 -b .0 +test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in +rm -fv src/magic.h + +%build +export LANG=POSIX +export LC_ALL=POSIX +rm -f Magdir/*,v Magdir/*~ +rm -f ltcf-c.sh ltconfig ltmain.sh +autoreconf -fiv +export CFLAGS="%{optflags} -DHOWMANY=69632 -fPIE $(pkg-config libseccomp --cflags)" +%configure --disable-silent-rules --datadir=%{magicdir} \ + --disable-static \ + --enable-fsect-man5 +make %{?_smp_mflags} pkgdatadir='$(datadir)' LDFLAGS="-pie" + +%install +export LANG=POSIX +export LC_ALL=POSIX +mkdir %{buildroot}/etc +make DESTDIR=%{buildroot} install pkgdatadir='$(datadir)' +rm -vf %{buildroot}%{_sysconfdir}/magic +echo '# Localstuff: file(1) magic(5) for locally observed files' > %{buildroot}%{_sysconfdir}/magic +echo '# global magic file is %{magicdir}/magic(.mgc)' >> %{buildroot}%{_sysconfdir}/magic +# Does not build +mkdir -p %{buildroot}%{_miscdir} +ln -s %{magicdir}/magic %{buildroot}%{_miscdir}/magic +ln -s %{magicdir}/magic.mgc %{buildroot}%{_miscdir}/magic.mgc +%if %{with decore} +install -s dcore %{buildroot}%{_bindir} +%endif +rm -f %{buildroot}%{_libdir}/*.la + +%check +# Standard checks +make check +# Check out that the binary does not bail out: +LD_LIBRARY_PATH=%{buildroot}%{_libdir} +export LD_LIBRARY_PATH +%{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic %{buildroot}%{_bindir}/file +shopt -s globstar +for dir in %{_bindir} /%{_lib} %{_libdir} ; do + echo $dir/** | \ + xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic +done +unset LD_LIBRARY_PATH + +%post -n %libname -p /sbin/ldconfig + +%postun -n %libname -p /sbin/ldconfig + +%files -n %libname +%defattr (-,root,root) +%{_libdir}/lib*.so.* + +%files magic +%defattr (-,root,root) +%config(noreplace) %{_sysconfdir}/magic +%{_miscdir}/magic +%{_miscdir}/magic.mgc +%dir %{magicdir} +%{magicdir}/magic +%{magicdir}/magic.mgc +%doc %{_mandir}/man5/magic.5.gz + +%files +%defattr (-,root,root) +%if %{with decore} +%attr(755,root,root) %{_bindir}/dcore +%endif +%attr(755,root,root) %{_bindir}/file +%doc %{_mandir}/man1/file.1.gz +%license COPYING +%doc AUTHORS NEWS ChangeLog + +%files devel +%defattr (-,root,root) +%{_libdir}/lib*.so +%{_includedir}/magic.h +%{_libdir}/pkgconfig/libmagic.pc +%doc %{_mandir}/man3/libmagic.3.gz +%license COPYING +%doc README.DEVELOPER AUTHORS NEWS ChangeLog + +%changelog diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..c842ccd --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# This script is called automatically during autobuild checkin. +version=$(grep '^Version:.*' file.spec) +sed -ri "s,^Version:.*,$version," python-magic.spec diff --git a/python-magic.changes b/python-magic.changes new file mode 100644 index 0000000..47373d8 --- /dev/null +++ b/python-magic.changes @@ -0,0 +1,222 @@ +------------------------------------------------------------------- +Fri Aug 9 14:18:25 UTC 2024 - Matej Cepl + +- Don't use `setup.py test`, that is now not allowed. + +------------------------------------------------------------------- +Thu May 4 14:15:38 UTC 2023 - Frederic Crozat + +- Add _multibuild to define additional spec files as additional + flavors. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Tue Jan 10 13:28:15 UTC 2023 - Dr. Werner Fink + +- Enable tests for python-magic (not python-python-magic) + +------------------------------------------------------------------- +Tue Jan 10 08:29:12 UTC 2023 - Dr. Werner Fink + +- Run pre_checkin.sh to get correct source tar ball + +------------------------------------------------------------------- +Mon Jan 9 14:29:09 UTC 2023 - Dr. Werner Fink + +- Update to 5.44 + +------------------------------------------------------------------- +Mon Dec 12 08:58:58 UTC 2022 - Dirk Müller + +- switch to pkgconfig(zlib) so that alternative providers can be + used + +------------------------------------------------------------------- +Wed Sep 14 09:00:26 UTC 2022 - Dr. Werner Fink + +- Update to 5.43 due to Dirk + +------------------------------------------------------------------- +Sat Mar 19 18:01:52 UTC 2022 - Dirk Müller + +- spec-cleaner run + +------------------------------------------------------------------- +Tue Oct 19 09:55:47 UTC 2021 - Dr. Werner Fink + +- Update to 5.41 + +------------------------------------------------------------------- +Sat Apr 3 07:32:11 UTC 2021 - Andreas Stieger + +- update to 5.40: + * file 5.40, no changes specific to python-magic + +------------------------------------------------------------------- +Wed Jun 17 14:03:49 UTC 2020 - Paolo Stivanin + +- Update to 5.39 + +------------------------------------------------------------------- +Tue Dec 17 09:59:08 UTC 2019 - Dr. Werner Fink + +- Correct version of file which is now 5.38 + +------------------------------------------------------------------- +Mon Oct 14 13:40:13 UTC 2019 - Dr. Werner Fink + +- Let python-magic build with latest rpm + +------------------------------------------------------------------- +Wed May 29 06:08:37 UTC 2019 - Dr. Werner Fink + +- Correct version of file which is now 5.37 + +------------------------------------------------------------------- +Thu Feb 21 07:18:57 UTC 2019 - Dr. Werner Fink + +- Correct version of file which is now 5.36 + +------------------------------------------------------------------- +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 + +- Correct version of file which is now 5.33 + +------------------------------------------------------------------- +Tue Sep 26 15:17:29 UTC 2017 - jmatejek@suse.com + +- converted to singlespec, dropped separate python3-magic spec file +- moved python build instructions from file.spec to python-magic.spec +- do not need to build the binary parts in order to build the python part +- removed inlining of %defines from file.spec because it is unreliable + in presence of parametrized macros +- added provides: python-file-magic to comply with the python package + naming policy + +------------------------------------------------------------------- +Wed Apr 20 08:49:18 UTC 2016 - werner@suse.de + +- Add Build Require python-setuptools + +------------------------------------------------------------------- +Mon Apr 18 12:21:12 UTC 2016 - werner@suse.de + +- Now it's file 5.26 + +------------------------------------------------------------------- +Tue Feb 16 12:41:14 UTC 2016 - rolf@rotkraut.de + +- Make the python command a macro. +- Remove %py_requires. +- Add dependency on libmagic. + +------------------------------------------------------------------- +Thu Jan 21 11:32:14 UTC 2016 - dmueller@suse.com + +- add file-5.25-avoid-double-evaluation-in-python-bindings.dif (bsc#949905) + +------------------------------------------------------------------- +Sun Oct 4 15:55:51 UTC 2015 - astieger@suse.com + +- file 5.25: + * add a limit to the length of regex searches + * fix problems with --parameter + +------------------------------------------------------------------- +Tue Jul 14 14:16:29 UTC 2015 - werner@suse.de + +- adapt version in specfile to 5.24 + +------------------------------------------------------------------- +Thu Jun 11 15:15:34 UTC 2015 - werner@suse.de + +- adapt version in specfile to 5.23 + +------------------------------------------------------------------- +Tue Jan 20 11:11:43 UTC 2015 - werner@suse.de + +- adapt version in specfile to 5.22 + +------------------------------------------------------------------- +Wed Dec 17 13:13:59 UTC 2014 - werner@suse.de + +- adapt version in specfile to 5.21 + +------------------------------------------------------------------- +Mon Oct 13 13:19:32 UTC 2014 - werner@suse.de + +- adapt version in specfile to 5.20 + +------------------------------------------------------------------- +Wed Jun 25 09:07:13 UTC 2014 - werner@suse.de + +- adapt version in specfile to 5.19 + +------------------------------------------------------------------- +Fri Feb 28 11:17:12 CET 2014 - ro@suse.de + +- adapt version in specfile to 5.17 + +------------------------------------------------------------------- +Sun Feb 23 20:34:25 UTC 2014 - andreas.stieger@gmx.de + +- Update python-magic to file version 5.17 (bug fix release) + * Count recursion levels through indirect magic + * Prevent infinite recursion on files with indirect offsets of 0 + * Add -E flag that makes file print filesystem errors to stderr + and exit. + * mime printing could print results from multiple magic entries + if there were multiple matches. + * in some cases overflow was not detected when computing offsets + in softmagic. + * use strcasestr() to for cdf strings + * reset to the "C" locale while doing regex operations, or case + insensitive comparisons; this is provisional + +------------------------------------------------------------------- +Mon Dec 2 11:31:12 UTC 2013 - werner@suse.de + +- Make it ready for file 5.16 + +------------------------------------------------------------------- +Tue Oct 1 10:43:20 UTC 2013 - werner@suse.de + +- Make it ready for file 5.15 + +------------------------------------------------------------------- +Tue Mar 12 10:37:20 UTC 2013 - idonmez@suse.com + +- Run pre_checkin.sh + +------------------------------------------------------------------- +Tue Mar 27 07:57:55 UTC 2012 - aj@suse.de + +- ran pre_checkin.sh + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Apply packaging guidelines (remove redundant/obsolete + tags/sections from specfile, etc.) + +------------------------------------------------------------------- +Mon Aug 29 11:17:14 UTC 2011 - coolo@novell.com + +- ran pre_checkin.sh + +------------------------------------------------------------------- +Tue Apr 15 11:58:17 CEST 2008 - werner@suse.de + +- Also change version number in python-magic.spec + +------------------------------------------------------------------- +Mon Jan 28 18:10:23 CET 2008 - rguenther@suse.de + +- Split off from file. + + diff --git a/python-magic.spec b/python-magic.spec new file mode 100644 index 0000000..20f684e --- /dev/null +++ b/python-magic.spec @@ -0,0 +1,72 @@ +# +# spec file for package python-magic +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# 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/ +# + + +# PyPI package name is file-magic. Version is taken from setup.py +%define file_magic_version 0.3.0 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global _miscdir %{_datadir}/misc +Name: python-magic +Version: 5.45 +Release: 0 +Summary: Python module to use libmagic +License: BSD-3-Clause AND BSD-4-Clause +Group: Development/Languages/Python +URL: https://www.darwinsys.com/file/ +Source99: file.spec +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: findutils +BuildRequires: libtool +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(zlib) +Requires: libmagic1 +Provides: python-file-magic = %{file_magic_version} +%{expand:%(sed -n -e '/^Source0\?:/,/^BuildRoot:/p' <%{_sourcedir}/file.spec)} +%python_subpackages + +%description +This package contains the Python binding that require the magic "file" +interface. + +%prep +%{expand:%(sed -n -e '/^%%prep/,/^%%build/p' <%{_sourcedir}/file.spec | sed -e '1d' -e '$d')} +ln -sf README.md python/README + +pushd python +%python_build +popd + +%install +pushd python +%python_install +popd + +%check +export LC_ALL=C.UTF-8 +pushd python +%python_flavored_alternatives +%pyunittest -v tests +popd + +%files %{python_files} +%doc python/README python/example.py +%{python_sitelib}/magic.py* +%pycache_only %{python_sitelib}/__pycache__ +%{python_sitelib}/file_magic-*-py%{python_version}.egg-info + +%changelog