[file] - fix #670319 - update to new upstream release 5.05 - removed useless patches

Jan Kaluža jkaluza at fedoraproject.org
Tue Jan 18 13:29:15 UTC 2011


commit 8319e9c4a42443589ccaece4d33b784485c94045
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Tue Jan 18 14:29:04 2011 +0100

    - fix #670319 - update to new upstream release 5.05
    - removed useless patches

 .gitignore                   |    1 +
 file-5.04-zip64.patch        |   21 +++++++------
 file-5.05-python-magic.patch |   32 +++++++++++++++++++
 file.spec                    |   68 ++++++++---------------------------------
 sources                      |    2 +-
 5 files changed, 59 insertions(+), 65 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1ca5daa..df6190a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 file-5.04.tar.gz
+/file-5.05.tar.gz
diff --git a/file-5.04-zip64.patch b/file-5.04-zip64.patch
index 89b5a18..e4115ee 100644
--- a/file-5.04-zip64.patch
+++ b/file-5.04-zip64.patch
@@ -1,11 +1,12 @@
---- file-5.04/magic/Magdir/archive	2010-09-27 17:52:19.242245630 +0530
-+++ file-5.04/magic/Magdir/archive	2010-09-27 17:52:12.015252938 +0530
-@@ -581,6 +581,8 @@
- !:mime	application/zip
- >>4	byte		0x14		Zip archive data, at least v2.0 to extract
- !:mime	application/zip
-+>>4     byte            0x2d            Zip64 archive data, at least v3.0 to extract
-+!:mime  application/zip
+diff --git a/magic/Magdir/archive b/magic/Magdir/archive
+index c998e5b..4da532a 100644
+--- a/magic/Magdir/archive
++++ b/magic/Magdir/archive
+@@ -688,6 +688,7 @@
+ >>4	byte		0x0b		\b, at least v1.1 to extract
+ >>0x161	string		WINZIP		\b, WinZIP self-extracting
+ >>4	byte		0x14		\b, at least v2.0 to extract
++>>4     byte            0x2d            Zip64, at least v3.0 to extract
  
- # OpenOffice.org / KOffice / StarOffice documents
- # Listed here because they ARE zip files
+ # Zoo archiver
+ 20	lelong		0xfdc4a7dc	Zoo archive data
diff --git a/file-5.05-python-magic.patch b/file-5.05-python-magic.patch
new file mode 100644
index 0000000..3ced837
--- /dev/null
+++ b/file-5.05-python-magic.patch
@@ -0,0 +1,32 @@
+diff --git a/python/magic.py b/python/magic.py
+index 35a7182..1cfc035 100644
+--- a/python/magic.py
++++ b/python/magic.py
+@@ -19,17 +19,17 @@ _libraries = {}
+ _libraries['magic'] = _init()
+ 
+ # Flag constants for open and setflags
+-NONE = 0
+-DEBUG = 1
+-SYMLINK = 2
+-COMPRESS = 4
+-DEVICES = 8
+-MIME_TYPE = 16
+-CONTINUE = 32
+-CHECK = 64
+-PRESERVE_ATIME = 128
++NONE = MAGIC_NONE = 0
++DEBUG = MAGIC_DEBUG = 1
++SYMLINK = MAGIC_SYMLINK = 2
++COMPRESS = MAGIC_COMPRESS = 4
++DEVICES = MAGIC_DEVICES = 8
++MIME_TYPE = MAGIC_MIME = 16
++CONTINUE = MAGIC_CONTINUE = 32
++CHECK = MAGIC_CHECK = 64
++PRESERVE_ATIME = MAGIC_PRESERVE_ATIME = 128
+ RAW = 256
+-ERROR = 512
++ERROR = MAGIC_ERROR = 512
+ MIME_ENCODING = 1024
+ MIME = 1040
+ APPLE = 2048
diff --git a/file.spec b/file.spec
index f307695..cbf2279 100644
--- a/file.spec
+++ b/file.spec
@@ -4,31 +4,14 @@
 
 Summary: A utility for determining file types
 Name: file
-Version: 5.04
-Release: 18%{?dist}
+Version: 5.05
+Release: 1%{?dist}
 License: BSD
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
 URL: http://www.darwinsys.com/file/
-Patch0: file-4.21-pybuild.patch
-Patch1: file-5.00-devdrv.patch
-Patch2: file-5.00-mdmp.patch
-Patch3: file-5.04-ulaw-segfault.patch
-Patch4: file-5.04-ruby-modules.patch
-Patch5: file-5.04-filesystem.patch
-Patch6: file-5.04-separ.patch
-Patch7: file-5.04-squashfs.patch
-Patch8: file-5.04-core-trim.patch
-Patch9: file-5.04-retval.patch
-Patch10: file-5.04-html-regression.patch
-Patch11: file-5.04-zmachine-magic-update.patch
-Patch12: file-5.04-core-prpsinfo.patch
-Patch13: file-5.04-python-2.7.patch
-Patch14: file-5.04-webm.patch
-Patch15: file-5.04-zip64.patch
-Patch16: file-5.04-string-size.patch
-Patch17: file-5.04-com32r.patch
-Patch18: file-5.04-gfs.patch
+Patch1: file-5.04-zip64.patch
+Patch2: file-5.05-python-magic.patch
 
 Requires: file-libs = %{version}-%{release}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -82,39 +65,10 @@ file(1) command.
 
 # Don't use -b -- it will lead to poblems when compiling magic file
 %setup -q
-%patch0 -p1
-#fixes #463809
+#fixes #637785
 %patch1 -p1
-#fixes #485835
+#keeps compatibility with older python-magic versions
 %patch2 -p1
-#fixes #533245
-%patch3 -p1
-#fixes #562840
-%patch4 -p1
-#fixes #570785
-%patch5 -p1
-#fixes #575184
-%patch6 -p1
-#fixes #550212
-%patch7 -p1
-#fixes #566305
-%patch8 -p1
-#fixes #603040
-%patch10 -p1
-#fixes #608922
-%patch11 -p1
-#fixes #599695
-%patch12 -p1
-#fixes #623602
-%patch13 -p1
-#fixes #626591
-%patch14 -p1
-#fixes #637785
-%patch15 -p1
-#fixes #656395
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
 
 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
 touch -r doc/libmagic.man doc/libmagic.man_
@@ -186,12 +140,18 @@ rm -rf $RPM_BUILD_ROOT
 %files -n python-magic
 %defattr(-, root, root, -)
 %doc python/README COPYING python/example.py
-%{python_sitearch}/magic.so
+%{python_sitelib}/magic.py
+%{python_sitelib}/magic.pyc
+%{python_sitelib}/magic.pyo
 %if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
-%{python_sitearch}/*egg-info
+%{python_sitelib}/*egg-info
 %endif
 
 %changelog
+* Tue Jan 18 2011 Jan Kaluza <jkaluza at redhat.com> - 5.05-1
+- fix #670319 - update to new upstream release 5.05
+- removed useless patches
+
 * Mon Jan 10 2011 Jan Kaluza <jkaluza at redhat.com> - 5.04-18
 - fix #668304 - support for com32r programs
 - distinguish between GFS2 and GFS1 filesystems
diff --git a/sources b/sources
index 8b820ed..0cbab0e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-accade81ff1cc774904b47c72c8aeea0  file-5.04.tar.gz
+0b429063710457be2bd17a18389cb018  file-5.05.tar.gz


More information about the scm-commits mailing list