Accepting request 1190169 from server:database

- Remove disabled patch rrdtool-tclsegfault.patch 
- Small spec file modernisation

- Added rrdtool-fix_extra_reference.patch to fix pointer type
  incompatibility and allow the package to be built with GCC 14
  without explicitely demoting errors to warnings. [boo#1225919]

- add rrdtool-1.8.0-gcc14.patch from upstream to fix build with
  gcc-14
- disable rrdtool-tclsegfault.patch, does not apply and seems
  unneccessary

OBS-URL: https://build.opensuse.org/request/show/1190169
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rrdtool?expand=0&rev=78
This commit is contained in:
Dominique Leuenberger 2024-07-30 09:53:39 +00:00 committed by Git OBS Bridge
commit a0a6c2de89
5 changed files with 1666 additions and 35 deletions

1586
rrdtool-1.8.0-gcc14.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
From: Martin Jambor <mjambor@suse.cz>
Date: Fri, 12 Jul 2024 17:02:04 +0200
Subject: [PATCH] Fix extra reference of parameters of rrd_fetch_dbi_{long,double}
Upstream: https://github.com/oetiker/rrdtool-1.x/pull/1255
Refrences: boo#1225919
Functions rrd_fetch_dbi_long and rrd_fetch_dbi_double currently take
the first parameter of type "bi_result result *" even though that is
already a pointer and the use of that parameter suggests the extra
indirection is not wanted. What is more, the caller passes just
"bi_result result" to the corresponding actual arguments which results
in compile errors with GCC 14 because it now does not accept
incompatible pointer types by default.
---
src/rrd_fetch_libdbi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/rrd_fetch_libdbi.c b/src/rrd_fetch_libdbi.c
index fe02b0d8..e4eccaa5 100644
--- a/src/rrd_fetch_libdbi.c
+++ b/src/rrd_fetch_libdbi.c
@@ -26,13 +26,13 @@ static char* _find_next_separator(char* start,char separator);
static char* _find_next_separator_twice(char*start,char separator);
static char _hexcharhelper(char c);
static int _inline_unescape (char* string);
-static double rrd_fetch_dbi_double(dbi_result *result,int idx);
-static long rrd_fetch_dbi_long(dbi_result *result,int idx);
+static double rrd_fetch_dbi_double(dbi_result result,int idx);
+static long rrd_fetch_dbi_long(dbi_result result,int idx);
/* the real code */
/* helpers to get correctly converted values from DB*/
-static long rrd_fetch_dbi_long(dbi_result *result,int idx) {
+static long rrd_fetch_dbi_long(dbi_result result,int idx) {
char *ptmp="";
long value=DNAN;
/* get the attributes for this filed */
@@ -89,7 +89,7 @@ static long rrd_fetch_dbi_long(dbi_result *result,int idx) {
return value;
}
-static double rrd_fetch_dbi_double(dbi_result *result,int idx) {
+static double rrd_fetch_dbi_double(dbi_result result,int idx) {
char *ptmp="";
double value=DNAN;
/* get the attributes for this filed */
--
2.45.2

View File

@ -1,30 +0,0 @@
Index: bindings/tcl/tclrrd.c
===================================================================
--- a/bindings/tcl/tclrrd.c
+++ b/bindings/tcl/tclrrd.c
@@ -472,6 +472,12 @@ static int Rrd_Graph(
char **argv2;
CONST84 char *save;
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "RRD Error: needs image filename",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
/*
* If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to
* that file descriptor. Will this work with windoze? I have no idea.
@@ -597,6 +603,12 @@ static int Rrd_Resize(
{
char **argv2;
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
argv2 = getopt_init(argc, argv);
rrd_resize(argc, argv2);
getopt_cleanup(argc, argv2);

View File

@ -1,4 +1,24 @@
-------------------------------------------------------------------
Mon Jul 29 07:19:23 UTC 2024 - Martin Pluskal <mpluskal@suse.com>
- Remove disabled patch rrdtool-tclsegfault.patch
- Small spec file modernisation
-------------------------------------------------------------------
Fri Jul 12 15:12:22 UTC 2024 - Martin Jambor <mjambor@suse.com>
- Added rrdtool-fix_extra_reference.patch to fix pointer type
incompatibility and allow the package to be built with GCC 14
without explicitely demoting errors to warnings. [boo#1225919]
-------------------------------------------------------------------
Fri Jul 5 20:30:43 UTC 2024 - Friedrich Haubensak <hsk17@mail.de>
- add rrdtool-1.8.0-gcc14.patch from upstream to fix build with
gcc-14
- disable rrdtool-tclsegfault.patch, does not apply and seems
unneccessary
-------------------------------------------------------------------
Mon Dec 25 16:26:00 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Use autosetup

View File

@ -1,7 +1,7 @@
#
# spec file for package rrdtool
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -46,11 +46,16 @@ Source99: %{name}.changes
# PATCH-FIX-UPSTREAM -- Fix BUILD_DATE in rrdtool help output (fix segfault)
# https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f.patch
Patch1: e59f703bbcc0af949ee365206426b6394c340c6f.patch
# PATCH-FIX-UPSTREAM -- Prevent possible segfault
Patch3: rrdtool-tclsegfault.patch
## PATCH-FIX-UPTREAM -- https://github.com/oetiker/rrdtool-1.x/pull/1242
Patch2: rrdtool-1.8.0-gcc14.patch
# PATCH-FIX-UPTREAM -- Prevent possible segfault
## this patch against rrdtool-1.4.5 dates from 2011, seems unneccessary today,
## never appeared upstream, and it does no longer apply
##Patch3: rrdtool-tclsegfault.patch
# PATCH-FIX-UPSTREAM -- bnc#793636
Patch12: rrdtool-zero_vs_nothing.patch
Patch14: harden_rrdcached.service.patch
Patch15: rrdtool-fix_extra_reference.patch
# Needed for tests
BuildRequires: bc
BuildRequires: cairo-devel >= 1.2
@ -267,7 +272,7 @@ autoreconf -fi
--with-gnu-ld \
--with-systemdsystemunitdir=%{_unitdir}
make %{?_smp_mflags}
%make_build
%install
make \
@ -315,7 +320,7 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcrrdcached
%check
# Follow upstream, disable the following, failing tests: rpn1
# https://github.com/oetiker/rrdtool-1.x/blob/master/.travis.yml#L30
make %{?_smp_mflags} check TESTS="modify1 modify2 modify3 modify4 modify5 rpn2 xport1 \
%make_build check TESTS="modify1 modify2 modify3 modify4 modify5 rpn2 xport1 \
tune1 tune2 graph1 rrdcreate dump-restore create-with-source-1 create-with-source-2 \
create-with-source-3 create-with-source-4 create-with-source-and-mapping-1 \
create-from-template-1 dcounter1 vformatter1 list1 pdp-calc1"