diff --git a/Makefile b/Makefile index c860859..51c0b16 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ _VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$( ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) export _RHEL := true else -export _RHEL := false +undefine _RHEL endif ifeq ($(_RHEL),true) @@ -109,8 +109,8 @@ results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templat $(if $(wildcard results), rm -Rf results) $(if $(wildcard /etc/rpm/macros.image-language-conf),mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf) - lorax -p $(if $(findstring true,$(_RHEL)),RHEL,$(IMAGE_NAME)) -v $(VERSION) -r $(VERSION) $($(VARIANT),-t $(VARIANT)) \ - --isfinal --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \ + lorax -p $(if $(_RHEL),RHEL,$(IMAGE_NAME)) -v $(VERSION) -r $(VERSION) $($(VARIANT),-t $(VARIANT)) \ + --isfinal $(if $(_RHEL),,--squashfs-only) --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \ $(_LORAX_ARGS) \ $(foreach file,$(_REPO_FILES),--repo $(PWD)/$(file)) \ $(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \ diff --git a/external/Makefile b/external/Makefile index aeb0497..9c7376e 100644 --- a/external/Makefile +++ b/external/Makefile @@ -1,6 +1,6 @@ lorax/branch-$(VERSION): git config advice.detachedHead false - cd lorax && git reset --hard HEAD && git checkout $(if $(findstring true,$(_RHEL)),rhel$(VERSION)-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)) + cd lorax && git reset --hard HEAD && git checkout $(if $(_RHEL),rhel$(VERSION)-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)) touch lorax/branch-$(VERSION) install-deps: diff --git a/lorax_templates/scripts/post/install_configure_upgrades b/lorax_templates/scripts/post/install_configure_upgrades index f474d93..4a98f58 100644 --- a/lorax_templates/scripts/post/install_configure_upgrades +++ b/lorax_templates/scripts/post/install_configure_upgrades @@ -1,5 +1,5 @@ <%page args="image_repo, _image_repo_double_escaped, image_name, image_tag, _rhel, version"/> -if (which bootc &> /dev/null) && [ ${_rhel} == 'false' && ${version} -ge 39 ] +if (which bootc &> /dev/null) && [ "${_rhel}" != 'true' && ${version} -ge 39 ] then bootc switch --mutate-in-place --enforce-container-sigpolicy --transport registry ${image_repo}/${image_name}:${image_tag} else diff --git a/test/iso/Makefile b/test/iso/Makefile index 3f3f76f..7ded145 100644 --- a/test/iso/Makefile +++ b/test/iso/Makefile @@ -10,9 +10,10 @@ $(ISO_TESTS): mnt/iso mnt/iso: sudo modprobe loop - sudo mkdir -p mnt/iso mnt/install + sudo mkdir -p mnt/iso mnt/live mnt/install sudo mount -o loop ../../$(ISO_NAME) mnt/iso - sudo mount -t squashfs -o loop mnt/iso/images/install.img mnt/install + sudo mount -t squashfs -o loop mnt/iso/images/install.img $(if $(_RHEL),mnt/live,mnt/install) + $(if $(_RHEL),sudo mount mnt/live/LiveOS/rootfs.img mnt/install) clean: sudo umount mnt/install || true