Repository navigation
flatpak-spawn: Add the ability to set a custom path for /app or /usr - #39
Merged
Merged
Conversation
smcv
commented
Dec 8, 2020
smcv
force-pushed
the
replace-usr
branch
2 times, most recently
from
December 10, 2020 13:16
8f6cee8 to
fc92208
Compare
smcv
force-pushed
the
replace-usr
branch
2 times, most recently
from
June 11, 2021 12:12
cf302c4 to
9494a47
Compare
smcv
marked this pull request as ready for review
June 11, 2021 12:14
Contributor
Author
|
@gasinvein reminded me that this was still marked as a draft. The Flatpak feature was finalized and merged, so this is now ready (other than needing #38 reviewed first). I've also added a unit test, now that #47 has provided a framework for testing it. No changes in the actual implementation. |
This will let us deal with arguments that are a single path, instead of a GStrv of paths. Signed-off-by: Simon McVittie <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
The Flatpak portal will reject paths that do not resolve to the same
thing in the container and on the host system. For example,
--sandbox-expose-path="$HOME/.config/my/file"
will not work, even if
--sandbox-expose-path="$HOME/.var/app/com.example.App/config/my/file"
would.
Existing apps like GNOME Web (Epiphany) get away with this because the
files they are exposing are below $XDG_CONFIG_HOME, $XDG_DATA_HOME or
$XDG_CACHE_HOME, which take values below ~/.var/app, but the same is
not necessarily going to be true for apps like Steam that use --persist.
Signed-off-by: Simon McVittie <[email protected]>
This is a client-side for <flatpak/flatpak#4018>. Steam's pressure-vessel tool does the equivalent of this to launch a parallel container with /usr supplied by the Steam Runtime, and an empty /app, although currently it has to use code derived from flatpak-spawn rather than using the runtime's copy of flatpak-spawn. Signed-off-by: Simon McVittie <[email protected]>
Instead of asserting that there is a hard-coded number of items in the dict, count how many items we have checked and then assert that there are no extra items left over at the end. This will make it easier to test more options that add more items. Signed-off-by: Simon McVittie <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on the refactoring from #38.
Factor out and improve path_to_handle() #38
flatpak-spawn: Add the ability to set a custom path for /app or /usr
This is a client-side for
Allow caller to supply a /usr to use instead of the runtime flatpak#4018.
Steam's pressure-vessel tool does the equivalent of this to launch
a parallel container with /usr supplied by the Steam Runtime, and an
empty /app, although currently it has to use code derived from
flatpak-spawn rather than using the runtime's copy of flatpak-spawn.
test-spawn: Check contents of options dict more extensibly
Instead of asserting that there is a hard-coded number of items in the
dict, count how many items we have checked and then assert that there
are no extra items left over at the end. This will make it easier to
test more options that add more items.
tests: Exercise flatpak-spawn --app-path and --usr-path