Alan Pevec
2008-Nov-04 14:40 UTC
[Ovirt-devel] [PATCH ovirt-node-image] build procedure change: include image ISO in SRPM
livecd images cannot be built in Koji build-system at the moment, they need to be included in SRPM Signed-off-by: Alan Pevec <apevec at redhat.com> --- Makefile.am | 4 ++-- autobuild.sh | 2 +- ovirt-node-image.spec.in | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index fce5131..6020609 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,7 +97,7 @@ ovirt-node-image.iso: repos.ks fi \ ) -rpms: dist +rpms: ovirt-node-image.iso dist rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz publish: rpms @@ -106,4 +106,4 @@ publish: rpms rsync -aq $(shell rpm --eval '%{_srcrpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/src createrepo $(OVIRT_CACHE_DIR)/ovirt -.PHONY: rpms publish +.PHONY: rpms publish ovirt-node-image.iso diff --git a/autobuild.sh b/autobuild.sh index 1651a63..e82f4f2 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -27,6 +27,7 @@ test -f Makefile && make -k distclean || : ./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT make dist +make ovirt-node-image.iso OVIRT_LOCAL_REPO=file://$AUTOBUILD_PACKAGE_ROOT/rpm/RPMS if [ -f /usr/bin/rpmbuild ]; then if [ -n "$AUTOBUILD_COUNTER" ]; then @@ -37,6 +38,5 @@ if [ -f /usr/bin/rpmbuild ]; then fi rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" \ - --define "ovirt_local_repo file://$AUTOBUILD_PACKAGE_ROOT/rpm/RPMS" \ -ta --clean *.tar.gz fi diff --git a/ovirt-node-image.spec.in b/ovirt-node-image.spec.in index 79ce2c3..eb17714 100644 --- a/ovirt-node-image.spec.in +++ b/ovirt-node-image.spec.in @@ -3,6 +3,7 @@ Name: ovirt-node-image Version: @VERSION@ Release: 0%{?dist}%{?extra_release} Source0: %{name}-%{version}.tar.gz +Source1: %{name}.iso License: GPLv2+ Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -33,11 +34,7 @@ The PXE boot image for oVirt Node network boot from oVirt Server. ./configure %build -make %{?ovirt_cache_dir: OVIRT_CACHE_DIR=%{ovirt_cache_dir}} \ - %{?ovirt_local_repo: OVIRT_LOCAL_REPO=%{ovirt_local_repo}} \ - %{?ovirt_url: OVIRT_URL=%{ovirt_url}} \ - ovirt-node-image.iso -sudo su - -c "cd $(pwd) && ./ovirt-pxe %{name}.iso" +sudo su - -c "cd $(pwd) && ./ovirt-pxe %{SOURCE1}" sudo su - -c "cd $(pwd) && chown -R $USER ." %install @@ -51,7 +48,7 @@ mkdir %{buildroot} %{__install} -p -m0644 tftpboot/initrd0.img %{buildroot}%{tftpboot} %{__install} -p -m0644 tftpboot/vmlinuz0 %{buildroot}%{tftpboot} %{__install} -d -m0755 %{buildroot}%{app_root} -%{__install} -p -m0644 %{name}.iso %{buildroot}%{app_root} +%{__install} -p -m0644 %{SOURCE1} %{buildroot}%{app_root} %{__install} -d -m0755 %{buildroot}%{_sbindir} %{__install} -p -m0755 ovirt-pxe %{buildroot}%{_sbindir} %{__install} -p -m0755 ovirt-flash %{buildroot}%{_sbindir} -- 1.5.6.5
Daniel P. Berrange
2008-Nov-04 14:44 UTC
[Ovirt-devel] [PATCH ovirt-node-image] build procedure change: include image ISO in SRPM
On Tue, Nov 04, 2008 at 03:40:14PM +0100, Alan Pevec wrote:> livecd images cannot be built in Koji build-system at the moment, > they need to be included in SRPM > > Signed-off-by: Alan Pevec <apevec at redhat.com>NACK. In doing this you are no longer testing ISO image creation in the automated builds. The existing core functionality of the SPEC file shouldn't be removed. There should be a conditional in the spec file to let you optionally build the RPM with a pre-built ISO. Or if that's too complex, create a separate 'ovirt-node-image-prebuilt.spec' which has a 'Provides: ovirt-node-image' in it. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|