diff --git a/extra/flatpak/0001-Set-size-of-file-info-for-symlinks-to-0.patch b/extra/flatpak/0001-Set-size-of-file-info-for-symlinks-to-0.patch new file mode 100644 index 000000000..f15cfd8de --- /dev/null +++ b/extra/flatpak/0001-Set-size-of-file-info-for-symlinks-to-0.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Fri, 17 Mar 2023 01:58:24 +0100 +Subject: [PATCH] Set size of file info for symlinks to 0 + +`ostree_raw_file_to_content_stream` will try to read it, causing a +critical warning with GLib 2.76 causing tests to fail. +--- + common/flatpak-utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c +index f28fdc071b1c..b8ad97003877 100644 +--- a/common/flatpak-utils.c ++++ b/common/flatpak-utils.c +@@ -5056,6 +5056,7 @@ flatpak_mtree_create_symlink (OstreeRepo *repo, + + g_file_info_set_name (file_info, filename); + g_file_info_set_file_type (file_info, G_FILE_TYPE_SYMBOLIC_LINK); ++ g_file_info_set_size (file_info, 0); + g_file_info_set_attribute_uint32 (file_info, "unix::uid", 0); + g_file_info_set_attribute_uint32 (file_info, "unix::gid", 0); + g_file_info_set_attribute_uint32 (file_info, "unix::mode", S_IFLNK | 0777); diff --git a/extra/flatpak/0002-tests-Don-t-use-g_test_message-before-g_test_init.patch b/extra/flatpak/0002-tests-Don-t-use-g_test_message-before-g_test_init.patch new file mode 100644 index 000000000..d5bcf4fb4 --- /dev/null +++ b/extra/flatpak/0002-tests-Don-t-use-g_test_message-before-g_test_init.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Fri, 17 Mar 2023 02:08:38 +0100 +Subject: [PATCH] tests: Don't use g_test_message before g_test_init + +Meson will fail a test using TAP if the first line on stdout isn't the +TAP version declaration. +--- + tests/testlib.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/testlib.c b/tests/testlib.c +index 41f27ac9f541..d51cec375bf6 100644 +--- a/tests/testlib.c ++++ b/tests/testlib.c +@@ -50,38 +50,38 @@ isolated_test_dir_global_setup (void) + + isolated_test_dir = g_strdup ("/tmp/flatpak-test-XXXXXX"); + assert_mkdtemp (isolated_test_dir); +- g_test_message ("isolated_test_dir: %s", isolated_test_dir); ++ g_printerr ("isolated_test_dir: %s\n", isolated_test_dir); + + homedir = g_strconcat (isolated_test_dir, "/home", NULL); + g_assert_no_errno (g_mkdir_with_parents (homedir, S_IRWXU | S_IRWXG | S_IRWXO)); + + g_setenv ("HOME", homedir, TRUE); +- g_test_message ("setting HOME=%s", homedir); ++ g_printerr ("setting HOME=%s\n", homedir); + + cachedir = g_strconcat (isolated_test_dir, "/home/cache", NULL); + g_assert_no_errno (g_mkdir_with_parents (cachedir, S_IRWXU | S_IRWXG | S_IRWXO)); + g_setenv ("XDG_CACHE_HOME", cachedir, TRUE); +- g_test_message ("setting XDG_CACHE_HOME=%s", cachedir); ++ g_printerr ("setting XDG_CACHE_HOME=%s\n", cachedir); + + configdir = g_strconcat (isolated_test_dir, "/home/config", NULL); + g_assert_no_errno (g_mkdir_with_parents (configdir, S_IRWXU | S_IRWXG | S_IRWXO)); + g_setenv ("XDG_CONFIG_HOME", configdir, TRUE); +- g_test_message ("setting XDG_CONFIG_HOME=%s", configdir); ++ g_printerr ("setting XDG_CONFIG_HOME=%s\n", configdir); + + datadir = g_strconcat (isolated_test_dir, "/home/share", NULL); + g_assert_no_errno (g_mkdir_with_parents (datadir, S_IRWXU | S_IRWXG | S_IRWXO)); + g_setenv ("XDG_DATA_HOME", datadir, TRUE); +- g_test_message ("setting XDG_DATA_HOME=%s", datadir); ++ g_printerr ("setting XDG_DATA_HOME=%s\n", datadir); + + statedir = g_strconcat (isolated_test_dir, "/home/state", NULL); + g_assert_no_errno (g_mkdir_with_parents (statedir, S_IRWXU | S_IRWXG | S_IRWXO)); + g_setenv ("XDG_STATE_HOME", statedir, TRUE); +- g_test_message ("setting XDG_STATE_HOME=%s", statedir); ++ g_printerr ("setting XDG_STATE_HOME=%s\n", statedir); + + runtimedir = g_strconcat (isolated_test_dir, "/runtime", NULL); + g_assert_no_errno (g_mkdir_with_parents (runtimedir, S_IRWXU)); + g_setenv ("XDG_RUNTIME_DIR", runtimedir, TRUE); +- g_test_message ("setting XDG_RUNTIME_DIR=%s", runtimedir); ++ g_printerr ("setting XDG_RUNTIME_DIR=%s\n", runtimedir); + + g_reload_user_special_dirs_cache (); + diff --git a/extra/flatpak/PKGBUILD b/extra/flatpak/PKGBUILD index 32a0836f3..012be1af1 100644 --- a/extra/flatpak/PKGBUILD +++ b/extra/flatpak/PKGBUILD @@ -8,7 +8,7 @@ pkgbase=flatpak pkgname=(flatpak flatpak-docs) -pkgver=1.15.3 +pkgver=1.15.4 pkgrel=1 epoch=1 pkgdesc="Linux application sandboxing and distribution framework (formerly xdg-app)" @@ -46,7 +46,7 @@ makedepends=( checkdepends=( valgrind ) -_commit=756994b5c433dad9786f9fad736667c4f524aeac # tags/1.15.3^0 +_commit=e936e3100d406c50ba49f3ad6a0ecae455345ec0 # tags/1.15.4^0 source=( "git+https://github.com/flatpak/flatpak#commit=$_commit" git+https://gitlab.gnome.org/GNOME/libglnx.git @@ -54,6 +54,8 @@ source=( git+https://github.com/flatpak/xdg-dbus-proxy git+https://gitlab.gnome.org/alexl/variant-schema-compiler.git https://dl.flathub.org/repo/flathub.flatpakrepo + 0001-Set-size-of-file-info-for-symlinks-to-0.patch + 0002-tests-Don-t-use-g_test_message-before-g_test_init.patch fusermount3.diff flatpak-bindir.sh ) @@ -63,6 +65,8 @@ b2sums=('SKIP' 'SKIP' 'SKIP' 'c094461a28dab284c1d32cf470f38118a6cbce27acce633b81945fb859daef9bdec1261490f344221b5cacf4437f53934cb51173f7ad2f1d2e05001139e75c54' + 'e143c7bb1179b3fb337b05b14e3a2506b5603d315739e38df99264f98c362113fa4cc92bb3442c47354a3d0d91fd3dc6a9d4f92c7991db725867550c3ec07ca8' + '16e3006819ae991f676426163e69656b4340b8ca83c615668120858ec8e0a100c73e34b84ff94e6a62c6b5e7c9b95cf27ac95b9a8b33e81d53cc031364c53db3' '81010a49af57e6047ab57285e3f8430da3b2be8504bc5600502da9a3729e9f92bb086a314ca8a03bca446e8f203150e378f3443f7034d8d7ade9dad6f1b9db59' '1c45caa65e2a1598f219977d5a81dcb8ea5d458880c43c40ba452b0c77cbbf41b36fa6911741f22c807d318e04e39e4fcc1455ed8d68faaba10162dae2570abc') @@ -74,6 +78,10 @@ pkgver() { prepare() { cd flatpak + # Fix tests + git apply -3 ../0001-Set-size-of-file-info-for-symlinks-to-0.patch + git apply -3 ../0002-tests-Don-t-use-g_test_message-before-g_test_init.patch + # Support fuse3 # https://bugs.archlinux.org/task/75623 git apply -3 ../fusermount3.diff