From 1ddfea46c4bf3f1e71b1c2d27448c8195195e72f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 23 Feb 2012 17:58:29 +0000 Subject: [PATCH] - updated to 5.11 - removed obsolete revert-weak-palm-magic patch Changed files: file-revert-weak-palm-magic.patch -> 1.2 file.spec -> 1.193 git.patch -> 1.2 --- file-revert-weak-palm-magic.patch | 29 ------ file.spec | 20 ++-- git.patch | 148 ------------------------------ 3 files changed, 8 insertions(+), 189 deletions(-) delete mode 100644 file-revert-weak-palm-magic.patch delete mode 100644 git.patch diff --git a/file-revert-weak-palm-magic.patch b/file-revert-weak-palm-magic.patch deleted file mode 100644 index a3a1bd0..0000000 --- a/file-revert-weak-palm-magic.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- file/magic/Magdir/palm 15 Dec 2011 16:21:43 -0000 1.8 -+++ file/magic/Magdir/palm 16 Jan 2012 15:16:36 -0000 -@@ -10,17 +10,17 @@ - # What are the possibilities and where is this documented? - - # appl --59 byte \0 -->60 string appl PalmOS application -->0 string >\0 "%s" -+#59 byte \0 -+#>60 string appl PalmOS application -+#>0 string >\0 "%s" - # TEXt --59 byte \0 -->60 belong TEXt AportisDoc file -->0 string >\0 "%s" -+#59 byte \0 -+#>60 belong TEXt AportisDoc file -+#>0 string >\0 "%s" - # HACK --59 byte \0 -->60 string HACK HackMaster hack -->0 string >\0 "%s" -+#59 byte \0 -+#>60 string HACK HackMaster hack -+#>0 string >\0 "%s" - - # Variety of PalmOS document types - # Michael-John Turner diff --git a/file.spec b/file.spec index 726023e..0013d54 100644 --- a/file.spec +++ b/file.spec @@ -28,23 +28,21 @@ Summary(uk.UTF-8): Утиліта для визначення типів фай Summary(zh_CN.UTF-8): 判定文件类型的工具。 Summary(zh_TW.UTF-8): 用於決定檔案類型的一個工具程式。 Name: file -Version: 5.10 -Release: 2 +Version: 5.11 +Release: 1 License: distributable Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz -# Source0-md5: 4cea34b087b060772511e066e2038196 +# Source0-md5: 16a407bd66d6c7a832f3a5c0d609c27b Source1: http://ftp1.pld-linux.org/people/glen/%{name}-non-english-man-pages.tar.bz2 # Source1-md5: 6a45bcaefd19b94db36a1b2b7c5b806b Source2: %{name}-zisofs.magic Source3: %{name}-mscompress.magic Source4: %{name}-magic.mime-gen.awk -#Patch0: git.patch -Patch1: %{name}-sparc.patch -Patch2: %{name}-selinux.patch -Patch3: searchpath.patch -Patch4: automake.patch -Patch5: %{name}-revert-weak-palm-magic.patch +Patch0: %{name}-sparc.patch +Patch1: %{name}-selinux.patch +Patch2: searchpath.patch +Patch3: automake.patch URL: http://www.darwinsys.com/file/ BuildRequires: autoconf >= 2.50 BuildRequires: automake @@ -246,12 +244,10 @@ Wiązania Pythona dla libmagic. %prep %setup -q -#%patch0 -p1 +%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 %if "%{cc_version}" < "3.4" %{__sed} -i -e 's,-Wextra,,' configure.ac diff --git a/git.patch b/git.patch deleted file mode 100644 index e4ed6e0..0000000 --- a/git.patch +++ /dev/null @@ -1,148 +0,0 @@ -diff --git a/magic/Magdir/archive b/magic/Magdir/archive -index e84c8e3..5ad1ce3 100644 ---- a/magic/Magdir/archive -+++ b/magic/Magdir/archive -@@ -654,6 +654,9 @@ - >>>>78 string -template Template - !:mime application/vnd.oasis.opendocument.image-template - -+>26 byte x Zip archive data -+ -+ - # StarView Metafile - # From Pierre Ducroquet - 0 string VCLMTF StarView MetaFile -diff --git a/magic/Magdir/macintosh b/magic/Magdir/macintosh ---- a/magic/Magdir/macintosh -+++ b/magic/Magdir/macintosh -@@ -285,7 +285,7 @@ - >0x412 beshort x number of blocks: %d, - >0x424 pstring x volume name: %s - --# "BD" is has many false positives -+# "BD" gives many false positives - #0x400 beshort 0x4244 Macintosh HFS data - #>0 beshort 0x4C4B (bootable) - #>0x40a beshort &0x8000 (locked) -diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos ---- a/magic/Magdir/msdos -+++ b/magic/Magdir/msdos -@@ -389,10 +389,11 @@ - >>4 uleshort&0x4842 >0 \bsupport - >0 ubyte x \b) - # DOS driver cmd640x.sys has 0x12 instead of 0xffffffff for pointer field to next device header --0 ulequad&0x000007a0ffffffed 0x0000000000000000 DOS-executable ( -->4 uleshort&0x8000 0x8000 \bcharacter device driver -->>10 string x %-.8s -->4 uleshort&0x4000 0x4000 \b,control strings-support) -+# Too weak, matches files that only contain 0's -+#0 ulequad&0x000007a0ffffffed 0x0000000000000000 DOS-executable ( -+#>4 uleshort&0x8000 0x8000 \bcharacter device driver -+#>>10 string x %-.8s -+#>4 uleshort&0x4000 0x4000 \b,control strings-support) - - # test too generic ? - 0 byte 0x8c DOS executable (COM) -diff --git a/magic/Magdir/printer b/magic/Magdir/printer ---- a/magic/Magdir/printer -+++ b/magic/Magdir/printer -@@ -1,6 +1,6 @@ - - # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com) --0 string/t %! PostScript document text -+0 string %! PostScript document text - !:mime application/postscript - !:apple ASPSTEXT - >2 string PS-Adobe- conforming -diff --git a/magic/Magdir/sniffer b/magic/Magdir/sniffer -index 7982e90..3415047 100644 ---- a/magic/Magdir/sniffer -+++ b/magic/Magdir/sniffer -@@ -74,6 +74,7 @@ - # that use "libpcap", or that use the same capture file format.) - # - 0 ubelong 0xa1b2c3d4 tcpdump capture file (big-endian) -+!:mime application/vnd.tcpdump.pcap - >4 beshort x - version %d - >6 beshort x \b.%d - >20 belong 0 (No link-layer encapsulation -@@ -138,6 +139,7 @@ - >20 belong 163 (802.11 with AVS header - >16 belong x \b, capture length %d) - 0 ulelong 0xa1b2c3d4 tcpdump capture file (little-endian) -+!:mime application/vnd.tcpdump.pcap - >4 leshort x - version %d - >6 leshort x \b.%d - >20 lelong 0 (No link-layer encapsulation -diff --git a/src/file.h b/src/file.h ---- a/src/file.h -+++ b/src/file.h -@@ -333,8 +333,10 @@ struct mlist { - - #ifdef __cplusplus - #define CAST(T, b) static_cast(b) -+#define RCAST(T, b) reinterpret_cast(b) - #else - #define CAST(T, b) (T)(b) -+#define RCAST(T, b) (T)(b) - #endif - - struct level_info { -diff --git a/src/readelf.c b/src/readelf.c ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -694,6 +694,7 @@ core: - unsigned char *cname, *cp; - size_t reloffset = prpsoffsets(i); - size_t noffset = doff + reloffset; -+ size_t k; - for (j = 0; j < 16; j++, noffset++, - reloffset++) { - /* -@@ -744,12 +745,11 @@ core: - * Try next offsets, in case this match is - * in the middle of a string. - */ -- size_t k; - for (k = i + 1 ; k < NOFFSETS ; k++) { -- if (prpsoffsets(k) >= prpsoffsets(i)) -- continue; - size_t no; - int adjust = 1; -+ if (prpsoffsets(k) >= prpsoffsets(i)) -+ continue; - for (no = doff + prpsoffsets(k); - no < doff + prpsoffsets(i); no++) - adjust = adjust -diff --git a/src/softmagic.c b/src/softmagic.c ---- a/src/softmagic.c -+++ b/src/softmagic.c -@@ -912,7 +912,7 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, - if (indir == 0) { - switch (type) { - case FILE_SEARCH: -- ms->search.s = (const char *)s + offset; -+ ms->search.s = RCAST(const char *, s) + offset; - ms->search.s_len = nbytes - offset; - ms->search.offset = offset; - return 0; -@@ -930,8 +930,8 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, - ms->search.s = NULL; - return 0; - } -- buf = (const char *)s + offset; -- end = last = (const char *)s + nbytes; -+ buf = RCAST(const char *, s) + offset; -+ end = last = RCAST(const char *, s) + nbytes; - /* mget() guarantees buf <= last */ - for (lines = linecnt, b = buf; lines && b < end && - ((b = CAST(const char *, -@@ -944,7 +944,7 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, - b++; - } - if (lines) -- last = (const char *)s + nbytes; -+ last = RCAST(const char *, s) + nbytes; - - ms->search.s = buf; - ms->search.s_len = last - buf; -- 2.44.0