From 6c310bb282f166e50d0bddd39ee0a0e79b223952 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Jan 2023 15:40:14 +0100 Subject: rebuild using remi-librdkafka 2.0.1 --- PHPINFO | 6 ++-- REFLECTION | 18 ++++++---- php-pecl-simple-kafka-client.spec | 74 +++++++++++++++++++++++++-------------- 3 files changed, 62 insertions(+), 36 deletions(-) diff --git a/PHPINFO b/PHPINFO index a732c3e..4529be7 100644 --- a/PHPINFO +++ b/PHPINFO @@ -3,6 +3,6 @@ simple_kafka_client kafka support => enabled version => 0.1.4 -build date => Sep 1 2021 00:00:00 -librdkafka version (runtime) => 1.9.0 -librdkafka version (build) => 1.9.0.255 +build date => Jan 19 2023 00:00:00 +librdkafka version (runtime) => 2.0.0 +librdkafka version (build) => 2.0.0.255 diff --git a/REFLECTION b/REFLECTION index d20ca67..159c17d 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #118 simple_kafka_client version 0.1.4 ] { +Extension [ extension #120 simple_kafka_client version 0.1.4 ] { - Constants [177] { Constant [ int RD_KAFKA_OFFSET_BEGINNING ] { -2 } @@ -9,8 +9,8 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { Constant [ int RD_KAFKA_PURGE_F_QUEUE ] { 1 } Constant [ int RD_KAFKA_PURGE_F_INFLIGHT ] { 2 } Constant [ int RD_KAFKA_PURGE_F_NON_BLOCKING ] { 4 } - Constant [ int RD_KAFKA_VERSION ] { 17367295 } - Constant [ int RD_KAFKA_BUILD_VERSION ] { 17367295 } + Constant [ int RD_KAFKA_VERSION ] { 33554687 } + Constant [ int RD_KAFKA_BUILD_VERSION ] { 33554687 } Constant [ int RD_KAFKA_RESP_ERR__BEGIN ] { -200 } Constant [ int RD_KAFKA_RESP_ERR__BAD_MSG ] { -199 } Constant [ int RD_KAFKA_RESP_ERR__BAD_COMPRESSION ] { -198 } @@ -718,8 +718,8 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Properties [4] { Property [ protected $message = '' ] Property [ protected $code = 0 ] - Property [ protected $file = NULL ] - Property [ protected $line = NULL ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { @@ -736,6 +736,7 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Parameters [0] { } + - Tentative return [ void ] } Method [ final public method getMessage ] { @@ -809,8 +810,8 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Properties [8] { Property [ protected $message = '' ] Property [ protected $code = 0 ] - Property [ protected $file = NULL ] - Property [ protected $line = NULL ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] Property [ private $error_string = NULL ] Property [ private $isFatal = false ] Property [ private $isRetriable = false ] @@ -862,6 +863,7 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Parameters [0] { } + - Tentative return [ void ] } Method [ final public method getMessage ] { @@ -1160,6 +1162,7 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Parameters [0] { } + - Tentative return [ mixed ] } Method [ public method key ] { @@ -1173,6 +1176,7 @@ Extension [ extension #118 simple_kafka_client version 0.1.4 ] { - Parameters [0] { } + - Tentative return [ void ] } Method [ public method valid ] { diff --git a/php-pecl-simple-kafka-client.spec b/php-pecl-simple-kafka-client.spec index 095ee39..e525efd 100644 --- a/php-pecl-simple-kafka-client.spec +++ b/php-pecl-simple-kafka-client.spec @@ -1,14 +1,27 @@ # remirepo/fedora spec file for php-pecl-simple-kafka-client # -# Copyright (c) 2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2021-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # + +# use library installed in /opt +%bcond_without move_to_opt + %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-rdkafka +%scl_package php-pecl-simple-kafka-client +%endif + +%if %{with move_to_opt} +# Disable RPATH check +%global __arch_install_post /bin/true +%global __brp_check_rpaths /bin/true + +%global buildver %(PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) +%else +%global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -16,49 +29,40 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %global ini_name 40-%{pecl_name}.ini -%global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) Summary: Kafka client based on librdkafka -Name: %{?sub_prefix}php-pecl-simple-kafka-client +Name: %{?scl_prefix}php-pecl-simple-kafka-client Version: 0.1.4 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} -License: BSD +Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +License: BSD-3-Clause URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: librdkafka1php-devel >= 1.7 + +%if %{with move_to_opt} +BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2 +Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver} +%else +BuildRequires: librdkafka-devel >= 1.4 +%endif BuildRequires: %{?scl_prefix}php-devel >= 7.3 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}} -Requires: librdkafka1php%{?_isa} >= %{buildver} 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 -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%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 +%if %{with move_to_opt} +%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$} %endif +%{?filter_setup} %description @@ -100,11 +104,21 @@ EOF %build %{?dtsenable} +%if %{with move_to_opt} +# not yet used +export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig +%endif + cd NTS %{_bindir}/phpize %configure \ --with-php-config=%{_bindir}/php-config \ + --with-libdir=%{_lib} \ +%if %{with move_to_opt} + --with-simple-kafka-client=/opt/%{?vendeur:%{vendeur}/}librdkafka +%else --with-simple-kafka-client +%endif make %{?_smp_mflags} %if %{with_zts} @@ -112,7 +126,12 @@ cd ../ZTS %{_bindir}/zts-phpize %configure \ --with-php-config=%{_bindir}/zts-php-config \ + --with-libdir=%{_lib} \ +%if %{with move_to_opt} + --with-simple-kafka-client=/opt/%{?vendeur:%{vendeur}/}librdkafka +%else --with-simple-kafka-client +%endif make %{?_smp_mflags} %endif @@ -197,6 +216,9 @@ cd ../ZTS %changelog +* Thu Jan 19 2023 Remi Collet - 0.1.4-4 +- rebuild using remi-librdkafka 2.0.1 + * Wed Sep 01 2021 Remi Collet - 0.1.4-3 - rebuild for 8.1.0RC1 -- cgit