diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 20:20:25 -0500 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-06-05 20:20:25 -0500 |
commit | 33c22f43a52aae722ce4d9cbe47f8d2fff31f395 (patch) | |
tree | 71f9661d9a843cca28225852f8784e48a2b96cb2 /staging/php | |
parent | c87732e5659b56943ef4f120d7c71dcaabc3f849 (diff) | |
parent | 3695b5d62c2aef6e82abc95d775a2ebd89bce081 (diff) |
Merge branch 'master' of vparabola:~/abslibre-pre-mips64el
Conflicts:
multilib-testing/lib32-mesa/PKGBUILD
multilib/lib32-glew/PKGBUILD
testing/iproute2/PKGBUILD
Diffstat (limited to 'staging/php')
-rw-r--r-- | staging/php/PKGBUILD | 379 | ||||
-rw-r--r-- | staging/php/apache.conf | 13 | ||||
-rw-r--r-- | staging/php/logrotate.d.php-fpm | 6 | ||||
-rw-r--r-- | staging/php/php-fpm.conf.in.patch | 80 | ||||
-rw-r--r-- | staging/php/php.ini.patch | 126 | ||||
-rw-r--r-- | staging/php/rc.d.php-fpm | 158 | ||||
-rw-r--r-- | staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz | bin | 0 -> 40881 bytes |
7 files changed, 762 insertions, 0 deletions
diff --git a/staging/php/PKGBUILD b/staging/php/PKGBUILD new file mode 100644 index 000000000..ccbaae0cd --- /dev/null +++ b/staging/php/PKGBUILD @@ -0,0 +1,379 @@ +# $Id: PKGBUILD 126095 2011-06-01 12:12:00Z pierre $ +# Maintainer: Pierre Schmitz <pierre@archlinux.de> + +pkgbase=php +pkgname=('php' + 'php-cgi' + 'php-apache' + 'php-fpm' + 'php-embed' + 'php-pear' + 'php-curl' + 'php-enchant' + 'php-gd' + 'php-gmp' + 'php-intl' + 'php-ldap' + 'php-mcrypt' + 'php-mssql' + 'php-odbc' + 'php-pgsql' + 'php-pspell' + 'php-snmp' + 'php-sqlite' + 'php-tidy' + 'php-xsl') +pkgver=5.3.6 +pkgrel=4 +_suhosinver=${pkgver}-0.9.10 +arch=('i686' 'x86_64') +license=('PHP') +url='http://www.php.net' +makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'postfix' + 'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds' + 'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'libpng' 'libjpeg' 'icu' + 'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp' 'freetype2') +source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2" + "suhosin-patch-${_suhosinver}.patch.gz" + 'php.ini.patch' 'apache.conf' 'rc.d.php-fpm' 'php-fpm.conf.in.patch' + 'logrotate.d.php-fpm') +md5sums=('2286f5a82a6e8397955a0025c1c2ad98' + 'fff1a38877142f3ae6036dbe5a85d0a6' + '39eaa70d276fc3d45d6bcf6cd5ae1106' + 'dec2cbaad64e3abf4f0ec70e1de4e8e9' + 'b01be5f816988fcee7e78225836e5e27' + 'd50ff349da08110a7cc8c691ce2d0423' + '07c4e412909ac65a44ec90e7a2c4bade') + +build() { + # ldap-sasl does not compile with --as-needed + export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" + export LDFLAGS="${LDFLAGS//,--as-needed}" + + phpconfig="--srcdir=../${pkgbase}-${pkgver} \ + --prefix=/usr \ + --sysconfdir=/etc/php \ + --localstatedir=/var \ + --with-layout=GNU \ + --with-config-file-path=/etc/php \ + --with-config-file-scan-dir=/etc/php/conf.d \ + --enable-inline-optimization \ + --disable-debug \ + --disable-rpath \ + --disable-static \ + --enable-shared \ + --mandir=/usr/share/man \ + --without-pear \ + " + + phpextensions="--enable-bcmath=shared \ + --enable-calendar=shared \ + --enable-dba=shared \ + --enable-exif=shared \ + --enable-ftp=shared \ + --enable-gd-native-ttf \ + --enable-intl=shared \ + --enable-json=shared \ + --enable-mbregex \ + --enable-mbstring \ + --enable-pdo \ + --enable-phar=shared \ + --enable-posix=shared \ + --enable-session \ + --enable-shmop=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --enable-sqlite-utf8 \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --enable-xml \ + --enable-zip=shared \ + --with-bz2=shared \ + --with-curl=shared \ + --with-db4=/usr \ + --with-enchant=shared,/usr \ + --with-freetype-dir=shared,/usr \ + --with-gd=shared \ + --with-gdbm=shared \ + --with-gettext=shared \ + --with-gmp=shared \ + --with-iconv=shared \ + --with-icu-dir=/usr \ + --with-imap-ssl=shared \ + --with-imap=shared \ + --with-jpeg-dir=shared,/usr \ + --with-ldap=shared \ + --with-ldap-sasl \ + --with-mcrypt=shared \ + --with-mhash \ + --with-mssql=shared \ + --with-mysql-sock=/var/run/mysqld/mysqld.sock \ + --with-mysql=shared,mysqlnd \ + --with-mysqli=shared,mysqlnd \ + --with-openssl=shared \ + --with-pcre-regex=/usr \ + --with-pdo-mysql=shared,mysqlnd \ + --with-pdo-odbc=shared,unixODBC,/usr \ + --with-pdo-pgsql=shared \ + --with-pdo-sqlite=shared,/usr \ + --with-pgsql=shared \ + --with-png-dir=shared,/usr \ + --with-pspell=shared \ + --with-regex=php \ + --with-snmp=shared \ + --with-sqlite3=shared,/usr \ + --with-sqlite=shared \ + --with-tidy=shared \ + --with-unixODBC=shared,/usr \ + --with-xmlrpc=shared \ + --with-xsl=shared \ + --with-zlib \ + --without-db2 \ + --without-db3 \ + " + + EXTENSION_DIR=/usr/lib/php/modules + export EXTENSION_DIR + PEAR_INSTALLDIR=/usr/share/pear + export PEAR_INSTALLDIR + + cd ${srcdir}/${pkgbase}-${pkgver} + + # apply suhosin patch + patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch + + # adjust paths + patch -p0 -i ${srcdir}/php.ini.patch + patch -p0 -i ${srcdir}/php-fpm.conf.in.patch + + # php + mkdir ${srcdir}/build-php + cd ${srcdir}/build-php + ln -s ../${pkgbase}-${pkgver}/configure + ./configure ${phpconfig} \ + --disable-cgi \ + --with-readline \ + --enable-pcntl \ + ${phpextensions} + make + + # cgi and fcgi + # reuse the previous run; this will save us a lot of time + cp -a ${srcdir}/build-php ${srcdir}/build-cgi + cd ${srcdir}/build-cgi + ./configure ${phpconfig} \ + --disable-cli \ + --enable-cgi \ + ${phpextensions} + make + + # apache + cp -a ${srcdir}/build-php ${srcdir}/build-apache + cd ${srcdir}/build-apache + ./configure ${phpconfig} \ + --disable-cli \ + --with-apxs2 \ + ${phpextensions} + make + + # fpm + cp -a ${srcdir}/build-php ${srcdir}/build-fpm + cd ${srcdir}/build-fpm + ./configure ${phpconfig} \ + --disable-cli \ + --enable-fpm \ + --with-fpm-user=http \ + --with-fpm-group=http \ + ${phpextensions} + make + + # embed + cp -a ${srcdir}/build-php ${srcdir}/build-embed + cd ${srcdir}/build-embed + ./configure ${phpconfig} \ + --disable-cli \ + --enable-embed=shared \ + ${phpextensions} + make + + # pear + cp -a ${srcdir}/build-php ${srcdir}/build-pear + cd ${srcdir}/build-pear + ./configure ${phpconfig} \ + --disable-cgi \ + --with-readline \ + --enable-pcntl \ + --with-pear \ + ${phpextensions} + make +} + +# check() { +# cd ${srcdir}/build-php +# make test +# } + +package_php() { + pkgdesc='An HTML-embedded scripting language' + depends=('pcre' 'libxml2' 'bzip2' 'openssl') + replaces=('php-fileinfo') + provides=('php-fileinfo') + conflicts=('php-fileinfo') + backup=('etc/php/php.ini') + + cd ${srcdir}/build-php + make -j1 INSTALL_ROOT=${pkgdir} install + install -d -m755 ${pkgdir}/usr/share/pear + # install php.ini + install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini + install -d -m755 ${pkgdir}/etc/php/conf.d/ + + # remove static modules + rm -f ${pkgdir}/usr/lib/php/modules/*.a + # remove modules provided by sub packages + rm -f ${pkgdir}/usr/lib/php/modules/{curl,enchant,gd,gmp,intl,ldap,mcrypt,mssql,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so +} + +package_php-cgi() { + pkgdesc='CGI and FCGI SAPI for PHP' + depends=('php' 'pcre' 'libxml2') + + install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi +} + +package_php-apache() { + pkgdesc='Apache SAPI for PHP' + depends=('php' 'apache' 'pcre' 'libxml2') + backup=('etc/httpd/conf/extra/php5_module.conf') + + install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so + install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf +} + +package_php-fpm() { + pkgdesc='FastCGI Process Manager for PHP' + depends=('php') + backup=('etc/php/php-fpm.conf') + + 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 + install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.conf ${pkgdir}/etc/php/php-fpm.conf + 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 +} + +package_php-embed() { + pkgdesc='Embed SAPI for PHP' + depends=('php' 'pcre' 'libxml2') + + install -D -m755 ${srcdir}/build-embed/libs/libphp5.so ${pkgdir}/usr/lib/libphp5.so + install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/sapi/embed/php_embed.h ${pkgdir}/usr/include/php/sapi/embed/php_embed.h +} + +package_php-pear() { + pkgdesc='PHP Extension and Application Repository' + depends=('php' 'bash') + backup=('etc/php/pear.conf') + + cd ${srcdir}/build-pear + make -j1 install-pear INSTALL_ROOT=${pkgdir} + local i + while read i; do + [ ! -e "$i" ] || rm -rf "$i" + done < <(find ${pkgdir} -name '.*') +} + +package_php-curl() { + depends=('php' 'curl') + pkgdesc='curl module for PHP' + install -D -m755 ${srcdir}/build-php/modules/curl.so ${pkgdir}/usr/lib/php/modules/curl.so +} + +package_php-enchant() { + depends=('php' 'enchant') + pkgdesc='enchant module for PHP' + install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so +} + +package_php-gd() { + depends=('php' 'libpng' 'libjpeg' 'freetype2') + pkgdesc='gd module for PHP' + install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so +} + +package_php-gmp() { + depends=('php' 'gmp') + pkgdesc='gmp module for PHP' + install -D -m755 ${srcdir}/build-php/modules/gmp.so ${pkgdir}/usr/lib/php/modules/gmp.so +} + +package_php-intl() { + depends=('php' 'icu') + pkgdesc='intl module for PHP' + install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so +} + +package_php-ldap() { + depends=('php' 'libldap') + pkgdesc='ldap module for PHP' + install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so +} + +package_php-mcrypt() { + depends=('php' 'libmcrypt' 'libtool') + pkgdesc='mcrypt module for PHP' + install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so +} + +package_php-mssql() { + depends=('php' 'freetds') + pkgdesc='mssql module for PHP' + install -D -m755 ${srcdir}/build-php/modules/mssql.so ${pkgdir}/usr/lib/php/modules/mssql.so +} + +package_php-odbc() { + depends=('php' 'unixodbc') + pkgdesc='ODBC modules for PHP' + install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so + install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so +} + +package_php-pgsql() { + depends=('php' 'postgresql-libs') + pkgdesc='PostgreSQL modules for PHP' + install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so + install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so +} + +package_php-pspell() { + depends=('php' 'aspell') + pkgdesc='pspell module for PHP' + install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so +} + +package_php-snmp() { + depends=('php' 'net-snmp') + pkgdesc='snmp module for PHP' + install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so +} + +package_php-sqlite() { + depends=('php' 'sqlite3') + pkgdesc='sqlite3 module for PHP' + install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so + install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so +} + +package_php-tidy() { + depends=('php' 'tidyhtml') + pkgdesc='tidy module for PHP' + install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so +} + +package_php-xsl() { + depends=('php' 'libxslt') + pkgdesc='xsl module for PHP' + install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so +} diff --git a/staging/php/apache.conf b/staging/php/apache.conf new file mode 100644 index 000000000..c3ca0aad5 --- /dev/null +++ b/staging/php/apache.conf @@ -0,0 +1,13 @@ +# Required modules: dir_module, php5_module + +<IfModule dir_module> + <IfModule php5_module> + DirectoryIndex index.php index.html + <FilesMatch "\.php$"> + SetHandler application/x-httpd-php + </FilesMatch> + <FilesMatch "\.phps$"> + SetHandler application/x-httpd-php-source + </FilesMatch> + </IfModule> +</IfModule> diff --git a/staging/php/logrotate.d.php-fpm b/staging/php/logrotate.d.php-fpm new file mode 100644 index 000000000..7a1ba2597 --- /dev/null +++ b/staging/php/logrotate.d.php-fpm @@ -0,0 +1,6 @@ +/var/log/php-fpm.log { + missingok + postrotate + /etc/rc.d/php-fpm logrotate >/dev/null || true + endscript +} diff --git a/staging/php/php-fpm.conf.in.patch b/staging/php/php-fpm.conf.in.patch new file mode 100644 index 000000000..93c62430a --- /dev/null +++ b/staging/php/php-fpm.conf.in.patch @@ -0,0 +1,80 @@ +--- sapi/fpm/php-fpm.conf.in 2010-12-11 08:31:47.695294987 +0100 ++++ sapi/fpm/php-fpm.conf.in 2010-12-11 08:31:55.907812237 +0100 +@@ -12,7 +12,7 @@ + ; Relative path can also be used. They will be prefixed by: + ; - the global prefix if it's been set (-p arguement) + ; - @prefix@ otherwise +-;include=etc/fpm.d/*.conf ++;include=/etc/php/fpm.d/*.conf + + ;;;;;;;;;;;;;;;;;; + ; Global Options ; +@@ -22,7 +22,7 @@ + ; Pid file + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ + ; Default Value: none +-;pid = run/php-fpm.pid ++pid = run/php-fpm/php-fpm.pid + + ; Error log file + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ +@@ -93,7 +93,8 @@ + ; specific port; + ; '/path/to/unix/socket' - to listen on a unix socket. + ; 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 + + ; Set listen(2) backlog. A value of '-1' means unlimited. + ; Default Value: 128 (-1 on FreeBSD and OpenBSD) +@@ -112,9 +113,9 @@ + ; BSD-derived systems allow connections regardless of permissions. + ; Default Values: user and group are set as the running user + ; mode is set to 0666 +-;listen.owner = @php_fpm_user@ +-;listen.group = @php_fpm_group@ +-;listen.mode = 0666 ++listen.owner = @php_fpm_user@ ++listen.group = @php_fpm_group@ ++listen.mode = 0660 + + ; Unix user/group of processes + ; Note: The user is mandatory. If the group is not set, the default user's group +@@ -154,23 +155,23 @@ + ; The number of child processes created on startup. + ; Note: Used only when pm is set to 'dynamic' + ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +-;pm.start_servers = 20 ++pm.start_servers = 20 + + ; The desired minimum number of idle server processes. + ; Note: Used only when pm is set to 'dynamic' + ; Note: Mandatory when pm is set to 'dynamic' +-;pm.min_spare_servers = 5 ++pm.min_spare_servers = 5 + + ; The desired maximum number of idle server processes. + ; Note: Used only when pm is set to 'dynamic' + ; Note: Mandatory when pm is set to 'dynamic' +-;pm.max_spare_servers = 35 ++pm.max_spare_servers = 35 + + ; The number of requests each child process should execute before respawning. + ; This can be useful to work around memory leaks in 3rd party libraries. For + ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. + ; Default Value: 0 +-;pm.max_requests = 500 ++pm.max_requests = 500 + + ; The URI to view the FPM status page. If this value is not set, no URI will be + ; recognized as a status page. By default, the status page shows the following +@@ -264,7 +265,7 @@ + ; Chdir to this directory at the start. + ; Note: relative path can be used. + ; Default Value: current directory or / when chroot +-;chdir = /var/www ++;chdir = /srv/http + + ; Redirect worker stdout and stderr into main error log. If not set, stdout and + ; stderr will be redirected to /dev/null according to FastCGI specs. diff --git a/staging/php/php.ini.patch b/staging/php/php.ini.patch new file mode 100644 index 000000000..356e190b4 --- /dev/null +++ b/staging/php/php.ini.patch @@ -0,0 +1,126 @@ +--- php.ini-production 2011-02-09 01:25:44.000000000 +0100 ++++ php.ini-production 2011-03-19 11:11:44.496987763 +0100 +@@ -376,7 +376,7 @@ + ; or per-virtualhost web server configuration file. This directive is + ; *NOT* affected by whether Safe Mode is turned On or Off. + ; http://php.net/open-basedir +-;open_basedir = ++open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/ + + ; This directive allows you to disable certain functions for security reasons. + ; It receives a comma-delimited list of function names. This directive is +@@ -781,7 +781,7 @@ + ;;;;;;;;;;;;;;;;;;;;;;;;; + + ; UNIX: "/path1:/path2" +-;include_path = ".:/php/includes" ++include_path = ".:/usr/share/pear" + ; + ; Windows: "\path1;\path2" + ;include_path = ".;c:\php\includes" +@@ -804,7 +804,7 @@ + + ; Directory in which the loadable extensions (modules) reside. + ; http://php.net/extension-dir +-; extension_dir = "./" ++extension_dir = "/usr/lib/php/modules/" + ; On windows: + ; extension_dir = "ext" + +@@ -938,53 +938,49 @@ + ; If you only provide the name of the extension, PHP will look for it in its + ; default extension directory. + ; +-; Windows Extensions +-; Note that ODBC support is built in, so no dll is needed for it. +-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5) +-; extension folders as well as the separate PECL DLL download (PHP 5). +-; Be sure to appropriately set the extension_dir directive. +-; +-;extension=php_bz2.dll +-;extension=php_curl.dll +-;extension=php_fileinfo.dll +-;extension=php_gd2.dll +-;extension=php_gettext.dll +-;extension=php_gmp.dll +-;extension=php_intl.dll +-;extension=php_imap.dll +-;extension=php_interbase.dll +-;extension=php_ldap.dll +-;extension=php_mbstring.dll +-;extension=php_exif.dll ; Must be after mbstring as it depends on it +-;extension=php_mysql.dll +-;extension=php_mysqli.dll +-;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client +-;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client +-;extension=php_openssl.dll +-;extension=php_pdo_firebird.dll +-;extension=php_pdo_mssql.dll +-;extension=php_pdo_mysql.dll +-;extension=php_pdo_oci.dll +-;extension=php_pdo_odbc.dll +-;extension=php_pdo_pgsql.dll +-;extension=php_pdo_sqlite.dll +-;extension=php_pgsql.dll +-;extension=php_pspell.dll +-;extension=php_shmop.dll +- +-; The MIBS data available in the PHP distribution must be installed. +-; See http://www.php.net/manual/en/snmp.installation.php +-;extension=php_snmp.dll +- +-;extension=php_soap.dll +-;extension=php_sockets.dll +-;extension=php_sqlite.dll +-;extension=php_sqlite3.dll +-;extension=php_sybase_ct.dll +-;extension=php_tidy.dll +-;extension=php_xmlrpc.dll +-;extension=php_xsl.dll +-;extension=php_zip.dll ++;extension=bcmath.so ++;extension=bz2.so ++;extension=calendar.so ++;extension=curl.so ++;extension=dba.so ++;extension=enchant.so ++;extension=exif.so ++;extension=ftp.so ++;extension=gd.so ++extension=gettext.so ++;extension=gmp.so ++;extension=iconv.so ++;extension=imap.so ++;extension=intl.so ++;extension=json.so ++;extension=ldap.so ++;extension=mcrypt.so ++;extension=mssql.so ++;extension=mysqli.so ++;extension=mysql.so ++;extension=odbc.so ++;extension=openssl.so ++;extension=pdo_mysql.so ++;extension=pdo_odbc.so ++;extension=pdo_pgsql.so ++;extension=pdo_sqlite.so ++;extension=pgsql.so ++;extension=phar.so ++;extension=posix.so ++;extension=pspell.so ++;extension=shmop.so ++;extension=snmp.so ++;extension=soap.so ++;extension=sockets.so ++;extension=sqlite3.so ++;extension=sqlite.so ++;extension=sysvmsg.so ++;extension=sysvsem.so ++;extension=sysvshm.so ++;extension=tidy.so ++;extension=xmlrpc.so ++;extension=xsl.so ++;extension=zip.so + + ;;;;;;;;;;;;;;;;;;; + ; Module Settings ; diff --git a/staging/php/rc.d.php-fpm b/staging/php/rc.d.php-fpm new file mode 100644 index 000000000..54bcf4d5b --- /dev/null +++ b/staging/php/rc.d.php-fpm @@ -0,0 +1,158 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + + +wait_for_pid () { + try=0 + while test $try -lt 35 ; do + case "$1" in + 'created') + if [ -f "$2" ] ; then + try='' + break + fi + ;; + 'removed') + if [ ! -f "$2" ] ; then + try='' + break + fi + ;; + esac + + stat_append '.' + try=`expr $try + 1` + sleep 1 + done +} + +test_config() { + stat_busy 'Checking configuration' + if [ $(id -u) -ne 0 ]; then + stat_append '(This script must be run as root)' + stat_die + fi + + if [ ! -r /etc/php/php-fpm.conf ]; then + stat_append '(/etc/php/php-fpm.conf not found)' + stat_die + fi + + local test=$(/usr/sbin/php-fpm -t 2>&1) + if [ $? -gt 0 ]; then + stat_append '(error in /etc/php/php-fpm.conf)' + stat_die + elif echo $test | grep -qi 'error'; then + stat_append '(error in /etc/php/php.ini)' + stat_die + fi + + [ -d /var/run/php-fpm ] || install -d -m755 /var/run/php-fpm + + stat_done +} + +case "$1" in + start) + test_config + stat_busy 'Starting php-fpm' + + /usr/sbin/php-fpm + + if [ "$?" != 0 ] ; then + stat_fail + exit 1 + fi + + wait_for_pid created /var/run/php-fpm/php-fpm.pid + + if [ -n "$try" ] ; then + stat_fail + exit 1 + else + add_daemon php-fpm + stat_done + fi + ;; + + stop) + test_config + stat_busy 'Gracefully shutting down php-fpm' + + if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + stat_fail + exit 1 + fi + + kill -QUIT `cat /var/run/php-fpm/php-fpm.pid` + + wait_for_pid removed /var/run/php-fpm.pid + + if [ -n "$try" ] ; then + stat_fail + exit 1 + else + rm_daemon php-fpm + stat_done + fi + ;; + + force-quit) + stat_busy 'Terminating php-fpm' + + if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + stat_fail + exit 1 + fi + + kill -TERM `cat /var/run/php-fpm/php-fpm.pid` + + wait_for_pid removed /var/run/php-fpm/php-fpm.pid + + if [ -n "$try" ] ; then + stat_fail + exit 1 + else + rm_daemon php-fpm + stat_done + fi + ;; + + restart) + $0 stop + $0 start + ;; + + reload) + test_config + stat_busy 'Reload service php-fpm' + + if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then + stat_fail + exit 1 + fi + + kill -USR2 `cat /var/run/php-fpm/php-fpm.pid` + 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 + ;; + +esac diff --git a/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz b/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz Binary files differnew file mode 100644 index 000000000..7167ce2d0 --- /dev/null +++ b/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz |