summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php74.spec66
1 files changed, 35 insertions, 31 deletions
diff --git a/php74.spec b/php74.spec
index c187f41..e5bbb72 100644
--- a/php74.spec
+++ b/php74.spec
@@ -24,7 +24,7 @@
%global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock)
-%global oraclever 21.6
+%global oraclever 21.7
%global oraclelib 21.1
# Build for LiteSpeed Web Server (LSAPI)
@@ -50,10 +50,10 @@
%global with_firebird 1
# Build ZTS extension or only NTS
-%global with_zts 1
+%bcond_without zts
# Debuild build
-%global with_debug %{?_with_debug:1}%{!?_with_debug:0}
+%bcond_with debug
%if 0%{?__isa_bits:1}
%global isasuffix -%{__isa_bits}
@@ -96,7 +96,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -216,7 +216,7 @@ Obsoletes: mod_php74, mod_php74w
%endif
# Avoid obsoleting php54 from RHSCL
Obsoletes: php54 > 5.4
-%if %{with_zts}
+%if %{with zts}
Obsoletes: php-zts < 5.3.7
Provides: php-zts = %{version}-%{release}
Provides: php-zts%{?_isa} = %{version}-%{release}
@@ -304,7 +304,6 @@ Summary: PHP FastCGI Process Manager
BuildRequires: libacl-devel
BuildRequires: pkgconfig(libsystemd) >= 209
Requires: php-common%{?_isa} = %{version}-%{release}
-Requires(pre): /usr/sbin/useradd
%{?systemd_requires}
# This is actually needed for the %%triggerun script but Requires(triggerun)
# is not valid. We can use %%post because this particular %%triggerun script
@@ -318,6 +317,8 @@ Requires(pre): httpd-filesystem
Requires: httpd-filesystem >= 2.4.10
# php engine for Apache httpd webserver
Provides: php(httpd)
+%else
+Requires(pre): /usr/sbin/useradd
%endif
%if %{with_nginx}
# for /etc/nginx ownership
@@ -435,7 +436,7 @@ Requires: zlib-devel%{?_isa}
Obsoletes: php-pecl-pdo-devel
Obsoletes: php-pecl-json-devel < %{version}
Obsoletes: php-pecl-jsonc-devel < %{version}
-%if %{with_zts}
+%if %{with zts}
Provides: php-zts-devel = %{version}-%{release}
Provides: php-zts-devel%{?_isa} = %{version}-%{release}
%endif
@@ -996,9 +997,9 @@ Group: System Environment/Libraries
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
-BuildRequires: pkgconfig(icu-i18n) >= 69
-BuildRequires: pkgconfig(icu-io) >= 69
-BuildRequires: pkgconfig(icu-uc) >= 69
+BuildRequires: pkgconfig(icu-i18n) >= 71
+BuildRequires: pkgconfig(icu-io) >= 71
+BuildRequires: pkgconfig(icu-uc) >= 71
%if 0%{?rhel}
Obsoletes: php53-intl, php53u-intl, php54-intl, php54w-intl, php55u-intl, php55w-intl, php56u-intl, php56w-intl
Obsoletes: php70u-intl, php70w-intl, php71u-intl, php71w-intl, php72u-intl, php72w-intl
@@ -1127,7 +1128,7 @@ in pure PHP.
%prep
%{?gpgverify:%{gpgverify} --keyring='%{SOURCE20}' --signature='%{SOURCE21}' --data='%{SOURCE0}'}
-: CIBLE = %{name}-%{version}-%{release} oci8=%{with_oci8} libzip=%{with_libzip}
+: CIBLE = %{name}-%{version}-%{release} oci8=%{with_oci8} libzip=%{with_libzip} zts=%{with zts} debug=%{with debug}
%setup -q -n php-%{upver}%{?rcver}
@@ -1176,7 +1177,7 @@ cp ext/date/lib/LICENSE.rst timelib_LICENSE
# Multiple builds for multiple SAPIs
mkdir build-cgi build-apache build-embedded \
-%if %{with_zts}
+%if %{with zts}
build-zts build-ztscli \
%endif
build-fpm
@@ -1306,7 +1307,7 @@ cat $(aclocal --print-ac-dir)/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.
# Regenerate configure scripts (patches change config.m4's)
touch configure.ac
./buildconf --force
-%if %{with_debug}
+%if %{with debug}
LDFLAGS="-fsanitize=address"
export LDFLAGS
CFLAGS=$(echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign -fsanitize=address -ggdb | sed 's/-mstackrealign//')
@@ -1371,7 +1372,7 @@ ln -sf ../configure
%if %{with_dtrace}
--enable-dtrace \
%endif
-%if %{with_debug}
+%if %{with debug}
--enable-debug \
%endif
$*
@@ -1519,7 +1520,7 @@ build --enable-embed \
${without_shared}
popd
-%if %{with_zts}
+%if %{with zts}
# Build a special thread-safe (mainly for modules)
pushd build-ztscli
@@ -1660,7 +1661,7 @@ unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
%install
%{?dtsenable}
-%if %{with_zts}
+%if %{with zts}
# Install the extensions for the ZTS version
make -C build-ztscli install \
INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -1692,7 +1693,7 @@ install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/php/preload
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_moddir}
install -m 755 build-apache/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp7.so
-%if %{with_zts}
+%if %{with zts}
# install the ZTS DSO
install -m 755 build-zts/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp7-zts.so
%endif
@@ -1700,7 +1701,7 @@ install -m 755 build-zts/libs/libphp7.so $RPM_BUILD_ROOT%{_httpd_moddir}/libphp7
# Apache config fragment
# Dual config file with httpd >= 2.4 (fedora >= 18)
install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
-%if %{with_zts} && 0%{?fedora} < 27 && 0%{?rhel} < 8
+%if %{with zts} && 0%{?fedora} < 27 && 0%{?rhel} < 8
cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_modconfdir}/15-php.conf
%endif
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/php.conf
@@ -1721,7 +1722,7 @@ EOF
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
-%if %{with_zts}
+%if %{with zts}
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d
%endif
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php
@@ -1846,7 +1847,7 @@ do
# some extensions have their own config file
if [ -f ${ini} ]; then
cp -p ${ini} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${ini}
- %if %{with_zts}
+ %if %{with zts}
cp -p ${ini} $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/${ini}
%endif
else
@@ -1854,7 +1855,7 @@ do
; Enable ${mod} extension module
extension=${mod}
EOF
-%if %{with_zts}
+%if %{with zts}
cat > $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/${ini} <<EOF
; Enable ${mod} extension module
extension=${mod}
@@ -1864,7 +1865,7 @@ EOF
cat > files.${mod} <<EOF
%{_libdir}/php/modules/${mod}.so
%config(noreplace) %{_sysconfdir}/php.d/${ini}
-%if %{with_zts}
+%if %{with zts}
%{_libdir}/php-zts/modules/${mod}.so
%config(noreplace) %{_sysconfdir}/php-zts.d/${ini}
%endif
@@ -1903,7 +1904,7 @@ cat files.curl files.phar files.fileinfo \
# The default Zend OPcache blacklist file
install -m 644 %{SOURCE51} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/opcache-default.blacklist
-%if %{with_zts}
+%if %{with zts}
install -m 644 %{SOURCE51} $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/opcache-default.blacklist
sed -e '/blacklist_filename/s/php.d/php-zts.d/' \
-i $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d/10-opcache.ini
@@ -1914,7 +1915,7 @@ sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \
-e "s/@PHP_ZENDVER@/%{zendver}-%{__isa_bits}/" \
-e "s/@PHP_PDOVER@/%{pdover}-%{__isa_bits}/" \
-e "s/@PHP_VERSION@/%{upver}/" \
-%if ! %{with_zts}
+%if ! %{with zts}
-e "/zts/d" \
%endif
< %{SOURCE3} > macros.php
@@ -2001,7 +2002,7 @@ fi
%files
%{_httpd_moddir}/libphp7.so
-%if %{with_zts}
+%if %{with zts}
%{_httpd_moddir}/libphp7-zts.so
%endif
%attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session
@@ -2020,7 +2021,7 @@ fi
%dir %{_sysconfdir}/php.d
%dir %{_libdir}/php
%dir %{_libdir}/php/modules
-%if %{with_zts}
+%if %{with zts}
%dir %{_sysconfdir}/php-zts.d
%dir %{_libdir}/php-zts
%dir %{_libdir}/php-zts/modules
@@ -2046,7 +2047,7 @@ fi
%{_mandir}/man1/phar.1*
%{_mandir}/man1/phar.phar.1*
%{_mandir}/man1/phpize.1*
-%if %{with_zts}
+%if %{with zts}
%{_bindir}/zts-php
%{_mandir}/man1/zts-php.1*
%{_mandir}/man1/zts-phpize.1*
@@ -2055,7 +2056,7 @@ fi
%files dbg
%{_bindir}/phpdbg
%{_mandir}/man1/phpdbg.1*
-%if %{with_zts}
+%if %{with zts}
%{_bindir}/zts-phpdbg
%{_mandir}/man1/zts-phpdbg.1*
%endif
@@ -2106,14 +2107,14 @@ fi
%{_bindir}/php-config
%{_includedir}/php
%{_libdir}/php/build
-%if %{with_zts}
+%if %{with zts}
%{_bindir}/zts-php-config
%{_includedir}/php-zts
%{_bindir}/zts-phpize
%{_libdir}/php-zts/build
+%{_mandir}/man1/zts-php-config.1*
%endif
%{_mandir}/man1/php-config.1*
-%{_mandir}/man1/zts-php-config.1*
%{macrosdir}/macros.php
%files embedded
@@ -2148,7 +2149,7 @@ fi
%files mysqlnd -f files.mysqlnd
%files opcache -f files.opcache
%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist
-%if %{with_zts}
+%if %{with zts}
%config(noreplace) %{_sysconfdir}/php-zts.d/opcache-default.blacklist
%endif
%if %{with_oci8}
@@ -2164,6 +2165,9 @@ fi
%changelog
+* Wed Jul 27 2022 Remi Collet <remi@remirepo.net> - 7.4.30-2
+- use bcond for zts and debug
+
* Tue Jun 7 2022 Remi Collet <remi@remirepo.net> - 7.4.30-1
- Update to 7.4.30 - http://www.php.net/releases/7_4_30.php
- use oracle client library version 21.6