Building RPMs using the published tarball is currently broken.
On Fedora 8, there's an additional requirement of passing --build-id to
ld.
Avi, please consider applying the two patches that address these problem.
Dan.
>From 61fabaac25a21ae586f09a021ee9f38c3d2df81e Mon Sep 17 00:00:00 2001
From: Dan Kenigsberg <[EMAIL PROTECTED]>
Date: Wed, 5 Dec 2007 18:09:53 +0200
Subject: [PATCH] Build RPM in a subdirectory (so as not to collide with SOURCES
file)
---
Makefile | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index 776ff01..04b7224 100644
--- a/Makefile
+++ b/Makefile
@@ -46,25 +46,24 @@ install:
make -C qemu DESTDIR="$(DESTDIR)" install
tmpspec = .tmp.kvm.spec
-RPMDIR=$$(pwd)/RPMS
+RPMTOPDIR = $$(pwd)/rpmtop
rpm: srpm
- mkdir -p BUILD $(RPMDIR)/$$(uname -i)
+ mkdir -p $(RPMTOPDIR)/{BUILD,RPMS/$$(uname -i)}
rpmbuild --rebuild \
- --define="_rpmdir $(RPMDIR)" \
- --define="_topdir $$(pwd)" \
- SRPMS/kvm-0.0-$(rpmrelease).src.rpm
+ --define="_topdir $(RPMTOPDIR)" \
+ $(RPMTOPDIR)/SRPMS/kvm-0.0-$(rpmrelease).src.rpm
srpm:
- mkdir -p SOURCES SRPMS
+ mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS}
sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec > $(tmpspec)
- tar czf SOURCES/kvm.tar.gz qemu
- tar czf SOURCES/user.tar.gz user
- tar czf SOURCES/libkvm.tar.gz libkvm
- tar czf SOURCES/kernel.tar.gz kernel
- tar czf SOURCES/scripts.tar.gz scripts
- cp Makefile configure kvm_stat SOURCES
- rpmbuild --define="_topdir $$(pwd)" -bs $(tmpspec)
+ tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu
+ tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user
+ tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm
+ tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel
+ tar czf $(RPMTOPDIR)/SOURCES/scripts.tar.gz scripts
+ cp Makefile configure kvm_stat $(RPMTOPDIR)/SOURCES
+ rpmbuild --define="_topdir $(RPMTOPDIR)" -bs $(tmpspec)
$(RM) $(tmpspec)
clean:
--
1.5.3.4
>From 5af622f8df2a2ea7e097d42b814c7534f8089c71 Mon Sep 17 00:00:00 2001
From: Dan Kenigsberg <[EMAIL PROTECTED]>
Date: Wed, 5 Dec 2007 18:10:59 +0200
Subject: [PATCH] Set --build-id ld flag in order to allow building under Fedora
8
---
kvm.spec | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/kvm.spec b/kvm.spec
index cadd29d..1cabaa3 100644
--- a/kvm.spec
+++ b/kvm.spec
@@ -12,7 +12,7 @@ ExclusiveArch: i386 x86_64
Requires: kvm-kmod bridge-utils
-%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%{name}' | cut
-d"-" -f 1)
+%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%%{name}' | cut
-d"-" -f 1)
%define os_version %(rpm -q --qf '%%{version}' %{Distribution}-release)
%define os_release %(rpm -q --qf '%%{release}' %{Distribution}-release | cut
-d"." -f 1)
@@ -20,6 +20,12 @@ Requires: kvm-kmod bridge-utils
%define require_gccver 32
%endif
+%if %([ x"%{Distribution}" = x"fedora" -a 0"%{os_version}" -ge "8" ] && echo 1
|| echo 0)
+%define qemuldflags --qemu-ldflags=-Wl,--build-id
+%else
+%define qemuldflags ""
+%endif
+
%if %([ x"%{Distribution}" = x"centos" -a x"%{os_version}" = x"4" ] && echo 1
|| echo 0)
%define require_gccver 32
%endif
@@ -71,7 +77,7 @@ rm -rf %{buildroot}
%if !%{_prebuilt}
cd ..
-./configure --prefix=/usr/kvm
+./configure --prefix=/usr/kvm %{qemuldflags}
make -C libkvm
make -C user
#(cd qemu;
--
1.5.3.4
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel