mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
move repos
This commit is contained in:
parent
e7c5ce7047
commit
5332ab64a5
2 changed files with 14 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
/debugdata
|
||||
/build
|
||||
/pkglists
|
||||
/repos
|
||||
/results
|
||||
/lorax_templates/*.tmpl
|
||||
/xorriso/input.txt
|
||||
|
|
@ -9,4 +10,4 @@
|
|||
/final-pkgsizes.txt
|
||||
/lorax.conf
|
||||
/output
|
||||
/*.log
|
||||
/*.log
|
||||
|
|
|
|||
15
Makefile
15
Makefile
|
|
@ -17,7 +17,7 @@ _BASE_DIR = $(shell pwd)
|
|||
_IMAGE_REPO_ESCAPED = $(subst /,\/,$(IMAGE_REPO))
|
||||
_IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
||||
_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
|
||||
_REPO_FILES = $(notdir $(REPOS))
|
||||
_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS))
|
||||
_LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in))
|
||||
|
||||
ifeq ($(VARIANT),Server)
|
||||
|
|
@ -43,11 +43,18 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
|
|||
|
||||
|
||||
# Step 2: Replace vars in repo files
|
||||
%.repo: /etc/yum.repos.d/%.repo
|
||||
repos/%.repo: /etc/yum.repos.d/%.repo
|
||||
if [[ ! -d repos ]]
|
||||
then
|
||||
mkdir repos
|
||||
fi
|
||||
cp /etc/yum.repos.d/$*.repo $(_BASE_DIR)/$*.repo
|
||||
sed -i "s/\$$releasever/${VERSION}/g" $(_BASE_DIR)/$*.repo
|
||||
sed -i "s/\$$basearch/${ARCH}/g" $(_BASE_DIR)/$*.repo
|
||||
|
||||
# Don't do anything for custom repos
|
||||
%.repo:
|
||||
|
||||
# Step 3: Build boot.iso using Lorax
|
||||
boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
|
||||
rm -Rf $(_BASE_DIR)/results || true
|
||||
|
|
@ -80,11 +87,12 @@ xorriso/input.txt: xorriso/gen_input.sh
|
|||
|
||||
|
||||
clean:
|
||||
rm -Rf $(_BASE_DIR)/build || true
|
||||
rm -Rf $(_BASE_DIR)/container || true
|
||||
rm -Rf $(_BASE_DIR)/debugdata || true
|
||||
rm -Rf $(_BASE_DIR)/pkglists || true
|
||||
rm -Rf $(_BASE_DIR)/repos || true
|
||||
rm -Rf $(_BASE_DIR)/results || true
|
||||
rm -Rf $(_BASE_DIR)/build || true
|
||||
rm -f $(_BASE_DIR)/lorax_templates/*.tmpl || true
|
||||
rm -f $(_BASE_DIR)/xorriso/input.txt || true
|
||||
rm -f $(_BASE_DIR)/xorriso/*.sh || true
|
||||
|
|
@ -92,6 +100,7 @@ clean:
|
|||
rm -f $(_BASE_DIR)/lorax.conf || true
|
||||
rm -f $(_BASE_DIR)/*.iso || true
|
||||
rm -f $(_BASE_DIR)/*.log || true
|
||||
|
||||
|
||||
install-deps:
|
||||
dnf install -y lorax xorriso podman
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue