From cff85710c249cd84672a4aefa643064631174ead Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 03 2018 06:28:46 +0000 Subject: import rh-perl526-mod_perl-2.0.10-9.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a5222a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mod_perl-2.0.10.tar.gz diff --git a/.rh-perl526-mod_perl.metadata b/.rh-perl526-mod_perl.metadata new file mode 100644 index 0000000..5a73d5d --- /dev/null +++ b/.rh-perl526-mod_perl.metadata @@ -0,0 +1 @@ +61b5b0fe4449440258ad45dee6efa0e2264a9701 SOURCES/mod_perl-2.0.10.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/mod_perl-2.0.10-Convert-documentation-to-UTF-8.patch b/SOURCES/mod_perl-2.0.10-Convert-documentation-to-UTF-8.patch new file mode 100644 index 0000000..df8b498 --- /dev/null +++ b/SOURCES/mod_perl-2.0.10-Convert-documentation-to-UTF-8.patch @@ -0,0 +1,121 @@ +From 93ab44e687bd81a37e6e1fd285e0d47162e76c2d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 22 Nov 2016 16:42:26 +0100 +Subject: [PATCH] Convert documentation to UTF-8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Changes | 6 +++--- + SVN-MOVE | 2 +- + docs/devel/core/explained.pod | 4 +++- + docs/devel/debug/c.pod | 4 +++- + docs/user/Changes.pod | 4 +++- + 5 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/Changes b/Changes +index 789c55b..145ed2f 100644 +--- a/Changes ++++ b/Changes +@@ -701,7 +701,7 @@ improve the diagnostics when detecting mp2 < 1.999022, tell the user + which files and/or dirs need to be removed [Stas] + + restore the DESTDIR support partially nuked by the apache2 rename +-branch [Torsten F�rtsch ] ++branch [Torsten Förtsch ] + + add APR::Status to provide functions corresponding to the + APR_STATUS_IS_* macros of apr_errno.h, especially those composites +@@ -1113,7 +1113,7 @@ Fix Modperl::Util::unload_package() [Gozer] + - Leave entries from other packages alone + + $filter->remove now works with native (non-modperl) filters + test +-[Torsten F�rtsch ] ++[Torsten Förtsch ] + + + +@@ -2135,7 +2135,7 @@ Make sure that the static mod_perl library is built after the dynamic + + Apache::Status now generates HTML 4.01 Strict (and in many cases, also + ISO-HTML) compliant output. Also add a simple CSS to make the reports +-look nicer. [Ville Skytt� ] ++look nicer. [Ville Skyttä ] + + APR::Pool::DESTROY implemented and tweaked to only + destroy pools created via APR::Pool->new() [Geoffrey Young] +diff --git a/SVN-MOVE b/SVN-MOVE +index e98bfc1..6bc42ac 100644 +--- a/SVN-MOVE ++++ b/SVN-MOVE +@@ -1,7 +1,7 @@ + This file tracks the things that need to be done to accomplish the + move of modperl projects to SVN: + +-* missing commit template files (� l� CVS) ++* missing commit template files (à là CVS) + PR: + Obtained from: + Submitted by: +diff --git a/docs/devel/core/explained.pod b/docs/devel/core/explained.pod +index 40f79a2..1298793 100644 +--- a/docs/devel/core/explained.pod ++++ b/docs/devel/core/explained.pod +@@ -1,3 +1,5 @@ ++=encoding utf8 ++ + =head1 NAME + + mod_perl 2.0 Source Code Explained +@@ -704,7 +706,7 @@ arguments passed on the Perl side and put the results back onto the + stack. Therefore the first thing we do is to initialize a few special + variables using the C macro defined in I, which in + fact calls a bunch of other macros. These variables help to manipulate +-the stack. C is one of these macros and it declares and initial� ++the stack. C is one of these macros and it declares and initial­ + izes a local copy of the Perl stack pointer C which . This local + copy should always be accessed as C. + +diff --git a/docs/devel/debug/c.pod b/docs/devel/debug/c.pod +index 64a607c..10bff1c 100644 +--- a/docs/devel/debug/c.pod ++++ b/docs/devel/debug/c.pod +@@ -1,3 +1,5 @@ ++=encoding utf8 ++ + =head1 NAME + + Debugging mod_perl C Internals +@@ -724,7 +726,7 @@ and now we call C again: + gdb) curinfo + 14:/home/httpd/cgi-bin/core_dump.pl + +-Et voil�, we can see that the segfault was triggered on line 14 of ++Et voilà, we can see that the segfault was triggered on line 14 of + F, which has the line: + + Debug::DumpCore::segv(); +diff --git a/docs/user/Changes.pod b/docs/user/Changes.pod +index f9ecb76..3582676 100644 +--- a/docs/user/Changes.pod ++++ b/docs/user/Changes.pod +@@ -1,3 +1,5 @@ ++=encoding utf8 ++ + =head1 NAME + + CHANGES +@@ -19,7 +21,7 @@ A new troubleshooting section on how to resolve can't locate file foo, + when there is a system limit on the maximum open files. By Ken Simpson + EksimpsonEatElarch.mailchannels.comE. + +-A few corrections in the config chapter by Jean-S�bastien Guay ++A few corrections in the config chapter by Jean-Sébastien Guay + Ejean_seb EatE videotron.caE. + + A new troubleshooting section on how to resolve "undefined symbol" +-- +2.7.4 + diff --git a/SOURCES/mod_perl-2.0.10-http_syntax.patch b/SOURCES/mod_perl-2.0.10-http_syntax.patch new file mode 100644 index 0000000..465d0c4 --- /dev/null +++ b/SOURCES/mod_perl-2.0.10-http_syntax.patch @@ -0,0 +1,33 @@ +From 4a803fdb4c9eae8538293fe31c9222eecb6465be Mon Sep 17 00:00:00 2001 +From: Niko Tyni +Date: Fri, 23 Dec 2016 18:27:23 +0200 +Subject: [PATCH 1/2] Fix t/apache/read.t HTTP syntax for Apache 2.4.24 + compatibility + +HTTP/1.1 RFC 7230, section 2.6. "Protocol Versioning" says the HTTP name +is case sensitive. Starting with Apache 2.4.24, using lower case will +make the server issue a 400 Bad request response, causing a test failure. + +https://tools.ietf.org/html/rfc7230#section-2.6 + +Bug-Debian: https://bugs.debian.org/849082 +--- + t/apache/read.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/apache/read.t b/t/apache/read.t +index 83670c9..9f7f504 100644 +--- a/t/apache/read.t ++++ b/t/apache/read.t +@@ -24,7 +24,7 @@ close $fh; + + my $size = length $data; + +-for my $string ("POST $location http/1.0", ++for my $string ("POST $location HTTP/1.0", + "Content-length: $size", + "") { + my $line = "$string\r\n"; +-- +2.11.0 + diff --git a/SOURCES/mod_perl-2.0.10-inject_header_line_terminators.patch b/SOURCES/mod_perl-2.0.10-inject_header_line_terminators.patch new file mode 100644 index 0000000..daaab51 --- /dev/null +++ b/SOURCES/mod_perl-2.0.10-inject_header_line_terminators.patch @@ -0,0 +1,45 @@ +From d59229cf4f5b91ed58e25e27977e76f59096b72d Mon Sep 17 00:00:00 2001 +From: Niko Tyni +Date: Sat, 24 Dec 2016 23:07:28 +0200 +Subject: [PATCH 2/2] Fix in_bbs_inject_header line terminators for Apache + 2.4.24 compatibility + +rfc7230 3.5 says: + + Although the line terminator for the start-line and header fields is + the sequence CRLF, a recipient MAY recognize a single LF as a line + terminator and ignore any preceding CR. + +Apache with strict enabled chooses not to implement the MAY. + +Author: Stefan Fritsch +Bug-Debian: https://bugs.debian.org/849082 +--- + t/filter/TestFilter/in_bbs_inject_header.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/t/filter/TestFilter/in_bbs_inject_header.pm b/t/filter/TestFilter/in_bbs_inject_header.pm +index b09d6f9..5380c65 100644 +--- a/t/filter/TestFilter/in_bbs_inject_header.pm ++++ b/t/filter/TestFilter/in_bbs_inject_header.pm +@@ -181,7 +181,7 @@ sub handler : FilterConnectionHandler { + + if ($data and $data =~ /^POST/) { + # demonstrate how to add a header while processing other headers +- my $header = "$header1_key: $header1_val\n"; ++ my $header = "$header1_key: $header1_val\r\n"; + push @{ $ctx->{buckets} }, APR::Bucket->new($c->bucket_alloc, $header); + debug "queued header [$header]"; + } +@@ -199,7 +199,7 @@ sub handler : FilterConnectionHandler { + # we hit the headers and body separator, which is a good + # time to add extra headers: + for my $key (keys %headers) { +- my $header = "$key: $headers{$key}\n"; ++ my $header = "$key: $headers{$key}\r\n"; + push @{ $ctx->{buckets} }, APR::Bucket->new($c->bucket_alloc, $header); + debug "queued header [$header]"; + } +-- +2.11.0 + diff --git a/SOURCES/mod_perl-2.0.4-inline.patch b/SOURCES/mod_perl-2.0.4-inline.patch new file mode 100644 index 0000000..b49af77 --- /dev/null +++ b/SOURCES/mod_perl-2.0.4-inline.patch @@ -0,0 +1,11 @@ +--- mod_perl-2.0.4/src/modules/perl/modperl_common_util.h.inline ++++ mod_perl-2.0.4/src/modules/perl/modperl_common_util.h +@@ -22,7 +22,7 @@ + #ifdef MP_DEBUG + #define MP_INLINE + #else +-#define MP_INLINE APR_INLINE ++#define MP_INLINE + #endif + + #ifdef CYGWIN diff --git a/SOURCES/mod_perl-2.0.7-fix_pipelines_reponse_deadlock_in_tests.patch b/SOURCES/mod_perl-2.0.7-fix_pipelines_reponse_deadlock_in_tests.patch new file mode 100644 index 0000000..d274ff7 --- /dev/null +++ b/SOURCES/mod_perl-2.0.7-fix_pipelines_reponse_deadlock_in_tests.patch @@ -0,0 +1,108 @@ +Fix pipelined response deadlock in tests + +There's a race condition that can cause mod_perl's test suite to hang +in t/filter/in_str_declined.t. The problem is that the response handler +starts generating response body, and so triggers header output, before +it reads the request body. If LWP::Protocol::http, which is the client +for this test, receives a complete set of response headers, it will stop +sending the request body. (However, if the request body is no more than +8192 octets then it will send the whole body before it starts looking +for a response. The failure only shows up with an appreciably large +request body.) + +RFC 2616 doesn't explicitly address this sort of pipelining, but the +start of section 6 does say "After receiving and interpreting a request +message, a server responds with an HTTP response message.", which can be +read as prohibiting sending any part of the response before the entire +request has been received. + +The attached patch fixes this issue by making all the POST handlers in +the test suite read the body before doing anything that generates output +(specifically plan()). + +-zefram + +CPAN RT#82409 +Debian bug #676754 + +--- a/t/filter/TestFilter/in_str_declined.pm 2011-02-08 02:00:11.000000000 +0000 ++++ b/t/filter/TestFilter/in_str_declined.pm 2013-01-04 16:08:14.000000000 +0000 +@@ -35,13 +35,17 @@ + sub response { + my $r = shift; + ++ my $data; ++ if ($r->method_number == Apache2::Const::M_POST) { ++ # consume the data so the input filter is invoked ++ $data = TestCommon::Utils::read_post($r); ++ } ++ + plan $r, tests => 2; + + $r->content_type('text/plain'); + + if ($r->method_number == Apache2::Const::M_POST) { +- # consume the data so the input filter is invoked +- my $data = TestCommon::Utils::read_post($r); + ok t_cmp(length $data, 20000, "the request body received ok"); + } + +--- a/t/filter/TestFilter/in_str_declined_read.pm 2011-02-08 02:00:11.000000000 +0000 ++++ b/t/filter/TestFilter/in_str_declined_read.pm 2013-01-04 16:06:28.000000000 +0000 +@@ -31,14 +31,19 @@ + sub response { + my $r = shift; + ++ my $err; ++ if ($r->method_number == Apache2::Const::M_POST) { ++ # this should fail, because of the failing filter ++ eval { TestCommon::Utils::read_post($r) }; ++ $err = $@; ++ } ++ + plan $r, tests => 1; + + $r->content_type('text/plain'); + + if ($r->method_number == Apache2::Const::M_POST) { +- # this should fail, because of the failing filter +- eval { TestCommon::Utils::read_post($r) }; +- ok $@; ++ ok $err; + } + + Apache2::Const::OK; +--- a/t/filter/TestFilter/in_str_msg.pm 2011-02-08 02:00:11.000000000 +0000 ++++ b/t/filter/TestFilter/in_str_msg.pm 2013-01-04 16:08:27.000000000 +0000 +@@ -76,10 +76,10 @@ + sub response { + my $r = shift; + +- plan $r, tests => 1; +- + my $received = TestCommon::Utils::read_post($r); + ++ plan $r, tests => 1; ++ + ok t_cmp($received, $expected, + "request filter must have upcased the data"); + +--- a/t/response/TestModperl/post_utf8.pm 2011-02-08 02:00:12.000000000 +0000 ++++ b/t/response/TestModperl/post_utf8.pm 2013-01-04 16:04:39.000000000 +0000 +@@ -29,14 +29,14 @@ + # $r->content_type("text/plain; charset=utf-8"); + # $r->print("expected: $expected_utf8\n"); + ++ my $received = TestCommon::Utils::read_post($r) || ""; ++ + # utf encode/decode was added only in 5.8.0 + # XXX: currently binmode is only available with perlio (used on the + # server side on the tied/perlio STDOUT) + plan $r, tests => 2, + need need_min_perl_version(5.008), need_perl('perlio'); + +- my $received = TestCommon::Utils::read_post($r) || ""; +- + # workaround for perl-5.8.0, which doesn't decode correctly a + # tainted variable + require ModPerl::Util; diff --git a/SOURCES/mod_perl-short-name.patch b/SOURCES/mod_perl-short-name.patch new file mode 100644 index 0000000..9abef96 --- /dev/null +++ b/SOURCES/mod_perl-short-name.patch @@ -0,0 +1,13 @@ +diff --git a/src/modules/perl/modperl_config.c b/src/modules/perl/modperl_config.c +index c4ef81f..4ec135c 100644 +--- a/src/modules/perl/modperl_config.c ++++ b/src/modules/perl/modperl_config.c +@@ -186,7 +186,7 @@ modperl_config_srv_t *modperl_config_srv_new(apr_pool_t *p, server_rec *s) + + /* make sure httpd's argv[0] is the first argument so $0 is + * correctly connected to the real thing */ +- modperl_config_srv_argv_push(s->process->argv[0]); ++ modperl_config_srv_argv_push(s->process->short_name); + + MP_TRACE_d(MP_FUNC, "new scfg: 0x%lx", (unsigned long)scfg); + diff --git a/SOURCES/perl.conf b/SOURCES/perl.conf new file mode 100644 index 0000000..30d5d16 --- /dev/null +++ b/SOURCES/perl.conf @@ -0,0 +1,48 @@ +# +# Mod_perl incorporates a Perl interpreter into the Apache web server, +# so that the Apache web server can directly execute Perl code. +# Mod_perl links the Perl runtime library into the Apache web server +# and provides an object-oriented Perl interface for Apache's C +# language API. The end result is a quicker CGI script turnaround +# process, since no external Perl interpreter has to be started. +# + +# Uncomment this line to globally enable warnings, which will be +# written to the server's error log. Warnings should be enabled +# during the development process, but should be disabled on a +# production server as they affect performance. +# +#PerlSwitches -w + +# Uncomment this line to enable taint checking globally. When Perl is +# running in taint mode various checks are performed to reduce the +# risk of insecure data being passed to a subshell or being used to +# modify the filesystem. Unfortunately many Perl modules are not +# taint-safe, so you should exercise care before enabling it on a +# production server. +# +#PerlSwitches -T + +# This will allow execution of mod_perl to compile your scripts to +# subroutines which it will execute directly, avoiding the costly +# compile process for most requests. +# +#Alias /perl /var/www/perl +# +# SetHandler perl-script +# PerlResponseHandler ModPerl::Registry +# PerlOptions +ParseHeaders +# Options +ExecCGI +# + +# This will allow remote server configuration reports, with the URL of +# http://servername/perl-status +# Change the ".example.com" to match your domain to enable. +# +# +# SetHandler perl-script +# PerlResponseHandler Apache2::Status +# Order deny,allow +# Deny from all +# Allow from .example.com +# diff --git a/SOURCES/perl.module.conf b/SOURCES/perl.module.conf new file mode 100644 index 0000000..859f453 --- /dev/null +++ b/SOURCES/perl.module.conf @@ -0,0 +1,10 @@ +# +# Mod_perl incorporates a Perl interpreter into the Apache web server, +# so that the Apache web server can directly execute Perl code. +# Mod_perl links the Perl runtime library into the Apache web server +# and provides an object-oriented Perl interface for Apache's C +# language API. The end result is a quicker CGI script turnaround +# process, since no external Perl interpreter has to be started. +# + +LoadModule perl_module modules/mod_perl.so diff --git a/SPECS/mod_perl.spec b/SPECS/mod_perl.spec new file mode 100644 index 0000000..bc77409 --- /dev/null +++ b/SPECS/mod_perl.spec @@ -0,0 +1,716 @@ +%{?scl:%scl_package mod_perl} + +# Unbundle Apache-Reload +%{bcond_with mod_perl_enables_bundled_Apache_Reload} +# Run optional test +%{bcond_without mod_perl_enables_optional_test} + +%if 0%{?scl:1} +%{!?_httpd24_apxs: %{expand: %%global _httpd24_apxs %%{_sbindir}/apxs}} +%{!?_httpd24_mmn: %{expand: %%global _httpd24_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} +%{!?_httpd24_confdir: %{expand: %%global _httpd24_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd24_modconfdir: %{expand: %%global _httpd24_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd24_moddir: %{expand: %%global _httpd24_moddir %%{_libdir}/httpd/modules}} +%else +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} +%endif + +%global regenerate_xs 0 + +Name: %{?scl:%scl_prefix}mod_perl +Version: 2.0.10 +Release: 9%{?dist} +Summary: An embedded Perl interpreter for the Apache HTTP Server +# other files: ASL 2.0 +## Not in binary packages +# docs/os/win32/distinstall: GPL+ or Artistic +# docs/os/win32/mpinstall: GPL+ or Artistic +License: ASL 2.0 +Group: System Environment/Daemons +URL: http://perl.apache.org/ +Source0: http://www.apache.org/dist/perl/mod_perl-%{version}.tar.gz +Source1: perl.conf +Source2: perl.module.conf +# Normalize documentation encoding +Patch0: mod_perl-2.0.10-Convert-documentation-to-UTF-8.patch +Patch1: mod_perl-2.0.4-inline.patch +# Fix a random deadlock in t/filter/in_str_declined.t, CPAN RT#82409 +Patch2: mod_perl-2.0.7-fix_pipelines_reponse_deadlock_in_tests.patch +# 1/2 Adapt tests to httpd-2.4.25, bug #1409610, CPAN RT#119685 +Patch3: mod_perl-2.0.10-http_syntax.patch +# 2/2 Adapt tests to httpd-2.4.25, bug #1409610, CPAN RT#119685 +Patch4: mod_perl-2.0.10-inject_header_line_terminators.patch +#Patch5: mod_perl-2.0.5-nolfs.patch +# Use short_name as argv[0] (bug #1388851) +Patch6: mod_perl-short-name.patch +BuildRequires: apr-devel >= 1.2.0 +BuildRequires: apr-util-devel +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: gdbm-devel +BuildRequires: %{?scl:httpd24-}httpd +BuildRequires: %{?scl:httpd24-}httpd-devel >= 2.4.0 +BuildRequires: make +BuildRequires: %{?scl_prefix}perl-interpreter +BuildRequires: %{?scl_prefix}perl-devel +BuildRequires: %{?scl_prefix}perl-generators +BuildRequires: %{?scl_prefix}perl(AutoLoader) +BuildRequires: %{?scl_prefix}perl(Carp) +BuildRequires: %{?scl_prefix}perl(Config) +BuildRequires: %{?scl_prefix}perl(constant) +BuildRequires: %{?scl_prefix}perl(Cwd) +BuildRequires: %{?scl_prefix}perl(Data::Dumper) +BuildRequires: %{?scl_prefix}perl(DirHandle) +BuildRequires: %{?scl_prefix}perl(DynaLoader) +BuildRequires: %{?scl_prefix}perl(Exporter) +BuildRequires: %{?scl_prefix}perl(ExtUtils::Embed) +BuildRequires: %{?scl_prefix}perl(ExtUtils::Install) +BuildRequires: %{?scl_prefix}perl(ExtUtils::MakeMaker) +BuildRequires: %{?scl_prefix}perl(File::Basename) +BuildRequires: %{?scl_prefix}perl(File::Copy) +BuildRequires: %{?scl_prefix}perl(File::Find) +BuildRequires: %{?scl_prefix}perl(File::Path) +BuildRequires: %{?scl_prefix}perl(File::Spec) +BuildRequires: %{?scl_prefix}perl(File::Spec::Functions) +BuildRequires: %{?scl_prefix}perl(FindBin) +BuildRequires: %{?scl_prefix}perl(lib) +# Module::CoreList not helpful +BuildRequires: %{?scl_prefix}perl(strict) +BuildRequires: %{?scl_prefix}perl(Symbol) +BuildRequires: %{?scl_prefix}perl(Test) +BuildRequires: %{?scl_prefix}perl(vars) +BuildRequires: %{?scl_prefix}perl(warnings) +# Win32 not used +BuildRequires: sed +%if %{regenerate_xs}0 +BuildRequires: %{?scl_prefix}perl(Data::Flow) >= 0.05 +BuildRequires: %{?scl_prefix}perl(Tie::IxHash) +%endif +# Run-time: +BuildRequires: %{?scl_prefix}perl(:VERSION) >= 5.6.1 +BuildRequires: %{?scl_prefix}perl(base) +BuildRequires: %{?scl_prefix}perl(BSD::Resource) +BuildRequires: %{?scl_prefix}perl(Carp::Heavy) +BuildRequires: %{?scl_prefix}perl(Fcntl) +BuildRequires: %{?scl_prefix}perl(Getopt::Long) +# IO::Dir not used at tests +BuildRequires: %{?scl_prefix}perl(Linux::Pid) +BuildRequires: %{?scl_prefix}perl(overload) +BuildRequires: %{?scl_prefix}perl(POSIX) +BuildRequires: %{?scl_prefix}perl(Socket) +BuildRequires: %{?scl_prefix}perl(subs) +# TAP::Formatter::Console not use at tests +# TAP::Harness not used at tests +BuildRequires: %{?scl_prefix}perl(Test) +BuildRequires: %{?scl_prefix}perl(Test::Harness) +# Tests: +BuildRequires: %{?scl_prefix}perl(Compress::Zlib) +BuildRequires: %{?scl_prefix}perl(Encode) +BuildRequires: %{?scl_prefix}perl(ExtUtils::testlib) +BuildRequires: %{?scl_prefix}perl(IO::Select) +BuildRequires: %{?scl_prefix}perl(locale) +BuildRequires: %{?scl_prefix}perl(Math::BigInt) +BuildRequires: %{?scl_prefix}perl(threads) +BuildRequires: %{?scl_prefix}perl(Test::More) +%if %{with mod_perl_enables_optional_test} +# Optional tests: +BuildRequires: %{?scl_prefix}perl(CGI) >= 2.93 +BuildRequires: %{?scl_prefix}perl(HTTP::Request::Common) +BuildRequires: %{?scl_prefix}perl(LWP::UserAgent) +%endif +%if 0%{?scl:1} +Requires: %{?scl:httpd24-}httpd-mmn = %{_httpd24_mmn} +%else +Requires: %{?scl:httpd24-}httpd-mmn = %{_httpd_mmn} +%endif +Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl} '}eval "$(perl -V:version)";echo $version%{?scl:'})) +# For Apache::SizeLimit::Core +Requires: %{?scl_prefix}perl(Linux::Pid) +%if 0%{?scl:1} +Requires(post): grep +Requires(preun): grep +Requires(preun): sed +%endif + +Conflicts: perl516-mod_perl +Conflicts: rh-perl520-mod_perl +Conflicts: rh-perl524-mod_perl + + +%{?perl_default_filter} + +%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(Apache2::Connection\\)$ +%global __provides_exclude %__provides_exclude|perl\\(Apache2::RequestRec\\)$ +%global __provides_exclude %__provides_exclude|perl\\(warnings\\)$ +%global __provides_exclude %__provides_exclude|perl\\(HTTP::Request::Common\\)$ +%global __provides_exclude %__provides_exclude|mod_perl\\.so\\(.*$ +%global __provides_exclude %__provides_exclude|mod_perl\\.so$ +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(Apache::Test.*\\) +%global __requires_exclude %__requires_exclude|perl\\(Data::Flow\\) +%global __requires_exclude %__requires_exclude|perl\\(Apache2::FunctionTable\\) +%global __requires_exclude %__requires_exclude|perl\\(Apache2::StructureTable\\) + +# Hide dependencies on broken provides +%global __requires_exclude %__requires_exclude|^%{?scl_prefix}perl\\(Apache2::MPM\\) + +%description +Mod_perl incorporates a Perl interpreter into the Apache web server, +so that the Apache web server can directly execute Perl code. +Mod_perl links the Perl run-time library into the Apache web server and +provides an object-oriented Perl interface for Apache's C language +API. The end result is a quicker CGI script turnaround process, since +no external Perl interpreter has to be started. + +Install mod_perl if you're installing the Apache web server and you'd +like for it to directly incorporate a Perl interpreter. + + +%package devel +Summary: Files needed for building XS modules that use mod_perl +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{?scl:httpd24-}httpd-devel%{?_isa} +Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl} '}eval "$(perl -V:version)";echo $version%{?scl:'})) +Requires: %{?scl_prefix}perl(IO::Dir) + +%description devel +The mod_perl-devel package contains the files needed for building XS +modules that use mod_perl. + + +%if %{with mod_perl_enables_bundled_Apache_Reload} +%package -n %{?scl_prefix}perl-Apache-Reload +Version: 0.13 +Summary: Reload changed Perl modules +License: ASL 2.0 +Group: Development/Libraries +Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl} '}eval "$(perl -V:version)";echo $version%{?scl:'})) +# The mod_perl2 1.99022 is not used, pick for example ModPerl::Util to +# constrain the version. +Requires: %{?scl_prefix}perl(ModPerl::Util) >= 1.99022 +Conflicts: %{?scl_prefix}mod_perl < 2.0.10-4 +Provides: bundled(Apache-Reload) = %{version} + +# Fiter-underspecified dependencies +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^%{?scl_prefix}perl\\(ModPerl::Util\\)$ + +%description -n %{?scl_prefix}perl-Apache-Reload +This mod_perl extension allows to reload Perl modules that changed on the disk. +%endif + + +%prep +%setup -q -n mod_perl-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch6 -p1 +%{?scl:sed -i 's|@scl@|%{_scl_root}|' %{SOURCE1}} +%{!?scl:sed -i 's|@scl@||' %{SOURCE1}} +# Remove docs/os. It's only win32 info with non-ASL-2.0 license. Bug #1199044. +rm -rf docs/os +# Remove bundled Apache-Reload +%if %{without mod_perl_enables_bundled_Apache_Reload} +rm -rf Apache-Reload +sed -i -e '/Apache-Reload/d' Makefile.PL MANIFEST +%endif +# Remove a failing test that's not a regression, CPAN RT#118919 +for F in t/filter/in_bbs_inject_header.t \ + t/filter/TestFilter/in_bbs_inject_header.pm; do + rm "$F" + sed -i -e '\,^'"$F"',d' MANIFEST +done + +%build +%if 0%{?scl:1} +. /opt/rh/httpd24/enable +. /opt/rh/%scl/enable +CFLAGS="$RPM_OPT_FLAGS -fpic" %{__perl} Makefile.PL exclude.files +echo "%%exclude %{_mandir}/man3/Apache::Test*.3pm*" >> exclude.files + +# perl build script generates *.orig files, they get installed and later they +# break provides so mod_perl requires mod_perl-devel. We remove them here. +find "$RPM_BUILD_ROOT" -type f -name *.orig -delete + +%if 0%{?scl:1} +%post +# Register a collection in the httpd environment +FILE=/opt/rh/httpd24/service-environment +if ! grep -q -e ' %{scl}"' "$FILE"; then +printf 'HTTPD24_HTTPD_SCLS_ENABLED="${HTTPD24_HTTPD_SCLS_ENABLED} %{scl}"\n' \ + >> "$FILE" +fi +exit 0 + +%preun +# Unregister a collection from the httpd environment +if [ $1 -eq 0 ]; then + FILE=/opt/rh/httpd24/service-environment + if grep -q -e ' %{scl}"' "$FILE"; then + sed -i -e \ + '/^HTTPD24_HTTPD_SCLS_ENABLED="${HTTPD24_HTTPD_SCLS_ENABLED} %{scl}"$/d' \ + "$FILE" + fi +fi +exit 0 +%endif + +%check +#%if 0%{?scl:1} +#. /opt/rh/httpd24/enable +#. /opt/rh/%scl/enable +#%endif +#make test TEST_VERBOSE=1 && RETVAL=$? +#if test "$RETVAL" != 0; then +# cat t/logs/error_log +# exit 1 +#fi + +%files -f exclude.files +%doc LICENSE +%doc Changes NOTICE README* STATUS SVN-MOVE docs/ +%if 0%{?scl:1} +%config(noreplace) %{_httpd24_confdir}/perl.conf +%config(noreplace) %{_httpd24_modconfdir}/02-perl.conf +%else +%config(noreplace) %{_httpd_confdir}/perl.conf +%config(noreplace) %{_httpd_modconfdir}/02-perl.conf +%endif +%{_bindir}/* +%if 0%{?scl:1} +%{_httpd24_moddir}/mod_perl.so +%else +%{_httpd_moddir}/mod_perl.so +%endif +%{perl_vendorarch}/auto/* +%dir %{perl_vendorarch}/Apache/ +%{perl_vendorarch}/Apache/SizeLimit* +%{perl_vendorarch}/Apache2/ +%exclude %{perl_vendorarch}/Apache2/Reload.pm +%{perl_vendorarch}/Bundle/ +%{perl_vendorarch}/APR/ +%{perl_vendorarch}/ModPerl/ +%{perl_vendorarch}/*.pm +%{_mandir}/man3/*.3* +%exclude %{_mandir}/man3/Apache::Reload.3pm* +%exclude %{_mandir}/man3/Apache2::Reload.3pm* + +%files devel -f devel.files +%if 0%{?scl:1} +%dir %{_includedir}/httpd/ +%endif +%{_includedir}/httpd/* +%{perl_vendorarch}/Apache/Test*.pm +%{_mandir}/man3/Apache::Test*.3pm* + +%if %{with mod_perl_enables_bundled_Apache_Reload} +%files -n perl-Apache-Reload +%dir %{perl_vendorarch}/Apache/ +%{perl_vendorarch}/Apache/Reload.pm +%dir %{perl_vendorarch}/Apache2/ +%{perl_vendorarch}/Apache2/Reload.pm +%{_mandir}/man3/Apache::Reload.3pm* +%{_mandir}/man3/Apache2::Reload.3pm* +%endif + + +%changelog +* Mon Dec 18 2017 Petr Pisar - 2.0.10-9 +- SCL +- Disable tests because they cannot locate httpd + +* Thu Aug 03 2017 Fedora Release Engineering - 2.0.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jun 15 2017 Petr Pisar - 2.0.10-6 +- Remove bundled Apache-Reload (bug #1225037) + +* Mon Jun 05 2017 Jitka Plesnikova - 2.0.10-5 +- Perl 5.26 rebuild + +* Fri Mar 24 2017 Petr Pisar - 2.0.10-4 +- Sub-package Apache::Reload and Apache2::Reload into perl-Apache-Reload + (bug #1225037) + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 04 2017 Petr Pisar - 2.0.10-2 +- Adapt tests to httpd-2.4.25 (bug #1409610) + +* Tue Nov 22 2016 Petr Pisar - 2.0.10-1 +- 2.0.10 bump + +* Sun May 15 2016 Jitka Plesnikova - 2.0.9-4 +- Perl 5.24 rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Oct 19 2015 Jan Kaluza - 2.0.9-2 +- fix #1272901 - add perl(Test) to BuildRequires + +* Fri Jun 19 2015 Jan Kaluza - 2.0.9-1 +- update to 2.0.9 + +* Wed Jun 17 2015 Fedora Release Engineering - 2.0.8-14.20150311svn1665777 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 04 2015 Jitka Plesnikova - 2.0.8-13.20150311svn1665777 +- Perl 5.22 rebuild + +* Wed Mar 11 2015 Jan Kaluza - 2.0.8-12.20150311svn1665777 +- update to latest revision from trunk to backport latest upstream fixes + +* Fri Mar 06 2015 Jan Kaluza - 2.0.8-11.20140624svn1602105 +- remove docs/os from documentation because of its license (#1199044) + +* Wed Aug 27 2014 Jitka Plesnikova - 2.0.8-10.20140624svn1602105 +- Perl 5.20 rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 2.0.8-9.20140624svn1602105 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jun 24 2014 Jan Kaluza - 2.0.8-8.20140624svn1602105 +- update to latest revision from trunk to backport latest upstream fixes + +* Sat Jun 07 2014 Fedora Release Engineering - 2.0.8-7.20140430svn1590627 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Apr 30 2014 Jan Kaluza - 2.0.8-6.20140430svn1590627 +- update to latest revision of httpd24threading branch to backport latest upstream fixes + +* Thu Jan 23 2014 Joe Orton - 2.0.8-5.20131031svn1537408 +- fix _httpd_mmn expansion in absence of httpd-devel + +* Mon Oct 21 2013 Jan Kaluza - 2.0.8-3.20131031svn1537408 +- update to latest revision of httpd24 branch to backport new upstream fixes + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.8-3.20130709svn1498417 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 18 2013 Petr Pisar - 2.0.8-2.20130709svn1498417 +- Perl 5.18 rebuild + +* Tue Jul 09 2013 Jan Kaluza - 2.0.8-1.20130709svn1498417 +- update to latest revision of httpd24 branch to backport important fixes + in httpd-2.4 compatibility + +* Thu Feb 21 2013 Jan Kaluza - 2.0.7-12.20130221svn1448242 +- update to httpd24 svn branch which provides much more better compatibility + with httpd-2.4 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.7-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 20 2012 Jan Kaluza - 2.0.7-10 +- do not install .orig file generated by make xs_generate +- filter unversioned mod_perl.so from provides + +* Mon Nov 19 2012 Jan Kaluza - 2.0.7-9 +- clean up spec file +- do not require -devel when installing main package + +* Mon Nov 19 2012 Jan Kaluza - 2.0.7-8 +- add wrappers for new fields added in httpd-2.4 structures + +* Wed Jul 25 2012 Jan Kaluza - 2.0.7-7 +- updated httpd-2.4 patch + +* Fri Jul 20 2012 Fedora Release Engineering - 2.0.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 10 2012 Petr Pisar - 2.0.7-5 +- Hide dependencies on broken provides + +* Mon Jul 09 2012 Petr Pisar - 2.0.7-4 +- Perl 5.16 rebuild + +* Mon Jul 09 2012 Petr Pisar - 2.0.7-3 +- Rebuild to fix Apache2::MPM dependency on i686 + +* Fri Jun 29 2012 Petr Pisar - 2.0.7-2 +- Perl 5.16 rebuild + +* Fri Jun 29 2012 Jan Kaluza - 2.0.7-1 +- update to 2.0.7 (#830501) + +* Sun Jun 10 2012 Petr Pisar - 2.0.5-11 +- Perl 5.16 rebuild + +* Thu Apr 19 2012 Petr Pisar - 2.0.5-10 +- Fix dependency declaration on Data::Dumper + +* Wed Apr 18 2012 Jan Kaluza - 2.0.5-9 +- fix compilation with httpd-2.4 (#809142) + +* Tue Mar 06 2012 Jan Kaluza - 2.0.5-8 +- filter perl(HTTP::Request::Common) Provide from -devel (#247250) +- use short_name as argv[0] (#782369) + +* Thu Jan 5 2012 Ville Skyttä - 2.0.5-7 +- Ship Apache::Reload and Apache::SizeLimit in main package (#748362). +- Require Linux::Pid for Apache::SizeLimit (#766568). +- Move Apache::Test* man pages to -devel. +- Don't filter Module::Build dependency. + +* Wed Nov 9 2011 Joe Orton - 2.0.5-6 +- fudge the LFS test (#730832) + +* Fri Jul 22 2011 Petr Pisar - 2.0.5-5 +- RPM 4.9 dependency filtering added + +* Fri Jun 17 2011 Marcela Mašláňová - 2.0.5-4 +- Perl mass rebuild + +* Mon Apr 11 2011 Marcela Mašláňová - 2.0.5-3 +- filter warnings from provides + +* Sat Mar 26 2011 Joe Orton - 2.0.5-2 +- ship NOTICE file + +* Sat Mar 26 2011 Joe Orton - 2.0.5-1 +- update to 2.0.5 + +* Tue Feb 08 2011 Fedora Release Engineering - 2.0.4-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Nov 11 2010 Marcela Mašláňová - 2.0.4-13 +- fix missing requirements, add filter_setup macro, remove double provides + +* Thu Nov 04 2010 Emmanuel Seyman - 2.0.4-12 +- Spec cleanup for the merge review + +* Fri May 14 2010 Marcela Maslanova - 2.0.4-11 +- Mass rebuild with perl-5.12.0 + +* Tue Dec 8 2009 Joe Orton - 2.0.4-10 +- add security fix for CVE-2009-0796 (#544455) + +* Sat Jul 25 2009 Fedora Release Engineering - 2.0.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2.0.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Oct 17 2008 Joe Orton 2.0.4-7 +- fix inline abuse (#459351) + +* Wed Aug 6 2008 Joe Orton 2.0.4-5 +- rebuild to fix patch fuzz (#427758) + +* Mon Jul 14 2008 Joe Orton 2.0.4-4 +- rebuild for new BDB + +* Tue May 13 2008 Joe Orton 2.0.4-3 +- trim changelog; rebuild + +* Fri Apr 18 2008 Joe Orton 2.0.4-2 +- update to 2.0.4 + +* Wed Feb 27 2008 Tom "spot" Callaway - 2.0.3-21 +- Rebuild for perl 5.10 (again) + +* Tue Feb 19 2008 Fedora Release Engineering - 2.0.3-20 +- Autorebuild for GCC 4.3 + +* Wed Jan 30 2008 Joe Orton 2.0.3-19 +- further fixes for perl 5.10 (upstream r480903, r615751) + +* Wed Jan 30 2008 Joe Orton 2.0.3-18 +- fix build with perl 5.10 (upstream r480890) + +* Tue Jan 29 2008 Tom "spot" Callaway 2.0.3-17 +- fix perl BR + +* Mon Jan 28 2008 Tom "spot" Callaway 2.0.3-16 +- rebuild for new perl + +* Thu Dec 6 2007 Joe Orton 2.0.3-15 +- rebuild for new OpenLDAP + +* Wed Sep 5 2007 Joe Orton 2.0.3-14 +- filter perl(HTTP::Request::Common) Provide from -devel (#247250) + +* Sun Sep 2 2007 Joe Orton 2.0.3-13 +- rebuild for fixed 32-bit APR + +* Thu Aug 23 2007 Joe Orton 2.0.3-12 +- rebuild for expat soname bump + +* Tue Aug 21 2007 Joe Orton 2.0.3-11 +- rebuild for libdb soname bump + +* Mon Aug 20 2007 Joe Orton 2.0.3-10 +- fix License + +* Fri Apr 20 2007 Joe Orton 2.0.3-8 +- filter provide of perl(warnings) (#228429) + +* Wed Feb 28 2007 Joe Orton 2.0.3-7 +- also restore Apache::Test to devel +- add BR for perl-devel + +* Tue Feb 27 2007 Joe Orton 2.0.3-6 +- filter more Apache::Test requirements + +* Mon Feb 26 2007 Joe Orton 2.0.3-5 +- repackage set of trimmed modules, but only in -devel + +* Wed Jan 31 2007 Joe Orton 2.0.3-4 +- restore ModPerl::MM + +* Tue Dec 5 2006 Joe Orton 2.0.3-3 +- trim modules even more aggressively (#197841) + +* Mon Dec 4 2006 Joe Orton 2.0.3-2 +- update to 2.0.3 +- remove droplet in buildroot from multilib patch +- drop build-related ModPerl:: modules and Apache::Test (#197841) +- spec file cleanups + +* Wed Jul 12 2006 Jesse Keating - sh: line 0: fg: no job control +- rebuild + +* Thu Jun 15 2006 Joe Orton 2.0.2-6 +- fix multilib conflicts in -devel (#192733) + +* Fri Feb 10 2006 Jesse Keating - 2.0.2-5.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 2.0.2-3.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri Dec 2 2005 Joe Orton 2.0.2-3 +- rebuild for httpd 2.2 + +* Wed Oct 26 2005 Joe Orton 2.0.2-2 +- update to 2.0.2 + +* Thu Oct 20 2005 Joe Orton 2.0.1-2 +- rebuild + +* Fri Jun 17 2005 Warren Togami 2.0.1-1 +- 2.0.1 + +* Fri May 20 2005 Warren Togami 2.0.0-3 +- dep changes (#114651 jpo and ville) + +* Fri May 20 2005 Joe Orton 2.0.0-1 +- update to 2.0.0 final + +* Mon Apr 18 2005 Ville Skyttä - 2.0.0-0.rc5.3 +- Fix sample configuration. +- Explicitly disable the test suite. (#112563) + +* Mon Apr 18 2005 Joe Orton 2.0.0-0.rc5.2 +- fix filter-requires for new Apache2:: modules + +* Sat Apr 16 2005 Warren Togami - 2.0.0-0.rc5.1 +- 2.0.0-RC5 + +* Sun Apr 03 2005 Jose Pedro Oliveira - 2.0.0-0.rc4.1 +- Update to 2.0.0-RC4. +- Specfile cleanup. (#153236)