Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
On Aug 4, 2014, at 23:15 , Melvyn Sopacua mel...@magemana.nl wrote: So, there is no php-cgi or fpm, but www/mod_php5 is not in phpMyAdmin's dependencies, which means WANT_PHP_WEB is not satisfied, yet no errors are generated. While it looks like that’s the expected behaviour right now, I don’t agree that it’s good behaviour. What if someone wants phpMyAdmin using mod_php5 but also wants the CGI and/or FPM versions installed for other reasons? This is using the absence of guidance as guidance, which could work some of the time but isn’t as desirable as being able to give specific guidance. Filed as: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192388 And closed almost as fast as it was opened. Since the whole point of WANT_PHP_{WEB,CGI,MOD} is for setting dependencies, I can’t see how it can be claimed that this “works as intended” when dependencies aren’t properly set. ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
Matthew Pounsett ha scritto: It looks to me like the rules that WANT_PHP_WEB uses to decide whether to build the CGI or module version of PHP will always choose the CGI version unless the module is already installed. If this is true, it means that in automated build environments (e.g. tinderbox) – where *only* the direct dependencies of a port are installed at build time – there isn’t any way to tell WANT_PHP_WEB to install the module. This effectively makes WANT_PHP_WEB a synonym for WANT_PHP_CGI in these environments. Have I missed something, or is this a significant flaw in the design of the WANT_PHP_{WEB,CGI,MOD} knobs? You missed the fact that you can install the php module as a separate port/package together with the core php package. Not only, mod_php port requires core php port, that is the one containing the cgi version. So there isn't any problem with tinderbox/poudriere. -- Alex Dupre ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
On Aug 4, 2014, at 09:05 , Alex Dupre a...@freebsd.org wrote: Matthew Pounsett ha scritto: It looks to me like the rules that WANT_PHP_WEB uses to decide whether to build the CGI or module version of PHP will always choose the CGI version unless the module is already installed. If this is true, it means that in automated build environments (e.g. tinderbox) – where *only* the direct dependencies of a port are installed at build time – there isn’t any way to tell WANT_PHP_WEB to install the module. This effectively makes WANT_PHP_WEB a synonym for WANT_PHP_CGI in these environments. Have I missed something, or is this a significant flaw in the design of the WANT_PHP_{WEB,CGI,MOD} knobs? You missed the fact that you can install the php module as a separate port/package together with the core php package. Not only, mod_php port requires core php port, that is the one containing the cgi version. So there isn't any problem with tinderbox/poudriere. I can build it, sure .. but it’s the dependencies I’m trying to get fixed up. If I can’t tell the ports tree that a WANT_PHP_WEB port should require mod_php5, then when I go to install the package that gets built for that port it’s not going to have the requirement in its meta data, and mod_php5 won’t be installed as a result. Yes, I can then also go manually install mod_php5, but that’s not really the point of dependencies, is it? ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
On Aug 3, 2014, at 12:29 , Melvyn Sopacua mel...@magemana.nl wrote: Hi Matthew, On Sun, 3 Aug 2014, Matthew Pounsett wrote: On Aug 3, 2014, at 02:07 , Melvyn Sopacua mel...@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. ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
Hi Matthew, On Mon, 4 Aug 2014, Matthew Pounsett wrote: 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. Now we're finally getting to the issue, let's cut the noise: - automated builds are not a factor. The bug is with the dependencies. - WANT_PHP_CGI is not a factor. The bug is that mod_php5 is not in the loop. So, let's see what happens: 1. databases/phpmyadmin has WANT_PHP_WEB set 2. On a clean environment I want to install that port and expect apache and mod_php5 built for me. 3. Because I don't want fpm or cgi, I unset the options for the lang/php5 options dialog. Expected result: phpMyAdmin depends on apache and mod_php5 among others. Result: # pkg query -F /var/packages/test/All/phpMyAdmin-4.2.7.txz %do lang/php5 archivers/php5-bz2 textproc/php5-ctype security/php5-filter devel/php5-json converters/php5-mbstring security/php5-mcrypt databases/php5-mysqli security/php5-openssl www/php5-session archivers/php5-zlib # pkg query -F /var/packages/test/All/php5-5.4.30.txz %do textproc/libxml2 devel/pcre # pkg info -lF /var/packages/test/All/php5-5.4.30.txz|grep bin/ /usr/local/bin/php /usr/local/bin/php-config /usr/local/bin/phpize So, there is no php-cgi or fpm, but www/mod_php5 is not in phpMyAdmin's dependencies, which means WANT_PHP_WEB is not satisfied, yet no errors are generated. Filed as: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192388 -- Melvyn ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
Hello! On Sat, 2 Aug 2014, Matthew Pounsett wrote: It looks to me like the rules that WANT_PHP_WEB uses to decide whether to build the CGI or module version of PHP will always choose the CGI version unless the module is already installed. If this is true, it means that in automated build environments (e.g. tinderbox) – where *only* the direct dependencies of a port are installed at build time – there isn’t any way to tell WANT_PHP_WEB to install the module. This effectively makes WANT_PHP_WEB a synonym for WANT_PHP_CGI in these environments. I don't see the problem. If you want the mod_php module in your port set WANT_PHP_MOD. If you don't care which implementation it is as long as it can speak with a webserver, you set WANT_PHP_WEB. The WANT_PHP_WEB knob is for port maintainers that trust the system administrators that use the PHP software will know what suits them most. For automated builds use the OPTIONS framework. Tinderbox can handle that just fine. -- Melvyn ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
On Aug 3, 2014, at 02:07 , Melvyn Sopacua mel...@magemana.nl wrote: I don't see the problem. If you want the mod_php module in your port set WANT_PHP_MOD. If you don't care which implementation it is as long as it can speak with a webserver, you set WANT_PHP_WEB. The WANT_PHP_WEB knob is for port maintainers that trust the system administrators that use the PHP software will know what suits them most. 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. The ports system will default to the CGI port unless the module port is already built .. but an automated build environment will only build and install explicitly requested dependencies. Thus, in an automated build environment, WANT_PHP_WEB means WANT_PHP_CGI. 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. ___ 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
Re: WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
Hi Matthew, On Sun, 3 Aug 2014, Matthew Pounsett wrote: On Aug 3, 2014, at 02:07 , Melvyn Sopacua mel...@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. 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. 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 -- Melvyn ___ 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
WANT_PHP_WEB is just a synonym for WANT_PHP_CGI in automated build environments
It looks to me like the rules that WANT_PHP_WEB uses to decide whether to build the CGI or module version of PHP will always choose the CGI version unless the module is already installed. If this is true, it means that in automated build environments (e.g. tinderbox) – where *only* the direct dependencies of a port are installed at build time – there isn’t any way to tell WANT_PHP_WEB to install the module. This effectively makes WANT_PHP_WEB a synonym for WANT_PHP_CGI in these environments. Have I missed something, or is this a significant flaw in the design of the WANT_PHP_{WEB,CGI,MOD} knobs? It seems to me that this should be changed in one of three ways: 1) It should be possible to provide direction to WANT_PHP_WEB via some make.conf knob 2) WANT_PHP_WEB should be removed, and WANT_PHP_{CGI,MOD} should always be chosen using a radio selector at config time, or by setting in make.conf 3) WANT_PHP_WEB should cause a radio button selector to appear at port config time (3) seems like the least desirable, since it leaves no way to provide direction in a batch mode build. I think my preference would be for (2). Does anyone have any other ideas for how to improve this? Or any pointers to a way that already exists to provide direction to the ports system about whether WANT_PHP_WEB should imply _CGI or _MOD? ___ 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