Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:flatpak
User: [email protected]
Usertags: pu
[ Reason ]
Fix a regression in the Debian 13.3 update
[ Impact ]
One of the improvements in flatpak 1.16.2 clashed with what
gnome-builder was already doing as a workaround for essentially the same
issue, causing gnome-builder to regress. The only change in flatpak
1.16.3 addresses that regression.
(GNOME Foundry, a library and CLI tool based on gnome-builder, is also
affected; but that isn't in Debian.)
[ Tests ]
- Reproducer for the bug:
+ install gnome-builder in a Debian 13 VM
+ choose upstream Nautilus from the suggested projects
+ build it (hammer icon), gnome-builder builds in a flatpak environment
by default
+ run it ("play" triangle icon), it fails to launch with a bwrap error
- Upgrade to the proposed flatpak version
- Run the newly-built Nautilus from gnome-builder again, now it works
Also, the upstream test suite is run by autopkgtest and still passes.
[ Risks ]
This is a targeted change fixing one specific bug.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
(filtered to exclude timestamp updates in translation files)
[x] the issue is verified as fixed in unstable
[ Changes ]
It's a straightforward backport from unstable. As with the previous
trixie update, I reverted packaging changes made in unstable that
wouldn't have been appropriate for trixie.
debdiff flatpak_1.16.2-1~deb13u1.dsc flatpak_1.16.3-1~deb13u1.dsc | filterdiff -p1 -x'po/*.po'
diff -Nru flatpak-1.16.2/app/flatpak-builtins-build.c flatpak-1.16.3/app/flatpak-builtins-build.c
--- flatpak-1.16.2/app/flatpak-builtins-build.c 2025-12-15 17:52:28.000000000 +0000
+++ flatpak-1.16.3/app/flatpak-builtins-build.c 2026-01-21 11:19:58.000000000 +0000
@@ -59,14 +59,53 @@
{ NULL }
};
+static gboolean
+has_bind_mount_for_path (FlatpakBwrap *bwrap, const char *dest_path)
+{
+ guint i;
+
+ for (i = 0; i < bwrap->argv->len; i++)
+ {
+ const char *arg = g_ptr_array_index (bwrap->argv, i);
+
+ if (g_strcmp0 (arg, "--bind") == 0 ||
+ g_strcmp0 (arg, "--bind-try") == 0 ||
+ g_strcmp0 (arg, "--ro-bind") == 0 ||
+ g_strcmp0 (arg, "--ro-bind-try") == 0 ||
+ g_strcmp0 (arg, "--bind-data") == 0 ||
+ g_strcmp0 (arg, "--ro-bind-data") == 0)
+ {
+ /* For all bind mount types, the destination path is at index i+2.
+ *
+ * --bind/--ro-bind/--bind-try/--ro-bind-try: type, src, dest
+ * --bind-data/--ro-bind-data: type, fd_string, dest
+ */
+ if (i + 2 < bwrap->argv->len)
+ {
+ const char *dest = g_ptr_array_index (bwrap->argv, i + 2);
+ if (dest != NULL && g_strcmp0 (dest, dest_path) == 0)
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
static void
add_empty_font_dirs_xml (FlatpakBwrap *bwrap)
{
+ const char *font_dirs_path = "/run/host/font-dirs.xml";
+
+ /* Check if a bind mount already exists for this path */
+ if (has_bind_mount_for_path (bwrap, font_dirs_path))
+ return;
+
g_autoptr(GString) xml_snippet = g_string_new ("<?xml version=\"1.0\"?>\n"
"<!DOCTYPE fontconfig SYSTEM \"urn:fontconfig:fonts.dtd\">\n"
"<fontconfig></fontconfig>\n");
- if (!flatpak_bwrap_add_args_data (bwrap, "font-dirs.xml", xml_snippet->str, xml_snippet->len, "/run/host/font-dirs.xml", NULL))
+ if (!flatpak_bwrap_add_args_data (bwrap, "font-dirs.xml", xml_snippet->str, xml_snippet->len, font_dirs_path, NULL))
g_warning ("Unable to add fontconfig data snippet");
}
@@ -570,8 +609,6 @@
instance_id, NULL, cancellable, error))
return FALSE;
- add_empty_font_dirs_xml (bwrap);
-
for (i = 0; opt_bind_mounts != NULL && opt_bind_mounts[i] != NULL; i++)
{
char *split = strchr (opt_bind_mounts[i], '=');
@@ -588,6 +625,9 @@
NULL);
}
+ /* Add empty font-dirs.xml only if user hasn't already mapped it */
+ add_empty_font_dirs_xml (bwrap);
+
if (opt_build_dir != NULL)
{
flatpak_bwrap_add_args (bwrap,
diff -Nru flatpak-1.16.2/debian/changelog flatpak-1.16.3/debian/changelog
--- flatpak-1.16.2/debian/changelog 2025-12-20 17:15:35.000000000 +0000
+++ flatpak-1.16.3/debian/changelog 2026-01-24 21:55:30.000000000 +0000
@@ -1,3 +1,31 @@
+flatpak (1.16.3-1~deb13u1) trixie; urgency=medium
+
+ * Backport new upstream stable release for Debian 13
+ - In flatpak-build(1), only provide /run/host/font-dirs.xml if the
+ calling process has not already added it, fixing a regression for
+ users of GNOME Builder and Foundry (flatpak#6450 upstream)
+ * Revert changes that are not appropriate for a stable update:
+ - Revert "d/watch: Convert to v5 format, only watch stable
+ (even-numbered) releases"
+ - Revert "Standards-Version: 4.7.3"
+
+ -- Simon McVittie <[email protected]> Sat, 24 Jan 2026 21:55:30 +0000
+
+flatpak (1.16.3-1) unstable; urgency=medium
+
+ * New upstream stable release
+ - In flatpak-build(1), only provide /run/host/font-dirs.xml if the
+ calling process has not already added it, fixing a regression for
+ users of GNOME Builder and Foundry (flatpak#6450 upstream)
+ * Standards-Version: 4.7.3
+ - Remove Priority: optional, unnecessary since Debian 13
+ * d/watch: Convert to v5 format
+ * d/watch: Only watch stable (even-numbered) releases
+ - d/watch.devel: Add a second watch file for development
+ (odd-numbered) releases
+
+ -- Simon McVittie <[email protected]> Sat, 24 Jan 2026 16:05:24 +0000
+
flatpak (1.16.2-1~deb13u1) trixie; urgency=medium
* d/control, d/gbp.conf: Use debian/trixie packaging branch
diff -Nru flatpak-1.16.2/meson.build flatpak-1.16.3/meson.build
--- flatpak-1.16.2/meson.build 2025-12-15 17:52:28.000000000 +0000
+++ flatpak-1.16.3/meson.build 2026-01-21 11:19:58.000000000 +0000
@@ -4,7 +4,7 @@
project(
'flatpak',
'c',
- version : '1.16.2',
+ version : '1.16.3',
default_options: [
'warning_level=2',
],
@@ -13,7 +13,7 @@
flatpak_major_version = 1
flatpak_minor_version = 16
-flatpak_micro_version = 2
+flatpak_micro_version = 3
flatpak_extra_version = ''
flatpak_interface_age = 0
diff -Nru flatpak-1.16.2/NEWS flatpak-1.16.3/NEWS
--- flatpak-1.16.2/NEWS 2025-12-15 17:52:28.000000000 +0000
+++ flatpak-1.16.3/NEWS 2026-01-21 11:19:58.000000000 +0000
@@ -1,3 +1,11 @@
+Changes in 1.16.3
+~~~~~~~~~~~~~~~~~~
+Released: 2026-01-21
+
+Bug fixes:
+
+* Be selective about when to map `font-dirs.xml` in `flatpak build` (#6450)
+
Changes in 1.16.2
~~~~~~~~~~~~~~~~~~
Released: 2025-12-15