forked from pool/powerman
Compare commits
53 Commits
Author | SHA256 | Date | |
---|---|---|---|
c67995ec21 | |||
633aaeff2a | |||
89e0c8d05f | |||
8cedcdd09f | |||
30058a16a6 | |||
0e3ea32d04 | |||
59a0432830 | |||
4f94b2024e | |||
02fa94d5e8 | |||
64c4fb60d1 | |||
3e8a4a586e | |||
4989f89de4 | |||
91721ca628 | |||
aa3833e43c | |||
8345a32795 | |||
fc8a2c49d1 | |||
5781b036d7 | |||
02666d7b72 | |||
4a990f8b57 | |||
91fa377cbb | |||
b68806f866 | |||
|
3ed1f41ff2 | ||
b1c53f06fd | |||
e476545775 | |||
a550feb55a | |||
3b6d25eadd | |||
d84abce5ee | |||
baad07ec81 | |||
22f6d790ce | |||
4530da9a5e | |||
9ea6d2d5c2 | |||
|
e851174031 | ||
5a4411deab | |||
|
1170c1133b | ||
f36fcce438 | |||
814586525e | |||
23561f5c71 | |||
|
00d888b67e | ||
|
66560ca5a2 | ||
|
9db0d0a01a | ||
|
5202ccda21 | ||
|
3218c8c589 | ||
3d43617f6b | |||
|
7911cdc144 | ||
|
4b85db514f | ||
|
1895c54f6a | ||
|
3443006576 | ||
|
fcc38c79cf | ||
|
e5392293d1 | ||
|
5f3bbbda44 | ||
|
fe3768cc38 | ||
|
0a4ff0cc75 | ||
|
c21fe6d615 |
112
httppower-redfishpower-Curl_easy_setopt-Expects-long-int.patch
Normal file
112
httppower-redfishpower-Curl_easy_setopt-Expects-long-int.patch
Normal file
@@ -0,0 +1,112 @@
|
||||
From 4780df0aa1d2a716fb39b225074da3c98c3443f1 Mon Sep 17 00:00:00 2001
|
||||
From: Sven Hoexter <sven@stormbind.net>
|
||||
Date: Sat, 14 Jun 2025 19:03:10 +0200
|
||||
Subject: [PATCH] httppower|redfishpower: Curl_easy_setopt() Expects long int
|
||||
|
||||
Recent curl versions require its option values to be passed
|
||||
as long.
|
||||
|
||||
Issue was raised in https://bugs.debian.org/1107411
|
||||
---
|
||||
src/httppower/httppower.c | 14 +++++++-------
|
||||
src/redfishpower/redfishpower.c | 8 ++++----
|
||||
2 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/httppower/httppower.c b/src/httppower/httppower.c
|
||||
index 5eca4a7e..7b979c8a 100644
|
||||
--- a/src/httppower/httppower.c
|
||||
+++ b/src/httppower/httppower.c
|
||||
@@ -88,7 +88,7 @@ void post(CURL *h, char **av)
|
||||
}
|
||||
|
||||
if (postdata && url_ptr) {
|
||||
- curl_easy_setopt(h, CURLOPT_POST, 1);
|
||||
+ curl_easy_setopt(h, CURLOPT_POST, 1L);
|
||||
curl_easy_setopt(h, CURLOPT_URL, url_ptr);
|
||||
curl_easy_setopt(h, CURLOPT_POSTFIELDS, postdata);
|
||||
curl_easy_setopt(h, CURLOPT_POSTFIELDSIZE, strlen (postdata));
|
||||
@@ -96,7 +96,7 @@ void post(CURL *h, char **av)
|
||||
printf("Error: %s\n", errbuf);
|
||||
curl_easy_setopt(h, CURLOPT_URL, "");
|
||||
curl_easy_setopt(h, CURLOPT_POSTFIELDS, "");
|
||||
- curl_easy_setopt(h, CURLOPT_POSTFIELDSIZE, 0);
|
||||
+ curl_easy_setopt(h, CURLOPT_POSTFIELDSIZE, 0L);
|
||||
} else
|
||||
printf("Nothing to post!\n");
|
||||
|
||||
@@ -137,7 +137,7 @@ void put(CURL *h, char **av)
|
||||
}
|
||||
|
||||
if (putdata && url_ptr) {
|
||||
- curl_easy_setopt(h, CURLOPT_UPLOAD, 1);
|
||||
+ curl_easy_setopt(h, CURLOPT_UPLOAD, 1L);
|
||||
curl_easy_setopt(h, CURLOPT_URL, url_ptr);
|
||||
curl_easy_setopt(h, CURLOPT_READFUNCTION, put_read_cb);
|
||||
pcd.data = putdata;
|
||||
@@ -147,7 +147,7 @@ void put(CURL *h, char **av)
|
||||
if (curl_easy_perform(h) != 0)
|
||||
printf("Error: %s\n", errbuf);
|
||||
curl_easy_setopt(h, CURLOPT_URL, "");
|
||||
- curl_easy_setopt(h, CURLOPT_UPLOAD, 0);
|
||||
+ curl_easy_setopt(h, CURLOPT_UPLOAD, 0L);
|
||||
} else
|
||||
printf("Nothing to put!\n");
|
||||
|
||||
@@ -162,7 +162,7 @@ void get(CURL *h, char **av)
|
||||
char *myurl = _make_url(av[0]);
|
||||
|
||||
if (myurl) {
|
||||
- curl_easy_setopt(h, CURLOPT_HTTPGET, 1);
|
||||
+ curl_easy_setopt(h, CURLOPT_HTTPGET, 1L);
|
||||
curl_easy_setopt(h, CURLOPT_URL, myurl);
|
||||
if (curl_easy_perform(h) != 0)
|
||||
printf("Error: %s\n", errbuf);
|
||||
@@ -324,9 +324,9 @@ main(int argc, char *argv[])
|
||||
if ((h = curl_easy_init()) == NULL)
|
||||
err_exit(false, "curl_easy_init failed");
|
||||
|
||||
- curl_easy_setopt(h, CURLOPT_TIMEOUT, 5);
|
||||
+ curl_easy_setopt(h, CURLOPT_TIMEOUT, 5L);
|
||||
curl_easy_setopt(h, CURLOPT_ERRORBUFFER, errbuf);
|
||||
- curl_easy_setopt(h, CURLOPT_FAILONERROR, 1);
|
||||
+ curl_easy_setopt(h, CURLOPT_FAILONERROR, 1L);
|
||||
|
||||
/* for time being */
|
||||
curl_easy_setopt(h, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
diff --git a/src/redfishpower/redfishpower.c b/src/redfishpower/redfishpower.c
|
||||
index ec67e4f6..808174f1 100644
|
||||
--- a/src/redfishpower/redfishpower.c
|
||||
+++ b/src/redfishpower/redfishpower.c
|
||||
@@ -288,7 +288,7 @@ static void powermsg_init_curl(struct powermsg *pm)
|
||||
/* Per documentation, CURLOPT_TIMEOUT overrides
|
||||
* CURLOPT_CONNECTTIMEOUT */
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_TIMEOUT, message_timeout));
|
||||
- Curl_easy_setopt((pm->eh, CURLOPT_FAILONERROR, 1));
|
||||
+ Curl_easy_setopt((pm->eh, CURLOPT_FAILONERROR, 1L));
|
||||
|
||||
/* for time being */
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_SSL_VERIFYPEER, 0L));
|
||||
@@ -321,12 +321,12 @@ static void powermsg_init_curl(struct powermsg *pm)
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_URL, pm->url));
|
||||
|
||||
if (pm->postdata) {
|
||||
- Curl_easy_setopt((pm->eh, CURLOPT_POST, 1));
|
||||
+ Curl_easy_setopt((pm->eh, CURLOPT_POST, 1L));
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_POSTFIELDS, pm->postdata));
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_POSTFIELDSIZE, strlen(pm->postdata)));
|
||||
}
|
||||
else
|
||||
- Curl_easy_setopt((pm->eh, CURLOPT_HTTPGET, 1));
|
||||
+ Curl_easy_setopt((pm->eh, CURLOPT_HTTPGET, 1L));
|
||||
}
|
||||
|
||||
static char *resolve_hosts_url(const char *hostname, const char *path)
|
||||
@@ -1221,7 +1221,7 @@ static void power_cleanup(struct powermsg *pm)
|
||||
{
|
||||
if (!test_mode && pm->eh) {
|
||||
Curl_easy_setopt((pm->eh, CURLOPT_POSTFIELDS, ""));
|
||||
- Curl_easy_setopt((pm->eh, CURLOPT_POSTFIELDSIZE, 0));
|
||||
+ Curl_easy_setopt((pm->eh, CURLOPT_POSTFIELDSIZE, 0L));
|
||||
}
|
||||
powermsg_destroy(pm);
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8465d1669745a72e3822fdc73f3e4a06737d8579a59190fef0b8aa259d7fc13f
|
||||
size 789294
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a6a3e1221fd89f9470651e87f95bd6515628aba49548dc8542f31db7a6515f77
|
||||
size 789459
|
BIN
powerman-2.4.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
powerman-2.4.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 2 07:06:54 UTC 2025 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
|
||||
|
||||
- Add patch httppower-redfishpower-Curl_easy_setopt-Expects-long-int.patch
|
||||
* Fixes build with curl 1.84.x.
|
||||
- Use -std=gnu17 on SLES16 and higher to fix build with gcc-15.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 15 12:51:05 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||
|
||||
- Update to version 2.4.4:
|
||||
* powerman: fix segfault if unspecified host reports status
|
||||
* redfishpower: do not report errors on dependent hosts
|
||||
* Update hostlist library to fix potential array out of bounds error.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 25 20:02:41 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package powerman
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -31,7 +31,7 @@
|
||||
%endif
|
||||
|
||||
Name: powerman
|
||||
Version: 2.4.3
|
||||
Version: 2.4.4
|
||||
Release: 0
|
||||
Summary: Centralized Power Control for Clusters
|
||||
License: GPL-2.0-or-later
|
||||
@@ -40,6 +40,7 @@ URL: https://github.com/chaos/powerman
|
||||
Source: https://github.com/chaos/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch1: harden_powerman.service.patch
|
||||
Patch2: Replace-deprecated-usmHMACMD5AuthProtocol-Protocol-by-SNMP_DEFAULT_AUTH_PROTO.patch
|
||||
Patch3: httppower-redfishpower-Curl_easy_setopt-Expects-long-int.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
BuildRequires: fdupes
|
||||
@@ -85,6 +86,12 @@ Header files, pkg-config file and man pages for developing applications using Po
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
|
||||
# Use gnu17 on SLES16 and higher
|
||||
%if 0%{?suse_version} >= 1600
|
||||
%global optflags %{optflags} -std=gnu17
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--disable-static\
|
||||
--with-httppower \
|
||||
|
Reference in New Issue
Block a user