OK, here are the results of my initial tests. See ++ TEST ++ at
the end of these notes for the results
Sun Aug 3 07:01:46 PDT 2014
I started with FreeBSD 93, perl5.16
test94: {90} # uname -a
FreeBSD test94.private 9.3-RELEASE FreeBSD 9.3-RELEASE #0 r268512:
Thu Jul 10 23:44:39 UTC 2014
r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
test94: {92} # perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for
amd64-freebsd-thread-multi
test94: {93} # pkg info perl5
perl5-5.16.3_11
Name : perl5
Version : 5.16.3_11
Installed on : Tue Jul 29 07:04:39 PDT 2014
Origin : lang/perl5.16
Architecture : freebsd:9:x86:64
Prefix : /usr/local
Categories : perl5 lang devel
Licenses : GPLv1 or ART10
Maintainer : p...@freebsd.org
WWW : http://www.perl.org/
Comment : Practical Extraction and Report Language
Options :
DEBUG : off
GDBM : off
MULTIPLICITY : off
PERL_64BITINT : on
PERL_MALLOC : off
PTHREAD : on
SITECUSTOMIZE : off
THREADS : on
USE_PERL : on
Shared Libs required:
libperl.so
Annotations :
cpe : cpe:/a:perl:perl:5.16.3::~~~freebsd~~
Flat size : 47.4MiB
Description :
Perl is a language that combines some of the features of C, sed, awk and
shell. See the manual page for more hype. There are also many books
published by O'Reilly & Assoc. See pod/perlbook.pod for more
information.
***************
Now read the article:
https://forums.freebsd.org/viewtopic.php?f=5&t=46523. We are
going to do some of the steps, with minor modifications.
1. Install apache24
#> cd /usr/ports/www/apache24
#> make install
OR
pkg install apache24
2. Start to install mod_perl2, fetch the source code:
#> cd /usr/ports/www/mod_perl2
#> make fetch
This will fetch mod_perl-2.0.8.tar.gz and put it in
/usr/ports/distfiles
Now untar mod_perl-2.0.8.tar.gz
#> cd /usr/ports/distfiles
#> tar xvf mod_perl-2.0.8.tar.gz
3. We will create a dummy mod_perl-2.0.9 distribution file. We
will need the Apache-Reload, Apache-SizeLimit, and Apache-Test
Perl Modules from mod_perl-2.0.8 , which are not in the SVN
distribution we are going to fetch, but are in the mod_perl-2.0.8
distribution. Note that these appear to be the latest versions;
if in doubt check the Apache Web site.
#> mkdir mod_perl-2.0.9
#> tar cf - -C mod_perl-2.0.8 Apache-Reload Apache-SizeLimit
Apache-Test | tar xvf - -C mod_perl-2.0.9
4. Now get the latest http24 branch from the Apache Mod_perl SVN
repository:
You may need to install wget:
#> pkg install wget
#> wget --no-parent -r
http://svn.apache.org/repos/asf/perl/modperl/branches/httpd24/
This will create a
svn.apache.org/repos/asf/perl/modperl/branches/httpd24 directory.
Now we copy these files to the mod_perl-2.0.9 directory:
#> tar cf - -C
svn.apache.org/repos/asf/perl/modperl/branches/httpd24 . | tar xvf -
-C mod_perl-2.0.9
#> ls mod_perl-2.0.9
Apache-Reload LICENSE README bin t
Apache-SizeLimit META.yml README-SVN
build todo
Apache-Test Makefile.PL RELEASE
index.html util
BRANCHING Makefile.old STATUS
lib xs
Changes ModPerl-Registry SVN-MOVE
patches
INSTALL NOTICE WrapXS src
5. Create a tar file of mod_perl-2.0.9
#> tar cfz mod_perl-2.0.9.tar.gz mod_perl-2.0.9
6. Now we modify the www/mod_perl2 port
#> cd /usr/ports/www/mod_perl2
Edit Makefile, and make the following changes:
a) we set PORTVERSION to 2.0.9
b) we set USET_APACHE to 22+
c) remove the 'Broken' warning
*** 2,8 ****
# $FreeBSD: head/www/mod_perl2/Makefile 362013 2014-07-15
22:14:23Z ohauer $
PORTNAME= mod_perl
! PORTVERSION= 2.0.8
PORTREVISION= 1
PORTEPOCH= 3
CATEGORIES= www perl5
--- 2,8 ----
# $FreeBSD: head/www/mod_perl2/Makefile 362013 2014-07-15
22:14:23Z ohauer $
PORTNAME= mod_perl
! PORTVERSION= 2.0.9
PORTREVISION= 1
PORTEPOCH= 3
CATEGORIES= www perl5
***************
*** 18,34 ****
SUB_FILES= pkg-message
SUB_LIST= APACHEMODDIR=${APACHEMODDIR}
! USE_APACHE= 22
USES= gmake perl5
USE_PERL5= configure
USE_CSTD= gnu89
.include <bsd.port.pre.mk>
- .if ${APACHE_VERSION} > 22
- BROKEN= Does not build with apache24
- .endif
-
# Using apxs in this way is problematic if apache2 is installed
under a
# different PREFIX than mod_perl2, because the mod_perl2
installation will
# use paths returned by apxs to install some components. Fixes
welcome.
--- 18,30 ----
SUB_FILES= pkg-message
SUB_LIST= APACHEMODDIR=${APACHEMODDIR}
! USE_APACHE= 22+
USES= gmake perl5
USE_PERL5= configure
USE_CSTD= gnu89
.include <bsd.port.pre.mk>
# Using apxs in this way is problematic if apache2 is installed
under a
# different PREFIX than mod_perl2, because the mod_perl2
installation will
# use paths returned by apxs to install some components. Fixes
welcome.
6. This is a bit tricky, and thanks to the Ports folks for showing me
this.
First, We now set the checksums in distinfo.orig to match the
newly created tar file:
#> make makesum
7. Now for the acid test, we try to compile this:
#> make build
(See build.log)
++++++++++++++++++ TEST ++++++++++++++++++
But Does It Work?
See next section for detail
++++++++++++++++++++++++++++++++++++++++++
8. If we want to install it, we should update the pkg-plist:
#> make makeplist >pkg-plist
#> vi pkg-plist
Get rid of junk lines, delete from the first line up to and
including
/you/have/to/check/what/makeplist/gives/you
9. Now you can try to install it:
#> make install
10. You now need to edit /usr/local/etc/apache24/httpd.d and add:
LoadModule perl_module libexec/apache24/mod_perl.so
++++++++++++++++++ TEST ++++++++++++++++++
After all of this effort, I expected mod_perl2 to fail all of the
tests. The mod_perl tests cannot be done by root so you will have
to use another user. First you will need to set up a suitable test
user. AND... Part of the tests require writing a file to /var/run.
AND... during the tests you will write a log file to the t/logs/\
directory in the mod_perl source.
So...
1. Create a user say, admin.
2. Add it to group wheel (see FreeBSD Handbook).
3. #> ls -ld /var/run
drwxr-xr-x 12 root wheel 1024 Aug 2 19:03 /var/run
. #> chmod g+w /var/run
4. #> cd /usr/port/www/mod_perl2
We need to set ownership of the work directory to the test user:
#> chown -R admin work
5. Now we run our tests as user admin:
#> su admin
%> make test |&tee test.log
Here is an extract from test.log showing the failues. Note that
most of the failed test are for Apache, and may be common to the
baseline Apache distribution.
# Failed test 5 in t/apache/scanhdrs2.t at line 33
I suspect that this test is due to the change in the API from
2.2 to 2.4.
# Failed test 4 in t/hooks/authen_digest.t at line 35
# Failed test 5 in t/hooks/authen_digest.t at line 37
# Failed test 6 in t/hooks/authen_digest.t at line 41
# Failed test 7 in t/hooks/authen_digest.t at line 45
Again, apache22 authentication support (Allow,deny) is now
obsolete. See http://httpd.apache.org/docs/2.4/upgrading.html
The 'Order deny, allow Deny from all' is now 'Require all deny'
I suspect that these tests might need to be updated for
apache24 or separate tests done for apache22 and apache24
# Failed test 2 in t/modules/cgi.t at line 35
# Failed test 5 in t/modules/cgi.t at line 60
# Failed test 3 in t/modules/cgi2.t at line 43
# Failed test 4 in t/modules/cgipost.t at line 34 fail #4
# Failed test 4 in t/modules/cgipost2.t at line 34 fail #4
# Failed test 1 in t/modules/cgiupload.t at line 36
# Failed test 2 in t/modules/cgiupload2.t at line 36 fail #2
I suspect that there has been some change in the API for CGI
support. This needs to be reviewed and the cause
of the failure determined.
t/apache/scanhdrs2.t (Wstat: 0 Tests: 5 Failed: 1)
Failed test: 5
t/compat/conn_rec.t (Wstat: 0 Tests: 2 Failed: 0)
t/hooks/authen_digest.t (Wstat: 0 Tests: 7 Failed: 4)
Failed tests: 4-7
t/modules/cgi.t (Wstat: 0 Tests: 5 Failed: 2)
Failed tests: 2, 5
t/modules/cgi2.t (Wstat: 0 Tests: 5 Failed: 1)
Failed test: 3
t/modules/cgipost.t (Wstat: 0 Tests: 6 Failed: 1)
Failed test: 4
t/modules/cgipost2.t (Wstat: 0 Tests: 6 Failed: 1)
Failed test: 4
t/modules/cgiupload.t (Wstat: 0 Tests: 2 Failed: 1)
Failed test: 1
t/modules/cgiupload2.t (Wstat: 0 Tests: 2 Failed: 1)
Failed test: 2
Failed 9/249 test programs. 12/4535 subtests failed.
On 08/01/14 14:34, Kurt Jaeger wrote:
Hi!
Question: when will mod_perl be available for Apache 24?
There's a PR where people are discussing this:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191471
This PR needs more testers etc.
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"