From 00a04c29315bbc5b84491ec5ec0dea533a5b74e5 Mon Sep 17 00:00:00 2001 From: jorton Date: Feb 05 2009 12:23:19 +0000 Subject: * Thu Feb 5 2009 Joe Orton 5.2.8-9 - add recode support, -recode subpackage (#106755) - add -zts subpackage with ZTS-enabled build of httpd SAPI - adjust php.conf to use -zts SAPI build for worker MPM --- diff --git a/php-5.2.8-recode.patch b/php-5.2.8-recode.patch new file mode 100644 index 0000000..024c54b --- /dev/null +++ b/php-5.2.8-recode.patch @@ -0,0 +1,19 @@ + +Allow recode to be built with imap and mysql. The conflict is due +to symbol conflicts between the recode libraries and anything else, +but these should not matter (right? right! everything is fine, really) +if the extensions are loaded as DSOs *and* the libraries are loaded +using the magic RTLD_DEEPBIND. + +--- php-5.2.8/ext/recode/config9.m4.recode ++++ php-5.2.8/ext/recode/config9.m4 +@@ -4,9 +4,6 @@ dnl + + dnl Check for extensions with which Recode can not work + if test "$PHP_RECODE" != "no"; then +- test "$PHP_IMAP" != "no" && recode_conflict="$recode_conflict imap" +- test "$PHP_MYSQL" != "no" && recode_conflict="$recode_conflict mysql" +- + if test -n "$recode_conflict"; then + AC_MSG_ERROR([recode extension can not be configured together with:$recode_conflict]) + fi diff --git a/php.conf b/php.conf index fbf05dc..bb0f180 100644 --- a/php.conf +++ b/php.conf @@ -2,8 +2,12 @@ # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. # - -LoadModule php5_module modules/libphp5.so + + LoadModule php5_module modules/libphp5.so + + + LoadModule php5_module modules/libphp5-zts.so + # # Cause the PHP interpreter to handle files with a .php extension. diff --git a/php.spec b/php.spec index 53ad2ce..c938469 100644 --- a/php.spec +++ b/php.spec @@ -2,11 +2,12 @@ %define apiver 20041225 %define zendver 20060613 %define pdover 20060511 +%define httpd_mmn %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) Summary: PHP scripting language for creating dynamic web sites Name: php Version: 5.2.8 -Release: 8%{?dist} +Release: 9%{?dist} License: PHP Group: Development/Languages URL: http://www.php.net/ @@ -16,12 +17,14 @@ Source1: php.conf Source2: php.ini Source3: macros.php +# Build fixes Patch1: php-5.2.8-gnusrc.patch Patch2: php-5.2.8-install.patch Patch3: php-5.2.4-norpath.patch Patch4: php-5.2.8-phpize64.patch Patch5: php-5.2.0-includedir.patch Patch6: php-5.2.4-embed.patch +Patch7: php-5.2.8-recode.patch # Fixes for extension modules Patch20: php-4.3.11-shutdown.patch @@ -44,8 +47,7 @@ BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.0.0 BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon, readline-devel BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++ Obsoletes: php-dbg, php3, phpfi, stronghold-php -# Enforce Apache module ABI compatibility -Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) +Requires: httpd-mmn = %{httpd_mmn} Provides: mod_php = %{version}-%{release} Requires: php-common = %{version}-%{release} # For backwards-compatibility, require php-cli for the time being: @@ -75,6 +77,16 @@ Provides: php-pcntl, php-readline The php-cli package contains the command-line interface executing PHP scripts, /usr/bin/php, and the CGI interface. +%package zts +Group: Development/Languages +Summary: Thread-safe PHP interpreter for use with the Apache HTTP Server +Requires: php-common = %{version}-%{release} +Requires: httpd-mmn = %{httpd_mmn} + +%description zts +The php-zts package contains a module for use with the Apache HTTP +Server which can operate under a threaded server processing model. + %package common Group: Development/Languages Summary: Common files for PHP @@ -362,6 +374,16 @@ BuildRequires: aspell-devel >= 0.50.0 The php-pspell package contains a dynamic shared object that will add support for using the pspell library to PHP. +%package recode +Summary: A module for PHP applications for using the recode library +Group: System Environment/Libraries +Requires: php-common = %{version}-%{release} +BuildRequires: recode-devel + +%description recode +The php-recode package contains a dynamic shared object that will add +support for using the recode library to PHP. + %prep %setup -q %patch1 -p1 -b .gnusrc @@ -370,6 +392,7 @@ support for using the pspell library to PHP. %patch4 -p1 -b .phpize64 %patch5 -p1 -b .includedir %patch6 -p1 -b .embed +%patch7 -p1 -b .recode %patch20 -p1 -b .shutdown %patch21 -p1 -b .macropen @@ -387,9 +410,8 @@ cp TSRM/LICENSE TSRM_LICENSE cp regex/COPYRIGHT regex_COPYRIGHT cp ext/gd/libgd/README gd_README -# Source is built trice: once for /usr/bin/php, once for the Apache DSO -# and once for inclusion as embedded script language into other programs -mkdir build-cgi build-apache build-embedded +# Multiple builds for multiple SAPIs +mkdir build-cgi build-apache build-embedded build-zts # Remove bogus test; position of read position after fopen(, "a+") # is not defined by C standard, so don't presume anything. @@ -539,7 +561,8 @@ build --enable-force-cgi-redirect \ --with-mssql=shared,%{_prefix} \ --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ --enable-posix=shared \ - --with-unixODBC=shared,%{_prefix} + --with-unixODBC=shared,%{_prefix} \ + --with-recode=shared,%{_prefix} popd without_shared="--without-mysql --without-gd \ @@ -561,6 +584,17 @@ pushd build-embedded build --enable-embed ${without_shared} popd +# Build a special thread-safe Apache SAPI +pushd build-zts +EXTENSION_DIR=%{_libdir}/php/modules-zts +build --with-apxs2=%{_sbindir}/apxs ${without_shared} \ + --enable-maintainer-zts \ + --with-config-file-scan-dir=%{_sysconfdir}/php-zts.d +popd + +### NOTE!!! EXTENSION_DIR was changed for the -zts build, so it must remain +### the last SAPI to be built. + %check cd build-apache # Run tests, using the CLI SAPI @@ -587,9 +621,6 @@ make -C build-embedded install-sapi install-headers INSTALL_ROOT=$RPM_BUILD_ROOT # Install everything from the CGI SAPI build make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT -# Install the Apache module -make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT - # Install the default configuration file and icons install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ install -m 644 $RPM_SOURCE_DIR/php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini @@ -604,6 +635,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/php/pear \ install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules install -m 755 build-apache/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules +# install the ZTS DSO +install -m 755 build-zts/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules/libphp5-zts.so + # Apache config fragment install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d @@ -617,7 +651,7 @@ for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \ mbstring ncurses gd dom xsl soap bcmath dba xmlreader xmlwriter \ pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json zip \ dbase mcrypt mhash tidy pdo_dblib mssql pspell curl wddx \ - posix sysvshm sysvsem sysvmsg; do + posix sysvshm sysvsem sysvmsg recode; do cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini < 5.2.8-9 +- add recode support, -recode subpackage (#106755) +- add -zts subpackage with ZTS-enabled build of httpd SAPI +- adjust php.conf to use -zts SAPI build for worker MPM + * Wed Feb 4 2009 Joe Orton 5.2.8-8 - fix patch fuzz, renumber patches