[node-patches] Change in ovirt-node-iso[master]: move repos.ks generation to ovirt-node-iso from ovirt-node
mburns at redhat.com
mburns at redhat.com
Fri Aug 17 14:00:16 UTC 2012
Michael Burns has uploaded a new change for review.
Change subject: move repos.ks generation to ovirt-node-iso from ovirt-node
......................................................................
move repos.ks generation to ovirt-node-iso from ovirt-node
This allows a single build of ovirt-node to be used for building
multiple ovirt-node-isos from different sets of yum repositories.
Change-Id: If34e7adbd7d6ac192ca7b41d6670a7eb19b11e60
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M .gitignore
M Makefile.am
2 files changed, 61 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node-iso refs/changes/89/7289/1
diff --git a/.gitignore b/.gitignore
index f76315a..0bd933c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
*.tar.gz
Makefile.in
Makefile
+repos.ks
diff --git a/Makefile.am b/Makefile.am
index c341454..4b06ea1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,13 +36,31 @@
ovirt-node-iso.spec \
$(PACKAGE)-$(VERSION)-$(RELEASE).iso
-DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz
+DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz \
+ repos.ks \
+ Makefile.in \
+ aclocal.m4 \
+ autom4te.cache \
+ configure \
+ install-sh \
+ missing \
+ *.ks
# Need to find node-creator script
# Default to RECIPE_DIR/node-creator
# then check local dir
# then check PATH
NODE_CREATOR = $(shell ( test -e $(RECIPE_DIR)/node-creator && echo "$(RECIPE_DIR)/node-creator" ) || ( test -e node-creator && echo "./node-creator" ) || which node-creator 2>/dev/null)
+
+FEDORA_MIRROR = http://mirrors.fedoraproject.org/mirrorlist
+OVIRT_URL = http://ovirt.org/releases/stable/rpm/Fedora
+OVIRT_NIGHTLY_URL = http://ovirt.org/releases/nightly/rpm/Fedora
+OVIRT_BETA_URL = http://ovirt.org/releases/beta/rpm/Fedora
+CUR_RAWHIDE = 19
+CUR_DEVEL = 18
+
+CENTOS_MIRROR = http://mirrorlist.centos.org/
+CENTOS_RELEASE = 6
# For Release: 0..., set _ovirt_dev=1 so that we get extra_release.GIT-
# annotated rpm version strings.
@@ -74,6 +92,47 @@
rm -f version.ks
repos.ks: kickstarts
+ ( \
+ if [ -n "$(CENTOS)" ]; then \
+ CENTOS_REPO_LINE="repo --name=centos --mirrorlist=$(CENTOS_MIRROR)?release=$(CENTOS_RELEASE)&arch=${ARCH}&repo=os" ;\
+ UPDATES_REPO_LINE="repo --name=centos-updates --mirrorlist=$(CENTOS_MIRROR)?release=$(CENTOS_RELEASE)&arch=${ARCH}&repo=updates" ;\
+ EPEL_REPO_LINE="repo --name=epel --baseurl=http://dl.fedoraproject.org/pub/epel/$(CENTOS_RELEASE)/${ARCH}/" ;\
+ echo "$${CENTOS_REPO_LINE}" > repos.ks ;\
+ echo "$${UPDATES_REPO_LINE}" >> repos.ks ;\
+ echo "$${EPEL_REPO_LINE}" >> repos.ks ;\
+ elif [ -n "$(FEDORA)" ]; then \
+ OVIRT_STABLE_REPO_LINE="repo --name=ovirt-stable-repo --baseurl=$(OVIRT_URL)/$(FEDORA)\n" ;\
+ OVIRT_NIGHTLY_REPO_LINE="repo --name=ovirt-nightly-repo --baseurl=$(OVIRT_NIGHTLY_URL)/$(FEDORA)\n" ;\
+ OVIRT_BETA_REPO_LINE="repo --name=ovirt-beta-repo --baseurl=$(OVIRT_BETA_URL)/$(FEDORA)\n" ;\
+ if [ 0$(FEDORA) == 0$(CUR_RAWHIDE) ]; then \
+ FEDORA_REPO=rawhide ;\
+ FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/rawhide/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=rawhide&arch=$(ARCH))" ;\
+ elif [ 0$(FEDORA) == 0$(CUR_DEVEL) ]; then \
+ FEDORA_REPO=f$(FEDORA) ;\
+ FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/$(FEDORA)/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-$(FEDORA)&arch=$(ARCH))" ;\
+ UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates-testing $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/testing/$(FEDORA)/${ARCH},--mirrorlist=$(FEDORA_MIRROR)?repo=updates-testing-f$(FEDORA)&arch=$(ARCH))\n" ;\
+ else \
+ FEDORA_REPO=f$(FEDORA) ;\
+ FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/releases/$(FEDORA)/Everything/${ARCH}/os,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-$(FEDORA)&arch=$(ARCH))" ;\
+ UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/$(FEDORA)/${ARCH},--mirrorlist=$(FEDORA_MIRROR)?repo=updates-released-f$(FEDORA)&arch=$(ARCH))\n" ;\
+ fi ;\
+ echo "repo --name=$${FEDORA_REPO} $${FEDORA_REPO_LOC}" > repos.ks ;\
+ printf "$${UPDATE_REPO_LINE}" >> repos.ks ;\
+ printf "$${OVIRT_STABLE_REPO_LINE}" >> repos.ks ;\
+ if [ "$${BUILD_TYPE}" == "NIGHTLY" ]; then \
+ printf "$${OVIRT_NIGHTLY_REPO_LINE}" >> repos.ks ;\
+ printf "$${OVIRT_BETA_REPO_LINE}" >> repos.ks ;\
+ elif [ "$${BUILD_TYPE}" == "BETA" ]; then \
+ printf "$${OVIRT_BETA_REPO_LINE}" >> repos.ks ;\
+ fi ;\
+ else \
+ echo "# OVIRT_REPO_URL=$(OVIRT_REPO_URL)" > $@ ;\
+ for repo in $(OVIRT_REPO_URL); do \
+ echo "repo --name=repo$${i} --baseurl=$${repo}" >> $@ ;\
+ i=$${i}_ ;\
+ done ;\
+ fi ;\
+ )
version.ks: repos.ks
( \
--
To view, visit http://gerrit.ovirt.org/7289
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If34e7adbd7d6ac192ca7b41d6670a7eb19b11e60
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-iso
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>
More information about the node-patches
mailing list