diff --git a/packaging/flatpak/net.catcrafts.CrafterBuild.yaml b/packaging/flatpak/net.catcrafts.CrafterBuild.yaml index fa926fb..6915b89 100644 --- a/packaging/flatpak/net.catcrafts.CrafterBuild.yaml +++ b/packaging/flatpak/net.catcrafts.CrafterBuild.yaml @@ -33,6 +33,16 @@ finish-args: - --device=all # lldb, and gdb and friends from the Sdk - --allow=devel + # `crafter-build install` and `bundle` run the host's flatpak and + # flatpak-builder, through :Platform's host helpers (RunHostFlatpak, + # RunHostFlatpakBuilder and HostFlatpakUnavailable's probes, every command + # line built by HostCommand); crafter-build's own code reaches the host + # for nothing else. The permission is the whole sandbox's: a project.cpp, + # its scripts, the builds of its dependencies and the programs -r and + # test start can run host commands with it too. --filesystem=host already + # lets them arrange that, by writing ~/.bashrc, so it makes running + # something on the host immediate rather than possible. + - --talk-name=org.freedesktop.Flatpak - --env=PATH=/app/bin:/usr/bin cleanup: - /share/man diff --git a/project.cpp b/project.cpp index fb99112..b64dc76 100644 --- a/project.cpp +++ b/project.cpp @@ -47,7 +47,7 @@ namespace { // itself runs in as a Flatpak has none. bool RefusedInSandbox(std::string_view script) { if (!fs::exists("/.flatpak-info")) return false; - std::println(std::cerr, "run {0}: needs the host's flatpak, which the Flatpak build of crafter-build cannot reach. Use a native build: ./build.sh, then ./bin/crafter-build run {0}", script); + std::println(std::cerr, "run {0}: runs flatpak itself, which the Flatpak build of crafter-build does not have (its install and bundle verbs reach the host's through flatpak-spawn instead). Use a native build: ./build.sh, then ./bin/crafter-build run {0}", script); return true; }