aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-03-03 17:08:39 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-03-08 06:14:20 +0000
commit99ee74a012a815f99324b617310b734125368acb (patch)
tree8a816da20aeb7142b2101a181e2035662ae70dc2 /testing/php7
parent26c2df1f4001c1ffd11386b75726d110a1e02e6d (diff)
downloadaports-99ee74a012a815f99324b617310b734125368acb.tar.bz2
aports-99ee74a012a815f99324b617310b734125368acb.tar.xz
testing/php7: security upgrade to 7.0.4, and improvements
- fixes #5220 - sqlite3 & pdo_sqlite now uses system libsqlite3 not bundled one (fixes #5198) - change fpm log & pid paths and names to not intersect with main/php - change fpm init script to use reopen logs signal - add logrotate script
Diffstat (limited to 'testing/php7')
-rw-r--r--testing/php7/APKBUILD38
-rw-r--r--testing/php7/php7-fpm.initd12
-rw-r--r--testing/php7/pid_log.patch76
3 files changed, 109 insertions, 17 deletions
diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index d3c3076ae5..597d1874f8 100644
--- a/testing/php7/APKBUILD
+++ b/testing/php7/APKBUILD
@@ -2,8 +2,8 @@
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=php7
_pkgreal=php
-pkgver=7.0.3
-pkgrel=1
+pkgver=7.0.4
+pkgrel=0
pkgdesc="The PHP language runtime engine - 7th branch"
url="http://www.php.net/"
arch="x86_64 armhf"
@@ -80,10 +80,12 @@ subpackages="$subpackages $pkgname-common"
source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
$pkgname-fpm.initd
+ $pkgname-fpm.logrotate
$pkgname-module.conf
install-pear.patch
tidy-buffio.patch
includedir.patch
+ pid_log.patch
"
_apiver="20151012"
@@ -281,7 +283,7 @@ fpm() {
depends="$pkgname-common"
mkdir -p "$subpkgdir"/etc/$pkgname "$subpkgdir"/usr
mv "$pkgdir"/var "$subpkgdir"
- mkdir -p "$subpkgdir"/var/lib
+ mkdir -p "$subpkgdir"/var/lib "$subpkgdir"/var/log/$pkgname
mv "$pkgdir"/usr/share/$pkgname/fpm "$subpkgdir"/var/lib/$pkgname
mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
mv "$pkgdir"/etc/$pkgname/php-fpm* "$subpkgdir"/etc/$pkgname
@@ -289,14 +291,14 @@ fpm() {
mv "$subpkgdir"/etc/$pkgname/$file.default \
"$subpkgdir"/etc/$pkgname/$file
done
- install -D -m755 "$srcdir"/$pkgname-fpm.initd "$subpkgdir"/etc/init.d/$pkgname-fpm
+ install -D -m755 "$srcdir"/$pkgname-fpm.initd "$subpkgdir"/etc/init.d/php-fpm7
+ install -D -m755 "$srcdir"/$pkgname-fpm.logrotate "$subpkgdir"/etc/logrotate.d/php-fpm7
}
pear() {
arch="noarch"
pkgdesc="PHP Extension and Application Repository"
- depends="$pkgname"
- # "$pkgname-xml"
+ depends="$pkgname $pkgname-xml"
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/etc/$pkgname
for file in phpize7 pecl pear; do
mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/
@@ -395,21 +397,27 @@ xsl() { _mv_ext xsl $pkgname-dom; }
zip() { _mv_ext zip; }
zlib() { _mv_ext zlib; }
-md5sums="702e9b8e2cb704fdd50137e39f53f50b php-7.0.3.tar.bz2
-36ede43c4d4462f2d58dbb4a01b4c4d0 php7-fpm.initd
+md5sums="0171201350941327399a5c3e678a86e5 php-7.0.4.tar.bz2
+a340f27e83ed4482d2fbb98658ef71cb php7-fpm.initd
+25bde13e7894c2930d97fad68d5dd3b3 php7-fpm.logrotate
47be6cd1ed92f21579e15bf2003a709f php7-module.conf
483bc0a85c50a9a9aedbe14a19ed4526 install-pear.patch
66f0037a029f9eed2b31d2e1d50f1860 tidy-buffio.patch
-d872e633c9b33c3c9f629dd2edd2e5c5 includedir.patch"
-sha256sums="826823d754f09c779222a99becf9c53a4dc719dba2d777aca7807c6ca68e6fc6 php-7.0.3.tar.bz2
-84241f5cb2891b15bac5bb4aa2e7037cd50d611a1e8a228f6a42e4154aaec9e1 php7-fpm.initd
+d872e633c9b33c3c9f629dd2edd2e5c5 includedir.patch
+6ba762ab7a105163b8e5b3913deae109 pid_log.patch"
+sha256sums="a246c503709c189ba8e1e22ed2cb22abc27da43a997ff1b3318e181baf529dcc php-7.0.4.tar.bz2
+eca59e8b0498c1c93b35f9a5109ae56d0cda9d94822727d689371ccad31b3615 php7-fpm.initd
+6e4406f21b69085714cdb9d9a67c08e27a1c737ab353f9813cb2fc268352d2c6 php7-fpm.logrotate
276c823ee666ea73b36d4e97174eeea05713125b61f7f8681e350453c4123143 php7-module.conf
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab install-pear.patch
5dc8f32e5e2b1cd6317ada5a5adb9b5f0802ed6e0dbe065d7bfcc0f55d47e0d5 tidy-buffio.patch
-ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7 includedir.patch"
-sha512sums="3a7aa542f53a38499eb126c3d489bed057a5a9b8e4a8fb45a55b1080fc573646615699bd94b03c882e58554b23ac5d6e3aaf54d0b502b9d110e91e69339bd7a0 php-7.0.3.tar.bz2
-c633b7e122da9cc16cc6c5ed817f1fc0f38bd05b08265fafd31c904edb0cdc7ccb09e323f037e55ce18e9425ee3599166a194657bf6edd5884305c3c235e5ba6 php7-fpm.initd
+ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7 includedir.patch
+0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec pid_log.patch"
+sha512sums="9d1dc761cdd9103a91299e01117c1790550e3b94e7694dcc2555d83e5abe3d2170acd6226e8501c5f2a77b5c374b1c9f5ea009999d476818c2682a54def86b96 php-7.0.4.tar.bz2
+89076ab8e170a8f886b88bb30aa3e6a6b4463155a18ea53485cc9e3898c81afa3d01fb8403d28a45dc1680f09c645c2d81d8272bc8b9c7ced41e59b0ba226216 php7-fpm.initd
+cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate
fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99 php7-module.conf
f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch
6894c9cba7752a3406e774d9efc0e058c37433493c1c20101e9563bf247c112157a67e306b06b9517b0422eca521f543d637a6cbd2cea7639e43f13d773b3d2b tidy-buffio.patch
-199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch"
+199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch
+82231c7b27b4d044272857dc713674884715ed8e36e54be06faa5d2a949ba4bca597628958a9c5683ec51c36e05a00f6be811c7e95112b0314c98528f584a8d6 pid_log.patch"
diff --git a/testing/php7/php7-fpm.initd b/testing/php7/php7-fpm.initd
index c6bd71a69a..1016c68f0d 100644
--- a/testing/php7/php7-fpm.initd
+++ b/testing/php7/php7-fpm.initd
@@ -7,7 +7,9 @@ command="/usr/sbin/php-fpm7"
command_args="--fpm-config $cfgfile --pid $pidfile"
required_files="$cfgfile"
-extra_started_commands="reload"
+extra_started_commands="reload reopen"
+description_reload="Reload configuration"
+description_reopen="Reopen log files"
depend() {
need net
@@ -21,7 +23,13 @@ start_pre() {
}
reload() {
- ebegin "Reloading $name"
+ ebegin "Reloading ${SVCNAME} configuration"
start-stop-daemon --signal USR2 --pidfile $pidfile
eend $?
}
+
+reopen() {
+ ebegin Reopening ${SVCNAME} log files""
+ start-stop-daemon --signal USR1 --pidfile $pidfile
+ eend $?
+}
diff --git a/testing/php7/pid_log.patch b/testing/php7/pid_log.patch
new file mode 100644
index 0000000000..bc586dbd69
--- /dev/null
+++ b/testing/php7/pid_log.patch
@@ -0,0 +1,76 @@
+--- a/sapi/fpm/fpm/fpm_conf.c
++++ b/sapi/fpm/fpm/fpm_conf.c
+@@ -1178,7 +1178,7 @@
+ }
+
+ 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");
+ }
+
+ #ifdef HAVE_SYSTEMD
+@@ -1189,7 +1189,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");
+ }
+
+ if (fpm_global_config.syslog_facility < 0) {
+@@ -1681,7 +1681,7 @@
+ if (fpm_globals.prefix == NULL) {
+ 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);
+ }
+
+ if (!tmp) {
+--- a/sapi/fpm/php-fpm.conf.in
++++ b/sapi/fpm/php-fpm.conf.in
+@@ -14,14 +14,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++;pid = run/php-fpm7.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; in a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.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
+--- a/sapi/fpm/www.conf.in
++++ b/sapi/fpm/www.conf.in
+@@ -250,7 +250,7 @@
+
+ ; The access log file
+ ; Default: not set
+-;access.log = log/$pool.access.log
++;access.log = log/php7/$pool.access.log
+
+ ; The access log format.
+ ; The following syntax is allowed
+@@ -314,7 +314,7 @@
+ ; The log file for slow requests
+ ; Default Value: not set
+ ; Note: slowlog is mandatory if request_slowlog_timeout is set
+-;slowlog = log/$pool.log.slow
++;slowlog = log/php7/$pool.slow.log
+
+ ; The timeout for serving a single request after which a PHP backtrace will be
+ ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+@@ -408,6 +408,6 @@
+ ; specified at startup with the -d argument
+ ;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_flag[log_errors] = on
+ ;php_admin_value[memory_limit] = 32M