rpms/file/FC-6 file-4.19-ELF.patch, NONE, 1.1 file-4.19-debian.patch, NONE, 1.1 file-4.19-magic.patch, NONE, 1.1 file-4.19-ooffice.patch, NONE, 1.1 file-4.19-oracle.patch, NONE, 1.1 .cvsignore, 1.16, 1.17 file.spec, 1.55, 1.56 sources, 1.16, 1.17 file-4.10-debian.patch, 1.2, NONE file-4.12-core64.patch, 1.1, NONE file-4.17-empty.patch, 1.1, NONE file-4.17-init-mem.patch, 1.1, NONE file-4.17-magic.patch, 1.1, NONE file-4.17-mp3_flac.patch, 1.1, NONE file-4.17-oracle.patch, 1.1, NONE file-4.17-wctype-header.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jan 26 15:22:49 UTC 2007


Author: mbacovsk

Update of /cvs/dist/rpms/file/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv12455

Modified Files:
	.cvsignore file.spec sources 
Added Files:
	file-4.19-ELF.patch file-4.19-debian.patch 
	file-4.19-magic.patch file-4.19-ooffice.patch 
	file-4.19-oracle.patch 
Removed Files:
	file-4.10-debian.patch file-4.12-core64.patch 
	file-4.17-empty.patch file-4.17-init-mem.patch 
	file-4.17-magic.patch file-4.17-mp3_flac.patch 
	file-4.17-oracle.patch file-4.17-wctype-header.patch 
Log Message:
* Fri Jan 26 2007 Martin Bacovsky <mbacovsk at redhat.com> - 4.19-1.fc6
- Resolves: #224334 - file does not recognize OpenOffice "native" formats
- upgrade to new upstream 4.19
- patch revision and cleaning
- Resolves: #208880 - Pointless file(1) error message while detecting ELF 64-bit file
    thanks to <jakub at redhat.com> for patch


file-4.19-ELF.patch:
 readelf.c |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

--- NEW FILE file-4.19-ELF.patch ---
--- 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 @@
     off_t, int *);
 #endif
 private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t,
-    off_t, int *);
+    off_t, int *, int);
 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 @@
  */
 private int
 dophn_exec(struct magic_set *ms, int class, int swap, int fd, off_t off,
-    int num, size_t size, off_t fsize, int *flags)
+    int num, size_t size, off_t fsize, int *flags, int sh_num)
 {
 	Elf32_Phdr ph32;
 	Elf64_Phdr ph64;
@@ -854,6 +854,19 @@
 					return -1;
 				align = 4;
 			}
+			/* If we have a section header table, handle note
+			   sections just in doshn.  Handling them also here
+			   means that for executables we print the note content
+			   twice and, more importantly, don't handle
+			   strip -o created debuginfo files correctly.
+			   They have PT_NOTE header, but the actual note
+			   content is not present in the debuginfo file,
+			   only in the original stripped executable or library.
+			   The corresponding .note.* section is SHT_NOBITS
+			   rather than SHT_NOTE, so doshn will not look
+			   at it.  */
+			if (sh_num)
+				break;
 			/*
 			 * 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 @@
 				    (off_t)elf_getu64(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,

file-4.19-debian.patch:
 magic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE file-4.19-debian.patch ---
--- file-4.19/src/magic.c.debian	2007-01-09 17:40:50.000000000 +0100
+++ file-4.19/src/magic.c	2007-01-09 17:42:29.000000000 +0100
@@ -238,7 +238,7 @@
 	int	fd = 0;
 	int	rv = -1;
 	unsigned char *buf;
-	struct stat	sb;
+	struct stat	sb, *st = &sb;
 	ssize_t nbytes = 0;	/* number of bytes read from a datafile */
 	int	ispipe = 0;
 
@@ -253,7 +253,7 @@
 	if (file_reset(ms) == -1)
 		goto done;
 
-	switch (file_fsmagic(ms, inname, &sb)) {
+	switch (file_fsmagic(ms, inname, st)) {
 	case -1:		/* error */
 		goto done;
 	case 0:			/* nothing found */

file-4.19-magic.patch:
 magic/Magdir/apple    |   17 +++++++++++++++++
 magic/Magdir/images   |    6 ++++++
 magic/Magdir/revision |    6 ++++++
 magic/magic.mime      |   26 +++++++++++++++-----------
 src/fsmagic.c         |    3 ++-
 5 files changed, 46 insertions(+), 12 deletions(-)

--- NEW FILE file-4.19-magic.patch ---
--- file-4.19/magic/Magdir/revision.magic	2007-01-09 17:49:30.000000000 +0100
+++ file-4.19/magic/Magdir/revision	2007-01-09 17:59:01.000000000 +0100
@@ -3,3 +3,9 @@
 # file(1) magic for revision control files
 # From Hendrik Scholz <hendrik at scholz.net>
 0   string /1\ :pserver:    cvs password text file
+
+
+# Subversion (SVN) dumps
+# Uwe Zeisberger <zeisberg at informatik.uni-freiburg.de>
+0       string  SVN-fs-dump-format-version:     Subversion dumpfile
+>28     string  >\0                             (version: %s)
--- file-4.19/magic/Magdir/images.magic	2007-01-09 17:49:12.000000000 +0100
+++ file-4.19/magic/Magdir/images	2007-01-09 17:57:07.000000000 +0100
@@ -524,6 +524,12 @@
 0	belong	0x0e031301	Hierarchical Data Format (version 4) data
 0	string	\211HDF\r\n\032	Hierarchical Data Format (version 5) data
 
+# The boot loaders syslinux and isolinux use a RLE based image format
+# called SLL16 to store splash screens.
+0	lelong		0x1413f33d	Syslinux SLL16 image data,
+>4	leshort		>0		%hd x
+>6	leshort		>0		%hd
+
 # From: Tobias Burnus <burnus at net-b.de>
 # Xara (for a while: Corel Xara) is a graphic package, see
 # http://www.xara.com/ for Windows and as GPL application for
--- file-4.19/magic/Magdir/apple.magic	2007-01-09 17:48:49.000000000 +0100
+++ file-4.19/magic/Magdir/apple	2007-01-09 17:54:25.000000000 +0100
@@ -10,6 +10,23 @@
 0	belong		0x00051600		AppleSingle encoded Macintosh file
 0	belong		0x00051607		AppleDouble encoded Macintosh file
 
+# Apple Emulator 2IMG format
+#
+0	string		2IMG		Apple ][ 2IMG Disk Image
+>4	string		XGS!		\b, XGS
+>4	string		CTKG		\b, Catakig
+>4	string		ShIm		\b, Sheppy's ImageMaker
+>4	string		WOOF		\b, Sweet 16
+>4	string		B2TR		\b, Bernie ][ the Rescue
+>4	string		!nfc		\b, ASIMOV2
+>4	string		x		\b, Unknown Format
+>0xc	byte		00		\b, DOS 3.3 sector order
+>>0x10	byte		00		\b, Volume 254
+>>0x10	byte&0x7f	x		\b, Volume %u
+>0xc	byte		01		\b, ProDOS sector order
+>>0x14	short		x		\b, %u Blocks
+>0xc	byte		02		\b, NIB data
+
 # magic for Newton PDA package formats
 # from Ruda Moura <ruda at helllabs.org>
 0	string	package0	Newton package, NOS 1.x,
--- file-4.19/magic/magic.mime.magic	2007-01-09 17:49:55.000000000 +0100
+++ file-4.19/magic/magic.mime	2007-01-09 18:08:43.000000000 +0100
@@ -193,7 +193,7 @@
 0       beshort         0x4De1          audio/MP4A-LATM
 
 # MPEG Layer 3 sound files
-0       beshort		&0xffe0		audio/mpeg
+0       beshort&0xfffe  =0xfffa         audio/mpeg
 #MP3 with ID3 tag
 0	string		ID3		audio/mpeg
 # Ogg/Vorbis
@@ -397,16 +397,14 @@
 #
 # from Daniel Quinlan <quinlan at yggdrasil.com>
 #
-0	string		\<HEAD	text/html
-0	string		\<head	text/html
-0	string		\<TITLE	text/html
-0	string		\<title	text/html
-0       string          \<html	text/html
-0       string          \<HTML	text/html
+0	string/cB	\<!DOCTYPE\ html	text/html
+0	string/cb	\<head	text/html
+0	string/cb	\<title	text/html
+0       string/bc	\<html	text/html
 0	string		\<!--	text/html
-0	string		\<h1	text/html
-0	string		\<H1	text/html
-0	string/c	\<!doctype\ html	text/html
+0	string/c	\<h1	text/html
+
+0	string		\<?xml			text/xml
 
 #------------------------------------------------------------------------------
 # images:  file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
@@ -469,7 +467,7 @@
 0	beshort		0xffd8		image/jpeg
 
 # PC bitmaps (OS/2, Windoze BMP files)  (Greg Roelofs, newt at uchicago.edu)
-0	string		BM		image/bmp
+0	string		BM		image/x-ms-bmp
 #>14	byte		12		(OS/2 1.x format)
 #>14	byte		64		(OS/2 2.x format)
 #>14	byte		40		(Windows 3.x format)
@@ -924,6 +922,12 @@
 0	string	fLaC		audio/x-flac
 0	string	CWS		application/x-shockwave-flash
 
+
+# Gnumeric spreadsheet
+# This entry is only semi-helpful, as Gnumeric compresses its files, so
+# they will ordinarily reported as "compressed", but at least -z helps
+39      string          =<gmr:Workbook           application/x-gnumeric
+
 # Hangul Document Files:
 # Reversed-engineered HWP magic numbers
 # From: Won-Kyu Park <wkpark at kldp.org>
--- file-4.19/src/fsmagic.c.magic	2007-01-09 17:47:35.000000000 +0100
+++ file-4.19/src/fsmagic.c	2007-01-09 17:51:23.000000000 +0100
@@ -92,7 +92,8 @@
 		if (file_printf(ms, "cannot open `%s' (%s)",
 		    fn, strerror(errno)) == -1)
 			return -1;
-		return 1;
+		ms->haderr++;
+		return -1;
 	}
 
 	if ((ms->flags & MAGIC_MIME) != 0) {

file-4.19-ooffice.patch:
 archive |    2 --
 1 files changed, 2 deletions(-)

--- NEW FILE file-4.19-ooffice.patch ---
--- file-4.19/magic/Magdir/archive.ooffice	2007-01-25 11:18:43.000000000 +0100
+++ file-4.19/magic/Magdir/archive	2007-01-25 11:19:08.000000000 +0100
@@ -536,8 +536,6 @@
 >4	byte		0x0b		Zip archive data, at least v1.1 to extract
 >4	byte		0x14
 >>30	ubelong		!0x6d696d65	Zip archive data, at least v2.0 to extract
->0x161	string		WINZIP          Zip archive data, WinZIP self-extracting
-
 
 # OpenOffice.org / KOffice / StarOffice documents
 # From: Abel Cheung <abel at oaka.org>

file-4.19-oracle.patch:
 filesystems |   13 +++++++++++++
 1 files changed, 13 insertions(+)

--- NEW FILE file-4.19-oracle.patch ---
--- file-4.19/magic/Magdir/filesystems.oracle	2007-01-09 18:14:04.000000000 +0100
+++ file-4.19/magic/Magdir/filesystems	2007-01-09 18:15:15.000000000 +0100
@@ -979,6 +979,19 @@
 >>>>>>>>&0      bedate          =0                      full dump
 >>>>>>>>&0      bedate          !0                      incremental since: %s
 
+# Oracle Clustered Filesystem - Aaron Botsis <redhat at digitalmafia.org>
+8       string          OracleCFS       Oracle Clustered Filesystem,
+>4      long            x               rev %d
+>0      long            x               \b.%d,
+>560    string          x               label: %.64s,
+>136    string          x               mountpoint: %.128s
+
+# Oracle ASM tagged volume - Aaron Botsis <redhat at digitalmafia.org>
+32      string          ORCLDISK        Oracle ASM Volume,
+>40     string          x               Disk Name: %0.12s
+32      string          ORCLCLRD        Oracle ASM Volume (cleared),
+>40     string          x               Disk Name: %0.12s
+
 # VMS backup savesets - gerardo.cacciari at gmail.com
 # had to comment out GEM Image and G3 raw data  entries due to conflict
 #0            byte    x


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/file/FC-6/.cvsignore,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- .cvsignore	13 Mar 2006 07:28:43 -0000	1.16
+++ .cvsignore	26 Jan 2007 15:22:47 -0000	1.17
@@ -1 +1 @@
-file-4.17.tar.gz
+file-4.19.tar.gz


Index: file.spec
===================================================================
RCS file: /cvs/dist/rpms/file/FC-6/file.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- file.spec	23 Aug 2006 16:14:07 -0000	1.55
+++ file.spec	26 Jan 2007 15:22:47 -0000	1.56
@@ -2,27 +2,25 @@
 
 Summary: A utility for determining file types.
 Name: file
-Version: 4.17
-Release: 8
+Version: 4.19
+Release: 1%{dist}
 License: distributable
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
 URL:	http://www.darwinsys.com/file/
-Patch1: file-4.10-debian.patch
+Patch1: file-4.19-debian.patch
 Patch2: file-selinux.patch
-Patch3: file-4.17-magic.patch
+Patch3: file-4.19-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
-Patch13: file-4.17-init-mem.patch
-Patch14: file-4.17-wctype-header.patch
-Patch15: file-4.17-mp3_flac.patch
-Patch16: file-4.17-oracle.patch
+Patch16: file-4.19-oracle.patch
 Patch17: file-4.17-clamav.patch
 Patch18: file-4.17-powerpoint.patch
-Patch19: file-4.17-empty.patch
 Patch20: file-4.17-bash.patch
+Patch21: file-4.19-ELF.patch
+Patch22: file-4.19-ooffice.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: zlib-devel
 
@@ -44,14 +42,12 @@
 %patch6 -p1 -b .quick
 %patch8 -p1 -b .berkeley
 %patch12 -p1 -b .xen
-%patch13 -p1 -b .mem
-%patch14 -p1 -b .wctype
-%patch15 -p1 -b .mp3
 %patch16 -p1 -b .oracle
 %patch17 -p1 -b .clamav
 %patch18 -p1 -b .powerpoint
-%patch19 -p1 -b .empty
 %patch20 -p1 -b .bash
+%patch21 -p1 -b .ELF
+%patch22 -p1 -b .ooffice
 
 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
 mv doc/libmagic.man_ doc/libmagic.man
@@ -97,6 +93,13 @@
 %{_libdir}/libmagic.*
 
 %changelog
+* Fri Jan 26 2007 Martin Bacovsky <mbacovsk at redhat.com> - 4.19-1.fc6
+- Resolves: #224334 - file does not recognize OpenOffice "native" formats
+- upgrade to new upstream 4.19
+- patch revision and cleaning
+- Resolves: #208880 - Pointless file(1) error message while detecting ELF 64-bit file
+    thanks to <jakub at redhat.com> for patch
+
 * Wed Aug 23 2006 Martin Bacovsky <mbacovsky at redhat.com> - 4.17-8
 - fix recognition of perl script with embed awk (#203610) 
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/file/FC-6/sources,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- sources	13 Mar 2006 07:28:43 -0000	1.16
+++ sources	26 Jan 2007 15:22:47 -0000	1.17
@@ -1 +1 @@
-50919c65e0181423d66bb25d7fe7b0fd  file-4.17.tar.gz
+a61ef3aa8339d5987148089afde25f60  file-4.19.tar.gz


--- file-4.10-debian.patch DELETED ---


--- file-4.12-core64.patch DELETED ---


--- file-4.17-empty.patch DELETED ---


--- file-4.17-init-mem.patch DELETED ---


--- file-4.17-magic.patch DELETED ---


--- file-4.17-mp3_flac.patch DELETED ---


--- file-4.17-oracle.patch DELETED ---


--- file-4.17-wctype-header.patch DELETED ---




More information about the fedora-cvs-commits mailing list