BuildRequires: sparse

Roland McGrath roland at redhat.com
Thu May 3 22:25:04 UTC 2007


I've updated extras^H^H^H^H^H^HFedora devel sparse to 0.3 and built it in
Koji.  I have no clue if magic is required to get it into the tag used for
new builds' dependencies.  The following ought to be adequate to tweak the
kernel spec to use it rather than build it (assuming the old spec crap
wants to stick around conditionally for FC-6 copies).

Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3128
diff -u -b -p -r1.3128 kernel-2.6.spec
--- kernel-2.6.spec	3 May 2007 19:56:54 -0000	1.3128
+++ kernel-2.6.spec	3 May 2007 22:19:56 -0000
@@ -327,8 +355,15 @@ BuildConflicts: rhbuildsys(DiskFree) < 5
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
 #Source1: xen-%{xen_hv_cset}.tar.bz2
 Source2: Config.mk
+
 %define sparsever 0.3
+%if "%fedora" >= "7"
+%define buildsparse 0
+BuildRequires: sparse >= %{sparsever}
+%else
+%define buildsparse 1
 Source3: sparse-%{sparsever}.tar.bz2
+%endif
 
 Source10: COPYING.modules
 Source11: genkey
@@ -1436,10 +1491,12 @@ find . \( -name "*.orig" -o -name "*~" \
 
 cd ..
 
+%if %{buildsparse}
 # unpack sparse.
 if [ ! -d sparse-%{sparsever} ] ; then
 %setup -D -T -q -a 3
 fi
+%endif
 
 # Unpack the Xen tarball.
 %if %{includexen}
@@ -1462,12 +1519,15 @@ cd xen
 %build
 
 %if %{usesparse}
+%if %{buildsparse}
 # Build sparse.
 perl -p -i -e 's/-O /-O2 -finline-functions /' sparse-%{sparsever}/Makefile
 make -C sparse-%{sparsever}
-
 # Pass these options to kernel builds.
 %define sparse_mflags	C=1 CHECK=../sparse-%{sparsever}/sparse
+%else
+%define sparse_mflags	C=1
+%endif
 %endif
 
 #




More information about the Fedora-kernel-list mailing list