commit: 50ae0032a52c0a95f8397cb623ee48b7b3292663
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 9 00:25:30 2016 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Dec 9 04:34:41 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50ae0032
dev-lang/php: three new revisions adding ACL support for php-fpm.
The php-fpm backend can be used to host multiple applications with
different settings and permissions. Traditionally, permissions on its
UNIX socket are granted to the "listen.owner" and "listen.group"
defined in php-fpm.conf. However, php-fpm can be compiled with POSIX
ACL support, after which the more-powerful "listen.acl_users" and
"listen.acl_groups" can be used.
This commit adds three new revisions -- one for each supported branch
of PHP. To each new revision, the "acl" USE flag has been added. When
USE=acl is set, sys-apps/acl gets pulled in as a dependency, and
"--with-fpm-acl" is passed to the configure script.
Gentoo-Bug: 601634
Package-Manager: portage-2.3.0
.../{php-7.0.13.ebuild => php-5.6.28-r1.ebuild} | 80 +++++++++++++---------
.../{php-7.0.13.ebuild => php-7.0.13-r1.ebuild} | 6 +-
.../php/{php-7.1.0.ebuild => php-7.1.0-r1.ebuild} | 4 +-
3 files changed, 54 insertions(+), 36 deletions(-)
diff --git a/dev-lang/php/php-7.0.13.ebuild b/dev-lang/php/php-5.6.28-r1.ebuild
similarity index 92%
copy from dev-lang/php/php-7.0.13.ebuild
copy to dev-lang/php/php-5.6.28-r1.ebuild
index d0f9045..7357573 100644
--- a/dev-lang/php/php-7.0.13.ebuild
+++ b/dev-lang/php/php-5.6.28-r1.ebuild
@@ -19,26 +19,26 @@ LICENSE="PHP-3.01
unicode? ( BSD-2 LGPL-2.1 )"
SLOT="$(get_version_component_range 1-2)"
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc
~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc
~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos"
# We can build the following SAPIs in the given order
-SAPIS="embed cli cgi fpm apache2 phpdbg"
+SAPIS="embed cli cgi fpm apache2"
# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
IUSE="${IUSE}
${SAPIS/cli/+cli}
threads"
-IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
crypt +ctype curl debug
enchant exif frontbase +fileinfo +filter firebird
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
- mhash mssql mysql mysqli nls
+ mhash mssql mysql libmysqlclient mysqli nls
oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
readline recode selinux +session sharedmem
+simplexml snmp soap sockets spell sqlite ssl
- sysvipc systemd tidy +tokenizer truetype unicode wddx webp
+ sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
+xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
# The supported (that is, autodetected) versions of BDB are listed in
@@ -47,6 +47,7 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
COMMON_DEPEND="
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
>=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
<www-servers/apache-2.4[threads=] ) )
berkdb? ( || ( sys-libs/db:5.3
@@ -83,6 +84,10 @@ COMMON_DEPEND="
ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
mssql? ( dev-db/freetds[mssql] )
+ libmysqlclient? (
+ mysql? ( virtual/libmysqlclient:= )
+ mysqli? ( virtual/libmysqlclient:= )
+ )
nls? ( sys-devel/gettext )
oci8-instant-client? ( dev-db/oracle-instantclient-basic )
odbc? ( >=dev-db/unixODBC-1.8.13 )
@@ -97,18 +102,20 @@ COMMON_DEPEND="
spell? ( >=app-text/aspell-0.50 )
sqlite? ( >=dev-db/sqlite-3.7.6.3 )
ssl? (
- !libressl? ( dev-libs/openssl:0 )
+ !libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl )
)
+ sybase-ct? ( dev-db/freetds )
tidy? ( app-text/htmltidy )
truetype? (
=media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
!gd? (
virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
)
unicode? ( dev-libs/oniguruma )
+ vpx? ( media-libs/libvpx )
wddx? ( >=dev-libs/libxml2-2.6.8 )
- webp? ( media-libs/libwebp )
xml? ( >=dev-libs/libxml2-2.6.8 )
xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
xmlreader? ( >=dev-libs/libxml2-2.6.8 )
@@ -140,9 +147,10 @@ DEPEND="${COMMON_DEPEND}
REQUIRED_USE="
cli? ( ^^ ( readline libedit ) )
truetype? ( gd )
- webp? ( gd )
+ vpx? ( gd )
cjk? ( gd )
exif? ( gd )
+
xpm? ( gd )
gd? ( zlib )
simplexml? ( xml )
@@ -154,12 +162,18 @@ REQUIRED_USE="
ldap-sasl? ( ldap )
mhash? ( hash )
phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
qdbm? ( !gdbm )
readline? ( !libedit )
- recode? ( !imap !mysqli )
+ recode? ( !imap !mysql !mysqli )
sharedmem? ( !threads )
- mysql? ( || ( mysqli pdo ) )
- || ( cli cgi fpm apache2 embed phpdbg )"
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
PHP_MV="$(get_major_version)"
@@ -208,11 +222,9 @@ php_install_ini() {
# SAPI-specific handling
if [[ "${sapi}" == "fpm" ]] ; then
- einfo "Installing FPM config files php-fpm.conf and www.conf"
+ einfo "Installing FPM config file php-fpm.conf"
insinto "${PHP_INI_DIR#${EPREFIX}}"
doins sapi/fpm/php-fpm.conf
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
- doins sapi/fpm/www.conf
fi
dodoc php.ini-development
@@ -226,6 +238,8 @@ php_set_ini_dir() {
}
src_prepare() {
+ eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch"
+
# Change PHP branding
# Get the alpha/beta/rc version
sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
@@ -235,6 +249,14 @@ src_prepare() {
sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v |
xargs`/g' \
-i configure.in || die "Failed to fix server platform name"
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4
sapi/apache2handler/config.m4 \
+ || die
+
# Patch PHP to support heimdal instead of mit-krb5
if has_version "app-crypt/heimdal" ; then
sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
@@ -253,16 +275,6 @@ src_prepare() {
# http://bugs.php.net/bug.php?id=48795, bug #343481
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
fi
-
- # In php-7.x, the FPM pool configuration files have been split off
- # of the main config. By default the pool config files go in
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
- # we'll install the pool configuration file "www.conf" there.
- php_set_ini_dir fpm
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
- sapi/fpm/php-fpm.conf.in \
- || die 'failed to move the include directory in php-fpm.conf'
}
src_configure() {
@@ -285,6 +297,7 @@ src_configure() {
)
our_conf+=(
+ $(use_with acl fpm-acl)
$(use_enable bcmath bcmath)
$(use_with bzip2 bz2 "${EPREFIX}/usr")
$(use_enable calendar calendar)
@@ -310,6 +323,7 @@ src_configure() {
$(use_with xml libxml-dir "${EPREFIX}/usr")
$(use_enable unicode mbstring)
$(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with mssql mssql "${EPREFIX}/usr")
$(use_with unicode onig "${EPREFIX}/usr")
$(use_with ssl openssl "${EPREFIX}/usr")
$(use_with ssl openssl-dir "${EPREFIX}/usr")
@@ -327,6 +341,7 @@ src_configure() {
$(use_enable soap soap)
$(use_enable sockets sockets)
$(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
$(use_enable sysvipc sysvmsg)
$(use_enable sysvipc sysvsem)
$(use_enable sysvipc sysvshm)
@@ -363,14 +378,13 @@ src_configure() {
# Support for the GD graphics library
our_conf+=(
$(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_with truetype t1lib "${EPREFIX}/usr")
$(use_enable cjk gd-jis-conv)
$(use_with gd jpeg-dir "${EPREFIX}/usr")
$(use_with gd png-dir "${EPREFIX}/usr")
$(use_with xpm xpm-dir "${EPREFIX}/usr")
+ $(use_with vpx vpx-dir "${EPREFIX}/usr")
)
- if use webp; then
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
- fi
# enable gd last, so configure can pick up the previous settings
our_conf+=( $(use_with gd gd) )
@@ -396,7 +410,10 @@ src_configure() {
# MySQL support
local mysqllib="mysqlnd"
local mysqlilib="mysqlnd"
+ use libmysqlclient && mysqllib="${EPREFIX}/usr"
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
+ our_conf+=( $(use_with mysql mysql "${mysqllib}") )
our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
@@ -416,7 +433,7 @@ src_configure() {
# PDO support
if use pdo ; then
our_conf+=(
- $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mssql pdo-dblib)
$(use_with mysql pdo-mysql "${mysqllib}")
$(use_with postgres pdo-pgsql)
$(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
@@ -480,7 +497,7 @@ src_configure() {
for sapi in $SAPIS ; do
case "$sapi" in
- cli|cgi|embed|fpm|phpdbg)
+ cli|cgi|embed|fpm)
if [[ "${one_sapi}" == "${sapi}" ]] ;
then
sapi_conf+=( "--enable-${sapi}"
)
else
@@ -561,7 +578,7 @@ src_install() {
# We're specifically not using emake
install-sapi as libtool
# may cause unnecessary relink failures (see
bug #351266)
insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
- newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ newins ".libs/libphp5$(get_libname)" \
"libphp${PHP_MV}$(get_libname)"
keepdir "/usr/$(get_libdir)/apache2/modules"
else
@@ -581,9 +598,6 @@ src_install() {
embed)
source="libs/libphp${PHP_MV}$(get_libname)"
;;
- phpdbg)
- source="sapi/phpdbg/phpdbg"
- ;;
*)
die "unhandled sapi in
src_install"
;;
diff --git a/dev-lang/php/php-7.0.13.ebuild b/dev-lang/php/php-7.0.13-r1.ebuild
similarity index 98%
rename from dev-lang/php/php-7.0.13.ebuild
rename to dev-lang/php/php-7.0.13-r1.ebuild
index d0f9045..ecc4bce 100644
--- a/dev-lang/php/php-7.0.13.ebuild
+++ b/dev-lang/php/php-7.0.13-r1.ebuild
@@ -19,7 +19,7 @@ LICENSE="PHP-3.01
unicode? ( BSD-2 LGPL-2.1 )"
SLOT="$(get_version_component_range 1-2)"
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc
~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc
~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos"
# We can build the following SAPIs in the given order
SAPIS="embed cli cgi fpm apache2 phpdbg"
@@ -29,7 +29,7 @@ IUSE="${IUSE}
${SAPIS/cli/+cli}
threads"
-IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
crypt +ctype curl debug
enchant exif frontbase +fileinfo +filter firebird
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
@@ -47,6 +47,7 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
COMMON_DEPEND="
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
>=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
<www-servers/apache-2.4[threads=] ) )
berkdb? ( || ( sys-libs/db:5.3
@@ -285,6 +286,7 @@ src_configure() {
)
our_conf+=(
+ $(use_with acl fpm-acl)
$(use_enable bcmath bcmath)
$(use_with bzip2 bz2 "${EPREFIX}/usr")
$(use_enable calendar calendar)
diff --git a/dev-lang/php/php-7.1.0.ebuild b/dev-lang/php/php-7.1.0-r1.ebuild
similarity index 99%
rename from dev-lang/php/php-7.1.0.ebuild
rename to dev-lang/php/php-7.1.0-r1.ebuild
index 6b02dcb..bd32aea 100644
--- a/dev-lang/php/php-7.1.0.ebuild
+++ b/dev-lang/php/php-7.1.0-r1.ebuild
@@ -29,7 +29,7 @@ IUSE="${IUSE}
${SAPIS/cli/+cli}
threads"
-IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
crypt +ctype curl debug
enchant exif frontbase +fileinfo +filter firebird
flatfile ftp gd gdbm gmp +hash +iconv imap inifile
@@ -47,6 +47,7 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
COMMON_DEPEND="
>=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
>=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
<www-servers/apache-2.4[threads=] ) )
berkdb? ( || ( sys-libs/db:5.3
@@ -259,6 +260,7 @@ src_configure() {
)
our_conf+=(
+ $(use_with acl fpm-acl)
$(use_enable bcmath bcmath)
$(use_with bzip2 bz2 "${EPREFIX}/usr")
$(use_enable calendar calendar)