summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION30
-rw-r--r--php-pecl-rpminfo.spec162
3 files changed, 106 insertions, 93 deletions
diff --git a/PHPINFO b/PHPINFO
index 6dbdd2f..8008be9 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,8 @@
rpminfo
rpminfo support => enabled
-Extension version => 0.6.0
-RPM library version => 4.17.0
+Extension version => 1.1.1
+Author => Remi Collet
+License => PHP-3.01
+RPM library version => 4.19.1.1
+RPM stream wrapper => yes
diff --git a/REFLECTION b/REFLECTION
index 492085f..a216d7d 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,7 +1,7 @@
-Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] {
+Extension [ <persistent> extension #91 rpminfo version 1.1.1 ] {
- - Constants [274] {
- Constant [ string RPMVERSION ] { 4.17.0 }
+ - Constants [285] {
+ Constant [ string RPMVERSION ] { 4.19.1.1 }
Constant [ int RPMSENSE_ANY ] { 0 }
Constant [ int RPMSENSE_LESS ] { 2 }
Constant [ int RPMSENSE_GREATER ] { 4 }
@@ -31,6 +31,7 @@ Extension [ <persistent> extension #97 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 }
@@ -190,6 +191,9 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] {
Constant [ int RPMTAG_POSTUN ] { 1026 }
Constant [ int RPMTAG_POSTUNFLAGS ] { 5023 }
Constant [ int RPMTAG_POSTUNPROG ] { 1088 }
+ Constant [ int RPMTAG_POSTUNTRANS ] { 5104 }
+ Constant [ int RPMTAG_POSTUNTRANSFLAGS ] { 5108 }
+ Constant [ int RPMTAG_POSTUNTRANSPROG ] { 5106 }
Constant [ int RPMTAG_PREFIXES ] { 1098 }
Constant [ int RPMTAG_PREIN ] { 1023 }
Constant [ int RPMTAG_PREINFLAGS ] { 5020 }
@@ -200,6 +204,9 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] {
Constant [ int RPMTAG_PREUN ] { 1025 }
Constant [ int RPMTAG_PREUNFLAGS ] { 5022 }
Constant [ int RPMTAG_PREUNPROG ] { 1087 }
+ Constant [ int RPMTAG_PREUNTRANS ] { 5103 }
+ Constant [ int RPMTAG_PREUNTRANSFLAGS ] { 5107 }
+ Constant [ int RPMTAG_PREUNTRANSPROG ] { 5105 }
Constant [ int RPMTAG_PROVIDEFLAGS ] { 1112 }
Constant [ int RPMTAG_PROVIDENAME ] { 1047 }
Constant [ int RPMTAG_PROVIDENEVRS ] { 5042 }
@@ -233,6 +240,7 @@ Extension [ <persistent> extension #97 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 }
@@ -244,6 +252,7 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] {
Constant [ int RPMTAG_SUPPLEMENTNEVRS ] { 5060 }
Constant [ int RPMTAG_SUPPLEMENTS ] { 5052 }
Constant [ int RPMTAG_SUPPLEMENTVERSION ] { 5053 }
+ Constant [ int RPMTAG_SYSUSERS ] { 5109 }
Constant [ int RPMTAG_TRANSFILETRIGGERCONDS ] { 5088 }
Constant [ int RPMTAG_TRANSFILETRIGGERFLAGS ] { 5082 }
Constant [ int RPMTAG_TRANSFILETRIGGERINDEX ] { 5080 }
@@ -254,6 +263,7 @@ Extension [ <persistent> extension #97 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 +273,7 @@ Extension [ <persistent> extension #97 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 }
@@ -314,11 +325,20 @@ Extension [ <persistent> extension #97 rpminfo version 0.6.0 ] {
}
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 a571d7f..c4353f5 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-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2018-2024 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: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-License: PHP
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.1.1
+Release: 2%{?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: pkgconfig(rpm) >= 4.13
+BuildRequires: %{?scl_prefix}php-devel >= 8.0
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
@@ -75,12 +54,10 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -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,34 +81,37 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
+
+cd ../NTS
%configure \
--enable-rpminfo \
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
-make %{?_smp_mflags}
+ --with-php-config=%{__phpconfig}
+
+%make_build
%{__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
-make %{?_smp_mflags}
+ --with-php-config=%{__ztsphpconfig}
+
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS \
- install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -140,78 +120,60 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
-make -C ZTS \
- install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# 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
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
-%if 0%{?fedora} < 33 && 0%{?rhel} < 9 || 0%{?fedora} >= 36
+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 ?TS/tests/007-rpmdbinfo.phpt
-rm ?TS/tests/008-rpmdbsearch.phpt
-rm ?TS/tests/013-rpmdbsearch-error.phpt
+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}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -225,6 +187,34 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Sep 24 2024 Remi Collet <remi@remirepo.net> - 1.1.1-2
+- rebuild for 8.4.0RC1
+
+* Tue Sep 3 2024 Remi Collet <remi@remirepo.net> - 1.1.1-1
+- update to 1.1.1
+
+* 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