On Thu, May 14, 2015 at 05:15:05PM -0700, Andrew Fresh wrote: > On Thu, May 14, 2015 at 01:20:25PM +0200, Stefan Sperling wrote: > > On Thu, May 14, 2015 at 01:17:31PM +0200, Stefan Sperling wrote: > > > Let's just mark the port BROKEN temporarily until 2.0.9 appears. > > > > Oh, but there's the perl ithreads issue, too. > > Which might prevent an upgrade. > > Does anyone have comments on that? > > Is there something I don't know? The docs I see claim you can build the > static pre-fork build without ithreads. > > https://perl.apache.org/docs/2.0/user/install/install.html > > "don't enable it unless you really need it." > > It may need to be told that with configure options.
So what happened here is that httpd 2.4 made MPM modules a run-time option. In previous httpd versions a particular MPM had to be chosen at compile time but this is no longer the case. The httpd 2.4 port will compile all available MPMs. Some MPMs require threads (worker, event), some don't (prefork). mod_perl's Makefile.PL simply requires threads by default with httpd 2.4: # For httpd-2.4, we can't use mpm_is_threaded(), because MPMs are loadable # modules. We therefore treat httpd as a whole project as threaded. It is # still possible to disable threading by using MP_NO_THREADS=1 if ($httpd_version lt MIN_HTTPD_24_VERSION) { $build_threaded = $build->mpm_is_threaded(); $mpm = $build->mpm_name(); } else { if ($build->{MP_NO_THREADS}) { $build_threaded = 0; } else { $build_threaded = 1; } } MP_NO_THREADS=1 lets it build. I think this means mod_perl will only work with the prefork MPM. My current httpd 2.4 diff makes 'worker' the default. I suppose we should keep prefork as httpd2's default MPM to keep mod_perl working out of the box. Are there any good arguements for not keeping prefork as default MPM? The worker MPM provides an advantage for Subversion: The server makes heavy use of per-process caches which can be shared across workers with threaded MPMs but not with prefork. But Subversion users who really care about performance already need to change several other default settings as well so changing the default MPM doesn't buy them much. Below is a diff to update ap2-mod_perl to 2.0.9-rc1. This packages fine but I haven't tested runtime operation. Any mod_perl users want to test this? Index: Makefile =================================================================== RCS file: /cvs/ports/www/ap2-mod_perl/Makefile,v retrieving revision 1.26 diff -u -p -r1.26 Makefile --- Makefile 5 Nov 2014 11:43:59 -0000 1.26 +++ Makefile 15 May 2015 06:58:06 -0000 @@ -2,10 +2,9 @@ COMMENT= module that embeds a Perl interpreter into Apache2 -DISTNAME= mod_perl-2.0.8 +DISTNAME= mod_perl-2.0.9-rc1 PKGNAME= ap2-${DISTNAME} CATEGORIES= www net -REVISION= 1 MODULES= cpan converters/libiconv MASTER_SITES= ${MASTER_SITE_APACHE:=perl/} @@ -19,12 +18,14 @@ WANTLIB += apr-1 aprutil-1 c db expat m SHARED_ONLY= Yes -CONFIGURE_ARGS+= MP_APXS=${LOCALBASE}/sbin/apxs2 +CONFIGURE_ARGS+= MP_APXS=${LOCALBASE}/sbin/apxs2 \ + MP_NO_THREADS=1 LIB_DEPENDS= devel/apr \ devel/apr-util RUN_DEPENDS= www/apache-httpd BUILD_DEPENDS= ${RUN_DEPENDS} \ - www/p5-Apache-Test>=1.29 + www/p5-Apache-Test>=1.29 \ + www/p5-Apache-Reload PORTHOME= ${WRKDIR} Index: distinfo =================================================================== RCS file: /cvs/ports/www/ap2-mod_perl/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- distinfo 21 Mar 2014 17:26:04 -0000 1.5 +++ distinfo 15 May 2015 06:53:20 -0000 @@ -1,2 +1,2 @@ -SHA256 (mod_perl-2.0.8.tar.gz) = NdwbekCpCjlc6Iu6LfhPIiiZdfNNF1febXFVYMIKIOY= -SIZE (mod_perl-2.0.8.tar.gz) = 3790026 +SHA256 (mod_perl-2.0.9-rc1.tar.gz) = 6JqPgJxX2zJ+yetE6OaK4yLu+w5Z1qJroBHf0NyZLRA= +SIZE (mod_perl-2.0.9-rc1.tar.gz) = 3845360 Index: pkg/MESSAGE =================================================================== RCS file: pkg/MESSAGE diff -N pkg/MESSAGE --- pkg/MESSAGE 10 Jan 2007 14:22:00 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,8 +0,0 @@ -Before you can use ap2-mod_perl, you need to enable it on your -Apache2 configuration. - -Edit ${SYSCONFDIR}/apache2/httpd2.conf and add the following line: - - LoadModule perl_module ${PREFIX}/lib/apache2/mod_perl.so - -Restart your httpd2 for changes to make effect. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/www/ap2-mod_perl/pkg/PLIST,v retrieving revision 1.8 diff -u -p -r1.8 PLIST --- pkg/PLIST 14 Jun 2014 10:34:45 -0000 1.8 +++ pkg/PLIST 15 May 2015 07:17:06 -0000 @@ -52,6 +52,57 @@ include/apache2/modperl_xs_sv_convert.h include/apache2/modperl_xs_typedefs.h include/apache2/modperl_xs_util.h lib/apache2/mod_perl.so +@comment ${P5ARCH}/auto/APR/APR.bs +@comment ${P5ARCH}/auto/APR/Base64/Base64.bs +@comment ${P5ARCH}/auto/APR/Brigade/Brigade.bs +@comment ${P5ARCH}/auto/APR/Bucket/Bucket.bs +@comment ${P5ARCH}/auto/APR/BucketAlloc/BucketAlloc.bs +@comment ${P5ARCH}/auto/APR/BucketType/BucketType.bs +@comment ${P5ARCH}/auto/APR/Const/Const.bs +@comment ${P5ARCH}/auto/APR/Date/Date.bs +@comment ${P5ARCH}/auto/APR/Error/Error.bs +@comment ${P5ARCH}/auto/APR/Finfo/Finfo.bs +@comment ${P5ARCH}/auto/APR/IpSubnet/IpSubnet.bs +@comment ${P5ARCH}/auto/APR/OS/OS.bs +@comment ${P5ARCH}/auto/APR/PerlIO/PerlIO.bs +@comment ${P5ARCH}/auto/APR/Pool/Pool.bs +@comment ${P5ARCH}/auto/APR/SockAddr/SockAddr.bs +@comment ${P5ARCH}/auto/APR/Socket/Socket.bs +@comment ${P5ARCH}/auto/APR/Status/Status.bs +@comment ${P5ARCH}/auto/APR/String/String.bs +@comment ${P5ARCH}/auto/APR/Table/Table.bs +@comment ${P5ARCH}/auto/APR/ThreadMutex/ThreadMutex.bs +@comment ${P5ARCH}/auto/APR/ThreadRWLock/ThreadRWLock.bs +@comment ${P5ARCH}/auto/APR/URI/URI.bs +@comment ${P5ARCH}/auto/APR/UUID/UUID.bs +@comment ${P5ARCH}/auto/APR/Util/Util.bs +@comment ${P5ARCH}/auto/Apache2/Access/Access.bs +@comment ${P5ARCH}/auto/Apache2/CmdParms/CmdParms.bs +@comment ${P5ARCH}/auto/Apache2/Command/Command.bs +@comment ${P5ARCH}/auto/Apache2/Connection/Connection.bs +@comment ${P5ARCH}/auto/Apache2/ConnectionUtil/ConnectionUtil.bs +@comment ${P5ARCH}/auto/Apache2/Const/Const.bs +@comment ${P5ARCH}/auto/Apache2/Directive/Directive.bs +@comment ${P5ARCH}/auto/Apache2/Filter/Filter.bs +@comment ${P5ARCH}/auto/Apache2/FilterRec/FilterRec.bs +@comment ${P5ARCH}/auto/Apache2/HookRun/HookRun.bs +@comment ${P5ARCH}/auto/Apache2/Log/Log.bs +@comment ${P5ARCH}/auto/Apache2/MPM/MPM.bs +@comment ${P5ARCH}/auto/Apache2/Module/Module.bs +@comment ${P5ARCH}/auto/Apache2/Process/Process.bs +@comment ${P5ARCH}/auto/Apache2/RequestIO/RequestIO.bs +@comment ${P5ARCH}/auto/Apache2/RequestRec/RequestRec.bs +@comment ${P5ARCH}/auto/Apache2/RequestUtil/RequestUtil.bs +@comment ${P5ARCH}/auto/Apache2/Response/Response.bs +@comment ${P5ARCH}/auto/Apache2/ServerRec/ServerRec.bs +@comment ${P5ARCH}/auto/Apache2/ServerUtil/ServerUtil.bs +@comment ${P5ARCH}/auto/Apache2/SubProcess/SubProcess.bs +@comment ${P5ARCH}/auto/Apache2/SubRequest/SubRequest.bs +@comment ${P5ARCH}/auto/Apache2/URI/URI.bs +@comment ${P5ARCH}/auto/Apache2/Util/Util.bs +@comment ${P5ARCH}/auto/ModPerl/Const/Const.bs +@comment ${P5ARCH}/auto/ModPerl/Global/Global.bs +@comment ${P5ARCH}/auto/ModPerl/Util/Util.bs ${P5ARCH}/ ${P5ARCH}/APR/ ${P5ARCH}/APR.pm @@ -104,6 +155,7 @@ ${P5ARCH}/Apache2/PerlSections/ ${P5ARCH}/Apache2/PerlSections.pm ${P5ARCH}/Apache2/PerlSections/Dump.pm ${P5ARCH}/Apache2/Process.pm +${P5ARCH}/Apache2/Provider.pm ${P5ARCH}/Apache2/Reload.pm ${P5ARCH}/Apache2/RequestIO.pm ${P5ARCH}/Apache2/RequestRec.pm @@ -153,162 +205,113 @@ ${P5ARCH}/ModPerl/Util.pm ${P5ARCH}/ModPerl/WrapXS.pm ${P5ARCH}/auto/ ${P5ARCH}/auto/APR/ -@comment ${P5ARCH}/auto/APR/APR.bs ${P5ARCH}/auto/APR/APR.so ${P5ARCH}/auto/APR/Base64/ -@comment ${P5ARCH}/auto/APR/Base64/Base64.bs ${P5ARCH}/auto/APR/Base64/Base64.so ${P5ARCH}/auto/APR/Brigade/ -@comment ${P5ARCH}/auto/APR/Brigade/Brigade.bs ${P5ARCH}/auto/APR/Brigade/Brigade.so ${P5ARCH}/auto/APR/Bucket/ -@comment ${P5ARCH}/auto/APR/Bucket/Bucket.bs ${P5ARCH}/auto/APR/Bucket/Bucket.so ${P5ARCH}/auto/APR/BucketAlloc/ -@comment ${P5ARCH}/auto/APR/BucketAlloc/BucketAlloc.bs ${P5ARCH}/auto/APR/BucketAlloc/BucketAlloc.so ${P5ARCH}/auto/APR/BucketType/ -@comment ${P5ARCH}/auto/APR/BucketType/BucketType.bs ${P5ARCH}/auto/APR/BucketType/BucketType.so ${P5ARCH}/auto/APR/Const/ -@comment ${P5ARCH}/auto/APR/Const/Const.bs ${P5ARCH}/auto/APR/Const/Const.so ${P5ARCH}/auto/APR/Date/ -@comment ${P5ARCH}/auto/APR/Date/Date.bs ${P5ARCH}/auto/APR/Date/Date.so ${P5ARCH}/auto/APR/Error/ -@comment ${P5ARCH}/auto/APR/Error/Error.bs ${P5ARCH}/auto/APR/Error/Error.so ${P5ARCH}/auto/APR/Finfo/ -@comment ${P5ARCH}/auto/APR/Finfo/Finfo.bs ${P5ARCH}/auto/APR/Finfo/Finfo.so ${P5ARCH}/auto/APR/IpSubnet/ -@comment ${P5ARCH}/auto/APR/IpSubnet/IpSubnet.bs ${P5ARCH}/auto/APR/IpSubnet/IpSubnet.so ${P5ARCH}/auto/APR/OS/ -@comment ${P5ARCH}/auto/APR/OS/OS.bs ${P5ARCH}/auto/APR/OS/OS.so ${P5ARCH}/auto/APR/PerlIO/ -@comment ${P5ARCH}/auto/APR/PerlIO/PerlIO.bs ${P5ARCH}/auto/APR/PerlIO/PerlIO.so ${P5ARCH}/auto/APR/Pool/ -@comment ${P5ARCH}/auto/APR/Pool/Pool.bs ${P5ARCH}/auto/APR/Pool/Pool.so ${P5ARCH}/auto/APR/SockAddr/ -@comment ${P5ARCH}/auto/APR/SockAddr/SockAddr.bs ${P5ARCH}/auto/APR/SockAddr/SockAddr.so ${P5ARCH}/auto/APR/Socket/ -@comment ${P5ARCH}/auto/APR/Socket/Socket.bs ${P5ARCH}/auto/APR/Socket/Socket.so ${P5ARCH}/auto/APR/Status/ -@comment ${P5ARCH}/auto/APR/Status/Status.bs ${P5ARCH}/auto/APR/Status/Status.so ${P5ARCH}/auto/APR/String/ -@comment ${P5ARCH}/auto/APR/String/String.bs ${P5ARCH}/auto/APR/String/String.so ${P5ARCH}/auto/APR/Table/ -@comment ${P5ARCH}/auto/APR/Table/Table.bs ${P5ARCH}/auto/APR/Table/Table.so ${P5ARCH}/auto/APR/ThreadMutex/ -@comment ${P5ARCH}/auto/APR/ThreadMutex/ThreadMutex.bs ${P5ARCH}/auto/APR/ThreadMutex/ThreadMutex.so ${P5ARCH}/auto/APR/ThreadRWLock/ -@comment ${P5ARCH}/auto/APR/ThreadRWLock/ThreadRWLock.bs ${P5ARCH}/auto/APR/ThreadRWLock/ThreadRWLock.so ${P5ARCH}/auto/APR/URI/ -@comment ${P5ARCH}/auto/APR/URI/URI.bs ${P5ARCH}/auto/APR/URI/URI.so ${P5ARCH}/auto/APR/UUID/ -@comment ${P5ARCH}/auto/APR/UUID/UUID.bs ${P5ARCH}/auto/APR/UUID/UUID.so ${P5ARCH}/auto/APR/Util/ -@comment ${P5ARCH}/auto/APR/Util/Util.bs ${P5ARCH}/auto/APR/Util/Util.so ${P5ARCH}/auto/Apache2/ ${P5ARCH}/auto/Apache2/Access/ -@comment ${P5ARCH}/auto/Apache2/Access/Access.bs ${P5ARCH}/auto/Apache2/Access/Access.so ${P5ARCH}/auto/Apache2/Build/ ${P5ARCH}/auto/Apache2/Build/autosplit.ix ${P5ARCH}/auto/Apache2/CmdParms/ -@comment ${P5ARCH}/auto/Apache2/CmdParms/CmdParms.bs ${P5ARCH}/auto/Apache2/CmdParms/CmdParms.so ${P5ARCH}/auto/Apache2/Command/ -@comment ${P5ARCH}/auto/Apache2/Command/Command.bs ${P5ARCH}/auto/Apache2/Command/Command.so ${P5ARCH}/auto/Apache2/Connection/ -@comment ${P5ARCH}/auto/Apache2/Connection/Connection.bs ${P5ARCH}/auto/Apache2/Connection/Connection.so ${P5ARCH}/auto/Apache2/ConnectionUtil/ -@comment ${P5ARCH}/auto/Apache2/ConnectionUtil/ConnectionUtil.bs ${P5ARCH}/auto/Apache2/ConnectionUtil/ConnectionUtil.so ${P5ARCH}/auto/Apache2/Const/ -@comment ${P5ARCH}/auto/Apache2/Const/Const.bs ${P5ARCH}/auto/Apache2/Const/Const.so ${P5ARCH}/auto/Apache2/Directive/ -@comment ${P5ARCH}/auto/Apache2/Directive/Directive.bs ${P5ARCH}/auto/Apache2/Directive/Directive.so ${P5ARCH}/auto/Apache2/Filter/ -@comment ${P5ARCH}/auto/Apache2/Filter/Filter.bs ${P5ARCH}/auto/Apache2/Filter/Filter.so ${P5ARCH}/auto/Apache2/FilterRec/ -@comment ${P5ARCH}/auto/Apache2/FilterRec/FilterRec.bs ${P5ARCH}/auto/Apache2/FilterRec/FilterRec.so ${P5ARCH}/auto/Apache2/HookRun/ -@comment ${P5ARCH}/auto/Apache2/HookRun/HookRun.bs ${P5ARCH}/auto/Apache2/HookRun/HookRun.so ${P5ARCH}/auto/Apache2/Log/ -@comment ${P5ARCH}/auto/Apache2/Log/Log.bs ${P5ARCH}/auto/Apache2/Log/Log.so ${P5ARCH}/auto/Apache2/MPM/ -@comment ${P5ARCH}/auto/Apache2/MPM/MPM.bs ${P5ARCH}/auto/Apache2/MPM/MPM.so ${P5ARCH}/auto/Apache2/Module/ -@comment ${P5ARCH}/auto/Apache2/Module/Module.bs ${P5ARCH}/auto/Apache2/Module/Module.so ${P5ARCH}/auto/Apache2/Process/ -@comment ${P5ARCH}/auto/Apache2/Process/Process.bs ${P5ARCH}/auto/Apache2/Process/Process.so +${P5ARCH}/auto/Apache2/Provider/ +${P5ARCH}/auto/Apache2/Provider/Provider.so ${P5ARCH}/auto/Apache2/RequestIO/ -@comment ${P5ARCH}/auto/Apache2/RequestIO/RequestIO.bs ${P5ARCH}/auto/Apache2/RequestIO/RequestIO.so ${P5ARCH}/auto/Apache2/RequestRec/ -@comment ${P5ARCH}/auto/Apache2/RequestRec/RequestRec.bs ${P5ARCH}/auto/Apache2/RequestRec/RequestRec.so ${P5ARCH}/auto/Apache2/RequestUtil/ -@comment ${P5ARCH}/auto/Apache2/RequestUtil/RequestUtil.bs ${P5ARCH}/auto/Apache2/RequestUtil/RequestUtil.so ${P5ARCH}/auto/Apache2/Response/ -@comment ${P5ARCH}/auto/Apache2/Response/Response.bs ${P5ARCH}/auto/Apache2/Response/Response.so ${P5ARCH}/auto/Apache2/ServerRec/ -@comment ${P5ARCH}/auto/Apache2/ServerRec/ServerRec.bs ${P5ARCH}/auto/Apache2/ServerRec/ServerRec.so ${P5ARCH}/auto/Apache2/ServerUtil/ -@comment ${P5ARCH}/auto/Apache2/ServerUtil/ServerUtil.bs ${P5ARCH}/auto/Apache2/ServerUtil/ServerUtil.so ${P5ARCH}/auto/Apache2/SubProcess/ -@comment ${P5ARCH}/auto/Apache2/SubProcess/SubProcess.bs ${P5ARCH}/auto/Apache2/SubProcess/SubProcess.so ${P5ARCH}/auto/Apache2/SubRequest/ -@comment ${P5ARCH}/auto/Apache2/SubRequest/SubRequest.bs ${P5ARCH}/auto/Apache2/SubRequest/SubRequest.so ${P5ARCH}/auto/Apache2/URI/ -@comment ${P5ARCH}/auto/Apache2/URI/URI.bs ${P5ARCH}/auto/Apache2/URI/URI.so ${P5ARCH}/auto/Apache2/Util/ -@comment ${P5ARCH}/auto/Apache2/Util/Util.bs ${P5ARCH}/auto/Apache2/Util/Util.so ${P5ARCH}/auto/Apache2/typemap ${P5ARCH}/auto/ModPerl/ ${P5ARCH}/auto/ModPerl/Const/ -@comment ${P5ARCH}/auto/ModPerl/Const/Const.bs ${P5ARCH}/auto/ModPerl/Const/Const.so ${P5ARCH}/auto/ModPerl/Global/ -@comment ${P5ARCH}/auto/ModPerl/Global/Global.bs ${P5ARCH}/auto/ModPerl/Global/Global.so ${P5ARCH}/auto/ModPerl/Util/ -@comment ${P5ARCH}/auto/ModPerl/Util/Util.bs ${P5ARCH}/auto/ModPerl/Util/Util.so ${P5ARCH}/mod_perl2.pm @man man/man3p/APR.3p @@ -387,3 +390,4 @@ ${P5ARCH}/mod_perl2.pm @man man/man3p/ModPerl::RegistryPrefork.3p @man man/man3p/ModPerl::Util.3p @man man/man3p/mod_perl2.3p +share/doc/pkg-readmes/${FULLPKGNAME} Index: pkg/README =================================================================== RCS file: pkg/README diff -N pkg/README --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/README 15 May 2015 07:10:46 -0000 @@ -0,0 +1,32 @@ +$OpenBSD$ + ++----------------------------------------------------------------------- +| Running ${FULLPKGNAME} on OpenBSD ++----------------------------------------------------------------------- + +Prerequisites +============= + +Since perl(1) does not support ithreads, mod_perl will only work with +the prefork MPM. + +To ensure that Apache2 is configured uses the prefork MPM, edit +${SYSCONFDIR}/apache2/httpd2.conf and add the following line: + + LoadModule mpm_prefork_module ${PREFIX}/lib/apache2/mod_mpm_prefork.so + +Remove any lines loading other MPM modules. + +For information about ithreads, see http://perldoc.perl.org/threads.html. + +Enabling mod_perl +================= + +Before you can use ap2-mod_perl, you need to enable it on your +Apache2 configuration. + +Edit ${SYSCONFDIR}/apache2/httpd2.conf and add the following line: + + LoadModule perl_module ${PREFIX}/lib/apache2/mod_perl.so + +Restart Apache2 for changes to make effect. Index: pkg/UNMESSAGE =================================================================== RCS file: pkg/UNMESSAGE diff -N pkg/UNMESSAGE --- pkg/UNMESSAGE 10 Jan 2007 14:22:00 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,7 +0,0 @@ -To completely uninstall this package you need to remove the following -line from ${SYSCONFDIR}/apache2/httpd2.conf - - LoadModule perl_module ${PREFIX}/lib/apache2/mod_perl.so - -Do not do this if you plan on re-installing this package at some future -time.