Perry Myers
2008-Jul-02 02:11 UTC
[Ovirt-devel] [PATCH] Remove separation between x86_64 and i386 for node and appliance kickstarts
In Fedora 8 we needed to maintain two kickstarts (one for each arch) for the managed node and the wui appliance since Fedora 8 would install the i386 versions of RPMs in the x86_64 OS. Fedora 9 is smarter about this and only installs the package specific to the arch. Since the only difference between the two kickstarts was the removal of specific i386/i686 packages, this can be simplified. Note: This combines my previous two patches that had to do with removing arch specific kickstarts. I determined that these patches were interdependent so doing it as one patch makes more sense. The previous patches this replaces had subjects: [PATCH] Remove separation between x86_64 and i386 managed node kickstarts [PATCH] Remove separation of x86_64 and i386 architectures for appliance and node Signed-off-by: Perry Myers <pmyers at redhat.com> --- build-all.sh | 12 +++--- ovirt-host-creator/Makefile | 4 +- ovirt-host-creator/ovirt-common.sh | 2 +- ovirt-host-creator/ovirt-x86_64.ks | 33 ------------------- ovirt-host-creator/{ovirt-i386.ks => ovirt.ks} | 0 ovirt-host-creator/repos.ks.in | 6 ++-- wui-appliance/.gitignore | 8 +--- wui-appliance/Makefile | 34 +++---------------- wui-appliance/{repos-x86_64.ks.in => repos.ks.in} | 8 ++-- .../{wui-devel-x86_64.ks => wui-devel.ks} | 2 +- 10 files changed, 25 insertions(+), 84 deletions(-) delete mode 100644 ovirt-host-creator/ovirt-x86_64.ks rename ovirt-host-creator/{ovirt-i386.ks => ovirt.ks} (100%) rename wui-appliance/{repos-x86_64.ks.in => repos.ks.in} (50%) rename wui-appliance/{wui-devel-x86_64.ks => wui-devel.ks} (99%) diff --git a/build-all.sh b/build-all.sh index 62fe949..740fa10 100755 --- a/build-all.sh +++ b/build-all.sh @@ -246,25 +246,25 @@ if [ $update_app == 1 ]; then cd $BASE/wui-appliance make clean - cat > repos-x86_64.ks << EOF + cat > repos.ks << EOF url --url http://$VIRBR/pungi/$F_REL/$ARCH/os EOF excludepkgs if [[ -f $OVIRT/repodata/repomd.xml ]]; then excludepkgs='--excludepkgs=ovirt*' - cat >> repos-x86_64.ks << EOF + cat >> repos.ks << EOF repo --name=ovirt --baseurl=http://$VIRBR/ovirt EOF fi - cat >> repos-x86_64.ks << EOF -repo --name=ovirt-org --baseurl=http://ovirt.org/repos/ovirt/$F_REL/x86_64 $excludepkgs + cat >> repos.ks << EOF +repo --name=ovirt-org --baseurl=http://ovirt.org/repos/ovirt/$F_REL/$ARCH $excludepkgs EOF make - cp wui-rel-*.ks $OVIRT + cp wui-rel.ks $OVIRT ./create-wui-appliance.sh \ -t http://$VIRBR/pungi/$F_REL/$ARCH/os \ - -k http://$VIRBR/ovirt/wui-rel-$ARCH.ks $app_type + -k http://$VIRBR/ovirt/wui-rel.ks $app_type set +x echo "oVirt appliance setup started, check progress with:" diff --git a/ovirt-host-creator/Makefile b/ovirt-host-creator/Makefile index 7d74b08..6f862f3 100644 --- a/ovirt-host-creator/Makefile +++ b/ovirt-host-creator/Makefile @@ -10,9 +10,9 @@ distclean: clean rm -rf *.iso tftpboot repos.ks rpm-build iso-file repos.ks: repos.ks.in - cp repos.ks.in repos.ks + sed "s/@@ARCH@@/$(ARCH)/" repos.ks.in > repos.ks -build: ovirt-$(ARCH).ks common-install.ks common-pkgs.ks common-post.ks repos.ks +build: ovirt.ks common-install.ks common-pkgs.ks common-post.ks repos.ks rm -rf tftpboot/ ./ovirt-pxe.sh > ovirt-pxe.log 2>&1 diff --git a/ovirt-host-creator/ovirt-common.sh b/ovirt-host-creator/ovirt-common.sh index a015cc3..62d2e93 100644 --- a/ovirt-host-creator/ovirt-common.sh +++ b/ovirt-host-creator/ovirt-common.sh @@ -2,7 +2,7 @@ PATH=/sbin:/bin:/usr/bin export PATH create_iso() { - KICKSTART=ovirt-`uname -i`.ks + KICKSTART=ovirt.ks if [ $# -eq 0 ]; then LABEL=ovirt-`date +%Y%m%d%H%M` livecd-creator --skip-minimize -c $KICKSTART -f $LABEL 1>&2 && diff --git a/ovirt-host-creator/ovirt-x86_64.ks b/ovirt-host-creator/ovirt-x86_64.ks deleted file mode 100644 index 302d436..0000000 --- a/ovirt-host-creator/ovirt-x86_64.ks +++ /dev/null @@ -1,33 +0,0 @@ -%include common-install.ks - -%include repos.ks - -%packages --excludedocs -%include common-pkgs.ks --glibc.i686 --xen-libs.i386 --libxml2.i386 --zlib.i386 --libvirt.i386 --avahi.i386 --libgcrypt.i386 --gnutls.i386 --libstdc++.i386 --e2fsprogs-libs.i386 --readline.i386 --libselinux.i386 --device-mapper-libs.i386 --libdaemon.i386 --dbus-libs.i386 --expat.i386 --libsepol.i386 --libcap.i386 --libgpg-error.i386 --libgcc.i386 --cyrus-sasl-gssapi.i386 --cyrus-sasl-lib.i386 - -%post -%include common-post.ks - -%end diff --git a/ovirt-host-creator/ovirt-i386.ks b/ovirt-host-creator/ovirt.ks similarity index 100% rename from ovirt-host-creator/ovirt-i386.ks rename to ovirt-host-creator/ovirt.ks diff --git a/ovirt-host-creator/repos.ks.in b/ovirt-host-creator/repos.ks.in index 6703b91..0a5cb52 100644 --- a/ovirt-host-creator/repos.ks.in +++ b/ovirt-host-creator/repos.ks.in @@ -1,3 +1,3 @@ -repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=$basearch -repo --name=f9-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=$basearch - +repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=@@ARCH@@ +repo --name=f9-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=@@ARCH@@ +repo --name=ovirt --baseurl=http://ovirt.org/repos/ovirt/9/@@ARCH@@ diff --git a/wui-appliance/.gitignore b/wui-appliance/.gitignore index 1eb6469..481444d 100644 --- a/wui-appliance/.gitignore +++ b/wui-appliance/.gitignore @@ -1,6 +1,2 @@ -.deps -wui-devel-i386.ks -wui-rel-i386.ks -wui-rel-x86_64.ks -repos-i386.ks -repos-x86_64.ks +wui-rel.ks +repos.ks diff --git a/wui-appliance/Makefile b/wui-appliance/Makefile index 03c3457..b023622 100644 --- a/wui-appliance/Makefile +++ b/wui-appliance/Makefile @@ -1,14 +1,8 @@ all: ks -primary_src = \ - wui-devel-x86_64.ks \ - wui-devel-i386.ks +ARCH := $(shell uname -i) -rel_ks = \ - wui-rel-i386.ks \ - wui-rel-x86_64.ks - -ks: $(rel_ks) +ks: wui-rel.ks define ks-flatten rm -f $@ $@-t @@ -17,27 +11,11 @@ define ks-flatten mv $@-t $@ endef -wui-rel-%.ks: wui-devel-%.ks +wui-rel.ks: wui-devel.ks repos.ks $(ks-flatten) -repos-x86_64.ks: repos-x86_64.ks.in - cp repos-x86_64.ks.in repos-x86_64.ks - -# Generate each *-i386.ks file from the corresponding -x86_64.ks one. -%-i386.ks: %-x86_64.ks - rm -f $@ $@-t - sed 's/x86_64/i386/' $< > $@-t - chmod a=r $@-t - mv $@-t $@ - -# Generate dependencies. -include .deps -.deps: $(primary_src) - rm -f .deps - for i in $^; do \ - sed -n '/^%include \(.*\.ks\)$$/s//'"$$i: "'\1/p' $$i >> $@-t; \ - done - mv $@-t $@ +repos.ks: repos.ks.in + sed "s/@@ARCH@@/$(ARCH)/" repos.ks.in > repos.ks clean: - rm -f wui-devel-i386.ks repos-i386.ks $(rel_ks) .deps *~ + rm -f repos.ks wui-rel.ks *~ diff --git a/wui-appliance/repos-x86_64.ks.in b/wui-appliance/repos.ks.in similarity index 50% rename from wui-appliance/repos-x86_64.ks.in rename to wui-appliance/repos.ks.in index 54fabed..29fbbc6 100644 --- a/wui-appliance/repos-x86_64.ks.in +++ b/wui-appliance/repos.ks.in @@ -1,6 +1,6 @@ -url --url http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/x86_64/os/ +url --url http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/@@ARCH@@/os/ -repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=x86_64 -repo --name=f9-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=x86_64 -repo --name=ovirt --baseurl=http://ovirt.org/repos/ovirt/9/x86_64 +repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=@@ARCH@@ +repo --name=f9-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=@@ARCH@@ +repo --name=ovirt --baseurl=http://ovirt.org/repos/ovirt/9/@@ARCH@@ diff --git a/wui-appliance/wui-devel-x86_64.ks b/wui-appliance/wui-devel.ks similarity index 99% rename from wui-appliance/wui-devel-x86_64.ks rename to wui-appliance/wui-devel.ks index e288560..c50b3a8 100644 --- a/wui-appliance/wui-devel-x86_64.ks +++ b/wui-appliance/wui-devel.ks @@ -9,7 +9,7 @@ logvol /iscsi3 --name=iSCSI3 --vgname=VolGroup00 --size=64 logvol /iscsi4 --name=iSCSI4 --vgname=VolGroup00 --size=64 logvol /iscsi5 --name=iSCSI5 --vgname=VolGroup00 --size=64 -%include repos-x86_64.ks +%include repos.ks %packages --nobase -- 1.5.5.1