Bug 192388 - Mk/bsd.php5.mk: Regression: mod_php5 is out of the dependency tree when WANT_PHP_WEB is set
Summary: Mk/bsd.php5.mk: Regression: mod_php5 is out of the dependency tree when WANT_...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 03:11 UTC by Melvyn Sopacua
Modified: 2014-08-05 18:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melvyn Sopacua 2014-08-05 03:11:52 UTC
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.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-08-05 06:11:29 UTC
Not sure who to assign this to, let's try ale@ first.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2014-08-05 07:46:04 UTC
If you are using the port system the dependency will be added, since it will look at the installed SAPIs. Packages are different, you should expect inconsistencies if you change default OPTIONS. Anyway, what the port system does is more than it should, I could completely remove such tricky check and let all ports depends on core php and stop.
Comment 3 Melvyn Sopacua 2014-08-05 18:19:53 UTC
(In reply to Alex Dupre from comment #2)
> If you are using the port system the dependency will be added, since it will
> look at the installed SAPIs.

I installed it in a clean system using the ports. The results posted are what the package has recorded, but they were still being installed.
I changed the options simply to trigger a mod_php5 build, since WANT_PHP_WEB is supposed to pull in a web-capable SAPI or bail out with a fatal error. Neither happened. So this means it's not working as intended.

> Anyway, what the port system
> does is more than it should, I could completely remove such tricky check and
> let all ports depends on core php and stop.

I actually think that's best. With mod_php5 out of the main php5 port, it becomes impossible to maintain a WANT_PHP_WEB semantic that works reliably. Instead, depending ports should be fixed to offer support for the SAPIs they want to support.
At present I maintain at least one port that wants both a CLI and a web sapi, and I'm more then happy to change the options and add PHP SAPI selection and help to fix others as well.