rpms/kvm/devel kvm-fix-pc-bios-make-install-missing-files.patch, NONE, 1.1.2.1 kvm.spec, 1.71, 1.71.4.1

Eduardo Habkost ehabkost at fedoraproject.org
Fri Oct 3 15:20:07 UTC 2008


Author: ehabkost

Update of /cvs/pkgs/rpms/kvm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23066

Modified Files:
      Tag: private-ehabkost-no_pcbios_binaries-branch
	kvm.spec 
Added Files:
      Tag: private-ehabkost-no_pcbios_binaries-branch
	kvm-fix-pc-bios-make-install-missing-files.patch 
Log Message:
Remove all prebuilt qemu/pc-bios binaries before building

Etherboot binaries will be missing, for now.


kvm-fix-pc-bios-make-install-missing-files.patch:

--- NEW FILE kvm-fix-pc-bios-make-install-missing-files.patch ---
>From c93f589fc1f51e4bdb7ba79935cb5b85d8c50ca2 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost at redhat.com>
Date: Fri, 3 Oct 2008 11:44:08 -0300
Subject: [PATCH] Fix pc-bios 'make install' rules when files doesn't exist

make doesn't like if the command execute has a non-zero exit code, and the
'[ -f "$file" ] && install' line will return a non-zero exit code if the
file doesn't exist (despite of 'set -e' ignoring the exit status of the
'&&' line).

Signed-off-by: Eduardo Habkost <ehabkost at redhat.com>
---
 qemu/Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/qemu/Makefile b/qemu/Makefile
index 7a79b9d..78b4d16 100644
--- a/qemu/Makefile
+++ b/qemu/Makefile
@@ -242,8 +242,9 @@ endif
 		pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin extboot.bin \
 		bamboo.dtb; \
         do \
-		[ -f $(SRC_PATH)/pc-bios/$$x ] && \
-		$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+		if [ -f $(SRC_PATH)/pc-bios/$$x ];then \
+			$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+		fi; \
 	done
 ifndef CONFIG_WIN32
 	mkdir -p "$(DESTDIR)$(datadir)/keymaps"
-- 
1.5.5.GIT



Index: kvm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kvm/devel/kvm.spec,v
retrieving revision 1.71
retrieving revision 1.71.4.1
diff -u -r1.71 -r1.71.4.1
--- kvm.spec	15 Sep 2008 21:07:56 -0000	1.71
+++ kvm.spec	3 Oct 2008 15:19:37 -0000	1.71.4.1
@@ -1,7 +1,7 @@
 Summary: Kernel-based Virtual Machine
 Name: kvm
 Version: 74
-Release: 4%{?dist}
+Release: 4%{?dist}.no_binaries
 License: GPLv2+ and LGPLv2+
 Group: Development/Tools
 URL: http://%{name}.sf.net
@@ -12,6 +12,7 @@
 Patch1: %{name}-62-block-rw-range-check.patch
 Patch2: %{name}-74-pxe-boot.patch
 Patch3: %{name}-74-page-find.patch
+Patch4: %{name}-fix-pc-bios-make-install-missing-files.patch
 # patches from upstream qemu
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel
@@ -42,9 +43,12 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+# we must not use any of the binaries from the qemu/pc-bios/ directory,
+# as they don't have the corresponding sources shipped with them
+rm -f qemu/pc-bios/*
 
 %build
-
 # systems like rhel build system does not have a recent enough linker so 
 # --build-id works. this option is used fedora 8 onwards for giving info
 # to the debug packages.
@@ -64,6 +68,12 @@
 ./configure --with-patched-kernel --kerneldir=$(pwd)/kernel --prefix=%{_prefix} --qemu-ldflags=$qemuldflags \
 --audio-drv-list=oss,alsa
 
+# build the bios, and fix it's makefile
+sed -i 's/gcc -m32/gcc/' bios/Makefile
+make bios
+
+make vgabios
+
 # we can't use RPM_OPT_FLAGS for the same reasons as qemu (#208026) for the
 # qemu bits.  so let's set it for the other pieces.  this requires some
 # manual keeping up of what is in the kvm tree.
@@ -71,9 +81,6 @@
 echo "CFLAGS=$RPM_OPT_FLAGS" >> user/config.mak
 make %{?_smp_mflags}
 
-# build the bios, and fix it's makefile
-sed -i 's/gcc -m32/gcc/' bios/Makefile
-make bios
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -112,6 +119,10 @@
 %{_sysconfdir}/sysconfig/modules/%{name}.modules
 
 %changelog
+* Fri Oct 03 2008 Eduardo Habkost <ehabkost at redhat.com>
+- Remove all prebuilt qemu/pc-bios binaries before building
+  - Etherboot binaries are missing, by now
+
 * Mon Sep 15 2008 Glauber Costa <glommer at redhat.com> - 74-4
 - fix page_find out of bounds access - #462380
 




More information about the scm-commits mailing list