SPECS: kernel-block-gnbd.spec - up to 2.00.00 - use new macros for...

zbyniu zbyniu at pld-linux.org
Mon Apr 2 20:53:10 CEST 2007


Author: zbyniu                       Date: Mon Apr  2 18:53:10 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- up to 2.00.00
- use new macros for kernel modules
- removed smp package

---- Files affected:
SPECS:
   kernel-block-gnbd.spec (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: SPECS/kernel-block-gnbd.spec
diff -u SPECS/kernel-block-gnbd.spec:1.14 SPECS/kernel-block-gnbd.spec:1.15
--- SPECS/kernel-block-gnbd.spec:1.14	Sat Mar 17 12:51:10 2007
+++ SPECS/kernel-block-gnbd.spec	Mon Apr  2 20:53:05 2007
@@ -2,28 +2,26 @@
 #
 # Condtional build:
 %bcond_without	dist_kernel	# without distribution kernel
-%bcond_without	up		# without UP packages
-%bcond_without	smp		# without SMP packages
 %bcond_with	verbose		# verbose build (V=1)
 #
 %define _rel	0.3
 Summary:	Block device driver to share storage to many machines over a network
 Summary(pl.UTF-8):	Sterownik urządzenia blokowego do współdzielenia przestrzeni między wieloma maszynami w sieci
 Name:		kernel%{_alt_kernel}-block-gnbd
-Version:	1.03.00
+Version:	2.00.00
 Release:	%{_rel}@%{_kernel_ver_str}
 Epoch:		0
 License:	GPL v2
 Group:		Base/Kernel
 Source0:	ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
-# Source0-md5:	8eea23df70d2007c4fb8c234cfea49cf
+# Source0-md5:	2ef3f4ba9d3c87b50adfc9b406171085
 URL:		http://sources.redhat.com/cluster/gnbd/
 BuildRequires:	perl-base
 %if %{with kernel}
 %{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.7}
-BuildRequires:	rpmbuild(macros) >= 1.308
+BuildRequires:	rpmbuild(macros) >= 1.379
 %endif
-%{?with_dist_kernel:%requires_releq_kernel_up}
+%{?with_dist_kernel:%requires_releq_kernel}
 Requires(post,postun):	/sbin/depmod
 %{?with_dist_kernel:Requires(postun):	kernel%{_alt_kernel}}
 Buildroot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -41,82 +39,25 @@
 przez wielu klientów, co czyni je odpowiednimi do używania przez grupy
 węzłów GFS.
 
-%package -n kernel%{_alt_kernel}-smp-block-gnbd
-Summary:	Block device SMP driver to share storage to many machines over a network
-Summary(pl.UTF-8):	Sterownik SMP urządzenia blokowego do współdzielenia przestrzeni między wieloma maszynami w sieci
-Release:	%{_rel}@%{_kernel_ver_str}
-Group:		Base/Kernel
-%{?with_dist_kernel:%requires_releq_kernel_smp}
-Requires(post,postun):	/sbin/depmod
-%{?with_dist_kernel:Requires(postun):	kernel%{_alt_kernel}-smp}
-
-%description -n kernel%{_alt_kernel}-smp-block-gnbd
-The global network block device (GNBD) driver is similar to other
-network block device drivers. Devices exported by GNBD servers can be
-used by multiple clients making it suitable for use by a group of GFS
-nodes.
-
-%description -n kernel%{_alt_kernel}-smp-block-gnbd -l pl.UTF-8
-Sterownik globalnego sieciowego urządzenia blokowego (GNBD - global
-network block device) jest podobny do innych sterowników urządzeń
-blokowych. Urządzenia eksportowane przez serwery GNBD mogą być używane
-przez wielu klientów, co czyni je odpowiednimi do używania przez grupy
-węzłów GFS.
-
 %prep
 %setup -q -n cluster-%{version}
 
+cat > gnbd-kernel/src/Makefile << EOF
+obj-m += gnbd.o
+lock_gnbd-objs := gnbd.c
+%{?debug:CFLAGS += -DCONFIG_MODULE_NAME_DEBUG=1}
+EOF
+
 %build
 cd gnbd-kernel
 ./configure \
 	--kernel_src=%{_kernelsrcdir}
-cd src
-ln -s . linux
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
-	if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
-		exit 1
-	fi
-	rm -rf o
-	install -d o/include/linux
-	ln -sf %{_kernelsrcdir}/config-$cfg o/.config
-	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
-%if %{with dist_kernel}
-	%{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-%else
-	install -d o/include/config
-	touch o/include/config/MARKER
-	ln -sf %{_kernelsrcdir}/scripts o/scripts
-%endif
-	%{__make} -C %{_kernelsrcdir} clean \
-		RCS_FIND_IGNORE="-name '*.ko' -o" \
-		USING_KBUILD=yes \
-		SYSSRC=%{_kernelsrcdir} \
-		SYSOUT=$PWD/o \
-		M=$PWD O=$PWD/o \
-		%{?with_verbose:V=1}
-	%{__make} -C %{_kernelsrcdir} modules \
-		CC="%{__cc}" CPP="%{__cpp}" \
-		USING_KBUILD=yes \
-		SYSSRC=%{_kernelsrcdir} \
-		SYSOUT=$PWD/o \
-		M=$PWD O=$PWD/o \
-		%{?with_verbose:V=1}
-
-	mv gnbd.ko gnbd-$cfg.ko
-done
-cd -
+%build_kernel_modules -C src -m gnbd
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/block/gnbd
-install gnbd-kernel/src/gnbd-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/block/gnbd/gnbd.ko
-%if %{with smp} && %{with dist_kernel}
-install gnbd-kernel/src/gnbd-smp.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/block/gnbd/gnbd.ko
-%endif
+cd gnbd-kernel/src
+%install_kernel_modules -m gnbd -d block
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -127,23 +68,9 @@
 %postun
 %depmod %{_kernel_ver}
 
-%post -n kernel%{_alt_kernel}-smp-block-gnbd
-%depmod %{_kernel_ver}smp
-
-%postun -n kernel%{_alt_kernel}-smp-block-gnbd
-%depmod %{_kernel_ver}smp
-
-%if %{with up} || %{without dist_kernel}
 %files
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/kernel/drivers/block/gnbd
-%endif
-
-%if %{with smp} && %{with dist_kernel}
-%files -n kernel%{_alt_kernel}-smp-block-gnbd
-%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/kernel/drivers/block/gnbd
-%endif
+/lib/modules/%{_kernel_ver}/block/gnbd.ko.*
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -151,6 +78,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.15  2007/04/02 18:53:05  zbyniu
+- up to 2.00.00
+- use new macros for kernel modules
+- removed smp package
+
 Revision 1.14  2007/03/17 11:51:10  glen
 - with up bcond
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-block-gnbd.spec?r1=1.14&r2=1.15&f=u



More information about the pld-cvs-commit mailing list