SHA256
3
0
forked from pool/file
Dr. Werner Fink 2013-03-22 10:16:05 +00:00 committed by Git OBS Bridge
parent 9e4df1ecfa
commit 98feb59fcf
10 changed files with 59 additions and 86 deletions

View File

@ -1,52 +0,0 @@
--- src/apprentice.c
+++ src/apprentice.c 2006-11-22 16:09:57.000000000 +0000
@@ -886,8 +886,16 @@
quad = 1;
/*FALLTHROUGH*/
case FILE_FMT_NUM:
+ if (*ptr == '#')
+ ptr++;
+ if (*ptr == ' ')
+ ptr++;
if (*ptr == '-')
ptr++;
+ if (*ptr == '+')
+ ptr++;
+ if (*ptr == '\'')
+ ptr++;
if (*ptr == '.')
ptr++;
while (isdigit((unsigned char)*ptr)) ptr++;
@@ -907,6 +915,7 @@
case 'i':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;
@@ -921,12 +930,16 @@
case 'i':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;
default:
return -1;
}
+ case 'o':
+ case 'x':
+ case 'X':
case 'd':
return 0;
default:
@@ -937,6 +950,7 @@
case 'c':
case 'd':
case 'u':
+ case 'o':
case 'x':
case 'X':
return 0;

View File

@ -1,11 +0,0 @@
--- src/cdf.c
+++ src/cdf.c 2013-02-26 17:30:21.073444930 +0000
@@ -250,8 +250,6 @@ cdf_read(const cdf_info_t *info, off_t o
if (info->i_fd == -1)
return -1;
- return -1;
-
if (pread(info->i_fd, buf, len, off) != (ssize_t)len)
return -1;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2eb340d39651e612127d13cfbd8361d87aadd7d02c34e8821fec862218f0fd2b
size 640757

View File

@ -37,16 +37,16 @@
>0 byte ^0x80 executable
>16 belong >0 not stripped
--- magic/Magdir/mach
+++ magic/Magdir/mach 2013-01-22 14:29:39.261451501 +0000
@@ -122,7 +122,7 @@
>>>8 belong&0x00ffffff 1 mc88100
>>>8 belong&0x00ffffff 2 mc88110
>>>8 belong&0x00ffffff >2 mc88000 subarchitecture=%ld
->>4 belong&0x00ffffff 14 sparc
+>>4 belong&0x00ffffff 14 SPARC
>>4 belong&0x00ffffff 15 i860g
>>4 belong&0x00ffffff 16 alpha
>>4 belong&0x00ffffff 17 rs6000
+++ magic/Magdir/mach 2013-03-22 09:53:26.637439171 +0000
@@ -121,7 +121,7 @@
>>>4 belong&0x00ffffff 1 mc88100
>>>4 belong&0x00ffffff 2 mc88110
>>>4 belong&0x00ffffff >2 mc88000 subarchitecture=%ld
->>0 belong&0x00ffffff 14 sparc
+>>0 belong&0x00ffffff 14 SPARC
>>0 belong&0x00ffffff 15 i860g
>>0 belong&0x00ffffff 16 alpha
>>0 belong&0x00ffffff 17 rs6000
--- magic/Magdir/netbsd
+++ magic/Magdir/netbsd 2003-12-08 16:50:03.000000000 +0000
@@ -100,25 +100,25 @@
@ -80,7 +80,7 @@
>32 belong !0 (signal %d)
--- magic/Magdir/sun
+++ magic/Magdir/sun 2013-01-22 14:30:30.861452080 +0000
+++ magic/Magdir/sun 2013-01-22 14:30:31.000000000 +0000
@@ -9,7 +9,7 @@
# are in aout, as they're indistinguishable from other big-endian
# 32-bit a.out files.

29
file-5.14-printf.dif Normal file
View File

@ -0,0 +1,29 @@
--- src/apprentice.c
+++ src/apprentice.c 2013-03-22 10:07:26.293440720 +0000
@@ -2057,8 +2057,16 @@ check_format_type(const char *ptr, int t
quad = 1;
/*FALLTHROUGH*/
case FILE_FMT_NUM:
+ if (*ptr == '#')
+ ptr++;
+ if (*ptr == ' ')
+ ptr++;
if (*ptr == '-')
ptr++;
+ if (*ptr == '+')
+ ptr++;
+ if (*ptr == '\'')
+ ptr++;
if (*ptr == '.')
ptr++;
while (isdigit((unsigned char)*ptr)) ptr++;
@@ -2100,6 +2108,9 @@ check_format_type(const char *ptr, int t
default:
return -1;
}
+ case 'o':
+ case 'x':
+ case 'X':
case 'd':
return 0;
default:

View File

@ -1,7 +1,7 @@
--- magic/Localstuff
+++ magic/Localstuff 2003-07-01 16:58:32.000000000 +0000
@@ -5,3 +5,12 @@
# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $
# $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.
+

3
file-5.14.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:461ba01dd0900a3b7c2dcd901b04903192c07887a9c1928af0be507572c77fe4
size 648552

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
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

View File

@ -30,7 +30,7 @@ Obsoletes: file-64bit
%endif
#
# Set Version also in python-magic.spec
Version: 5.13
Version: 5.14
Release: 0
Summary: A Tool to Determine File Types
License: BSD-2-Clause
@ -38,13 +38,13 @@ Group: Productivity/File utilities
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
Source2: baselibs.conf
Patch: file-5.13.dif
Patch1: file-5.12-misc.dif
Patch1: file-5.14-misc.dif
Patch4: file-4.24-autoconf.dif
Patch5: file-4.03-tex.dif
Patch5: file-5.14-tex.dif
Patch7: file-4.20-ssd.dif
Patch8: file-4.20-xen.dif
Patch9: file-5.07-elf.dif
Patch10: file-4.18-printf.dif
Patch10: file-5.14-printf.dif
Patch11: file-5.12-zip.dif
Patch12: file-5.07-option.dif
Patch13: file-4.21-scribus.dif
@ -61,8 +61,6 @@ Patch32: file-5.07-clicfs.dif
Patch33: file-5.12-ocloexec.patch
Patch34: file-5.12-endian.patch
Patch35: file-5.12-nitpick.dif
# PATCH-FIX-UPSTREAM: avoid doubled return
Patch36: file-5.13-return.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _miscdir %{_datadir}/misc
@ -128,7 +126,6 @@ to develop applications that require the magic "file" interface.
%patch33 -p0 -b .clexe
%patch34 -p0 -b .endian
%patch35 -p0 -b .nitpick
%patch36 -p0 -b .return
%patch -b .0
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in

View File

@ -23,7 +23,7 @@ BuildRequires: libtool
BuildRequires: python-devel
BuildRequires: zlib-devel
Url: http://www.darwinsys.com/file/
Version: 5.13
Version: 5.14
Release: 0
Summary: Python module to use libmagic
License: BSD-3-Clause and BSD-4-Clause