diff options
-rw-r--r-- | php-5.4.7-libdb.patch | 62 | ||||
-rw-r--r-- | php-fpm-www.conf | 5 | ||||
-rw-r--r-- | php-fpm.conf | 2 | ||||
-rw-r--r-- | php.conf | 6 | ||||
-rw-r--r-- | php.ini | 39 | ||||
-rw-r--r-- | php54.spec | 58 |
6 files changed, 124 insertions, 48 deletions
diff --git a/php-5.4.7-libdb.patch b/php-5.4.7-libdb.patch new file mode 100644 index 0000000..0b1e305 --- /dev/null +++ b/php-5.4.7-libdb.patch @@ -0,0 +1,62 @@ +--- php-5.4.7/ext/dba/config.m4.orig 2012-09-20 12:23:00.548322754 +0200 ++++ php-5.4.7/ext/dba/config.m4 2012-09-20 12:28:07.656380829 +0200 +@@ -312,57 +312,13 @@ + dbdp4="/usr/local/BerkeleyDB.4." + dbdp5="/usr/local/BerkeleyDB.5." + for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do +- if test -f "$i/db5/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/db5/db.h +- break +- elif test -f "$i/db4/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/db4/db.h +- break +- elif test -f "$i/include/db5.1/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db5.1/db.h +- break +- elif test -f "$i/include/db5.0/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db5.0/db.h +- break +- elif test -f "$i/include/db4.8/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.8/db.h +- break +- elif test -f "$i/include/db4.7/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.7/db.h +- break +- elif test -f "$i/include/db4.6/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.6/db.h +- break +- elif test -f "$i/include/db4.5/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.5/db.h +- break +- elif test -f "$i/include/db4/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4/db.h +- break +- elif test -f "$i/include/db/db4.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db/db4.h +- break +- elif test -f "$i/include/db4.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.h +- break +- elif test -f "$i/include/db.h"; then ++ if test -f "$i/include/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db.h + break + fi + done +- PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) ++ PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) + fi + PHP_DBA_STD_RESULT(db4,Berkeley DB4) + diff --git a/php-fpm-www.conf b/php-fpm-www.conf index 3bba856..a5b8a13 100644 --- a/php-fpm-www.conf +++ b/php-fpm-www.conf @@ -217,6 +217,9 @@ slowlog = /var/log/php-fpm/www-slow.log ;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/php-fpm/www-error.log -php_admin_value[session.save_path] = /var/lib/php/session php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 128M + +; Set session path to a directory owned by process user +php_admin_value[session.save_path] = /var/lib/php/session + diff --git a/php-fpm.conf b/php-fpm.conf index 49b9af3..5ec98ea 100644 --- a/php-fpm.conf +++ b/php-fpm.conf @@ -50,7 +50,7 @@ error_log = /var/log/php-fpm/error.log ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes -;daemonize = yes +daemonize = yes ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; @@ -15,3 +15,9 @@ DirectoryIndex index.php # files as PHP source code: # #AddType application/x-httpd-php-source .phps + +# +# Apache specific PHP configuration options +# those can be override in each configured vhost +# +php_value session.save_path "/var/lib/php/session" @@ -19,7 +19,7 @@ ; See the PHP docs for more specific information. ; http://php.net/configuration.file -; The syntax of the file is extremely simple. Whitespace and Lines +; The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. @@ -424,7 +424,7 @@ memory_limit = 128M ; development and early testing. ; ; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) +; E_ALL - All errors and warnings (includes E_STRICT as of PHP 5.4.0) ; E_ERROR - fatal run-time errors ; E_RECOVERABLE_ERROR - almost fatal run-time errors ; E_WARNING - run-time warnings (non-fatal errors) @@ -751,7 +751,7 @@ enable_dl = Off ; will look for to know it is OK to continue execution. Setting this variable MAY ; cause security issues, KNOW WHAT YOU ARE DOING FIRST. ; http://php.net/cgi.redirect-status-env -;cgi.redirect_status_env = ; +;cgi.redirect_status_env = ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok @@ -768,7 +768,7 @@ enable_dl = Off ; does not currently support this feature (03/17/2002) ; Set to 1 if running under IIS. Default is zero. ; http://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1; +;fastcgi.impersonate = 1 ; Disable logging through FastCGI connection. PHP's default behavior is to enable ; this feature. @@ -1350,7 +1350,11 @@ session.save_handler = files ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path -session.save_path = "/var/lib/php/session" + +; RPM note : session directory must be owned by process owner +; for mod_php, see /etc/httpd/conf.d/php.conf +; for php-fpm, see /etc/php-fpm.d/*conf +;session.save_path = "/tmp" ; Whether to use cookies. ; http://php.net/session.use-cookies @@ -1650,31 +1654,6 @@ mssql.secure_connection = Off ; http://php.net/assert.quiet-eval ;assert.quiet_eval = 0 -[COM] -; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs -; http://php.net/com.typelib-file -;com.typelib_file = - -; allow Distributed-COM calls -; http://php.net/com.allow-dcom -;com.allow_dcom = true - -; autoregister constants of a components typlib on com_load() -; http://php.net/com.autoregister-typelib -;com.autoregister_typelib = true - -; register constants casesensitive -; http://php.net/com.autoregister-casesensitive -;com.autoregister_casesensitive = false - -; show warnings on duplicate constant registrations -; http://php.net/com.autoregister-verbose -;com.autoregister_verbose = true - -; The default character set code-page to use when passing strings to and from COM objects. -; Default: system ANSI code page -;com.code_page= - [mbstring] ; language for internal character representation. ; http://php.net/mbstring.language @@ -30,7 +30,7 @@ # Optional components; pass "--with mssql" etc to rpmbuild. %global with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0} -%global with_fpm 1 +%global with_fpm 1 %if 0%{?__isa:1} %global isasuffix -%{__isa} @@ -45,15 +45,15 @@ # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} -%if 0%{?fedora} >= 17 -%global with_libzip 1 -%else +%if 0%{?fedora} < 17 && 0%{?rhel} < 7 %global with_libzip 0 +%else +%global with_libzip 1 %endif %global with_zip 1 %global zipmod zip -%if 0%{?fedora} < 18 +%if 0%{?fedora} < 18 && 0%{?rhel} < 7 %global db_devel db4-devel %else %global db_devel libdb-devel @@ -65,7 +65,7 @@ Version: 5.4.7 %if 0%{?snapdate:1}%{?rcver:1} Release: 0.2.%{?snapdate}%{?rcver}%{?dist} %else -Release: 1%{?dist} +Release: 5%{?dist} %endif License: PHP Group: Development/Languages @@ -91,6 +91,7 @@ Source99: php-fpm.init Patch5: php-5.2.0-includedir.patch Patch6: php-5.2.4-embed.patch Patch7: php-5.3.0-recode.patch +Patch8: php-5.4.7-libdb.patch # Fixes for extension modules @@ -185,7 +186,7 @@ executing PHP scripts, /usr/bin/php, and the CGI interface. Group: Development/Languages Summary: PHP FastCGI Process Manager Requires: php-common%{?_isa} = %{version}-%{release} -%if 0%{?fedora} >= 15 +%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 BuildRequires: systemd-units Requires: systemd-units Requires(post): systemd-units @@ -439,14 +440,15 @@ The php-soap package contains a dynamic shared object that will add support to PHP for using the SOAP web services protocol. %package interbase -Summary: A module for PHP applications that use Interbase/Firebird databases -Group: Development/Languages -BuildRequires: firebird-devel -Requires: php-pdo%{?_isa} = %{version}-%{release} -Provides: php_database -Provides: php-firebird, php-firebird%{?_isa} -Provides: php-pdo_firebird, php-pdo_firebird%{?_isa} -Obsoletes: php53-interbase, php53u-interbase, php54-interbase +%package interbase +Summary: A module for PHP applications that use Interbase/Firebird databases +Group: Development/Languages +BuildRequires: firebird-devel +Requires: php-pdo%{?_isa} = %{version}-%{release} +Provides: php_database +Provides: php-firebird, php-firebird%{?_isa} +Provides: php-pdo_firebird, php-pdo_firebird%{?_isa} +Obsoletes: php53-interbase, php53u-interbase, php54-interbase %description interbase The php-interbase package contains a dynamic shared object that will add @@ -672,6 +674,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1 %patch5 -p1 -b .includedir %patch6 -p1 -b .embed %patch7 -p1 -b .recode +%patch8 -p1 -b .libdb %patch40 -p1 -b .dlopen %patch41 -p1 -b .easter @@ -1174,7 +1177,7 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default . # LogRotate install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm -%if 0%{?fedora} >= 15 +%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm # tmpfiles.d install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d @@ -1193,6 +1196,11 @@ install -m 755 %{SOURCE99} $RPM_BUILD_ROOT%{_initrddir}/php-fpm # Environment file install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm +# php-fpm should not fork on recent version +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +sed -e '/daemonize/s/yes/no/' -e $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf +sed -e '/forking/d' -e $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service +%endif %endif # Fix the link @@ -1470,6 +1478,24 @@ fi %changelog +* Wed Sep 19 2012 Remi Collet <rcollet@redhat.com> 5.4.7-5 +- patch to ensure we use latest libdb (not libdb4) + +* Wed Sep 19 2012 Remi Collet <rcollet@redhat.com> 5.4.7-4 +- really fix rhel tests (use libzip and libdb) + +* Tue Sep 18 2012 Remi Collet <rcollet@redhat.com> 5.4.7-3 +- fix test to enable zip extension on RHEL-7 + +* Mon Sep 17 2012 Remi Collet <remi@fedoraproject.org> 5.4.7-2 +- remove session.save_path from php.ini + move it to apache and php-fpm configuration files + +* Fri Sep 14 2012 Remi Collet <remi@fedoraproject.org> 5.4.7-1 +- update to 5.4.7 + http://www.php.net/releases/5_4_7.php +- php-fpm: don't daemonize + * Thu Sep 13 2012 Remi Collet <RPMS@famillecollet.com> 5.4.7-1 - update to 5.4.7 |