diff --git a/10.diff b/10.diff new file mode 100644 index 0000000..2a615d9 --- /dev/null +++ b/10.diff @@ -0,0 +1,17 @@ +diff --git a/Unpack.pm b/Unpack.pm +index d5354ac..69ef617 100644 +--- a/Unpack.pm ++++ b/Unpack.pm +@@ -2301,7 +2301,11 @@ sub mime + + ## flm can say 'cannot open \'IP\' (No such file or directory)' + ## flm can say 'CDF V2 Document, corrupt: Can\'t read SAT' (application/vnd.ms-excel) +- my $mime1 = $flm->checktype_contents($in{buf}); ++ my $mime1 = eval { $flm->checktype_contents($in{buf}) }; ++ if ($@) { ++ warn $@; ++ return [ 'x-system/x-error', undef, "libmimemagic exception"]; ++ } + if ($mime1 =~ m{, corrupt: } or $mime1 =~ m{^application/octet-stream\b}) + { + # application/x-iso9660-image is reported as application/octet-stream if the buffer is short. diff --git a/9.diff b/9.diff new file mode 100644 index 0000000..8ecf275 --- /dev/null +++ b/9.diff @@ -0,0 +1,12 @@ +diff --git a/Makefile.PL b/Makefile.PL +index 8c08daa..eb9264f 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -55,6 +55,7 @@ sub MY::postamble + return q{ + file_unpack: file_unpack.pl Makefile + $(CP) file_unpack.pl $@ ++ mkdir -p $(INST_MAN1DIR) + ## wait, so that -M < -M succeeds in ExtUtils/Command/MM.pm + (sleep 1; echo .nf; $(PERL) $@ --help) > $(INST_MAN1DIR)/$@.1 || true + }; diff --git a/perl-File-Unpack-fix-race.patch b/perl-File-Unpack-fix-race.patch deleted file mode 100644 index cbecf31..0000000 --- a/perl-File-Unpack-fix-race.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://github.com/jnweiger/perl-File-Unpack/pull/9 -https://rt.cpan.org/Public/Bug/Display.html?id=124916 - -Date: 2018-03-26 -Author: Bernhard M. Wiedemann - -Without this patch, it was -randomly missing a man-page part - -Index: File-Unpack-0.70/Makefile.PL -=================================================================== ---- File-Unpack-0.70.orig/Makefile.PL -+++ File-Unpack-0.70/Makefile.PL -@@ -55,6 +55,7 @@ sub MY::postamble - return q{ - file_unpack: file_unpack.pl Makefile - $(CP) file_unpack.pl $@ -+ mkdir -p $(INST_MAN1DIR) - ## wait, so that -M < -M succeeds in ExtUtils/Command/MM.pm - (sleep 1; echo .nf; $(PERL) $@ --help) > $(INST_MAN1DIR)/$@.1 || true - }; diff --git a/perl-File-Unpack.changes b/perl-File-Unpack.changes index 3f33d15..1b095c3 100644 --- a/perl-File-Unpack.changes +++ b/perl-File-Unpack.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 10 11:31:36 UTC 2019 - Stephan Kulow + +- Remove perl-File-Unpack-fix-race.patch in favor of 9.diff +- Add 10.diff from yet another pull request: + https://github.com/jnweiger/perl-File-Unpack/pull/10 + ------------------------------------------------------------------- Sun Jun 9 18:13:14 UTC 2019 - Bernhard Wiedemann diff --git a/perl-File-Unpack.spec b/perl-File-Unpack.spec index 4712e51..3bf4c6e 100644 --- a/perl-File-Unpack.spec +++ b/perl-File-Unpack.spec @@ -1,7 +1,7 @@ # # spec file for package perl-File-Unpack # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -26,7 +26,8 @@ Source: http://search.cpan.org/CPAN/authors/id/J/JN/JNW/File-Unpack-%{ve Patch0: fix-xml-test.diff Patch1: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/5.diff Patch2: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/6.diff -Patch3: perl-File-Unpack-fix-race.patch +Patch3: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/9.diff +Patch4: https://patch-diff.githubusercontent.com/raw/jnweiger/perl-File-Unpack/pull/10.diff Url: https://github.com/jnweiger/perl-File-Unpack BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -185,6 +186,7 @@ ships with the File::Unpack perl module. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor