[file] fix #1134580 - detect Mach-O universal binary

Jan Kaluža jkaluza at fedoraproject.org
Wed Sep 3 09:38:20 UTC 2014


commit 7da30d32923fecf185e6f50022929d1500f8b955
Author: Jan Kaluza <jkaluza at redhat.com>
Date:   Wed Sep 3 11:38:09 2014 +0200

    fix #1134580 - detect Mach-O universal binary

 file-5.19-cafebabe.patch |   44 ++++++++++++++++++++++++++++++++++++++++++++
 file.spec                |    7 ++++++-
 2 files changed, 50 insertions(+), 1 deletions(-)
---
diff --git a/file-5.19-cafebabe.patch b/file-5.19-cafebabe.patch
new file mode 100644
index 0000000..a410d22
--- /dev/null
+++ b/file-5.19-cafebabe.patch
@@ -0,0 +1,44 @@
+diff --git a/magic/Magdir/cafebabe b/magic/Magdir/cafebabe
+index b3206e7..271250b 100644
+--- a/magic/Magdir/cafebabe
++++ b/magic/Magdir/cafebabe
+@@ -15,20 +15,6 @@
+ # might add another one or two as time goes by...
+ #
+ ### JAVA START ###
+-0	belong		0xcafebabe
+->4	belong		>30		compiled Java class data,
+-!:mime	application/x-java-applet
+->>6	beshort		x	        version %d.
+->>4	beshort		x       	\b%d
+-# Which is which?
+-#>>4	belong		0x032d		(Java 1.0)
+-#>>4	belong		0x032d		(Java 1.1)
+->>4	belong		0x002e		(Java 1.2)
+->>4	belong		0x002f		(Java 1.3)
+->>4	belong		0x0030		(Java 1.4)
+->>4	belong		0x0031		(Java 1.5)
+->>4	belong		0x0032		(Java 1.6)
+-
+ 0	belong		0xcafed00d	JAR compressed with pack200,
+ >5	byte		x		version %d.
+ >4	byte		x		\b%d
+@@ -51,6 +37,18 @@
+ 0	belong		0xcafebabe
+ >4	belong		1		Mach-O universal binary with 1 architecture:
+ >>8	use		mach-o		\b
++>4  belong      >30     compiled Java class data,
++!:mime  application/x-java-applet
++>>6 beshort     x           version %d.
++>>4 beshort     x           \b%d
++# Which is which?
++#>>4    belong      0x032d      (Java 1.0)
++#>>4    belong      0x032d      (Java 1.1)
++>>4 belong      0x002e      (Java 1.2)
++>>4 belong      0x002f      (Java 1.3)
++>>4 belong      0x0030      (Java 1.4)
++>>4 belong      0x0031      (Java 1.5)
++>>4 belong      0x0032      (Java 1.6)
+ >4	belong		>1
+ >>4	belong		<20		Mach-O universal binary with %d architectures:
+ >>>8	use		mach-o		\b
diff --git a/file.spec b/file.spec
index b24f2f9..f9765da 100644
--- a/file.spec
+++ b/file.spec
@@ -4,7 +4,7 @@
 Summary: A utility for determining file types
 Name: file
 Version: 5.19
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: BSD
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -23,6 +23,7 @@ Patch10: file-5.19-pascal.patch
 Patch11: file-5.19-locale-archive.patch
 Patch12: file-5.19-msooxml.patch
 Patch13: file-5.19-python-3.4.patch
+Patch14: file-5.19-cafebabe.patch
 URL: http://www.darwinsys.com/file/
 Requires: file-libs = %{version}-%{release}
 BuildRequires: zlib-devel
@@ -96,6 +97,7 @@ file(1) command.
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 # Patches can generate *.orig files, which can't stay in the magic dir,
 # otherwise there will be problems with compiling magic file!
@@ -204,6 +206,9 @@ cd %{py3dir}
 %endif
 
 %changelog
+* Wed Sep 03 2014 Jan Kaluza <jkaluza at redhat.com> - 5.19-6
+- fix #1134580 - detect Mach-O universal binary
+
 * Wed Sep 03 2014 Jan Kaluza <jkaluza at redhat.com> - 5.19-5
 - fix #1101404 - remove weak Pascal patterns
 - fix #1107995 - detect locale-archive


More information about the scm-commits mailing list