--
WARN: PHP API version changed. All external extensions needs to be rebuilded!
- some fixes in APKBUILD and others
- added shared extension 'recode'
- fixed imap loading order (http://php.net/manual/en/recode.installation.php)
- removed shared extension 'readline', made it compiled-in (Bug #5670)
- removed development binaries suffix, so php5-dev and php7-dev blocked each other
v2 changes:
- cli, cgi and dbg binaries are symlinked to non-suffixed ones (Support #5367, Bug #6450)
- php7-common now generates symlinks for common binaries via trigger
to fix symlinks to php7 just run: "apk fix php7-common", but the same idea needs
to be implemented in php5 to allow choose which one would be system default
v3 changes:
- fixes and cleanups and prepare to reuse this APKBUILD to build main/php5
- PEAR repository moved to /usr/share/php
- phar.phar script moved from -pear to -dev subpackage
---
community/php7/APKBUILD | 287 +++++++++++-------------
community/php7/{pid_log.patch => php-fpm.patch} | 24 +-
community/php7/php7-common.pre-deinstall | 5 +
community/php7/php7-common.pre-upgrade | 7 +
community/php7/php7-common.trigger | 9 +
community/php7/php7-fpm.initd | 35 +--
community/php7/php7-fpm.logrotate | 2 +-
community/php7/php7-module.conf | 2 +-
community/php7/tidy-buffio.patch | 11 -
9 files changed, 178 insertions(+), 204 deletions(-)
rename community/php7/{pid_log.patch => php-fpm.patch} (76%)
create mode 100644 community/php7/php7-common.pre-deinstall
create mode 100644 community/php7/php7-common.pre-upgrade
create mode 100644 community/php7/php7-common.trigger
delete mode 100644 community/php7/tidy-buffio.patch
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index 31ee5675a1..9ce6d2384d 100644
--- a/community/php7/APKBUILD
@@ -1,65 +1,65 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
+provides=php
pkgname=php7
-_pkgreal=php
-pkgver=7.0.14
-pkgrel=1
+pkgver=7.1.0
+pkgrel=0
+_apiver="20160303"
pkgdesc="The PHP language runtime engine - 7th branch"
url="http://www.php.net/"
arch="all"
license="PHP-3"
options=""
+install="$pkgname-common.pre-upgrade $pkgname-common.pre-deinstall"
+triggers="$pkgname-common.trigger=/usr/bin"
depends="$pkgname-common"
-depends_dom="$pkgname-xml"
-depends_mysqlnd="$pkgname-mysqli"
-depends_phar="$pkgname"
-depends_soap="$pkgname-xml"
-depends_wddx="$pkgname-xml"
-depends_xmlreader="$pkgname-dom"
-depends_xmlrpc="$pkgname-xml"
-depends_xsl="$pkgname-dom"
+depends_dev="$pkgname-pear"
+depends_imap="-- $depends_recode"
+depends_mysqlnd="$pkgname-mysqli $depends_mysqli"
+depends_pdo_mysql="$pkgname-pdo $depends_pdo"
+depends_pdo_odbc="$pkgname-pdo $depends_pdo"
+depends_pdo_pgsql="$pkgname-pdo $depends_pdo"
+depends_pdo_sqlite="$pkgname-pdo $depends_pdo"
+depends_dom="$pkgname-xml $depends_xml"
+depends_soap="$pkgname-xml $depends_xml"
+depends_wddx="$pkgname-xml $depends_xml"
+depends_xmlrpc="$pkgname-xml $depends_xml"
+depends_xmlreader="$pkgname-dom $depends_dom"
+depends_xsl="$pkgname-dom $depends_dom"
+_prefix_opcache="zend_"
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
libical-dev libressl-dev openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev
- freetds-dev mariadb-dev postgresql-dev unixodbc-dev freetype-dev tidyhtml-dev libxpm-dev
+ mariadb-dev postgresql-dev unixodbc-dev freetype-dev tidyhtml-dev libxpm-dev
libpng-dev libwebp-dev libjpeg-turbo-dev libmcrypt-dev gsoap-dev recode-dev
- readline-dev paxmark gettext-dev
+ readline-dev gettext-dev
"
-source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
+source="http://php.net/distributions/$provides-$pkgver.tar.bz2
$pkgname-fpm.initd
$pkgname-fpm.logrotate
$pkgname-module.conf
install-pear.patch
- tidy-buffio.patch
includedir.patch
- pid_log.patch
+ php-fpm.patch
"
-builddir="$srcdir/$_pkgreal-$pkgver"
-
_exts="bcmath bz2 calendar ctype curl dba dom enchant exif ftp gd gettext gmp iconv imap intl json
ldap mbstring mcrypt mysqli mysqlnd odbc opcache openssl pcntl pdo pdo_dblib pdo_mysql
- pdo_odbc pdo_pgsql pdo_sqlite pgsql phar:phar posix pspell readline session shmop snmp soap
+ 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 xsl zip zlib
"
subpackages="$pkgname-dev $pkgname-doc $pkgname-apache2 $pkgname-phpdbg $pkgname-embed
$pkgname-litespeed $pkgname-cgi $pkgname-fpm $pkgname-pear::noarch
"
for _ext in $_exts; do
- case "$_ext" in
- *:*) subpackages="$subpackages $pkgname-$_ext";;
- *) subpackages="$subpackages $pkgname-$_ext:_package_ext";;
- esac
+ subpackages="$subpackages $pkgname-$_ext:_default_ext"
done
subpackages="$subpackages $pkgname-common::noarch"
-
-_apiver="20151012"
+builddir="$srcdir"/$provides-$pkgver
prepare() {
cd "$builddir"
-
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"
@@ -74,14 +74,13 @@ _build() {
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
- --program-suffix=7 \
--libdir=/usr/lib/$pkgname \
--datadir=/usr/share/$pkgname \
--sysconfdir=/etc/$pkgname \
--localstatedir=/var \
--with-layout=GNU \
--with-pic \
- --with-pear=/usr/share/$pkgname \
+ --with-pear=/usr/share/$provides \
--with-config-file-path=/etc/$pkgname \
--with-config-file-scan-dir=/etc/$pkgname/conf.d \
--disable-short-tags \
@@ -103,7 +102,6 @@ _build() {
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
- --with-imap=shared --with-imap-ssl \
--enable-intl=shared --with-icu-dir=/usr \
--enable-json=shared \
--enable-libxml=shared --with-libxml-dir=shared --with-libexpat-dir=shared \
@@ -138,226 +136,191 @@ _build() {
--with-xsl=shared \
--enable-wddx=shared \
--enable-zip=shared --with-libzip=shared \
+ --with-readline \
$@ || return 1
- sed -ri "s/^(EXTRA_LDFLAGS[ ]*\=.*)/\1 -lpthread/" Makefile # see #183 (from main/php)
+ sed -ri "s/^(EXTRA_LDFLAGS[ ]*\=.*)/\1 -lpthread/" Makefile # see #183
make || return 1
}
build() {
cd "$builddir"
-
- # phpdbg
+ # build phpdbg
_build --enable-phpdbg \
- --enable-phpdbg \
--enable-phpdbg-webhelper \
--disable-cgi \
--disable-cli \
- --with-readline \
|| return 1
- # apache2 module
+ # build apache2 module
_build --disable-phpdbg \
--disable-cgi \
--disable-cli \
--with-apxs2 \
- --with-readline=shared \
|| return 1
- mv libs/libphp7.so sapi/apache2handler/mod_php7.so
- # cgi,cli,fpm,embed,litespeed
+ mv libs/lib$pkgname.so sapi/apache2handler/
+ # common build - with recode
_build --disable-phpdbg \
--enable-fpm \
--enable-embed \
--with-litespeed \
- --with-readline=shared \
+ --with-recode=shared \
+ || return 1
+ # common build - with imap
+ _build --disable-phpdbg \
+ --enable-fpm \
+ --enable-embed \
+ --with-litespeed \
+ --with-imap=shared --with-imap-ssl \
|| return 1
}
package() {
cd "$builddir"
-
make -j1 INSTALL_ROOT="$pkgdir" install || return 1
-
- install -Dm644 php.ini-production "$pkgdir"/etc/$pkgname/php.ini || return 1
-
- local file; for file in pear peardev pecl; do
- sed -i -e "s~/usr/bin/php~/usr/bin/php7~g" \
- -e "s~PHP=php~PHP=php7~" \
- "$pkgdir"/usr/bin/$file || return 1
- done
- paxmark -m "$pkgdir"/usr/bin/php7
-
- find "$pkgdir" -name '.*' | xargs rm -rf || return 1
- rmdir "$pkgdir"/var/run
+ rm -fr "$pkgdir"/.[[:alpha:]]* "$pkgdir"/var || return 1
+ mv "$pkgdir"/usr/share/man/man1/php.1 \
+ "$pkgdir"/usr/share/man/man1/$pkgname.1
+ mv "$pkgdir"/usr/share/man/man1/php-cgi.1 \
+ "$pkgdir"/usr/share/man/man1/$pkgname-cgi.1
+ mv "$pkgdir"/usr/share/man/man8/php-fpm.8 \
+ "$pkgdir"/usr/share/man/man8/$pkgname-fpm.8
+ mv "$pkgdir"/usr/bin/php "$pkgdir"/usr/bin/$pkgname
}
dev() {
default_dev
- depends="$depends $pkgname $pkgname-pear"
-
- mkdir -p "$subpkgdir"/usr/bin \
- "$subpkgdir"/usr/lib/$pkgname
-
- mv "$pkgdir"/usr/bin/php-config7 "$pkgdir"/usr/bin/peardev \
- "$subpkgdir"/usr/bin/ || return 1
- mv "$pkgdir"/usr/lib/$pkgname/build \
- "$subpkgdir"/usr/lib/$pkgname/
+ replaces="php5-dev"
+ provides="php-dev"
+ depends="$depends $pkgname-phar"
+ mv "$pkgdir"/usr/bin/phpize \
+ "$pkgdir"/usr/bin/peardev \
+ "$pkgdir"/usr/bin/phar* \
+ "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/lib/$pkgname/build "$subpkgdir"/usr/lib/$pkgname/
}
doc() {
default_doc
-
- mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
-
- local file
- for file in CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* UPGRADING*; do
- cp "$builddir"/$file "$subpkgdir"/usr/share/doc/$pkgname/ || return 1
+ install_if="docs $pkgname-common=$pkgver-r$pkgrel"
+ cd "$builddir"
+ 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() {
- pkgdesc="PHP Module for Apache2"
+ pkgdesc="$pkgname module for Apache2"
depends="$pkgname-common apache2"
-
- install -D -m755 "$builddir"/sapi/apache2handler/mod_php7.so \
- "$subpkgdir"/usr/lib/apache2/mod_php7.so || return 1
-
- install -D -m644 "$srcdir"/php7-module.conf \
- "$subpkgdir"/etc/apache2/conf.d/php7-module.conf
+ install -Dm755 "$builddir"/sapi/apache2handler/lib$pkgname.so \
+ "$subpkgdir"/usr/lib/apache2/lib$pkgname.so || return 1
+ install -Dm644 "$srcdir"/$pkgname-module.conf \
+ "$subpkgdir"/etc/apache2/conf.d/$pkgname-module.conf
}
phpdbg() {
- pkgdesc="Interactive PHP debugger"
+ pkgdesc="$pkgname interactive debugger"
depends="$pkgname-common"
-
install -Dm755 "$builddir"/sapi/phpdbg/phpdbg \
- "$subpkgdir"/usr/bin/phpdbg7
+ "$subpkgdir"/usr/bin/${pkgname}dbg
}
embed() {
- pkgdesc="PHP Embedded Library"
+ pkgdesc="$pkgname embedded library"
depends="$pkgname-common"
-
mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/libphp*.so "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/lib/lib$pkgname.so "$subpkgdir"/usr/lib/
}
litespeed() {
- pkgdesc="PHP LiteSpeed SAPI"
+ pkgdesc="$pkgname litespeed SAPI"
depends="$pkgname-common"
-
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/lsphp "$subpkgdir"/usr/bin/lsphp7
+ mv "$pkgdir"/usr/bin/lsphp "$subpkgdir"/usr/bin/ls$pkgname
}
cgi() {
- pkgdesc="PHP Common Gateway Interface"
+ pkgdesc="$pkgname common gateway interface"
depends="$pkgname-common"
-
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/php-cgi7 "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/php-cgi "$subpkgdir"/usr/bin/$pkgname-cgi
}
fpm() {
- pkgdesc="PHP FastCGI Process Manager"
+ pkgdesc="$pkgname FastCGI process manager"
depends="$pkgname-common"
-
- mv "$pkgdir"/var "$subpkgdir"/ || return 1
-
mkdir -p "$subpkgdir"/etc/$pkgname \
"$subpkgdir"/usr \
"$subpkgdir"/var/lib \
"$subpkgdir"/var/log/$pkgname
-
- mv "$pkgdir"/usr/share/$pkgname/fpm "$subpkgdir"/var/lib/$pkgname/ || return 1
- mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ || return 1
+ mv "$pkgdir"/usr/share/$pkgname/fpm "$subpkgdir"/var/lib/$pkgname || return 1
+ mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
+ mv "$subpkgdir"/usr/sbin/php-fpm "$subpkgdir"/usr/sbin/$pkgname-fpm || 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 -D -m755 "$srcdir"/$pkgname-fpm.initd "$subpkgdir"/etc/init.d/php-fpm7 || return 1
- install -D -m644 "$srcdir"/$pkgname-fpm.logrotate "$subpkgdir"/etc/logrotate.d/php-fpm7
+ find "$subpkgdir"/etc/$pkgname -name *.default -exec sh -c 'f={}; mv $f ${f%.default}' \;
+ install -D -m755 "$srcdir"/$pkgname-fpm.initd "$subpkgdir"/etc/init.d/$pkgname-fpm
+ install -D -m644 "$srcdir"/$pkgname-fpm.logrotate "$subpkgdir"/etc/logrotate.d/$pkgname-fpm
}
pear() {
- pkgdesc="PHP Extension and Application Repository"
+ replaces="php5-pear"
+ provides="php-pear"
+ pkgdesc="$pkgname extension and application repository"
depends="$pkgname $pkgname-xml"
-
- mkdir -p "$subpkgdir"/usr/bin \
- "$subpkgdir"/etc/$pkgname
-
- local file; for file in phpize7 pecl pear; do
- mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/
- done
+ mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/etc/$pkgname
+ mv "$pkgdir"/usr/bin/pecl "$pkgdir"/usr/bin/pear "$subpkgdir"/usr/bin/
mv "$pkgdir"/etc/$pkgname/pear.conf "$subpkgdir"/etc/$pkgname/ || return 1
mv "$pkgdir"/usr/share "$subpkgdir"/usr/
+ rmdir "$subpkgdir"/usr/share/$pkgname || return 1
}
common() {
- pkgdesc="$pkgdesc (common config)"
-
- mkdir -p "$subpkgdir"/usr
- mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ || return 1
- mv "$pkgdir"/etc "$subpkgdir"/ || return 1
-
- mkdir "$subpkgdir"/etc/$pkgname/conf.d
-}
-
-phar() {
- _package_ext || return 1
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/phar* "$subpkgdir"/usr/bin/
+ pkgdesc="$pkgname common config"
+ depends=
+ install -Dm644 "$builddir"/php.ini-production \
+ "$subpkgdir"/etc/$pkgname/php.ini || return 1
+ # exit with an error if there is any configs
+ # or if some modules were not in subpackages
+ rmdir "$pkgdir"/usr/lib/$pkgname/modules \
+ "$pkgdir"/etc/$pkgname || return 1
+ rm -fr "$pkgdir"/etc "$pkgdir"/usr/lib
}
-_package_ext() {
- local extname="${subpkgname#$pkgname-}"
- local extdepends="$(eval "echo \$depends_$extname")"
- pkgdesc="PHP7 extension: $extname"
- depends="$depends $extdepends"
-
- case "$extname" in
- pdo_*) depends="$depends $pkgname-pdo"
- esac
-
- # extension dependencies and loading order
- local elo=00
- [ -z "$extdepends" ] || elo=01
-
- # extension prefix
- local prefix=
- [ "$extname" != "opcache" ] || prefix="zend_"
-
+_default_ext() {
+ local dep=
+ local sep=
+ local elo=0
+ local extname=${subpkgname#$pkgname-}
+ pkgdesc="$pkgname extension: $extname"
+ for dep in $(eval echo \$depends_$extname); do
+ elo=$(expr $elo + 1)
+ [ "$dep" = "--" ] && sep=$dep
+ [ "$sep" = "--" ] || depends="$depends $dep"
+ done
mkdir -p "$subpkgdir"/usr/lib/$pkgname/modules \
"$subpkgdir"/etc/$pkgname/conf.d
mv "$pkgdir"/usr/lib/$pkgname/modules/$extname.so \
"$subpkgdir"/usr/lib/$pkgname/modules/ || return 1
-
- echo "${prefix}extension=$extname.so" \
- > "$subpkgdir"/etc/$pkgname/conf.d/${elo}_${extname}.ini
+ echo $(eval echo \$_prefix_$extname)extension=$extname.so >\
+ "$subpkgdir"/etc/$pkgname/conf.d/$(printf %02d $elo)_${extname}.ini
}
-md5sums="903ff1fd199201d7e69dc0963797072b php-7.0.14.tar.bz2
-4115cbd0843c72adc3bd42fecd6d4540 php7-fpm.initd
-25bde13e7894c2930d97fad68d5dd3b3 php7-fpm.logrotate
-47be6cd1ed92f21579e15bf2003a709f php7-module.conf
+md5sums="54e364b60a88db77adb96aacb10f10a4 php-7.1.0.tar.bz2
+ececde8ea74030b962a5418fa534cd9a php7-fpm.initd
+6085eb7854c192b6a533bb18eeaebe2f php7-fpm.logrotate
+3cea5c5334508dfc43591cd5bb1483c6 php7-module.conf
483bc0a85c50a9a9aedbe14a19ed4526 install-pear.patch
-66f0037a029f9eed2b31d2e1d50f1860 tidy-buffio.patch
d872e633c9b33c3c9f629dd2edd2e5c5 includedir.patch
-6ba762ab7a105163b8e5b3913deae109 pid_log.patch"
-sha256sums="fbc4369a0d42b55fd1ce75eb4f3d17b012da754a67567d8e3288fbfbb7490534 php-7.0.14.tar.bz2
-a7e4fc0eeba18aec019f62ed966915afd82b6b5fb1e1af93b59f964b5bd66172 php7-fpm.initd
-6e4406f21b69085714cdb9d9a67c08e27a1c737ab353f9813cb2fc268352d2c6 php7-fpm.logrotate
-276c823ee666ea73b36d4e97174eeea05713125b61f7f8681e350453c4123143 php7-module.conf
+edb29ea13fab52e50d3ee305e3f38060 php-fpm.patch"
+sha256sums="68bcfd7deed5b3474d81dec9f74d122058327e2bed0ac25bbc9ec70995228e61 php-7.1.0.tar.bz2
+e7a13806bb7b1d91f3d60c6a741261002fd84b2e67410cf6598c476d1b563f8b php7-fpm.initd
+bcd2f0a5caed573e4ac31a0dea6a7cd2584cdb9943f8a390b80ed900180dbb2a php7-fpm.logrotate
+dc73bb3a3bca94cdf070338ecfed85940548eda978e9392a711226ba62c1ce60 php7-module.conf
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab install-pear.patch
-5dc8f32e5e2b1cd6317ada5a5adb9b5f0802ed6e0dbe065d7bfcc0f55d47e0d5 tidy-buffio.patch
ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7 includedir.patch
-0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec pid_log.patch"
-sha512sums="549b2e03b92df93646e430406cc20791b12de329a1fa83f8c2d42c5894119cd67b88a047b503925a7574077a66d9a0a0ada1921cbe62dba32d51c850b7d589ee php-7.0.14.tar.bz2
-1c708de82d1086f272f484faf6cf6d087af7c31750cc2550b0b94ed723961b363f28a947b015b2dfc0765caea185a75f5d2c2f2b099c948b65c290924f606e4f php7-fpm.initd
-cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate
-fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99 php7-module.conf
+60ced777af95bd0110c71a3d00a3169fd4b1e599560028e799c45599cc14c2a6 php-fpm.patch"
+sha512sums="94c051abd19dbdf3d016f068269b5c6d667938def4df1732f7826a0ab2dd1fa541ff838dafc1531e1c4fa790df0b07feaef97512b28dda3e4ce5e724ede89b37 php-7.1.0.tar.bz2
+3f66e9f8711434b42647ee3123215a4a70dfea5f54522c709808e5dbef72b75ed11e92a2200f29dd8f7787dfdb7b2d191a88c2282c0bf95950ce5d3128c74388 php7-fpm.initd
+da404e9d7bb7af484351b6c9d2a2e8f1eff8d44704da3d877bc6af11c638e0a1f7225ea5ac381cada316876dfaaa81254c87fe3867849fb898478f459fdc367b php7-fpm.logrotate
+ebfa4365c88c745fb27d9271d66daabeaecb26ce31e01716d42c187a0afd06e22e815a66e2aafb29e1e88a23248e3b4182928033294928985c9b8362174738c8 php7-module.conf
f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch
-6894c9cba7752a3406e774d9efc0e058c37433493c1c20101e9563bf247c112157a67e306b06b9517b0422eca521f543d637a6cbd2cea7639e43f13d773b3d2b tidy-buffio.patch
199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch
-82231c7b27b4d044272857dc713674884715ed8e36e54be06faa5d2a949ba4bca597628958a9c5683ec51c36e05a00f6be811c7e95112b0314c98528f584a8d6 pid_log.patch"
+9503514f22d591125fb08da23f4bcc9fc47e9b2cf8b53c6ca0130e1325acce621c21a59a60ab687c87972feba7f0007d52f4bd4790a1aca592383212891c4e7c php-fpm.patch"
diff --git a/community/php7/pid_log.patch b/community/php7/php-fpm.patch
similarity index 76%
rename from community/php7/pid_log.patch
rename to community/php7/php-fpm.patch
index bc586dbd69..b44361db19 100644
--- a/community/php7/pid_log.patch
@@ -14,7 +14,7 @@
#ifdef HAVE_SYSLOG_H
if (!fpm_global_config.syslog_ident) {
- fpm_global_config.syslog_ident = strdup("php-fpm");
-+ fpm_global_config.syslog_ident = strdup("php-fpm7");
++ fpm_global_config.syslog_ident = strdup("php7-fpm");
}
if (fpm_global_config.syslog_facility < 0) {
@@ -23,7 +23,7 @@
spprintf(&tmp, 0, "%s/php-fpm.conf", PHP_SYSCONFDIR);
} else {
- spprintf(&tmp, 0, "%s/etc/php-fpm.conf", fpm_globals.prefix);
-+ spprintf(&tmp, 0, "%s/etc/php-fpm7.conf", fpm_globals.prefix);
++ spprintf(&tmp, 0, "%s/etc/php7/php-fpm.conf", fpm_globals.prefix);
}
if (!tmp) {
@@ -34,18 +34,30 @@
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
; Default Value: none
-;pid = run/php-fpm.pid
-+;pid = run/php-fpm7.pid
++;pid = run/php7-fpm.pid
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
- ; in a local file.
+ ; into a local file.
; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
- ; Default Value: log/php-fpm.log
+-; Default Value: log/php-fpm.log
-;error_log = log/php-fpm.log
++; Default Value: log/php7/error.log
+;error_log = log/php7/error.log
; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
+@@ -33,8 +33,8 @@
+ ; syslog_ident is prepended to every message. If you have multiple FPM
+ ; instances running on the same server, you can change the default value
+ ; which must suit common needs.
+-; Default Value: php-fpm
+-;syslog.ident = php-fpm
++; Default Value: php7-fpm
++;syslog.ident = php7-fpm
+
+ ; Log level
+ ; Possible Values: alert, error, warning, notice, debug
--- a/sapi/fpm/www.conf.in
+++ b/sapi/fpm/www.conf.in
@@ -250,7 +250,7 @@
@@ -71,6 +83,6 @@
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-+;php_admin_value[error_log] = /var/log/php7/www.error.log
++;php_admin_value[error_log] = /var/log/php7/$pool.error.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
diff --git a/community/php7/php7-common.pre-deinstall b/community/php7/php7-common.pre-deinstall
new file mode 100644
index 0000000000..cec8da2a94
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+find -L /usr/bin -type l -name "*php*" -delete
+
+exit 0
diff --git a/community/php7/php7-common.pre-upgrade b/community/php7/php7-common.pre-upgrade
new file mode 100644
index 0000000000..c337c8c658
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for file in $(find /usr/bin -type f -name "*php7*"); do
+ [ ! -e ${file/7/} -o -L ${file/7/} ] && ln -sf $file ${file/7/}
+done
+
+exit 0
diff --git a/community/php7/php7-common.trigger b/community/php7/php7-common.trigger
new file mode 100644
index 0000000000..eb577df7b9
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+find -L /usr/bin -type l -name "*php*" -delete
+
+for file in $(find /usr/bin -type f -name "*php7*"); do
+ [ ! -e ${file/7/} ] && ln -sf $file ${file/7/}
+done
+
+exit 0
diff --git a/community/php7/php7-fpm.initd b/community/php7/php7-fpm.initd
index f56fdb5234..7859ad8c17 100644
--- a/community/php7/php7-fpm.initd
@@ -6,18 +6,17 @@
# 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="/usr/sbin/php7-fpm"
command_background="yes"
start_stop_daemon_args="--quiet"
-pidfile="/run/$RC_SVCNAME/php-fpm.pid"
+pidfile="/run/$RC_SVCNAME/php7-fpm.pid"
retry="SIGTERM/20"
# configtest is here only for backward compatibility
-extra_commands="checkconfig configtest"
+extra_commands="checkconfig"
extra_started_commands="reload reopen"
-description_checkconfig="Run php-fpm config check"
+description="PHP7 FastCGI Process Manager"
+description_checkconfig="Run config check"
description_reload="Gracefully reload workers and config"
description_reopen="Reopen log files"
@@ -25,47 +24,43 @@ required_files="$fpm_config"
depend() {
need net
- use apache2 lighttpd nginx
+ before apache2 lighttpd nginx
}
init_vars() {
# Defaults for single master process with multiple pools
- if [ "$RC_SVCNAME" = "php-fpm7" ]; then
+ if [ "$RC_SVCNAME" = "php7-fpm" ]; 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"}
+ : ${fpm_config="/etc/php7/php-fpm.d/${RC_SVCNAME#php7-fpm.}.conf"}
: ${user:="$(conf_get user)"}
: ${user:="nobody"}
: ${group:="$(conf_get group)"}
fi
- command_args="--nodaemonize --fpm-config $fpm_config"
+ command_args="--nodaemonize --fpm-config $fpm_config --pid $pidfile"
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 "$(dirname "$listen")"
- fi
-
+ [ "${listen:0:1}" = "/" ] && checkpath -d -o $user:$group "$(dirname "$listen")"
checkpath -d "$(dirname "$pidfile")"
}
reload() {
- ebegin "Reloading $name"
+ ebegin "Reloading $RC_SVCNAME"
start-stop-daemon --signal USR2 --pidfile "$pidfile"
eend $?
}
reopen() {
- ebegin "Reopening $name log files"
+ ebegin "Reopening $RC_SVCNAME log files"
start-stop-daemon --signal USR1 --pidfile "$pidfile"
eend $?
}
@@ -73,7 +68,6 @@ reopen() {
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"
@@ -82,11 +76,6 @@ checkconfig() {
}
}
-configtest() {
- ewarn "configtest is deprecated, use checkconfig instead"
- checkconfig
-}
-
conf_get() {
local key="$1"
sed -nE "s/^${key}\s*=\s*\"?([^\";]+).*/\1/p" "$fpm_config" | head -n 1
diff --git a/community/php7/php7-fpm.logrotate b/community/php7/php7-fpm.logrotate
index 10e53e4683..4273f72474 100644
--- a/community/php7/php7-fpm.logrotate
@@ -8,6 +8,6 @@
dateext
sharedscripts
postrotate
- /etc/init.d/php-fpm7 --ifstarted --quiet reopen
+ /etc/init.d/php7-fpm --ifstarted --quiet reopen
endscript
}
diff --git a/community/php7/php7-module.conf b/community/php7/php7-module.conf
index cf7573bb10..f0a0b47a00 100644
--- a/community/php7/php7-module.conf
@@ -1,4 +1,4 @@
-LoadModule php7_module modules/mod_php7.so
+LoadModule php7_module modules/libphp7.so
DirectoryIndex index.php index.html
AddHandler application/x-httpd-php .php
diff --git a/community/php7/tidy-buffio.patch b/community/php7/tidy-buffio.patch
deleted file mode 100644
index c15f9540a4..0000000000
--- a/community/php7/tidy-buffio.patch
@@ -1,11 +0,0 @@
---- a/ext/tidy/tidy.c
-+++ b/ext/tidy/tidy.c
-@@ -31,7 +31,7 @@
- #include "ext/standard/info.h"
-
- #include "tidy.h"
--#include "buffio.h"
-+#include "tidybuffio.h"
-
- /* compatibility with older versions of libtidy */
- #ifndef TIDY_CALL
--
2.11.0
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---