From 211709a2f09bd677aa1deac0dc82fde6ce1c8626 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 2 Jun 2012 00:01:53 +0000 Subject: Sat Jun 2 00:01:53 UTC 2012 --- testing/php/PKGBUILD | 15 ++++++++------- testing/php/logrotate.d.php-fpm | 2 +- testing/php/php-fpm.conf.in.patch | 4 ++-- testing/php/php-fpm.install | 9 +++++++++ testing/php/php-fpm.service | 2 +- testing/php/php-fpm.tmpfiles | 2 +- testing/php/rc.d.php-fpm | 18 +++++++++--------- 7 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 testing/php/php-fpm.install (limited to 'testing/php') diff --git a/testing/php/PKGBUILD b/testing/php/PKGBUILD index d5e0a7e03..db0d28e55 100644 --- a/testing/php/PKGBUILD +++ b/testing/php/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 160031 2012-05-28 10:36:59Z pierre $ +# $Id: PKGBUILD 160226 2012-05-31 10:48:16Z pierre $ # Maintainer: Pierre Schmitz pkgbase=php @@ -22,7 +22,7 @@ pkgname=('php' 'php-tidy' 'php-xsl') pkgver=5.4.3 -pkgrel=3 +pkgrel=4 arch=('i686' 'x86_64') license=('PHP') url='http://www.php.net' @@ -36,11 +36,11 @@ source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2" md5sums=('51f9488bf8682399b802c48656315cac' '0b0bc7a917fc592bdf11dcd3c5c255e9' 'dec2cbaad64e3abf4f0ec70e1de4e8e9' - '61837f1e9b50d7fdf4c8d1f81fa153f7' - '59b3a25f9eb3afc02f1adf9ee699808c' - 'a2af49da239122eb45744f4446752050' - '84d0a4caf8d735279cf4500d1772e2a5' - 'e808f39a075dd53cd8da70d984d0e166') + 'aabda9f3f2f8b9d8fdc9558c31c718db' + '825e580dd5708d959b50944afa1b12b6' + 'f56b5bb7e93c802ae8519182fbea3387' + '86c73d481f3099e740e602869bacf637' + 'c60343df74f8e1afb13b084d5c0e47ed') build() { phpconfig="--srcdir=../${pkgbase}-${pkgver} \ @@ -235,6 +235,7 @@ package_php-fpm() { pkgdesc='FastCGI Process Manager for PHP' depends=('php') backup=('etc/php/php-fpm.conf') + install='php-fpm.install' install -D -m755 ${srcdir}/build-fpm/sapi/fpm/php-fpm ${pkgdir}/usr/sbin/php-fpm install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.8 ${pkgdir}/usr/share/man/man8/php-fpm.8 diff --git a/testing/php/logrotate.d.php-fpm b/testing/php/logrotate.d.php-fpm index b4fe083a8..ac2d92a36 100644 --- a/testing/php/logrotate.d.php-fpm +++ b/testing/php/logrotate.d.php-fpm @@ -3,6 +3,6 @@ notifempty delaycompress postrotate - kill -USR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true + kill -USR1 `cat /run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true endscript } diff --git a/testing/php/php-fpm.conf.in.patch b/testing/php/php-fpm.conf.in.patch index 4e0f4a888..0b17182fd 100644 --- a/testing/php/php-fpm.conf.in.patch +++ b/testing/php/php-fpm.conf.in.patch @@ -14,7 +14,7 @@ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ ; Default Value: none -;pid = run/php-fpm.pid -+pid = run/php-fpm/php-fpm.pid ++pid = /run/php-fpm/php-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written @@ -24,7 +24,7 @@ ; Note: This value is mandatory. -listen = 127.0.0.1:9000 +;listen = 127.0.0.1:9000 -+listen = /var/run/php-fpm/php-fpm.sock ++listen = /run/php-fpm/php-fpm.sock ; Set listen(2) backlog. ; Default Value: 128 (-1 on FreeBSD and OpenBSD) diff --git a/testing/php/php-fpm.install b/testing/php/php-fpm.install new file mode 100644 index 000000000..41fc37c22 --- /dev/null +++ b/testing/php/php-fpm.install @@ -0,0 +1,9 @@ +post_install() { + if [[ ! -d run/php-fpm ]]; then + usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/php-fpm.conf + fi +} + +post_upgrade() { + post_install +} diff --git a/testing/php/php-fpm.service b/testing/php/php-fpm.service index 3ef95a83a..e29f7c236 100644 --- a/testing/php/php-fpm.service +++ b/testing/php/php-fpm.service @@ -4,7 +4,7 @@ After=syslog.target network.target [Service] Type=forking -PIDFile=/var/run/php-fpm/php-fpm.pid +PIDFile=/run/php-fpm/php-fpm.pid PrivateTmp=true ExecStart=/usr/sbin/php-fpm ExecReload=/bin/kill -USR2 $MAINPID diff --git a/testing/php/php-fpm.tmpfiles b/testing/php/php-fpm.tmpfiles index d7ad96545..801e74f1e 100644 --- a/testing/php/php-fpm.tmpfiles +++ b/testing/php/php-fpm.tmpfiles @@ -1 +1 @@ -d /var/run/php-fpm 755 root root +d /run/php-fpm 755 root root diff --git a/testing/php/rc.d.php-fpm b/testing/php/rc.d.php-fpm index c75d905e5..3b3ec20de 100644 --- a/testing/php/rc.d.php-fpm +++ b/testing/php/rc.d.php-fpm @@ -64,7 +64,7 @@ case "$1" in exit 1 fi - wait_for_pid created /var/run/php-fpm/php-fpm.pid + wait_for_pid created /run/php-fpm/php-fpm.pid if [ -n "$try" ] ; then stat_fail @@ -79,14 +79,14 @@ case "$1" in test_config stat_busy 'Gracefully shutting down php-fpm' - if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + if [ ! -r /run/php-fpm/php-fpm.pid ] ; then stat_fail exit 1 fi - kill -QUIT `cat /var/run/php-fpm/php-fpm.pid` + kill -QUIT `cat /run/php-fpm/php-fpm.pid` - wait_for_pid removed /var/run/php-fpm.pid + wait_for_pid removed /run/php-fpm.pid if [ -n "$try" ] ; then stat_fail @@ -100,14 +100,14 @@ case "$1" in force-quit) stat_busy 'Terminating php-fpm' - if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + if [ ! -r /run/php-fpm/php-fpm.pid ] ; then stat_fail exit 1 fi - kill -TERM `cat /var/run/php-fpm/php-fpm.pid` + kill -TERM `cat /run/php-fpm/php-fpm.pid` - wait_for_pid removed /var/run/php-fpm/php-fpm.pid + wait_for_pid removed /run/php-fpm/php-fpm.pid if [ -n "$try" ] ; then stat_fail @@ -127,12 +127,12 @@ case "$1" in test_config stat_busy 'Reload service php-fpm' - if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + if [ ! -r /run/php-fpm/php-fpm.pid ] ; then stat_fail exit 1 fi - kill -USR2 `cat /var/run/php-fpm/php-fpm.pid` + kill -USR2 `cat /run/php-fpm/php-fpm.pid` stat_done ;; -- cgit v1.2.3-54-g00ecf