pgpool2: upgrade 4.5.5 -> 4.6.3
PATCH 1/1 pgpool2: upgrade 4.5.5 -> 4.6.3
Drop 0001-fix-compiling-on-32-bit-systems.patch, and change to another patch that solves the same issue in OE, but is more likely to be adapted by upstream (after discussion with upstream in
https://github.com/pgpool/pgpool2/pull/128)
Shortlog: https://github.com/pgpool/pgpool2/compare/V4_5_5...V4_6_3
Signed-off-by Gyorgy Sarvari <[email protected]>
---
...0001-fix-compiling-on-32-bit-systems.patch | 83 -----
...e-time-calculations-always-long-long.patch | 336 ++++++++++++++++++
.../{pgpool2_4.5.5.bb => pgpool2_4.6.3.bb} | 4 +-
3 files changed, 338 insertions(+), 85 deletions(-)
delete mode 100644 meta-networking/recipes-support/pgpool2/pgpool2/0001-fix-compiling-on-32-bit-systems.patch
create mode 100644 meta-networking/recipes-support/pgpool2/pgpool2/v1-0001-Make-time-calculations-always-long-long.patch
rename meta-networking/recipes-support/pgpool2/{pgpool2_4.5.5.bb => pgpool2_4.6.3.bb} (92%)meta-networking/recipes-support/pgpool2/pgpool2/0001-fix-compiling-on-32-bit-systems.patch deleted +0 -83
@@ -1,83 +0,0 @@ -From 523ca5546b0178be693943f2a3a880c0bd6ea239 Mon Sep 17 00:00:00 2001 -From: Gyorgy Sarvari <[email protected]> -Date: Thu, 11 Sep 2025 12:36:29 +0200 -Subject: [PATCH] fix compiling on 32-bit systems - -The timespec struct's tv_sec size can change between architectures. -Usually on 64 bit systems it's long, but on 32 bit systems it is frequently long long. - -When the watchdog is trying to get the uptime, it is trying to get the value -as long - however on 32 bit systems this fails due to different time_t size: - -| wd_json_data.c:540:66: error: passing argument 3 of 'json_get_long_value_for_key' from incompatible pointer type [-Wincompatible-pointer-types] -| 540 | if (json_get_long_value_for_key(root, "StartupTimeSecs", &wdNode->startup_time.tv_sec)) -| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To account for this, introduce a new helper function to get a json value as -a time_t type. - -Upstream-Status: Submitted [https://github.com/pgpool/pgpool2/pull/128] - -Signed-off-by: Gyorgy Sarvari <[email protected]> ---- - src/include/utils/json.h | 5 +++-- - src/utils/json.c | 14 ++++++++++++++ - src/watchdog/wd_json_data.c | 2 +- - 3 files changed, 18 insertions(+), 3 deletions(-) - -diff --git a/src/include/utils/json.h b/src/include/utils/json.h -index 67cc0255a..93be83c3a 100644 ---- a/src/include/utils/json.h -+++ b/src/include/utils/json.h -@@ -311,10 +311,11 @@ extern "C" - #endif - - /* pgpool-II extensions */ --json_value *json_get_value_for_key(json_value * source, const char *key); -+json_value *json_get_value_for_key(json_value * source, const char *key); - int json_get_int_value_for_key(json_value * source, const char *key, int *value); - int json_get_long_value_for_key(json_value * source, const char *key, long *value); --char *json_get_string_value_for_key(json_value * source, const char *key); -+char *json_get_string_value_for_key(json_value * source, const char *key); - int json_get_bool_value_for_key(json_value * source, const char *key, bool *value); -+int json_get_time_value_for_key(json_value * source, const char *key, time_t *value); - - #endif -diff --git a/src/utils/json.c b/src/utils/json.c -index 319c8fdbf..bce99466c 100644 ---- a/src/utils/json.c -+++ b/src/utils/json.c -@@ -1204,6 +1204,20 @@ json_get_long_value_for_key(json_value * source, const char *key, long *value) - return 0; - } - -+int -+json_get_time_value_for_key(json_value * source, const char *key, time_t *value) -+{ -+ json_value *jNode; -+ -+ jNode = json_get_value_for_key(source, key); -+ if (jNode == NULL) -+ return -1; -+ if (jNode->type != json_integer) -+ return -1; -+ *value = jNode->u.integer; -+ return 0; -+} -+ - /* - * pgpool extension: - * returns string value if found for the key. -diff --git a/src/watchdog/wd_json_data.c b/src/watchdog/wd_json_data.c -index 474fc37a4..53053cd4b 100644 ---- a/src/watchdog/wd_json_data.c -+++ b/src/watchdog/wd_json_data.c -@@ -537,7 +537,7 @@ get_watchdog_node_from_json(char *json_data, int data_len, char **authkey) - if (root == NULL || root->type != json_object) - goto ERROR_EXIT; - -- if (json_get_long_value_for_key(root, "StartupTimeSecs", &wdNode->startup_time.tv_sec)) -+ if (json_get_time_value_for_key(root, "StartupTimeSecs", &wdNode->startup_time.tv_sec)) - { - bool escalated; - long seconds_since_node_startup;
meta-networking/recipes-support/pgpool2/pgpool2/v1-0001-Make-time-calculations-always-long-long.patch new file +336 -0
336 lines not on this page · raw message
meta-networking/recipes-support/pgpool2/pgpool2_4.6.3.bb renamed from meta-networking/recipes-support/pgpool2/pgpool2_4.5.5.bb +2 -2
@@ -13,12 +13,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9" SRC_URI = "https://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \ file://0001-Fix-build-error-when-build-this-file.patch \ file://0001-snprintf-Add-math.h-to-ensure-isnan-and-isinf-are-de.patch \ - file://0001-fix-compiling-on-32-bit-systems.patch \ + file://v1-0001-Make-time-calculations-always-long-long.patch \ file://define_SIGNAL_ARGS.patch \ file://pgpool.sysconfig \ file://pgpool.service \ " -SRC_URI[sha256sum] = "95ffeeaeb6b0cebea8034e30fc1933fec7384b227ad511305eaccc5d090ff998" +SRC_URI[sha256sum] = "46688668b2ace67d8161a320256252d98698bc7d9788cc6727269d5720299f2c" S = "${UNPACKDIR}/pgpool-II-${PV}"