From: Devrim Gunduz Date: Mon, 22 Sep 2025 12:26:42 +0000 (-0500) Subject: libfq: Update to 0.6.2 per changes described at https://github.com/ibarwick/libfq... X-Git-Url: http://git.postgresql.org/gitweb/edit?a=commitdiff_plain;h=c2839d4e84676c07da0b3c71cf0086dd3e8e78d2;p=pgrpms.git libfq: Update to 0.6.2 per changes described at https://github.com/ibarwick/libfq/releases/tag/0.6.2. Also remove temp patch included in 0.6.1-3. --- diff --git a/rpm/redhat/main/common/libfq/EL-10/libfq-c23.patch b/rpm/redhat/main/common/libfq/EL-10/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/EL-10/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/EL-8/libfq-c23.patch b/rpm/redhat/main/common/libfq/EL-8/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/EL-8/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/EL-9/libfq-c23.patch b/rpm/redhat/main/common/libfq/EL-9/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/EL-9/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/F-41/libfq-c23.patch b/rpm/redhat/main/common/libfq/F-41/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/F-41/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/F-42/libfq-c23.patch b/rpm/redhat/main/common/libfq/F-42/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/F-42/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/F-43/libfq-c23.patch b/rpm/redhat/main/common/libfq/F-43/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/F-43/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/SLES-15/libfq-c23.patch b/rpm/redhat/main/common/libfq/SLES-15/libfq-c23.patch deleted file mode 120000 index dea76653b..000000000 --- a/rpm/redhat/main/common/libfq/SLES-15/libfq-c23.patch +++ /dev/null @@ -1 +0,0 @@ -../main/libfq-c23.patch \ No newline at end of file diff --git a/rpm/redhat/main/common/libfq/main/libfq-c23.patch b/rpm/redhat/main/common/libfq/main/libfq-c23.patch deleted file mode 100644 index 70862b008..000000000 --- a/rpm/redhat/main/common/libfq/main/libfq-c23.patch +++ /dev/null @@ -1,152 +0,0 @@ -From e966732f28a305387e2b9f4b0f230671e942351e Mon Sep 17 00:00:00 2001 -From: Ian Barwick -Date: Mon, 26 May 2025 23:23:48 +0900 -Subject: [PATCH] Fix some further compiler warnings - -With "-Wstringop-truncation", the compiler is fretting about a -possible missing terminating NUL character, even though we explicitly -set that immediately after the strncpy call. - -Initializing the entire buffer with NUL characters before calling -strncpy makes the issue go away. - -Per report in GitHub #8. ---- - src/libfq.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/libfq.c b/src/libfq.c -index 539e2fd..7dd2e05 100644 ---- a/src/libfq.c -+++ b/src/libfq.c -@@ -294,8 +294,8 @@ FQconnectdbParams(const char * const *keywords, - /* store database path */ - db_path_len = strlen(db_path); - conn->db_path = malloc(db_path_len + 1); -- strncpy(conn->db_path, db_path, db_path_len); -- conn->db_path[db_path_len] = '\0'; -+ memset(conn->db_path, '\0', db_path_len + 1); -+ strncpy(conn->db_path, db_path, db_path_len + 1); - - /* set and store other parameters */ - if (uname != NULL) -@@ -305,8 +305,8 @@ FQconnectdbParams(const char * const *keywords, - isc_modify_dpb(&dpb, &conn->dpb_length, isc_dpb_user_name, uname, uname_len); - - conn->uname = malloc(uname_len + 1); -- strncpy(conn->uname, uname, uname_len); -- conn->uname[uname_len] = '\0'; -+ memset(conn->uname, '\0', uname_len + 1); -+ strncpy(conn->uname, uname, uname_len + 1); - } - - if (upass != NULL) -@@ -316,8 +316,8 @@ FQconnectdbParams(const char * const *keywords, - isc_modify_dpb(&dpb, &conn->dpb_length, isc_dpb_password, upass, upass_len); - - conn->upass = malloc(upass_len + 1); -- strncpy(conn->upass, upass, upass_len); -- conn->upass[upass_len] = '\0'; -+ memset(conn->upass, '\0', upass_len + 1); -+ strncpy(conn->upass, upass, upass_len + 1); - } - - /* -From 809ef0bccfb0c6b8cd2852adf4777d7f45dc577f Mon Sep 17 00:00:00 2001 -From: Ian Barwick -Date: Fri, 18 Apr 2025 18:39:26 +0900 -Subject: [PATCH] Update boolean handling for C23 standard - -There was a reason for manually defining a boolean type, possibly -because back in the day (12 years or so ago) it was what PostgreSQL -itself did, but C is now far enough into the 21st century that it -seems reasonable to assume is universally available. - -See also PostgreSQL core commit bc5a4dfcf73. - -GitHub #8. ---- - include/libfq.h | 25 +------------------------ - 1 file changed, 1 insertion(+), 24 deletions(-) - -diff --git a/include/libfq.h b/include/libfq.h -index 7e37e99..31a39ed 100644 ---- a/include/libfq.h -+++ b/include/libfq.h -@@ -2,35 +2,12 @@ - #define LIBFQ_H - - #include -+#include - #include - - #ifndef C_H - #define C_H - -- --#ifndef BOOL --#define BOOL --typedef char bool; -- -- --#ifndef true --#define true ((bool) 1) --#endif -- --#ifndef false --#define false ((bool) 0) --#endif -- --typedef bool *BoolPtr; -- --#ifndef TRUE --#define TRUE 1 --#endif -- --#ifndef FALSE --#define FALSE 0 --#endif --#endif - /* - * lengthof - * Number of elements in an array. -From bf8f6112c032c8d464ac8ac2b50d71a24a17ce61 Mon Sep 17 00:00:00 2001 -From: Ian Barwick -Date: Fri, 18 Apr 2025 19:02:26 +0900 -Subject: [PATCH] Miscellaneous code cleanup - -Addresses various compiler warnings, including those noted in GitHub #8. ---- - src/libfq.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/libfq.c b/src/libfq.c -index fd60a26..539e2fd 100644 ---- a/src/libfq.c -+++ b/src/libfq.c -@@ -26,6 +26,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -3658,7 +3659,7 @@ _FQformatDatum(FBconn *conn, FQresTupleAttDesc *att_desc, XSQLVAR *var) - if (var->sqlsubtype == 1) - { - /* column defined as "CHARACTER SET OCTETS" */ -- p = _FQformatOctet(vary2->vary_string, vary2->vary_length); -+ p = _FQformatOctet((char *)vary2->vary_string, vary2->vary_length); - } - else - { -@@ -3708,7 +3709,7 @@ _FQformatDatum(FBconn *conn, FQresTupleAttDesc *att_desc, XSQLVAR *var) - - if (value >= 0) - { -- p = (char *)malloc(buflen); -+ p = (char *)malloc(buflen + 1); - sprintf(p, "%lld.%0*lld", - (ISC_INT64) value / tens, - -dscale, diff --git a/rpm/redhat/main/common/libfq/main/libfq.spec b/rpm/redhat/main/common/libfq/main/libfq.spec index 9265abb6a..7ca9268af 100644 --- a/rpm/redhat/main/common/libfq/main/libfq.spec +++ b/rpm/redhat/main/common/libfq/main/libfq.spec @@ -1,9 +1,8 @@ Summary: A wrapper library for the Firebird C API Name: libfq -Version: 0.6.1 -Release: 3PGDG%{dist} +Version: 0.6.2 +Release: 1PGDG%{dist} Source: https://github.com/ibarwick/%{name}/archive/%{version}.tar.gz -Patch0: %{name}-c23.patch URL: https://github.com/ibarwick/%{name} License: PostgreSQL BuildRequires: firebird-devel @@ -16,7 +15,6 @@ A wrapper library for the Firebird C API, loosely based on libpq for PostgreSQL. %prep %setup -q -n %{name}-%{version} -%patch -P 0 -p1 %build %configure --prefix=%{_prefix} \ @@ -39,6 +37,11 @@ A wrapper library for the Firebird C API, loosely based on libpq for PostgreSQL. %{_includedir}/%{name}.h %changelog +* Mon Sep 22 2025 Devrim Gündüz - 0.6.2-1PGDG +- Update to 0.6.2 per changes described at: + https://github.com/ibarwick/libfq/releases/tag/0.6.2 +- Remove temp patch included in 0.6.1-3. + * Fri Sep 19 2025 Devrim Gündüz - 0.6.1-3PGDG - Fix builds on Fedora 42 (GCC 15). Took the patch from upstream: e966732, bf8f611, 809ef0b, so will be removed in next release.