WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
Matthew Pounsett
matt at conundrum.com
Mon Aug 4 19:08:56 UTC 2014
On Aug 3, 2014, at 12:29 , Melvyn Sopacua <melvyn at magemana.nl> wrote:
> Hi Matthew,
>
> On Sun, 3 Aug 2014, Matthew Pounsett wrote:
>
>> On Aug 3, 2014, at 02:07 , Melvyn Sopacua <melvyn at magemana.nl> wrote:
>
>>> For automated builds use the OPTIONS framework. Tinderbox can handle
>>> that just fine.
>>
>> Right, and I’m speaking from the perspective of the admin building the
>> port, not the maintainer. The maintainer can set that the port will
>> work with either .. but in an automated build environment it looks
>> like there is no knob for the administrator to tell the ports system
>> which to use.
>
> Unless that changed in recent years, you can have Tinderbox mount your
> options database in /var/db/ports into the build jail. So you can do one
> configure run and set it.
Do one configure run to set what? The whole point of this thread is that there is no configure option to tell a port that uses WANT_PHP_WEB to require mod_php5.
Besides which, tinderbox has one options database per build. It doesn’t use the options database in /var/db/ports.
>
> A second possibility is to simply add www/mod_php5 to ports to be built,
> since it's no longer part of lang/php5. This won't work for the
> upstream-abandoned php 5.3.
>
> A third is to set php53_SET=APACHE in /etc/make.conf.
Manually telling the system to build a package will get it built, but doesn’t solve the dependency problem. The whole point of dependencies is that when you install a port/package the things it requires will also get installed .. if a port that uses WANT_PHP_WEB can’t be told to require mod_php5, then the dependency doesn’t exist. Again, we’re back to WANT_PHP_WEB being a synonym for WANT_PHP_CGI.
Your other suggestion seems to be that in order to get the php module to be a dependency of some other port I need to use an old version of php.. I’m not sure how seriously I should take that.
>> Again.. unless I’m missing some knob that exists to give guidance to
>> the ports system. I’m familiar with the options framework, but I
>> can’t find anything in bsd.php.mk that could be used to give guidance
>> to the ports system that mod_php5 is desired when WANT_PHP_WEB is
>> defined.
>
> WANT_PHP_WEB actually pulls in the apache module if php is installed
> only with the CLI or EMBED backend. See this bit:
>
> if defined(WANT_PHP_MOD) || (defined(WANT_PHP_WEB) && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "")
> USE_APACHE_RUN= 22+
> .include "${PORTSDIR}/Mk/bsd.apache.mk"
> RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp5.so:${PORTSDIR}/${MOD_PHP_PORT}
> .endif
That’s not how I read that. I’ve read this piece of code and it’s how I arrived at the conclusion that WANT_PHP_WEB is a synonym for WANT_PHP_CGI in automated build environments. The above code seems to say that libphp5.so should only be set if WANT_PHP_MOD is set, OR if WANT_PHP_WEB is set AND PHP is installed AND the CGI and FPM options for the CGI module are unset.
As far as I can tell, the only way you get an installed version of PHP without either the CGI or FPM options set is to install mod_php5. That makes installing mod_php5 a prerequisite to making mod_php5 a dependency to any port that uses WANT_PHP_WEB.
More information about the freebsd-ports
mailing list