diff --git a/php.spec b/php.spec index 31f0920a57abfc394518d0deab3a5421d6c85c8b..8f3a3e55d80d4f916eb37b899d8fe8aab7124ef9 100644 --- a/php.spec +++ b/php.spec @@ -66,7 +66,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver} -Release: 2 +Release: 3 # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -99,6 +99,9 @@ Source53: 20-ffi.ini Source1001: composer.prov Source1002: composer.attr +# Source for downstream rpm dependencies +Source2001: phpapi.attr + # Build fixes Patch1: php-8.4.0-httpd.patch Patch5: php-8.5.0-includedir.patch @@ -1444,6 +1447,9 @@ sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \ install -m 644 -D macros.php \ $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.php +install -m 644 -D %{S:2001} \ + $RPM_BUILD_ROOT%{_fileattrsdir}/phpapi.attr + # Remove unpackaged files rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \ $RPM_BUILD_ROOT%{_libdir}/php-zts/modules/*.a \ @@ -1562,6 +1568,7 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %{_libdir}/php-zts/build %endif %{_rpmmacrodir}/macros.php +%{_fileattrsdir}/phpapi.attr %files embedded %{_libdir}/libphp.so @@ -1607,6 +1614,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %{_fileattrsdir}/composer.attr %changelog +* Sun Nov 30 2025 Funda Wang - 8.5.0-3 +- add phpapi.attr for generating php(api) dependency automatically + * Sat Nov 22 2025 Funda Wang - 8.5.0-2 - Fix GH-20528 regression breaks mysql connexion using an IPv6 address enclosed in square brackets (upstream patch) diff --git a/phpapi.attr b/phpapi.attr new file mode 100644 index 0000000000000000000000000000000000000000..0415cb60418221d26fe4d65e3408eede87645ced --- /dev/null +++ b/phpapi.attr @@ -0,0 +1,4 @@ +%__phpapi_path ^%{_libdir}/php.*/modules/.*so$ +%__phpapi_requires() %{lua: + print(string.format("php(api) = %s", rpm.expand("%php_core_api"), rpm.expand("%1"))) +}