Re: libapreq2: sourceful transition towards Apache 2.4
On Sat, Jul 06, 2013 at 08:02:22PM +0200, Arno Töll wrote:
> Hi sesse,
>
> could you please tell us what the state being with libapreq2 is? It's
> certainly one of these modules which might break in unexpected ways,
> despite of still compiling against the Apache 2.4 API.
> On the other hand, if anyone of you or the Perl guys can tell me the
> module still works once compiled, I'll happily do the Apache 2.4 porting
> on the packaging side.
FWIW I was able to get the libapreq2 test suites to run successfully
with some tweaking, so it doesn't seem to be too broken.
Also, Fedora is on Apache 2.4 and AFAICS they didn't have to do much
porting according to git://pkgs.fedoraproject.org/libapreq2.git
My notes follow:
- "make test" at top level passes the main test suite
but fails in module/ because Apache-Test can't find the MPM module
- so I used a custom Apache2 configuration with just
LoadModule mpm_worker_module "/usr/lib/apache2/modules/mod_mpm_worker.so"
LoadModule authn_core_module "/usr/lib/apache2/modules/mod_authn_core.so"
LoadModule auth_basic_module "/usr/lib/apache2/modules/mod_auth_basic.so"
LoadModule auth_digest_module "/usr/lib/apache2/modules/mod_auth_digest.so"
LoadModule authz_core_module "/usr/lib/apache2/modules/mod_authz_core.so"
LoadModule authz_user_module "/usr/lib/apache2/modules/mod_authz_user.so"
LoadModule authn_file_module "/usr/lib/apache2/modules/mod_authn_file.so"
LoadModule authz_groupfile_module "/usr/lib/apache2/modules/mod_authz_groupfile.so"
LoadModule authz_host_module "/usr/lib/apache2/modules/mod_authz_host.so"
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
and tried to pass that to the test suite with
make test APACHE_TEST_EXTRA_ARGS=-httpd_conf\ /home/niko/tmp/apache2-apreq2.conf
but failed because module/Makefile* doesn't support it, so I patched that in.
- also had to remove a 2.4-incompatible LockFile setting from
glue/perl/t/conf/extra.conf.in and module/t/conf/extra.conf.in.
- the tests in glue/perl/t/apreq/cgi.t failed because they couldn't load
the apreq libraries, so I cheated and just set LD_LIBRARY_PATH:
LD_LIBRARY_PATH=$(pwd)/library/.libs make test APACHE_TEST_EXTRA_ARGS="-httpd_conf ${HOME}/tmp/apache2-apreq2.conf
With that, all the tests I could find passed. I'm attaching the
quick and dirty patches I made.
Hope this helps a bit,
--
Niko Tyni ntyni@debian.org
>From a33552a27e41a6e5f6db8bb51e6cf043e9a2376d Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Mon, 8 Jul 2013 22:01:26 +0300
Subject: [PATCH 1/3] The LockFile setting is incompatible with 2.4
This should really be guarded with <IfVersion> or something like that.
---
glue/perl/t/conf/extra.conf.in | 4 ----
module/t/conf/extra.conf.in | 4 ----
2 files changed, 8 deletions(-)
diff --git a/glue/perl/t/conf/extra.conf.in b/glue/perl/t/conf/extra.conf.in
index 8a04f07..fddedea 100644
--- a/glue/perl/t/conf/extra.conf.in
+++ b/glue/perl/t/conf/extra.conf.in
@@ -6,10 +6,6 @@
ScriptAlias /cgi-bin/ "@ServerRoot@/cgi-bin/"
</IfModule>
-<IfModule !mpm_winnt.c>
- LockFile @ServerRoot@/logs/accept.lock
-</IfModule>
-
<Directory "@ServerRoot@/cgi-bin">
AllowOverride None
Options None
diff --git a/module/t/conf/extra.conf.in b/module/t/conf/extra.conf.in
index 9fab9cf..d6899e5 100644
--- a/module/t/conf/extra.conf.in
+++ b/module/t/conf/extra.conf.in
@@ -2,10 +2,6 @@
ScriptAlias /cgi-bin/ "@ServerRoot@/cgi-bin/"
</IfModule>
-<IfModule !mpm_winnt.c>
- LockFile @ServerRoot@/logs/accept.lock
-</IfModule>
-
<Directory "@ServerRoot@/cgi-bin">
AllowOverride None
Options None
--
1.7.10.4
>From a8f969dfd277f35ce9809cebd100448659987d1e Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Mon, 8 Jul 2013 22:02:40 +0300
Subject: [PATCH 2/3] Honour APACHE_TEST_EXTRA_ARGS, introduced in Apache-Test
1.13
---
module/Makefile.am | 4 ++--
module/Makefile.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/module/Makefile.am b/module/Makefile.am
index 6a2f88e..be8ee62 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -10,7 +10,7 @@ run_tests : t/TEST
if [ ! -d t/cgi-bin ]; then mkdir t/cgi-bin; fi
-cp -f test_cgi t/cgi-bin
-cp -Rp .libs t/cgi-bin
- MAKE=$(MAKE) @PERL@ t/TEST
+ MAKE=$(MAKE) @PERL@ t/TEST $(APACHE_TEST_EXTRA_ARGS)
t/TEST : Makefile.am t/TEST.PL
@PERL@ -MApache::TestMM -e '$(TEST_CONFIG_SCRIPT)' -- -apxs @APACHE2_APXS@
@@ -19,7 +19,7 @@ test :: all check run_tests
test_clean : cmodules_clean
-MAKE=$(MAKE) @PERL@ t/TEST -clean
- -rm -rf t/htdocs t/logs t/modules t/TEST t/core t/core.* t/cgi-bin/test_cgi t/cgi-bin/.libs t/.libs t/conf/extra.conf t/conf/ssl/ca t/conf/ssl/httpd-passphrase.pl
+ -rm -rf t/htdocs t/logs t/modules t/TEST $(APACHE_TEST_EXTRA_ARGS) t/core t/core.* t/cgi-bin/test_cgi t/cgi-bin/.libs t/.libs t/conf/extra.conf t/conf/ssl/ca t/conf/ssl/httpd-passphrase.pl
cmodules_clean:
-cd t/c-modules && $(MAKE) clean
diff --git a/module/Makefile.in b/module/Makefile.in
index c5bddae..078ff32 100644
--- a/module/Makefile.in
+++ b/module/Makefile.in
@@ -578,7 +578,7 @@ run_tests : t/TEST
if [ ! -d t/cgi-bin ]; then mkdir t/cgi-bin; fi
-cp -f test_cgi t/cgi-bin
-cp -Rp .libs t/cgi-bin
- MAKE=$(MAKE) @PERL@ t/TEST
+ MAKE=$(MAKE) @PERL@ t/TEST $(APACHE_TEST_EXTRA_ARGS)
t/TEST : Makefile.am t/TEST.PL
@PERL@ -MApache::TestMM -e '$(TEST_CONFIG_SCRIPT)' -- -apxs @APACHE2_APXS@
@@ -587,7 +587,7 @@ test :: all check run_tests
test_clean : cmodules_clean
-MAKE=$(MAKE) @PERL@ t/TEST -clean
- -rm -rf t/htdocs t/logs t/modules t/TEST t/core t/core.* t/cgi-bin/test_cgi t/cgi-bin/.libs t/.libs t/conf/extra.conf t/conf/ssl/ca t/conf/ssl/httpd-passphrase.pl
+ -rm -rf t/htdocs t/logs t/modules t/TEST $(APACHE_TEST_EXTRA_ARGS) t/core t/core.* t/cgi-bin/test_cgi t/cgi-bin/.libs t/.libs t/conf/extra.conf t/conf/ssl/ca t/conf/ssl/httpd-passphrase.pl
cmodules_clean:
-cd t/c-modules && $(MAKE) clean
--
1.7.10.4
>From 6d875dddc4b905a3983ec084bf8c333203289c5d Mon Sep 17 00:00:00 2001
From: Niko <niko@madeleine.local.invalid>
Date: Mon, 8 Jul 2013 22:12:06 +0300
Subject: [PATCH 3/3] Pass APACHE_TEST_EXTRA_ARGS to the subdirectory test
suites
---
Makefile.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 28cb750..668ce93 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -796,16 +796,16 @@ docs/apr.tag:
test: all library_test module_test $(PERL_TEST)
module_test:
- cd module; $(MAKE) test
+ cd module; $(MAKE) test APACHE_TEST_EXTRA_ARGS="$(APACHE_TEST_EXTRA_ARGS)"
library_test:
- cd library; $(MAKE) test
+ cd library; $(MAKE) test APACHE_TEST_EXTRA_ARGS="$(APACHE_TEST_EXTRA_ARGS)"
perl_install:
cd glue/perl; $(MAKE) install
perl_test:
- cd glue/perl; $(MAKE) test
+ cd glue/perl; $(MAKE) test APACHE_TEST_EXTRA_ARGS="$(APACHE_TEST_EXTRA_ARGS)"
perl_glue:
cd glue/perl; @PERL@ ../../build/xsbuilder.pl run
--
1.7.10.4
Reply to: