diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-09-08 13:58:25 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2022-09-13 02:04:38 -0400 |
commit | dc1cf13ac58b7693cbabd3ebd82ad05088b4dbf4 (patch) | |
tree | 5b6fa9166e6e418ef4508e7244595f50cb9d3ea2 /gnu/packages/patches | |
parent | 8dae63937bb28d2bafe47225664f1a3acf5fdc30 (diff) | |
download | guix-dc1cf13ac58b7693cbabd3ebd82ad05088b4dbf4.tar.gz |
gnu: libgda: Update to 6.0.0.
* gnu/packages/gnome.scm (libgda): Update to 6.0.0. [source]: Delete modules and snippet field. Apply new patches. [build-system]: Use meson-build-system. [native-inputs]: Remove autoconf, autoconf-archive, automake, libtool, which and xorg-server-for-tests. [inputs]: Add json-glib. * gnu/packages/patches/libgda-cve-2021-39359.patch: New file. * gnu/packages/patches/libgda-fix-build.patch: Likewise. * gnu/packages/patches/libgda-fix-missing-initialization.patch: Likewise. * gnu/packages/patches/libgda-skip-postgresql-tests.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/libgda-cve-2021-39359.patch | 33 | ||||
-rw-r--r-- | gnu/packages/patches/libgda-fix-build.patch | 131 | ||||
-rw-r--r-- | gnu/packages/patches/libgda-fix-missing-initialization.patch | 26 | ||||
-rw-r--r-- | gnu/packages/patches/libgda-skip-postgresql-tests.patch | 91 |
4 files changed, 281 insertions, 0 deletions
diff --git a/gnu/packages/patches/libgda-cve-2021-39359.patch b/gnu/packages/patches/libgda-cve-2021-39359.patch new file mode 100644 index 0000000000..5e14e79393 --- /dev/null +++ b/gnu/packages/patches/libgda-cve-2021-39359.patch @@ -0,0 +1,33 @@ +From bebdffb4de586fb43fd07ac549121f4b22f6812d Mon Sep 17 00:00:00 2001 +From: "Douglas R. Reno" <renodr@linuxfromscratch.org> +Date: Mon, 18 Oct 2021 13:18:01 -0500 +Subject: [PATCH] Fix CVE-2021-39359 by forcing TLS certificate validation + +This was done by adding "ssl-use-system-ca-file", TRUE to the options +for each soup_session_new_with_options() call that was made. + +Tested on Linux From Scratch 11.0 and Debian 11. + +Fixes #249 +--- + providers/web/gda-web-provider.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/providers/web/gda-web-provider.c b/providers/web/gda-web-provider.c +index cf8d14dc3..cc818895f 100644 +--- a/providers/web/gda-web-provider.c ++++ b/providers/web/gda-web-provider.c +@@ -355,8 +355,8 @@ gda_web_provider_open_connection (GdaServerProvider *provider, GdaConnection *cn + g_rec_mutex_init (& (cdata->mutex)); + cdata->server_id = NULL; + cdata->forced_closing = FALSE; +- cdata->worker_session = soup_session_new (); +- cdata->front_session = soup_session_new_with_options ("max-conns-per-host", 1, NULL); ++ cdata->worker_session = soup_session_new_with_options ("ssl-use-system-ca-file", TRUE, NULL); ++ cdata->front_session = soup_session_new_with_options ("max-conns-per-host", 1, "ssl-use-system-ca-file", TRUE, NULL); + if (use_ssl) { + server_url = g_string_new ("https://"); + g_print ("USING SSL\n"); +-- +GitLab + diff --git a/gnu/packages/patches/libgda-fix-build.patch b/gnu/packages/patches/libgda-fix-build.patch new file mode 100644 index 0000000000..35f5b9694b --- /dev/null +++ b/gnu/packages/patches/libgda-fix-build.patch @@ -0,0 +1,131 @@ +Taken from upstream. + +From 4c2369083c5941ffada100e4a7e4702e681585e3 Mon Sep 17 00:00:00 2001 +From: taozuhong <taozuhong@gmail.com> +Date: Tue, 11 Jan 2022 15:03:28 +0800 +Subject: [PATCH] fixed compile error + +--- + libgda/Gda-6.0-custom.vala | 3 +++ + libgda/sql-parser/lemon.c | 39 +++++++++++++++++++------------------- + 2 files changed, 22 insertions(+), 20 deletions(-) + +diff --git a/libgda/Gda-6.0-custom.vala b/libgda/Gda-6.0-custom.vala +index d046c5c24..4d1408648 100644 +--- a/libgda/Gda-6.0-custom.vala ++++ b/libgda/Gda-6.0-custom.vala +@@ -92,7 +92,10 @@ namespace Gda { + [CCode (cheader_filename = "libgda.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gda_sql_statement_get_type ()")] + [Compact] + public class SqlStatement { ++ #if VALA_0_50 ++ #else + public static Gda.SqlStatementContentsInfo get_contents_infos (Gda.SqlStatementType type); ++ #endif + } + + } +diff --git a/libgda/sql-parser/lemon.c b/libgda/sql-parser/lemon.c +index a6fe75bb9..a3c727777 100644 +--- a/libgda/sql-parser/lemon.c ++++ b/libgda/sql-parser/lemon.c +@@ -11,6 +11,7 @@ + #include <string.h> + #include <ctype.h> + #include <stdlib.h> ++#include <stdint.h> + #include <assert.h> + #include <gio/gio.h> + +@@ -40,7 +41,7 @@ static const char **made_files = NULL; + static int made_files_count = 0; + static int successful_exit = 0; + +-static char *msort(char*,char**,int(*)(const char*,const char*)); ++static uintptr_t msort(uintptr_t, uintptr_t*, int(*)(const uintptr_t, const uintptr_t)); + + /* + ** Compilers are getting increasingly pedantic about type conversions +@@ -396,8 +397,7 @@ static int actioncmp( + static struct action *Action_sort( + struct action *ap + ){ +- ap = (struct action *)msort((char *)ap,(char **)&ap->next, +- (int(*)(const char*,const char*))actioncmp); ++ ap = (struct action *)msort(ap, &ap->next, actioncmp); + return ap; + } + +@@ -1277,14 +1277,14 @@ void Configlist_closure(struct lemon *lemp) + + /* Sort the configuration list */ + void Configlist_sort(){ +- current = (struct config *)msort((char *)current,(char **)&(current->next),Configcmp); ++ current = (struct config *)msort(current, &(current->next), Configcmp); + currentend = 0; + return; + } + + /* Sort the basis configuration list */ + void Configlist_sortbasis(){ +- basis = (struct config *)msort((char *)current,(char **)&(current->bp),Configcmp); ++ basis = (struct config *)msort(current, &(current->bp), Configcmp); + basisend = 0; + return; + } +@@ -1577,7 +1577,7 @@ int main(G_GNUC_UNUSED int argc, char **argv) + /* + ** Return a pointer to the next structure in the linked list. + */ +-#define NEXT(A) (*(char**)(((unsigned long)A)+offset)) ++#define NEXT(A) (*(uintptr_t *)(((uintptr_t)A)+offset)) + + /* + ** Inputs: +@@ -1594,13 +1594,13 @@ int main(G_GNUC_UNUSED int argc, char **argv) + ** The "next" pointers for elements in the lists a and b are + ** changed. + */ +-static char *merge( +- char *a, +- char *b, +- int (*cmp)(const char*,const char*), +- int offset ++static uintptr_t merge( ++ uintptr_t a, ++ uintptr_t b, ++ int (*cmp)(const uintptr_t, const uintptr_t), ++ uintptr_t offset + ){ +- char *ptr, *head; ++ uintptr_t ptr, *head; + + if( a==0 ){ + head = b; +@@ -1646,16 +1646,15 @@ static char *merge( + ** The "next" pointers for elements in list are changed. + */ + #define LISTSIZE 30 +-static char *msort( +- char *list, +- char **next, +- int (*cmp)(const char*,const char*) ++static uintptr_t msort( ++ uintptr_t list, ++ uintptr_t *next, ++ int (*cmp)(const uintptr_t, const uintptr_t) + ){ +- unsigned long offset; +- char *ep; +- char *set[LISTSIZE]; ++ uintptr_t ep; ++ uintptr_t set[LISTSIZE]; + int i; +- offset = (unsigned long)next - (unsigned long)list; ++ uintptr_t offset = (uintptr_t)next - (uintptr_t)list; + for(i=0; i<LISTSIZE; i++) set[i] = 0; + while( list ){ + ep = list; +-- +GitLab + diff --git a/gnu/packages/patches/libgda-fix-missing-initialization.patch b/gnu/packages/patches/libgda-fix-missing-initialization.patch new file mode 100644 index 0000000000..59c4a21e28 --- /dev/null +++ b/gnu/packages/patches/libgda-fix-missing-initialization.patch @@ -0,0 +1,26 @@ +Taken from upstream. + +From a4a3930ecfc4dc815b7a18dbb7338c165ea08f4e Mon Sep 17 00:00:00 2001 +From: Pavlo Solntsev <p.sun.fun@gmail.com> +Date: Sun, 19 Sep 2021 22:54:33 -0500 +Subject: [PATCH] Test: Fixing missing initialization + +--- + libgda/thread-wrapper/test-itsignaler.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libgda/thread-wrapper/test-itsignaler.c b/libgda/thread-wrapper/test-itsignaler.c +index d0c15ae17..7ac4e958a 100644 +--- a/libgda/thread-wrapper/test-itsignaler.c ++++ b/libgda/thread-wrapper/test-itsignaler.c +@@ -203,6 +203,7 @@ test2 (void) + CbData cbdata; + cbdata.counter = 0; + cbdata.loop = loop; ++ cbdata.its = its; + itsignaler_add (its, NULL, (ITSignalerFunc) source_callback, &cbdata, NULL); + itsignaler_unref (its); + g_mutex_unlock (&mutex); +-- +GitLab + diff --git a/gnu/packages/patches/libgda-skip-postgresql-tests.patch b/gnu/packages/patches/libgda-skip-postgresql-tests.patch new file mode 100644 index 0000000000..28fef585ac --- /dev/null +++ b/gnu/packages/patches/libgda-skip-postgresql-tests.patch @@ -0,0 +1,91 @@ +Taken from upstream. + +From b0cd77e588620465b78f7c017d3f240e13936aa3 Mon Sep 17 00:00:00 2001 +From: Pavlo Solntsev <p.sun.fun@gmail.com> +Date: Sun, 19 Sep 2021 22:51:38 -0500 +Subject: [PATCH] Test: Skip test if no server available + +Two variables will be checked. If they set +and provide all needed information the test +will be executed. If they are not set, the test +will return TRUE and will terminate with +termination status EXIT_SUCCESS. +--- + tests/db/check-db-catalog-postgresql.c | 16 ++++++++++++++++ + tests/test-server-operation-postgresql.c | 16 ++++++++++++++++ + 2 files changed, 32 insertions(+) + +diff --git a/tests/db/check-db-catalog-postgresql.c b/tests/db/check-db-catalog-postgresql.c +index 5b8e9395c..bf9a8942c 100644 +--- a/tests/db/check-db-catalog-postgresql.c ++++ b/tests/db/check-db-catalog-postgresql.c +@@ -25,6 +25,9 @@ + #include <libgda/libgda.h> + #include "../test-cnc-utils.h" + ++#define PROVIDER_DB_CREATE_PARAMS "POSTGRESQL_DBCREATE_PARAMS" ++#define PROVIDER_CNC_PARAMS "POSTGRESQL_CNC_PARAMS" ++ + typedef struct { + GdaDbCatalog *catalog; + GdaConnection *cnc; +@@ -359,6 +362,19 @@ main (gint argc, + { + setlocale (LC_ALL,""); + ++ const gchar *db_create_str; ++ const gchar *cnc_params; ++ ++ db_create_str = g_getenv (PROVIDER_DB_CREATE_PARAMS); ++ cnc_params = g_getenv (PROVIDER_CNC_PARAMS); ++ ++ if (!db_create_str || !cnc_params) { ++ g_print ("Please set POSTGRESQL_DBCREATE_PARAMS and POSTGRESQL_CNC_PARAMS variable" ++ "with dbname, host, user and port (usually 5432)\n"); ++ g_print ("Test will not be performed\n"); ++ return EXIT_SUCCESS; ++ } ++ + g_test_init (&argc,&argv,NULL); + + g_test_add ("/test-db-postgresql/meta-tables", +diff --git a/tests/test-server-operation-postgresql.c b/tests/test-server-operation-postgresql.c +index 37796c4be..860f41a18 100644 +--- a/tests/test-server-operation-postgresql.c ++++ b/tests/test-server-operation-postgresql.c +@@ -38,9 +38,12 @@ + #include <glib/gi18n.h> + #include <locale.h> + #include <libgda/libgda.h> ++/*#include <stdlib.h>*/ + #include "test-cnc-utils.h" + + #define PROVIDER_NAME "PostgreSQL" ++#define PROVIDER_DB_CREATE_PARAMS "POSTGRESQL_DBCREATE_PARAMS" ++#define PROVIDER_CNC_PARAMS "POSTGRESQL_CNC_PARAMS" + + #define GDA_PGSQL_ERROR_HANDLE(e) (g_print("Error: %s: %s\n", G_STRLOC, e && e->message ? e->message : "No default")); + +@@ -1335,6 +1338,19 @@ main(gint argc, gchar *argv[]) + { + setlocale (LC_ALL,""); + ++ const gchar *db_create_str; ++ const gchar *cnc_params; ++ ++ db_create_str = g_getenv (PROVIDER_DB_CREATE_PARAMS); ++ cnc_params = g_getenv (PROVIDER_CNC_PARAMS); ++ ++ if (!db_create_str || !cnc_params) { ++ g_print ("Please set POSTGRESQL_DBCREATE_PARAMS and POSTGRESQL_CNC_PARAMS variable" ++ "with dbname, host, user and port (usually 5432)\n"); ++ g_print ("Test will not be performed\n"); ++ return EXIT_SUCCESS; ++ } ++ + g_test_init (&argc,&argv,NULL); + + g_test_add ("/test-server-operation-sqlite/old-so-module", +-- +GitLab + |