diff --git a/Makefile b/Makefile index c222730..fa103f5 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ # General ADDITIONAL_TEMPLATES = ARCH = x86_64 +BOOTC = true EXTRA_BOOT_PARAMS = IMAGE_NAME = base IMAGE_REPO = quay.io/fedora-ostree-desktops @@ -33,7 +34,7 @@ _LORAX_TEMPLATES = $(shell ls lorax_templates/install_*.tmpl) \ $(foreach file,$(notdir $(shell ls lorax_templates/scripts/post/install_*)),lorax_templates/post_$(file).tmpl) _REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS)) _TEMP_DIR = $(shell mktemp -d) -_TEMPLATE_VARS = ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS VARIANT VERSION WEB_UI +_TEMPLATE_VARS = ARCH _BASE_DIR IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS VARIANT VERSION WEB_UI _VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) @@ -83,6 +84,10 @@ _LORAX_TEMPLATES += $(shell ls lorax_templates/secureboot_*.tmpl) \ _TEMPLATE_VARS += ENROLLMENT_PASSWORD endif +ifeq ($(BOOTC),true) +_LORAX_TEMPLATES += $(shell ls lorax_templates/bootc_*.tmpl) +endif + # Step 7: Build end ISO ## Default action build/deploy.iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.txt @@ -232,7 +237,7 @@ clean: rm -f $(_BASE_DIR)/*.log || true install-deps: - dnf install -y lorax xorriso skopeo flatpak dbus-daemon ostree coreutils gettext git + dnf install -y lorax xorriso skopeo flatpak dbus-daemon ostree coreutils gettext git patch test: test-iso test-vm diff --git a/lorax_templates/bootc_patch.tmpl b/lorax_templates/bootc_patch.tmpl new file mode 100644 index 0000000..171ee89 --- /dev/null +++ b/lorax_templates/bootc_patch.tmpl @@ -0,0 +1,3 @@ +<%page args="_base_dir, root"/> + +runcmd patch ${root}/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py ${_base_dir}/lorax_templates/bootc_patch/39.patch \ No newline at end of file diff --git a/lorax_templates/bootc_patch/39.patch b/lorax_templates/bootc_patch/39.patch new file mode 100644 index 0000000..dc6f2ac --- /dev/null +++ b/lorax_templates/bootc_patch/39.patch @@ -0,0 +1,11 @@ +577,578c577,579 +< args = ["install", "to-filesystem", "--source-imgref=" + ref, +< self._physroot] +--- +> args = ["container", "image", "deploy", +> "--sysroot=" + self._physroot, +> "--image=" + ref] +588c589 +< "bootc", +--- +> "ostree", \ No newline at end of file