Adapt to constification of argv parameters in rrdtool
The fix for rrdtool with GCC 14 essential changed the API, and
rebuilding lm_sensors now against that rrdtool build (which is only in
F40 and ELN) now fails. Therefore, this patch is applied only for
affected versions.
https://github.com/lm-sensors/lm-sensors/pull/483
https://github.com/oetiker/rrdtool-1.x/pull/1242
508fac5285
This commit is contained in:
parent
bcfabae7cc
commit
a964cc6044
26
lm_sensors-3.6.0-rrd-const-argv.patch
Normal file
26
lm_sensors-3.6.0-rrd-const-argv.patch
Normal file
@ -0,0 +1,26 @@
|
||||
All uses of argv in rrdtool have been constified upstream:
|
||||
|
||||
https://github.com/oetiker/rrdtool-1.x/pull/1242
|
||||
https://github.com/lm-sensors/lm-sensors/pull/483
|
||||
|
||||
diff -up ./prog/sensord/rrd.c.orig ./prog/sensord/rrd.c
|
||||
--- ./prog/sensord/rrd.c.orig 2024-02-05 14:53:34.885969256 -0500
|
||||
+++ ./prog/sensord/rrd.c 2024-02-05 14:55:09.337587596 -0500
|
||||
@@ -299,7 +299,7 @@ int rrdInit(void)
|
||||
argv[argc++] = rraBuff;
|
||||
argv[argc] = NULL;
|
||||
|
||||
- ret = rrd_create(argc, (char**) argv);
|
||||
+ ret = rrd_create(argc, argv);
|
||||
if (ret == -1) {
|
||||
sensorLog(LOG_ERR, "Error creating RRD file: %s: %s",
|
||||
sensord_args.rrdFile, rrd_get_error());
|
||||
@@ -455,7 +455,7 @@ int rrdUpdate(void)
|
||||
const char *argv[] = {
|
||||
"sensord", sensord_args.rrdFile, rrdBuff, NULL
|
||||
};
|
||||
- if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) {
|
||||
+ if ((ret = rrd_update(3, /* WEAK */ argv))) {
|
||||
sensorLog(LOG_ERR, "Error updating RRD file: %s: %s",
|
||||
sensord_args.rrdFile, rrd_get_error());
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
Name: lm_sensors
|
||||
Version: 3.6.0
|
||||
Release: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
Summary: Hardware monitoring tools
|
||||
|
||||
%define upstream_version %(echo %{version} | sed -e 's/\\./-/g')
|
||||
@ -33,6 +33,8 @@ Patch1: 0001-Change-PIDFile-path-from-var-run-to-run.patch
|
||||
Patch2: lm_sensors-3.6.0-allow_no_sensors.patch
|
||||
# Upstream commit 5deee7d0c301df779:
|
||||
Patch3: lm_sensors-3.6.0-sensors-detect-Add-support-for-AMD-CPU-Family-19h.patch
|
||||
# rrdtool has constified all argv
|
||||
Patch4: lm_sensors-3.6.0-rrd-const-argv.patch
|
||||
|
||||
Requires: /usr/sbin/modprobe
|
||||
%ifarch %{ix86} x86_64
|
||||
@ -90,6 +92,9 @@ database, and warns of sensor alarms.
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10
|
||||
%patch -P4 -p1
|
||||
%endif
|
||||
|
||||
# Remove currently unused files to make sure we've got the license right
|
||||
rm -f prog/init/sysconfig-lm_sensors-convert prog/hotplug/unhide_ICH_SMBus
|
||||
@ -212,6 +217,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Feb 11 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.6.0-17
|
||||
- Adapt to constification of argv parameters in rrdtool
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user