Dr. Werner Fink 2016-04-19 11:50:56 +00:00 committed by Git OBS Bridge
parent feb479a363
commit 995f5da2da
4 changed files with 62 additions and 1 deletions

11
file-5.26-console.diff Normal file
View File

@ -0,0 +1,11 @@
--- file-5.26/magic/Magdir/console.old 2016-03-23 16:29:20.000000000 +0100
+++ file-5.26/magic/Magdir/console 2016-04-18 21:33:02.279350392 +0200
@@ -53,7 +53,7 @@
# so most of the data isn't easily parseable.
#
0 string UNIF
-4 lelong <16 UNIF v%d format NES ROM image
+>4 lelong <16 UNIF v%d format NES ROM image
#------------------------------------------------------------------------------
# gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format

41
file-5.26-zmagic.patch Normal file
View File

@ -0,0 +1,41 @@
---
src/compress.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- file-5.26/src/compress.c
+++ file-5.26/src/compress.c 2016-04-19 11:44:03.297654887 +0200
@@ -231,9 +231,9 @@ file_zmagic(struct magic_set *ms, int fd
goto error;
DPRINTF("rv = %d\n", rv);
if ((ms->flags & MAGIC_COMPRESS_TRANSP) != 0)
- goto out;
+ break;
if (mime != MAGIC_MIME && mime != 0)
- goto out;
+ break;
if ((file_printf(ms,
mime ? " compressed-encoding=" : " (")) == -1)
goto error;
@@ -250,16 +250,16 @@ file_zmagic(struct magic_set *ms, int fd
}
if (!mime && file_printf(ms, ")") == -1)
goto error;
- goto out;
case NODATA:
- goto out;
+ break;
default:
- abort();
+ error:
+ rv = -1;
+ break;
}
}
-out:
- rv = 1;
-error:
+ DPRINTF("rv = %d\n", rv);
+
#ifdef HAVE_SIGNAL_H
(void)signal(SIGPIPE, osigpipe);
#endif

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 19 09:38:07 UTC 2016 - werner@suse.de
- Add upstream patch file-5.26-console.diff
to fix wrong detection of UNIF edb files
-------------------------------------------------------------------
Tue Apr 19 09:35:28 UTC 2016 - werner@suse.de

View File

@ -65,6 +65,8 @@ Patch36: file-5.15-clear-invalid.patch
Patch37: file-secure_getenv.patch
Patch38: file-5.26-version.patch
Patch39: file-5.26-downgrade_DER.patch
Patch40: file-5.26-console.diff
Patch40: file-5.26-zmagic.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _miscdir %{_datadir}/misc
@ -129,6 +131,8 @@ to develop applications that require the magic "file" interface.
%patch37 -p1 -b .getenv
%patch38 -p1 -b .php
%patch39 -p0 -b .DER
%patch40 -p1 -b .cons
%patch41 -p1 -b .zmag
%patch -b .0
test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in
rm -fv src/magic.h
@ -161,7 +165,6 @@ echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysc
LD_LIBRARY_PATH=%{buildroot}%{_libdir}
export LD_LIBRARY_PATH
find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \
grep -v tests/data/bom.py | \
xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
unset LD_LIBRARY_PATH
%{__rm} -f %{buildroot}%{_libdir}/*.la