Mageia Bugzilla – Attachment 2845 Details for
Bug 7553
php-5.3.x is built (in full!) four times
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
spec file patch
php.spec.diff (text/plain), 7.17 KB, created by
Oden Eriksson
on 2012-09-23 09:00:03 CEST
(
hide
)
Description:
spec file patch
Filename:
MIME Type:
Creator:
Oden Eriksson
Created:
2012-09-23 09:00:03 CEST
Size:
7.17 KB
patch
obsolete
>--- php.spec 2012-07-25 18:09:01.000000000 +0200 >+++ php.spec.oden 2012-09-18 09:16:15.000000000 +0200 >@@ -11,8 +11,9 @@ > > Summary: The PHP5 scripting language > Name: php >-Version: 5.3.15 >-Release: %mkrel 1 >+Version: 5.3.17 >+%define subrel 2 >+Release: %mkrel 0 > Group: Development/PHP > License: PHP License > URL: http://www.php.net >@@ -85,8 +86,8 @@ > Patch302: php-5.3.9-no_egg.diff > Patch303: php-5.3.9-mageia-logo.patch > Patch304: php-5.3.11RC1-aconf26x.patch >- >- >+# apache-mod_php >+Patch400: php-5.3.17-apache-mod_php.diff > BuildRequires: apache-devel >= 2.2.0 > #BuildRequires: aspell-devel > BuildRequires: autoconf >@@ -1290,6 +1291,10 @@ > %patch303 -p1 -b .mageia_logo.droplet > %patch304 -p1 -b .aconf26x.droplet > >+# mod_php >+%patch400 -p1 >+mv sapi/apache2handler/mod_php5.c sapi/apache2handler/mod_php.c >+ > # nuke bogus checks because i fixed this years ago in our recode package > rm -f ext/recode/config9.m4 > >@@ -1298,7 +1303,6 @@ > find -name "*.php*" | xargs chmod 644 > find -name "*README*" | xargs chmod 644 > >- > # make sure using system libs > rm -rf ext/pcre/pcrelib > rm -rf ext/pdo_sqlite/sqlite >@@ -1333,10 +1337,13 @@ > > # never use "--disable-rpath", it does the opposite > >-# Shell function to configure and build a PHP tree. >-build() { >-ln -sf ../configure . >+# Configure php5 >+for i in fpm cgi cli apxs; do > ./configure \ >+ `[ $i = fpm ] && echo --disable-cli --enable-fpm --with-libxml-dir=%{_prefix} --with-fpm-user=apache --with-fpm-group=apache` \ >+ `[ $i = cgi ] && echo --disable-cli` \ >+ `[ $i = cli ] && echo --disable-cgi --enable-cli` \ >+ `[ $i = apxs ] && echo --with-apxs2=%{_sbindir}/apxs` \ > --build=%{_build} \ > --prefix=%{_prefix} \ > --exec-prefix=%{_prefix} \ >@@ -1424,47 +1431,29 @@ > --enable-xmlwriter=shared,%{_prefix} \ > --with-xsl=shared,%{_prefix} \ > --enable-wddx=shared \ >- --enable-zip=shared --with-libzip=%{_prefix} \ >- $* >+ --enable-zip=shared --with-libzip=%{_prefix} > >-perl -pi -e "s|-prefer-non-pic -static||g" Makefile >+cp -f Makefile Makefile.$i > >-%make >-} >+# left for debugging purposes >+cp -f main/php_config.h php_config.h.$i > >-# multiple builds >+# when all else failed... >+perl -pi -e "s|-prefer-non-pic -static||g" Makefile.$i > >-# fpm >-mkdir build-fpm >-pushd build-fpm >-build --disable-cli --enable-fpm --with-fpm-user=apache --with-fpm-group=apache >-popd >- >-# cgi >-mkdir build-cgi >-pushd build-cgi >-build --disable-cli >-popd >- >-# apache >-mkdir build-apache >-pushd build-apache >-build --with-apxs2=%{_sbindir}/apxs >- >-cp ../sapi/apache2handler/* . >-%{_sbindir}/apxs -c \ >- `apr-1-config --link-ld --libs` \ >- `xml2-config --cflags` \ >- -I .. -I ../main -I ../Zend -I ../TSRM \ >- -I Zend -I TSRM -I main -I ext/date/lib \ >- -lphp5_common \ >- mod_php5.c \ >- sapi_apache2.c \ >- apache_config.c \ >- php_functions.c \ >- main/internal_functions.c >-popd >+done >+ >+%make > >+# make php-cgi >+cp -af php_config.h.cgi main/php_config.h >+make -f Makefile.cgi sapi/cgi/php-cgi >+cp -af php_config.h.apxs main/php_config.h >+ >+# make php-fpm >+cp -af php_config.h.fpm main/php_config.h >+make -f Makefile.fpm sapi/fpm/php-fpm >+cp -af php_config.h.apxs main/php_config.h > > %install > rm -rf %{buildroot} >@@ -1479,28 +1468,22 @@ > install -d %{buildroot}/var/lib/php > install -d %{buildroot}%{_datadir}/php > >- > #perl -pi -e "s|^libdir=.*|libdir='%{_libdir}'|g" .libs/*.la* > >-make -C build-apache install \ >- INSTALL_ROOT=%{buildroot} \ >+make -f Makefile.apxs install \ >+ INSTALL_ROOT=%{buildroot} \ > INSTALL_IT="\$(LIBTOOL) --mode=install install libphp5_common.la %{buildroot}%{_libdir}/" \ > INSTALL_CLI="\$(LIBTOOL) --silent --mode=install install sapi/cli/php %{buildroot}%{_bindir}/php" > >-pushd build-cgi > ./libtool --silent --mode=install install sapi/cgi/php-cgi %{buildroot}%{_bindir}/php-cgi >-popd > > # compat php-fcgi symink > ln -s php-cgi %{buildroot}%{_bindir}/php-fcgi > >- >-pushd build-apache > install -m0644 sapi/cli/php.1 %{buildroot}%{_mandir}/man1/ > install -m0644 scripts/man1/phpize.1 %{buildroot}%{_mandir}/man1/ > install -m0644 scripts/man1/php-config.1 %{buildroot}%{_mandir}/man1/ >-install -m0755 .libs/mod_php5.so %{buildroot}%{_libdir}/apache-extramodules/ >-popd >+install -m0755 .libs/libphp5.so %{buildroot}%{_libdir}/apache-extramodules/mod_php.so > > # fpm > install -d %{buildroot}%{_initrddir} >@@ -1515,20 +1498,18 @@ > # a small bug here... > echo "; place your config here" > %{buildroot}%{_sysconfdir}/php-fpm.d/default.conf > >-pushd build-fpm > ./libtool --silent --mode=install install sapi/fpm/php-fpm %{buildroot}%{_sbindir}/php-fpm > install -m0644 sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/ > install -m0644 sapi/fpm/php-fpm.conf %{buildroot}%{_sysconfdir}/ > install -m0755 %{SOURCE4} %{buildroot}%{_initrddir}/php-fpm > install -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/php-fpm > install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/php-fpm >-popd > > install -d %{buildroot}%{_sysconfdir}/httpd/modules.d > > cat > %{buildroot}%{_sysconfdir}/httpd/modules.d/70_mod_php.conf <<EOF >-<IfModule !mod_php5.c> >- LoadModule php5_module extramodules/mod_php5.so >+<IfModule !mod_php.c> >+ LoadModule php_module extramodules/mod_php.so > </IfModule> > > <IfModule mod_mime.c> >@@ -1537,7 +1518,7 @@ > AddType application/x-httpd-php-source .phps > </IfModule> > >-<IfModule mod_php5.c> >+<IfModule mod_php.c> > <IfModule mod_dir.c> > DirectoryIndex index.php index.phtml > </IfModule> >@@ -1554,7 +1535,6 @@ > service httpd reload 2>/dev/null || : > EOF > >- > # extensions > echo "extension = openssl.so" > %{buildroot}%{_sysconfdir}/php.d/21_openssl.ini > echo "extension = zlib.so" > %{buildroot}%{_sysconfdir}/php.d/21_zlib.ini >@@ -1665,12 +1645,11 @@ > rm -f %{buildroot}%{_bindir}/pear > rm -f %{buildroot}%{_libdir}/*.*a > >- > # php-devel > install -d %{buildroot}%{_usrsrc}/php-devel > > install -m0644 run-tests*.php %{buildroot}%{_usrsrc}/php-devel/ >-install -m0644 build-apache/main/internal_functions.c %{buildroot}%{_usrsrc}/php-devel/ >+install -m0644 main/internal_functions.c %{buildroot}%{_usrsrc}/php-devel/ > > cat > %{buildroot}%{_usrsrc}/php-devel/buildext <<EOF > #!/bin/bash >@@ -1783,9 +1762,6 @@ > %multiarch_includes %{buildroot}%{_includedir}/php/main/php_config.h > > %if %{build_test} >-cd build-apache >-cp ../run-tests.php . >-cp -r ../tests . > cp %{SOURCE1} php-test.ini > > export NO_INTERACTION=1 >@@ -1826,7 +1802,6 @@ > %preun fpm > %_preun_service php-fpm > >- > %files ini > %{_docdir}/php > %config(noreplace) %{_sysconfdir}/php.ini >@@ -1865,7 +1840,7 @@ > > %files -n apache-mod_php > %config(noreplace) %{_sysconfdir}/httpd/modules.d/70_mod_php.conf >-%{_libdir}/apache-extramodules/mod_php5.so >+%{_libdir}/apache-extramodules/mod_php.so > %{_localstatedir}/lib/rpm/filetriggers/httpd-php.filter > %attr(0755,root,root) %{_localstatedir}/lib/rpm/filetriggers/httpd-php.script > >@@ -2142,6 +2117,15 @@ > > > %changelog >+* Tue Sep 18 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.17-0.2.mga2 >+- make it build just once, not four times (duh!) >+- added fixes from cauldron to build mod_php.so >+ >+* Mon Sep 17 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.17-0.1.mga2 >+- 5.3.17 >+ >+* Thu Aug 23 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.15-0.1.mga2 >+- 5.3.16 > > * Wed Jul 25 2012 luigiwalser <luigiwalser> 3:5.3.15-1.mga2 > + Revision: 274214
--- php.spec 2012-07-25 18:09:01.000000000 +0200 +++ php.spec.oden 2012-09-18 09:16:15.000000000 +0200 @@ -11,8 +11,9 @@ Summary: The PHP5 scripting language Name: php -Version: 5.3.15 -Release: %mkrel 1 +Version: 5.3.17 +%define subrel 2 +Release: %mkrel 0 Group: Development/PHP License: PHP License URL: http://www.php.net @@ -85,8 +86,8 @@ Patch302: php-5.3.9-no_egg.diff Patch303: php-5.3.9-mageia-logo.patch Patch304: php-5.3.11RC1-aconf26x.patch - - +# apache-mod_php +Patch400: php-5.3.17-apache-mod_php.diff BuildRequires: apache-devel >= 2.2.0 #BuildRequires: aspell-devel BuildRequires: autoconf @@ -1290,6 +1291,10 @@ %patch303 -p1 -b .mageia_logo.droplet %patch304 -p1 -b .aconf26x.droplet +# mod_php +%patch400 -p1 +mv sapi/apache2handler/mod_php5.c sapi/apache2handler/mod_php.c + # nuke bogus checks because i fixed this years ago in our recode package rm -f ext/recode/config9.m4 @@ -1298,7 +1303,6 @@ find -name "*.php*" | xargs chmod 644 find -name "*README*" | xargs chmod 644 - # make sure using system libs rm -rf ext/pcre/pcrelib rm -rf ext/pdo_sqlite/sqlite @@ -1333,10 +1337,13 @@ # never use "--disable-rpath", it does the opposite -# Shell function to configure and build a PHP tree. -build() { -ln -sf ../configure . +# Configure php5 +for i in fpm cgi cli apxs; do ./configure \ + `[ $i = fpm ] && echo --disable-cli --enable-fpm --with-libxml-dir=%{_prefix} --with-fpm-user=apache --with-fpm-group=apache` \ + `[ $i = cgi ] && echo --disable-cli` \ + `[ $i = cli ] && echo --disable-cgi --enable-cli` \ + `[ $i = apxs ] && echo --with-apxs2=%{_sbindir}/apxs` \ --build=%{_build} \ --prefix=%{_prefix} \ --exec-prefix=%{_prefix} \ @@ -1424,47 +1431,29 @@ --enable-xmlwriter=shared,%{_prefix} \ --with-xsl=shared,%{_prefix} \ --enable-wddx=shared \ - --enable-zip=shared --with-libzip=%{_prefix} \ - $* + --enable-zip=shared --with-libzip=%{_prefix} -perl -pi -e "s|-prefer-non-pic -static||g" Makefile +cp -f Makefile Makefile.$i -%make -} +# left for debugging purposes +cp -f main/php_config.h php_config.h.$i -# multiple builds +# when all else failed... +perl -pi -e "s|-prefer-non-pic -static||g" Makefile.$i -# fpm -mkdir build-fpm -pushd build-fpm -build --disable-cli --enable-fpm --with-fpm-user=apache --with-fpm-group=apache -popd - -# cgi -mkdir build-cgi -pushd build-cgi -build --disable-cli -popd - -# apache -mkdir build-apache -pushd build-apache -build --with-apxs2=%{_sbindir}/apxs - -cp ../sapi/apache2handler/* . -%{_sbindir}/apxs -c \ - `apr-1-config --link-ld --libs` \ - `xml2-config --cflags` \ - -I .. -I ../main -I ../Zend -I ../TSRM \ - -I Zend -I TSRM -I main -I ext/date/lib \ - -lphp5_common \ - mod_php5.c \ - sapi_apache2.c \ - apache_config.c \ - php_functions.c \ - main/internal_functions.c -popd +done + +%make +# make php-cgi +cp -af php_config.h.cgi main/php_config.h +make -f Makefile.cgi sapi/cgi/php-cgi +cp -af php_config.h.apxs main/php_config.h + +# make php-fpm +cp -af php_config.h.fpm main/php_config.h +make -f Makefile.fpm sapi/fpm/php-fpm +cp -af php_config.h.apxs main/php_config.h %install rm -rf %{buildroot} @@ -1479,28 +1468,22 @@ install -d %{buildroot}/var/lib/php install -d %{buildroot}%{_datadir}/php - #perl -pi -e "s|^libdir=.*|libdir='%{_libdir}'|g" .libs/*.la* -make -C build-apache install \ - INSTALL_ROOT=%{buildroot} \ +make -f Makefile.apxs install \ + INSTALL_ROOT=%{buildroot} \ INSTALL_IT="\$(LIBTOOL) --mode=install install libphp5_common.la %{buildroot}%{_libdir}/" \ INSTALL_CLI="\$(LIBTOOL) --silent --mode=install install sapi/cli/php %{buildroot}%{_bindir}/php" -pushd build-cgi ./libtool --silent --mode=install install sapi/cgi/php-cgi %{buildroot}%{_bindir}/php-cgi -popd # compat php-fcgi symink ln -s php-cgi %{buildroot}%{_bindir}/php-fcgi - -pushd build-apache install -m0644 sapi/cli/php.1 %{buildroot}%{_mandir}/man1/ install -m0644 scripts/man1/phpize.1 %{buildroot}%{_mandir}/man1/ install -m0644 scripts/man1/php-config.1 %{buildroot}%{_mandir}/man1/ -install -m0755 .libs/mod_php5.so %{buildroot}%{_libdir}/apache-extramodules/ -popd +install -m0755 .libs/libphp5.so %{buildroot}%{_libdir}/apache-extramodules/mod_php.so # fpm install -d %{buildroot}%{_initrddir} @@ -1515,20 +1498,18 @@ # a small bug here... echo "; place your config here" > %{buildroot}%{_sysconfdir}/php-fpm.d/default.conf -pushd build-fpm ./libtool --silent --mode=install install sapi/fpm/php-fpm %{buildroot}%{_sbindir}/php-fpm install -m0644 sapi/fpm/php-fpm.8 %{buildroot}%{_mandir}/man8/ install -m0644 sapi/fpm/php-fpm.conf %{buildroot}%{_sysconfdir}/ install -m0755 %{SOURCE4} %{buildroot}%{_initrddir}/php-fpm install -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/php-fpm install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/php-fpm -popd install -d %{buildroot}%{_sysconfdir}/httpd/modules.d cat > %{buildroot}%{_sysconfdir}/httpd/modules.d/70_mod_php.conf <<EOF -<IfModule !mod_php5.c> - LoadModule php5_module extramodules/mod_php5.so +<IfModule !mod_php.c> + LoadModule php_module extramodules/mod_php.so </IfModule> <IfModule mod_mime.c> @@ -1537,7 +1518,7 @@ AddType application/x-httpd-php-source .phps </IfModule> -<IfModule mod_php5.c> +<IfModule mod_php.c> <IfModule mod_dir.c> DirectoryIndex index.php index.phtml </IfModule> @@ -1554,7 +1535,6 @@ service httpd reload 2>/dev/null || : EOF - # extensions echo "extension = openssl.so" > %{buildroot}%{_sysconfdir}/php.d/21_openssl.ini echo "extension = zlib.so" > %{buildroot}%{_sysconfdir}/php.d/21_zlib.ini @@ -1665,12 +1645,11 @@ rm -f %{buildroot}%{_bindir}/pear rm -f %{buildroot}%{_libdir}/*.*a - # php-devel install -d %{buildroot}%{_usrsrc}/php-devel install -m0644 run-tests*.php %{buildroot}%{_usrsrc}/php-devel/ -install -m0644 build-apache/main/internal_functions.c %{buildroot}%{_usrsrc}/php-devel/ +install -m0644 main/internal_functions.c %{buildroot}%{_usrsrc}/php-devel/ cat > %{buildroot}%{_usrsrc}/php-devel/buildext <<EOF #!/bin/bash @@ -1783,9 +1762,6 @@ %multiarch_includes %{buildroot}%{_includedir}/php/main/php_config.h %if %{build_test} -cd build-apache -cp ../run-tests.php . -cp -r ../tests . cp %{SOURCE1} php-test.ini export NO_INTERACTION=1 @@ -1826,7 +1802,6 @@ %preun fpm %_preun_service php-fpm - %files ini %{_docdir}/php %config(noreplace) %{_sysconfdir}/php.ini @@ -1865,7 +1840,7 @@ %files -n apache-mod_php %config(noreplace) %{_sysconfdir}/httpd/modules.d/70_mod_php.conf -%{_libdir}/apache-extramodules/mod_php5.so +%{_libdir}/apache-extramodules/mod_php.so %{_localstatedir}/lib/rpm/filetriggers/httpd-php.filter %attr(0755,root,root) %{_localstatedir}/lib/rpm/filetriggers/httpd-php.script @@ -2142,6 +2117,15 @@ %changelog +* Tue Sep 18 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.17-0.2.mga2 +- make it build just once, not four times (duh!) +- added fixes from cauldron to build mod_php.so + +* Mon Sep 17 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.17-0.1.mga2 +- 5.3.17 + +* Thu Aug 23 2012 Oden Eriksson <oeriksson@mandriva.com> 3:5.3.15-0.1.mga2 +- 5.3.16 * Wed Jul 25 2012 luigiwalser <luigiwalser> 3:5.3.15-1.mga2 + Revision: 274214
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 7553
: 2845 |
2846