[rds-commits] zab commits r95 - trunk

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Thu Jun 1 16:40:26 CDT 2006


Author: zab
Date: 2006-06-01 16:40:25 -0500 (Thu, 01 Jun 2006)
New Revision: 95

Modified:
   trunk/Makefile.in
   trunk/configure.in
   trunk/rds.spec.in
Log:
Help pass configure arguments to the spec file without descending into rpm
%{!?_with_*}/%{configure} madness.


Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in	2006-06-01 21:21:42 UTC (rev 94)
+++ trunk/Makefile.in	2006-06-01 21:40:25 UTC (rev 95)
@@ -4,6 +4,7 @@
 SVN_REV := @SVN_REV@
 TAR_PREFIX := rds-$(SVN_REV)
 TAR_FILE := $(TAR_PREFIX).tar.gz
+CONFIG_ARGS := @CONFIG_ARGS@
 
 kbuild-%:
 	@make -C @KERNELSRC@ CC=@KERNELCC@ M=$(CURDIR)/linux/net/rds \
@@ -39,7 +40,8 @@
 
 .PHONY: rpm
 rpm: $(TAR_FILE)
-	KERNEL_SRC=@KERNELSRC@ KERNEL_VERSION=@KERNELVER@ rpmbuild -ta $^
+	KERNEL_VERSION=@KERNELVER@ RDS_CONFIGURE_ARGS="$(CONFIG_ARGS)" \
+		rpmbuild -ta $^
 
 .PHONY: dist
 dist: $(TAR_FILE)

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2006-06-01 21:21:42 UTC (rev 94)
+++ trunk/configure.in	2006-06-01 21:40:25 UTC (rev 95)
@@ -3,6 +3,9 @@
 
 KERNELCC=gcc
 
+CONFIG_ARGS="$@"
+AC_SUBST(CONFIG_ARGS)
+
 AC_MSG_CHECKING(svn rev)
 if test -f svn-rev; then
 	SVN_REV=$(cat svn-rev)

Modified: trunk/rds.spec.in
===================================================================
--- trunk/rds.spec.in	2006-06-01 21:21:42 UTC (rev 94)
+++ trunk/rds.spec.in	2006-06-01 21:40:25 UTC (rev 95)
@@ -1,3 +1,16 @@
+#
+# This builds a specific revision of RDS as an RPM package.
+# This must first run through ./configure in that repository
+# so that the svn rev can be discovered.
+#
+# Once that's done it can be rebuilt against different kernels
+# by providing the kernel uname in KERNEL_VERSION and the
+# various configure options (--with-kernel, notably) in
+# RDS_CONFIGURE_ARGS. 
+#
+# The 'make rpm' target in the source repository does this 
+# to match the most recent ./configure invocation.
+#
 Summary: kernel module for RDSv2 socket protocol
 Name: kernel-module-rds
 # I would like to refer you to the section below named "percent"build.  I
@@ -21,13 +34,9 @@
 %prep
 %setup -n rds- at SVN_REV@
  
-# the idea is that someone with this source rpm should be able to rebuild
-# the module with 
-#	KERNEL_SRC=/whatever KERNEL_VERSION=2.6.9-whatever rpmbuild ..
-# I'm not thrilled about the env vars, hopefully there's a better way.
 %build
 autoconf
-./configure --with-kernel=$KERNEL_SRC
+./configure %(echo $RDS_CONFIGURE_ARGS)
 make kbuild-modules
 
 %install




More information about the rds-commits mailing list