summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-21 16:34:02 +0200
committerRemi Collet <remi@php.net>2026-04-21 16:34:02 +0200
commitefb9cb516d676d876f5ed4f31709c1892e9cf022 (patch)
tree3a5816a3b43e284df6eb6cab6a524c9584f52a2f
parentbbd6e06d3440e42f03d5bb8875013a166a03a3f5 (diff)
drop pear/pecl dependencyHEADmaster
sources from github
-rw-r--r--0001-remove-report_memleaks-deprecated-in-8.5.patch25
-rw-r--r--REFLECTION50
-rw-r--r--php-pecl-yar.spec114
3 files changed, 102 insertions, 87 deletions
diff --git a/0001-remove-report_memleaks-deprecated-in-8.5.patch b/0001-remove-report_memleaks-deprecated-in-8.5.patch
new file mode 100644
index 0000000..3376d1f
--- /dev/null
+++ b/0001-remove-report_memleaks-deprecated-in-8.5.patch
@@ -0,0 +1,25 @@
+From 05ca9d7ec5ab36e0d92ce65cd2a4875a4378dacd Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 4 Sep 2025 11:21:43 +0200
+Subject: [PATCH] remove report_memleaks deprecated in 8.5
+
+---
+ tests/042.phpt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/042.phpt b/tests/042.phpt
+index 009076e..eb8fbd7 100644
+--- a/tests/042.phpt
++++ b/tests/042.phpt
+@@ -6,8 +6,6 @@ if (!extension_loaded("yar")) {
+ print "skip";
+ }
+ ?>
+---INI--
+-report_memleaks=0
+ --FILE--
+ <?php
+ include "yar.inc";
+--
+2.51.0
+
diff --git a/REFLECTION b/REFLECTION
index 12d0ab5..16b6daa 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #140 yar version 2.3.4 ] {
+Extension [ <persistent> extension #152 yar version 2.3.4 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -27,30 +27,30 @@ Extension [ <persistent> extension #140 yar version 2.3.4 ] {
}
- Constants [24] {
- Constant [ string YAR_VERSION ] { 2.3.4 }
- Constant [ int YAR_HAS_MSGPACK ] { 1 }
- Constant [ int YAR_OPT_PACKAGER ] { 0 }
- Constant [ int YAR_OPT_PERSISTENT ] { 1 }
- Constant [ int YAR_OPT_TIMEOUT ] { 2 }
- Constant [ int YAR_OPT_CONNECT_TIMEOUT ] { 3 }
- Constant [ int YAR_OPT_HEADER ] { 4 }
- Constant [ int YAR_OPT_RESOLVE ] { 5 }
- Constant [ int YAR_OPT_PROXY ] { 6 }
- Constant [ int YAR_OPT_PROVIDER ] { 8 }
- Constant [ int YAR_OPT_TOKEN ] { 7 }
- Constant [ int YAR_CLIENT_PROTOCOL_HTTP ] { 1 }
- Constant [ int YAR_CLIENT_PROTOCOL_TCP ] { 2 }
- Constant [ int YAR_CLIENT_PROTOCOL_UNIX ] { 4 }
- Constant [ string YAR_PACKAGER_PHP ] { PHP }
- Constant [ string YAR_PACKAGER_JSON ] { JSON }
- Constant [ string YAR_PACKAGER_MSGPACK ] { MSGPACK }
- Constant [ int YAR_ERR_OKEY ] { 0 }
- Constant [ int YAR_ERR_OUTPUT ] { 8 }
- Constant [ int YAR_ERR_TRANSPORT ] { 16 }
- Constant [ int YAR_ERR_REQUEST ] { 4 }
- Constant [ int YAR_ERR_PROTOCOL ] { 2 }
- Constant [ int YAR_ERR_PACKAGER ] { 1 }
- Constant [ int YAR_ERR_EXCEPTION ] { 64 }
+ Constant [ <persistent> string YAR_VERSION ] { 2.3.4 }
+ Constant [ <persistent> int YAR_HAS_MSGPACK ] { 1 }
+ Constant [ <persistent> int YAR_OPT_PACKAGER ] { 0 }
+ Constant [ <persistent> int YAR_OPT_PERSISTENT ] { 1 }
+ Constant [ <persistent> int YAR_OPT_TIMEOUT ] { 2 }
+ Constant [ <persistent> int YAR_OPT_CONNECT_TIMEOUT ] { 3 }
+ Constant [ <persistent> int YAR_OPT_HEADER ] { 4 }
+ Constant [ <persistent> int YAR_OPT_RESOLVE ] { 5 }
+ Constant [ <persistent> int YAR_OPT_PROXY ] { 6 }
+ Constant [ <persistent> int YAR_OPT_PROVIDER ] { 8 }
+ Constant [ <persistent> int YAR_OPT_TOKEN ] { 7 }
+ Constant [ <persistent> int YAR_CLIENT_PROTOCOL_HTTP ] { 1 }
+ Constant [ <persistent> int YAR_CLIENT_PROTOCOL_TCP ] { 2 }
+ Constant [ <persistent> int YAR_CLIENT_PROTOCOL_UNIX ] { 4 }
+ Constant [ <persistent> string YAR_PACKAGER_PHP ] { PHP }
+ Constant [ <persistent> string YAR_PACKAGER_JSON ] { JSON }
+ Constant [ <persistent> string YAR_PACKAGER_MSGPACK ] { MSGPACK }
+ Constant [ <persistent> int YAR_ERR_OKEY ] { 0 }
+ Constant [ <persistent> int YAR_ERR_OUTPUT ] { 8 }
+ Constant [ <persistent> int YAR_ERR_TRANSPORT ] { 16 }
+ Constant [ <persistent> int YAR_ERR_REQUEST ] { 4 }
+ Constant [ <persistent> int YAR_ERR_PROTOCOL ] { 2 }
+ Constant [ <persistent> int YAR_ERR_PACKAGER ] { 1 }
+ Constant [ <persistent> int YAR_ERR_EXCEPTION ] { 64 }
}
- Classes [12] {
diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec
index 00a366d..c42665e 100644
--- a/php-pecl-yar.spec
+++ b/php-pecl-yar.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-yar
#
-# SPDX-FileCopyrightText: Copyright 2013-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2013-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -10,34 +10,33 @@
%bcond_without tests
-%global gh_commit 0e04a6a92347f7e95c9ddf8bbbad36b6286ed87f
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner laruence
-%global gh_project yar
-#global gh_date 20150914
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name yar
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
# After 40-json, 40-msgpack
%global ini_name 50-%{pecl_name}.ini
+%global _configure ../configure
+
+# Github forge
+%global gh_vend laruence
+%global gh_proj %{pecl_name}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
-Summary: Light, concurrent RPC framework
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 2.3.4
-%if 0%{?gh_date:1}
-Release: 0.14.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-%endif
+Summary: Light, concurrent RPC framework
License: PHP-3.01
-URL: https://pecl.php.net/package/%{pecl_name}
+Version: 2.3.4
+Release: 3%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
+
+Patch0: 0001-remove-report_memleaks-deprecated-in-8.5.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: make
BuildRequires: curl-devel
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
@@ -47,11 +46,13 @@ Requires: %{?scl_prefix}php-curl%{?_isa}
Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-pecl(msgpack)%{?_isa}
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-
+# No PIE for now
%description
Yar (Yet another RPC framework) is a light, concurrent RPC framework,
@@ -61,36 +62,22 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -qc
-%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version} NTS
-%endif
+%forgesetup
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
+%patch -P0 -p1
-cd NTS
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YAR_VERSION/{s/.* "//;s/".*$//;p}' php_yar.h)
-if test "x${extver}" != "x%{version}%{?prever:-%{prever}}%{?gh_date:-dev}"; then
- : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}%{?gh_date:-dev}.
+if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
exit 1
fi
-cd ..
sed -e 's:tools/yar_debug.inc:yar_debug.inc:' \
-e 's:tools/yar_debug.php:yar_debug:' \
-i package.xml
-%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
-%endif
+mkdir NTS ZTS
# Create configuration file
cat > %{ini_name} << 'EOF'
@@ -110,49 +97,46 @@ EOF
%build
%{?dtsenable}
-cd NTS
%{_bindir}/phpize
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+
+cd NTS
%configure \
--enable-msgpack \
--with-php-config=%{_bindir}/php-config
-make %{?_smp_mflags}
+%make_build
+
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--enable-msgpack \
--with-php-config=%{_bindir}/zts-php-config
-make %{?_smp_mflags}
+%make_build
%endif
%install
%{?dtsenable}
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS install
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-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
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Tools
-install -Dpm 644 NTS/tools/yar_debug.inc %{buildroot}%{pear_phpdir}/yar_debug.inc
-install -Dpm 755 NTS/tools/yar_debug.php %{buildroot}%{_bindir}/yar_debug
+install -Dpm 644 tools/yar_debug.inc %{buildroot}%{_datadir}/%{name}/yar_debug.inc
+install -Dpm 755 tools/yar_debug.php %{buildroot}%{_bindir}/yar_debug
-# Documentation
-cd NTS
-for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
+sed -e 's:%{_datadir}/%{name}/yar_debug.inc:%{_datadir}/%{name}/yar_debug.inc:' \
+ -i %{buildroot}%{_bindir}/yar_debug
%check
@@ -165,7 +149,7 @@ DEPS="$DEPS -d extension=msgpack.so"
fi
# fails in mock with: curl exec failed 'Couldn't connect to server'
-rm ?TS/tests/022.phpt
+rm tests/022.phpt
: Minimal load test for NTS extension
%{__php} $DEPS \
@@ -180,11 +164,9 @@ rm ?TS/tests/022.phpt
%endif
%if %{with tests}
-cd NTS
-
: Create test configuration
export TEST_PHP_EXECUTABLE=%{__php}
-export TEST_PHP_ARGS="$DEPS -d extension=$PWD/modules/%{pecl_name}.so"
+export TEST_PHP_ARGS="$DEPS -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so"
export REPORT_EXIT_STATUS=1
export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
@@ -196,14 +178,14 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR
%files
-%license NTS/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc CREDITS
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%{_bindir}/yar_debug
-%{pear_phpdir}/yar_debug.inc
+%{_datadir}/%{name}/yar_debug.inc
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
@@ -212,6 +194,14 @@ export YAR_API_PORT=$(%{__php} -r 'echo 8960 + PHP_MAJOR_VERSION*100 + PHP_MINOR
%changelog
+* Tue Apr 21 2026 Remi Collet <remi@remirepo.net> - 2.3.4-3
+- drop pear/pecl dependency
+- sources from github
+
+* Thu Sep 4 2025 Remi Collet <remi@remirepo.net> - 2.3.4-2
+- add fix for PHP 8.5.0beta2 using patch from
+ https://github.com/laruence/yar/pull/182
+
* Tue Jul 29 2025 Remi Collet <remi@remirepo.net> - 2.3.4-1
- update to 2.3.4
- drop patch merged upstream