mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2024-09-20 11:23:16 +00:00
main/glib: upgrade to 2.82.0
This commit is contained in:
parent
0d4f241f69
commit
908249f166
2 changed files with 7 additions and 464 deletions
|
@ -3,8 +3,8 @@
|
|||
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
|
||||
# Maintainer: Pablo Correa Gómez <ablocorrea@hotmail.com>
|
||||
pkgname=glib
|
||||
pkgver=2.80.4
|
||||
_gi_version=1.80.1
|
||||
pkgver=2.82.0
|
||||
_gi_version=1.82.0
|
||||
pkgrel=0
|
||||
pkgdesc="Common C routines used by Gtk+ and other libs"
|
||||
url="https://developer.gnome.org/glib/"
|
||||
|
@ -45,13 +45,14 @@ subpackages="
|
|||
source="https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
|
||||
https://download.gnome.org/sources/gobject-introspection/${_gi_version%.*}/gobject-introspection-$_gi_version.tar.xz
|
||||
tests-machine-id.patch
|
||||
fix-tests.patch
|
||||
flaky-tests.patch
|
||||
"
|
||||
|
||||
# 2.80 moves gir here
|
||||
replaces="gobject-introspection<1.80.0"
|
||||
|
||||
[ "$CARCH" = "ppc64le" ] && options="$options !check" # https://gitlab.gnome.org/GNOME/glib/-/issues/3474
|
||||
|
||||
# secfixes:
|
||||
# 2.80.1-r0:
|
||||
# - CVE-2024-34397
|
||||
|
@ -112,7 +113,7 @@ build() {
|
|||
|
||||
check() {
|
||||
# riscv64 and armhf may time out with the standard timeout
|
||||
meson test --timeout-multiplier 3 --no-rebuild --print-errorlogs -C output
|
||||
meson test --timeout-multiplier 10 --no-rebuild --print-errorlogs -C output
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -141,9 +142,8 @@ static() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
efdc7dd1e0609b0f2d988a8cc8fd4a3fda96e8450832f905f7686f9063b727cb996e0e4e638aca62f60b76f9f04be62e089a615413e64cf298c7eef26e074570 glib-2.80.4.tar.xz
|
||||
f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a gobject-introspection-1.80.1.tar.xz
|
||||
7ce4dbc2b80fea1dca722bea02b1c35404108747b94c296760469b5416fc5ca737fc29c56a091120e5457a732656761424da614f3a626eb79b80b145507deb00 glib-2.82.0.tar.xz
|
||||
e139fadb4174c72b648914f3774d89fc0e5eaee45bba0c13edf05de883664dad8276dbc34006217bb09871ed4bad23adab51ff232a17b9eb131329b2926cafb7 gobject-introspection-1.82.0.tar.xz
|
||||
4f561bfede4a559b314195aa4b7b5923a52c62063e6dd33b4933ad53b29c32ef789d69b9f7b17d8d701323006366e6b7acbb083a68674c1c535c185d35cc5d1f tests-machine-id.patch
|
||||
f04c66eb04b709df16fbc24e51a6bb11f06dc1658c55295f7c8203dd091bc5ca99acd224c760b467b04e102d98987b585e828ad80125c08e407b399e9651ea3a fix-tests.patch
|
||||
268cf6f089274f29285242f1e29bf5650e85f9fcb5744df884deb139493cc25792ad78487113732665f1c5393c94b2f76f97093a1a003e3caaf65c07960a1bf9 flaky-tests.patch
|
||||
"
|
||||
|
|
|
@ -1,457 +0,0 @@
|
|||
From 01304c97693a7c789bde9c543979872fc63c387c Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 3 Apr 2024 21:11:24 +0200
|
||||
Subject: [PATCH 1/3] tests: skip test that requires shared-mime-info when its
|
||||
missing
|
||||
|
||||
shared-mime-info required glib to build and will not be there during
|
||||
bootstrap. Skip the test if it is missing.
|
||||
|
||||
ref: https://gitlab.gnome.org/GNOME/glib/-/issues/3317
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/contenttype.c | 47 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/contenttype.c b/gio/tests/contenttype.c
|
||||
index 8784374f2..b442d5352 100644
|
||||
--- a/gio/tests/contenttype.c
|
||||
+++ b/gio/tests/contenttype.c
|
||||
@@ -13,6 +13,20 @@
|
||||
__s1, " == ", __s2); \
|
||||
} while (0)
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_shared_mime_info (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path("update-mime-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("shared-mime-info is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free(path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_guess (void)
|
||||
{
|
||||
@@ -26,6 +40,9 @@ test_guess (void)
|
||||
"Name=appinfo-test\n"
|
||||
"Exec=./appinfo-test --option\n";
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef G_OS_WIN32
|
||||
existing_directory = (gchar *) g_getenv ("SYSTEMROOT");
|
||||
|
||||
@@ -150,6 +167,9 @@ test_subtype (void)
|
||||
gchar *plain;
|
||||
gchar *xml;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
plain = g_content_type_from_mime_type ("text/plain");
|
||||
xml = g_content_type_from_mime_type ("application/xml");
|
||||
|
||||
@@ -175,6 +195,9 @@ test_list (void)
|
||||
gchar *plain;
|
||||
gchar *xml;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
g_test_skip ("The OSX backend does not implement g_content_types_get_registered()");
|
||||
return;
|
||||
@@ -202,6 +225,9 @@ test_executable (void)
|
||||
{
|
||||
gchar *type;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#ifdef G_OS_WIN32
|
||||
type = g_content_type_from_mime_type ("application/vnd.microsoft.portable-executable");
|
||||
/* FIXME: the MIME is not in the default `MIME\Database\Content Type` registry.
|
||||
@@ -228,6 +254,9 @@ test_description (void)
|
||||
gchar *type;
|
||||
gchar *desc;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
desc = g_content_type_get_description (type);
|
||||
g_assert_nonnull (desc);
|
||||
@@ -242,6 +271,9 @@ test_icon (void)
|
||||
gchar *type;
|
||||
GIcon *icon;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
icon = g_content_type_get_icon (type);
|
||||
g_assert_true (G_IS_ICON (icon));
|
||||
@@ -290,6 +322,9 @@ test_symbolic_icon (void)
|
||||
gchar *type;
|
||||
GIcon *icon;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
type = g_content_type_from_mime_type ("text/plain");
|
||||
icon = g_content_type_get_symbolic_icon (type);
|
||||
g_assert_true (G_IS_ICON (icon));
|
||||
@@ -344,6 +379,9 @@ test_tree (void)
|
||||
gchar **types;
|
||||
gsize i;
|
||||
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
#if defined(__APPLE__) || defined(G_OS_WIN32)
|
||||
g_test_skip ("The OSX & Windows backends do not implement g_content_type_guess_for_tree()");
|
||||
return;
|
||||
@@ -437,8 +475,13 @@ test_guess_svg_from_data (void)
|
||||
</svg>\n";
|
||||
|
||||
gboolean uncertain = TRUE;
|
||||
- gchar *res = g_content_type_guess (NULL, (guchar *)svgfilecontent,
|
||||
- sizeof (svgfilecontent) - 1, &uncertain);
|
||||
+ gchar *res;
|
||||
+
|
||||
+ if (skip_missing_shared_mime_info ())
|
||||
+ return;
|
||||
+
|
||||
+ res = g_content_type_guess (NULL, (guchar *)svgfilecontent,
|
||||
+ sizeof (svgfilecontent) - 1, &uncertain);
|
||||
#ifdef __APPLE__
|
||||
g_assert_cmpstr (res, ==, "public.svg-image");
|
||||
#elif defined(G_OS_WIN32)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
||||
From a77fdc4cae8deb7ef9f47e81f81a8db139434093 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Thu, 4 Apr 2024 17:08:46 +0200
|
||||
Subject: [PATCH 2/3] tests: skip tests that requires dbus-daemon when its
|
||||
missing
|
||||
|
||||
dbus may not be built yet during bootstrap, because it needs glib to
|
||||
build.
|
||||
|
||||
Ref: https://gitlab.gnome.org/GNOME/glib/-/issues/3317
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/appinfo.c | 22 ++++++++++++++++++++++
|
||||
gio/tests/desktop-app-info.c | 19 +++++++++++++++++++
|
||||
2 files changed, 41 insertions(+)
|
||||
|
||||
diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c
|
||||
index d9c53c853..81bc48191 100644
|
||||
--- a/gio/tests/appinfo.c
|
||||
+++ b/gio/tests/appinfo.c
|
||||
@@ -49,6 +49,19 @@ test_launch_for_app_info (GAppInfo *appinfo)
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_dbus_daemon (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("dbus-daemon");
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("dbus-daemon is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_launch (void)
|
||||
{
|
||||
@@ -56,6 +69,9 @@ test_launch (void)
|
||||
GAppInfo *appinfo;
|
||||
const gchar *path;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
@@ -96,6 +112,9 @@ test_launch_no_app_id (void)
|
||||
gchar *exec_line_variants[2];
|
||||
gsize i;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
exec_line_variants[0] = g_strdup_printf (
|
||||
"Exec=%s/appinfo-test --option %%U %%i --name %%c --filename %%k %%m %%%%",
|
||||
g_test_get_dir (G_TEST_BUILT));
|
||||
@@ -356,6 +375,9 @@ test_launch_context_signals (void)
|
||||
gboolean success;
|
||||
gchar *cmdline;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
|
||||
index e82e2dd31..ec65b7618 100644
|
||||
--- a/gio/tests/desktop-app-info.c
|
||||
+++ b/gio/tests/desktop-app-info.c
|
||||
@@ -593,6 +593,19 @@ wait_for_file (const gchar *want_this,
|
||||
unlink (or_this);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_dbus_daemon (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("dbus-daemon");
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("dbus-daemon is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_actions (void)
|
||||
{
|
||||
@@ -606,6 +619,9 @@ test_actions (void)
|
||||
gchar *tweak_path;
|
||||
gchar *twiddle_path;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to keep D-Bus traffic off the real session bus. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
@@ -1833,6 +1849,9 @@ test_launch_fail_dbus (void)
|
||||
GAsyncResult *result = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_dbus_daemon ())
|
||||
+ return;
|
||||
+
|
||||
/* Set up a test session bus to ensure that launching the app happens using
|
||||
* D-Bus rather than spawning. */
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
||||
From 0ec9c399c7d2755147e409d065690b2ff53fda40 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Wed, 3 Apr 2024 22:10:18 +0200
|
||||
Subject: [PATCH 3/3] tests: find update-desktop-database
|
||||
|
||||
Disable tests that require update-desktop-database when it is missing.
|
||||
|
||||
It requires glib to build so it will be missing when bootstrapping glib.
|
||||
|
||||
Refactor the ifdef for Windows and MacOS while at it and reduce number
|
||||
of ifdefs.
|
||||
|
||||
Ref: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3658
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
gio/tests/desktop-app-info.c | 35 +++++++++++++++++++++++++++++
|
||||
gio/tests/file.c | 43 ++++++++++++++++++++++--------------
|
||||
2 files changed, 62 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
|
||||
index ec65b7618..e492b1346 100644
|
||||
--- a/gio/tests/desktop-app-info.c
|
||||
+++ b/gio/tests/desktop-app-info.c
|
||||
@@ -125,6 +125,20 @@ create_app_info (const char *name)
|
||||
return info;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_update_desktop_database (void)
|
||||
+{
|
||||
+ const gchar *path = g_find_program_in_path ("update-desktop-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("update-desktop-database is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_delete (void)
|
||||
{
|
||||
@@ -134,6 +148,9 @@ test_delete (void)
|
||||
char *filename;
|
||||
gboolean res;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info = create_app_info ("Blah");
|
||||
|
||||
id = g_app_info_get_id (info);
|
||||
@@ -177,6 +194,9 @@ test_default (void)
|
||||
GList *list;
|
||||
GError *error = NULL;
|
||||
|
||||
+if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Blah1");
|
||||
info2 = create_app_info ("Blah2");
|
||||
info3 = create_app_info ("Blah3");
|
||||
@@ -316,6 +336,9 @@ test_default_async (void)
|
||||
GList *list;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
data.loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
info1 = create_app_info ("Blah1");
|
||||
@@ -418,6 +441,9 @@ test_fallback (void)
|
||||
GError *error = NULL;
|
||||
gint old_length;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Test1");
|
||||
info2 = create_app_info ("Test2");
|
||||
|
||||
@@ -492,6 +518,9 @@ test_last_used (void)
|
||||
GAppInfo *info1, *info2, *default_app;
|
||||
GError *error = NULL;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info1 = create_app_info ("Test1");
|
||||
info2 = create_app_info ("Test2");
|
||||
|
||||
@@ -1222,6 +1251,9 @@ test_default_uri_handler (void)
|
||||
gchar *file_path = NULL;
|
||||
GAppInfo *info;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
info = create_app_info_toucher ("Touch Handled", "handled",
|
||||
"x-scheme-handler/glib-touch",
|
||||
&file_path);
|
||||
@@ -1298,6 +1330,9 @@ test_default_uri_handler_async (void)
|
||||
gboolean called = FALSE;
|
||||
gint64 start_time, touch_time;
|
||||
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
+
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
info = create_app_info_toucher ("Touch Handled", "handled-async",
|
||||
"x-scheme-handler/glib-async-touch",
|
||||
diff --git a/gio/tests/file.c b/gio/tests/file.c
|
||||
index 72296d008..dba5fe66c 100644
|
||||
--- a/gio/tests/file.c
|
||||
+++ b/gio/tests/file.c
|
||||
@@ -3784,6 +3784,25 @@ create_command_line_app_info (const char *name,
|
||||
return g_steal_pointer (&info);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+skip_missing_update_desktop_database (void)
|
||||
+{
|
||||
+#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
+ g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
+ return TRUE;
|
||||
+#else
|
||||
+ const gchar *path = g_find_program_in_path ("update-desktop-database");
|
||||
+
|
||||
+ if (path == NULL)
|
||||
+ {
|
||||
+ g_test_skip ("update-desktop-database is required to run this test");
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ g_free (path);
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_query_default_handler_uri (void)
|
||||
{
|
||||
@@ -3793,10 +3812,8 @@ test_query_default_handler_uri (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
info = create_command_line_app_info ("Gio File Handler", "true",
|
||||
"x-scheme-handler/gio-file");
|
||||
@@ -3878,10 +3895,8 @@ test_query_default_handler_file (void)
|
||||
const char buffer[] = "Text file!\n";
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
text_file = g_file_new_tmp ("query-default-handler-XXXXXX", &iostream, &error);
|
||||
g_assert_no_error (error);
|
||||
@@ -3974,10 +3989,8 @@ test_query_default_handler_file_async (void)
|
||||
const guint8 binary_buffer[] = "\xde\xad\xbe\xff";
|
||||
GError *error = NULL;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
data.loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
@@ -4064,10 +4077,8 @@ test_query_default_handler_uri_async (void)
|
||||
GFile *file;
|
||||
GFile *invalid_file;
|
||||
|
||||
-#if defined(G_OS_WIN32) || defined(__APPLE__)
|
||||
- g_test_skip ("Default URI handlers are not currently supported on Windows or macOS");
|
||||
- return;
|
||||
-#endif
|
||||
+ if (skip_missing_update_desktop_database ())
|
||||
+ return;
|
||||
|
||||
info = create_command_line_app_info ("Gio File Handler", "true",
|
||||
"x-scheme-handler/gio-file");
|
||||
--
|
||||
2.44.0
|
||||
|
Loading…
Reference in a new issue