From 8ffc39741e677b84f0a926430689b1782cc61fb7 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 30 Nov 2025 23:53:31 +0800 Subject: [PATCH] add phpapi.attr for generating php(api) dependency automatically --- php.spec | 12 +++++++++++- phpapi.attr | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 phpapi.attr diff --git a/php.spec b/php.spec index 31f0920..8f3a3e5 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 0000000..0415cb6 --- /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"))) +} -- Gitee