8
0

- 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-File-Unpack?expand=0&rev=96
This commit is contained in:
Stephan Kulow
2019-07-10 11:33:30 +00:00
committed by Git OBS Bridge
parent c82270962b
commit aedf16efcd
5 changed files with 41 additions and 24 deletions

17
10.diff Normal file
View File

@@ -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.

12
9.diff Normal file
View File

@@ -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
};

View File

@@ -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 <bwiedemann suse de>
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
};

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jul 10 11:31:36 UTC 2019 - Stephan Kulow <coolo@suse.com>
- 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 <bwiedemann@suse.com>

View File

@@ -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