summaryrefslogtreecommitdiff
path: root/testing/php
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-28 17:43:57 +0000
committerroot <root@rshg054.dnsready.net>2012-05-28 17:43:57 +0000
commit483f7de4ab6a706517279a24d2efc969f4a1996d (patch)
tree128a7513d3e42c4d8812b5fd11a4afb116399762 /testing/php
parent89dd7b5f30d48c708092a71b1c8285090fe91505 (diff)
Mon May 28 17:43:57 UTC 2012
Diffstat (limited to 'testing/php')
-rw-r--r--testing/php/PKGBUILD14
-rw-r--r--testing/php/logrotate.d.php-fpm4
-rw-r--r--testing/php/php-fpm.service12
-rw-r--r--testing/php/php-fpm.tmpfiles1
-rw-r--r--testing/php/rc.d.php-fpm14
5 files changed, 25 insertions, 20 deletions
diff --git a/testing/php/PKGBUILD b/testing/php/PKGBUILD
index 5de077661..ca2263548 100644
--- a/testing/php/PKGBUILD
+++ b/testing/php/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 158742 2012-05-08 17:13:03Z pierre $
+# $Id: PKGBUILD 160010 2012-05-28 00:42:52Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgbase=php
@@ -22,7 +22,7 @@ pkgname=('php'
'php-tidy'
'php-xsl')
pkgver=5.4.3
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
license=('PHP')
url='http://www.php.net'
@@ -32,13 +32,15 @@ makedepends=('apache' 'imap' 'postgresql-libs' 'libldap' 'postfix' 'libvpx'
'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp' 'freetype2')
source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
'php.ini.patch' 'apache.conf' 'rc.d.php-fpm' 'php-fpm.conf.in.patch'
- 'logrotate.d.php-fpm')
+ 'logrotate.d.php-fpm' 'php-fpm.service' 'php-fpm.tmpfiles')
md5sums=('51f9488bf8682399b802c48656315cac'
'0b0bc7a917fc592bdf11dcd3c5c255e9'
'dec2cbaad64e3abf4f0ec70e1de4e8e9'
- 'b01be5f816988fcee7e78225836e5e27'
+ '61837f1e9b50d7fdf4c8d1f81fa153f7'
'59b3a25f9eb3afc02f1adf9ee699808c'
- '07c4e412909ac65a44ec90e7a2c4bade')
+ 'a2af49da239122eb45744f4446752050'
+ '9a330bbfb162848572a3d9dc0e051956'
+ 'e808f39a075dd53cd8da70d984d0e166')
build() {
phpconfig="--srcdir=../${pkgbase}-${pkgver} \
@@ -240,6 +242,8 @@ package_php-fpm() {
install -D -m755 ${srcdir}/rc.d.php-fpm ${pkgdir}/etc/rc.d/php-fpm
install -D -m644 ${srcdir}/logrotate.d.php-fpm ${pkgdir}/etc/logrotate.d/php-fpm
install -d -m755 ${pkgdir}/etc/php/fpm.d
+ install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/etc/tmpfiles.d/php-fpm.tmpfiles
+ install -D -m644 ${srcdir}/php-fpm.service ${pkgdir}/usr/lib/systemd/system/php-fpm.service
}
package_php-embed() {
diff --git a/testing/php/logrotate.d.php-fpm b/testing/php/logrotate.d.php-fpm
index 7a1ba2597..b4fe083a8 100644
--- a/testing/php/logrotate.d.php-fpm
+++ b/testing/php/logrotate.d.php-fpm
@@ -1,6 +1,8 @@
/var/log/php-fpm.log {
missingok
+ notifempty
+ delaycompress
postrotate
- /etc/rc.d/php-fpm logrotate >/dev/null || true
+ kill -USR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true
endscript
}
diff --git a/testing/php/php-fpm.service b/testing/php/php-fpm.service
new file mode 100644
index 000000000..2fd30113c
--- /dev/null
+++ b/testing/php/php-fpm.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=FastCGI Process Manager for PHP
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/php-fpm/php-fpm.pid
+ExecStart=/usr/sbin/php-fpm
+ExecReload=/bin/kill -USR2 $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/testing/php/php-fpm.tmpfiles b/testing/php/php-fpm.tmpfiles
new file mode 100644
index 000000000..d7ad96545
--- /dev/null
+++ b/testing/php/php-fpm.tmpfiles
@@ -0,0 +1 @@
+d /var/run/php-fpm 755 root root
diff --git a/testing/php/rc.d.php-fpm b/testing/php/rc.d.php-fpm
index 54bcf4d5b..c75d905e5 100644
--- a/testing/php/rc.d.php-fpm
+++ b/testing/php/rc.d.php-fpm
@@ -49,8 +49,6 @@ test_config() {
stat_die
fi
- [ -d /var/run/php-fpm ] || install -d -m755 /var/run/php-fpm
-
stat_done
}
@@ -138,18 +136,6 @@ case "$1" in
stat_done
;;
- logrotate)
- stat_busy 'Reopen php-fpm log'
-
- if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
- stat_fail
- exit 1
- fi
-
- kill -USR1 `cat /var/run/php-fpm/php-fpm.pid`
- stat_done
- ;;
-
*)
echo "usage: $0 {start|stop|force-quit|restart|reload|logrotate}"
exit 1