Manage installed Flatpaks via a read-only filesystem.
| .gitignore | Initial Commit | |
| flatpak-readonlyroot.py | Replace "repositories" with "remotes" in log message | |
| README.md | Improve Containerfile example in readme | |
flatpak-readonlyroot
Manage installed Flatpaks via a read-only filesystem.
May be obsoleted by preinstall in future Flatpak versions.
Creates files under /etc/flatpak/installations.d, /etc/profile.d, and /usr/lib/flatpak-readonlyroot (by default)
Usage
Requirements:
- Python 3.11+
- Flatpak
Command line
usage: python3.11 flatpak-readonlyroot [-h] [--location FLATPAK_LOCATION] [--name INSTALLATION_NAME] config_path
Manage Flatpaks installed via a read-only filesystem
positional arguments:
config_path flatpak-readonlyroot toml configuration file
options:
-h, --help show this help message and exit
--location FLATPAK_LOCATION
Path to store Flatpak data, Default: /usr/lib/flatpak-readonlyroot
--name INSTALLATION_NAME
Name for Flatpak installation, Default: "installation"
Configuration
Example config in toml:
[[remotes]]
name = "flathub" # Required
url = "https://dl.flathub.org/repo/flathub.flatpakrepo" # Require one of url, file
# file = "/example/path/flathub.flatpakrepo" # Exclusive with url
[[packages]]
remote = "flathub" # Required if using app_id, incompatible otherwise
app_id = "org.gimp.GIMP" # Require one of app_id, bundle_file, bundle_url
# bundle_file = "org.heliumos.bootc_gtk.flatpak"
# bundle_url = "https://codeberg.org/HeliumOS/bootc-gtk/releases/download/0.2/org.heliumos.bootc_gtk.flatpak"
Containerfile
Example usage with bootc Containerfile
FROMquay.io/heliumos/bootc:9RUN dnf install -y flatpak python3.11RUN mkdir /var/roothome # Needed for bootc systemsRUN curl -O https://codeberg.org/HeliumOS/flatpak-readonlyroot/raw/tag/v0.2/flatpak-readonlyroot.pyCOPY flatpak-readonlyroot.toml flatpak.tomlRUN python3.11 flatpak-readonlyroot.py flatpak.tomlRUN dnf remove -y python3.11RUN rm -rdf /var/roothome