0

I need to enable support for POSIX ACL in PHP-FPM. I can get ACL list with getfacl and set them with setfacl -m from shell so my kernel support it. I've downloaded sources of PHP7.0_7.0.19 with

$ cd /tmp/
$ apt-get source php7.0

and updated the debian/rules file to enable ACL support:

$ cd php7.0-7.0.19/
$ vim debian/rules

and then around line 238 (export fpm_config = \) I've added --with-fpm-acl=yes so this config looks like:

export fpm_config = \
         --prefix=/usr --enable-fpm --enable-cli --disable-cgi --disable-phpdbg \
         --sysconfdir=/etc/php/$(PHP_NAME_VERSION)/fpm \
         --with-fpm-user=www-data --with-fpm-group=www-data \
         --with-config-file-path=/etc/php/$(PHP_NAME_VERSION)/fpm \
         --with-config-file-scan-dir=/etc/php/$(PHP_NAME_VERSION)/fpm/conf.d \
         --with-fpm-acl=yes \
         $(COMMON_CONFIG) \
         --with-libevent-dir=/usr \
         $(CONFIGURE_SYSTEMD)

and i run

dpkg-buildpackage -us -uc | tee /tmp/php_build_log.log

but I get this error:

configure: exit 1
    cd /tmp/php7.0-7.0.19
debian/rules:327: recipe for target 'override_dh_auto_configure-arch' failed
make[1]: Leaving directory '/tmp/php7.0-7.0.19'
debian/rules:275: recipe for target 'binary' failed

Here is the /tmp/php_build_log.log

Dawid
  • 186
  • 1
  • 7

1 Answers1

0

OK, found the culprits. First one:

[...]
checking sys/acl.h usability... no
checking sys/acl.h presence... no
checking for sys/acl.h... no
checking for acl_free in -lacl... no
[...]

solution

$ apt-file search /usr/include/sys/acl.h
libacl1-dev: /usr/include/sys/acl.h
$ sudo apt-get install libacl1-dev

next one (I think this was main cause of failure)

## --------- ##
## Platform. ##
## --------- ##

hostname = eva02
uname -m = x86_64
uname -r = 4.9.0-3-amd64
uname -s = Linux
uname -v = #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26)

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

As the error was mentioning override_dh_auto_configure-arch, I think rules script couldn't determine architecture as /bin/arch didn't exists and /usr/bin/arch does not have -k switch but calling /usr/bin/arch gives x86_64 so I've made a symlink

$ sudo ln -s /usr/bin/arch /bin/arch

and now

$ debuild

finished successfully and I have signed deb packages.

Dawid
  • 186
  • 1
  • 7