mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
dynamic repo reference
This commit is contained in:
parent
5fda12d0c6
commit
70866c9e57
2 changed files with 7 additions and 4 deletions
7
Makefile
7
Makefile
|
|
@ -7,6 +7,7 @@ IMAGE_NAME = base
|
||||||
IMAGE_TAG = $(VERSION)
|
IMAGE_TAG = $(VERSION)
|
||||||
VARIANT = Server
|
VARIANT = Server
|
||||||
WEB_UI = false
|
WEB_UI = false
|
||||||
|
REPOS = /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
|
||||||
|
|
||||||
# Generated vars
|
# Generated vars
|
||||||
## Formatting = _UPPERCASE
|
## Formatting = _UPPERCASE
|
||||||
|
|
@ -14,6 +15,7 @@ _BASE_DIR = $(shell pwd)
|
||||||
_IMAGE_REPO_ESCAPED = $(subst /,\/,$(IMAGE_REPO))
|
_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 = $(notdir $(REPOS))
|
||||||
|
|
||||||
ifeq ($(VARIANT),'Server')
|
ifeq ($(VARIANT),'Server')
|
||||||
_LORAX_ARGS = --macboot --noupgrade
|
_LORAX_ARGS = --macboot --noupgrade
|
||||||
|
|
@ -47,13 +49,12 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
|
||||||
sed -i "s/\$$basearch/${ARCH}/g" $(_BASE_DIR)/$(basename $*).repo
|
sed -i "s/\$$basearch/${ARCH}/g" $(_BASE_DIR)/$(basename $*).repo
|
||||||
|
|
||||||
# Step 2: Build boot.iso using Lorax
|
# Step 2: Build boot.iso using Lorax
|
||||||
boot.iso: lorax_templates/set_installer.tmpl lorax_templates/configure_upgrades.tmpl fedora.repo fedora-updates.repo
|
boot.iso: lorax_templates/set_installer.tmpl lorax_templates/configure_upgrades.tmpl $(_REPO_FILES)
|
||||||
rm -Rf $(_BASE_DIR)/results
|
rm -Rf $(_BASE_DIR)/results
|
||||||
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
||||||
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) \
|
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) \
|
||||||
$(_LORAX_ARGS) \
|
$(_LORAX_ARGS) \
|
||||||
--repo $(_BASE_DIR)/fedora.repo \
|
$(foreach file,$(_REPO_FILES),--repo $(_BASE_DIR)/$(file);) \
|
||||||
--repo $(_BASE_DIR)/fedora-updates.repo \
|
|
||||||
--add-template $(_BASE_DIR)/lorax_templates/set_installer.tmpl \
|
--add-template $(_BASE_DIR)/lorax_templates/set_installer.tmpl \
|
||||||
--add-template $(_BASE_DIR)/lorax_templates/configure_upgrades.tmpl \
|
--add-template $(_BASE_DIR)/lorax_templates/configure_upgrades.tmpl \
|
||||||
$(_BASE_DIR)/results/
|
$(_BASE_DIR)/results/
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,6 @@ make boot.iso $@
|
||||||
|
|
||||||
make build/deploy.iso $@
|
make build/deploy.iso $@
|
||||||
|
|
||||||
mv build /github/workspace/
|
mkdir /github/workspace/build || true
|
||||||
|
|
||||||
|
cp /build/*.iso /github/workspace/build
|
||||||
Loading…
Add table
Add a link
Reference in a new issue