public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Kenigsberg <danken-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: RPM building from tarball
Date: Wed, 5 Dec 2007 18:22:56 +0200	[thread overview]
Message-ID: <20071205162256.GA1620@karma.qumranet.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

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.

[-- Attachment #2: 0001-Build-RPM-in-a-subdirectory-so-as-not-to-collide-wi.patch --]
[-- Type: text/plain, Size: 1764 bytes --]

>From 61fabaac25a21ae586f09a021ee9f38c3d2df81e Mon Sep 17 00:00:00 2001
From: Dan Kenigsberg <danken-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
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


[-- Attachment #3: 0002-Set-build-id-ld-flag-in-order-to-allow-building-un.patch --]
[-- Type: text/plain, Size: 1459 bytes --]

>From 5af622f8df2a2ea7e097d42b814c7534f8089c71 Mon Sep 17 00:00:00 2001
From: Dan Kenigsberg <danken-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
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


[-- Attachment #4: Type: text/plain, Size: 309 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #5: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2007-12-05 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05 16:22 Dan Kenigsberg [this message]
     [not found] ` <20071205162256.GA1620-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2007-12-09 17:15   ` RPM building from tarball Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071205162256.GA1620@karma.qumranet.com \
    --to=danken-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox