1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 19:07:54 +01:00

set platform_id

This commit is contained in:
Jason N. 2024-03-07 13:46:57 -05:00
parent d4a65caf44
commit 80a1e2786e
2 changed files with 10 additions and 1 deletions

View file

@ -137,7 +137,13 @@ repos/%.repo: /etc/yum.repos.d/%.repo
# Step 3: Build boot.iso using Lorax
boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
rm -Rf $(_BASE_DIR)/results || true
rm /etc/rpm/macros.image-language-conf || true
mv /etc/rpm/macros.image-language-conf /etc/rpm/macros.image-language-conf.orig || true
cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf.orig || true
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
echo "module_platform_id=platform:el${VERSION} >> /etc/dnf/dnf.conf
else
echo "module_platform_id=platform:f${VERSION} >> /etc/dnf/dnf.conf
endif
# Download the secure boot key
if [ -n "$(SECURE_BOOT_KEY_URL)" ]; \
@ -155,6 +161,8 @@ boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
$(foreach var,$(_TEMPLATE_VARS),--add-template-var "$(shell echo $(var) | tr '[:upper:]' '[:lower:]')=$($(var))") \
$(_BASE_DIR)/results/
mv $(_BASE_DIR)/results/images/boot.iso $(_BASE_DIR)/
mv /etc/rpm/macros.image-language-conf.orig /etc/rpm/macros.image-language-conf || true
mv -f /etc/dnf/dnf.conf.orig /etc/dnf/dnf.conf || true
# Step 4: Download container image
container/$(IMAGE_NAME)-$(IMAGE_TAG):