mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
remove .in
This commit is contained in:
parent
7bb619735c
commit
1f767a9f6d
10 changed files with 34 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,7 +3,6 @@
|
||||||
/pkglists
|
/pkglists
|
||||||
/repos
|
/repos
|
||||||
/results
|
/results
|
||||||
/lorax_templates/*.tmpl
|
|
||||||
/xorriso/input.txt
|
/xorriso/input.txt
|
||||||
/xorriso/*.sh
|
/xorriso/*.sh
|
||||||
/original-pkgsizes.txt
|
/original-pkgsizes.txt
|
||||||
|
|
|
||||||
47
Makefile
47
Makefile
|
|
@ -1,22 +1,25 @@
|
||||||
# Configuration vars
|
# Configuration vars
|
||||||
## Formatting = UPPERCASE
|
## Formatting = UPPERCASE
|
||||||
|
# General
|
||||||
|
ADDITIONAL_TEMPLATES =
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
VERSION = 39
|
EXTRA_BOOT_PARAMS =
|
||||||
IMAGE_REPO = quay.io/fedora-ostree-desktops
|
|
||||||
IMAGE_NAME = base
|
IMAGE_NAME = base
|
||||||
|
IMAGE_REPO = quay.io/fedora-ostree-desktops
|
||||||
IMAGE_TAG = $(VERSION)
|
IMAGE_TAG = $(VERSION)
|
||||||
VARIANT = Server
|
|
||||||
WEB_UI = false
|
|
||||||
REPOS = $(subst :,\:,$(shell ls /etc/yum.repos.d/*.repo))
|
REPOS = $(subst :,\:,$(shell ls /etc/yum.repos.d/*.repo))
|
||||||
ADDITIONAL_TEMPLATES =
|
ROOTFS_SIZE = 4
|
||||||
|
VARIANT = Server
|
||||||
|
VERSION = 39
|
||||||
|
WEB_UI = false
|
||||||
|
# Flatpak
|
||||||
FLATPAK_REMOTE_NAME = flathub
|
FLATPAK_REMOTE_NAME = flathub
|
||||||
FLATPAK_REMOTE_URL = https://flathub.org/repo/flathub.flatpakrepo
|
FLATPAK_REMOTE_URL = https://flathub.org/repo/flathub.flatpakrepo
|
||||||
FLATPAK_REMOTE_REFS =
|
FLATPAK_REMOTE_REFS =
|
||||||
|
# Secure boot
|
||||||
ENROLLMENT_PASSWORD =
|
ENROLLMENT_PASSWORD =
|
||||||
SECURE_BOOT_KEY_URL =
|
SECURE_BOOT_KEY_URL =
|
||||||
ADDITIONAL_TEMPLATES =
|
# Cache
|
||||||
EXTRA_BOOT_PARAMS =
|
|
||||||
ROOTFS_SIZE = 4
|
|
||||||
DNF_CACHE =
|
DNF_CACHE =
|
||||||
|
|
||||||
# Generated/internal vars
|
# Generated/internal vars
|
||||||
|
|
@ -26,14 +29,14 @@ _IMAGE_REPO_ESCAPED = $(subst /,\/,$(IMAGE_REPO))
|
||||||
_IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
_IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
||||||
_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
|
_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
|
||||||
_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS))
|
_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS))
|
||||||
_ALL_LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in)) $(foreach file,$(shell ls lorax_templates/scripts/post),lorax_templates/post_$(file).tmpl)
|
_LORAX_TEMPLATES = $(shell ls lorax_templates/install_*.tmpl) $(foreach file,$(notdir $(shell ls lorax_templates/scripts/post/install_*)),lorax_templates/post_$(file).tmpl)
|
||||||
_EXTERNAL_TEMPLATES = fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
|
_LORAX_TEMPLATES_FLATPAKS = $(shell ls lorax_templates/flatpak_*.tmpl) $(foreach file,$(notdir $(shell ls lorax_templates/scripts/post/flatpak_*)),lorax_templates/post_$(file).tmpl) external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
|
||||||
_EXCLUDED_TEMPLATES = lorax_templates/copy_dnf_cache.tmpl
|
_LORAX_TEMPLATES_SECUREBOOT = $(shell ls lorax_templates/secureboot_*.tmpl) $(foreach file,$(notdir $(shell ls lorax_templates/scripts/post/secureboot_*)),lorax_templates/post_$(file).tmpl)
|
||||||
_LORAX_TEMPLATES = $(filter-out $(_EXCLUDED_TEMPLATES),$(_ALL_LORAX_TEMPLATES))
|
_LORAX_TEMPLATES_CACHE = $(shell ls lorax_templates/cache_*.tmpl) $(foreach file,$(notdir $(shell ls lorax_templates/scripts/post/cache_*)),lorax_templates/post_$(file).tmpl)
|
||||||
_LORAX_ARGS =
|
_LORAX_ARGS =
|
||||||
_FLATPAK_REPO_URL = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
_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)
|
_FLATPAK_REPO_GPG = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
||||||
_TEMPLATE_VARS = ARCH VERSION IMAGE_REPO IMAGE_NAME IMAGE_TAG VARIANT WEB_UI REPOS _IMAGE_REPO_ESCAPED _IMAGE_REPO_DOUBLE_ESCAPED FLATPAK_REMOTE_NAME FLATPAK_REMOTE_URL FLATPAK_REMOTE_REFS _FLATPAK_REPO_URL _FLATPAK_REPO_GPG ENROLLMENT_PASSWORD
|
_TEMPLATE_VARS = ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS VARIANT VERSION WEB_UI
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
||||||
|
|
@ -49,8 +52,8 @@ _LORAX_ARGS += -i anaconda-webui
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(DNF_CACHE),)
|
ifneq ($(DNF_CACHE),)
|
||||||
_LORAX_ARGS += --cachedir $(DNF_CACHE)
|
_LORAX_ARGS += --cachedir $(DNF_CACHE)
|
||||||
_LORAX_TEMPLATES += lorax_templates/copy_dnf_cache.tmpl
|
_LORAX_TEMPLATES += $(_LORAX_TEMPLATES_CACHE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
||||||
|
|
@ -60,7 +63,14 @@ _PLATFORM_ID = platform:f$(VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(FLATPAK_REMOTE_REFS),)
|
ifneq ($(FLATPAK_REMOTE_REFS),)
|
||||||
_LORAX_ARGS += -i flatpak-libs
|
_LORAX_ARGS += -i flatpak-libs
|
||||||
|
_LORAX_TEMPLATES += $(_LORAX_TEMPLATES_FLATPAKS)
|
||||||
|
_TEMPLATE_VARS += FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(SECURE_BOOT_KEY_URL),)
|
||||||
|
_LORAX_TEMPLATES += $(_LORAX_TEMPLATES_SECUREBOOT)
|
||||||
|
_TEMPLATE_VARS += ENROLLMENT_PASSWORD
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Step 7: Build end ISO
|
# Step 7: Build end ISO
|
||||||
|
|
@ -135,9 +145,6 @@ lorax_templates/post_%.tmpl: lorax_templates/scripts/post/%
|
||||||
done < lorax_templates/scripts/post/$*
|
done < lorax_templates/scripts/post/$*
|
||||||
echo "append $(_ISO_FILE) \"%end\"" >> lorax_templates/post_$*.tmpl
|
echo "append $(_ISO_FILE) \"%end\"" >> lorax_templates/post_$*.tmpl
|
||||||
|
|
||||||
lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
|
|
||||||
$(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED)
|
|
||||||
$(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl
|
|
||||||
|
|
||||||
repos: $(_REPO_FILES)
|
repos: $(_REPO_FILES)
|
||||||
|
|
||||||
|
|
@ -152,7 +159,7 @@ repos/%.repo: /etc/yum.repos.d/%.repo
|
||||||
%.repo:
|
%.repo:
|
||||||
|
|
||||||
# Step 3: Build boot.iso using Lorax
|
# Step 3: Build boot.iso using Lorax
|
||||||
boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
|
boot.iso: $(findstring lorax_templates/,$(_LORAX_TEMPLATES)) $(_REPO_FILES)
|
||||||
rm -Rf $(_BASE_DIR)/results || true
|
rm -Rf $(_BASE_DIR)/results || true
|
||||||
mv /etc/rpm/macros.image-language-conf /etc/rpm/macros.image-language-conf.orig || true
|
mv /etc/rpm/macros.image-language-conf /etc/rpm/macros.image-language-conf.orig || true
|
||||||
cp /etc/os-release /etc/os-release.orig || true
|
cp /etc/os-release /etc/os-release.orig || true
|
||||||
|
|
|
||||||
3
lorax_templates/cache_copy_dnf.tmpl
Normal file
3
lorax_templates/cache_copy_dnf.tmpl
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<%page args="dnf_cache"/>
|
||||||
|
|
||||||
|
runcmd bash -c "if [[ -d ${dnf_cache} ]]; then cp -R ${dnf_cache} ${dnf_cache}_new; fi"
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
runcmd bash -c "if [[ -d /cache/dnf_new ]]; then cp -R /cache/dnf /cache/dnf_new; fi"
|
|
||||||
4
lorax_templates/install_set_installer.tmpl
Normal file
4
lorax_templates/install_set_installer.tmpl
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<%page args="image_name, image_tag"/>
|
||||||
|
|
||||||
|
append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${image_name}-${image_Tag} --transport=oci --no-signature-verification"
|
||||||
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${IMAGE_NAME}-${IMAGE_TAG} --transport=oci --no-signature-verification"
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue