diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2017-03-21 11:30:45 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-22 13:47:53 +0000 |
commit | fcd8a5235815bf1b296931d53aa67279c7e40bca (patch) | |
tree | 4d365b0a5afb8142ce24268284feb53044f3d66d /testing/php7 | |
parent | 97f3eb696fa21aca9363a610ba6657a75d29fccc (diff) | |
download | aports-fcd8a5235815bf1b296931d53aa67279c7e40bca.tar.bz2 aports-fcd8a5235815bf1b296931d53aa67279c7e40bca.tar.xz |
rename: testing/php7.1 -> testing/php7
Diffstat (limited to 'testing/php7')
-rw-r--r-- | testing/php7/APKBUILD | 445 | ||||
-rw-r--r-- | testing/php7/install-pear.patch | 15 | ||||
-rw-r--r-- | testing/php7/php7-fpm.initd | 87 | ||||
-rw-r--r-- | testing/php7/php7-fpm.logrotate | 13 | ||||
-rw-r--r-- | testing/php7/php7-fpm.patch | 55 | ||||
-rw-r--r-- | testing/php7/php7-includedir.patch | 41 | ||||
-rw-r--r-- | testing/php7/php7-module.conf | 5 |
7 files changed, 661 insertions, 0 deletions
diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD new file mode 100644 index 0000000000..0b69648b52 --- /dev/null +++ b/testing/php7/APKBUILD @@ -0,0 +1,445 @@ +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Maintainer: Valery Kartel <valery.kartel@gmail.com> +pkgname=php7 +pkgver=7.1.3 +pkgrel=0 +_apiver=20160303 +_compat=7.1 +_suffix=${pkgname#php} +_pkgreal=${pkgname%$_suffix} +pkgdesc="The PHP$_suffix language runtime engine" +url="http://www.php.net/" +arch="all" +license="PHP-3" +options="!check" +depends="$pkgname-config" +depends_dev="$pkgname" +replaces="$_pkgreal $_pkgreal-cli $_pkgreal$_compat $_pkgreal$_compat-cli" +provides="$replaces $pkgname-cli" +makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev libzip-dev bzip2-dev zlib-dev + aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev icu-dev imap-dev gd-dev + libical-dev libressl-dev openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev + freetds-dev postgresql-dev unixodbc-dev freetype-dev tidyhtml-dev libwebp-dev + libpng-dev libjpeg-turbo-dev libmcrypt-dev recode-dev libedit-dev gettext-dev + " +source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2 + $pkgname-module.conf + $pkgname-fpm.logrotate + $pkgname-fpm.initd + $pkgname-fpm.patch + $pkgname-includedir.patch + install-pear.patch + " +# unimplemented extensions: com_dotnet interbase oci8 pdo_firebird pdo_oci +_extension_dir=/usr/lib/$pkgname +_extension_conf=/etc/$pkgname/conf.d +_extensions="bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo ftp gd gettext gmp iconv imap:1 + intl json ldap mbstring mcrypt mysqli:1 mysqlnd odbc opcache openssl pcntl pdo pdo_dblib pdo_mysql + pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell recode session shmop snmp soap sockets + sqlite3 sysvmsg sysvsem sysvshm tidy wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib + " +for _extension in $_extensions; do + [ -z "${_extension##*:*}" ] && eval _index_${_extension%:*}=${_extension#*:} + subpackages="$subpackages $pkgname-${_extension%:*}:_extension" +done +_prefix_opcache="zend_" +_pkgdesc_opcache="Zend OPcache" +_depends_mysqlnd="$pkgname-openssl" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-apache2 $pkgname-phpdbg + $pkgname-litespeed $pkgname-cgi $pkgname-fpm $pkgname-pear::noarch $pkgname-pecl::noarch + $pkgname-phar-utils:_phar:noarch $subpackages $pkgname-config::noarch" +builddir="$srcdir/$_pkgreal-$pkgver" + +prepare() { + cd "$builddir" + + sed "$(($(grep -n 'Pool Definitions' sapi/fpm/php-fpm.conf.in | cut -d: -f1)+3)),\$d" \ + -i sapi/fpm/php-fpm.conf.in && \ + echo include=@php_fpm_sysconfdir@/php-fpm.d/*.conf >> \ + sapi/fpm/php-fpm.conf.in + + default_prepare || return 1 + update_config_sub || return 1 + + local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h) + if [ "$vapi" != "$_apiver" ]; then + error "Upstreram API version is now $vapi. Expecting $_apiver" + error "After updating _apiver, all 3rd-party extensions must be rebuilt" + return 1 + fi + + autoconf +} + +# Notes to ./configure parameters +# recode and imap are defined in build function because can't build together +# --with-libgd -- do not swith to system-wide libgd - runtime bugs. +# --with-xmlrpc -- do not swith to system-wide xmlrpc - build errors. + +_build() { + ./configure \ + EXTENSION_DIR=$_extension_dir \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --program-suffix=$_suffix \ + --libdir=$_extension_dir \ + --datadir=/usr/share/$pkgname \ + --sysconfdir=/etc/$pkgname \ + --localstatedir=/var \ + --with-layout=GNU \ + --with-pic \ + --with-pear=/usr/share/pear \ + --with-config-file-path=/etc/$pkgname \ + --with-config-file-scan-dir=$_extension_conf \ + --disable-short-tags \ + --without-readline \ + --with-libedit \ + --enable-bcmath=shared \ + --with-bz2=shared \ + --enable-calendar=shared \ + --enable-ctype=shared \ + --with-curl=shared \ + --enable-dba=shared \ + --with-gdbm \ + --with-db4 \ + --enable-dom=shared \ + --with-libxml-dir \ + --with-enchant=shared \ + --enable-exif=shared \ + --enable-fileinfo=shared \ + --enable-ftp=shared \ + --with-openssl-dir \ + --with-gd=shared \ + --with-jpeg-dir \ + --with-png-dir \ + --with-webp-dir \ + --with-xpm-dir=no \ + --with-freetype-dir \ + --enable-gd-native-ttf \ + --disable-gd-jis-conv \ + --with-gettext=shared \ + --with-gmp=shared \ + --with-iconv=shared \ + --enable-intl=shared \ + --with-icu-dir=/usr \ + --enable-json=shared \ + --enable-libxml=shared \ + --with-libxml-dir \ + --with-libexpat-dir \ + --with-ldap=shared \ + --with-ldap-sasl \ + --enable-mbstring=shared \ + --enable-mbregex \ + --with-mcrypt=shared \ + --with-mysqli=shared,mysqlnd \ + CFLAGS=-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT \ + --enable-mysqlnd=shared \ + --with-zlib-dir \ + --enable-opcache=shared \ + --with-openssl=shared \ + --with-kerberos \ + --with-system-ciphers \ + --enable-pcntl=shared \ + --with-pcre-regex=/usr \ + --with-pcre-dir \ + --enable-pdo=shared \ + --with-pdo-dblib=shared \ + --with-pdo-mysql=shared,mysqlnd \ + --with-pdo-odbc=shared,unixODBC,/usr \ + --with-pdo-pgsql=shared \ + --with-pdo-sqlite=shared,/usr \ + --with-pgsql=shared \ + --enable-phar=shared \ + --enable-posix=shared \ + --with-pspell=shared \ + --enable-session=shared \ + --enable-shmop=shared \ + --with-snmp=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --with-sqlite3=shared,/usr \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --with-tidy=shared \ + --with-unixODBC=shared,/usr \ + --enable-wddx=shared \ + --enable-xml=shared \ + --enable-xmlreader=shared \ + --with-xmlrpc=shared \ + --enable-xmlwriter=shared \ + --with-xsl=shared \ + --enable-zip=shared \ + --with-libzip \ + --with-zlib=shared \ + --with-zlib-dir \ + $@ || return 1 + make +} + +build() { + cd "$builddir" + # build phpdbg + _build --enable-phpdbg \ + --enable-phpdbg-webhelper \ + --disable-cgi \ + --disable-cli \ + || return 1 + # build apache2 module + recode extension + _build --disable-phpdbg \ + --disable-cgi \ + --disable-cli \ + --with-apxs2 \ + --with-recode=shared \ + || return 1 + mv libs/lib$_pkgreal*.so sapi/apache2handler/ + # build all other + imap extension + _build --disable-phpdbg \ + --enable-fpm \ + --enable-embed \ + --with-litespeed \ + --with-imap=shared \ + --with-imap-ssl \ + || return 1 +} + +package() { + pkgdesc="$pkgdesc (command line interface)" + make -C "$builddir" INSTALL_ROOT="$pkgdir" install || return 1 + + ln -sf /usr/bin/php$_suffix "$pkgdir"/usr/bin/php + rm -fr "$pkgdir"/.[[:alpha:]]* +} + +dev() { + provides="$_pkgreal-dev $_pkgreal$_compat-dev" + replaces=$provides + default_dev || return 1 + + mkdir -p "$subpkgdir"/usr/bin \ + "$subpkgdir"/$_extension_dir || return 1 + + local file + for file in php-config phpize; do + mv "$pkgdir"/usr/bin/$file$_suffix \ + "$subpkgdir"/usr/bin/ || return 1 + ln -sf /usr/bin/$file$_suffix "$subpkgdir"/usr/bin/$file + done + + mv "$pkgdir"/$_extension_dir/build "$subpkgdir"/$_extension_dir +} + +doc() { + provides= + replaces= + default_doc || return 1 + install_if="docs $pkgname-config=$pkgver-r$pkgrel" + + cd "$builddir" + local file + for file in $(ls CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* UPGRADING*); do + install -Dm644 $file "$subpkgdir"/usr/share/doc/$pkgname/$file || return 1 + done +} + +apache2() { + provides="$_pkgreal-apache2 $_pkgreal$_compat-apache2" + replaces= + pkgdesc="$pkgdesc (apache2 module)" + depends="$pkgname-config apache2" + + mkdir -p "$subpkgdir"/usr/lib/apache2 || return 1 + cp "$builddir"/sapi/apache2handler/lib$_pkgreal*.so \ + "$subpkgdir"/usr/lib/apache2/mod_$pkgname.so || return 1 + + install -Dm644 "$srcdir"/$pkgname-module.conf \ + "$subpkgdir"/etc/apache2/conf.d/$pkgname-module.conf +} + +phpdbg() { + provides="$_pkgreal-phpdbg $_pkgreal$_compat-phpdbg" + replaces=$provides + pkgdesc="$pkgdesc (interactive debugger)" + depends="$pkgname-config" + + install -Dm755 "$builddir"/sapi/phpdbg/phpdbg \ + "$subpkgdir"/usr/bin/phpdbg$_suffix || return 1 + ln -sf /usr/bin/phpdbg$_suffix "$subpkgdir"/usr/bin/phpdbg +} + +libs() { + provides="$_pkgreal-libs $_pkgreal$_compat-libs" + replaces= + pkgdesc="$pkgdesc (embedded library)" + depends="$pkgname-config" + + mkdir -p "$subpkgdir"/usr/lib || return 1 + mv "$pkgdir"/usr/lib/lib$_pkgreal*.so \ + "$subpkgdir"/usr/lib/lib$pkgname.so || return 1 +} + +litespeed() { + provides="$_pkgreal-litespeed $_pkgreal$_compat-litespeed" + replaces=$provides + pkgdesc="$pkgdesc (litespeed)" + depends="$pkgname-config" + + mkdir -p "$subpkgdir"/usr/bin || return 1 + mv "$pkgdir"/usr/bin/lsphp \ + "$subpkgdir"/usr/bin/lsphp$_suffix || return 1 + ln -sf /usr/bin/lsphp$_suffix "$subpkgdir"/usr/bin/lsphp +} + +cgi() { + provides="$_pkgreal-cgi $_pkgreal$_compat-cgi" + replaces=$provides + pkgdesc="$pkgdesc (common gateway interface)" + depends="$pkgname-config" + + mkdir -p "$subpkgdir"/usr/bin || return 1 + mv "$pkgdir"/usr/bin/php-cgi$_suffix \ + "$subpkgdir"/usr/bin/ || return 1 + ln -sf /usr/bin/php-cgi$_suffix "$subpkgdir"/usr/bin/php-cgi +} + +fpm() { + provides="$_pkgreal-fpm $_pkgreal$_compat-fpm" + replaces= + pkgdesc="$pkgdesc (fastcgi process manager)" + depends="$pkgname-config" + + mkdir -p "$subpkgdir"/usr/share \ + "$subpkgdir"/etc/$pkgname \ + "$subpkgdir"/var/log/$pkgname || return 1 + + mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ || return 1 + mv "$pkgdir"/usr/share/$pkgname \ + "$subpkgdir"/usr/share/ || return 1 + mv "$pkgdir"/etc/$pkgname/php-fpm* \ + "$subpkgdir"/etc/$pkgname/ || return 1 + + local file; + for file in php-fpm.conf php-fpm.d/www.conf; do + mv "$subpkgdir"/etc/$pkgname/$file.default \ + "$subpkgdir"/etc/$pkgname/$file || return 1 + done + + install -Dm755 "$srcdir"/$pkgname-fpm.initd \ + "$subpkgdir"/etc/init.d/$_pkgreal-fpm$_suffix || return 1 + install -Dm644 "$srcdir"/$pkgname-fpm.logrotate \ + "$subpkgdir"/etc/logrotate.d/$_pkgreal-fpm$_suffix || return 1 +} + +pear() { + provides="$_pkgreal-pear $_pkgreal$_compat-pear" + replaces=$provides + pkgdesc="$pkgdesc (php extension and application repository)" + depends="$pkgname $pkgname-xml" + + mkdir -p "$subpkgdir"/usr/bin \ + "$subpkgdir"/etc/$pkgname || return 1 + + mv "$pkgdir"/etc/$pkgname/pear.conf \ + "$subpkgdir"/etc/$pkgname/ || return 1 + + mv "$pkgdir"/usr/share \ + "$subpkgdir"/usr/ || return 1 + + sed -e "s/\$INCARG/\$INCARG -d extension=xml.so/" \ + -i "$pkgdir"/usr/bin/pecl || return 1 + + local file + for file in pear peardev pecl; do + mv "$pkgdir"/usr/bin/$file \ + "$subpkgdir"/usr/bin/$file$_suffix || return 1 + sed -e "s:/usr/bin/php:/usr/bin/php$_suffix:g" \ + -i "$subpkgdir"/usr/bin/$file$_suffix || return 1 + ln -sf /usr/bin/$file$_suffix \ + "$subpkgdir"/usr/bin/$file || return 1 + done +} + +pecl() { + provides="$_pkgreal-pecl $_pkgreal$_compat-pecl" + replaces= + pkgdesc="$pkgdesc (php extension community library)" + depends="$pkgname-pear $pkgname-dev autoconf gcc make musl-dev" + mkdir -p "$subpkgdir" +} + +config() { + provides="phpapi$_apiver" + replaces= + depends= + pkgdesc="$pkgdesc (common config)" + + mkdir -p "$subpkgdir"/$_extension_conf || return 1 + + install -Dm644 "$builddir"/php.ini-production \ + "$subpkgdir"/etc/$pkgname/php.ini || return 1 + + # exit with an error if some modules were not in subpackages + rmdir "$pkgdir"/$_extension_dir || return 1 + rm -fr "$pkgdir"/etc "$pkgdir"/var "$pkgdir"/usr/lib +} + +_phar() { + provides="$_pkgreal-phar-utils $_pkgreal$_compat-phar-utils" + replaces=$provides + pkgdesc="$pkgdesc (archive script)" + depends="$pkgname $pkgname-phar" + + mkdir -p "$subpkgdir"/usr/bin || return 1 + + rm "$pkgdir"/usr/bin/phar || return 1 + mv "$pkgdir"/usr/bin/phar.phar \ + "$subpkgdir"/usr/bin/phar.phar$_suffix || return 1 + + local file + for file in phar$_suffix phar phar.phar; do + ln -sf /usr/bin/phar.phar$_suffix \ + "$subpkgdir"/usr/bin/$file || return 1 + done +} + +_extension() { + local dep deps + local name=${subpkgname#$pkgname-} + local index=$(eval echo \${_index_$name:-0}) + provides="$_pkgreal-$name $_pkgreal$_compat-$name" + replaces= + depends=$(eval echo \$_depends_$name) + + pkgdesc=$(eval echo \$_pkgdesc_$name) + : ${pkgdesc:=$(head -n1 "$builddir"/ext/$name/CREDITS)} + pkgdesc="PHP$_suffix extension: ${pkgdesc:-$name}" + + [ -f "$builddir"/ext/$name/config.w32 ] && \ + deps=$(grep -o "_DEP('$name'.*" "$builddir"/ext/$name/config.w32 | sed "s/[',);]//g") + [ -f "$builddir"/ext/$name/config.m4 ] && \ + deps="$deps $(grep -o "_DEP($name,.*" "$builddir"/ext/$name/config.m4 | sed "s/[,)]//g")" + for dep in $(echo -e ${deps//[[:space:]]/\\n} | sort -u); do + [ -z "${_extensions##*$dep*}" ] && depends="$depends $pkgname-$dep" + done + + index=$(($(echo $depends | wc -w)+$index)) + depends="$pkgname-config phpapi$_apiver $depends" + + mkdir -p "$subpkgdir"/$_extension_dir \ + "$subpkgdir"/$_extension_conf || return 1 + + mv "$pkgdir"/$_extension_dir/$name.so \ + "$subpkgdir"/$_extension_dir || return 1 + + echo $(eval echo \$_prefix_$name)extension=$name.so > \ + "$subpkgdir"/$_extension_conf/$(printf %02d $index)_$name.ini +} + +sha512sums="90dd06348d5884a2bb4a22ab80bb4f50e603751a1787096f447762fe00e5b4f36deafda045ecf6345883d9f4b711755a854a2e7043f27702acfe78ade90b42d9 php-7.1.3.tar.bz2 +fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99 php7-module.conf +cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate +d91a915d00b8a25565b0ef87d5788ec40eb02b7890ab72df8cea49693311645c97ce2eed6f706a12704c7818102daee7ba2c42ee814c61bb29f90e464e3bb17f php7-fpm.initd +a4c35446745ab0ac806de801f0651fc5d2c98cf60063c3c2d3963a84f1c71ef78e09b7650c08e7231be0fdb93c0c255de38894d7f0e4f4c5a190d17f1a6bc476 php7-fpm.patch +199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b php7-includedir.patch +f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch" diff --git a/testing/php7/install-pear.patch b/testing/php7/install-pear.patch new file mode 100644 index 0000000000..18747be94b --- /dev/null +++ b/testing/php7/install-pear.patch @@ -0,0 +1,15 @@ +--- ./pear/Makefile.frag.orig 2013-04-12 07:02:27.041602514 +0000 ++++ ./pear/Makefile.frag 2013-04-12 07:04:09.065836822 +0000 +@@ -2,8 +2,11 @@ + + peardir=$(PEAR_INSTALLDIR) + ++# help the built php to find xml extension so we can install pear ++PEAR_INSTALL_XML_FLAGS = -d extension_dir="$(top_builddir)/modules" -d extension=xml.so ++ + # Skip all php.ini files altogether +-PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0 ++PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0 $(PEAR_INSTALL_XML_FLAGS) + + WGET = `which wget 2>/dev/null` + FETCH = `which fetch 2>/dev/null` diff --git a/testing/php7/php7-fpm.initd b/testing/php7/php7-fpm.initd new file mode 100644 index 0000000000..500bbbc006 --- /dev/null +++ b/testing/php7/php7-fpm.initd @@ -0,0 +1,87 @@ +#!/sbin/openrc-run + +# If you want to run separate master process per pool, then create a symlink +# to this runscript for each pool. In that mode, the php-fpm daemon is started +# as nobody by default. You can override the user (and group) by declaring +# variable "user" and optionally "group" in conf.d file, or in the $fpm_config +# file (the former has precedence). + +: ${name:="PHP FastCGI Process Manager"} + +command="/usr/sbin/php-fpm7" +command_background="yes" +start_stop_daemon_args="--quiet" +pidfile="/run/$RC_SVCNAME/php-fpm.pid" +retry="SIGTERM/20" + +extra_commands="checkconfig" +extra_started_commands="reload reopen" +description_checkconfig="Run php-fpm config check" +description_reload="Gracefully reload workers and config" +description_reopen="Reopen log files" + +required_files="$fpm_config" + +depend() { + need net + before apache2 lighttpd nginx +} + +init_vars() { + # Defaults for single master process with multiple pools + if [ "$RC_SVCNAME" = "php-fpm7" ]; then + : ${fpm_config:="/etc/php7/php-fpm.conf"} + : ${user:="root"} + # Defaults for master process per pool + else + : ${fpm_config="/etc/php7/php-fpm.d/${RC_SVCNAME#php-fpm7.}.conf"} + : ${user:="$(conf_get user)"} + : ${user:="nobody"} + : ${group:="$(conf_get group)"} + fi + command_args="--nodaemonize --fpm-config $fpm_config" + start_stop_daemon_args="$start_stop_daemon_args + --user $user ${group:+"--group $group"}" +} + +start_pre() { + checkconfig || return 1 + + # If unix socket is used (instead of TCP/IP), then ensure that the + # directory exists and has correct privileges. + local listen="$(conf_get listen)" + if [ "${listen:0:1}" = "/" ]; then + checkpath -d -o $user:$group "${listen%/*}" + fi + + checkpath -d "${pidfile%/*}" +} + +reload() { + ebegin "Reloading $RC_SVCNAME" + start-stop-daemon --signal USR2 --pidfile "$pidfile" + eend $? +} + +reopen() { + ebegin "Reopening $RC_SVCNAME log files" + start-stop-daemon --signal USR1 --pidfile "$pidfile" + eend $? +} + +checkconfig() { + init_vars + ebegin "Checking $fpm_config" + + local out + out="$(su -s /bin/sh -c "$command --test --fpm-config $fpm_config" $user 2>&1)" || { + printf "%s\n" "$out" + eend 1 "failed, please correct errors above" + return 1 + } +} + +conf_get() { + local key="$1" + sed -nE "s/^${key}\s*=\s*\"?([^\";]+).*/\1/p" "$fpm_config" | head -n 1 +} diff --git a/testing/php7/php7-fpm.logrotate b/testing/php7/php7-fpm.logrotate new file mode 100644 index 0000000000..10e53e4683 --- /dev/null +++ b/testing/php7/php7-fpm.logrotate @@ -0,0 +1,13 @@ +/var/log/php7/*.log { + rotate 7 + daily + missingok + notifempty + delaycompress + compress + dateext + sharedscripts + postrotate + /etc/init.d/php-fpm7 --ifstarted --quiet reopen + endscript +} diff --git a/testing/php7/php7-fpm.patch b/testing/php7/php7-fpm.patch new file mode 100644 index 0000000000..e8aee952f3 --- /dev/null +++ b/testing/php7/php7-fpm.patch @@ -0,0 +1,55 @@ +--- a/sapi/fpm/fpm/fpm_conf.c ++++ b/sapi/fpm/fpm/fpm_conf.c +@@ -1180,3 +1180,3 @@ + if (!fpm_global_config.error_log) { +- fpm_global_config.error_log = strdup("log/php-fpm.log"); ++ fpm_global_config.error_log = strdup("log/php7/error.log"); + } +@@ -1191,3 +1191,3 @@ + if (!fpm_global_config.syslog_ident) { +- fpm_global_config.syslog_ident = strdup("php-fpm"); ++ fpm_global_config.syslog_ident = strdup("php-fpm7"); + } +@@ -1683,3 +1683,3 @@ + } else { +- spprintf(&tmp, 0, "%s/etc/php-fpm.conf", fpm_globals.prefix); ++ spprintf(&tmp, 0, "%s/etc/php7/php-fpm.conf", fpm_globals.prefix); + } +--- a/sapi/fpm/php-fpm.conf.in ++++ b/sapi/fpm/php-fpm.conf.in +@@ -16,3 +16,3 @@ + ; Default Value: none +-;pid = run/php-fpm.pid ++;pid = run/php-fpm7.pid + +@@ -22,4 +22,4 @@ + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ +-; Default Value: log/php-fpm.log +-;error_log = log/php-fpm.log ++; Default Value: log/php7/error.log ++;error_log = log/php7/error.log + +@@ -35,4 +35,4 @@ + ; which must suit common needs. +-; Default Value: php-fpm +-;syslog.ident = php-fpm ++; Default Value: php-fpm7 ++;syslog.ident = php-fpm7 + +--- a/sapi/fpm/www.conf.in ++++ b/sapi/fpm/www.conf.in +@@ -252,3 +252,3 @@ + ; Default: not set +-;access.log = log/$pool.access.log ++;access.log = log/php7/$pool.access.log + +@@ -316,3 +316,3 @@ + ; Note: slowlog is mandatory if request_slowlog_timeout is set +-;slowlog = log/$pool.log.slow ++;slowlog = log/php7/$pool.slow.log + +@@ -410,3 +410,3 @@ + ;php_flag[display_errors] = off +-;php_admin_value[error_log] = /var/log/fpm-php.www.log ++;php_admin_value[error_log] = /var/log/php7/$pool.error.log + ;php_admin_flag[log_errors] = on diff --git a/testing/php7/php7-includedir.patch b/testing/php7/php7-includedir.patch new file mode 100644 index 0000000000..0e1eafe83d --- /dev/null +++ b/testing/php7/php7-includedir.patch @@ -0,0 +1,41 @@ +--- a/scripts/Makefile.frag ++++ b/scripts/Makefile.frag +@@ -3,7 +3,7 @@ + # Build environment install + # + +-phpincludedir = $(includedir)/php ++phpincludedir = $(includedir)/php7 + phpbuilddir = $(libdir)/build + + BUILD_FILES = \ +--- a/ext/pdo/Makefile.frag ++++ b/ext/pdo/Makefile.frag +@@ -1,4 +1,4 @@ +-phpincludedir=$(prefix)/include/php ++phpincludedir=$(prefix)/include/php7 + + PDO_HEADER_FILES= \ + php_pdo.h \ +--- a/scripts/php-config.in ++++ b/scripts/php-config.in +@@ -6,7 +6,7 @@ + exec_prefix="@exec_prefix@" + version="@PHP_VERSION@" + vernum="@PHP_VERSION_ID@" +-include_dir="@includedir@/php" ++include_dir="@includedir@/php7" + includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib" + ldflags="@PHP_LDFLAGS@" + libs="@EXTRA_LIBS@" +--- a/scripts/phpize.in ++++ b/scripts/phpize.in +@@ -5,7 +5,7 @@ + datarootdir='@datarootdir@' + exec_prefix="`eval echo @exec_prefix@`" + phpdir="`eval echo @libdir@`/build" +-includedir="`eval echo @includedir@`/php" ++includedir="`eval echo @includedir@`/php7" + builddir="`pwd`" + SED="@SED@" + diff --git a/testing/php7/php7-module.conf b/testing/php7/php7-module.conf new file mode 100644 index 0000000000..cf7573bb10 --- /dev/null +++ b/testing/php7/php7-module.conf @@ -0,0 +1,5 @@ +LoadModule php7_module modules/mod_php7.so + +DirectoryIndex index.php index.html +AddHandler application/x-httpd-php .php +AddHandler application/x-httpd-php-source .phps |