diff --git a/file-localmagic.patch b/file-localmagic.patch index f96b7e7..69f26ca 100644 --- a/file-localmagic.patch +++ b/file-localmagic.patch @@ -41,6 +41,20 @@ index 39b1703..3dd92d8 100644 lib_LTLIBRARIES = libmagic.la include_HEADERS = magic.h AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' +diff --git a/src/apprentice.c b/src/apprentice.c +index b330669..0490642 100644 +--- a/src/apprentice.c ++++ b/src/apprentice.c +@@ -281,7 +281,7 @@ apprentice_1(struct magic_set *ms, const char *fn, int action, + + #ifndef COMPILE_ONLY + if ((rv = apprentice_map(ms, &magic, &nmagic, fn)) == -1) { +- if (ms->flags & MAGIC_CHECK) ++ if (ms->flags & MAGIC_CHECK && strcmp("/etc/magic", fn) != 0) + file_magwarn(ms, "using regular magic file `%s'", fn); + rv = apprentice_load(ms, &magic, &nmagic, fn, action); + if (rv != 0) + -- 1.7.7.4 diff --git a/file.spec b/file.spec index bf4df7a..f3665b6 100644 --- a/file.spec +++ b/file.spec @@ -5,7 +5,7 @@ Summary: A utility for determining file types Name: file Version: 5.10 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -152,6 +152,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Jan 03 2012 Jan Kaluza - 5.10-3 +- fix #771292 - do not show 'using regular magic file' warning for /etc/magic, + because this file is not supposed to be compiled + * Mon Jan 02 2012 Jan Kaluza - 5.10-2 - fix #770006 - detect tnef files