%{!?dotests: %define dotests 1} %define contentdir /var/www/htdocs %define _libdir64 /opt/freeware/lib64 Summary: The PHP HTML-embedded scripting language Name: php Version: 7.4.33 Release: 1 License: The PHP License v3.01 Group: Development/Languages URL: http://www.php.net/ Source0: http://php.net/downloads.php/php-%{version}.tar.gz Source1: %{name}.conf Source2: %{name}.ini Source3: %{name}64.ini Source4: %{name}.conf_64 Source5: php-fpm.conf Source6: www.conf Patch0: %{name}-7.2.25-aixconfig.patch Patch2: %{name}-7.4.13-aix-build.patch Patch3: %{name}-7.2.25-aix-network.patch Patch4: %{name}-7.2.25-aix-setrlimit.patch Patch6: %{name}-7.2.25-aix-tests.patch Patch7: %{name}-7.4.13-aix-trailing-slash.patch Patch8: %{name}-7.4.13-phpini.patch Patch9: php-7.2.18-fpm.patch #Patch to load mysqlnd.so before mysqli.so and pdo_mysql.so as they have dependency on mysqlnd. #Otherwise loading of modules that are dependent on mysqlnd fail and hence the testcases fail Patch10: %{name}-7.4.30-mysqlnd_makefile_cgi.patch BuildRequires: make BuildRequires: httpd >= 2.4.43 httpd-devel >= 2.4.43 BuildRequires: libiconv >= 1.16 Provides: mod_php = %{version}-%{release} Requires: libxml2 >= 2.9.11 Requires: openldap >= 2.4.58 Requires: httpd >= 2.4.52 Requires: libgcc >= 8.3.0 Requires: libiconv >= 1.16 Requires: sqlite >= 3.35.5 %description PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. %package cli Group: Development/Languages Summary: Command-line interface for PHP Provides: %{name}-cgi = %{version}-%{release} Requires: libiconv >= 1.16 Requires: openldap >= 2.4.58 Requires: libxml2 >= 2.9.11 Requires: sqlite >= 3.35.5 Requires: %{name}-common = %{version}-%{release} %description cli The php-cli package contains the command-line interface executing PHP scripts, %{_bindir}/php, and the CGI interface. %package common Group: Development/Languages Summary: Common files for PHP Requires: curl >= 7.79.1 Requires: bzip2 >= 1.0.8 Requires: zlib >= 1.2.11 Requires: libgcc >= 8.3.0 Provides: php-curl = %{version} Provides: php-bz2 = %{version} Provides: php-zlib = %{version} %description common The php-common package contains files used by both the php package and the php-cli package. %package devel Group: Development/Libraries Summary: Files needed for building PHP extensions %description devel The php-devel package contains the files needed for building PHP extensions. If you need to compile your own PHP extensions, you will need to install this package. %package fpm Group: Development/Languages Summary: PHP FastCGI Process Manager # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM and fpm are licensed under BSD License: PHP and Zend and BSD Requires: php-common%{?_isa} = %{version}-%{release} Requires: openldap >= 2.4.58 Requires: libxml2 >= 2.9.11 Requires: libiconv >= 1.16 Requires: sqlite >= 3.35.5 %description fpm PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. %package gd Summary: A module for PHP applications for using the gd graphics library Group: Development/Languages # All files licensed under PHP version 3.01, except # libgd is licensed under BSD License: PHP and BSD Requires: %{name}-common = %{version}-%{release} # Required to build the bundled GD library BuildRequires: libgd-devel >= 2.2.5-3 Requires: libgd >= 2.2.5-3 Requires: libgcc >= 8.3.0 %description gd The php-gd package contains a dynamic shared object that will add support for using the gd graphics library to PHP. %package pdo Summary: A database access abstraction module for PHP applications Group: Development/Languages # All files licensed under PHP version 3.01 License: PHP Requires: php-common = %{version}-%{release} Requires: libgcc >= 8.3.0-1 Requires: sqlite >= 3.35.5 # ABI/API check - Arch specific Provides: php-pdo-abi = %{pdover} Provides: php(pdo-abi) = %{pdover} Provides: php-pdo_sqlite, php-pdo_sqlite %description pdo The php-pdo package contains a dynamic shared object that will add a database access abstraction layer to PHP. This module provides a common interface for accessing MySQL, PostgreSQL or other databases. %package mysqlnd Summary: A module for PHP applications that use MySQL databases # All files licensed under PHP version 3.01 License: PHP Requires: php-pdo%{?_isa} = %{version}-%{release} Requires: libgcc >= 8.3.0-1 Provides: php_database Provides: php-mysqli = %{version}-%{release} Provides: php-mysqli%{?_isa} = %{version}-%{release} Provides: php-pdo_mysql, php-pdo_mysql%{?_isa} %description mysqlnd The php-mysqlnd package contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL support for PHP applications, you will need to install this package and the php package. This package use the MySQL Native Driver %package mbstring Summary: A module for PHP applications which need multi-byte string handling # All files licensed under PHP version 3.01, except # libmbfl is licensed under LGPLv2 # ucgendat is licensed under OpenLDAP License: PHP and LGPLv2 and OpenLDAP Provides: bundled(libmbfl) = 1.3.2 BuildRequires: oniguruma-devel >= 6.9.6 Requires: oniguruma >= 6.9.6 Requires: php-common%{?_isa} = %{version}-%{release} %description mbstring The php-mbstring package contains a dynamic shared object that will add support for multi-byte string handling to PHP. %package zip Summary: A module for PHP applications that use ZIP compressed archives License: PHP BuildRequires: libzip-devel >= 1.8.0 Provides: php-zip = %{version} Requires: libzip >= 1.8.0 Requires: php-common = %{version}-%{release} %description zip Php-zip extension enables you to transparently read or write ZIP compressed archives and the files inside them. %prep %setup -q %patch0 -p1 -b .aixconfig %patch2 -p1 -b .build %patch3 -p1 -b .network %patch4 -p1 -b .setrlimit %patch6 -p1 -b .tests %patch7 -p1 -b .trailing-slash %patch9 #bug80024-socket-reduced-inherit.phpt fails in AIX resulting in build failure rm -f sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit %build # Seems to help build faster, using bash export CC="/opt/freeware/bin/gcc -fPIC" export CXX="/opt/freeware/bin/g++" export OPENSSL_LIBS="-lssl -lcrypto" export OPENSSL_CFLAGS="-I/usr/include/openssl" export GDLIB_LIBS="-lgd" export GDLIB_CFLAGS="-I/opt/freeware/include" export PNG_LIBS="-lpng" export PNG_CFLAGS="-I/opt/freeware/include" # build on 64bit mode export OBJECT_MODE=64 cd 64bit export CFLAGS="-Wl,-bbigtoc -I/usr/include/openssl -O2 -maix64 -I/opt/freeware/include" export LDFLAGS="-L/opt/freeware/lib64 -L/usr/lib64 -L/opt/freeware/lib -L/usr/lib -lm -lpthread -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export PHP_LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -lm -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export PKG_CONFIG_PATH="/opt/freeware/lib64/pkgconfig:/opt/freeware/lib/pkgconfig" export LIBPATH="/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" patch -p0 < %{PATCH8} # install extension modules in %{_libdir}/php/modules. export EXTENSION_DIR=%{_libdir64}/php/modules # shell function to configure and build a PHP tree buildphp() { ln -sf ../configure ./configure --prefix=%{_prefix} \ --libdir=%{_libdir64}/php \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --enable-shared \ --enable-cli \ --mandir=%{_mandir} \ --with-ldap=/opt/freeware \ --disable-debug \ --enable-dom \ --enable-json \ --enable-soap=shared \ --enable-ftp \ --without-pear \ --with-openssl=/usr \ --with-iconv=/opt/freeware \ --enable-fpm \ --enable-gd=shared \ --with-external-gd \ --with-jpeg-dir=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-freetype \ --with-zlib=shared \ --with-curl=shared \ --with-bz2=shared \ --enable-exif=shared \ --enable-mbstring=shared \ --with-zip=shared \ $* make } # build the command line and the CGI version of PHP mkdir build-cgi cd build-cgi buildphp \ --enable-mysqlnd=shared \ --with-mysqli=shared,mysqlnd \ --enable-pdo=shared \ --with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-mysql=shared,mysqlnd #Due to changes in configure,soap.so and opcache.so are not copied to build-cgi/modules. #As a result make test fails.Following is a workaround to solve this. #gmake test randomly hangs during execution of the test case, "TLS server rate-limits client-initiated renegotiation" cp ext/soap/.libs/soap.so modules/ cp ext/opcache/.libs/opcache.so modules/ cp ext/gd/.libs/gd.so modules/ cp ext/pdo/.libs/pdo.so modules/ cp ext/pdo_sqlite/.libs/pdo_sqlite.so modules/ cp ext/pdo_mysql/.libs/pdo_mysql.so modules/ cp ext/mysqli/.libs/mysqli.so modules/ cp ext/mysqlnd/.libs/mysqlnd.so modules/ cp ext/zlib/.libs/zlib.so modules/ cp ext/curl/.libs/curl.so modules/ cp ext/bz2/.libs/bz2.so modules/ cp ext/exif/.libs/exif.so modules/ cp ext/mbstring/.libs/mbstring.so modules/ cp ext/zip/.libs/zip.so modules/ if [ "%{dotests}" == 1 ] then patch -p0 < %{PATCH10} gmake -k test || true fi cd .. # build the Apache module mkdir build-apache cd build-apache buildphp \ --with-apxs2=%{_prefix}/bin/apxs_64 \ --libdir=%{_libdir64}/php \ --without-mysqli \ --disable-pdo #Due to changes in configure,soap.so and opcache.so are not copied to build-cgi/modules. #As a result make test fails.Following is a workaround to solve this. cp ext/soap/.libs/soap.so modules/ cp ext/opcache/.libs/opcache.so modules/ cp ext/gd/.libs/gd.so modules/ cp ext/zlib/.libs/zlib.so modules/ cp ext/curl/.libs/curl.so modules/ cp ext/bz2/.libs/bz2.so modules/ cp ext/exif/.libs/exif.so modules/ cp ext/mbstring/.libs/mbstring.so modules/ cp ext/zip/.libs/zip.so modules/ if [ "%{dotests}" == 1 ] then gmake -k test || true fi cd .. # build on 32bit mode cd ../32bit export OBJECT_MODE=32 export CFLAGS="-Wl,-bbigtoc -I/usr/include/openssl -O2" export LDFLAGS="-L/opt/freeware/lib -L/usr/lib -lm -lpthread -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export PHP_LDFLAGS="-L/opt/freeware/lib -L/usr/lib -lm -lpthread -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export PKG_CONFIG_PATH="/opt/freeware/lib/pkgconfig" export LIBPATH="/opt/freeware/lib:/usr/lib:/lib" # install extension modules in %{_libdir}/php/modules. export EXTENSION_DIR=%{_libdir}/php/modules # shell function to configure and build a PHP tree buildphp() { ln -sf ../configure ./configure --prefix=%{_prefix} \ --libdir=%{_libdir}/php \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --enable-shared \ --enable-cli \ --mandir=%{_mandir} \ --with-ldap=/opt/freeware \ --disable-debug \ --enable-dom \ --enable-json \ --enable-soap=shared \ --enable-ftp \ --without-pear \ --with-openssl=/usr \ --with-iconv=/opt/freeware \ --enable-fpm \ --with-jpeg-dir=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-freetype \ --enable-gd=shared \ --with-external-gd \ --with-zlib=shared \ --with-curl=shared \ --with-bz2=shared \ --enable-exif=shared \ --enable-mbstring=shared \ --with-zip=shared \ $* make } # build the command line and the CGI version of PHP mkdir build-cgi cd build-cgi buildphp \ --enable-mysqlnd=shared \ --with-mysqli=shared,mysqlnd \ --enable-pdo=shared \ --with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-mysql=shared,mysqlnd #Due to changes in configure,soap.so and opcache.so are not copied to build-cgi/modules. #As a result make test fails.Following is a workaround to solve this. cp ext/soap/.libs/soap.so modules/ cp ext/opcache/.libs/opcache.so modules/ cp ext/gd/.libs/gd.so modules/ cp ext/pdo/.libs/pdo.so modules/ cp ext/pdo_sqlite/.libs/pdo_sqlite.so modules/ cp ext/pdo_mysql/.libs/pdo_mysql.so modules/ cp ext/mysqli/.libs/mysqli.so modules/ cp ext/mysqlnd/.libs/mysqlnd.so modules/ cp ext/zlib/.libs/zlib.so modules/ cp ext/curl/.libs/curl.so modules/ cp ext/bz2/.libs/bz2.so modules/ cp ext/exif/.libs/exif.so modules/ cp ext/mbstring/.libs/mbstring.so modules/ cp ext/zip/.libs/zip.so modules/ if [ "%{dotests}" == 1 ] then patch -p0 < %{PATCH10} gmake -k test || true fi cd .. # build the Apache module mkdir build-apache cd build-apache buildphp \ --with-apxs2=%{_prefix}/bin/apxs \ --without-mysqli \ --disable-pdo #Due to changes in configure,soap.so and opcache.so are not copied to build-cgi/modules. #As a result make test fails.Following is a workaround to solve this. cp ext/soap/.libs/soap.so modules/ cp ext/opcache/.libs/opcache.so modules/ cp ext/gd/.libs/gd.so modules/ cp ext/zlib/.libs/zlib.so modules/ cp ext/curl/.libs/curl.so modules/ cp ext/bz2/.libs/bz2.so modules/ cp ext/exif/.libs/exif.so modules/ cp ext/mbstring/.libs/mbstring.so modules/ cp ext/zip/.libs/zip.so modules/ if [ "%{dotests}" == 1 ] then gmake -k test || true fi cd .. %install export CONFIG_SHELL=/opt/freeware/bin/bash export CONFIGURE_ENV_ARGS=/opt/freeware/bin/bash [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # install on 64bit mode export OBJECT_MODE=64 cd 64bit # unfortunately 'make install-sapi' does not seem to work for use, therefore # we have to install the targets separately cd build-cgi for TARGET in install-cli install-build install-headers install-programs install-fpm ; do make INSTALL_ROOT=${RPM_BUILD_ROOT} ${TARGET} done # install the php-cgi binary cp sapi/cgi/php-cgi ${RPM_BUILD_ROOT}%{_bindir} chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/php-cgi # install the DSO cd ../build-apache mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules cp .libs/libphp7.so ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules/libphp7.so cd .. # strip binaries /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/php /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/php-cgi /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/php-fpm #/usr/bin/strip ${RPM_BUILD_ROOT}%{_libdir64}/httpd/modules/libphp7.so # install the Apache httpd config file for PHP mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra chmod 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf cp %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf_64 chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf_64 # install the default configuration file and directories mkdir -p ${RPM_BUILD_ROOT}/etc cp %{SOURCE2} ${RPM_BUILD_ROOT}/etc/php.ini cp %{SOURCE3} ${RPM_BUILD_ROOT}/etc/php64.ini mkdir -p ${RPM_BUILD_ROOT}/etc/php.d # create the PHP extension modules directory mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/php/modules # copy soap to php modules directory cd build-apache cp modules/soap.so ${RPM_BUILD_ROOT}%{_libdir64}/php/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/php/modules/soap.so # copy gd to php modules directory cp modules/gd.so ${RPM_BUILD_ROOT}%{_libdir64}/php/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/php/modules/gd.so cd .. #Copy pdo,mysql modules to php modules directory cd build-cgi for mod in pdo.so pdo_sqlite.so pdo_mysql.so mysqli.so mysqlnd.so curl.so bz2.so zlib.so exif.so mbstring.so zip.so do cp modules/$mod ${RPM_BUILD_ROOT}%{_libdir64}/php/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/php/modules/$mod done cd .. # for third-party packaging: mkdir -p ${RPM_BUILD_ROOT}%{_libdir64}/php/pear chmod 755 ${RPM_BUILD_ROOT}%{_libdir64}/php/pear mkdir -p ${RPM_BUILD_ROOT}/var/lib64/php chmod 755 ${RPM_BUILD_ROOT}/var/lib64/php mkdir -p ${RPM_BUILD_ROOT}/var/lib64/php/session chmod 700 ${RPM_BUILD_ROOT}/var/lib64/php/session cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir} cp %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/php-fpm.d ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done cd ${RPM_BUILD_ROOT}/%{_prefix}/sbin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) # install on 32bit mode export OBJECT_MODE=32 cd ../32bit # unfortunately 'make install-sapi' does not seem to work for use, therefore # we have to install the targets separately cd build-cgi for TARGET in install-cli install-build install-headers install-programs install-fpm; do make INSTALL_ROOT=${RPM_BUILD_ROOT} ${TARGET} done # install the php-cgi binary cp sapi/cgi/php-cgi ${RPM_BUILD_ROOT}%{_bindir} chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/php-cgi # install the DSO cd ../build-apache mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules cp .libs/libphp7.so ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/libphp7.so cd .. # strip binaries /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/php /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/php-cgi /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/php-fpm #/usr/bin/strip ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/libphp7.so # install the Apache httpd config file for PHP mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra chmod 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/httpd-php.conf # install the default configuration file and directories mkdir -p ${RPM_BUILD_ROOT}/etc cp %{SOURCE2} ${RPM_BUILD_ROOT}/etc/php.ini mkdir -p ${RPM_BUILD_ROOT}/etc/php.d #Generate .ini files for mod in gd pdo mysqli mysqlnd pdo_mysql pdo_sqlite curl bz2 zlib exif mbstring zip do case $mod in pdo_*|mysqli) # Extensions with dependencies on 20-* ini=30-${mod}.ini;; *) # Extensions with no dependency ini=20-${mod}.ini;; esac cat > $RPM_BUILD_ROOT/etc/php.d/${ini} < %{_prefix}/etc/httpd/conf/tmp_httpd.conf mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf %{_prefix}/etc/httpd/conf/httpd.conf cat %{_prefix}/etc/httpd/conf/httpd.conf_64 | \ grep -v "# PHP settings" | \ grep -v "Include conf/extra/httpd-php.conf_64" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" fi # remove some files to work with apache2 if [ -f %{_prefix}/sbin/httpd -a -d %{_prefix}/etc/httpd/conf ] then [ -f %{_prefix}/etc/httpd/conf/php.ini ] && rm -f %{_prefix}/etc/httpd/conf/php.ini grep -v "LoadModule php7_module" %{_prefix}/etc/httpd/conf/httpd.conf >%{_prefix}/etc/httpd/conf/httpd.conf.tmp [ -s %{_prefix}/etc/httpd/conf/httpd.conf.tmp ] && \ mv -f %{_prefix}/etc/httpd/conf/httpd.conf.tmp %{_prefix}/etc/httpd/conf/httpd.conf grep -v "LoadModule php7_module" %{_prefix}/etc/httpd/conf/httpd.conf_64 >%{_prefix}/etc/httpd/conf/httpd.conf.tmp_64 [ -s %{_prefix}/etc/httpd/conf/httpd.conf.tmp_64 ] && \ mv -f %{_prefix}/etc/httpd/conf/httpd.conf.tmp_64 %{_prefix}/etc/httpd/conf/httpd.conf_64 fi %post slibclean echo "" echo "This version of php has 32bit and 64bit support" echo "64bit php uses /etc/php64.ini" echo "" echo "This version of php is also built with fpm support. From httpd 2.4.39-2 onwards, http2 module is provided.\nInorder to use php with http2, make use of php-fpm instead of mod_php." echo "" if [ -f %{_prefix}/etc/httpd/conf/httpd.conf ] then cat %{_prefix}/etc/httpd/conf/httpd.conf | \ grep -v "# PHP settings" | \ grep -v "Include conf/extra/httpd-php.conf" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf %{_prefix}/etc/httpd/conf/httpd.conf fi if [ -f %{_prefix}/etc/httpd/conf/httpd.conf_64 ] then cat %{_prefix}/etc/httpd/conf/httpd.conf_64 | \ grep -v "# PHP settings" | \ grep -v "Include conf/extra/httpd-php.conf_64" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 %{_prefix}/etc/httpd/conf/httpd.conf_64 fi echo "extension=soap.so" >> /etc/php.ini echo "extension=soap.so" >> /etc/php64.ini echo "# PHP settings" >> %{_prefix}/etc/httpd/conf/httpd.conf echo "# PHP settings" >> %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Include conf/extra/httpd-php.conf" >> %{_prefix}/etc/httpd/conf/httpd.conf echo "Include conf/extra/httpd-php.conf_64" >> %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" %post fpm /usr/bin/cat %{_sysconfdir}/httpd/conf/httpd.conf | \ /usr/bin/sed -e "s|#LoadModule proxy_module /opt/freeware/lib/httpd/modules/mod_proxy.so|LoadModule proxy_module /opt/freeware/lib/httpd/modules/mod_proxy.so|" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf /usr/bin/mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf /usr/bin/cat %{_sysconfdir}/httpd/conf/httpd.conf | \ /usr/bin/sed -e "s|#LoadModule proxy_fcgi_module /opt/freeware/lib/httpd/modules/mod_proxy_fcgi.so|LoadModule proxy_fcgi_module /opt/freeware/lib/httpd/modules/mod_proxy_fcgi.so|" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf /usr/bin/mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf /usr/bin/cat %{_sysconfdir}/httpd/conf/httpd.conf_64 | \ /usr/bin/sed -e "s|#LoadModule proxy_module /opt/freeware/lib64/httpd/modules/mod_proxy.so|LoadModule proxy_module /opt/freeware/lib64/httpd/modules/mod_proxy.so|" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf_64 /usr/bin/mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf_64 %{_sysconfdir}/httpd/conf/httpd.conf_64 /usr/bin/cat %{_sysconfdir}/httpd/conf/httpd.conf_64 | \ /usr/bin/sed -e "s|#LoadModule proxy_fcgi_module /opt/freeware/lib64/httpd/modules/mod_proxy_fcgi.so|LoadModule proxy_fcgi_module /opt/freeware/lib64/httpd/modules/mod_proxy_fcgi.so|" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf_64 /usr/bin/mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf_64 %{_sysconfdir}/httpd/conf/httpd.conf_64 %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %{_prefix}/lib/httpd/modules/libphp7.so %{_prefix}/lib64/httpd/modules/libphp7.so %{_prefix}/lib/php/modules/soap.so %{_prefix}/lib64/php/modules/soap.so %attr(0770,root,nobody) %dir /var/lib/php/session %attr(0770,root,nobody) %dir /var/lib64/php/session %config(noreplace) %{_prefix}/etc/httpd/conf/extra/httpd-php.conf %config(noreplace) %{_prefix}/etc/httpd/conf/extra/httpd-php.conf_64 %config(noreplace) /etc/php.ini %config(noreplace) /etc/php64.ini %files gd %defattr(-,root,system) %config(noreplace) /etc/php.d/20-gd.ini %{_prefix}/lib/php/modules/gd.so %{_prefix}/lib64/php/modules/gd.so %files fpm %defattr(-,root,system) %config(noreplace) %{_prefix}/etc/php-fpm.conf* %config(noreplace) %{_prefix}/etc/php-fpm.d/* %{_sbindir}/* %files pdo %defattr(-,root,system) %config(noreplace) /etc/php.d/20-pdo.ini %config(noreplace) /etc/php.d/30-pdo_sqlite.ini %{_prefix}/lib/php/modules/pdo.so %{_prefix}/lib64/php/modules/pdo.so %{_prefix}/lib/php/modules/pdo_sqlite.so %{_prefix}/lib64/php/modules/pdo_sqlite.so %files mysqlnd %defattr(-,root,system) %config(noreplace) /etc/php.d/20-mysqlnd.ini %config(noreplace) /etc/php.d/30-mysqli.ini %config(noreplace) /etc/php.d/30-pdo_mysql.ini %{_prefix}/lib/php/modules/mysqlnd.so %{_prefix}/lib64/php/modules/mysqlnd.so %{_prefix}/lib/php/modules/mysqli.so %{_prefix}/lib64/php/modules/mysqli.so %{_prefix}/lib/php/modules/pdo_mysql.so %{_prefix}/lib64/php/modules/pdo_mysql.so %files common %defattr(-,root,system) %doc 32bit/CODING_STANDARDS.md 32bit/EXTENSIONS 32bit/LICENSE 32bit/NEWS 32bit/README* #%doc Zend/ZEND_* %dir /etc/php.d %dir %{_libdir}/php %dir %{_libdir64}/php %dir %{_libdir}/php/modules %dir %{_libdir64}/php/modules %dir /var/lib/php %dir /var/lib64/php %dir %{_libdir}/php/pear %dir %{_libdir64}/php/pear %{_libdir}/php/modules/curl.so %{_libdir}/php/modules/bz2.so %{_libdir}/php/modules/zlib.so %{_libdir}/php/modules/exif.so %{_libdir64}/php/modules/curl.so %{_libdir64}/php/modules/bz2.so %{_libdir64}/php/modules/zlib.so %{_libdir64}/php/modules/exif.so %config(noreplace) /etc/php.d/20-curl.ini %config(noreplace) /etc/php.d/20-bz2.ini %config(noreplace) /etc/php.d/20-zlib.ini %config(noreplace) /etc/php.d/20-exif.ini %files cli %defattr(-,root,system) %{_bindir}/php-cgi* %{_bindir}/phpize* %{_bindir}/php %{_bindir}/php_64 %{_mandir}/man1/php.1 %files devel %defattr(-,root,system) %dir %{_libdir}/php %dir %{_libdir64}/php %{_bindir}/php-config* %{_bindir}/phpize* %{_includedir}/php %{_libdir}/php/build %{_libdir64}/php/build %{_mandir}/man1/php-config.1 %{_mandir}/man1/phpize.1 %files mbstring %defattr(-,root,system) %{_libdir64}/php/modules/mbstring.so %{_libdir}/php/modules/mbstring.so %config(noreplace) /etc/php.d/20-mbstring.ini %files zip %defattr(-,root,system) %{_libdir}/php/modules/zip.so %{_libdir64}/php/modules/zip.so %config(noreplace) /etc/php.d/20-zip.ini %changelog * Wed Nov 16 2022 Reshma V Kumar 7.4.33-1 - Update to fix CVE-2022-31629,CVE-2022-31628,CVE-2022-31630,CVE-2022-37454 * Tue Jul 26 2022 Reshma V Kumar 7.4.30-1 - Update to fix CVE-2022-31625,CVE-2022-31626 - Build with zip support * Mon May 02 2022 Reshma V Kumar 7.4.28-1 - Update to fix CVE-2021-21708 * Tue Feb 08 2022 Reshma V Kumar 7.4.27-2 - Build with multibyte string support * Tue Jan 11 2022 Reshma V Kumar 7.4.27-1 - Update to fix CVE-2021-21707 * Wed Nov 17 2021 Reshma V Kumar 7.4.25-1 - Update to fix CVE-2021-21703 * Thu Sep 02 2021 Reshma V Kumar 7.4.22-1 - Update to fix CVE-2021-21705 - Build with exif support * Thu Jul 01 2021 Reshma V Kumar 7.4.13-2 - Build with zlib,curl and bz2 support * Thu Apr 29 2021 Reshma V Kumar 7.4.13-1 - Update to latest version * Wed Nov 11 2020 Reshma V Kumar 7.2.34-1 - Update to fix CVE-2020-7068,CVE-2020-7070 * Thu Aug 27 2020 Reshma V Kumar 7.2.32-1 - Update to fix CVE-2020-7067 CVE-2019-11048 - Stop shipping files in /usr directory * Fri May 08 2020 Reshma V Kumar 7.2.29-1 - Update to fix CVE-2020-7061,CVE-2020-7062,CVE-2020-7063 * Thu Feb 27 2020 Reshma V Kumar 7.2.27-1 - Update to fix CVE-2019-11045, CVE-2019-11050, CVE-2019-11044, CVE-2019-11047, CVE-2019-11046 - Build with mysql support * Wed Nov 27 2019 Reshma V Kumar 7.2.25-1 - Update to fix CVE-2019-11043 * Mon Sep 09 2019 Reshma V Kumar 7.2.19-2 - Rebuild with gd support * Tue Aug 13 2019 Reshma V Kumar 7.2.19-1 - Update to fix following CVEs - CVE-2019-11040 - CVE-2019-11039 - CVE-2019-11038 * Tue Jul 30 2019 Reshma V Kumar 7.2.18-2 - Rebuild with fpm support * Fri May 31 2019 Reshma V Kumar 7.2.18-1 - Update to fix CVE-2019-11035, CVE-2019-11034 * Mon Apr 29 2019 Reshma V Kumar 7.2.16-1 - Update to fix the following CVE - CVE-2019-9640 - CVE-2019-9024 - CVE-2019-9641 - CVE-2019-9025 - CVE-2019-9637 - CVE-2019-9639 - CVE-2019-9638 - This version has 64bit support as well * Wed Jan 16 2019 Reshma V Kumar 7.2.14-1 - Update to fix the following CVE - CVE-2018-19396 - CVE-2018-19395 - CVE-2018-19518 - CVE-2018-19935 * Tue Nov 13 2018 Reshma V Kumar 7.0.32-1 - Update to fix security vulnerabilities * Mon Oct 15 2018 Reshma V Kumar 7.0.31-2 - Rebuild with libiconv 1.14 rpm * Thu Aug 31 2018 Reshma V Kumar 7.0.31-1 - Update to fix security vulnerabilities * Wed Jun 6 2018 Nitish K Mishra 7.0.30-1 - Update to fix security vulnerabilities * Tue Apr 10 2018 Reshma V Kumar 7.0.27-1 - Update to fix security vulnerabilities * Thu Mar 08 2018 Reshma V Kumar 7.0.27-1 - Update to fix security vulnerabilities * Wed Aug 16 2017 Reshma V Kumar 7.0.21-1 - Update to fix CVE-2017-11628 * Thu Nov 25 2016 Nitish K Mishra 7.0.13-1 - Updated to 7.0.13 to enable soap with php * Thu Nov 03 2016 Nitish K Mishra 7.0.12-1 - Updated to 7.0.12 which fixes multiple security vulnerabilities. * Wed Aug 31 2016 Sangamesh Mallayya 7.0.10-1 - Update to 7.0.10 which fixes multiple security vulnerabilities. * Tue Jun 07 2016 Ayappan P 7.0.7-1 - Update to 7.0.7 version * Wed Mar 23 2016 Ayappan P 7.0.3-1 - Built with httpd-2.4.18 * Tue Nov 25 2014 Sangamesh Mallayya 5.3.11-4 - Built with httpd-2.4.7 * Fri May 11 2012 Gerard Visiedo 5.3.10-1 - Port on Aix61 * Fri Feb 17 2012 Michael Perzl - 5.3.10-1 - updated to version 5.3.10 * Wed Aug 24 2011 Michael Perzl - 5.3.8-1 - updated to version 5.3.8 * Tue Aug 23 2011 Michael Perzl - 5.3.7-1 - updated to version 5.3.7, added patch for php_crypt_r() * Tue Aug 23 2011 Michael Perzl - 5.3.6-2 - added "--enable-sockets" and "--with-mysqli=mysqlnd" to configure options * Wed May 18 2011 Michael Perzl - 5.3.6-1 - updated to version 5.3.6 * Wed May 18 2011 Michael Perzl - 5.3.5-2 - fixed wrong dependency on bzip2-devel of php-devel (needs bzip2 only) * Fri Jan 07 2011 Michael Perzl - 5.3.5-1 - updated to version 5.3.5 * Tue Dec 14 2010 Michael Perzl - 5.3.4-1 - updated to version 5.3.4 * Fri Jul 23 2010 Michael Perzl - 5.3.3-1 - updated to version 5.3.3 * Tue Apr 13 2010 Michael Perzl - 5.3.2-1 - updated to version 5.3.2 * Tue Mar 02 2010 Michael Perzl - 5.2.13-1 - updated to version 5.2.13 * Thu Feb 18 2010 Michael Perzl - 5.2.12-2 - enable fastcgi for the CLI version * Tue Jan 19 2010 Michael Perzl - 5.2.12-1 - updated to version 5.2.12 * Fri Nov 27 2009 Michael Perzl - 5.2.11-1 - updated to version 5.2.11 * Thu Nov 26 2008 Michael Perzl - 5.2.8-1 - updated to version 5.2.8 * Fri May 02 2008 Michael Perzl - 5.2.6-1 - updated to version 5.2.6 * Wed Apr 23 2008 Michael Perzl - 5.2.5-2 - some minor spec file fixes * Mon Dec 03 2007 Michael Perzl - 5.2.5-1 - first version for AIX V5.1 and higher