Skip to content

Prepare to update Flatpak-derived code

Simon McVittie requested to merge wip/smcv/flatpak-1.14.1-prep into main
  • Update flatpak-session-helper.h to Flatpak 1.14.1

    With this version, we no longer define FlatpakHostCommandFlags in launch-client (and in fact it would be an error).

  • pv-wrap: Detect whether bubblewrap supports --perms option

    Flatpak 1.14.x assumes a version of bubblewrap that supports the --perms option. If our Flatpak-derived code produces an arguments list that includes that option, filter it out if we're using a system copy of bubblewrap that doesn't support it: it's non-essential.

    As of 1.12.7 (last time we updated our copy) and 1.14.1 (current stable release), none of the code paths we actually take from Flatpak make use of --perms, but they legitimately could. A manual test for whether this is working correctly:

    • Insert "--perms", "0700" before "--tmpfs", "/tmp/.X11-unix" in flatpak_run_add_x11_args()
    • Run the test suite with build-aux/many-builds.py test (for simplicity, do this on a system where the bundled bubblewrap can be used). Expected result: the log for containers.py indicates that the final bwrap command has --perms 0700 --tmpfs /tmp/.X11-unix.
    • Edit the check in test_bwrap_executable() so detection fails, by replacing "--perms" with "--UNSUPPORTED-perms".
    • Run the test suite again. Expected result: we log Ignoring "--perms 0700" because bwrap is too old and later, the log indicates that the final bwrap command only has --tmpfs /tmp/.X11-unix.

The rest of the update to 1.14.1 will be a separate MR, which doesn't really need review.

Merge request reports

Loading