- new upstream version; update patches; drop unused patches
This commit is contained in:
parent
4112f94e9b
commit
b72a446e54
@ -1 +1 @@
|
||||
file-4.21.tar.gz
|
||||
file-4.23.tar.gz
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
--- file-4.13/magic/Makefile.in.fsdump 2005-01-07 20:17:26.000000000 +0100
|
||||
+++ file-4.13/magic/Makefile.in 2005-03-07 14:02:47.147235920 +0100
|
||||
@@ -136,9 +136,9 @@
|
||||
Magdir/diff \
|
||||
Magdir/digital \
|
||||
Magdir/dolby \
|
||||
-Magdir/dump \
|
||||
Magdir/editors \
|
||||
Magdir/elf \
|
||||
+Magdir/dump \
|
||||
Magdir/encore \
|
||||
Magdir/epoc \
|
||||
Magdir/esri \
|
||||
@ -1,11 +0,0 @@
|
||||
--- file-4.17/magic/Magdir/commands.bash 2006-03-02 22:50:25.000000000 +0100
|
||||
+++ file-4.17/magic/Magdir/commands 2006-08-17 16:38:39.000000000 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
0 string/b #!\ /bin/awk awk script text executable
|
||||
0 string/b #!\ /usr/bin/awk awk script text executable
|
||||
# update to distinguish from *.vcf files
|
||||
-0 regex BEGIN[[:space:]]*[{] awk script text
|
||||
+#0 regex [^'"]BEGIN[[:space:]]*[{] awk script text
|
||||
|
||||
# AT&T Bell Labs' Plan 9 shell
|
||||
0 string/b #!\ /bin/rc Plan 9 rc shell script text executable
|
||||
@ -1,19 +0,0 @@
|
||||
--- file-4.17/magic/magic.mime.ppt 2006-06-26 08:57:42.000000000 +0200
|
||||
+++ file-4.17/magic/magic.mime 2006-07-10 11:05:19.000000000 +0200
|
||||
@@ -833,7 +833,7 @@
|
||||
|
||||
0 string PO^Q` application/msword
|
||||
|
||||
-0 string \320\317\021\340\241\261\032\341
|
||||
+0 string \320\317\021\340\241\261\032\341 application/msword
|
||||
>546 string bjbj application/msword
|
||||
>546 string jbjb application/msword
|
||||
|
||||
@@ -844,7 +844,6 @@
|
||||
2112 string MSWordDoc application/msword
|
||||
|
||||
#0 string \320\317\021\340\241\261\032\341 application/powerpoint
|
||||
-0 string \320\317\021\340\241\261\032\341 application/msword
|
||||
|
||||
0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
--- file-4.20/src/file.c.unused 2007-03-12 13:13:17.000000000 +0100
|
||||
+++ file-4.20/src/file.c 2007-03-12 13:15:50.000000000 +0100
|
||||
@@ -358,7 +358,7 @@
|
||||
|
||||
private void
|
||||
/*ARGSUSED*/
|
||||
-load(const char *m __unused, int flags)
|
||||
+load(const char *m f__unused, int flags)
|
||||
{
|
||||
if (magic)
|
||||
return;
|
||||
--- file-4.20/src/file.h.unused 2007-03-12 13:12:32.000000000 +0100
|
||||
+++ file-4.20/src/file.h 2007-03-12 13:15:40.000000000 +0100
|
||||
@@ -79,11 +79,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifndef __unused
|
||||
+#ifndef f__unused
|
||||
#if __GNUC_PREREQ__(2, 7)
|
||||
-#define __unused __attribute__((__unused__))
|
||||
+#define f__unused __attribute__((__unused__))
|
||||
#else
|
||||
-#define __unused /* delete */
|
||||
+#define f__unused /* delete */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
--- file-4.21/src/readelf.c.core_from 2007-08-15 12:11:37.000000000 +0200
|
||||
+++ file-4.21/src/readelf.c 2007-08-15 12:11:53.000000000 +0200
|
||||
@@ -569,8 +569,8 @@
|
||||
* doesn't include the terminating null in the
|
||||
* name....
|
||||
*/
|
||||
- if ((namesz == 4 && strncmp((char *)&nbuf[noff], "CORE", 4) == 0) ||
|
||||
- (namesz == 5 && strcmp((char *)&nbuf[noff], "CORE") == 0)) {
|
||||
+ if ((namesz == 4 && strncmp((char *)&nbuf[noff], "CORE", 4) == 0 && xnh_type == NT_PRPSINFO) ||
|
||||
+ (namesz == 5 && strcmp((char *)&nbuf[noff], "CORE") == 0 && xnh_type == NT_PRPSINFO)) {
|
||||
os_style = OS_STYLE_SVR4;
|
||||
}
|
||||
|
||||
@@ -617,6 +617,7 @@
|
||||
return size;
|
||||
return size;
|
||||
}
|
||||
+ *flags |= FLAGS_DID_CORE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -689,11 +690,11 @@
|
||||
tryanother:
|
||||
;
|
||||
}
|
||||
+ *flags |= FLAGS_DID_CORE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
- *flags |= FLAGS_DID_CORE;
|
||||
return offset;
|
||||
}
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
--- file-4.21/magic/Magdir/msdos.msoffice 2007-08-20 15:06:19.000000000 +0200
|
||||
+++ file-4.21/magic/Magdir/msdos 2007-08-20 15:06:24.000000000 +0200
|
||||
@@ -624,5 +624,5 @@
|
||||
0 lelong 0x02468ace Bochs Sparse disk image
|
||||
|
||||
# from http://filext.com by Derek M Jones <derek@knosof.co.uk>
|
||||
-0 string \xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF Microsoft Installer
|
||||
+#0 string \xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF Microsoft Installer
|
||||
0 string \320\317\021\340\241\261\032\341 Microsoft Office Document
|
||||
--- file-4.21/magic/magic.mime.msoffice 2007-08-17 11:17:19.000000000 +0200
|
||||
+++ file-4.21/magic/magic.mime 2007-08-17 15:01:58.000000000 +0200
|
||||
@@ -851,6 +851,7 @@
|
||||
0 string \320\317\021\340\241\261\032\341
|
||||
>546 string bjbj application/msword
|
||||
>546 string jbjb application/msword
|
||||
+>546 default x application/msword
|
||||
|
||||
512 string R\0o\0o\0t\0\ \0E\0n\0t\0r\0y application/msword
|
||||
|
||||
@@ -859,7 +860,6 @@
|
||||
2112 string MSWordDoc application/msword
|
||||
|
||||
#0 string \320\317\021\340\241\261\032\341 application/powerpoint
|
||||
-0 string \320\317\021\340\241\261\032\341 application/msword
|
||||
|
||||
0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
--- file-4.19/src/readelf.c.ELF 2007-01-09 19:47:26.000000000 +0100
|
||||
+++ file-4.19/src/readelf.c 2007-01-09 19:50:35.000000000 +0100
|
||||
@@ -45,7 +45,7 @@
|
||||
diff -up file-4.23/src/readelf.c.ELF file-4.23/src/readelf.c
|
||||
--- file-4.23/src/readelf.c.ELF 2007-12-27 17:30:52.000000000 +0100
|
||||
+++ file-4.23/src/readelf.c 2008-01-28 13:28:23.000000000 +0100
|
||||
@@ -45,7 +45,7 @@ private int dophn_core(struct magic_set
|
||||
off_t, int *);
|
||||
#endif
|
||||
private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t,
|
||||
@ -9,7 +10,7 @@
|
||||
private int doshn(struct magic_set *, int, int, int, off_t, int, size_t, int *);
|
||||
private size_t donote(struct magic_set *, unsigned char *, size_t, size_t, int,
|
||||
int, size_t, int *);
|
||||
@@ -785,7 +785,7 @@
|
||||
@@ -795,7 +795,7 @@ doshn(struct magic_set *ms, int class, i
|
||||
*/
|
||||
private int
|
||||
dophn_exec(struct magic_set *ms, int class, int swap, int fd, off_t off,
|
||||
@ -18,7 +19,7 @@
|
||||
{
|
||||
Elf32_Phdr ph32;
|
||||
Elf64_Phdr ph64;
|
||||
@@ -854,6 +854,19 @@
|
||||
@@ -864,6 +864,19 @@ dophn_exec(struct magic_set *ms, int cla
|
||||
return -1;
|
||||
align = 4;
|
||||
}
|
||||
@ -38,17 +39,17 @@
|
||||
/*
|
||||
* This is a PT_NOTE section; loop through all the notes
|
||||
* in the section.
|
||||
@@ -960,7 +973,8 @@
|
||||
fd, (off_t)getu32(swap, elfhdr.e_phoff),
|
||||
getu16(swap, elfhdr.e_phnum),
|
||||
(size_t)getu16(swap, elfhdr.e_phentsize),
|
||||
- fsize, &flags)
|
||||
+ fsize, &flags,
|
||||
+ getu16(swap, elfhdr.e_shnum))
|
||||
== -1)
|
||||
return -1;
|
||||
}
|
||||
@@ -1001,7 +1015,8 @@
|
||||
@@ -975,7 +988,8 @@ file_tryelf(struct magic_set *ms, int fd
|
||||
fd, (off_t)getu32(swap, elfhdr.e_phoff),
|
||||
getu16(swap, elfhdr.e_phnum),
|
||||
(size_t)getu16(swap, elfhdr.e_phentsize),
|
||||
- fsize, &flags) == -1)
|
||||
+ fsize, &flags, getu16(swap, elfhdr.e_shnum))
|
||||
+ == -1)
|
||||
return -1;
|
||||
if (doshn(ms, class, swap, fd,
|
||||
(off_t)getu32(swap, elfhdr.e_shoff),
|
||||
@@ -1018,7 +1032,8 @@ file_tryelf(struct magic_set *ms, int fd
|
||||
(off_t)elf_getu64(swap, elfhdr.e_phoff),
|
||||
getu16(swap, elfhdr.e_phnum),
|
||||
(size_t)getu16(swap, elfhdr.e_phentsize),
|
||||
15
file-4.23-fsdump.patch
Normal file
15
file-4.23-fsdump.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up file-4.23/magic/Makefile.in.fsdump file-4.23/magic/Makefile.in
|
||||
--- file-4.23/magic/Makefile.in.fsdump 2008-01-28 11:23:20.000000000 +0100
|
||||
+++ file-4.23/magic/Makefile.in 2008-01-28 11:23:35.000000000 +0100
|
||||
@@ -215,10 +215,10 @@ Magdir/diamond \
|
||||
Magdir/diff \
|
||||
Magdir/digital \
|
||||
Magdir/dolby \
|
||||
-Magdir/dump \
|
||||
Magdir/editors \
|
||||
Magdir/efi \
|
||||
Magdir/elf \
|
||||
+Magdir/dump \
|
||||
Magdir/encore \
|
||||
Magdir/epoc \
|
||||
Magdir/esri \
|
||||
20
file-4.23-msoffice.patch
Normal file
20
file-4.23-msoffice.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -up file-4.23/magic/magic.mime.msoffice file-4.23/magic/magic.mime
|
||||
--- file-4.23/magic/magic.mime.msoffice 2008-01-28 13:04:11.000000000 +0100
|
||||
+++ file-4.23/magic/magic.mime 2008-01-28 13:04:11.000000000 +0100
|
||||
@@ -883,6 +883,7 @@
|
||||
0 string \320\317\021\340\241\261\032\341
|
||||
>546 string bjbj application/msword
|
||||
>546 string jbjb application/msword
|
||||
+>546 default x application/msword
|
||||
|
||||
512 string R\0o\0o\0t\0\ \0E\0n\0t\0r\0y application/msword
|
||||
|
||||
@@ -891,7 +892,6 @@
|
||||
2112 string MSWordDoc application/msword
|
||||
|
||||
#0 string \320\317\021\340\241\261\032\341 application/powerpoint
|
||||
-0 string \320\317\021\340\241\261\032\341 application/msword
|
||||
|
||||
0 string #\ PaCkAgE\ DaTaStReAm application/x-svr4-package
|
||||
|
||||
diff -up file-4.23/magic/Magdir/msdos.msoffice file-4.23/magic/Magdir/msdos
|
||||
56
file.spec
56
file.spec
@ -4,8 +4,8 @@
|
||||
|
||||
Summary: A utility for determining file types
|
||||
Name: file
|
||||
Version: 4.21
|
||||
Release: 5%{?dist}
|
||||
Version: 4.23
|
||||
Release: 1%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/File
|
||||
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
@ -13,19 +13,17 @@ URL: http://www.darwinsys.com/file/
|
||||
Patch1: file-4.19-debian.patch
|
||||
Patch2: file-selinux.patch
|
||||
Patch3: file-4.21-magic.patch
|
||||
Patch5: file-4.13-fsdump.patch
|
||||
Patch6: file-4.13-quick.patch
|
||||
Patch8: file-4.15-berkeley.patch
|
||||
Patch12: file-4.16-xen.patch
|
||||
Patch16: file-4.21-oracle.patch
|
||||
Patch17: file-4.17-clamav.patch
|
||||
Patch20: file-4.17-bash.patch
|
||||
Patch21: file-4.19-ELF.patch
|
||||
Patch22: file-4.19-ooffice.patch
|
||||
patch23: file-4.21-core_from.patch
|
||||
patch24: file-4.21-msoffice.patch
|
||||
patch25: file-4.21-efi.patch
|
||||
patch26: file-4.21-pybuild.patch
|
||||
Patch4: file-4.23-fsdump.patch
|
||||
Patch5: file-4.13-quick.patch
|
||||
Patch6: file-4.15-berkeley.patch
|
||||
Patch7: file-4.16-xen.patch
|
||||
Patch8: file-4.21-oracle.patch
|
||||
Patch9: file-4.17-clamav.patch
|
||||
Patch10: file-4.23-ELF.patch
|
||||
Patch11: file-4.19-ooffice.patch
|
||||
patch12: file-4.23-msoffice.patch
|
||||
patch13: file-4.21-efi.patch
|
||||
patch14: file-4.21-pybuild.patch
|
||||
|
||||
Requires: file-libs = %{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -73,19 +71,17 @@ file(1) command.
|
||||
%patch1 -p1 -b .debian
|
||||
%patch2 -p1 -b .selinux
|
||||
%patch3 -p1 -b .magic
|
||||
%patch5 -p1 -b .fsdump
|
||||
%patch6 -p1 -b .quick
|
||||
%patch8 -p1 -b .berkeley
|
||||
%patch12 -p1 -b .xen
|
||||
%patch16 -p1 -b .oracle
|
||||
%patch17 -p1 -b .clamav
|
||||
%patch20 -p1 -b .bash
|
||||
%patch21 -p1 -b .ELF
|
||||
%patch22 -p1 -b .ooffice
|
||||
%patch23 -p1 -b .core_from
|
||||
%patch24 -p1 -b .msoffice
|
||||
%patch25 -p1 -b .efi
|
||||
%patch26 -p1 -b .pybuild
|
||||
%patch4 -p1 -b .fsdump
|
||||
%patch5 -p1 -b .quick
|
||||
%patch6 -p1 -b .berkeley
|
||||
%patch7 -p1 -b .xen
|
||||
%patch8 -p1 -b .oracle
|
||||
%patch9 -p1 -b .clamav
|
||||
%patch10 -p1 -b .ELF
|
||||
%patch11 -p1 -b .ooffice
|
||||
%patch12 -p1 -b .msoffice
|
||||
%patch13 -p1 -b .efi
|
||||
%patch14 -p1 -b .pybuild
|
||||
|
||||
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
|
||||
touch -r doc/libmagic.man doc/libmagic.man_
|
||||
@ -97,6 +93,7 @@ CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
|
||||
# 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
|
||||
@ -157,6 +154,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 29 2008 Tomas Smetana <tsmetana@redhat.com> - 4.23-1
|
||||
- new upstream version; update patches; drop unused patches
|
||||
|
||||
* Thu Jan 24 2008 Tomas Smetana <tsmetana@redhat.com> - 4.21-5
|
||||
- build a separate python-magic package; thanks to Terje Rosten
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user