~alpine/aports

[alpine-aports] [PATCH 1/2] testing/php7: security upgrade to 7.0.4, change fpm log & pid paths and names to not intersect with main/php

Details
Message ID
<1457017719-29497-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1457017719
DKIM signature
missing
Download raw message
Patch: +91 -12
---
 testing/php7/APKBUILD      | 27 ++++++++--------
 testing/php7/pid_log.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 12 deletions(-)
 create mode 100644 testing/php7/pid_log.patch

diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index d3c3076..6aabfca 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"
@@ -84,6 +84,7 @@ source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
	install-pear.patch
	tidy-buffio.patch
	includedir.patch
	pid_log.patch
	"

_apiver="20151012"
@@ -281,7 +282,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 +290,13 @@ 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
}

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 +395,24 @@ xsl()		{ _mv_ext xsl $pkgname-dom; }
zip()		{ _mv_ext zip; }
zlib()		{ _mv_ext zlib; }

md5sums="702e9b8e2cb704fdd50137e39f53f50b  php-7.0.3.tar.bz2
md5sums="0171201350941327399a5c3e678a86e5  php-7.0.4.tar.bz2
36ede43c4d4462f2d58dbb4a01b4c4d0  php7-fpm.initd
47be6cd1ed92f21579e15bf2003a709f  php7-module.conf
483bc0a85c50a9a9aedbe14a19ed4526  install-pear.patch
66f0037a029f9eed2b31d2e1d50f1860  tidy-buffio.patch
d872e633c9b33c3c9f629dd2edd2e5c5  includedir.patch"
sha256sums="826823d754f09c779222a99becf9c53a4dc719dba2d777aca7807c6ca68e6fc6  php-7.0.3.tar.bz2
d872e633c9b33c3c9f629dd2edd2e5c5  includedir.patch
6ba762ab7a105163b8e5b3913deae109  pid_log.patch"
sha256sums="a246c503709c189ba8e1e22ed2cb22abc27da43a997ff1b3318e181baf529dcc  php-7.0.4.tar.bz2
84241f5cb2891b15bac5bb4aa2e7037cd50d611a1e8a228f6a42e4154aaec9e1  php7-fpm.initd
276c823ee666ea73b36d4e97174eeea05713125b61f7f8681e350453c4123143  php7-module.conf
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab  install-pear.patch
5dc8f32e5e2b1cd6317ada5a5adb9b5f0802ed6e0dbe065d7bfcc0f55d47e0d5  tidy-buffio.patch
ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7  includedir.patch"
sha512sums="3a7aa542f53a38499eb126c3d489bed057a5a9b8e4a8fb45a55b1080fc573646615699bd94b03c882e58554b23ac5d6e3aaf54d0b502b9d110e91e69339bd7a0  php-7.0.3.tar.bz2
ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7  includedir.patch
0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec  pid_log.patch"
sha512sums="9d1dc761cdd9103a91299e01117c1790550e3b94e7694dcc2555d83e5abe3d2170acd6226e8501c5f2a77b5c374b1c9f5ea009999d476818c2682a54def86b96  php-7.0.4.tar.bz2
c633b7e122da9cc16cc6c5ed817f1fc0f38bd05b08265fafd31c904edb0cdc7ccb09e323f037e55ce18e9425ee3599166a194657bf6edd5884305c3c235e5ba6  php7-fpm.initd
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/pid_log.patch b/testing/php7/pid_log.patch
new file mode 100644
index 0000000..bc586db
--- /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
-- 
2.7.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)