[file/f13/master] - fix #626591 - support for WebM format - fix #599695 - try to get "from" attribute for ELF binaries
Jan Kaluža
jkaluza at fedoraproject.org
Tue Aug 24 09:13:56 UTC 2010
commit 7ef30d32f9fa9f1ae06a6d576d0d044bc880f001
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Tue Aug 24 11:13:53 2010 +0200
- fix #626591 - support for WebM format
- fix #599695 - try to get "from" attribute for ELF binaries
only from core dumps.
file-5.04-core-prpsinfo.patch | 33 +++++++++++++++++++++++++++++++++
file-5.04-webm.patch | 16 ++++++++++++++++
file.spec | 11 ++++++++++-
3 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/file-5.04-core-prpsinfo.patch b/file-5.04-core-prpsinfo.patch
new file mode 100644
index 0000000..a68e935
--- /dev/null
+++ b/file-5.04-core-prpsinfo.patch
@@ -0,0 +1,33 @@
+diff --git a/src/elfclass.h b/src/elfclass.h
+index 27817d0..7f3da86 100644
+--- a/src/elfclass.h
++++ b/src/elfclass.h
+@@ -35,6 +35,7 @@
+ switch (type) {
+ #ifdef ELFCORE
+ case ET_CORE:
++ flags |= FLAGS_IS_CORE;
+ if (dophn_core(ms, clazz, swap, fd,
+ (off_t)elf_getu(swap, elfhdr.e_phoff),
+ elf_getu16(swap, elfhdr.e_phnum),
+diff --git a/src/readelf.c b/src/readelf.c
+index 5915569..24aa28c 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -286,6 +286,7 @@ private const char os_style_names[][8] = {
+ #define FLAGS_DID_CORE 1
+ #define FLAGS_DID_NOTE 2
+ #define FLAGS_DID_CORE_STYLE 4
++#define FLAGS_IS_CORE 8
+
+ private int
+ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
+@@ -676,7 +677,7 @@ core:
+ break;
+
+ default:
+- if (xnh_type == NT_PRPSINFO) {
++ if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
+ size_t i, j;
+ unsigned char c;
+ /*
diff --git a/file-5.04-webm.patch b/file-5.04-webm.patch
new file mode 100644
index 0000000..f8b77ac
--- /dev/null
+++ b/file-5.04-webm.patch
@@ -0,0 +1,16 @@
+diff --git a/magic/Magdir/matroska b/magic/Magdir/matroska
+index 0ede715..d3d7349 100644
+--- a/magic/Magdir/matroska
++++ b/magic/Magdir/matroska
+@@ -13,3 +13,11 @@
+ # DocType contents:
+ >>8 string matroska Matroska data
+ !:mime video/x-matroska
++
++# EBML id:
++0 belong 0x1a45dfa3
++# DocType id:
++>0 search/4096 \x42\x82
++# DocType contents:
++>>&1 string webm WebM
++!:mime video/webm
diff --git a/file.spec b/file.spec
index 6a510ed..1f146a3 100644
--- a/file.spec
+++ b/file.spec
@@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.04
-Release: 5%{?dist}
+Release: 6%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -18,6 +18,8 @@ Patch4: file-5.04-ruby-modules.patch
Patch5: file-5.04-core-trim.patch
Patch6: file-5.04-html-regression.patch
Patch7: file-5.04-zmachine-magic-update.patch
+Patch8: file-5.04-core-prpsinfo.patch
+Patch9: file-5.04-webm.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -83,6 +85,8 @@ file(1) command.
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@@ -159,6 +163,11 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Tue Aug 24 2010 Jan Kaluza <jkaluza at redhat.com> - 5.04-6
+- fix #626591 - support for WebM format
+- fix #599695 - try to get "from" attribute for ELF binaries
+ only from core dumps.
+
* Thu Jul 01 2010 Jan Kaluza <jkaluza at redhat.com> 5.04-5
- fix #608922 - updated z-machine magic
- fix #610067 - removed excessive HTML/SGML "magic patterns"
More information about the scm-commits
mailing list