[Pkg-giraffe-discuss] installation of mapi.ini (in php7.0-mapi)
Carsten Schoenert
c.schoenert at t-online.de
Sun Jan 1 13:23:38 UTC 2017
Hello,
happy new year to everyone!
A friend of mine helped me to create configuration files for nginx and
lighttpd for the kopano-webapp package.
It turns out we needed to tweak especially the searchplaces for
mapi.conf from the php7.0-mapi package.
Currently the mapi.ini file is placed in /etc/php/7.0/cgi/conf.d/mapi.ini.
The webserver nginx needs the package php-fpm which itself needs the
mapi.ini in the folder /etc/php/7.0/fpm/conf.d/
lighttpd is using the modul fastcgi and fastcgi-php from php-cgi which
is searching in /etc/php/7.0/cgi/conf.d/
So there needs to be mapi.ini also around if lighttpd is used.
So we need to improve the php7.0-mapi package I think. I looked how
other packages this ini files are placing. Typically all *.ini files are
installed into the folder /etc/php/7.0/mods-available/ and is linking
the ini into the other folders.
> $ ls -l /etc/php/7.0/mods-available/
> total 108
> ...
> -rw-r--r-- 1 root root 79 Dec 13 17:04 opcache.ini
> -rw-r--r-- 1 root root 69 Dec 13 17:04 pdo.ini
> ...
> -rw-r--r-- 1 root root 66 Dec 13 17:04 xml.ini
> $ ls -l /etc/php/7.0/fpm/conf.d/
> total 4
> lrwxrwxrwx 1 root root 39 Dec 31 13:35 10-opcache.ini -> /etc/php/7.0/mods-available/opcache.ini
> lrwxrwxrwx 1 root root 35 Dec 31 13:35 10-pdo.ini -> /etc/php/7.0/mods-available/pdo.ini
> lrwxrwxrwx 1 root root 35 Dec 31 13:35 15-xml.ini -> /etc/php/7.0/mods-available/xml.ini
> $ ls -l /etc/php/7.0/cgi/conf.d/
> total 4
> lrwxrwxrwx 1 root root 39 Dec 31 14:18 10-opcache.ini -> /etc/php/7.0/mods-available/opcache.ini
> lrwxrwxrwx 1 root root 35 Dec 31 14:18 10-pdo.ini -> /etc/php/7.0/mods-available/pdo.ini
> lrwxrwxrwx 1 root root 35 Dec 31 14:18 15-xml.ini -> /etc/php/7.0/mods-available/xml.ini
So I think the mapi.ini needs to be installed into
/etc/php/7.0/mods-available/ and we need to do some linking of that
file. If we do so the autoconf/php.m4 needs to be changed and
PHP_SYSCONF_DIR must adjusted to /etc/php/7.0/mods-available/
accordingly. php-cgi is doing the linking into the other folders within
the postinst I think.
I also found some other issue as the commit ef3dcb9e (adjust search path
for php-config script on php7.0) was fixing the problem only partially.
We also need to do something like this as otherwise some automatic
Depends are missing:
> $ git diff debian/rules
> diff --git a/debian/rules b/debian/rules
> index eb258249..8d6682bd 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -14,6 +14,7 @@ DEB_UVERSION=$(shell dpkg-parsechangelog -SVersion)
> DEB_BUILD_DIR=debian/build
>
> INSTDIR=$(CURDIR)/debian/tmp
> +PHPVERSION=7.0
> SMARTYVER=2.6.14
>
> ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
> @@ -85,7 +86,7 @@ override_dh_install:
> find $(INSTDIR) -name \*.pyc -exec rm {} \;
>
> # add php:Depends
> - echo "php:Depends=phpapi-$(shell php-config5 --phpapi)" > debian/php5-mapi.substvars
> + echo "php:Depends=phpapi-$(shell php-config$(PHPVERSION) --phpapi)" > debian/php$(PHPVERSION)-mapi.substvars
>
> # adjust server.cfg to multi-arch behavior
> sed -i 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/' $(INSTDIR)/etc/kopano/server.cfg
--
Regards
Carsten Schoenert
More information about the Pkg-giraffe-discuss
mailing list