diff options
-rw-r--r-- | PHPINFO | 5 | ||||
-rw-r--r-- | REFLECTION | 43 | ||||
-rw-r--r-- | php-pecl-rpminfo.spec | 125 |
3 files changed, 98 insertions, 75 deletions
@@ -2,5 +2,6 @@ rpminfo rpminfo support => enabled -Extension version => 0.6.0 -RPM library version => 4.16.1.3 +Extension version => 1.1.0 +RPM library version => 4.18.1 +RPM stream wrapper => yes @@ -1,7 +1,7 @@ -Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { +Extension [ <persistent> extension #99 rpminfo version 1.1.0 ] { - - Constants [272] { - Constant [ string RPMVERSION ] { 4.16.1.3 } + - Constants [278] { + Constant [ string RPMVERSION ] { 4.18.1 } Constant [ int RPMSENSE_ANY ] { 0 } Constant [ int RPMSENSE_LESS ] { 2 } Constant [ int RPMSENSE_GREATER ] { 4 } @@ -31,6 +31,7 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { Constant [ int RPMMIRE_GLOB ] { 3 } Constant [ int RPMTAG_ARCH ] { 1022 } Constant [ int RPMTAG_ARCHIVESIZE ] { 1046 } + Constant [ int RPMTAG_ARCHSUFFIX ] { 5098 } Constant [ int RPMTAG_BASENAMES ] { 1117 } Constant [ int RPMTAG_BUGURL ] { 5012 } Constant [ int RPMTAG_BUILDARCHS ] { 1089 } @@ -233,6 +234,7 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_SOURCEPACKAGE ] { 1106 } Constant [ int RPMTAG_SOURCEPKGID ] { 1146 } Constant [ int RPMTAG_SOURCERPM ] { 1044 } + Constant [ int RPMTAG_SPEC ] { 5099 } Constant [ int RPMTAG_SUGGESTFLAGS ] { 5051 } Constant [ int RPMTAG_SUGGESTNAME ] { 5049 } Constant [ int RPMTAG_SUGGESTNEVRS ] { 5059 } @@ -254,6 +256,7 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_TRANSFILETRIGGERSCRIPTS ] { 5076 } Constant [ int RPMTAG_TRANSFILETRIGGERTYPE ] { 5089 } Constant [ int RPMTAG_TRANSFILETRIGGERVERSION ] { 5081 } + Constant [ int RPMTAG_TRANSLATIONURL ] { 5100 } Constant [ int RPMTAG_TRIGGERCONDS ] { 5005 } Constant [ int RPMTAG_TRIGGERFLAGS ] { 1068 } Constant [ int RPMTAG_TRIGGERINDEX ] { 1069 } @@ -263,6 +266,7 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_TRIGGERSCRIPTS ] { 1065 } Constant [ int RPMTAG_TRIGGERTYPE ] { 5006 } Constant [ int RPMTAG_TRIGGERVERSION ] { 1067 } + Constant [ int RPMTAG_UPSTREAMRELEASES ] { 5101 } Constant [ int RPMTAG_URL ] { 1020 } Constant [ int RPMTAG_V ] { 1001 } Constant [ int RPMTAG_VCS ] { 5034 } @@ -271,6 +275,8 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { Constant [ int RPMTAG_VERIFYSCRIPT ] { 1079 } Constant [ int RPMTAG_VERIFYSCRIPTFLAGS ] { 5026 } Constant [ int RPMTAG_VERIFYSCRIPTPROG ] { 1091 } + Constant [ int RPMTAG_VERITYSIGNATUREALGO ] { 277 } + Constant [ int RPMTAG_VERITYSIGNATURES ] { 276 } Constant [ int RPMTAG_VERSION ] { 1001 } Constant [ int RPMTAG_XPM ] { 1013 } } @@ -287,36 +293,45 @@ Extension [ <persistent> extension #98 rpminfo version 0.6.0 ] { - Parameters [2] { Parameter #0 [ <required> string $nevr ] - Parameter #1 [ <optional> bool $full ] + Parameter #1 [ <optional> bool $full = false ] } - - Return [ array or NULL ] + - Return [ ?array ] } Function [ <internal:rpminfo> function rpmdbsearch ] { - Parameters [4] { Parameter #0 [ <required> string $pattern ] - Parameter #1 [ <optional> int $rpmtag ] - Parameter #2 [ <optional> int $rpmmire ] - Parameter #3 [ <optional> bool $full ] + Parameter #1 [ <optional> int $rpmtag = RPMTAG_NAME ] + Parameter #2 [ <optional> int $rpmmire = -1 ] + Parameter #3 [ <optional> bool $full = false ] } - - Return [ array or NULL ] + - Return [ ?array ] } Function [ <internal:rpminfo> function rpminfo ] { - Parameters [3] { Parameter #0 [ <required> string $path ] - Parameter #1 [ <optional> bool $full ] - Parameter #2 [ <optional> string or NULL &$error ] + Parameter #1 [ <optional> bool $full = false ] + Parameter #2 [ <optional> ?string &$error = null ] } - - Return [ array or NULL ] + - Return [ ?array ] } Function [ <internal:rpminfo> function rpmvercmp ] { - - Parameters [2] { + - Parameters [3] { Parameter #0 [ <required> string $evr1 ] Parameter #1 [ <required> string $evr2 ] + Parameter #2 [ <optional> ?string $operator = null ] + } + - Return [ int|bool ] + } + Function [ <internal:rpminfo> function rpmgetsymlink ] { + + - Parameters [2] { + Parameter #0 [ <required> string $path ] + Parameter #1 [ <required> string $name ] } - - Return [ int ] + - Return [ ?string ] } } } diff --git a/php-pecl-rpminfo.spec b/php-pecl-rpminfo.spec index aeccbe4..2df4c20 100644 --- a/php-pecl-rpminfo.spec +++ b/php-pecl-rpminfo.spec @@ -1,64 +1,43 @@ # remirepo spec file for php-pecl-rpminfo # -# Copyright (c) 2018-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2018-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%bcond_without tests -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-rpminfo -%else -%global _root_prefix %{_prefix} -%endif -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global pecl_name rpminfo -%global ini_name 40-%{pecl_name}.ini +%{?scl:%scl_package php-pecl-rpminfo} + +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name rpminfo +%global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: RPM information -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 0.6.0 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} -License: PHP +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.1.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: pkgconfig(rpm) >= 4.11.3 -BuildRequires: %{?scl_prefix}php-devel >= 7.2 +BuildRequires: %{?scl_prefix}php-devel >= 8 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -78,9 +57,7 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_RPMINFO_VERSION/{s/.* "//;s/".*$//;p}' php_rpminfo.h) if test "x${extver}" != "x%{version}"; then @@ -89,9 +66,9 @@ if test "x${extver}" != "x%{version}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -104,25 +81,26 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --enable-rpminfo \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %{__php} --no-php-ini \ --define extension=modules/%{pecl_name}.so \ - --re %{pecl_name} >REFLECTION + --re %{pecl_name} >../%{sources}/REFLECTION %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-rpminfo \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -148,7 +126,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') REFLECTION -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -173,44 +151,48 @@ fi %check -%if 0%{?fedora} < 33 && 0%{?rhel} < 9 -# mock install sqlite db, rpm expect db6 format -rm ?TS/tests/007-rpmdbinfo.phpt -rm ?TS/tests/008-rpmdbsearch.phpt -rm ?TS/tests/013-rpmdbsearch-error.phpt +cd %{sources} +%if 0%{?fedora} < 37 && 0%{?rhel} < 10 +# OLD mock install sqlite db, rpm expect db6 format +# NEW mock install in /usr/lib/sysimage/rpm instead of /var/lib/rpm +rm tests/007-rpmdbinfo.phpt +rm tests/008-rpmdbsearch.phpt +rm tests/013-rpmdbsearch-error.phpt %endif -cd NTS # Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} # Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php --show-diff %{?_smp_mflags} +%endif %if %{with_zts} -cd ../ZTS # Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} # Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php --show-diff %{?_smp_mflags} +%endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -224,6 +206,31 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Nov 10 2023 Remi Collet <remi@remirepo.net> - 1.1.0-1 +- update to 1.1.0 + +* Fri Oct 13 2023 Remi Collet <remi@remirepo.net> - 1.0.1-1 +- update to 1.0.1 + +* Thu Oct 12 2023 Remi Collet <remi@remirepo.net> - 1.0.0-1 +- update to 1.0.0 + +* Tue Sep 26 2023 Remi Collet <remi@remirepo.net> - 0.7.0-1 +- update to 0.7.0 +- drop support for PHP 7 + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 0.6.0-7 +- rebuild for PHP 8.3.0RC1 + +* Tue Jun 6 2023 Remi Collet <remi@remirepo.net> - 0.6.0-6 +- build out of sources tree + +* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 0.6.0-5 +- rebuild for PHP 8.2.0RC1 + +* Thu Feb 10 2022 Remi Collet <remi@remirepo.net> - 0.6.0-4 +- also ignore tests on F36 after database relocation + * Tue Sep 28 2021 Remi Collet <remi@remirepo.net> - 0.6.0-3 - add REFLECTION file to package documentation |