debian/libapache2-mod-perl2-dev.examples 0000644 0000000 0000000 00000000027 12200354765 015276 0 ustar docs/devel/debug/code/
debian/rules 0000755 0000000 0000000 00000006046 12200354765 010260 0 ustar #!/usr/bin/make -f
PACKAGE = $(firstword $(shell dh_listpackages))
TMP = $(CURDIR)/debian/$(PACKAGE)
LMP = $(CURDIR)/lib/ModPerl
MPR = $(CURDIR)/ModPerl-Registry
APR = $(CURDIR)/Apache-Reload
%:
dh $@ --parallel --with apache2
override_dh_auto_configure:
! [ -e $(LMP)/DummyVersions.pm ] \
|| cp $(LMP)/DummyVersions.pm debian/DummyVersions.pm.save
! [ -e $(LMP)/MethodLookup.pm ] \
|| cp $(LMP)/MethodLookup.pm debian/MethodLookup.pm.save
dh_auto_configure -- \
INSTALLDIRS=vendor \
MP_TRACE=0 \
MP_USE_DSO=1 \
MP_USE_STATIC=0 \
MP_CCOPTS="$(CFLAGS) -Wall" \
MP_APR_CONFIG=/usr/bin/apr-config
override_dh_auto_build:
dh_auto_build --parallel -- MODPERL_OPTIMIZE="$(CFLAGS)" OPTIMIZE="$(CFLAGS)"
override_dh_auto_test:
[ -d $(CURDIR)/t/run ] || mkdir $(CURDIR)/t/run
[ -d $(CURDIR)/t/logs ] || mkdir $(CURDIR)/t/logs
touch $(CURDIR)/t/logs/error_log
[ -d $(MPR)/t/run ] || mkdir $(MPR)/t/run
[ -d $(MPR)/t/logs ] || mkdir $(MPR)/t/logs
touch $(MPR)/t/logs/error_log
[ -d $(APR)/t/run ] || mkdir $(APR)/t/run
[ -d $(APR)/t/logs ] || mkdir $(APR)/t/logs
touch $(APR)/t/logs/error_log
APACHE_TEST_EXTRA_ARGS="-httpd_conf $(CURDIR)/debian/apache2.conf" \
LANG=C \
dh_auto_test --max-parallel=1 || ( RET=$$?; \
echo "--- test suite failed with code $$RET, t/logs/error_log starts ---"; \
cat t/logs/error_log; \
echo "--- test suite failed with code $$RET, t/logs/error_log ends ---"; \
exit $$RET )
override_dh_clean:
dh_clean
rm -rf t/htdocs/hooks lib/Apache WrapXS debian/docs
find . -name 'pod2htmd.tmp' -exec rm '{}' \;
find . -name 'pod2htmi.tmp' -exec rm '{}' \;
! [ -e debian/DummyVersions.pm.save ] \
|| mv debian/DummyVersions.pm.save $(LMP)/DummyVersions.pm
! [ -e debian/MethodLookup.pm.save ] \
|| mv debian/MethodLookup.pm.save $(LMP)/MethodLookup.pm
# these shouldn't be needed really
rm -rf $(CURDIR)/t/logs $(CURDIR)/t/run $(MPR)/t/logs $(MPR)/t/run $(APR)/t/logs $(APR)/t/run
find . -name 'Makefile.old' -exec rm '{}' \;
rm -f Apache-Test/Apache-TestItSelf/t/SMOKE t/core
override_dh_auto_install:
rm -f t/core
dh_auto_install
override_dh_install:
mkdir -p $(CURDIR)/debian/docs
perl debian/transform_pod2html.pl $(CURDIR) docs debian
dh_install
mv $(TMP)/usr/bin/mp2bug $(TMP)/usr/share/libapache2-mod-perl2/
rm -r $(TMP)/usr/bin/
install -m755 debian/libapache2-mod-perl2.bug $(TMP)/usr/share/bug/libapache2-mod-perl2
rm $(TMP)/usr/lib/perl5/Apache2/Reload.pm
rm $(TMP)/usr/lib/perl5/Apache/SizeLimit.pm
rm $(TMP)/usr/lib/perl5/Apache/Reload.pm
override_dh_installman:
dh_installman
rm $(TMP)/usr/share/man/man3/Apache2::Reload.3pm
rm $(TMP)/usr/share/man/man3/Apache::SizeLimit.3pm
rm $(TMP)/usr/share/man/man3/Apache::Reload.3pm
override_dh_installexamples:
dh_installexamples
prename 's,\.,,' debian/libapache2-mod-perl2-dev/usr/share/doc/libapache2-mod-perl2-dev/examples/code/.debug-*
# These rules are needed because otherwise the build process
# tries to re-make the 'build' directory and fails
.PHONY: build
build:
dh build
debian/libapache2-mod-perl2-doc.doc-base 0000644 0000000 0000000 00000001005 12200354765 015121 0 ustar Document: libapache2-mod-perl2-doc
Title: Apache2 mod_perl2 documentation
Author: Nicholas Bamber
Abstract:
Mod_perl allows the use of Perl for just about anything
Apache-related, including sections in the config
files and the famous Apache::Registry module for caching
compiled scripts.
Section: Web Development
Format: Text
Files:
/usr/share/doc/libapache2-mod-perl2-doc/todo
Format: HTML
Index: /usr/share/doc/libapache2-mod-perl2-doc/index.html
Files: /usr/share/doc/libapache2-mod-perl2-doc/docs
debian/control 0000644 0000000 0000000 00000005210 12224575374 010602 0 ustar Source: libapache2-mod-perl2
Section: httpd
Priority: optional
Maintainer: Ubuntu Developers
XSBC-Original-Maintainer: Debian Perl Group
Uploaders: Damyan Ivanov ,
Niko Tyni , gregor herrmann ,
Nicholas Bamber , Dominic Hargreaves ,
Ivan Kohler
Standards-Version: 3.9.4
Homepage: http://perl.apache.org/
Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libapache2-mod-perl2.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libapache2-mod-perl2.git
Build-Depends: perl,
apache2-dev (>= 2.4~),
apache2 (>= 2.4~),
dh-apache2,
debhelper (>= 9.20120312),
libbsd-resource-perl,
libdevel-symdump-perl,
libhtml-parser-perl,
libhtml-template-perl,
libperl-dev,
libreadonly-perl,
libwww-perl,
locales,
netbase
Build-Conflicts: apache2-mpm-event
Package: libapache2-mod-perl2
Architecture: any
Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends},
libdevel-symdump-perl,
liburi-perl,
libwww-perl,
netbase
Recommends: libbsd-resource-perl, libapache2-reload-perl
Description: Integration of perl with the Apache2 web server
mod_perl allows the use of Perl for just about anything
Apache-related, including sections in the config
files and the famous Apache::Registry module for caching
compiled scripts.
.
It can produce anywhere from a 400% to 2000% speed increase
on sites using perl scripts, and is used on many large script-
based web sites - for example, http://slashdot.org.
Package: libapache2-mod-perl2-dev
Architecture: all
Section: libdevel
Depends: ${misc:Depends},
libapache2-mod-perl2 (>= ${source:Version}),
libapache2-mod-perl2 (<< ${source:Version}.1~)
Description: Integration of perl with the Apache2 web server - development files
mod_perl allows the use of Perl for just about anything
Apache-related, including sections in the config
files and the famous Apache::Registry module for caching
compiled scripts.
.
This package contains the header files required for building
C-based modules integrating with mod_perl.
Package: libapache2-mod-perl2-doc
Architecture: all
Section: doc
Depends: ${misc:Depends}
Suggests: dwww
Description: Integration of perl with the Apache2 web server - documentation
mod_perl allows the use of Perl for just about anything
Apache-related, including sections in the config
files and the famous Apache::Registry module for caching
compiled scripts.
.
This package contains additional documentation for mod_perl tailored
to be indexed by the doc-base system.
debian/watch 0000644 0000000 0000000 00000000244 12200354765 010223 0 ustar version=3
http://perl.apache.org/dist/mod_perl-([\d\.]+)\.tar\.gz
https://metacpan.org/release/mod_perl/ .*/mod_perl-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)
debian/patches/ 0000755 0000000 0000000 00000000000 13373343070 010620 5 ustar debian/patches/010-doc-no-more-send_http_header.patch 0000644 0000000 0000000 00000001244 12200354765 017556 0 ustar Author: Damyan Ivanov
Description: Can't locate object method "send_http_header"
Trivial patch to remove a stale reference to send_http_header that is no
longer available or necessary
Last-Update: 2011-03-22
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507821
Forwarded: yes
Reviewed-by: Nicholas Bamber
--- a/docs/api/ModPerl/Registry.pod
+++ b/docs/api/ModPerl/Registry.pod
@@ -31,7 +31,6 @@ For example:
my $r = Apache2::RequestUtil->request;
$r->content_type("text/html");
- $r->send_http_header;
$r->print("mod_perl rules!");
XXX: STOPPED here. Below is the old Apache::Registry document which I
debian/patches/200_fix-pod-spelling-errors.patch 0000644 0000000 0000000 00000025127 12200354765 016725 0 ustar Description: Fix spelling errors in documentation
This includes both POD and comments.
The 'overriden -> overridden' fix may also be applied to variable names,
but is not done with this patch.
Forwarded: http://mail-archives.apache.org/mod_mbox/perl-modperl/201004.mbox/thread
Author: Damyan Ivanov
Last-Update: 2011-04-10
Reviewed-by: Nicholas Bamber
--- a/Apache-Test/lib/Apache/TestTrace.pm
+++ b/Apache-Test/lib/Apache/TestTrace.pm
@@ -126,9 +126,9 @@ sub nc_trace {
}
sub trace_level {
- # overriden by user/-trace
+ # overridden by user/-trace
(defined $Level && $levels{$Level}) ||
- # or overriden by env var
+ # or overridden by env var
(exists $ENV{APACHE_TEST_TRACE_LEVEL} &&
$levels{$ENV{APACHE_TEST_TRACE_LEVEL}}) ||
# or default
--- a/Apache-Test/lib/Apache/TestUtil.pm
+++ b/Apache-Test/lib/Apache/TestUtil.pm
@@ -886,7 +886,7 @@ directory separators. The function is no
=item t_start_error_log_watch(), t_finish_error_log_watch()
This pair of functions provides an easy interface for checking
-the presence or absense of any particular message or messages
+the presence or absence of any particular message or messages
in the httpd error_log that were generated by the httpd daemon
as part of a test suite. It is likely, that you should proceed
this with a call to one of the t_*_is_expected() functions.
--- a/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
+++ b/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm
@@ -63,7 +63,7 @@ use constant D_WARN => 2;
use constant D_COMPILE => 4;
use constant D_NOISE => 8;
-# the debug level can be overriden on the main server level of
+# the debug level can be overridden on the main server level of
# httpd.conf with:
# PerlSetVar ModPerl::RegistryCooker::DEBUG 4
use constant DEBUG => 0;
--- a/docs/api/APR.pod
+++ b/docs/api/APR.pod
@@ -18,7 +18,7 @@ libaprutil Libraries)
=head1 Description
-On load this modules prepares the APR enviroment (initializes memory
+On load this modules prepares the APR environment (initializes memory
pools, data structures, etc.)
You don't need to use this module explicitly, since it's already
--- a/docs/api/Apache2/Module.pod
+++ b/docs/api/Apache2/Module.pod
@@ -413,7 +413,7 @@ Remove a module from the list of loaded
=head2 C
-Returns the first module in the module list. Usefull to start a
+Returns the first module in the module list. Useful to start a
module iteration.
$module = Apache2::Module::top_module();
--- a/docs/api/Apache2/Util.pod
+++ b/docs/api/Apache2/Util.pod
@@ -36,7 +36,7 @@ C provides the following
=head2 C
-convert an OS path to a URL in an OS dependant way.
+convert an OS path to a URL in an OS dependent way.
$escaped_path = Apache2::Util::escape_path($path, $p);
$escaped_path = Apache2::Util::escape_path($path, $p, $partial);
--- a/docs/api/ModPerl/MM.pod
+++ b/docs/api/ModPerl/MM.pod
@@ -55,7 +55,7 @@ hasn't already specified a method I will DWIM and do nothing.
In case the functionality of C methods needs to be
-extended, rather than completely overriden, the C methods
+extended, rather than completely overridden, the C methods
can be called internally. For example if you need to modify constants
in addition to the modifications applied by
C, call the C
@@ -72,7 +72,7 @@ not C), then do your extra
In certain cases a developers may want to prevent from C
to override certain methods. In that case an explicit override in
I will do the job. For example if you don't want the
-C method to be overriden by C, add to your
+C method to be overridden by C, add to your
I:
sub MY::constants { shift->MM::constants(@_); }";
@@ -89,7 +89,7 @@ C supplies d
C and C unless they weren't passed to
C from I.
-If the default values aren't satisfying these should be overriden in
+If the default values aren't satisfying these should be overridden in
I. For example to supply an empty INC, explicitly set the
argument in I.
--- a/docs/api/ModPerl/RegistryCooker.pod
+++ b/docs/api/ModPerl/RegistryCooker.pod
@@ -25,7 +25,7 @@ Provide ingredients that can be used by
=item *
-Provide a default behavior, which can be overriden in sub-classed
+Provide a default behavior, which can be overridden in sub-classed
META: in the future this functionality may move into a separate class.
--- a/lib/Apache2/compat.pm
+++ b/lib/Apache2/compat.pm
@@ -254,7 +254,7 @@ sub override_mp2_api {
}
# restore_mp2_api does the opposite of override_mp2_api(), it removes
-# the overriden API and restores the original mod_perl 2.0 API
+# the overridden API and restores the original mod_perl 2.0 API
sub restore_mp2_api {
my (@subs) = @_;
--- a/lib/Apache2/porting.pm
+++ b/lib/Apache2/porting.pm
@@ -84,9 +84,9 @@ BEGIN {
$package =~ s|/|::|g;
$package =~ s|.pm$||;
- # this picks the original require (which could be overriden
+ # this picks the original require (which could be overridden
# elsewhere, so we don't lose that) because we haven't
- # overriden it yet
+ # overridden it yet
return require $_[0] unless $packages{$package};
my $msg = "mod_perl 2.0 API doesn't include package '$package'.";
--- a/xs/APR/Pool/APR__Pool.h
+++ b/xs/APR/Pool/APR__Pool.h
@@ -49,7 +49,7 @@ APR_OPTIONAL_FN_TYPE(modperl_thx_interp_
#define MP_APR_POOL_SV_HAS_OWNERSHIP(sv) mpxs_pool_is_custom(sv)
/* before the magic is freed, one needs to carefully detach the
- * dependant pool magic added by mpxs_add_pool_magic (most of the time
+ * dependent pool magic added by mpxs_add_pool_magic (most of the time
* it'd be a parent pool), and postpone its destruction, until after
* the child pool is destroyed. Since if we don't do that the
* destruction of the parent pool will destroy the child pool C guts
--- a/todo/bugs_build
+++ b/todo/bugs_build
@@ -71,7 +71,7 @@ HPUX11i DSO
* we have a dependency check problem when xs/*/*.h use code from
xs/modperl_xs*.h, when the latter change 'make' won't rebuild the
- dependant files
+ dependent files
* Testing:
Need to put Philippe's smoking test into the core
--- a/docs/api/Apache2/RequestUtil.pod
+++ b/docs/api/Apache2/RequestUtil.pod
@@ -815,7 +815,7 @@ Nothing, except it doesn't work as expec
same code is called in a sub-request then the pnote of $r-Eprev is magically
updated at a distance to the same value!
-Try explain why that is to anyone not deeply familar with perl internals!
+Try to explain why that is to anyone not deeply familiar with perl internals!
The fix is to avoid pnotes taking a ref to the invisible op_targ embededed in
the code by passing a simple lexical variable as the actual argument. That can be done in-line like this:
--- a/docs/user/intro/overview.pod
+++ b/docs/user/intro/overview.pod
@@ -279,7 +279,7 @@ mod_perl 2.0's I. See t
=item *
-The I pragma, which allows to force the code to be super
+The I pragma, which allows one to force the code to be super
clean, via the setting:
use warnings FATAL => 'all';
--- a/docs/user/handlers/http.pod
+++ b/docs/user/handlers/http.pod
@@ -1580,7 +1580,7 @@ There are several usages for this use ph
a cleanup code, for example removing temporarily created files. The
less obvious is to use this phase instead of
C> if the logging operation is time
-consuming. This approach allows to free the client as soon as the
+consuming. This approach allows one to free the client as soon as the
response is sent.
This phase is of type
--- a/docs/user/coding/coding.pod
+++ b/docs/user/coding/coding.pod
@@ -300,7 +300,7 @@ downgrade them to be non-fatal. The foll
no warnings 'redefine';
use warnings 'redefine';
-Perl 5.8.0 allows to do all this in one line:
+Perl 5.8.0 allows one to do all this in one line:
use warnings FATAL => 'all', NONFATAL => 'redefine';
--- a/docs/api/Apache2/SizeLimit.pod
+++ b/docs/api/Apache2/SizeLimit.pod
@@ -147,7 +147,7 @@ the patch is included in the mm-tree (li
to make it into the vanilla kernel in the near future.
F reports various sizes for each memory segment of a
-process and allows to count the amount of shared memory correctly.
+process and allows one to count the amount of shared memory correctly.
If C detects a kernel that supports F
and if the C module is installed it will use them instead of
--- a/docs/api/Apache2/RequestRec.pod
+++ b/docs/api/Apache2/RequestRec.pod
@@ -804,7 +804,7 @@ Get/set MIME response headers, printed o
=back
-See also C>, which allows to
+See also C>, which allows one to
set headers for non-2xx responses and persist across internal
redirects.
--- a/docs/api/ModPerl/RegistryLoader.pod
+++ b/docs/api/ModPerl/RegistryLoader.pod
@@ -175,7 +175,7 @@ otherwise the C<$virtual_hostname> argum
C performs a very simple job, at run time it
loads and sub-classes the module passed via the I attribute
and overrides some of its functions, to emulate the run-time
-environment. This allows to preload the same script into different
+environment. This allows one to preload the same script into different
registry environments.
=head1 Authors
--- a/docs/devel/core/mod_perl_specific.pod
+++ b/docs/devel/core/mod_perl_specific.pod
@@ -131,7 +131,7 @@ a normal Perl handler by modperl_run_fil
retrieve ctx->handler
modperl_output_filter_handler -> modperl_run_filter -> modperl_callback
-This trick allows to have more than one filter handler in the filters
+This trick allows one to have more than one filter handler in the filters
chain using the same Apache filter name (the real filter's name is
stored in ctx-Ehandler-Ename.
--- a/Apache-Test/lib/Apache/Test.pm
+++ b/Apache-Test/lib/Apache/Test.pm
@@ -749,7 +749,7 @@ Same as I, see I docu
=item sok
-Allows to skip a sub-test, controlled from the command line. The
+Allows one to skip a sub-test, controlled from the command line. The
argument to sok() is a CODE reference or a BLOCK whose return value
will be passed to ok(). By default behaves like ok(). If all sub-tests
of the same test are written using sok(), and a test is executed as:
debian/patches/series 0000644 0000000 0000000 00000001254 13373343064 012042 0 ustar avoid-db-linkage.patch
099-fix-url-on-index_top.patch
004-bugs-to-debian-bts.patch
006_man_section_and_build_warnings.patch
010-doc-no-more-send_http_header.patch
030-apxs-no-prefix.patch
031-test-extra-args.patch
200_fix-pod-spelling-errors.patch
210_fix-pod-errors.patch
220_fix-bad-whatis-entry.patch
260_fix_pipelined_response_deadlock.patch
280-ignore-sysconf-for-defines.patch
290-httpd-transition-test-todo.patch
300-http-headers-version.patch
310-defaultruntimedir.patch
320-cleanup-authn-authz-providers.patch
#330-mod_authz_core.patch
340-rewrite-2.4.patch
350-ap-test-apache24-define.patch
CVE-2011-2767.patch
370_http_syntax.patch
380_inject_header_line_terminators.patch
debian/patches/300-http-headers-version.patch 0000644 0000000 0000000 00000002431 12200354765 016215 0 ustar Description: adjust the version check for HTTP::Headers
Origin: vendor
Bug-Debian: http://bugs.debian.org/710873
Forwarded: no
Author: gregor herrmann
Last-Update: 2013-06-03
--- a/t/api/err_headers_out.t
+++ b/t/api/err_headers_out.t
@@ -5,6 +5,8 @@
use Apache::TestRequest;
use Apache::TestUtil;
+use version;
+
plan tests => 6, need 'HTML::HeadParser';
my $location = '/TestAPI__err_headers_out';
@@ -25,7 +27,7 @@
local $HTTP::Headers::TRANSLATE_UNDERSCORE=
$HTTP::Headers::TRANSLATE_UNDERSCORE;
undef $HTTP::Headers::TRANSLATE_UNDERSCORE
- if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00;
+ if defined HTTP::Headers->VERSION and version->parse(HTTP::Headers->VERSION) >= version->parse(6.00);
ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
"X-err_headers_out: made it";
@@ -50,7 +52,7 @@
local $HTTP::Headers::TRANSLATE_UNDERSCORE=
$HTTP::Headers::TRANSLATE_UNDERSCORE;
undef $HTTP::Headers::TRANSLATE_UNDERSCORE
- if defined HTTP::Headers->VERSION and HTTP::Headers->VERSION==6.00;
+ if defined HTTP::Headers->VERSION and version->parse(HTTP::Headers->VERSION) >= version->parse(6.00);
ok t_cmp $res->header('X-err_headers_out'), "err_headers_out",
"X-err_headers_out: made it";
debian/patches/avoid-db-linkage.patch 0000644 0000000 0000000 00000001360 12200354765 014737 0 ustar Author: Damyan Ivanov
Reviewed-by: Nicholas Bamber
Subject: Linking with dbm is unnecessary and causes issues
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621415
Last-Update: 2011-04-10
Forwarded: not-needed
--- a/lib/Apache2/Build.pm
+++ b/lib/Apache2/Build.pm
@@ -1184,6 +1184,8 @@ sub apru_link_flags {
# resolve the symbols right during linking
for ($self->apu_config_path, $self->apr_config_path) {
my $flags = '--link-ld --libs';
+ # we don't use dbm
+ $flags =~ s/--libs/--avoid-dbm --libs/ if $_ eq $self->apu_config_path;
$flags .= ' --ldflags' unless (WIN32);
if (my $link = $_ && -x $_ && qx{$_ $flags}) {
chomp $link;
debian/patches/260_fix_pipelined_response_deadlock.patch 0000644 0000000 0000000 00000007333 12200354765 020622 0 ustar Subject: pipelined response deadlock
Date: Fri, 4 Jan 2013 16:27:07 +0000
From: Zefram
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
Bug-Debian: http://bugs.debian.org/676754
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=82409
Origin: https://rt.cpan.org/Public/Bug/Display.html?id=82409
--- a/t/filter/TestFilter/in_str_declined.pm
+++ b/t/filter/TestFilter/in_str_declined.pm
@@ -35,13 +35,17 @@ sub handler {
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
+++ b/t/filter/TestFilter/in_str_declined_read.pm
@@ -31,14 +31,19 @@ sub handler {
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
+++ b/t/filter/TestFilter/in_str_msg.pm
@@ -76,10 +76,10 @@ my $expected = "UPCASED";
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
+++ b/t/response/TestModperl/post_utf8.pm
@@ -29,14 +29,14 @@ sub handler {
# $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;
debian/patches/310-defaultruntimedir.patch 0000644 0000000 0000000 00000001750 12200354765 015675 0 ustar Description: Since Apache 2.4, DefaultRuntimeDir needs to be set,
otherwise mod_auth_digest tries to write to /var/run and fails (depending
on permissions). Set DefaultRuntimeDir in the generated httpd.conf of
Apache::Test conditionally.
This also means we don't need the extra DefaultRuntimeDir in t/conf/extra.conf.in.
Origin: vendor
Forwarded: no
Author: gregor herrmann ,
Niko Tyni
Last-Update: 2013-06-04
--- a/Apache-Test/lib/Apache/TestConfig.pm
+++ b/Apache-Test/lib/Apache/TestConfig.pm
@@ -2148,6 +2148,10 @@
ErrorLog @t_logs@/error_log
LogLevel debug
+ 2.4.1>
+ DefaultRunTimeDir "@t_logs@"
+
+
TransferLog @t_logs@/access_log
--- a/t/conf/extra.conf.in
+++ b/t/conf/extra.conf.in
@@ -1,6 +1,5 @@
# needed to test $r->psignature
ServerSignature On
-DefaultRuntimeDir run/
# The following tests require more than one interpreter during the
# same request:
debian/patches/320-cleanup-authn-authz-providers.patch 0000644 0000000 0000000 00000002620 12200354765 020054 0 ustar From 75662f4285bad8d28fe787d1293bdd95a535cad1 Mon Sep 17 00:00:00 2001
From: Niko Tyni
Date: Fri, 14 Jun 2013 14:07:22 +0300
Subject: [PATCH] Make sure authn and authz providers are cleaned up in time
The authn and authz providers need to be registered in the configuration
pool rather than the server process pool. The latter outlives the load
time of the mod_perl shared object, so cleanup hooks could get called
after the registered functions were unloaded, causing SIGSEGVs and other
undefined behaviour.
Fix suggested by Stefan Fritsch.
Bug-Debian: http://bugs.debian.org/711213
---
src/modules/perl/modperl_cmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/perl/modperl_cmd.c b/src/modules/perl/modperl_cmd.c
index 4ae0a62..d14b330 100644
--- a/src/modules/perl/modperl_cmd.c
+++ b/src/modules/perl/modperl_cmd.c
@@ -419,7 +419,7 @@ MP_CMD_SRV_DECLARE(init_handlers)
MP_CMD_SRV_DECLARE2(authz_provider)
{
- apr_pool_t *p = parms->server->process->pool;
+ apr_pool_t *p = parms->pool;
char *name = apr_pstrdup(p, arg1);
char *cb = apr_pstrdup(p, arg2);
@@ -431,7 +431,7 @@ MP_CMD_SRV_DECLARE2(authz_provider)
MP_CMD_SRV_DECLARE2(authn_provider)
{
- apr_pool_t *p = parms->server->process->pool;
+ apr_pool_t *p = parms->pool;
char *name = apr_pstrdup(p, arg1);
char *cb = apr_pstrdup(p, arg2);
--
1.7.10.4
debian/patches/280-ignore-sysconf-for-defines.patch 0000644 0000000 0000000 00000001753 12200354765 017323 0 ustar From ce60ebed111b66381b639c51363cb685fb07fd09 Mon Sep 17 00:00:00 2001
From: Niko Tyni
Date: Fri, 24 May 2013 15:30:29 +0300
Subject: [PATCH] Run "httpd -V" with the test config and server root if
available
The system configuration may not be available to the user
building mod_perl, or may depend on special environment variables
or the like, so try to bypass the system configuration altogether.
---
Apache-Test/lib/Apache/TestConfigParse.pm | 7 +++++++
1 file changed, 7 insertions(+)
--- libapache2-mod-perl2.orig/Apache-Test/lib/Apache/TestConfigParse.pm
+++ libapache2-mod-perl2/Apache-Test/lib/Apache/TestConfigParse.pm
@@ -458,6 +458,13 @@
$httpd = shell_ready($httpd);
my $cmd = "$httpd -V";
+
+ my $httpdconf = $self->{vars}->{httpd_conf};
+ $cmd .= " -f $httpdconf" if $httpdconf;
+
+ my $serverroot = $self->{vars}->{serverroot};
+ $cmd .= " -d $serverroot" if $serverroot;
+
my $proc = $self->open_cmd($cmd);
while (<$proc>) {
debian/patches/380_inject_header_line_terminators.patch 0000644 0000000 0000000 00000004057 13373343070 020463 0 ustar 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
Bug-Ubuntu: https://launchpad.net/bugs/1779400
---
t/filter/TestFilter/in_bbs_inject_header.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: libapache2-mod-perl2-2.0.8+httpd24-r1449661/t/filter/TestFilter/in_bbs_inject_header.pm
===================================================================
--- libapache2-mod-perl2-2.0.8+httpd24-r1449661.orig/t/filter/TestFilter/in_bbs_inject_header.pm 2018-11-15 14:17:10.220379962 -0500
+++ libapache2-mod-perl2-2.0.8+httpd24-r1449661/t/filter/TestFilter/in_bbs_inject_header.pm 2018-11-15 14:17:10.220379962 -0500
@@ -180,7 +180,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]";
}
@@ -198,7 +198,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]";
}
debian/patches/370_http_syntax.patch 0000644 0000000 0000000 00000002337 13373337246 014634 0 ustar 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
Bug-Ubuntu: https://launchpad.net/bugs/1779400
---
t/apache/read.t | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libapache2-mod-perl2-2.0.8+httpd24-r1449661/t/apache/read.t
===================================================================
--- libapache2-mod-perl2-2.0.8+httpd24-r1449661.orig/t/apache/read.t 2018-11-15 13:44:52.193191345 -0500
+++ libapache2-mod-perl2-2.0.8+httpd24-r1449661/t/apache/read.t 2018-11-15 13:44:52.189191323 -0500
@@ -23,7 +23,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";
debian/patches/350-ap-test-apache24-define.patch 0000644 0000000 0000000 00000001473 12200354765 016346 0 ustar diff --git a/Apache-Test/lib/Apache/TestServer.pm b/Apache-Test/lib/Apache/TestServer.pm
index 254aec6..a3bc3ab 100644
--- a/Apache-Test/lib/Apache/TestServer.pm
+++ b/Apache-Test/lib/Apache/TestServer.pm
@@ -85,6 +85,15 @@ sub post_config {
$self->{rev} = 0; # unknown
}
+ ($self->{revminor}) = $self->{version} =~ m|/\d\.(\d)|;
+
+ if ($self->{revminor}) {
+ debug "Matched Apache revminor $self->{version} $self->{revminor}";
+ }
+ else {
+ $self->{revminor} = 0;
+ }
+
$self;
}
@@ -126,7 +135,14 @@ sub pid_file {
sub dversion {
my $self = shift;
- "-D APACHE$self->{rev}";
+
+ my $dv = "-D APACHE$self->{rev}";
+
+ if ($self->{rev} == 2 and $self->{revminor} >= 4) {
+ $dv .= " -D APACHE24";
+ }
+
+ return $dv;
}
sub config_defines {
debian/patches/220_fix-bad-whatis-entry.patch 0000644 0000000 0000000 00000001167 12200354765 016200 0 ustar Description: Replace stray POD with =for comment
This is the only documented methd and leaving in =head2 makes the build
system generate a manual page lacking a basic requisite like the whatis
entry (=head1 NAME)
Forwarded: http://mail-archives.apache.org/mod_mbox/perl-modperl/201004.mbox/thread
Author: Damyan Ivanov
Last-Update: 2011-03-22
Reviewed-by: Nicholas Bamber
--- a/Apache-Test/lib/Apache/TestServer.pm
+++ b/Apache-Test/lib/Apache/TestServer.pm
@@ -379,7 +379,7 @@ sub port_available {
}
}
-=head2 stop()
+=for comment head2 stop()
attempt to stop the server.
debian/patches/004-bugs-to-debian-bts.patch 0000644 0000000 0000000 00000001155 12200354765 015533 0 ustar Description: direct bug reports to Debian BTS
Forwarded: not-needed
Author: Gunnar Wolf
Last-Update: 2011-03-22
Reviewed-by: Nicholas Bamber
--- a/lib/ModPerl/TestReport.pm
+++ b/lib/ModPerl/TestReport.pm
@@ -97,7 +97,11 @@ sub package2filename {
return $package;
}
-sub report_to { 'modperl@perl.apache.org' }
-
+# We are reporting to the Debian BTS, not directly to the upstream (Apache)
+sub report_to { 'submit@bugs.debian.org' }
+sub postit_note {
+ # No, no postit notes required :) This report will be typically
+ # embedded in reportbug's, so...
+}
1;
debian/patches/210_fix-pod-errors.patch 0000644 0000000 0000000 00000001360 12200354765 015104 0 ustar Description: Fix POD errors
Forwarded: http://mail-archives.apache.org/mod_mbox/perl-modperl/201004.mbox/thread
Author: Damyan Ivanov
Last-Update: 2011-03-22
Reviewed-by: Nicholas Bamber
--- a/Apache-Test/lib/Apache/Test.pm
+++ b/Apache-Test/lib/Apache/Test.pm
@@ -1020,6 +1020,8 @@ if no reason is given a default reason w
=head1 Additional Configuration Variables
+=over
+
=item basic_config
my $basic_cfg = Apache::Test::basic_config();
@@ -1052,6 +1054,8 @@ If no arguments are passed, the referenc
returned. If one or more arguments are passed the corresponding values
are returned.
+=back
+
=head1 Test::More Integration
There are a few caveats if you want to use I with
debian/patches/290-httpd-transition-test-todo.patch 0000644 0000000 0000000 00000001325 12200354765 017406 0 ustar Description: Mark individual failing tests as TODO rather than ignore the overall test suite exit status
Origin: vendor
Forwarded: no
Author: Dominic Hargreaves
Reviewed-by: gregor herrmann
Last-Update: 2013-06-03
diff --git a/t/directive/perlloadmodule3.t b/t/directive/perlloadmodule3.t
index 8c1d0dc..92d7199 100644
--- a/t/directive/perlloadmodule3.t
+++ b/t/directive/perlloadmodule3.t
@@ -14,7 +14,7 @@ my $path = Apache::TestRequest::module2path($module);
# smaller portions of information, but requires a more elaborate
# logic. Alternatively could use diff($expected, $received).
-plan tests => 3;
+plan tests => 3, todo => [1];
t_debug("connecting to $base_hostport");
{
debian/patches/CVE-2011-2767.patch 0000644 0000000 0000000 00000003742 13373275250 013254 0 ustar From: Markus Koschany
Date: Tue, 18 Sep 2018 19:03:15 +0200
Subject: CVE-2011-2767
Original patch by Jan Ingvoldstad.
Bug-Debian: https://bugs.debian.org/644169
Origin: https://bugs.debian.org/644169#19
---
src/modules/perl/mod_perl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: libapache2-mod-perl2-2.0.8+httpd24-r1449661/src/modules/perl/mod_perl.c
===================================================================
--- libapache2-mod-perl2-2.0.8+httpd24-r1449661.orig/src/modules/perl/mod_perl.c 2018-11-15 08:54:45.412486694 -0500
+++ libapache2-mod-perl2-2.0.8+httpd24-r1449661/src/modules/perl/mod_perl.c 2018-11-15 08:54:45.404486673 -0500
@@ -919,18 +919,18 @@ static const command_rec modperl_cmds[]
MP_CMD_DIR_ITERATE2("PerlAddVar", add_var, "PerlAddVar"),
MP_CMD_DIR_TAKE2("PerlSetEnv", set_env, "PerlSetEnv"),
MP_CMD_SRV_TAKE1("PerlPassEnv", pass_env, "PerlPassEnv"),
- MP_CMD_DIR_RAW_ARGS_ON_READ("