From 3c65a7d56572bc9380670c8f9f549eb5b26a8544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Tue, 7 Oct 2008 10:37:18 +0000 Subject: [PATCH] - update to 5.816 - fix #465855 - add --aliases into INSTALLDIRS - use upstream patch for previous problem (see rt 38736) --- lwp-untaint.patch | 13 ------ ...libwww-perl-5.808-skip-message-tests.patch | 46 ------------------- perl-libwww-perl.spec | 21 +++++---- rt-38736_taint.patch | 12 +++++ 4 files changed, 24 insertions(+), 68 deletions(-) delete mode 100644 lwp-untaint.patch delete mode 100644 perl-libwww-perl-5.808-skip-message-tests.patch create mode 100644 rt-38736_taint.patch diff --git a/lwp-untaint.patch b/lwp-untaint.patch deleted file mode 100644 index 0f05445..0000000 --- a/lwp-untaint.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/HTTP/Message.pm b/lib/HTTP/Message.pm -index 12acdfa..4c15fb2 100644 ---- a/lib/HTTP/Message.pm -+++ b/lib/HTTP/Message.pm -@@ -404,7 +404,7 @@ sub _stale_content { - # delegate all other method calls the the _headers object. - sub AUTOLOAD - { -- my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2); -+ my ($method) = ($AUTOLOAD =~ /^.*::(.+)$/); # untaint - return if $method eq "DESTROY"; - - # We create the function here so that it will not need to be diff --git a/perl-libwww-perl-5.808-skip-message-tests.patch b/perl-libwww-perl-5.808-skip-message-tests.patch deleted file mode 100644 index d477935..0000000 --- a/perl-libwww-perl-5.808-skip-message-tests.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urN libwww-perl-5.808.orig/t/base/message.t libwww-perl-5.808/t/base/message.t ---- libwww-perl-5.808.orig/t/base/message.t 2007-07-19 16:24:10.000000000 -0400 -+++ libwww-perl-5.808/t/base/message.t 2007-08-14 15:32:25.000000000 -0400 -@@ -3,7 +3,7 @@ - use strict; - use Test qw(plan ok skip); - --plan tests => 95; -+plan tests => 91; - - require HTTP::Message; - require Config; -@@ -339,21 +339,23 @@ - $m->content_type("text/plain; charset=UTF-8"); - $m->content("H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n"); - --$@ = ""; --skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/) -- ? "No Encode module" : "", -- sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); --ok($@ || "", ""); -+## These tests fail in mock for some reason -+# -+#$@ = ""; -+#skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/) -+# ? "No Encode module" : "", -+# sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); -+#ok($@ || "", ""); - ok($m->content, "H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n"); - - my $tmp = MIME::Base64::decode($m->content); - $m->content($tmp); - $m->header("Content-Encoding", "gzip"); --$@ = ""; --skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/) -- ? "No Encode module" : "", -- sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); --ok($@ || "", ""); -+#$@ = ""; -+#skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/) -+# ? "No Encode module" : "", -+# sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); -+#ok($@ || "", ""); - ok($m->content, $tmp); - - $m->header("Content-Encoding", "foobar"); diff --git a/perl-libwww-perl.spec b/perl-libwww-perl.spec index 78c3b52..46df21b 100644 --- a/perl-libwww-perl.spec +++ b/perl-libwww-perl.spec @@ -1,6 +1,6 @@ Name: perl-libwww-perl -Version: 5.814 -Release: 2%{?dist} +Version: 5.816 +Release: 1%{?dist} Summary: A Perl interface to the World-Wide Web Group: Development/Libraries @@ -13,8 +13,8 @@ Source0: http://www.cpan.org/authors/id/G/GA/GAAS/libwww-perl-%{version}. # previous versions just skipped all the tests, I don't feel so bad # about being lazy and skipping these instead of figuring out why they # fail in mock and not on my box. -Patch1: perl-libwww-perl-5.808-skip-message-tests.patch -Patch2: lwp-untaint.patch +Patch1: perl-libwww-perl-5.816-skip-message-tests.patch +Patch2: rt-38736_taint.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -36,12 +36,9 @@ help you implement simple HTTP servers. %prep %setup -q -n libwww-perl-%{version} -##%patch1 -p1 +%patch1 -p1 %patch2 -p1 -# Install the aliases by default -%{__perl} -pi -e 's|my \$default = "n";|my \$default = "y";|' Makefile.PL - # Filter unwanted Provides: cat << \EOF > %{name}-prov #!/bin/sh @@ -67,7 +64,8 @@ chmod +x %{__perl_requires} %build -%{__perl} Makefile.PL INSTALLDIRS=vendor < /dev/null +# Install the aliases by default +%{__perl} Makefile.PL INSTALLDIRS=vendor --aliases < /dev/null make %{?_smp_mflags} %install @@ -116,6 +114,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 7 2008 Marcela Mašláňová 5.816-1 +- update to 5.816 +- fix #465855 - add --aliases into INSTALLDIRS +- use upstream patch for previous problem (see rt 38736) + * Thu Sep 18 2008 Marcela Maslanova 5.814-2 - use untaint patch from Villa Skyte diff --git a/rt-38736_taint.patch b/rt-38736_taint.patch new file mode 100644 index 0000000..d68ce63 --- /dev/null +++ b/rt-38736_taint.patch @@ -0,0 +1,12 @@ +diff -up libwww-perl-5.816/lib/HTTP/Message.pm.ooo libwww-perl-5.816/lib/HTTP/Message.pm +--- libwww-perl-5.816/lib/HTTP/Message.pm.ooo 2008-10-07 10:47:51.000000000 +0200 ++++ libwww-perl-5.816/lib/HTTP/Message.pm 2008-10-07 10:50:18.000000000 +0200 +@@ -410,7 +410,7 @@ sub AUTOLOAD + # We create the function here so that it will not need to be + # autoloaded the next time. + no strict 'refs'; +- *$method = eval "sub { shift->{'_headers'}->$method(\@_) }"; ++ *$method = sub { shift->{'_headers'}->$method(@_) }; + goto &$method; + } +