diff --git a/Makefile b/Makefile index db1e2f5..9762220 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,10 @@ _VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) _REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS)) _LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in)) _FLATPAK_TEMPLATES = $(_BASE_DIR)/external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl -_TEMPLATE_VARS = FLATPAK_REMOTE_NAME FLATPAK_REMOTE_URL FLATPAK_REMOTE_REFS +_FLATPAK_REPO_URL = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) +_FLATPAK_REPO_GPG = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) +_TEMPLATE_VARS = FLATPAK_REMOTE_NAME FLATPAK_REMOTE_URL FLATPAK_REMOTE_REFS _FLATPAK_REPO_URL _FLATPAK_REPO_GPG + ifeq ($(VARIANT),Server) _LORAX_ARGS = --macboot --noupgrade diff --git a/lorax_templates/set_flatpak_repo.tmpl.in b/lorax_templates/set_flatpak_repo.tmpl.in new file mode 100644 index 0000000..93194fe --- /dev/null +++ b/lorax_templates/set_flatpak_repo.tmpl.in @@ -0,0 +1,4 @@ +replace 'flatpak_manager.add_remote("fedora", "oci+https://registry.fedoraproject.org")', 'flatpak_manager.add_remote("${flatpak_remote_name}", "${_FLATPAK_REPO_URL}")' /usr/lib64/python3.12/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py +append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail" +append usr/share/anaconda/interactive-defaults.ks "cat ${_FLATPAK_REPO_GPG} | base64 -d > /ostree/deploy/default/var/lib/flatpak/repo/flathub.trustedkeys.gpg" +append usr/share/anaconda/interactive-defaults.ks "%end" \ No newline at end of file