Package: release.debian.org Severity: normal X-Debbugs-Cc: power...@packages.debian.org Control: affects -1 + src:powerman User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package powerman [ Reason ] FTBFS with recent curl versions, curl expects now long instead of int arguments for several options used with Curl_easy_setopt(). [ Impact ] auto removal due to FTBFS, would miss the trixie release [ Tests ] Bunch of tests are run as part of the package build. Did a manual test with httppower as well, e.g. httppower> seturl http://www.cloudflare.com httppower> get /cdn-cgi/trace.cgi fl=48f147 h=www.cloudflare.com ... [ Risks ] Breaks something in a none obvious way. [ Other info ] I don't have any real hardware to test it on. Tried to do some low hanging fruit rc bug fix here. unblock powerman/2.4.4-4
diff -Nru powerman-2.4.4/debian/changelog powerman-2.4.4/debian/changelog --- powerman-2.4.4/debian/changelog 2025-05-02 11:12:51.000000000 +0200 +++ powerman-2.4.4/debian/changelog 2025-06-14 18:46:07.000000000 +0200 @@ -1,3 +1,11 @@ +powerman (2.4.4-4) unstable; urgency=medium + + * QA upload. + * Add patch 0005-curl_easy_setopt_to_long.patch, fixes + FTBFS with more recent curl releases (Closes: #1107411). + + -- Sven Hoexter <hoex...@debian.org> Sat, 14 Jun 2025 18:46:07 +0200 + powerman (2.4.4-3) unstable; urgency=medium * QA upload. diff -Nru powerman-2.4.4/debian/patches/0005-curl_easy_setopt_to_long.patch powerman-2.4.4/debian/patches/0005-curl_easy_setopt_to_long.patch --- powerman-2.4.4/debian/patches/0005-curl_easy_setopt_to_long.patch 1970-01-01 01:00:00.000000000 +0100 +++ powerman-2.4.4/debian/patches/0005-curl_easy_setopt_to_long.patch 2025-06-14 18:37:34.000000000 +0200 @@ -0,0 +1,102 @@ +Description: Cast Curl Options to long int +Author: Sven Hoexter <hoex...@debian.org> +Bug-Debian: https://bugs.debian.org/1107411 +Forwarded: no +Index: powerman/src/httppower/httppower.c +=================================================================== +--- powerman.orig/src/httppower/httppower.c ++++ powerman/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); +Index: powerman/src/redfishpower/redfishpower.c +=================================================================== +--- powerman.orig/src/redfishpower/redfishpower.c ++++ powerman/src/redfishpower/redfishpower.c +@@ -288,7 +288,7 @@ static void powermsg_init_curl(struct po + /* 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 po + 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 powerms + { + 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); + } diff -Nru powerman-2.4.4/debian/patches/series powerman-2.4.4/debian/patches/series --- powerman-2.4.4/debian/patches/series 2025-05-02 11:12:51.000000000 +0200 +++ powerman-2.4.4/debian/patches/series 2025-06-14 18:24:03.000000000 +0200 @@ -2,3 +2,4 @@ usrmerge.patch 0003-device.c-Unconditionally-cast-tv_-sec-usec-to-lld-fo.patch 0004-Disable-large-tests-as-suggested-upstream.patch +0005-curl_easy_setopt_to_long.patch