public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/php-pecl-rrd] f45: update to 2.0.4
@ 2026-08-25 8:12 Remi Collet
0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-08-25 8:12 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/php-pecl-rrd
Branch : f45
Commit : 9b96bd2817677637d05248bf6e1c6bdfe02d35ad
Author : Remi Collet <remi@fedoraproject.org>
Date : 2026-08-25T10:11:43+02:00
Stats : +302/-131 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/php-pecl-rrd/c/9b96bd2817677637d05248bf6e1c6bdfe02d35ad?branch=f45
Log:
update to 2.0.4
drop patches merged upstream
fix build with PHP 8.6.0beta1 using patch from
https://github.com/php/pecl-processing-rrd/pull/18
drop pear/pecl dependency
sources from github
open https://github.com/php/pecl-processing-rrd/issues/19 drop tag prefix
---
diff --git a/.gitignore b/.gitignore
index ebd364e..4692eb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ package-*.xml
/rrd-2.0.1.tgz
/rrd-2.0.2.tgz
/rrd-2.0.3.tgz
+/pecl-processing-rrd-rrd-2.0.4.tar.gz
diff --git a/php-pecl-rrd.spec b/php-pecl-rrd.spec
index 06a46c2..962a6dd 100644
--- a/php-pecl-rrd.spec
+++ b/php-pecl-rrd.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-pecl-rrd
#
-# SPDX-FileCopyrightText: Copyright 2011-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2011-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -11,20 +11,23 @@
%global pecl_name rrd
%global ini_name 40-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
-Summary: PHP Bindings for rrdtool
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-processing-rrd
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag rrd-%{version}
+
Name: %{php_base}-pecl-rrd
-Version: 2.0.3
-Release: 22%{?dist}
+Summary: PHP Bindings for rrdtool
License: BSD-2-Clause
-URL: https://pecl.php.net/package/rrd
+Version: 2.0.4
+Release: 1%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
-Source0: https://pecl.php.net/get/%{sources}.tgz
-
-Patch0: %{pecl_name}-build.patch
-Patch1: %{pecl_name}-php85.patch
+Patch0: php86.patch
ExcludeArch: %{ix86}
@@ -33,7 +36,6 @@ BuildRequires: gcc
BuildRequires: %{php_base}-devel >= 7.0
BuildRequires: rrdtool
BuildRequires: pkgconfig(librrd) >= 1.3.0
-BuildRequires: php-pear
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
@@ -60,16 +62,9 @@ system for time series data.
%prep
-%setup -c -q
-
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
+%forgesetup
-cd %{sources}
%patch -P0 -p1
-%patch -P1 -p1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RRD_VERSION/{s/.* "//;s/".*$//;p}' php_rrd.h)
@@ -77,7 +72,6 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}.
exit 1
fi
-cd ..
cat > %{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
@@ -90,27 +84,20 @@ EOF
# only "const" issues
export CFLAGS="%{optflags} -Wno-incompatible-pointer-types"
-cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
%configure --with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%install
-make install -C %{sources} INSTALL_ROOT=%{buildroot}
+%make_install
# Drop in the bit of configuration
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
-
-# Test & Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
%{__php} --no-php-ini \
@@ -119,8 +106,6 @@ done
# See https://bugzilla.redhat.com/1224530 - segfault on ARM
%ifnarch %{arm} s390x
-cd %{sources}
-
if pkg-config librrd --atleast-version=1.5.0
then
: ignore test failed with rrdtool > 1.5
@@ -143,15 +128,23 @@ REPORT_EXIT_STATUS=1 \
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%changelog
+* Fri Aug 21 2026 Remi Collet <remi@remirepo.net> - 2.0.4-1
+- update to 2.0.4
+- drop patches merged upstream
+- fix build with PHP 8.6.0beta1 using patch from
+ https://github.com/php/pecl-processing-rrd/pull/18
+- drop pear/pecl dependency
+- sources from github
+- open https://github.com/php/pecl-processing-rrd/issues/19 drop tag prefix
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
diff --git a/php86.patch b/php86.patch
new file mode 100644
index 0000000..a15c855
--- /dev/null
+++ b/php86.patch
@@ -0,0 +1,270 @@
+From 666073519759813e3d23f9b5d2d0ab89be388958 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 21 Aug 2026 06:40:42 +0200
+Subject: [PATCH 1/3] Drop ZEND_LTOA usage
+
+ . ZEND_LTOA() (and ZEND_LTOA_BUF_LEN) has been removed, as it was
+ unsafe. Directly use ZEND_LONG_FMT with a function from the
+ printf family.
+---
+ rrd.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/rrd.c b/rrd.c
+index ff51776..54f5b95 100644
+--- a/rrd.c
++++ b/rrd.c
+@@ -124,8 +124,8 @@ PHP_FUNCTION(rrd_fetch)
+ /* pointer for one data source retrieved data */
+ zval *ds_data_array;
+ /* value for key (timestamp) in data array */
+- char str_timestamp[11];
+- ZEND_LTOA((zend_ulong)timestamp, str_timestamp, sizeof(str_timestamp));
++ char str_timestamp[65];
++ snprintf(str_timestamp, sizeof(str_timestamp), ZEND_ULONG_FMT, (zend_ulong)timestamp);
+
+ /* gets pointer for data source result array */
+ ds_data_array = zend_hash_get_current_data(Z_ARRVAL(zv_data_array));
+@@ -463,8 +463,8 @@ PHP_FUNCTION(rrd_xport)
+ data_ptr = data + outvar_index;
+ for (time_index = start + step; time_index <= end; time_index += step) {
+ /* value for key (timestamp) in data array */
+- char str_timestamp[11];
+- ZEND_LTOA((zend_ulong)time_index, str_timestamp, sizeof(str_timestamp));
++ char str_timestamp[65];
++ snprintf(str_timestamp, sizeof(str_timestamp), ZEND_ULONG_FMT, (zend_ulong)time_index);
+
+ add_assoc_double(&time_data, str_timestamp, *data_ptr);
+ data_ptr += outvar_count;
+--
+2.55.0
+
+From 854f49ad5df4962d17377fbc2c0c28c4853e917c Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 21 Aug 2026 06:42:11 +0200
+Subject: [PATCH 2/3] Drop zval_dtor usage
+
+ . The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed.
+ Call zval_ptr_dtor_nogc() directly instead.
+---
+ rrd.c | 4 ++--
+ rrd_create.c | 12 ++++++------
+ rrd_graph.c | 6 +++---
+ rrd_update.c | 6 +++---
+ 4 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/rrd.c b/rrd.c
+index 54f5b95..568f02d 100644
+--- a/rrd.c
++++ b/rrd.c
+@@ -334,7 +334,7 @@ PHP_FUNCTION(rrd_restore)
+ argv = rrd_args_init_by_phparray("restore", xml_filename, &zv_options);
+ if (!argv) {
+ zend_error(E_WARNING, "cannot allocate arguments options");
+- zval_dtor(&zv_options);
++ zval_ptr_dtor_nogc(&zv_options);
+ RETURN_FALSE;
+ }
+
+@@ -346,7 +346,7 @@ PHP_FUNCTION(rrd_restore)
+ } else {
+ RETVAL_TRUE;
+ }
+- zval_dtor(&zv_options);
++ zval_ptr_dtor_nogc(&zv_options);
+ rrd_args_free(argv);
+ }
+ /* }}} */
+diff --git a/rrd_create.c b/rrd_create.c
+index 94cf16b..cbf1ff8 100644
+--- a/rrd_create.c
++++ b/rrd_create.c
+@@ -63,11 +63,11 @@ static void rrd_create_object_dtor(zend_object *object)
+ if (intern_obj->start_time)
+ efree(intern_obj->start_time);
+ if (!Z_ISUNDEF(intern_obj->zv_step))
+- zval_dtor(&intern_obj->zv_step);
++ zval_ptr_dtor_nogc(&intern_obj->zv_step);
+ if (!Z_ISUNDEF(intern_obj->zv_arr_data_sources))
+- zval_dtor(&intern_obj->zv_arr_data_sources);
++ zval_ptr_dtor_nogc(&intern_obj->zv_arr_data_sources);
+ if (!Z_ISUNDEF(intern_obj->zv_arr_archives))
+- zval_dtor(&intern_obj->zv_arr_archives);
++ zval_ptr_dtor_nogc(&intern_obj->zv_arr_archives);
+
+ zend_object_std_dtor(&intern_obj->std);
+ }
+@@ -255,7 +255,7 @@ PHP_METHOD(RRDCreator, save)
+ create_argv = rrd_args_init_by_phparray("create", intern_obj->file_path, &zv_create_argv);
+ if (!create_argv) {
+ zend_error(E_WARNING, "cannot allocate arguments options");
+- zval_dtor(&zv_create_argv);
++ zval_ptr_dtor_nogc(&zv_create_argv);
+ RETURN_FALSE;
+ }
+
+@@ -263,7 +263,7 @@ PHP_METHOD(RRDCreator, save)
+
+ /* call rrd_create and test if fails */
+ if (rrd_create(create_argv->count - 1, &create_argv->args[1]) == -1) {
+- zval_dtor(&zv_create_argv);
++ zval_ptr_dtor_nogc(&zv_create_argv);
+ rrd_args_free(create_argv);
+
+ /* throw exception with rrd error string */
+@@ -272,7 +272,7 @@ PHP_METHOD(RRDCreator, save)
+ return;
+ }
+
+- zval_dtor(&zv_create_argv);
++ zval_ptr_dtor_nogc(&zv_create_argv);
+ rrd_args_free(create_argv);
+ RETURN_TRUE;
+ }
+diff --git a/rrd_graph.c b/rrd_graph.c
+index 0e43550..ad186ed 100644
+--- a/rrd_graph.c
++++ b/rrd_graph.c
+@@ -60,7 +60,7 @@ static void rrd_graph_object_dtor(zend_object *object)
+ efree(intern_obj->file_path);
+ }
+ if (!Z_ISUNDEF(intern_obj->zv_arr_options)) {
+- zval_dtor(&intern_obj->zv_arr_options);
++ zval_ptr_dtor_nogc(&intern_obj->zv_arr_options);
+ }
+
+ zend_object_std_dtor(&intern_obj->std);
+@@ -120,7 +120,7 @@ PHP_METHOD(RRDGraph, setOptions)
+
+ /* if our array is initialized, so delete it first */
+ if (!Z_ISUNDEF(intern_obj->zv_arr_options)) {
+- zval_dtor(&intern_obj->zv_arr_options);
++ zval_ptr_dtor_nogc(&intern_obj->zv_arr_options);
+ }
+
+ /* copy array from parameter */
+@@ -169,7 +169,7 @@ static rrd_args *rrd_graph_obj_create_argv(const char *command_name, const rrd_g
+ } ZEND_HASH_FOREACH_END();
+
+ result = rrd_args_init_by_phparray(command_name, obj->file_path, &zv_argv);
+- zval_dtor(&zv_argv);
++ zval_ptr_dtor_nogc(&zv_argv);
+
+ return result;
+ }
+diff --git a/rrd_update.c b/rrd_update.c
+index e21c778..098ad89 100644
+--- a/rrd_update.c
++++ b/rrd_update.c
+@@ -179,7 +179,7 @@ PHP_METHOD(RRDUpdater, update)
+ update_argv = rrd_args_init_by_phparray("update", intern_obj->file_path, &zv_update_argv);
+ if (!update_argv) {
+ zend_error(E_WARNING, "cannot allocate arguments options");
+- zval_dtor(&zv_update_argv);
++ zval_ptr_dtor_nogc(&zv_update_argv);
+ if (time_str_length == 0) efree(time);
+ RETURN_FALSE;
+ }
+@@ -188,7 +188,7 @@ PHP_METHOD(RRDUpdater, update)
+
+ /* call rrd_update and test if fails */
+ if (rrd_update(update_argv->count - 1, &update_argv->args[1]) == -1) {
+- zval_dtor(&zv_update_argv);
++ zval_ptr_dtor_nogc(&zv_update_argv);
+ rrd_args_free(update_argv);
+
+ /* throw exception with rrd error string */
+@@ -197,7 +197,7 @@ PHP_METHOD(RRDUpdater, update)
+ return;
+ }
+
+- zval_dtor(&zv_update_argv);
++ zval_ptr_dtor_nogc(&zv_update_argv);
+ rrd_args_free(update_argv);
+
+ RETURN_TRUE;
+--
+2.55.0
+
+From d2b13dc2deb95cea3ad1c69ed409742d801ac8ac Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 21 Aug 2026 06:45:03 +0200
+Subject: [PATCH 3/3] Drop XtOffsetOf usage
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ . The XtOffsetOf() alias of C’s offsetof() macro has been removed. Use
+ offsetof() directly.
+---
+ rrd_create.c | 4 ++--
+ rrd_graph.c | 4 ++--
+ rrd_update.c | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/rrd_create.c b/rrd_create.c
+index cbf1ff8..75eeeba 100644
+--- a/rrd_create.c
++++ b/rrd_create.c
+@@ -47,7 +47,7 @@ typedef struct _rrd_create_object {
+ * fetch our custom object from user space object
+ */
+ static inline rrd_create_object *php_rrd_create_fetch_object(zend_object *obj) {
+- return (rrd_create_object *)((char*)(obj) - XtOffsetOf(rrd_create_object, std));
++ return (rrd_create_object *)((char*)(obj) - offsetof(rrd_create_object, std));
+ }
+
+ /* {{{ rrd_create_object_dtor
+@@ -345,6 +345,6 @@ void rrd_create_minit()
+
+ memcpy(&rrd_create_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ rrd_create_handlers.clone_obj = NULL;
+- rrd_create_handlers.offset = XtOffsetOf(rrd_create_object, std);
++ rrd_create_handlers.offset = offsetof(rrd_create_object, std);
+ rrd_create_handlers.free_obj = rrd_create_object_dtor;
+ }
+diff --git a/rrd_graph.c b/rrd_graph.c
+index ad186ed..a338136 100644
+--- a/rrd_graph.c
++++ b/rrd_graph.c
+@@ -45,7 +45,7 @@ typedef struct _rrd_graph_object {
+ * fetch our custom object from user space object
+ */
+ static inline rrd_graph_object *php_rrd_graph_fetch_object(zend_object *obj) {
+- return (rrd_graph_object *)((char*)(obj) - XtOffsetOf(rrd_graph_object, std));
++ return (rrd_graph_object *)((char*)(obj) - offsetof(rrd_graph_object, std));
+ }
+
+ /* {{{ rrd_graph_object_dtor
+@@ -391,6 +391,6 @@ void rrd_graph_minit()
+
+ memcpy(&rrd_graph_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ rrd_graph_handlers.clone_obj = NULL;
+- rrd_graph_handlers.offset = XtOffsetOf(rrd_graph_object, std);
++ rrd_graph_handlers.offset = offsetof(rrd_graph_object, std);
+ rrd_graph_handlers.free_obj = rrd_graph_object_dtor;
+ }
+diff --git a/rrd_update.c b/rrd_update.c
+index 098ad89..c13c11d 100644
+--- a/rrd_update.c
++++ b/rrd_update.c
+@@ -44,7 +44,7 @@ typedef struct _rrd_update_object {
+ * fetch our custom object from user space object
+ */
+ static inline rrd_update_object *php_rrd_update_fetch_object(zend_object *obj) {
+- return (rrd_update_object *)((char*)(obj) - XtOffsetOf(rrd_update_object, std));
++ return (rrd_update_object *)((char*)(obj) - offsetof(rrd_update_object, std));
+ }
+
+ /* {{{ rrd_update_object_dtor
+@@ -265,6 +265,6 @@ void rrd_update_minit()
+
+ memcpy(&rrd_update_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ rrd_update_handlers.clone_obj = NULL;
+- rrd_update_handlers.offset = XtOffsetOf(rrd_update_object, std);
++ rrd_update_handlers.offset = offsetof(rrd_update_object, std);
+ rrd_update_handlers.free_obj = rrd_update_object_dtor;
+ }
+--
+2.55.0
+
diff --git a/rrd-build.patch b/rrd-build.patch
deleted file mode 100644
index d19d96f..0000000
--- a/rrd-build.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7d36350f6398a2c4504c87db7128ef3ce47145d3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 29 Jan 2024 14:12:23 +0100
-Subject: [PATCH] Fix incompatible pointer types
-
----
- rrd.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/rrd.c b/rrd.c
-index 526f094..ab19b41 100644
---- a/rrd.c
-+++ b/rrd.c
-@@ -55,7 +55,7 @@ PHP_FUNCTION(rrd_fetch)
- rrd_args *argv;
- /* returned values if rrd_fetch doesn't fail */
- time_t start, end;
-- zend_ulong step,
-+ unsigned long step,
- ds_cnt; /* count of data sources */
- char **ds_namv; /* list of data source names */
- rrd_value_t *ds_data; /* all data from all sources */
-@@ -396,7 +396,7 @@ PHP_FUNCTION(rrd_xport)
- /* return values from rrd_xport */
- int xxsize;
- time_t start, end, time_index;
-- zend_ulong step, outvar_count;
-+ unsigned long step, outvar_count;
- char **legend_v;
- rrd_value_t *data, *data_ptr;
- zval zv_data;
diff --git a/rrd-php85.patch b/rrd-php85.patch
deleted file mode 100644
index da89759..0000000
--- a/rrd-php85.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From dd4856dc89499a0141b1710e791f0e1096c7b244 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 30 Jul 2025 13:39:24 +0200
-Subject: [PATCH] use Zend/zend_smart_string.h
-
----
- rrd.c | 4 ++++
- rrd_graph.c | 4 ++++
- rrd_update.c | 4 ++++
- 3 files changed, 12 insertions(+)
-
-diff --git a/rrd.c b/rrd.c
-index ab19b41..ff51776 100644
---- a/rrd.c
-+++ b/rrd.c
-@@ -12,7 +12,11 @@
- #endif
-
- #include "php.h"
-+#if PHP_VERSION_ID < 70200
- #include "ext/standard/php_smart_string.h"
-+#else
-+#include "Zend/zend_smart_string.h"
-+#endif
- #include "ext/standard/php_array.h"
- #include "ext/standard/info.h"
-
-diff --git a/rrd_graph.c b/rrd_graph.c
-index 96a47f4..0e43550 100644
---- a/rrd_graph.c
-+++ b/rrd_graph.c
-@@ -14,7 +14,11 @@
-
- #include "php.h"
- #include "zend_exceptions.h"
-+#if PHP_VERSION_ID < 70200
- #include "ext/standard/php_smart_string.h"
-+#else
-+#include "Zend/zend_smart_string.h"
-+#endif
-
- #include <rrd.h>
-
-diff --git a/rrd_update.c b/rrd_update.c
-index 1fc4573..e21c778 100644
---- a/rrd_update.c
-+++ b/rrd_update.c
-@@ -14,7 +14,11 @@
-
- #include "php.h"
- #include "zend_exceptions.h"
-+#if PHP_VERSION_ID < 70200
- #include "ext/standard/php_smart_string.h"
-+#else
-+#include "Zend/zend_smart_string.h"
-+#endif
-
- #include <rrd.h>
-
---
-2.50.1
-
diff --git a/sources b/sources
index 5ade231..663de17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (rrd-2.0.3.tgz) = 28679ccead54806d1e92accc6f5ebab582a41db802f95797ddb43e3e15690889be3437f22e2a14939d217422ac2700ef90ae0a9b36244ddead3856343b3e09b4
+SHA512 (pecl-processing-rrd-rrd-2.0.4.tar.gz) = 04acd3ef30b2e35802d3bbdfdf9b394bdd8234a9fb335716afb33cb206a6a98d6efd5b42b35dad1c742282430ac4d93660d2e24ae602414008dd78b48e990f97
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-25 8:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-25 8:12 [rpms/php-pecl-rrd] f45: update to 2.0.4 Remi Collet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox