From 1f9101f65eddc23ff9714cff0efd2ce0e459bf65 Mon Sep 17 00:00:00 2001 From: Paul Howarth <p...@city-fan.org> Date: Fri, 22 Apr 2016 09:58:14 +0100 Subject: =?UTF-8?q?Work=20around=20behaviour=20change=20in=20MailTools=20?= =?UTF-8?q?=E2=89=A5=202.14=20(#1329082,=20CPAN=20RT#113887)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Also, simplify find command using -delete --- MIME-tools-5.507-rt113887.patch | 49 +++++++++++++++++++++++++++++++++++++++++ perl-MIME-tools.spec | 12 ++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 MIME-tools-5.507-rt113887.patch diff --git a/MIME-tools-5.507-rt113887.patch b/MIME-tools-5.507-rt113887.patch new file mode 100644 index 0000000..c5ed541 --- /dev/null +++ b/MIME-tools-5.507-rt113887.patch @@ -0,0 +1,49 @@ +diff --git a/MANIFEST b/MANIFEST +index c2a49ad..6cf638f 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -155,6 +155,7 @@ testmsgs/german.msg + testmsgs/german.ref + testmsgs/hdr-fakeout.msg + testmsgs/hdr-fakeout.ref ++testmsgs/hdr-fakeout-newmailtools-ref + testmsgs/malformed-content-type-zip.msg + testmsgs/multi-2evil.msg + testmsgs/multi-2evil.ref +diff --git a/t/Ref.t b/t/Ref.t +index b3fc985..d39d20b 100644 +--- a/t/Ref.t ++++ b/t/Ref.t +@@ -39,6 +39,10 @@ foreach my $refpath (@refpaths) { + my $msgpath = $refpath; $msgpath =~ s/\.ref$/.msg/; + # print STDERR " $msgpath\n"; + ++ ### HACK HACK HACK: MailTools behaviour has changed!!! ++ if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { ++ $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; ++ } + ### Get reference, as ref to array: + my $ref = read_ref($refpath); + if ($ref->{Parser}{Message}) { +diff --git a/testmsgs/hdr-fakeout-newmailtools-ref b/testmsgs/hdr-fakeout-newmailtools-ref +new file mode 100644 +index 0000000..b6e9329 +--- /dev/null ++++ b/testmsgs/hdr-fakeout-newmailtools-ref +@@ -0,0 +1,16 @@ ++{ ++ "Parser" => { ++ "Message" => "testmsgs/hdr-fakeout.msg", ++ "ExtractNested" => 1, ++ "OutputToCore" => "0", ++ "Name" => "anonymous" ++ }, ++ "Msg" => { ++ "Subject" => "test message 1", ++ "Type" => "text/plain", ++ "To" => "\"Russell P. Sutherland\" <russ\@quist.on.ca>", ++ "From" => "\"Russell P. Sutherland\" <russ\@quist.on.ca>", ++ "Encoding" => "7bit" ++ } ++} ++ diff --git a/perl-MIME-tools.spec b/perl-MIME-tools.spec index 85a3c20..7667b07 100644 --- a/perl-MIME-tools.spec +++ b/perl-MIME-tools.spec @@ -1,12 +1,13 @@ Summary: Modules for parsing and creating MIME entities in Perl Name: perl-MIME-tools Version: 5.507 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/MIME-tools/ Source0: http://search.cpan.org/CPAN/authors/id/D/DS/DSKOLL/MIME-tools-%{version}.tar.gz Patch0: MIME-tools-5.506-UTF8.patch +Patch1: MIME-tools-5.507-rt113887.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) # ================ Module Build ====================== @@ -63,6 +64,9 @@ parser and tool for building your own MIME parser, and utilities. # Fix character encoding %patch0 +# Work around behaviour change in MailTools ≥ 2.14 (#1329082, CPAN RT#113887) +%patch1 -p1 + # The more useful examples will go in %%{_bindir} mkdir useful-examples mv examples/mime{dump,encode,explode,postcard,send} useful-examples/ @@ -74,7 +78,7 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install DESTDIR=%{buildroot} -find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -type f -name .packlist -delete %{_fixperms} %{buildroot} # Put the more useful examples in %%{_bindir} @@ -140,6 +144,10 @@ rm -rf %{buildroot} %{_mandir}/man3/MIME::Words.3* %changelog +* Fri Apr 22 2016 Paul Howarth <p...@city-fan.org> - 5.507-3 +- Work around behaviour change in MailTools ≥ 2.14 (#1329082, CPAN RT#113887) +- Simplify find command using -delete + * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 5.507-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-MIME-tools.git/commit/?h=master&id=1f9101f65eddc23ff9714cff0efd2ce0e459bf65 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org