commit file for openSUSE:Factory
30 Jun
2011
30 Jun
'11
11:08
Hello community, here is the log from the commit of package file for openSUSE:Factory checked in at Thu Jun 30 13:08:19 CEST 2011. -------- --- file/file.changes 2010-11-24 13:22:13.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file.changes 2011-06-14 19:53:45.000000000 +0200 @@ -1,0 +2,14 @@ +Tue Jun 14 19:50:04 CEST 2011 - werner@suse.de + +- Update to file version 5.07 + * Several regressions in magic were fixed. A buffer overflow was + corrected. The program version is now recorded in only one place. + Several documentation improvements were made. + * The Python bindings were updated and fixed. Magic support for + OCF (EPUB) files and for lrzip files was added. Zip file magic + was adapted for files with unsupported special types. Many + more magic updates and fixes were made. + * Several minor bugs were fixed. +- Add magic for clicfs evne if upstream does not support it (bnc#681329) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- file-4.16-python.dif file-4.21-reiserfs.dif file-4.24-elf.dif file-4.24-reg_dos.dif file-5.02-misc.dif file-5.02-option.dif file-5.03-iso9660.dif file-5.04-awk.dif file-5.04-biorad.dif file-5.04-exec.dif file-5.04-llvm.dif file-5.04-visibility.patch file-5.04-zip2.0.dif file-5.04.dif file-5.04.tar.bz2 New: ---- file-5.07-biorad.dif file-5.07-clicfs.dif file-5.07-elf.dif file-5.07-exec.dif file-5.07-iso9660.dif file-5.07-llvm.dif file-5.07-misc.dif file-5.07-option.dif file-5.07-visibility.patch file-5.07-zip2.0.dif file-5.07.dif file-5.07.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ file.spec ++++++ --- /var/tmp/diff_new_pack.sDlc74/_old 2011-06-30 12:56:18.000000000 +0200 +++ /var/tmp/diff_new_pack.sDlc74/_new 2011-06-30 12:56:18.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package file (Version 5.04) +# spec file for package file # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,37 +30,34 @@ %endif # # Set Version also in python-magic.spec -Version: 5.04 -Release: 8 +Version: 5.07 +Release: 1 Summary: A Tool to Determine File Types Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.bz2 Source2: baselibs.conf Patch: file-%{version}.dif -Patch1: file-5.02-misc.dif -Patch3: file-5.04-exec.dif +Patch1: file-5.07-misc.dif +Patch3: file-5.07-exec.dif Patch4: file-4.24-autoconf.dif Patch5: file-4.03-tex.dif Patch7: file-4.20-ssd.dif Patch8: file-4.20-xen.dif -Patch9: file-4.24-elf.dif +Patch9: file-5.07-elf.dif Patch10: file-4.18-printf.dif -Patch11: file-4.24-reg_dos.dif -Patch12: file-5.02-option.dif +Patch12: file-5.07-option.dif Patch13: file-4.21-scribus.dif -Patch14: file-5.04-awk.dif Patch15: file-4.21-xcursor.dif -Patch16: file-4.21-reiserfs.dif Patch20: file-4.24-mips.dif -Patch21: file-4.16-python.dif Patch22: file-4.24-cromfs.dif Patch24: file-4.24-warn.dif Patch25: file-5.02-javacheck.dif Patch26: file-4.24-solv.dif -Patch27: file-5.04-zip2.0.dif -Patch28: file-5.03-iso9660.dif -Patch29: file-5.04-llvm.dif -Patch30: file-5.04-visibility.patch -Patch31: file-5.04-biorad.dif +Patch27: file-5.07-zip2.0.dif +Patch28: file-5.07-iso9660.dif +Patch29: file-5.07-llvm.dif +Patch30: file-5.07-visibility.patch +Patch31: file-5.07-biorad.dif +Patch32: file-5.07-clicfs.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _miscdir %{_datadir}/misc @@ -107,18 +104,12 @@ %patch8 -p0 -b .xen %patch9 -p0 -b .elf %patch10 -p0 -b .prtf -%patch11 -p0 -b .reg %patch12 -p0 -b .opt %patch13 -p0 -b .scri -%patch14 -p0 -b .awk %patch15 -p0 -b .xcur -%patch16 -p0 -b .reiserfs %ifarch mips %patch20 -p0 -b .mips %endif -%if 0%{?build_python_bindings:1} -%patch21 -p0 -b .python -%endif %patch22 -p0 -b .cromfs %patch24 -p0 -b .warn %patch25 -p0 -b .javacheck @@ -128,6 +119,7 @@ %patch29 -p0 -b .llvm %patch30 -p0 -b .vis %patch31 -p0 -b .biorad +%patch32 -p0 -b .clicfs %patch %build ++++++ python-magic.spec ++++++ --- /var/tmp/diff_new_pack.sDlc74/_old 2011-06-30 12:56:18.000000000 +0200 +++ /var/tmp/diff_new_pack.sDlc74/_new 2011-06-30 12:56:18.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package python-magic (Version 5.04) +# spec file for package python-magic # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,8 +26,8 @@ License: BSD 3 Clause, BSD 4 Clause Group: Development/Languages/Python AutoReqProv: on -Version: 5.04 -Release: 8 +Version: 5.07 +Release: 1 Summary: Python module to use libmagic %py_requires Source99: file.spec ++++++ file-5.04-biorad.dif -> file-5.07-biorad.dif ++++++ --- file/file-5.04-biorad.dif 2010-11-24 13:22:13.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-biorad.dif 2011-06-14 19:53:35.000000000 +0200 @@ -1,26 +1,11 @@ --- magic/Magdir/images -+++ magic/Magdir/images 2010-11-24 12:11:01.520426341 +0000 -@@ -551,11 +551,18 @@ - # Bio-Rad .PIC is an image format used by microscope control systems - # and related image processing software used by biologists. - # From: Vebjorn Ljosa--54 leshort 12345 Bio-Rad .PIC Image File -->0 leshort >0 %hd x -->2 leshort >0 %hd, -->4 leshort =1 1 image in file -->4 leshort >1 %hd images in file -+# BOOL values are two-byte integers; use them to rule out false positives. -+# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt -+# Samples: http://www.loci.wisc.edu/software/sample-data -+14 leshort <2 ++++ magic/Magdir/images 2011-06-14 14:09:58.779926039 +0000 +@@ -583,6 +583,8 @@ + # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt + # Samples: http://www.loci.wisc.edu/software/sample-data + 14 leshort <2 +>4 leshort >0 +>49 byte 0 -+>62 leshort <2 -+>>54 leshort 12345 Bio-Rad .PIC Image File -+>>>0 leshort >0 %hd x -+>>>2 leshort >0 %hd, -+>>>4 leshort =1 1 image in file -+>>>4 leshort >1 %hd images in file - - # From Jan "Yenya" Kasprzak - # The description of *.mrw format can be found at + >62 leshort <2 + >>54 leshort 12345 Bio-Rad .PIC Image File + >>>0 leshort >0 %hd x ++++++ file-5.07-clicfs.dif ++++++ --- magic/Localstuff +++ magic/Localstuff 2011-06-14 17:40:22.417764753 +0000 @@ -53,3 +53,11 @@ 0 string SOLV Sat-solver solv file, >4 belong x version %ld + +# coolo's clicfs + +0 string/b CLIC ClicFS +>4 byte x \b Version %c +>5 byte x \b%c +>6 long >0 +>>6 pstring/l >0 \b, Target "%s" ++++++ file-4.24-elf.dif -> file-5.07-elf.dif ++++++ --- file/file-4.24-elf.dif 2008-04-14 19:32:35.000000000 +0200 +++ /mounts/work_src_done/STABLE/file/file-5.07-elf.dif 2011-06-14 19:53:37.000000000 +0200 @@ -1,15 +1,15 @@ --- src/readelf.c -+++ src/readelf.c 2008-04-14 16:43:48.082574211 +0200 -@@ -663,7 +663,7 @@ core: ++++ src/readelf.c 2011-06-14 13:58:06.424425742 +0000 +@@ -678,7 +678,7 @@ core: default: - if (xnh_type == NT_PRPSINFO) { + if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) { - size_t i, j; + size_t i, j, m = 0; unsigned char c; /* * Extract the program name. We assume -@@ -675,7 +675,9 @@ core: +@@ -690,7 +690,9 @@ core: * If the characters aren't all printable, * reject it. */ ++++++ file-5.04-exec.dif -> file-5.07-exec.dif ++++++ --- file/file-5.04-exec.dif 2010-02-05 17:16:35.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-exec.dif 2011-06-14 19:53:37.000000000 +0200 @@ -1,107 +1,105 @@ --- magic/Magdir/commands -+++ magic/Magdir/commands 2010-02-05 14:28:46.657297767 +0000 -@@ -4,73 +4,73 @@ ++++ magic/Magdir/commands 2011-06-14 13:50:11.135927768 +0000 +@@ -4,71 +4,71 @@ # commands: file(1) magic for various shells and interpreters # - #0 string : shell archive or script for antique kernel text --0 string/w #!\ /bin/sh POSIX shell script text executable -+0 string/w #!\ /bin/sh POSIX shell script text + #0 string/w : shell archive or script for antique kernel text +-0 string/wt #!\ /bin/sh POSIX shell script text executable ++0 string/wt #!\ /bin/sh POSIX shell script text !:mime text/x-shellscript --0 string/w #!\ /bin/csh C shell script text executable -+0 string/w #!\ /bin/csh C shell script text +-0 string/wt #!\ /bin/csh C shell script text executable ++0 string/wt #!\ /bin/csh C shell script text !:mime text/x-shellscript # korn shell magic, sent by George Wu, gwu@clyde.att.com --0 string/w #!\ /bin/ksh Korn shell script text executable -+0 string/w #!\ /bin/ksh Korn shell script text +-0 string/wt #!\ /bin/ksh Korn shell script text executable ++0 string/wt #!\ /bin/ksh Korn shell script text !:mime text/x-shellscript --0 string/w #!\ /bin/tcsh Tenex C shell script text executable -+0 string/w #!\ /bin/tcsh Tenex C shell script text +-0 string/wt #!\ /bin/tcsh Tenex C shell script text executable ++0 string/wt #!\ /bin/tcsh Tenex C shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/bin/tcsh Tenex C shell script text executable -+0 string/w #!\ /usr/bin/tcsh Tenex C shell script text +-0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable ++0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/tcsh Tenex C shell script text executable -+0 string/w #!\ /usr/local/tcsh Tenex C shell script text +-0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable ++0 string/wt #!\ /usr/local/tcsh Tenex C shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text executable -+0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text +-0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable ++0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text !:mime text/x-shellscript # # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) --0 string/w #!\ /bin/zsh Paul Falstad's zsh script text executable -+0 string/w #!\ /bin/zsh Paul Falstad's zsh script text +-0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable ++0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript --0 string/w #!\ /usr/bin/zsh Paul Falstad's zsh script text executable -+0 string/w #!\ /usr/bin/zsh Paul Falstad's zsh script text +-0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable ++0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable -+0 string/w #!\ /usr/local/bin/zsh Paul Falstad's zsh script text +-0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable ++0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bin/ash Neil Brown's ash script text executable -+0 string/w #!\ /usr/local/bin/ash Neil Brown's ash script text +-0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable ++0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bin/ae Neil Brown's ae script text executable -+0 string/w #!\ /usr/local/bin/ae Neil Brown's ae script text +-0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable ++0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text !:mime text/x-shellscript --0 string/w #!\ /bin/nawk new awk script text executable -+0 string/w #!\ /bin/nawk new awk script text +-0 string/wt #!\ /bin/nawk new awk script text executable ++0 string/wt #!\ /bin/nawk new awk script text !:mime text/x-nawk --0 string/w #!\ /usr/bin/nawk new awk script text executable -+0 string/w #!\ /usr/bin/nawk new awk script text +-0 string/wt #!\ /usr/bin/nawk new awk script text executable ++0 string/wt #!\ /usr/bin/nawk new awk script text !:mime text/x-nawk --0 string/w #!\ /usr/local/bin/nawk new awk script text executable -+0 string/w #!\ /usr/local/bin/nawk new awk script text +-0 string/wt #!\ /usr/local/bin/nawk new awk script text executable ++0 string/wt #!\ /usr/local/bin/nawk new awk script text !:mime text/x-nawk --0 string/w #!\ /bin/gawk GNU awk script text executable -+0 string/w #!\ /bin/gawk GNU awk script text +-0 string/wt #!\ /bin/gawk GNU awk script text executable ++0 string/wt #!\ /bin/gawk GNU awk script text !:mime text/x-gawk --0 string/w #!\ /usr/bin/gawk GNU awk script text executable -+0 string/w #!\ /usr/bin/gawk GNU awk script text +-0 string/wt #!\ /usr/bin/gawk GNU awk script text executable ++0 string/wt #!\ /usr/bin/gawk GNU awk script text !:mime text/x-gawk --0 string/w #!\ /usr/local/bin/gawk GNU awk script text executable -+0 string/w #!\ /usr/local/bin/gawk GNU awk script text +-0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable ++0 string/wt #!\ /usr/local/bin/gawk GNU awk script text !:mime text/x-gawk # --0 string/w #!\ /bin/awk awk script text executable -+0 string/w #!\ /bin/awk awk script text +-0 string/wt #!\ /bin/awk awk script text executable ++0 string/wt #!\ /bin/awk awk script text !:mime text/x-awk --0 string/w #!\ /usr/bin/awk awk script text executable -+0 string/w #!\ /usr/bin/awk awk script text +-0 string/wt #!\ /usr/bin/awk awk script text executable ++0 string/wt #!\ /usr/bin/awk awk script text !:mime text/x-awk - # update to distinguish from *.vcf files - # this is broken because postscript has /EBEGIN{ for example. - #0 search/Ww BEGIN { awk script text + 0 regex =^\\s*BEGIN\\s*[{] awk script text # AT&T Bell Labs' Plan 9 shell --0 string/w #!\ /bin/rc Plan 9 rc shell script text executable -+0 string/w #!\ /bin/rc Plan 9 rc shell script text +-0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable ++0 string/wt #!\ /bin/rc Plan 9 rc shell script text # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) --0 string/w #!\ /bin/bash Bourne-Again shell script text executable -+0 string/w #!\ /bin/bash Bourne-Again shell script text +-0 string/wt #!\ /bin/bash Bourne-Again shell script text executable ++0 string/wt #!\ /bin/bash Bourne-Again shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/bin/bash Bourne-Again shell script text executable -+0 string/w #!\ /usr/bin/bash Bourne-Again shell script text +-0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable ++0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bash Bourne-Again shell script text executable -+0 string/w #!\ /usr/local/bash Bourne-Again shell script text +-0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable ++0 string/wt #!\ /usr/local/bash Bourne-Again shell script text !:mime text/x-shellscript --0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text executable -+0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text +-0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable ++0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text !:mime text/x-shellscript # using env - 0 string #!/usr/bin/env a -->15 string >\0 %s script text executable -+>15 string >\0 %s script text - 0 string #!\ /usr/bin/env a -->16 string >\0 %s script text executable -+>16 string >\0 %s script text + 0 string/t #!/usr/bin/env a +->15 string/t >\0 %s script text executable ++>15 string/t >\0 %s script text + 0 string/t #!\ /usr/bin/env a +->16 string/t >\0 %s script text executable ++>16 string/t >\0 %s script text # PHP scripts # Ulf Harnhammar -@@ -80,9 +80,9 @@ +@@ -78,9 +78,9 @@ !:mime text/x-php 0 search/1 =\r PHP script text !:mime text/x-php @@ -111,8 +109,8 @@ -0 search/1/w #!\ /usr/bin/php PHP script text executable +0 search/1/w #!\ /usr/bin/php PHP script text !:mime text/x-php - - 0 string Zend\x00 PHP script Zend Optimizer data + # Smarty compiled template, http://www.smarty.net/ + # Elan Ruusamäe --- magic/Magdir/perl +++ magic/Magdir/perl 2009-05-05 12:01:34.000000000 +0000 @@ -6,15 +6,15 @@ @@ -135,19 +133,19 @@ 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text !:mime text/x-perl --- magic/Magdir/python -+++ magic/Magdir/python 2010-02-05 14:29:13.101297655 +0000 ++++ magic/Magdir/python 2011-06-14 13:51:01.507926101 +0000 @@ -5,7 +5,7 @@ # # From: David Necas # often the module starts with a multiline string --0 string """ a python script text executable -+0 string """ a python script text - # MAGIC as specified in Python/import.c (1.5 to 2.6a1 and 3.1a0, assuming +-0 string/t """ a python script text executable ++0 string/t """ a python script text + # MAGIC as specified in Python/import.c (1.5 to 2.7a0 and 3.1a0, assuming # that Py_UnicodeFlag is off for Python 2) # 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n" -@@ -20,11 +20,11 @@ - 0 belong 0x3b0c0d0a python 3.0 byte-compiled +@@ -22,39 +22,39 @@ 0 belong 0x4f0c0d0a python 3.1 byte-compiled + 0 belong 0x6c0c0d0a python 3.2 byte-compiled -0 search/1/w #!\ /usr/bin/python Python script text executable +0 search/1/w #!\ /usr/bin/python Python script text @@ -158,25 +156,59 @@ -0 search/1 #!/usr/bin/env\ python Python script text executable +0 search/1 #!/usr/bin/env\ python Python script text !:mime text/x-python --0 search/1 #!\ /usr/bin/env\ ruby Python script text executable -+0 search/1 #!\ /usr/bin/env\ ruby Python script text +-0 search/1 #!\ /usr/bin/env\ python Python script text executable ++0 search/1 #!\ /usr/bin/env\ python Python script text + !:mime text/x-python + + + # from module.submodule import func1, func2 +-0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable ++0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text + !:mime text/x-python + + # def __init__ (self, ...): + 0 search/4096 def\ __init__ +->&0 search/64 self Python script text executable ++>&0 search/64 self Python script text + !:mime text/x-python + + # comments + 0 search/4096 ''' +->&0 regex .*'''$ Python script text executable ++>&0 regex .*'''$ Python script text + !:mime text/x-python + + 0 search/4096 """ +->&0 regex .*"""$ Python script text executable ++>&0 regex .*"""$ Python script text + !:mime text/x-python + + # try: + # except: or finally: + # block + 0 search/4096 try: +->&0 regex \^\\s*except.*: Python script text executable ++>&0 regex \^\\s*except.*: Python script text + !:mime text/x-python +->&0 search/4096 finally: Python script text executable ++>&0 search/4096 finally: Python script text !:mime text/x-python --- magic/Magdir/varied.script -+++ magic/Magdir/varied.script 2007-03-21 10:22:09.000000000 +0000 ++++ magic/Magdir/varied.script 2011-06-14 13:52:38.827926417 +0000 @@ -4,12 +4,12 @@ # varied.script: file(1) magic for various interpreter scripts - 0 string #!\ / a + 0 string/t #!\ / a ->3 string >\0 %s script text executable +>3 string >\0 %s script text - 0 string #!\t/ a + 0 string/t #!\t/ a ->3 string >\0 %s script text executable +>3 string >\0 %s script text - 0 string #!/ a + 0 string/t #!/ a ->2 string >\0 %s script text executable --0 string #!\ script text executable +-0 string/t #!\ script text executable +>2 string >\0 %s script text -+0 string #!\ script text ++0 string/t #!\ script text >3 string >\0 for %s # From: arno ++++++ file-5.03-iso9660.dif -> file-5.07-iso9660.dif ++++++ --- file/file-5.03-iso9660.dif 2009-10-27 17:06:27.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-iso9660.dif 2011-06-14 19:53:38.000000000 +0200 @@ -1,7 +1,7 @@ --- magic/Magdir/filesystems -+++ magic/Magdir/filesystems 2009-10-27 16:55:38.087429836 +0100 -@@ -1198,6 +1198,7 @@ - 32769 string CD001 ++++ magic/Magdir/filesystems 2009-10-27 15:55:38.000000000 +0000 +@@ -1236,6 +1236,7 @@ + 32769 string CD001 # !:mime application/x-iso9660-image >38913 string !NSR0 ISO 9660 CD-ROM filesystem data +!:mime application/x-iso9660-image ++++++ file-5.04-llvm.dif -> file-5.07-llvm.dif ++++++ --- file/file-5.04-llvm.dif 2010-04-19 16:19:22.000000000 +0200 +++ /mounts/work_src_done/STABLE/file/file-5.07-llvm.dif 2011-06-14 19:53:39.000000000 +0200 @@ -1,9 +1,11 @@ --- magic/Magdir/llvm -+++ magic/Magdir/llvm 2010-04-19 14:13:15.518924957 +0000 -@@ -9,3 +9,6 @@ ++++ magic/Magdir/llvm 2010-04-19 14:13:16.000000000 +0000 +@@ -9,5 +9,8 @@ 0 string llvc0 LLVM byte-codes, null compression 0 string llvc1 LLVM byte-codes, gzip compression 0 string llvc2 LLVM byte-codes, bzip2 compression + +0 string BC\xc0\xde LLVM bitcode +0 string \xde\xc0\x17\x0b LLVM bitcode, wrapper + 0 string \xde\xc0\x17\x0b LLVM bitcode, wrapper + 0 string BC\xc0\xde LLVM bitcode ++++++ file-5.02-misc.dif -> file-5.07-misc.dif ++++++ --- file/file-5.02-misc.dif 2010-02-05 17:16:26.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-misc.dif 2011-06-14 19:53:40.000000000 +0200 @@ -1,15 +1,6 @@ --- magic/Magdir/audio -+++ magic/Magdir/audio 2008-04-14 16:17:59.000000000 +0200 -@@ -116,7 +116,7 @@ - # Real Audio (Magic .ra\0375) - 0 belong 0x2e7261fd RealAudio sound file - !:mime audio/x-pn-realaudio --0 string .RMF RealMedia file -+0 string .RMF\0\0\0 RealMedia file - !:mime application/vnd.rn-realmedia - #video/x-pn-realvideo - #video/vnd.rn-realvideo -@@ -127,7 +127,7 @@ ++++ magic/Magdir/audio 2008-04-14 14:17:59.000000000 +0000 +@@ -129,7 +129,7 @@ # Oct 31, 1995 # fixed by 2003-06-24 # Too short... @@ -19,8 +10,8 @@ #0 string JN Composer 669 Module sound data (extended format) 0 string MAS_U ULT(imate) Module sound data --- magic/Magdir/bsdi -+++ magic/Magdir/bsdi 2003-12-08 17:50:03.000000000 +0100 -@@ -19,7 +19,7 @@ ++++ magic/Magdir/bsdi 2003-12-08 16:50:03.000000000 +0000 +@@ -21,7 +21,7 @@ >32 byte 0x6a (uses shared libs) # same as in SunOS 4.x, except for static shared libraries @@ -29,7 +20,7 @@ >0 byte &0x80 >>20 belong <4096 shared library >>20 belong =4096 dynamically linked executable -@@ -28,13 +28,13 @@ +@@ -30,13 +30,13 @@ >16 belong >0 not stripped >36 belong 0xb4100001 (uses shared libs) @@ -45,33 +36,9 @@ >0 byte &0x80 dynamically linked executable >0 byte ^0x80 executable >16 belong >0 not stripped ---- magic/Magdir/commands -+++ magic/Magdir/commands 2009-05-05 13:57:30.778196178 +0200 -@@ -12,6 +12,8 @@ - !:mime text/x-shellscript - 0 string/w #!\ /bin/tcsh Tenex C shell script text executable - !:mime text/x-shellscript -+0 string/w #!\ /usr/bin/tcsh Tenex C shell script text executable -+!:mime text/x-shellscript - 0 string/w #!\ /usr/local/tcsh Tenex C shell script text executable - !:mime text/x-shellscript - 0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text executable -@@ -54,7 +56,11 @@ - 0 string/w #!\ /bin/rc Plan 9 rc shell script text executable - - # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) --0 string/w #!\ /bin/bash Bourne-Again shell script text executable -+0 string/w #!\ /bin/bash Bourne-Again shell script text executable -+!:mime text/x-shellscript -+0 string/w #!\ /usr/bin/bash Bourne-Again shell script text executable -+!:mime text/x-shellscript -+0 string/w #!\ /usr/local/bash Bourne-Again shell script text executable - !:mime text/x-shellscript - 0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text executable - !:mime text/x-shellscript --- magic/Magdir/mach -+++ magic/Magdir/mach 2003-12-08 17:50:03.000000000 +0100 -@@ -74,7 +74,7 @@ ++++ magic/Magdir/mach 2003-12-08 16:50:03.000000000 +0000 +@@ -76,7 +76,7 @@ >4 belong 11 hppa >4 belong 12 acorn >4 belong 13 m88k @@ -80,20 +47,9 @@ >4 belong 15 i860-big >4 belong 16 i860 >4 belong 17 rs6000 ---- magic/Magdir/msdos -+++ magic/Magdir/msdos 2005-07-25 15:24:04.000000000 +0200 -@@ -271,7 +271,7 @@ - - # a few unknown ZIP sfxes, no idea if they are needed or if they are - # already captured by the generic patterns above -->122 string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive -+>0x7a string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive - >(8.s*16) search/0x20 PKSFX \b, ZIP self-extracting archive (PKZIP) - # TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive - # --- magic/Magdir/netbsd -+++ magic/Magdir/netbsd 2003-12-08 17:50:03.000000000 +0100 -@@ -101,25 +101,25 @@ ++++ magic/Magdir/netbsd 2003-12-08 16:50:03.000000000 +0000 +@@ -102,25 +102,25 @@ 0 belong&0377777777 045200507 a.out NetBSD/powerpc core >12 string >\0 from '%s' @@ -124,8 +80,8 @@ >32 belong !0 (signal %d) --- magic/Magdir/sun -+++ magic/Magdir/sun 2006-11-22 15:49:20.000000000 +0100 -@@ -5,7 +5,7 @@ ++++ magic/Magdir/sun 2006-11-22 14:49:20.000000000 +0000 +@@ -6,7 +6,7 @@ # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x # releases. (5.x uses ELF.) # @@ -134,7 +90,7 @@ >0 byte &0x80 >>20 belong <4096 shared library >>20 belong =4096 dynamically linked executable -@@ -13,12 +13,12 @@ +@@ -14,12 +14,12 @@ >0 byte ^0x80 executable >16 belong >0 not stripped ++++++ file-5.02-option.dif -> file-5.07-option.dif ++++++ --- file/file-5.02-option.dif 2009-05-05 14:43:39.000000000 +0200 +++ /mounts/work_src_done/STABLE/file/file-5.07-option.dif 2011-06-14 19:53:41.000000000 +0200 @@ -1,6 +1,6 @@ --- src/file.c -+++ src/file.c 2009-05-05 14:05:15.133901855 +0200 -@@ -214,6 +214,8 @@ main(int argc, char *argv[]) ++++ src/file.c 2009-05-05 12:05:15.000000000 +0000 +@@ -195,6 +195,8 @@ main(int argc, char *argv[]) flags |= MAGIC_DEBUG|MAGIC_CHECK; break; case 'e': @@ -9,7 +9,7 @@ for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++) if (strcmp(nv[i].name, optarg) == 0) break; -@@ -225,7 +227,7 @@ main(int argc, char *argv[]) +@@ -206,7 +208,7 @@ main(int argc, char *argv[]) break; case 'f': @@ -18,7 +18,7 @@ usage(); if (magic == NULL) if ((magic = load(magicfile, flags)) == NULL) -@@ -234,6 +236,8 @@ main(int argc, char *argv[]) +@@ -215,6 +217,8 @@ main(int argc, char *argv[]) ++didsomefiles; break; case 'F': @@ -27,8 +27,8 @@ separator = optarg; break; case 'i': -@@ -243,6 +247,8 @@ main(int argc, char *argv[]) - flags |= MAGIC_CONTINUE; +@@ -227,6 +231,8 @@ main(int argc, char *argv[]) + action = FILE_LIST; break; case 'm': + if (!optarg) ++++++ file-5.04-visibility.patch -> file-5.07-visibility.patch ++++++ --- file/file-5.04-visibility.patch 2010-11-05 23:44:03.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-visibility.patch 2011-06-14 19:53:41.000000000 +0200 @@ -1,17 +1,17 @@ ---- src/Makefile.am.orig -+++ src/Makefile.am +--- src/Makefile.am ++++ src/Makefile.am 2011-06-14 14:05:18.691926054 +0000 @@ -11,7 +11,7 @@ libmagic_la_SOURCES = magic.c apprentice encoding.c compress.c is_tar.c readelf.c print.c fsmagic.c \ - funcs.c file.h names.h patchlevel.h readelf.h tar.h apptype.c \ + funcs.c file.h names.h readelf.h tar.h apptype.c \ file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h -libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0 +libmagic_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmagic.map -no-undefined -version-info 1:0:0 - libmagic_la_LIBADD = $(LTLIBOBJS) - - file_SOURCES = file.c ---- /dev/null -+++ src/libmagic.map -@@ -0,0 +1,16 @@ + if MINGW + MINGWLIBS = -lgnurx -lshlwapi + else +--- src/libmagic.map ++++ src/libmagic.map 2011-06-14 00:00:00.000000000 +0000 +@@ -0,0 +1,17 @@ +{ +global: + magic_buffer; @@ -23,9 +23,9 @@ + magic_error; + magic_file; + magic_getpath; ++ magic_list; + magic_load; + magic_open; + magic_setflags; +local: *; +}; -\ No newline at end of file ++++++ file-5.04-zip2.0.dif -> file-5.07-zip2.0.dif ++++++ --- file/file-5.04-zip2.0.dif 2010-02-05 17:16:36.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07-zip2.0.dif 2011-06-14 19:53:43.000000000 +0200 @@ -1,13 +1,13 @@ --- magic/Magdir/archive -+++ magic/Magdir/archive 2010-02-05 15:43:36.517302304 +0000 -@@ -581,6 +581,10 @@ - !:mime application/zip - >>4 byte 0x14 Zip archive data, at least v2.0 to extract ++++ magic/Magdir/archive 2010-02-05 15:43:37.000000000 +0000 +@@ -564,6 +564,10 @@ + # PKZIP multi-volume archive + 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract !:mime application/zip +>>30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to extract +>>>34 ubelong 0x74797065 \b, mime type +>>>>38 regex application/[a-z\+\-]+ \b %s +!:mime application/unknown+zip - # OpenOffice.org / KOffice / StarOffice documents - # Listed here because they ARE zip files + # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) + 0 string PK\003\004 ++++++ file-4.16-python.dif -> file-5.07.dif ++++++ --- file/file-4.16-python.dif 2007-12-06 00:11:22.000000000 +0100 +++ /mounts/work_src_done/STABLE/file/file-5.07.dif 2011-06-14 19:53:44.000000000 +0200 @@ -1,13 +1,424 @@ ---- python/setup.py -+++ python/setup.py 2006-02-10 09:51:18.000000000 +0100 -@@ -3,8 +3,8 @@ - - magic_module = Extension('magic', - libraries = ['magic'], -- library_dirs = ['./','../','../src','/usr/lib/'], -- include_dirs = ['./','../','../src','/usr/include/'], -+ library_dirs = ['./','../','../src/.libs','/usr/lib/'], -+ include_dirs = ['./','../','../src/','/usr/include/'], - sources = ['py_magic.c']) +--- magic/Magdir/elf ++++ magic/Magdir/elf 2006-11-22 14:57:15.000000000 +0000 +@@ -102,7 +102,7 @@ + >>18 leshort 47 Renesas H8/300H, + >>18 leshort 48 Renesas H8S, + >>18 leshort 49 Renesas H8/500, +->>18 leshort 50 IA-64, ++>>18 leshort 50 IA-64 (Intel 64 bit architecture), + >>18 leshort 51 Stanford MIPS-X, + >>18 leshort 52 Motorola Coldfire, + >>18 leshort 53 Motorola M68HC12, +@@ -247,7 +247,7 @@ + >>18 beshort 47 Renesas H8/300H, + >>18 beshort 48 Renesas H8S, + >>18 beshort 49 Renesas H8/500, +->>18 beshort 50 IA-64, ++>>18 beshort 50 IA-64 (Intel 64 bit architecture), + >>18 beshort 51 Stanford MIPS-X, + >>18 beshort 52 Motorola Coldfire, + >>18 beshort 53 Motorola M68HC12, +--- magic/Magdir/linux ++++ magic/Magdir/linux 2009-05-05 12:25:21.000000000 +0000 +@@ -94,21 +94,43 @@ + # and Nicol�s Lichtmaier + # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 + # Linux kernel boot images (i386 arch) (Wolfram Kleff) +-514 string HdrS Linux kernel +->510 leshort 0xAA55 x86 boot executable +->>518 leshort >0x1ff +->>>529 byte 0 zImage, +->>>529 byte 1 bzImage, +->>>(526.s+0x200) string >\0 version %s, +->>498 leshort 1 RO-rootFS, +->>498 leshort 0 RW-rootFS, +->>508 leshort >0 root_dev 0x%X, +->>502 leshort >0 swap_dev 0x%X, +->>504 leshort >0 RAMdisksize %u KB, +->>506 leshort 0xFFFF Normal VGA +->>506 leshort 0xFFFE Extended VGA +->>506 leshort 0xFFFD Prompt for Videomode +->>506 leshort >0 Video mode %d ++514 string HdrS Linux ++>510 leshort 0xAA55 \b/x86 Kernel ++>510 leshort <0xAA55 Kernel ++>510 leshort >0xAA55 Kernel ++>518 leshort 0x0105 \b, Setup Version 0x105, zImage ++>518 leshort >0x0105 \b, Setup Version %#hx ++>>529 byte 0 \b, zImage ++>>529 byte 1 \b, bzImage ++>>>(526.s+0x205) byte 32 ++>>>>(526.s+0x200) string >\0 \b, Version %5.5s ++>>>(526.s+0x206) byte 32 ++>>>>(526.s+0x200) string >\0 \b, Version %6.6s ++>>>(526.s+0x207) byte 32 ++>>>>(526.s+0x200) string >\0 \b, Version %7.7s ++>>>(526.s+0x205) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %5.5s ++>>>(526.s+0x206) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %6.6s ++>>>(526.s+0x207) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %7.7s ++>>>(526.s+0x208) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %8.8s ++>>>(526.s+0x209) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %9.9s ++>>>(526.s+0x20a) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %10.10s ++>>>(526.s+0x20b) byte 45 ++>>>>(526.s+0x200) string >\0 \b, Version %11.11s ++>>498 leshort 1 \b, RO-rootFS ++>>498 leshort 0 \b, RW-rootFS ++>>508 leshort >0 \b, root_dev 0x%X ++>>502 leshort >0 \b, swap_dev 0x%X ++>>504 leshort >0 \b, RAMdisksize %u KB ++>>506 leshort 0xFFFF \b, Normal VGA ++>>506 leshort 0xFFFE \b, Extended VGA ++>>506 leshort 0xFFFD \b, Prompt for Videomode ++>>506 leshort >0 \b, Video mode %d + # This also matches new kernels, which were caught above by "HdrS". + 0 belong 0xb8c0078e Linux kernel + >0x1e3 string Loading version 1.3.79 or older +--- magic/Magdir/msad ++++ magic/Magdir/msad 2006-03-27 11:29:19.000000000 +0000 +@@ -0,0 +1,5 @@ ++#------------------------------------------------------------------------------ ++# msad: file(1) magic for msad ++# Microsoft visual C ++# This must precede the heuristic for raw G3 data ++4 string Standard\ Jet\ DB Microsoft Access Database +--- magic/Magdir/msdos ++++ magic/Magdir/msdos 2011-06-14 14:36:26.175926257 +0000 +@@ -98,9 +98,9 @@ + >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) + >>>(0x3c.l+22) leshort&0x1000 >0 system file + >>>(0x3c.l+24) leshort 0x010b +->>>>(0x3c.l+232) lelong >0 Mono/.Net assembly ++>>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly + >>>(0x3c.l+24) leshort 0x020b +->>>>(0x3c.l+248) lelong >0 Mono/.Net assembly ++>>>>(0x3c.l+248) lelong >0 \b, Mono/.Net assembly - setup (name = 'Magic file extensions', + # hooray, there's a DOS extender using the PE format, with a valid PE + # executable inside (which just prints a message and exits if run in win) +--- magic/Makefile.am ++++ magic/Makefile.am 2011-06-14 14:32:37.504427061 +0000 +@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir + MAGIC_DIR = $(top_srcdir)/magic + MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) + +-pkgdata_DATA = magic.mgc ++pkgdata_DATA = magic.mgc magic + + EXTRA_DIST = \ + $(MAGIC_DIR)/Header \ +@@ -19,7 +19,6 @@ $(MAGIC_FRAGMENT_DIR)/amanda \ + $(MAGIC_FRAGMENT_DIR)/amigaos \ + $(MAGIC_FRAGMENT_DIR)/animation \ + $(MAGIC_FRAGMENT_DIR)/apl \ +-$(MAGIC_FRAGMENT_DIR)/apple \ + $(MAGIC_FRAGMENT_DIR)/applix \ + $(MAGIC_FRAGMENT_DIR)/archive \ + $(MAGIC_FRAGMENT_DIR)/asterix \ +@@ -69,7 +68,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \ + $(MAGIC_FRAGMENT_DIR)/erlang \ + $(MAGIC_FRAGMENT_DIR)/esri \ + $(MAGIC_FRAGMENT_DIR)/fcs \ +-$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/flash \ + $(MAGIC_FRAGMENT_DIR)/fonts \ + $(MAGIC_FRAGMENT_DIR)/fortran \ +@@ -102,19 +100,19 @@ $(MAGIC_FRAGMENT_DIR)/ispell \ + $(MAGIC_FRAGMENT_DIR)/isz \ + $(MAGIC_FRAGMENT_DIR)/java \ + $(MAGIC_FRAGMENT_DIR)/jpeg \ ++$(MAGIC_FRAGMENT_DIR)/linux \ ++$(MAGIC_FRAGMENT_DIR)/filesystems \ + $(MAGIC_FRAGMENT_DIR)/karma \ + $(MAGIC_FRAGMENT_DIR)/kde \ + $(MAGIC_FRAGMENT_DIR)/kml \ + $(MAGIC_FRAGMENT_DIR)/lecter \ + $(MAGIC_FRAGMENT_DIR)/lex \ + $(MAGIC_FRAGMENT_DIR)/lif \ +-$(MAGIC_FRAGMENT_DIR)/linux \ + $(MAGIC_FRAGMENT_DIR)/lisp \ + $(MAGIC_FRAGMENT_DIR)/llvm \ + $(MAGIC_FRAGMENT_DIR)/lua \ + $(MAGIC_FRAGMENT_DIR)/luks \ + $(MAGIC_FRAGMENT_DIR)/mach \ +-$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/magic \ + $(MAGIC_FRAGMENT_DIR)/mail.news \ + $(MAGIC_FRAGMENT_DIR)/maple \ +@@ -131,10 +129,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ + $(MAGIC_FRAGMENT_DIR)/mkid \ + $(MAGIC_FRAGMENT_DIR)/mlssa \ + $(MAGIC_FRAGMENT_DIR)/mmdf \ +-$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/motorola \ + $(MAGIC_FRAGMENT_DIR)/mozilla \ + $(MAGIC_FRAGMENT_DIR)/msdos \ ++$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/msooxml \ + $(MAGIC_FRAGMENT_DIR)/msvc \ + $(MAGIC_FRAGMENT_DIR)/mup \ +@@ -173,6 +171,8 @@ $(MAGIC_FRAGMENT_DIR)/pyramid \ + $(MAGIC_FRAGMENT_DIR)/python \ + $(MAGIC_FRAGMENT_DIR)/revision \ + $(MAGIC_FRAGMENT_DIR)/riff \ ++$(MAGIC_FRAGMENT_DIR)/apple \ ++$(MAGIC_FRAGMENT_DIR)/macintosh \ + $(MAGIC_FRAGMENT_DIR)/rinex \ + $(MAGIC_FRAGMENT_DIR)/rpm \ + $(MAGIC_FRAGMENT_DIR)/rtf \ +@@ -238,8 +238,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \ + $(MAGIC_FRAGMENT_DIR)/zilog \ + $(MAGIC_FRAGMENT_DIR)/zyxel + ++RAW = magic + MAGIC = magic.mgc +-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff ++CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW} ++ ++${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST) ++ cat /dev/null > $@ ++ for frag in $(EXTRA_DIST); do \ ++ if test -f $(srcdir)/$$frag; then \ ++ f=$(srcdir)/$$frag; \ ++ else \ ++ f=$$frag; \ ++ fi; \ ++ cat $$f; \ ++ done >> $@ + + # FIXME: Build file natively as well so that it can be used to compile + # the target's magic file +@@ -251,8 +263,5 @@ FILE_COMPILE = $(top_builddir)/src/file + FILE_COMPILE_DEP = $(FILE_COMPILE) + endif + +-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) +- @rm -fr magic +- @mkdir magic && cp -p $(EXTRA_DIST) magic +- $(FILE_COMPILE) -C -m magic +- @rm -fr magic ++${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW) ++ $(FILE_COMPILE) -C -m $(RAW) +--- src/Makefile.am ++++ src/Makefile.am 2008-04-14 15:14:56.000000000 +0000 +@@ -1,4 +1,4 @@ +-MAGIC = $(pkgdatadir)/magic ++MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic + lib_LTLIBRARIES = libmagic.la + include_HEADERS = magic.h + +--- src/dcore.c ++++ src/dcore.c 2006-03-27 11:29:19.000000000 +0000 +@@ -0,0 +1,207 @@ ++/* ++ * Show goo about ELF core files ++ * Jeremy Fitzhardinge 1996 ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#if defined __GLIBC__ && __GLIBC__ >= 2 ++#include ++#include ++# ifndef NT_PRFPREG ++# define NT_PRFPREG 2 ++# endif ++# ifndef NT_TASKSTRUCT ++# define NT_TASKSTRUCT 4 ++# endif ++#else ++#include ++#include ++#endif ++ ++static void fperror(const char *str) ++{ ++ perror(str); ++ exit(1); ++} ++ ++static size_t myread(int fd, void *buf, size_t sz) ++{ ++ size_t ret; ++ ++ if ((ret = read(fd, buf, sz)) != sz) ++ fperror("read failed"); ++ return ret; ++} ++ ++static void print_prstatus(const prstatus_t *pr) ++{ ++ unsigned i; ++ static const char *regs[] = { "ebx", "ecx", "edx", "esi", "edi", "ebp", ++ "eax", "ds", "es", "fs", "gs", ++ "orig_eax", "eip", "cs", ++ "efl", "uesp", "ss"}; ++ ++ printf(" pid=%d ppid=%d pgrp=%d sid=%d\n", ++ pr->pr_pid, pr->pr_ppid, pr->pr_pgrp, pr->pr_sid); ++ for(i = 0; i < NGREG; i++) ++ { ++ unsigned long val = pr->pr_reg[i]; ++ printf(" %-2u %-5s=%08lx %lu\n", i, regs[i], val, val); ++ } ++} ++ ++static void print_prpsinfo(const prpsinfo_t *ps) ++{ ++ printf(" uid=%d gid=%d\n", ps->pr_uid, ps->pr_gid); ++ printf(" comm=%s\n", ps->pr_fname); ++ printf(" psargs=%s\n", ps->pr_psargs); ++} ++ ++#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) ++ ++static void do_note(int fd, Elf32_Phdr *phdr) ++{ ++ off_t here = lseek(fd, 0, SEEK_CUR); ++ int size = phdr->p_filesz; ++ char *raw = alloca(size), *end; ++ end = raw+size; ++ ++ lseek(fd, phdr->p_offset, SEEK_SET); ++ myread(fd, raw, size); ++ ++ while(raw < end) ++ { ++ Elf32_Nhdr *note = (Elf32_Nhdr *)raw; ++ const char *str; ++ const char *name, *desc; ++ ++ raw += sizeof(*note); ++ name = raw; ++ raw += roundup(note->n_namesz, sizeof(long)); ++ desc = raw; ++ raw += roundup(note->n_descsz, sizeof(long)); ++ ++ printf(" name=%.*s", (int)note->n_namesz, name); ++ ++ if(strncmp(name, "CORE", note->n_namesz) != 0) ++ { ++ printf("\n"); ++ continue; ++ } ++ ++ switch(note->n_type) ++ { ++#define X(x) case x: str = #x; break; ++ X(NT_PRSTATUS); ++ X(NT_PRFPREG); ++ X(NT_PRPSINFO); ++ X(NT_TASKSTRUCT); ++#undef X ++ default: ++ str = "???"; ++ } ++ printf(" n_type=%s n_descsz=%ld\n", ++ str, note->n_descsz); ++ switch(note->n_type) ++ { ++ case NT_PRSTATUS: ++ print_prstatus((prstatus_t *)desc); ++ break; ++ case NT_PRPSINFO: ++ print_prpsinfo((prpsinfo_t *)desc); ++ break; ++ } ++ } ++ lseek(fd, here, SEEK_SET); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int fd; ++ Elf32_Ehdr elf; ++ int i; ++ ++ if (argc != 2) ++ { ++ fprintf(stderr, "Usage: %s corefile\n", argv[0]); ++ exit(1); ++ } ++ ++ if ((fd = open(argv[1], O_RDONLY)) == -1) ++ fperror("open of core"); ++ ++ myread(fd, &elf, sizeof(elf)); ++ ++ if (memcmp(ELFMAG, elf.e_ident, SELFMAG) != 0) ++ printf("bad magic\n"); ++ ++ if (elf.e_ident[EI_CLASS] != ELFCLASS32) ++ printf("wrong class\n"); ++ ++ if (elf.e_ident[EI_DATA] != ELFDATA2LSB) ++ printf("wrong endianess\n"); ++ ++ if (elf.e_ident[EI_VERSION] != EV_CURRENT) ++ printf("wrong version\n"); ++ ++ { ++ const char *str; ++ switch(elf.e_type) ++ { ++#define C(x) case ET_##x: str = #x; break; ++ C(NONE); ++ C(REL); ++ C(EXEC); ++ C(DYN); ++ C(CORE); ++#undef C ++ default: str = "???"; break; ++ } ++ printf("elf file type ET_%s\n", str); ++ } ++ ++ if (elf.e_machine != EM_386 && elf.e_machine != EM_486) ++ printf("not i386 or i486\n"); ++ ++ if (elf.e_ehsize != sizeof(elf)) ++ printf("wrong header size\n"); ++ ++ if (elf.e_phentsize != sizeof(Elf32_Phdr)) ++ printf("wrong phdr size\n"); ++ ++ if (lseek(fd, elf.e_phoff, SEEK_SET) != (off_t)elf.e_phoff) ++ fperror("lseek to phdr failed\n"); ++ ++ for(i = 0; i < elf.e_phnum; i++) ++ { ++ Elf32_Phdr phdr; ++ const char *str; ++ ++ myread(fd, &phdr, sizeof(phdr)); ++ switch(phdr.p_type) ++ { ++#define C(x) case PT_##x: str = #x; break; ++ C(NULL); ++ C(LOAD); ++ C(DYNAMIC); ++ C(INTERP); ++ C(NOTE); ++ C(SHLIB); ++ C(PHDR); ++#undef C ++ default: ++ str = "???"; break; ++ } ++ printf("type PT_%s off=%ld vaddr=%lx filesz=%ld flags=%lx\n", ++ str, phdr.p_offset, phdr.p_vaddr, phdr.p_filesz, ++ (unsigned long)phdr.p_flags); ++ if (phdr.p_type == PT_NOTE) ++ do_note(fd, &phdr); ++ } ++ exit(0); ++} ++ ++++++ file-5.04.tar.bz2 -> file-5.07.tar.bz2 ++++++ ++++ 69234 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
4701
Age (days ago)
4701
Last active (days ago)
0 comments
1 participants
participants (1)
-
root@hilbert.suse.de