Greg Troxel <gdt%lexort.com@localhost> writes:
I found that zoneminder was broken, and tracked it down to in
lang/php/phpversion.mk:
PKG_SYSCONFSUBDIR?= php/${PHP_API_VERS}
I think this is incorrect, as a package shouldn't get its sysconfdir
changed just because it's using php.
I avoided zoneminder being configured for the wrong conf directory by
setting PKG_SYSCONFSUBDIR in the zoneminder Makefile before including
php, but I think this line should be removed -- and I don't know where
it needs to go instead.
While it feels like a big change at end of freeze, I think it is likely
to break other packages at runtime, even if they build ok, so I believe
we should fix it now.
Reading code a bit, I now think:
- lang/phpNN must have PKG_SYSCONFSUBDIR set
- php modules (lang/php/ext.mk) must have PKG_SYSCONFSUBDIR set
- other packages that include phpversion.mk MUST NOT have
PKG_SYSCONFSUBDIR set
and that this can be done by moving the line from phpversion.mk to
common.mk. Arguably PHP_EXTENSION_DIR should move too as it doesn't
make sense for a php-using program to have that variable but I am
steering to minimal fix.
I'm starting to test this now but IANA php expert.
Rebuilding php82 and php82-gd resulted in no change to PKG_SYSCONFDIR
(in +BUILD_INFO). Rebuilding php82-nextcloud changed it from
PKG_SYSCONFDIR=/usr/pkg/etc/php/8.2
to
PKG_SYSCONFDIR=/usr/pkg/etc
which I would say is better, even if nextcloud doesn't use the variable.
What do the assembled php people think? I am thinking that if we
don't get comments soon I should commit this, maybe say tomorrow after
12Z, but this may get decided offline by me, taca@, maya@, it really
being maya@'s call.