Skip to contentSkip to conversation

RPM building from tarball

PATCH Applied Dan Kenigsberg 2 participants 2 messages Dec 5, 2007 – Dec 9, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

Quoted 1 line

From 61fabaac25a21ae586f09a021ee9f38c3d2df81e Mon Sep 17 00:00:00 2001

From: Dan Kenigsberg <danken-atKUWr5tajBWk0Htik3J/[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(-)
Makefile +12 -13
index 776ff01..04b7224 100644
@@ -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:
Signature · 1 line
1.5.3.4
Quoted 1 line

From 5af622f8df2a2ea7e097d42b814c7534f8089c71 Mon Sep 17 00:00:00 2001

From: Dan Kenigsberg <danken-atKUWr5tajBWk0Htik3J/[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(-)
kvm.spec +8 -2
index cadd29d..1cabaa3 100644
@@ -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;
Signature · 1 line
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Applied
#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Dan Kenigsberg

Building RPMs using the published tarball is currently broken. On Fedora 8, there's an additional requirement of passing --build-id to ld.

Applied both, thanks.

Signature · 9 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php