From a2822cabad253c6490eb8579e5d8ab6339e50cc1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 19:14:39 +0000 Subject: import file-5.11-22.ael7b --- diff --git a/.file.metadata b/.file.metadata new file mode 100644 index 0000000..77cf82e --- /dev/null +++ b/.file.metadata @@ -0,0 +1 @@ +df8ffe8759ec8cd85a98dc98e858563ea2555f64 SOURCES/file-5.11.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a3c218 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/file-5.11.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/file-4.17-rpm-name.patch b/SOURCES/file-4.17-rpm-name.patch new file mode 100644 index 0000000..bfb9242 --- /dev/null +++ b/SOURCES/file-4.17-rpm-name.patch @@ -0,0 +1,12 @@ +diff --git a/magic/Magdir/rpm b/magic/Magdir/rpm +index 4eb5556..fe22b3d 100644 +--- a/magic/Magdir/rpm ++++ b/magic/Magdir/rpm +@@ -28,6 +28,7 @@ + >>8 beshort 17 SuperH + >>8 beshort 18 Xtensa + >>8 beshort 255 noarch ++>>10 string x %s + + #delta RPM Daniel Novotny (dnovotny@redhat.com) + 0 string drpm Delta RPM diff --git a/SOURCES/file-5.04-generic-msdos.patch b/SOURCES/file-5.04-generic-msdos.patch new file mode 100644 index 0000000..9fe086c --- /dev/null +++ b/SOURCES/file-5.04-generic-msdos.patch @@ -0,0 +1,98 @@ +diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos +index d1a19a6..9e89f11 100644 +--- a/magic/Magdir/msdos ++++ b/magic/Magdir/msdos +@@ -319,9 +319,9 @@ + # but it isn't feasible to match all COM files since there must be at least + # two dozen different one-byte "magics". + # test too generic ? +-0 byte 0xe9 DOS executable (COM) +->0x1FE leshort 0xAA55 \b, boot code +->6 string SFX\ of\ LHarc (%s) ++#0 byte 0xe9 DOS executable (COM) ++#>0x1FE leshort 0xAA55 \b, boot code ++#>6 string SFX\ of\ LHarc (%s) + + # DOS device driver updated by Joerg Jenderek at May 2011 + # http://maben.homeip.net/static/S100/IBM/software/DOS/DOS%20techref/CHAPTER.009 +@@ -396,28 +396,28 @@ + #>4 uleshort&0x4000 0x4000 \b,control strings-support) + + # test too generic ? +-0 byte 0x8c DOS executable (COM) ++#0 byte 0x8c DOS executable (COM) + # updated by Joerg Jenderek at Oct 2008 + 0 ulelong 0xffff10eb DR-DOS executable (COM) + # byte 0xeb conflicts with "sequent" magic leshort 0xn2eb +-0 ubeshort&0xeb8d >0xeb00 ++#0 ubeshort&0xeb8d >0xeb00 + # DR-DOS STACKER.COM SCREATE.SYS missed +->0 byte 0xeb +->>0x1FE leshort 0xAA55 DOS executable (COM), boot code +->>85 string UPX DOS executable (COM), UPX compressed +->>4 string \ $ARX DOS executable (COM), ARX self-extracting archive +->>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive +->>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive ++#>0 byte 0xeb ++#>>0x1FE leshort 0xAA55 DOS executable (COM), boot code ++#>>85 string UPX DOS executable (COM), UPX compressed ++#>>4 string \ $ARX DOS executable (COM), ARX self-extracting archive ++#>>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive ++#>>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive + # updated by Joerg Jenderek at Oct 2008 + #0 byte 0xb8 COM executable +-0 uleshort&0x80ff 0x00b8 ++#0 uleshort&0x80ff 0x00b8 + # modified by Joerg Jenderek +->1 lelong !0x21cd4cff COM executable for DOS ++#>1 lelong !0x21cd4cff COM executable for DOS + # http://syslinux.zytor.com/comboot.php + # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode + # start with assembler instructions mov eax,21cd4cffh +-0 uleshort&0xc0ff 0xc0b8 +->1 lelong 0x21cd4cff COM executable (32-bit COMBOOT) ++#0 uleshort&0xc0ff 0xc0b8 ++#>1 lelong 0x21cd4cff COM executable (32-bit COMBOOT) + # syslinux:doc/comboot.txt + # A COM32R program must start with the byte sequence B8 FE 4C CD 21 (mov + # eax,21cd4cfeh) as a magic number. +@@ -437,27 +437,27 @@ + # GRR search is not working + #2 search/28 \xcd\x21 COM executable for MS-DOS + #WHICHFAT.cOM +-2 string \xcd\x21 COM executable for DOS ++#2 string \xcd\x21 COM executable for DOS + #DELTREE.cOM DELTREE2.cOM +-4 string \xcd\x21 COM executable for DOS ++#4 string \xcd\x21 COM executable for DOS + #IFMEMDSK.cOM ASSIGN.cOM COMP.cOM +-5 string \xcd\x21 COM executable for DOS ++#5 string \xcd\x21 COM executable for DOS + #DELTMP.COm HASFAT32.cOM +-7 string \xcd\x21 +->0 byte !0xb8 COM executable for DOS ++#7 string \xcd\x21 ++#>0 byte !0xb8 COM executable for DOS + #COMP.cOM MORE.COm +-10 string \xcd\x21 +->5 string !\xcd\x21 COM executable for DOS ++#10 string \xcd\x21 ++#>5 string !\xcd\x21 COM executable for DOS + #comecho.com +-13 string \xcd\x21 COM executable for DOS ++#13 string \xcd\x21 COM executable for DOS + #HELP.COm EDIT.coM +-18 string \xcd\x21 COM executable for MS-DOS ++#18 string \xcd\x21 COM executable for MS-DOS + #NWRPLTRM.COm +-23 string \xcd\x21 COM executable for MS-DOS ++#23 string \xcd\x21 COM executable for MS-DOS + #LOADFIX.cOm LOADFIX.cOm +-30 string \xcd\x21 COM executable for MS-DOS ++#30 string \xcd\x21 COM executable for MS-DOS + #syslinux.com 3.11 +-70 string \xcd\x21 COM executable for DOS ++#70 string \xcd\x21 COM executable for DOS + # many compressed/converted COMs start with a copy loop instead of a jump + 0x6 search/0xa \xfc\x57\xf3\xa5\xc3 COM executable for MS-DOS + 0x6 search/0xa \xfc\x57\xf3\xa4\xc3 COM executable for DOS diff --git a/SOURCES/file-5.04-man-return-code.patch b/SOURCES/file-5.04-man-return-code.patch new file mode 100644 index 0000000..699840e --- /dev/null +++ b/SOURCES/file-5.04-man-return-code.patch @@ -0,0 +1,16 @@ +diff --git a/doc/file.man b/doc/file.man +index fff7730..3a524f5 100644 +--- a/doc/file.man ++++ b/doc/file.man +@@ -542,6 +542,11 @@ program, and are not covered by the above license. + .Sh RETURN CODE + .Nm + returns 0 on success, and non-zero on error. ++.Pp ++If the file named by the file ++operand does not exist, cannot be read, or the type of the file named by ++the file operand cannot be determined, this is not be considered an error ++that affects the exit status. + .Sh BUGS + .Pp + Please report bugs and send patches to the bug tracker at diff --git a/SOURCES/file-5.04-volume_key.patch b/SOURCES/file-5.04-volume_key.patch new file mode 100644 index 0000000..b3c0860 --- /dev/null +++ b/SOURCES/file-5.04-volume_key.patch @@ -0,0 +1,10 @@ +diff --git a/magic/Magdir/securitycerts b/magic/Magdir/securitycerts +index 8785dd8..1c340be 100644 +--- a/magic/Magdir/securitycerts ++++ b/magic/Magdir/securitycerts +@@ -4,3 +4,5 @@ + 0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text + 0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text + 0 belong 0xedfeedfe Sun 'jks' Java Keystore File data ++ ++0 string \0volume_key volume_key escrow packet diff --git a/SOURCES/file-5.10-sticky-bit.patch b/SOURCES/file-5.10-sticky-bit.patch new file mode 100644 index 0000000..de11829 --- /dev/null +++ b/SOURCES/file-5.10-sticky-bit.patch @@ -0,0 +1,12 @@ +diff --git a/src/ascmagic.c b/src/ascmagic.c +index 5a1caac..8d6ca95 100644 +--- a/src/ascmagic.c ++++ b/src/ascmagic.c +@@ -211,6 +211,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, + case 0: + if (file_printf(ms, ", ") == -1) + goto done; ++ break; + case -1: + goto done; + default: diff --git a/SOURCES/file-5.10-strength.patch b/SOURCES/file-5.10-strength.patch new file mode 100644 index 0000000..738b189 --- /dev/null +++ b/SOURCES/file-5.10-strength.patch @@ -0,0 +1,60 @@ +diff --git a/magic/Magdir/c-lang b/magic/Magdir/c-lang +index 0665627..fdefa8c 100644 +--- a/magic/Magdir/c-lang ++++ b/magic/Magdir/c-lang +@@ -6,26 +6,36 @@ + # BCPL + 0 search/8192 "libhdr" BCPL source text + !:mime text/x-bcpl ++!:strength / 2 + 0 search/8192 "LIBHDR" BCPL source text + !:mime text/x-bcpl ++!:strength / 2 + + # C + 0 regex \^#include C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^char C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^double C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^extern C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^float C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^struct C source text + !:mime text/x-c ++!:strength / 2 + 0 regex \^union C source text + !:mime text/x-c ++!:strength / 2 + 0 search/8192 main( C source text + !:mime text/x-c ++!:strength / 2 + + # C++ + # The strength of these rules is increased so they beat the C rules above +diff --git a/magic/Magdir/perl b/magic/Magdir/perl +index e11f2ab..b02b2c2 100644 +--- a/magic/Magdir/perl ++++ b/magic/Magdir/perl +@@ -28,10 +28,14 @@ + # check the first line + 0 search/1 package + >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text ++# to be tried before C source ++!:strength + 5 + # not 'p', check other lines + 0 search/1 !p + >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; + >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text ++# to be tried before C source ++!:strength + 40 + + + diff --git a/SOURCES/file-5.11-CVE-2013-7345.patch b/SOURCES/file-5.11-CVE-2013-7345.patch new file mode 100644 index 0000000..0bb1287 --- /dev/null +++ b/SOURCES/file-5.11-CVE-2013-7345.patch @@ -0,0 +1,27 @@ +From ef2329cf71acb59204dd981e2c6cce6c81fe467c Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Mon, 25 Mar 2013 14:06:55 +0000 +Subject: [PATCH] limit to 100 repetitions to avoid excessive backtracking + Carsten Wolff + +--- + magic/Magdir/commands | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/magic/Magdir/commands b/magic/Magdir/commands +index 67c3eee..4a7d8dd 100644 +--- a/magic/Magdir/commands ++++ b/magic/Magdir/commands +@@ -49,7 +49,8 @@ + !:mime text/x-awk + 0 string/wt #!\ /usr/bin/awk awk script text executable + !:mime text/x-awk +-0 regex =^\\s*BEGIN\\s*[{] awk script text ++0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text ++!:strength - 12 + + # AT&T Bell Labs' Plan 9 shell + 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable +-- +1.8.5.5 + diff --git a/SOURCES/file-5.11-CVE-2014-1943.patch b/SOURCES/file-5.11-CVE-2014-1943.patch new file mode 100644 index 0000000..bcfa7e5 --- /dev/null +++ b/SOURCES/file-5.11-CVE-2014-1943.patch @@ -0,0 +1,137 @@ +diff --git a/src/ascmagic.c b/src/ascmagic.c +index 8d6ca95..cfa3951 100644 +--- a/src/ascmagic.c ++++ b/src/ascmagic.c +@@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf, + == NULL) + goto done; + if ((rv = file_softmagic(ms, utf8_buf, +- (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0) ++ (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0) + rv = -1; + } + +diff --git a/src/file.h b/src/file.h +index 175f659..e02009f 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -414,7 +414,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t, + unichar **, size_t *, const char **, const char **, const char **); + protected int file_is_tar(struct magic_set *, const unsigned char *, size_t); + protected int file_softmagic(struct magic_set *, const unsigned char *, size_t, +- int, int); ++ size_t, int, int); + protected struct mlist *file_apprentice(struct magic_set *, const char *, int); + protected uint64_t file_signextend(struct magic_set *, struct magic *, + uint64_t); +diff --git a/src/funcs.c b/src/funcs.c +index 0b2a3d0..0d645eb 100644 +--- a/src/funcs.c ++++ b/src/funcs.c +@@ -228,7 +228,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unu + + /* try soft magic tests */ + if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0) +- if ((m = file_softmagic(ms, ubuf, nb, BINTEST, ++ if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST, + looks_text)) != 0) { + if ((ms->flags & MAGIC_DEBUG) != 0) + (void)fprintf(stderr, "softmagic %d\n", m); +diff --git a/src/softmagic.c b/src/softmagic.c +index 22e1190..56f09ee 100644 +--- a/src/softmagic.c ++++ b/src/softmagic.c +@@ -41,11 +41,12 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.147 2011/11/05 15:44:22 rrt Exp $") + #include + #include + ++#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) >= ((n) - (o))) + + private int match(struct magic_set *, struct magic *, uint32_t, +- const unsigned char *, size_t, int, int); ++ const unsigned char *, size_t, int, int, int); + private int mget(struct magic_set *, const unsigned char *, +- struct magic *, size_t, unsigned int, int); ++ struct magic *, size_t, unsigned int, int, int); + private int magiccheck(struct magic_set *, struct magic *); + private int32_t mprint(struct magic_set *, struct magic *); + private int32_t moffset(struct magic_set *, struct magic *); +@@ -67,13 +68,13 @@ private void cvt_64(union VALUETYPE *, const struct magic *); + /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */ + protected int + file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, +- int mode, int text) ++ size_t level, int mode, int text) + { + struct mlist *ml; + int rv; + for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) + if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, mode, +- text)) != 0) ++ text, level)) != 0) + return rv; + + return 0; +@@ -108,7 +109,8 @@ file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, + */ + private int + match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, +- const unsigned char *s, size_t nbytes, int mode, int text) ++ const unsigned char *s, size_t nbytes, int mode, int text, ++ int recursion_level) + { + uint32_t magindex = 0; + unsigned int cont_level = 0; +@@ -140,7 +142,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, + ms->line = m->lineno; + + /* if main entry matches, print it... */ +- switch (mget(ms, s, m, nbytes, cont_level, text)) { ++ switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level + 1)) { + case -1: + return -1; + case 0: +@@ -223,7 +225,7 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic, + continue; + } + #endif +- switch (mget(ms, s, m, nbytes, cont_level, text)) { ++ switch (mget(ms, s, m, nbytes, cont_level, text, recursion_level)) { + case -1: + return -1; + case 0: +@@ -1018,12 +1020,18 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, + + private int + mget(struct magic_set *ms, const unsigned char *s, +- struct magic *m, size_t nbytes, unsigned int cont_level, int text) ++ struct magic *m, size_t nbytes, unsigned int cont_level, int text, ++ int recursion_level) + { + uint32_t offset = ms->offset; + uint32_t count = m->str_range; + union VALUETYPE *p = &ms->ms_value; + ++ if (recursion_level >= 20) { ++ file_error(ms, 0, "recursion nesting exceeded"); ++ return -1; ++ } ++ + if (mcopy(ms, p, m->type, m->flag & INDIR, s, offset, nbytes, count) == -1) + return -1; + +@@ -1580,10 +1588,12 @@ mget(struct magic_set *ms, const unsigned char *s, + if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && + file_printf(ms, "%s", m->desc) == -1) + return -1; +- if (nbytes < offset) ++ if (offset == 0) + return 0; ++ if (OFFSET_OOB(nbytes, offset, 0)) ++ return 0; + return file_softmagic(ms, s + offset, nbytes - offset, +- BINTEST, text); ++ recursion_level, BINTEST, text); + + case FILE_DEFAULT: /* nothing to check */ + default: diff --git a/SOURCES/file-5.11-CVE-2014-2270.patch b/SOURCES/file-5.11-CVE-2014-2270.patch new file mode 100644 index 0000000..7f4af99 --- /dev/null +++ b/SOURCES/file-5.11-CVE-2014-2270.patch @@ -0,0 +1,133 @@ +diff --git a/src/softmagic.c b/src/softmagic.c +index 56f09ee..8d08cad 100644 +--- a/src/softmagic.c ++++ b/src/softmagic.c +@@ -61,6 +61,7 @@ private void cvt_16(union VALUETYPE *, const struct magic *); + private void cvt_32(union VALUETYPE *, const struct magic *); + private void cvt_64(union VALUETYPE *, const struct magic *); + ++#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) + /* + * softmagic - lookup one file in parsed, in-memory copy of database + * Passed the name and FILE * of one file to be typed. +@@ -1081,7 +1082,7 @@ mget(struct magic_set *ms, const unsigned char *s, + } + switch (m->in_type) { + case FILE_BYTE: +- if (nbytes < (offset + 1)) ++ if (OFFSET_OOB(nbytes, offset, 1)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1116,7 +1117,8 @@ mget(struct magic_set *ms, const unsigned char *s, + offset = ~offset; + break; + case FILE_BESHORT: +- if (nbytes < (offset + 2)) ++ ++ if (OFFSET_OOB(nbytes, offset, 2)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1168,7 +1170,7 @@ mget(struct magic_set *ms, const unsigned char *s, + offset = ~offset; + break; + case FILE_LESHORT: +- if (nbytes < (offset + 2)) ++ if (OFFSET_OOB(nbytes, offset, 2)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1220,7 +1222,7 @@ mget(struct magic_set *ms, const unsigned char *s, + offset = ~offset; + break; + case FILE_SHORT: +- if (nbytes < (offset + 2)) ++ if (OFFSET_OOB(nbytes, offset, 2)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1257,7 +1259,7 @@ mget(struct magic_set *ms, const unsigned char *s, + break; + case FILE_BELONG: + case FILE_BEID3: +- if (nbytes < (offset + 4)) ++ if (OFFSET_OOB(nbytes, offset, 4)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1328,7 +1330,7 @@ mget(struct magic_set *ms, const unsigned char *s, + break; + case FILE_LELONG: + case FILE_LEID3: +- if (nbytes < (offset + 4)) ++ if (OFFSET_OOB(nbytes, offset, 4)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1398,7 +1400,7 @@ mget(struct magic_set *ms, const unsigned char *s, + offset = ~offset; + break; + case FILE_MELONG: +- if (nbytes < (offset + 4)) ++ if (OFFSET_OOB(nbytes, offset, 4)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1468,7 +1470,7 @@ mget(struct magic_set *ms, const unsigned char *s, + offset = ~offset; + break; + case FILE_LONG: +- if (nbytes < (offset + 4)) ++ if (OFFSET_OOB(nbytes, offset, 4)) + return 0; + if (off) { + switch (m->in_op & FILE_OPS_MASK) { +@@ -1535,14 +1537,14 @@ mget(struct magic_set *ms, const unsigned char *s, + /* Verify we have enough data to match magic type */ + switch (m->type) { + case FILE_BYTE: +- if (nbytes < (offset + 1)) /* should alway be true */ ++ if (OFFSET_OOB(nbytes, offset, 1)) + return 0; + break; + + case FILE_SHORT: + case FILE_BESHORT: + case FILE_LESHORT: +- if (nbytes < (offset + 2)) ++ if (OFFSET_OOB(nbytes, offset, 2)) + return 0; + break; + +@@ -1561,26 +1563,26 @@ mget(struct magic_set *ms, const unsigned char *s, + case FILE_FLOAT: + case FILE_BEFLOAT: + case FILE_LEFLOAT: +- if (nbytes < (offset + 4)) ++ if (OFFSET_OOB(nbytes, offset, 4)) + return 0; + break; + + case FILE_DOUBLE: + case FILE_BEDOUBLE: + case FILE_LEDOUBLE: +- if (nbytes < (offset + 8)) ++ if (OFFSET_OOB(nbytes, offset, 8)) + return 0; + break; + + case FILE_STRING: + case FILE_PSTRING: + case FILE_SEARCH: +- if (nbytes < (offset + m->vallen)) ++ if (OFFSET_OOB(nbytes, offset, m->vallen)) + return 0; + break; + + case FILE_REGEX: +- if (nbytes < offset) ++ if (OFFSET_OOB(nbytes, offset, 0)) + return 0; + break; + diff --git a/SOURCES/file-5.11-add-aarch64.patch b/SOURCES/file-5.11-add-aarch64.patch new file mode 100644 index 0000000..89cc430 --- /dev/null +++ b/SOURCES/file-5.11-add-aarch64.patch @@ -0,0 +1,32 @@ +From a5c989d3d36e51293a0474c4653f595dcfb94751 Mon Sep 17 00:00:00 2001 +From: Jeffrey Bastian +Date: Thu, 20 Feb 2014 15:45:42 -0500 +Subject: [PATCH] add aarch64 + +backport of upstream https://github.com/glensc/file/commit/2dccf6a6615f +--- + magic/Magdir/elf | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/magic/Magdir/elf b/magic/Magdir/elf +index 8e3b7bc..e0e9937 100644 +--- a/magic/Magdir/elf ++++ b/magic/Magdir/elf +@@ -148,12 +148,11 @@ + >>18 leshort 97 NatSemi 32k, + >>18 leshort 106 Analog Devices Blackfin, + >>18 leshort 113 Altera Nios II, +->>18 leshort 0xae META, ++>>18 leshort 174 META, ++>>18 leshort 183 ARM aarch64, + >>18 leshort 187 Tilera TILE64, + >>18 leshort 188 Tilera TILEPro, + >>18 leshort 191 Tilera TILE-Gx, +->>18 leshort 0x3426 OpenRISC (obsolete), +->>18 leshort 0x8472 OpenRISC (obsolete), + >>18 leshort 0x9026 Alpha (unofficial), + >>20 lelong 0 invalid version + >>20 lelong 1 version 1 +-- +1.8.3.1 + diff --git a/SOURCES/file-5.11-compress.patch b/SOURCES/file-5.11-compress.patch new file mode 100644 index 0000000..04241d5 --- /dev/null +++ b/SOURCES/file-5.11-compress.patch @@ -0,0 +1,13 @@ +diff --git a/src/compress.c b/src/compress.c +index 2b05352..ccb1cfd 100644 +--- a/src/compress.c ++++ b/src/compress.c +@@ -183,7 +183,7 @@ sread(int fd, void *buf, size_t n, int canbepipe __attribute__ ((unused))) + goto nocheck; + + #ifdef FIONREAD +- if ((canbepipe && (ioctl(fd, FIONREAD, &t) == -1)) || (t == 0)) { ++ if (canbepipe && ((ioctl(fd, FIONREAD, &t) == -1) || (t == 0))) { + #ifdef FD_ZERO + for (cnt = 0;; cnt++) { + fd_set check; diff --git a/SOURCES/file-5.11-dump-twice.patch b/SOURCES/file-5.11-dump-twice.patch new file mode 100644 index 0000000..1273b50 --- /dev/null +++ b/SOURCES/file-5.11-dump-twice.patch @@ -0,0 +1,13 @@ +diff --git a/magic/Magdir/convex b/magic/Magdir/convex +index 6141a82..4e096b9 100644 +--- a/magic/Magdir/convex ++++ b/magic/Magdir/convex +@@ -30,8 +30,6 @@ + # The restore program uses these number to determine how the data is + # to be extracted. + # +-24 belong =60011 dump format, 4.1 BSD or earlier +-24 belong =60012 dump format, 4.2 or 4.3 BSD without IDC + 24 belong =60013 dump format, 4.2 or 4.3 BSD (IDC compatible) + 24 belong =60014 dump format, Convex Storage Manager by-reference dump + # diff --git a/SOURCES/file-5.11-exit-code.patch b/SOURCES/file-5.11-exit-code.patch new file mode 100644 index 0000000..130c503 --- /dev/null +++ b/SOURCES/file-5.11-exit-code.patch @@ -0,0 +1,56 @@ +diff --git a/src/fsmagic.c b/src/fsmagic.c +index 7200271..1ffe667 100644 +--- a/src/fsmagic.c ++++ b/src/fsmagic.c +@@ -124,14 +124,12 @@ file_fsmagic(struct magic_set *ms, const char *fn, struct stat *sb) + + if (ret) { + if (ms->flags & MAGIC_ERROR) { +- file_error(ms, errno, "cannot stat `%s'", fn); ++ file_error(ms, errno, "cannot stat"); + return -1; + } +- if (file_printf(ms, "cannot open `%s' (%s)", +- fn, strerror(errno)) == -1) ++ if (file_printf(ms, "cannot open (%s)", strerror(errno)) == -1) + return -1; +- ms->event_flags |= EVENT_HAD_ERR; +- return -1; ++ return 0; + } + + if (!mime) { +diff --git a/src/magic.c b/src/magic.c +index 2b61080..a184a35 100644 +--- a/src/magic.c ++++ b/src/magic.c +@@ -417,8 +417,9 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) + ispipe = 1; + } else { + int flags = O_RDONLY|O_BINARY; ++ int okstat = stat(inname, &sb) == 0; + +- if (stat(inname, &sb) == 0 && S_ISFIFO(sb.st_mode)) { ++ if (okstat && S_ISFIFO(sb.st_mode)) { + #ifdef O_NONBLOCK + flags |= O_NONBLOCK; + #endif +@@ -427,7 +428,8 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) + + errno = 0; + if ((fd = open(inname, flags)) < 0) { +- if (unreadable_info(ms, sb.st_mode, inname) == -1) ++ if (okstat && ++ unreadable_info(ms, sb.st_mode, inname) == -1) + goto done; + rv = 0; + goto done; +@@ -462,7 +464,7 @@ file_or_fd(struct magic_set *ms, const char *inname, int fd) + + } else { + if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) { +- file_error(ms, errno, "cannot read `%s'", inname); ++ file_error(ms, errno, "cannot read"); + goto done; + } + } diff --git a/SOURCES/file-5.11-ia64-swap.patch b/SOURCES/file-5.11-ia64-swap.patch new file mode 100644 index 0000000..bf2fbb9 --- /dev/null +++ b/SOURCES/file-5.11-ia64-swap.patch @@ -0,0 +1,12 @@ +diff --git a/magic/Magdir/linux b/magic/Magdir/linux +index 8d4c60a..aa8d1aa 100644 +--- a/magic/Magdir/linux ++++ b/magic/Magdir/linux +@@ -88,6 +88,7 @@ + # From Daniel Novotny + # swap file for PowerPC + 65526 string SWAPSPACE2 Linux/ppc swap file ++16374 string SWAPSPACE2 Linux/ia64 swap file + # + # Linux kernel boot images, from Albert Cahalan + # and others such as Axel Kohlmeyer diff --git a/SOURCES/file-5.11-magicmgc-home.patch b/SOURCES/file-5.11-magicmgc-home.patch new file mode 100644 index 0000000..9750c27 --- /dev/null +++ b/SOURCES/file-5.11-magicmgc-home.patch @@ -0,0 +1,32 @@ +diff --git a/src/magic.c b/src/magic.c +index 5403951..2b61080 100644 +--- a/src/magic.c ++++ b/src/magic.c +@@ -101,16 +101,21 @@ get_default_magic(void) + if ((home = getenv("HOME")) == NULL) + return MAGIC; + +- if (asprintf(&hmagicpath, "%s/.magic", home) < 0) ++ if (asprintf(&hmagicpath, "%s/.magic.mgc", home) < 0) + return MAGIC; +- if (stat(hmagicpath, &st) == -1) +- goto out; +- if (S_ISDIR(st.st_mode)) { ++ if (stat(hmagicpath, &st) == -1) { + free(hmagicpath); +- if (asprintf(&hmagicpath, "%s/%s", home, hmagic) < 0) ++ if (asprintf(&hmagicpath, "%s/.magic", home) < 0) + return MAGIC; +- if (access(hmagicpath, R_OK) == -1) ++ if (stat(hmagicpath, &st) == -1) + goto out; ++ if (S_ISDIR(st.st_mode)) { ++ free(hmagicpath); ++ if (asprintf(&hmagicpath, "%s/%s", home, hmagic) < 0) ++ return MAGIC; ++ if (access(hmagicpath, R_OK) == -1) ++ goto out; ++ } + } + + if (asprintf(&default_magic, "%s:%s", hmagicpath, MAGIC) < 0) diff --git a/SOURCES/file-5.11-maxmime.patch b/SOURCES/file-5.11-maxmime.patch new file mode 100644 index 0000000..7cc5ee2 --- /dev/null +++ b/SOURCES/file-5.11-maxmime.patch @@ -0,0 +1,39 @@ +commit 774f9f6653a90d83a8b5802e7dd210a45603e039 +Author: Christos Zoulas +Date: Fri Jan 25 23:07:19 2013 +0000 + + bump mime desc + +diff --git a/src/file.h b/src/file.h +index 8e139fc..4c03766 100644 +@@ -128,12 +128,13 @@ + #endif + #define MAXMAGIS 8192 /* max entries in any one magic file + or directory */ +-#define MAXDESC 64 /* max leng of text description/MIME type */ +-#define MAXstring 64 /* max leng of "string" types */ ++#define MAXDESC 64 /* max len of text description/MIME type */ ++#define MAXMIME 80 /* max len of text MIME type */ ++#define MAXstring 64 /* max len of "string" types */ + + #define MAGICNO 0xF11E041C +-#define VERSIONNO 9 +-#define FILE_MAGICSIZE 232 ++#define VERSIONNO 10 ++#define FILE_MAGICSIZE 248 + + #define FILE_LOAD 0 + #define FILE_CHECK 1 +@@ -300,9 +301,9 @@ struct magic { + union VALUETYPE value; /* either number or string */ + /* Words 17-32 */ + char desc[MAXDESC]; /* description */ +- /* Words 33-48 */ +- char mimetype[MAXDESC]; /* MIME type */ +- /* Words 49-50 */ ++ /* Words 33-52 */ ++ char mimetype[MAXMIME]; /* MIME type */ ++ /* Words 53-54 */ + char apple[8]; + }; + diff --git a/SOURCES/file-5.11-perl-shebang.patch b/SOURCES/file-5.11-perl-shebang.patch new file mode 100644 index 0000000..aec548f --- /dev/null +++ b/SOURCES/file-5.11-perl-shebang.patch @@ -0,0 +1,37 @@ +diff --git a/magic/Magdir/perl b/magic/Magdir/perl +index ef0cc6d..453665c 100644 +--- a/magic/Magdir/perl ++++ b/magic/Magdir/perl +@@ -5,24 +5,22 @@ + # The `eval' lines recognizes an outrageously clever hack. + # Keith Waclena + # Send additions to +-0 search/1/w #!\ /bin/perl Perl script text executable +-!:mime text/x-perl + 0 search/1 eval\ "exec\ /bin/perl Perl script text + !:mime text/x-perl +-0 search/1/w #!\ /usr/bin/perl Perl script text executable +-!:mime text/x-perl + 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text + !:mime text/x-perl +-0 search/1/w #!\ /usr/local/bin/perl Perl script text executable +-!:mime text/x-perl + 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text + !:mime text/x-perl + 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text + !:mime text/x-perl +-0 search/1 #!/usr/bin/env\ perl Perl script text executable +-!:mime text/x-perl +-0 search/1 #!\ /usr/bin/env\ perl Perl script text executable +-!:mime text/x-perl ++ ++0 search/1 #! ++>0 regex \^#!.*/bin/perl.*$ Perl script text executable ++!:mime text/x-perl ++>0 regex \^#!.*/bin/env\ perl.*$ Perl script text executable ++!:mime text/x-perl ++# to be tried before awk script ++!:strength + 40 + + # by Dmitry V. Levin and Alexey Tourbin + # check the first line diff --git a/SOURCES/file-5.11-qcow3.patch b/SOURCES/file-5.11-qcow3.patch new file mode 100644 index 0000000..b7a4806 --- /dev/null +++ b/SOURCES/file-5.11-qcow3.patch @@ -0,0 +1,26 @@ +diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos +index 8f3e532..21f055d 100644 +--- a/magic/Magdir/msdos ++++ b/magic/Magdir/msdos +@@ -820,6 +820,21 @@ + >>24 bequad x \b, %lld bytes + >>32 belong 1 \b, AES-encrypted + ++>4 belong 3 (v3) ++# Using the existence of the Backing File Offset to determine whether ++# to read Backing File Information ++>>8 bequad >0 \b, has backing file ++# Note that this isn't a null-terminated string; the length is actually ++# (16.L). Assuming a null-terminated string happens to work usually, but it ++# may spew junk until it reaches a \0 in some cases. Also, since there's no ++# .Q modifier, we just use the bottom four bytes as an offset. Note that if ++# the file is over 4G, and the backing file path is stored after the first 4G, ++# the wrong filename will be printed. (This should be (8.Q), when that syntax ++# is introduced.) ++>>>(12.L) string >\0 (path %s) ++>>24 bequad x \b, %lld bytes ++>>32 belong 1 \b, AES-encrypted ++ + >4 default x (unknown version) + + 0 string/b QEVM QEMU suspend to disk image diff --git a/SOURCES/file-5.11-rrdtool.patch b/SOURCES/file-5.11-rrdtool.patch new file mode 100644 index 0000000..557988c --- /dev/null +++ b/SOURCES/file-5.11-rrdtool.patch @@ -0,0 +1,15 @@ +diff --git a/magic/Magdir/database b/magic/Magdir/database +index 5c38f5c..a17cc42 100644 +--- a/magic/Magdir/database ++++ b/magic/Magdir/database +@@ -84,8 +84,8 @@ + # + # + # Round Robin Database Tool by Tobias Oetiker +-0 string RRD RRDTool DB +->4 string x version %s ++0 string/b RRD\0 RRDTool DB ++>4 string/b x version %s + #---------------------------------------------------------------------- + # ROOT: file(1) magic for ROOT databases + # diff --git a/SOURCES/file-5.14-netpbm.patch b/SOURCES/file-5.14-netpbm.patch new file mode 100644 index 0000000..90d8b1d --- /dev/null +++ b/SOURCES/file-5.14-netpbm.patch @@ -0,0 +1,52 @@ +diff --git a/magic/Magdir/images b/magic/Magdir/images +index e94905c..a25d292 100644 +--- a/magic/Magdir/images ++++ b/magic/Magdir/images +@@ -32,17 +32,42 @@ + + # PBMPLUS images + # The next byte following the magic is always whitespace. +-0 search/1 P1 Netpbm PBM image text ++# strength is changed to try these patterns before "x86 boot sector" ++0 search/1 P1 ++>3 regex =[0-9]*\ [0-9]* Netpbm PBM image text ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-bitmap +-0 search/1b P2 Netpbm PGM image text ++0 search/1 P2 ++>3 regex =[0-9]*\ [0-9]* Netpbm PGM image text ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-greymap + 0 search/1 P3 Netpbm PPM image text ++>3 regex =[0-9]*\ [0-9]* Netpbm PPM image text ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-pixmap +-0 string P4 Netpbm PBM "rawbits" image data ++0 string P4 ++>3 regex =[0-9]*\ [0-9]* Netpbm PBM "rawbits" image data ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-bitmap +-0 string P5 Netpbm PGM "rawbits" image data ++0 string P5 ++>3 regex =[0-9]*\ [0-9]* Netpbm PGM "rawbits" image data ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-greymap +-0 string P6 Netpbm PPM "rawbits" image data ++0 string P6 ++>3 regex =[0-9]*\ [0-9]* Netpbm PPM "rawbits" image data ++>3 regex =[0-9]+\ \b, size = %sx ++>>3 regex =\ [0-9]+ \b%s ++!:strength + 45 + !:mime image/x-portable-pixmap + 0 string P7 Netpbm PAM image file + !:mime image/x-portable-pixmap diff --git a/SOURCES/file-localmagic.patch b/SOURCES/file-localmagic.patch new file mode 100644 index 0000000..69f26ca --- /dev/null +++ b/SOURCES/file-localmagic.patch @@ -0,0 +1,60 @@ +From f25107f625e88726e8ae9d4963573b5a0dda8f4c Mon Sep 17 00:00:00 2001 +From: Jan Kaluza +Date: Thu, 15 Dec 2011 16:15:41 +0100 +Subject: [PATCH] localmagic + +--- + src/Makefile.am | 2 +- + src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index cba64ac..5e48dff 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,4 @@ +-MAGIC = $(pkgdatadir)/magic ++MAGIC = /etc/magic:$(pkgdatadir)/magic + lib_LTLIBRARIES = libmagic.la + include_HEADERS = magic.h + +diff --git a/magic/magic.local b/magic/magic.local +new file mode 100644 +index 0000000..283a863 +--- /dev/null ++++ b/magic/magic.local +@@ -0,0 +1,3 @@ ++# Magic local data for file(1) command. ++# Insert here your local magic data. Format is described in magic(5). ++ + +diff --git a/src/Makefile.in b/src/Makefile.in +index 39b1703..3dd92d8 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -240,7 +240,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-MAGIC = $(pkgdatadir)/magic ++MAGIC = /etc/magic:$(pkgdatadir)/magic + lib_LTLIBRARIES = libmagic.la + include_HEADERS = magic.h + AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' +diff --git a/src/apprentice.c b/src/apprentice.c +index b330669..0490642 100644 +--- a/src/apprentice.c ++++ b/src/apprentice.c +@@ -281,7 +281,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action, + + #ifndef COMPILE_ONLY + if ((rv = apprentice_map(ms, &magic, &nmagic, fn)) == -1) { +- if (ms->flags & MAGIC_CHECK) ++ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0) + file_magwarn(ms, "using regular magic file `%s'", fn); + rv = apprentice_load(ms, &magic, &nmagic, fn, action); + if (rv != 0) + +-- +1.7.7.4 + diff --git a/SOURCES/file-python-func.patch b/SOURCES/file-python-func.patch new file mode 100644 index 0000000..59ced47 --- /dev/null +++ b/SOURCES/file-python-func.patch @@ -0,0 +1,13 @@ +diff --git a/magic/Magdir/python b/magic/Magdir/python +index e592803..c786469 100644 +--- a/magic/Magdir/python ++++ b/magic/Magdir/python +@@ -59,3 +59,8 @@ + !:mime text/x-python + >&0 search/4096 finally: Python script text executable + !:mime text/x-python ++ ++# def name(args, args): ++0 regex \^(\ |\\t)*def\ +[a-zA-Z]+ ++>&0 regex \ *\\(([a-zA-Z]|,|\ )*\\):$ Python script text executable ++!:mime text/x-python diff --git a/SOURCES/file-qed-vdi-image.patch b/SOURCES/file-qed-vdi-image.patch new file mode 100644 index 0000000..eba59d7 --- /dev/null +++ b/SOURCES/file-qed-vdi-image.patch @@ -0,0 +1,22 @@ +diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos +index 560d360..83724c5 100644 +--- a/magic/Magdir/msdos ++++ b/magic/Magdir/msdos +@@ -815,6 +815,17 @@ + + 0 string/b QEVM QEMU suspend to disk image + ++# QEMU QED Image ++# http://wiki.qemu.org/Features/QED/Specification ++0 string/b QED\0 QEMU QED Image ++ ++# VDI Image ++64 string/b \x7f\x10\xda\xbe VDI Image ++>68 string/b \x01\x00\x01\x00 version 1.1 ++>0 string >\0 (%s) ++>368 lequad x \b, %lld bytes ++ ++ + 0 string/b Bochs\ Virtual\ HD\ Image Bochs disk image, + >32 string x type %s, + >48 string x subtype %s diff --git a/SOURCES/file-tnef.patch b/SOURCES/file-tnef.patch new file mode 100644 index 0000000..1b8d377 --- /dev/null +++ b/SOURCES/file-tnef.patch @@ -0,0 +1,12 @@ +diff --git a/magic/Magdir/mail.news b/magic/Magdir/mail.news +index 96fa069..fb5e293 100644 +--- a/magic/Magdir/mail.news ++++ b/magic/Magdir/mail.news +@@ -34,6 +34,7 @@ + + # TNEF files... + 0 lelong 0x223E9F78 Transport Neutral Encapsulation Format ++!:mime application/vnd.ms-tnef + + # From: Kevin Sullivan + 0 string *mbx* MBX mail folder diff --git a/SPECS/file.spec b/SPECS/file.spec new file mode 100644 index 0000000..1795bec --- /dev/null +++ b/SPECS/file.spec @@ -0,0 +1,889 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%global __libtoolize : + +Summary: A utility for determining file types +Name: file +Version: 5.11 +Release: 22%{?dist} +License: BSD +Group: Applications/File +Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz +# Upstream says it's up to distributions to add a way to support local-magic. +Patch0: file-localmagic.patch +# sent upstream - should be included in next upstream release +Patch1: file-tnef.patch +Patch2: file-5.10-strength.patch +Patch3: file-5.10-sticky-bit.patch +Patch4: file-python-func.patch +Patch5: file-qed-vdi-image.patch +Patch6: file-5.11-ia64-swap.patch +Patch7: file-4.17-rpm-name.patch +Patch8: file-5.11-magicmgc-home.patch +Patch9: file-5.11-compress.patch +Patch10: file-5.11-dump-twice.patch +Patch11: file-5.04-volume_key.patch +Patch12: file-5.04-man-return-code.patch +Patch13: file-5.04-generic-msdos.patch +Patch14: file-5.14-netpbm.patch +Patch15: file-5.11-rrdtool.patch +Patch16: file-5.11-exit-code.patch +Patch17: file-5.11-perl-shebang.patch +Patch18: file-5.11-qcow3.patch +Patch19: file-5.11-maxmime.patch +Patch20: file-5.11-CVE-2014-1943.patch +Patch21: file-5.11-CVE-2014-2270.patch +Patch22: file-5.11-CVE-2013-7345.patch +Patch30: file-5.11-add-aarch64.patch +URL: http://www.darwinsys.com/file/ +Requires: file-libs = %{version}-%{release} +BuildRequires: zlib-devel + +%description +The file command is used to identify a particular file according to the +type of data contained by the file. File can identify many different +file types, including ELF binaries, system libraries, RPM packages, and +different graphics formats. + +%package libs +Summary: Libraries for applications using libmagic +Group: Applications/File +License: BSD + +%description libs + +Libraries for applications using libmagic. + +%package devel +Summary: Libraries and header files for file development +Group: Applications/File +Requires: %{name} = %{version}-%{release} + +%description devel +The file-devel package contains the header files and libmagic library +necessary for developing programs using libmagic. + +%package static +Summary: Static library for file development +Group: Applications/File +Requires: %{name} = %{version}-%{release} + +%description static +The file-static package contains the static version of +the libmagic library. + +%package -n python-magic +Summary: Python bindings for the libmagic API +Group: Development/Libraries +BuildArch: noarch +BuildRequires: python2-devel +Requires: %{name} = %{version}-%{release} + +%description -n python-magic +This package contains the Python bindings to allow access to the +libmagic API. The libmagic library is also used by the familiar +file(1) command. + +%prep + +# Don't use -b -- it will lead to poblems when compiling magic file! +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch30 -p1 + +iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ +touch -r doc/libmagic.man doc/libmagic.man_ +mv doc/libmagic.man_ doc/libmagic.man + +%build +CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \ +%configure --enable-fsect-man5 --disable-rpath +# remove hardcoded library paths from local libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/src/.libs +make +cd python +CFLAGS="%{optflags}" %{__python} setup.py build + +%install +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} +mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 +mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man5 +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/misc +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/file + +make DESTDIR=${RPM_BUILD_ROOT} install +rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la + +# local magic in /etc/magic +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir} +cp -a ./magic/magic.local ${RPM_BUILD_ROOT}%{_sysconfdir}/magic + +cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic +ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic +#ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime +ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic + +cd python +%{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} +%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name} + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%doc COPYING ChangeLog README +%{_bindir}/* +%{_mandir}/man1/* +%config(noreplace) %{_sysconfdir}/magic + +%files libs +%doc COPYING ChangeLog README +%{_libdir}/*so.* +%{_datadir}/magic* +%{_mandir}/man5/* +%{_datadir}/file +%{_datadir}/misc/* + +%files devel +%{_libdir}/*.so +%{_includedir}/magic.h +%{_mandir}/man3/* + +%files static +%{_libdir}/*.a + +%files -n python-magic +%doc python/README COPYING python/example.py +%{python_sitelib}/magic.py +%{python_sitelib}/magic.pyc +%{python_sitelib}/magic.pyo +%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 +%{python_sitelib}/*egg-info +%endif + +%changelog +* Tue Jul 15 2014 Jan Kaluza - 5.11-22 +- fix #1067688 - add support for aarch64 ELF binaries + +* Tue Mar 25 2014 Jan Kaluza - 5.11-21 +- fix #1079848 - fix potential regression in Perl detection caused + by previous fix + +* Mon Mar 24 2014 Jan Kaluza - 5.11-20 +- fix #1079848 - fix for CVE-2013-7345 + +* Fri Mar 07 2014 Jan Kaluza - 5.11-19 +- fix #1073554 - fix for CVE-2014-2270 + +* Wed Feb 19 2014 Jan Kaluza - 5.11-18 +- fix #1066563 - fix for CVE-2014-1943 + +* Wed Feb 12 2014 Jan Kaluza - 5.11-17 +- Increase MAXMIME size to 80 bytes (#1064167) + +* Fri Jan 24 2014 Daniel Mach - 5.11-16 +- Mass rebuild 2014-01-24 + +* Fri Jan 10 2014 Jan Kaluza - 5.11-15 +- fix #1048910 - detect perl scripts even with arguments in shebang + +* Tue Jan 07 2014 Jan Kaluza - 5.11-14 +- fix #1048910 - increase perl scripts magic strength +- fix #1048082 - add support for QCOW3 images detection + +* Thu Jan 02 2014 Jan Kaluza - 5.11-13 +- fix #1038025 - improve perl scripts detection according to perl shebang + +* Fri Dec 27 2013 Daniel Mach - 5.11-12 +- Mass rebuild 2013-12-27 + +* Fri Nov 08 2013 Jan Kaluza - 5.11-11 +- fix #1022967 - improve RRD Tool database detection +- fix #1026852 - exit with 0 exit code when input file does not exist + +* Mon Jun 17 2013 Jan Kaluza - 5.11-10 +- build python-magic as noarch +- fix netpbm detection + +* Mon Mar 11 2013 Jan Kaluza - 5.11-9 +- fix #919466 - fix memory leak in get_default_magic + +* Wed Feb 13 2013 Fedora Release Engineering - 5.11-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Dec 04 2012 Jan Kaluza - 5.11-7 +- removed duplicated patterns for backups generated by "dump" tool +- recognize volume_key escrow packets +- mention exit code in manpage +- remove weak msdos patterns + +* Wed Nov 21 2012 Jan Kaluza - 5.11-6 +- clean up the spec file + +* Tue Aug 14 2012 Jan Kaluza - 5.11-5 +- fix #847936 - decompress bzip2 properly when using -z param +- fix #847937 - read magic patterns also from ~/.magic.mgc + +* Fri Jul 27 2012 Fedora Release Engineering - 5.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jul 19 2012 Jan Kaluza - 5.11-3 +- removed buildroot, defattr + +* Tue Jun 21 2012 Jan Kaluza - 5.11-2 +- detect names of RPM packages +- detect swap on ia64 architecture + +* Mon Feb 27 2012 Jan Kaluza - 5.11-1 +- fix #796130 - update to file-5.11 +- fix #796209 - recognize VDI images +- fix #795709 - recognize QED images + +* Wed Jan 18 2012 Jan Kaluza - 5.10-5 +- fix detection of ASCII text files with setuid, setgid, or sticky bits + +* Tue Jan 10 2012 Jan Kaluza - 5.10-4 +- fix #772651 - decrease strength of newly added "C source" patterns + +* Tue Jan 03 2012 Jan Kaluza - 5.10-3 +- fix #771292 - do not show 'using regular magic file' warning for /etc/magic, + because this file is not supposed to be compiled + +* Mon Jan 02 2012 Jan Kaluza - 5.10-2 +- fix #770006 - detect tnef files + +* Mon Jan 02 2012 Jan Kaluza - 5.10-1 +- fix #771030 - update to file-5.10 + +* Mon Jan 02 2012 Jan Kaluza - 5.09-3 +- fix #720321 - added /etc/magic config file to let users define their local + magic patterns + +* Wed Oct 26 2011 Fedora Release Engineering - 5.09-2 +- Rebuilt for glibc bug#747377 + +* Thu Sep 29 2011 Jan Kaluza - 5.09-1 +- fix #739286 - update to file-5.09 + +* Thu Aug 04 2011 Jan Kaluza - 5.08-1 +- fix #728181 - update to file-5.08 +- remove unused patches + +* Tue Jun 14 2011 Jan Kaluza - 5.07-5 +- fix #712991 - include RPM noarch in /usr/share/magic + +* Thu Jun 09 2011 Jan Kaluza - 5.07-4 +- fix #711843 - fix postscript detection + +* Thu Jun 09 2011 Jan Kaluza - 5.07-3 +- fix #709953 - add support for BIOS version detection + +* Mon May 23 2011 Jan Kaluza - 5.07-2 +- backported patches to fix 5.07 regressions +- fix #706231 - fixed ZIP detection +- fix #705183, #705499 - removed weak DOS device driver pattern + +* Wed May 11 2011 Jan Kaluza - 5.07-1 +- update to new upstream version 5.07 +- remove unused patches + +* Tue Mar 01 2011 Jan Kaluza - 5.05-4 +- fix #678458 - support for Python 3.2 compiled files + +* Thu Feb 10 2011 Jan Kaluza - 5.05-3 +- fix #676543 - improved TeX and LaTeX recognition +- fix #676041 - detect all supported RPM architectures + +* Tue Feb 08 2011 Fedora Release Engineering - 5.05-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 18 2011 Jan Kaluza - 5.05-1 +- fix #670319 - update to new upstream release 5.05 +- removed useless patches + +* Mon Jan 10 2011 Jan Kaluza - 5.04-18 +- fix #668304 - support for com32r programs +- distinguish between GFS2 and GFS1 filesystems + +* Wed Nov 24 2010 Jan Kaluza - 5.04-17 +- fix #656395 - "string" magic directive supports longer strings + +* Wed Aug 29 2010 Jan Kaluza - 5.04-16 +- fix #637785 - support for zip64 format + +* Tue Aug 24 2010 Jan Kaluza - 5.04-15 +- fix #626591 - support for WebM format + +* Thu Aug 12 2010 Jan Kaluza - 5.04-14 +- fix #623602 - support for Python 2.7 compiled files + +* Wed Jul 21 2010 David Malcolm - 5.04-13 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Thu Jul 19 2010 Jan Kaluza 5.04-12 +- fix #599695 - try to get "from" attribute for ELF binaries + only from core dumps. + +* Thu Jul 08 2010 Jan Kaluza 5.04-11 +- added docs for file-libs + +* Tue Jun 29 2010 Jan Kaluza 5.04-10 +- fix #608922 - updated z-machine magic + +* Fri Jun 11 2010 Jan Kaluza 5.04-9 +- removed excessive HTML/SGML "magic patterns" (#603040) + +* Wed Apr 14 2010 Daniel Novotny 5.04-8 +- fix #580046 - the file command returns zero exit code + even in case of unexisting file being tested + +* Wed Apr 07 2010 Daniel Novotny 5.04-7 +- fix #566305 - "file" may trim too much of command line from core file + +* Wed Mar 24 2010 Daniel Novotny 5.04-6 +- fix #550212 - 'file' gives bad meta-data for squashfs-4.0 + +* Wed Mar 24 2010 Daniel Novotny 5.04-5 +- fix #575184 - file command does not print separator + when --print0 option is used + +* Thu Mar 11 2010 Daniel Novotny 5.04-4 +- fix #570785 - "file" misidentifies filesystem type + +* Tue Feb 09 2010 Daniel Novotny 5.04-3 +- fix #562840 - [PATCH] Add matches for ruby modules + +* Thu Jan 28 2010 Daniel Novotny 5.04-2 +- fix #533245 - segfaults on star.ulaw + +* Mon Jan 25 2010 Daniel Novotny 5.04-1 +- update to new upstream release 5.04 + +* Mon Jan 18 2010 Daniel Novotny 5.03-18 +- static library moved to new "-static" subpackage (#556048) + +* Fri Dec 25 2009 Robert Scheck 5.03-17 +- removed broken install of example.py (%%doc is much enough) + +* Mon Nov 30 2009 Daniel Novotny 5.03-16 +- fixed the patch for multilib (#515767) + +* Tue Nov 24 2009 Daniel Novotny 5.03-15 +- BuildRequires: autoconf, automake + +* Tue Nov 24 2009 Daniel Novotny 5.03-14 +- BuildRequires: automake because of the Makefile.am patch + +* Fri Nov 13 2009 Daniel Novotny 5.03-13 +- fix #537324 - update spec conditional for rhel + +* Thu Nov 05 2009 Daniel Novotny 5.03-12 +- fix #533151 - file command doesn't recognize deltaisos or rpm-only deltarpms + +* Tue Oct 27 2009 Daniel Novotny 5.03-11 +- fix #531082 - RFE: add detection of Python 3 bytecode +- fix #531127 - `file' command does not recognize mime type `image/vnd.djvu' + +* Wed Oct 21 2009 Daniel Novotny 5.03-10 +- fix #530083 - file -s is not able to detect swap signature on ppc + +* Tue Aug 25 2009 Daniel Novotny 5.03-9 +- fix #515767 - multilib: file /usr/share/misc/magic.mgc conflicts + +* Thu Aug 06 2009 Daniel Novotny 5.03-8 +- rebuild for #515767 - multilib: file /usr/share/misc/magic.mgc conflicts + +* Fri Jul 24 2009 Fedora Release Engineering - 5.03-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 23 2009 Daniel Novotny 5.03-6 +- fix #510429 - file is confused by string "/* (if any) */" + in C header and claims it "Lisp/Scheme program text" + +* Wed Jul 22 2009 Daniel Novotny 5.03-5 +- #513079 - RFE: file - recognize xfs metadump images + +* Fri Jul 10 2009 Adam Jackson 5.03-4 +- Clean up %%description. + +* Tue Jun 16 2009 Daniel Novotny 5.03-4 +- one more PostScript font magic added (#505762), + updated font patch + +* Tue Jun 16 2009 Daniel Novotny 5.03-3 +- added magic for three font issues (PostScript fonts) + (#505758, #505759, #505765) + +* Thu May 14 2009 Daniel Novotny 5.03-2 +- fix #500739 - Disorganized magic* file locations in file-libs + +* Mon May 11 2009 Daniel Novotny 5.03-1 +- new upstream version + +* Tue May 05 2009 Daniel Novotny 5.02-1 +- new upstream version; drop upstreamed patches; this fixes #497913 + +* Wed Apr 29 2009 Daniel Novotny 5.00-8 +- fix #498036 - Elang JAM file definition breaks detection of postscript-files + +* Mon Apr 20 2009 Daniel Novotny 5.00-7 +- fix previous patch: + the name of the format is a bit different (MDUMP -> MDMP) + +* Fri Apr 17 2009 Daniel Novotny 5.00-6 +- fix #485835 (MDUMP files) + +* Mon Mar 23 2009 Daniel Novotny 5.00-5 +- added two font definitions (#491594, #491595) + and a fix for file descriptor leak when MAGIC_COMPRESS used (#491596) + +* Tue Feb 24 2009 Fedora Release Engineering - 5.00-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 23 2009 Daniel Novotny 5.00-3 +- fix #486105 - file-5.00-2.fc11 fails to recognise a file + (and makes rpmbuild fail) + +* Mon Feb 16 2009 Daniel Novotny 5.00-2 +- fix #485141 - rpm failed while checking a French Word file + +* Mon Feb 09 2009 Daniel Novotny 5.00-1 +- upgrade to 5.00 +- drop upstreamed patches, rebase remaining patch + +* Wed Jan 14 2009 Daniel Novotny 4.26-9 +- fix #476655 detect JPEG-2000 Code Stream Bitmap + +* Mon Jan 12 2009 Daniel Novotny 4.26-8 +- fix #479300 - add btrfs filesystem magic + +* Mon Dec 15 2008 Daniel Novotny 4.26-7 +- fix the LaTex issue in bz#474156 + +* Thu Dec 04 2008 Ignacio Vazquez-Abrams - 4.26-6 +- Rebuild for Python 2.6 + +* Thu Dec 04 2008 Daniel Novotny - 4.26-5 +- fix #470811 - Spurious perl auto-requires + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 4.26-4 +- Rebuild for Python 2.6 + +* Thu Oct 16 2008 Daniel Novotny 4.26-3 +- fix #465994 file --mime-encoding seems broken + +* Tue Oct 07 2008 Daniel Novotny 4.26-2 +- fix #463809: rpmbuild rpmfcClassify: Assertion fails on some binary files + (false positive test on "DOS device driver" crashed file(1) + and rpmbuild(8) failed) + +* Mon Sep 15 2008 Daniel Novotny 4.26-1 +- new upstream version: fixes #462064 + +* Mon Jul 21 2008 Tomas Smetana - 4.25-1 +- new upstream version; drop upstreamed patches + +* Fri Jun 06 2008 Tomas Smetana - 4.24-4 +- add GFS2 filesystem magic; thanks to Eric Sandeen +- add LVM snapshots magic (#449755); thanks to Jason Farrell + +* Wed Jun 04 2008 Tomas Smetana - 4.24-3 +- drop patches that do nothing in recent build system +- create the text magic file during installation + +* Tue Jun 03 2008 Tomas Smetana - 4.24-2 +- rebuild because of egg-info + +* Tue Jun 03 2008 Tomas Smetana - 4.24-1 +- new upstream version + +* Tue Mar 11 2008 Tomas Smetana - 4.23-5 +- fix EFI detection patch + +* Fri Feb 01 2008 Tomas Smetana - 4.23-4 +- fix mismatching gzip files and text files as animations + +* Fri Feb 01 2008 Tomas Smetana - 4.23-3 +- fix #430927 - detect ext4 filesystems + +* Thu Jan 31 2008 Tomas Smetana - 4.23-2 +- fix #430952 - wrong handling of ELF binaries + +* Tue Jan 29 2008 Tomas Smetana - 4.23-1 +- new upstream version; update patches; drop unused patches + +* Thu Jan 24 2008 Tomas Smetana - 4.21-5 +- build a separate python-magic package; thanks to Terje Rosten + +* Thu Dec 06 2007 Tomas Smetana - 4.21-4 +- add PE32/PE32+ magic + +* Wed Aug 15 2007 Martin Bacovsky - 4.21-3 +- resolves: #172015: no longer reports filename of crashed app when run on core files. +- resolves: #249578: Weird output from "file -i" +- resolves: #234817: file reports wrong filetype for microsoft word file + +* Wed Jul 4 2007 Martin Bacovsky - 4.21-2 +- resolves: #246700: RPM description isn't related to product +- resolves: #238789: file-devel depends on %%{version} + but not on %%{version}-%%{release} +- resolves: #235267: for core files, file doesn't display the executable name + +* Tue May 29 2007 Martin Bacovsky - 4.21-1 +- upgrade to new upstream 4.21 +- resolves: #241034: CVE-2007-2799 file integer overflow + +* Wed Mar 7 2007 Martin Bacovsky - 4.20-1 +- upgrade to new upstream 4.20 + +* Tue Feb 20 2007 Martin Bacovsky - 4.19-4 +- rpath in file removal + +* Mon Feb 19 2007 Martin Bacovsky - 4.19-3 +- Resolves: #225750 - Merge Review: file + +* Thu Jan 25 2007 Martin Bacovsky - 4.19-2 +- Resolves: #223297 - file does not recognize OpenOffice "native" formats +- Resolves: #224344 - Magic rules should be in file-libs + +* Tue Jan 9 2007 Martin Bacovsky - 4.19-1 +- Resolves: #208880 - Pointless file(1) error message while detecting ELF 64-bit file + thanks to for patch +- Resolves: #214992 - file-devel should own %%_includedir/* %%_libdir/lib*.so +- Resolves: #203548 - a -devel package should be split out for libmagic +- upgrade to new upstream 4.19 +- patch revision and cleaning +- split package to file, file-devel and file-libs + +* Wed Aug 23 2006 Martin Bacovsky - 4.17-8 +- fix recognition of perl script with embed awk (#203610) + +* Fri Aug 18 2006 Martin Bacovsky - 4.17-7 +- fix recognition of bash script with embed awk (#202185) + +* Thu Aug 03 2006 Martin Bacovsky - 4.17-6 +- fix gziped empty file (#72986) + +* Wed Jul 12 2006 Jesse Keating - 4.17-5.1 +- rebuild + +* Mon Jul 10 2006 Radek Vokal 4.17-5 +- fix powerpoint mine (#190373) + +* Wed May 24 2006 Radek Vokal 4.17-4 +- /usr/share/file is owned by package (#192858) +- fix magic for Clamav files (#192406) + +* Fri Apr 21 2006 Radek Vokal 4.17-3 +- add support for OCFS or ASM (#189017) + +* Tue Mar 14 2006 Radek Vokal 4.17-2 +- fix segfault when compiling magic +- add check for wctype.h +- fix for flac and mp3 files + +* Mon Mar 13 2006 Radek Vokal 4.17-1 +- upgrade to file-4.17, patch clean-up + +* Fri Feb 10 2006 Jesse Keating - 4.16-6.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 4.16-6.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Sun Feb 04 2006 Radek Vokal 4.16-6 +- xen patch, recognizes Xen saved domain + +* Fri Jan 13 2006 Radek Vokal 4.16-5 +- fix for 64bit arrays + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Nov 29 2005 Radek Vokal - 4.16-4 +- printf utf8 filenames and don't use isprint() (#174348) + +* Tue Nov 08 2005 Radek Vokal - 4.16-3 +- remove .la files (#172633) + +* Mon Oct 31 2005 Radek Vokal - 4.16-2 +- fix core files output, show "from" (#172015) + +* Tue Oct 18 2005 Radek Vokal - 4.16-1 +- upgrade to upstream + +* Mon Oct 03 2005 Radek Vokal - 4.15-4 +- file output for Berkeley DB gains Cracklib (#168917) + +* Mon Sep 19 2005 Radek Vokal - 4.15-3 +- small fix in previously added patch, now it works for multiple params + +* Mon Sep 19 2005 Radek Vokal - 4.15-2 +- print xxx-style only once (#168617) + +* Thu Aug 09 2005 Radek Vokal - 4.15-1 +- upgrade to upstream + +* Tue Aug 09 2005 Radek Vokal - 4.14-4 +- mime for mpeg and aac files fixed (#165323) + +* Fri Aug 05 2005 Radek Vokal - 4.14-3 +- mime for 3ds files removed, conflicts with text files (#165165) + +* Fri Jul 22 2005 Radek Vokal - 4.14-2 +- fixed mime types recognition (#163866) + +* Thu Jul 14 2005 Radek Vokal - 4.14-1 +- sync with upstream, patch clean-up + +* Mon Jul 04 2005 Radek Vokal - 4.13-5 +- fixed reiserfs check (#162378) + +* Mon Apr 11 2005 Radek Vokal - 4.13-4 +- check Cyrus files before Apple Quicktime movies (#154342) + +* Mon Mar 07 2005 Radek Vokal - 4.13-3 +- check for shared libs before fs dump files (#149868) + +* Fri Mar 04 2005 Radek Vokal - 4.13-2 +- gcc4 rebuilt + +* Tue Feb 15 2005 Radek Vokal - 4.13-1 +- new version, fixing few bugs, patch clean-up +- consistent output for bzip files (#147440) + +* Mon Jan 24 2005 Radek Vokal - 4.12-3 +- core64 patch fixing output on core files (#145354) +- minor change in magic patch + +* Mon Jan 03 2005 Radek Vokal - 4.12-2 +- fixed crashes in threaded environment (#143871) + +* Thu Dec 02 2004 Radek Vokal - 4.12-1 +- upgrade to file-4.12 +- removed Tim's patch, tuned magic patch + +* Sat Nov 20 2004 Miloslav Trmac - 4.10-4 +- Convert libmagic.3 to UTF-8 + +* Thu Nov 18 2004 Radek Vokal 4.10-3 +- set of patches from debian.org +- new magic types (#128763) +- zlib added to BuildReq (#125294) + +* Tue Oct 12 2004 Tim Waugh 4.10-2 +- Fixed occasional segfault (bug #131892). + +* Wed Aug 11 2004 Radek Vokal +- zlib patch deleted, note patch deleted, rh patch updated, debian patch updated +- upgrade to file-4.10 + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Mon May 10 2004 Jakub Jelinek +- fix ELF note handling (#109495) + +* Tue Mar 23 2004 Karsten Hopp 4.07-3 +- add docs (#115966) + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Sun Jan 18 2004 Jeff Johnson 4.07-1 +- upgrade to 4.07. +- deal gracefully with unreadable files (#113207). +- detect PO files (from Debian). + +* Tue Dec 16 2003 Jeff Johnson 4.06-1 +- upgrade to file-4.06. + +* Mon Nov 10 2003 Tim Waugh 4.02-4 +- Minimal fix for busy loop problem (bug #109495). + +* Mon Oct 13 2003 Jeff Johnson 4.05-1 +- upgrade to 4.05. + +* Thu Oct 9 2003 Jeff Johnson 4.02-3 +- use zlib rather than exec'ing gzip. + +-* Thu Aug 28 2003 Dan Walsh +-- Add Selinux support. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Sat May 24 2003 Florian La Roche +- add ldconfig to post/postun + +* Mon Apr 21 2003 Jeff Johnson 4.02-1 +- upgrade to file-4.02. + +* Thu Feb 27 2003 Jeff Johnson 3.39-9 +- check size read from elf header (#85297). + +* Tue Feb 18 2003 Matt Wilson 3.39-8 +- add FHS compatibility symlink from /usr/share/misc/magic -> ../magic + (#84509) + +* Fri Feb 14 2003 Jeff Johnson 3.39-7 +- the "real" fix to the vorbis/ogg magic details (#82810). + +* Mon Jan 27 2003 Jeff Johnson 3.39-6 +- avoid vorbis/ogg magic details (#82810). + +* Wed Jan 22 2003 Tim Powers 3.39-5 +- rebuilt + +* Sun Jan 12 2003 Nalin Dahyabhai 3.39-4 +- PT_NOTE, take 3 + +* Fri Jan 10 2003 Nalin Dahyabhai 3.39-3 +- don't barf in ELF headers with align = 0 + +* Tue Jan 7 2003 Nalin Dahyabhai 3.39-2 +- don't get lost when looking at PT_NOTE sections + +* Sat Oct 26 2002 Jeff Johnson 3.39-1 +- update to 3.39. + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon May 6 2002 Trond Eivind Glomsrød 3.37-6 +- Don't use an old magic.mime +- Add mng detection (#64229) + +* Tue Feb 26 2002 Trond Eivind Glomsrød 3.37-5 +- Rebuild + +* Mon Jan 14 2002 Trond Eivind Glomsrød 3.37-4 +- Fix missing include of (#58209) + +* Tue Dec 11 2001 Trond Eivind Glomsrød 3.37-2 +- Add CFLAGS to handle large files (#53576) + +* Mon Dec 10 2001 Trond Eivind Glomsrød 3.37-1 +- 3.37 +- s/Copyright/License/ +- build with --enable-fsect-man5, drop patch +- disable two old patches + +* Fri Jul 06 2001 Florian La Roche +- revert a patch to Magdir/elf, which breaks many libtool scripts + in several rpm packages + +* Mon Jun 25 2001 Crutcher Dunnavant +- iterate to 3.35 + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Sun Nov 26 2000 Jeff Johnson +- update to 3.33. + +* Mon Aug 14 2000 Preston Brown +- Bill made the patch but didn't apply it. :) + +* Mon Aug 14 2000 Bill Nottingham +- 'ASCII text', not 'ASCII test' (#16168) + +* Mon Jul 31 2000 Jeff Johnson +- fix off-by-1 error when creating filename for use with -i. +- include a copy of GNOME /etc/mime-types in %%{_datadir}/magic.mime (#14741). + +* Sat Jul 22 2000 Jeff Johnson +- install magic as man5/magic.5 with other formats (#11172). + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Wed Jun 14 2000 Jeff Johnson +- FHS packaging. + +* Tue Apr 14 2000 Bernhard Rosenkraenzer +- 3.30 + +* Wed Feb 16 2000 Cristian Gafton +- add ia64 patch from rth + +* Mon Feb 7 2000 Bill Nottingham +- handle compressed manpages +- update to 3.28 + +* Mon Aug 23 1999 Jeff Johnson +- identify ELF stripped files correctly (#4665). +- use SPARC (not sparc) consistently throughout (#4665). +- add entries for MS Office files (#4665). + +* Thu Aug 12 1999 Jeff Johnson +- diddle magic so that *.tfm files are identified correctly. + +* Tue Jul 6 1999 Jeff Johnson +- update to 3.27. + +* Mon Mar 22 1999 Preston Brown +- experimental support for realmedia files added + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 5) + +* Fri Mar 19 1999 Jeff Johnson +- strip binary. + +* Fri Nov 27 1998 Jakub Jelinek +- add SPARC V9 magic. + +* Tue Nov 10 1998 Jeff Johnson +- update to 3.26. + +* Mon Aug 24 1998 Jeff Johnson +- update to 3.25. +- detect gimp XCF versions. + +* Thu May 07 1998 Prospector System +- translations modified for de, fr, tr + +* Wed Apr 08 1998 Erik Troan +- updated to 3.24 +- buildrooted + +* Mon Jun 02 1997 Erik Troan +- built against glibc + +* Mon Mar 31 1997 Erik Troan +- Fixed problems caused by 64 bit time_t. + +* Thu Mar 06 1997 Michael K. Johnson +- Improved recognition of Linux kernel images.