# How to use 1. Install latest flatpak-module-tools and koji-flatpak CLI plugin. ```sh dnf install flatpak-module-tools >= 1.0~a5 koji-flatpak-cli ``` 1. Check out an application ``` fedpkg clone flatpaks/ghex ``` 1. Edit the `container.yaml` for the application, ```diff diff --git a/container.yaml b/container.yaml index be91164..71dd2d0 100644 --- a/container.yaml +++ b/container.yaml @@ -1,9 +1,10 @@ -compose: - modules: - - ghex:stable flatpak: id: org.gnome.GHex branch: stable + runtime-name: flatpak-runtime + runtime-version: f39 + packages: + - ghex command: ghex finish-args: |- --device=dri ``` `packages` here only needs to be the *leaf* packages, not dependencies. 1. Build any necessary dependencies into `f39-flatpak-app` ```sh flatpak-module build-rpms --auto ``` If you type `?` at the prompt, it will show an explanation of why each package is being included. 1. Build the container: ```sh git push origin stable flatpak-module build-container ``` 1. Install it and test it out: ```sh # Install the most recent build of ghex from Koji flatpak-module install --koji ghex flatpak run org.gnome.GHex ``` ## Other tasks: * Rebuild RPMs locally ```sh flatpak-module build-rpms-local --auto ``` * Rebuild a specific package ```sh flatpak-module build-rpms LibRaw ``` * Rebuild a local repository of one package, along with the current versions of other outdated dependencies: ```sh flatpak-module build-rpms-local ../rpms/LibRaw --auto ``` * Do a local container build from local packages ```sh flatpak-module build-container-local ``` * Build a runtime locally - need to specify the target: ```sh flatpak-module build-container-local --target=f39-flatpak-candidate --install ``` * Build a Flatpak against a local runtime: ```sh RUNTIME=$(pwd)/x86_64/result/flatpak-runtime-f39-1.x86_64.oci.tar.gz cd ../ghex flatpak-module build-rpms-local --auto --local-runtime=$RUNTIME flatpak-module build-container-local --local-runtime=$RUNTIME ``` * Use a common local RPM repository shared between containers: ```sh flatpak-module build-rpms-local --auto --local-repo=$HOME/.fmt-repo flatpak-module build-container-local --local-runtime=$HOME/.fmt-repo ```