From db893775ce08dd368164bf67280f15e645fd8931 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Wed, 18 May 2005 02:51:42 +0000 Subject: [PATCH] CGI.pm 3.10 fixes mod_perl problems (#158036) --- perl-5.8.6-CGI-3.1.0.patch | 142 +++++++++++++++++++++++++++++++++++++ perl.spec | 9 ++- 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 perl-5.8.6-CGI-3.1.0.patch diff --git a/perl-5.8.6-CGI-3.1.0.patch b/perl-5.8.6-CGI-3.1.0.patch new file mode 100644 index 0000000..baba563 --- /dev/null +++ b/perl-5.8.6-CGI-3.1.0.patch @@ -0,0 +1,142 @@ +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158036 + +diff -ruN perl-5.8.6-cgi308/lib/CGI/t/form.t perl-5.8.6-cgi310/lib/CGI/t/form.t +--- perl-5.8.6-cgi308/lib/CGI/t/form.t 2005-05-15 01:20:29.910116896 +0100 ++++ perl-5.8.6-cgi310/lib/CGI/t/form.t 2005-05-05 21:14:56.000000000 +0100 +@@ -33,43 +33,43 @@ + "start_form()"); + + is(submit(), +- qq(), ++ qq(), + "submit()"); + + is(submit(-name => 'foo', + -value => 'bar'), +- qq(), ++ qq(), + "submit(-name,-value)"); + + is(submit({-name => 'foo', + -value => 'bar'}), +- qq(), ++ qq(), + "submit({-name,-value})"); + + is(textfield(-name => 'weather'), +- qq(), ++ qq(), + "textfield({-name})"); + + is(textfield(-name => 'weather', + -value => 'nice'), +- qq(), ++ qq(), + "textfield({-name,-value})"); + + is(textfield(-name => 'weather', + -value => 'nice', + -override => 1), +- qq(), ++ qq(), + "textfield({-name,-value,-override})"); + + is(checkbox(-name => 'weather', + -value => 'nice'), +- qq(), ++ qq(), + "checkbox()"); + + is(checkbox(-name => 'weather', + -value => 'nice', + -label => 'forecast'), +- qq(), ++ qq(), + "checkbox()"); + + is(checkbox(-name => 'weather', +@@ -77,41 +77,41 @@ + -label => 'forecast', + -checked => 1, + -override => 1), +- qq(), ++ qq(), + "checkbox()"); + + is(checkbox(-name => 'weather', + -value => 'dull', + -label => 'forecast'), +- qq(), ++ qq(), + "checkbox()"); + + is(radio_group(-name => 'game'), +- qq( ), ++ qq( ), + 'radio_group()'); + + is(radio_group(-name => 'game', + -labels => {'chess' => 'ping pong'}), +- qq( ), ++ qq( ), + 'radio_group()'); + + is(checkbox_group(-name => 'game', + -Values => [qw/checkers chess cribbage/]), +- qq( ), ++ qq( ), + 'checkbox_group()'); + + is(checkbox_group(-name => 'game', + '-values' => [qw/checkers chess cribbage/], + '-defaults' => ['cribbage'], + -override=>1), +- qq( ), ++ qq( ), + 'checkbox_group()'); + + is(popup_menu(-name => 'game', + '-values' => [qw/checkers chess cribbage/], + -default => 'cribbage', + -override => 1), +- ' + + + +diff -ruN perl-5.8.6-cgi308/lib/CGI.pm perl-5.8.6-cgi310/lib/CGI.pm +--- perl-5.8.6-cgi308/lib/CGI.pm 2005-05-15 01:20:29.955110056 +0100 ++++ perl-5.8.6-cgi310/lib/CGI.pm 2005-05-13 22:46:21.000000000 +0100 +@@ -18,8 +18,8 @@ + # The most recent version and complete docs are available at: + # http://stein.cshl.org/WWW/software/CGI/ + +-$CGI::revision = '$Id: CGI.pm,v 1.179 2005/04/07 22:40:37 lstein Exp $'; +-$CGI::VERSION=3.08; ++$CGI::revision = '$Id: CGI.pm,v 1.181 2005/05/13 21:45:26 lstein Exp $'; ++$CGI::VERSION='3.10'; + + # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. + # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. +@@ -179,11 +179,12 @@ + if (exists $ENV{MOD_PERL}) { + # mod_perl handlers may run system() on scripts using CGI.pm; + # Make sure so we don't get fooled by inherited $ENV{MOD_PERL} +- if ($ENV{MOD_PERL_API_VERSION} == 2) { ++ if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { + $MOD_PERL = 2; + require Apache2::Response; + require Apache2::RequestRec; + require Apache2::RequestUtil; ++ require Apache2::RequestIO; + require APR::Pool; + } else { + $MOD_PERL = 1; +@@ -888,6 +889,7 @@ + + sub element_tab { + my ($self,$new_value) = self_or_default(@_); ++ $self->{'.etab'} ||= 1; + $self->{'.etab'} = $new_value if defined $new_value; + $self->{'.etab'}++; + } diff --git a/perl.spec b/perl.spec index f20b66a..e918e03 100644 --- a/perl.spec +++ b/perl.spec @@ -5,7 +5,7 @@ %define multilib_64_archs x86_64 s390x ppc64 sparc64 %define perlver 5.8.6 -%define perlrel 13 +%define perlrel 14 %define perlepoch 3 Provides: perl(:WITH_PERLIO) @@ -105,6 +105,9 @@ Patch27: perl-5.8.5-CAN-2005-0155+0156.patch # bugzilla 118877, 127023 Patch28: perl-5.8.6-findbin-selinux.patch +# CGI.pm 3.10 fixes mod_perl +Patch29: perl-5.8.6-CGI-3.1.0.patch + # arch-specific patches Patch100: perl-5.8.1-fpic.patch Patch101: perl-5.8.0-libdir64.patch @@ -222,6 +225,7 @@ more secure running of setuid perl scripts. %patch26 -p1 %patch27 -p0 %patch28 -p1 +%patch29 -p1 %patch100 -p1 @@ -421,6 +425,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue May 17 2005 Warren Togami - 3:5.8.6-14 +- CGI.pm 3.10 fixes mod_perl problems (#158036) + * Sun May 15 2005 Warren Togami - 3:5.8.6-13 - Better patch for FindBin.pm (#127023#c37)