Perry Myers
2008-Jun-30 19:03 UTC
[Ovirt-devel] [PATCH] Remove separation of x86_64 and i386 architectures for appliance and node
Less files to deal with/modify and a bit simpler makefile structure. Signed-off-by: Perry Myers <pmyers at redhat.com> --- build-all.sh | 12 +++--- ovirt-host-creator/Makefile | 2 +- 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 +- 7 files changed, 23 insertions(+), 49 deletions(-) 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 cee0c8c..bd38388 100755 --- a/build-all.sh +++ b/build-all.sh @@ -243,22 +243,22 @@ 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 bridge_flag if [ -n "$bridge" ]; then @@ -267,7 +267,7 @@ EOF ./create-wui-appliance.sh \ -t http://$VIRBR/pungi/$F_REL/$ARCH/os \ - -k http://$VIRBR/ovirt/wui-rel-$ARCH.ks \ + -k http://$VIRBR/ovirt/wui-rel.ks \ $bridge_flag set +x diff --git a/ovirt-host-creator/Makefile b/ovirt-host-creator/Makefile index 9c1d1db..6f862f3 100644 --- a/ovirt-host-creator/Makefile +++ b/ovirt-host-creator/Makefile @@ -10,7 +10,7 @@ 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.ks common-install.ks common-pkgs.ks common-post.ks repos.ks rm -rf tftpboot/ 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