diff --git a/recipes-flatpak/flatpak/files/vartmp.patch b/recipes-flatpak/flatpak/files/vartmp.patch new file mode 100644 index 0000000..52462e8 --- /dev/null +++ b/recipes-flatpak/flatpak/files/vartmp.patch @@ -0,0 +1,50 @@ +diff --git a/common/flatpak-exports.c b/common/flatpak-exports.c +index 7e26d034..904198b0 100644 +--- a/common/flatpak-exports.c ++++ b/common/flatpak-exports.c +@@ -657,10 +657,10 @@ flatpak_exports_path_is_visible (FlatpakExports *exports, + static gboolean + never_export_as_symlink (const char *path) + { +- /* Don't export /tmp as a symlink even if it is on the host, because +- that will fail with the pre-existing directory we created for /tmp, ++ /* Don't export {/var,}/tmp as a symlink even if it is on the host, because ++ that will fail with the pre-existing directory we created for it, + and anyway, it being a symlink is not useful in the sandbox */ +- if (strcmp (path, "/tmp") == 0) ++ if (strcmp (path, "/tmp") == 0 || strcmp (path, "/var/tmp") == 0) + return TRUE; + + return FALSE; +diff --git a/tests/test-exports.c b/tests/test-exports.c +index b39fd477..c0af5689 100644 +--- a/tests/test-exports.c ++++ b/tests/test-exports.c +@@ -1305,6 +1305,8 @@ test_exports_unusual (void) + { "usr/lib", FAKE_DIR }, + { "usr/share", FAKE_DIR }, + { "var/home/me", FAKE_DIR }, ++ { "var/volatile/tmp", FAKE_DIR }, ++ { "var/tmp", FAKE_SYMLINK, "volatile/tmp" }, + { NULL } + }; + g_autoptr(FlatpakBwrap) bwrap = flatpak_bwrap_new (NULL); +@@ -1333,6 +1335,9 @@ test_exports_unusual (void) + flatpak_exports_add_path_expose (exports, + FLATPAK_FILESYSTEM_MODE_READ_ONLY, + "/tmp"); ++ flatpak_exports_add_path_expose (exports, ++ FLATPAK_FILESYSTEM_MODE_READ_WRITE, ++ "/var/tmp"); + flatpak_exports_add_path_expose (exports, + FLATPAK_FILESYSTEM_MODE_READ_ONLY, + "not-absolute"); +@@ -1346,6 +1351,8 @@ test_exports_unusual (void) + i = assert_next_is_bind (bwrap, i, "--ro-bind", "/tmp", "/tmp"); + i = assert_next_is_bind (bwrap, i, "--ro-bind", "/var/home/me", + "/var/home/me"); ++ i = assert_next_is_bind (bwrap, i, "--bind", "/var/tmp", ++ "/var/tmp"); + i = assert_next_is_bind (bwrap, i, "--ro-bind", "/usr", "/run/host/usr"); + i = assert_next_is_symlink (bwrap, i, "usr/bin", "/run/host/bin"); + i = assert_next_is_symlink (bwrap, i, "usr/lib", "/run/host/lib"); diff --git a/recipes-flatpak/flatpak/flatpak_git.bb b/recipes-flatpak/flatpak/flatpak_git.bb index e89aeb2..c112f90 100644 --- a/recipes-flatpak/flatpak/flatpak_git.bb +++ b/recipes-flatpak/flatpak/flatpak_git.bb @@ -4,12 +4,13 @@ LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SRC_URI = " \ - gitsm://git@github.com/flatpak/flatpak;protocol=https;branch=flatpak-1.10.x \ + gitsm://git@github.com/flatpak/flatpak;protocol=https;branch=master \ " +SRC_URI += " file://vartmp.patch " -SRCREV = "c614eb400ed9f9ec516d74a43e7d63783e3fe1fb" +SRCREV = "dd6b99d0d30129c1beab8fe61ba4f1beb15930c5" -PV = "1.10.2+git${SRCPV}" +PV = "1.11.3+git${SRCPV}" S = "${WORKDIR}/git" inherit autotools pkgconfig gettext systemd gobject-introspection gtk-doc manpages @@ -95,8 +96,8 @@ do_configure[vardeps] += "SYSROOT_DIR" do_configure_prepend() { # this reflects what autogen.sh does, but the OE wrappers for autoreconf # allow it to work without the other gyrations which exist there - sed -e 's,$(libglnx_srcpath),libglnx,g' < ${S}/libglnx/Makefile-libglnx.am >${S}/libglnx/Makefile-libglnx.am.inc - sed -e 's,$(bwrap_srcpath),bubblewrap,g' < ${S}/bubblewrap/Makefile-bwrap.am >${S}/bubblewrap/Makefile-bwrap.am.inc + sed -e 's,$(libglnx_srcpath),subprojects/libglnx,g' < ${S}/subprojects/libglnx/Makefile-libglnx.am >${S}/subprojects/libglnx/Makefile-libglnx.am.inc + sed -e 's,$(bwrap_srcpath),subprojects/bubblewrap,g' < ${S}/subprojects/bubblewrap/Makefile-bwrap.am >${S}/subprojects/bubblewrap/Makefile-bwrap.am.inc } BBCLASSEXTEND = "native"