Author: fs Date: Fri Dec 7 22:38:10 2007 New Revision: 9916 Log: Add module-assistant stuff
Added: dists/trunk/redhat-cluster/redhat-cluster/debian/control.modules.in dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-modules-_KVERS_.postinst dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-source.README.Debian dists/trunk/redhat-cluster/redhat-cluster/debian/modass.gfs-source dists/trunk/redhat-cluster/redhat-cluster/debian/patches/01_fix_gfs-kernel-makefile.dpatch (contents, props changed) Modified: dists/trunk/redhat-cluster/redhat-cluster/debian/compat dists/trunk/redhat-cluster/redhat-cluster/debian/patches/00list dists/trunk/redhat-cluster/redhat-cluster/debian/rules Modified: dists/trunk/redhat-cluster/redhat-cluster/debian/compat ============================================================================== --- dists/trunk/redhat-cluster/redhat-cluster/debian/compat (original) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/compat Fri Dec 7 22:38:10 2007 @@ -1 +1 @@ -4 +5 Added: dists/trunk/redhat-cluster/redhat-cluster/debian/control.modules.in ============================================================================== --- (empty file) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/control.modules.in Fri Dec 7 22:38:10 2007 @@ -0,0 +1,26 @@ +Source: gfs +Section: admin +Priority: optional +Maintainer: Debian Kernel Team <[EMAIL PROTECTED]> +Uploaders: Bastian Blank <[EMAIL PROTECTED]>, Frederik Schüler <[EMAIL PROTECTED]> +Standards-Version: 3.7.3.0 +Build-Depends: debhelper (>> 5.0.0), linux-headers-_KVERS_ + +Package: gfs-modules-_KVERS_ +Section: admin +Priority: optional +Architecture: any +Recommends: kernel-image-_KVERS_, gfs-tools +Provides: gfs-modules +Description: global file system kernel module + The Global File System 2 allows a cluster of machines to concurrently access + shared storage hardware like SANs or iSCSI and network block devices. GFS + can be deployed to build high available services without the single point + of failure a file server would be. + . + This package contains the compiled kernel module for _KVERS_ + . + If you compiled a custom kernel, you will most likely need to compile a + custom version of this module as well. The gfs-source + package has been provided for this purpose. + Added: dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-modules-_KVERS_.postinst ============================================================================== --- (empty file) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-modules-_KVERS_.postinst Fri Dec 7 22:38:10 2007 @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +SYSTEMMAP=/boot/System.map-_KVERS_ + +if [ -f $SYSTEMMAP ] +then + depmod -ae -F $SYSTEMMAP _KVERS_ +elif [ "`uname -r`" = "_KVERS_" ] +then + depmod -a & +fi + +#DEBHELPER# + Added: dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-source.README.Debian ============================================================================== --- (empty file) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/gfs-source.README.Debian Fri Dec 7 22:38:10 2007 @@ -0,0 +1,28 @@ +GFS for Debian +------------------ + +o How do i build this module the debian way? + +- Building with module-assistant + +$ m-a -t a-i gfs + +(for kernel source or headers in non-standard directory, add the option +-k /path/to/kernel/source with the correct path) + +- Building with make-kpkg + +$ cd /usr/src/ +$ ta jxvf gfs.tar.bz2 +$ cd /usr/src/kernel-source-2.6.23-1-amd64 +$ make-kpkg --added-modules=gfs modules + +- Building without make-kpkg + +$ cd /usr/src/ +$ tar jxvf gfs.tar.bz2 +$ cd modules/gfs +$ fakeroot debian/rules kdist_image + +(no fakeroot needed if you run this as root) + Added: dists/trunk/redhat-cluster/redhat-cluster/debian/modass.gfs-source ============================================================================== --- (empty file) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/modass.gfs-source Fri Dec 7 22:38:10 2007 @@ -0,0 +1,11 @@ +#!/bin/sh + +MA_DIR=${MA_DIR:-/usr/share/modass} + +TARBALL=/usr/src/gfs.tar.bz2 +BUILDDIR=${MODULE_LOC:-/usr/src/modules}/gfs + +. $MA_DIR/packages/generic.sh + +$1 "$@" + Modified: dists/trunk/redhat-cluster/redhat-cluster/debian/patches/00list ============================================================================== --- dists/trunk/redhat-cluster/redhat-cluster/debian/patches/00list (original) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/patches/00list Fri Dec 7 22:38:10 2007 @@ -1 +1,2 @@ 00_fix_gfs2_quota.dpatch +01_fix_gfs-kernel-makefile.dpatch Added: dists/trunk/redhat-cluster/redhat-cluster/debian/patches/01_fix_gfs-kernel-makefile.dpatch ============================================================================== --- (empty file) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/patches/01_fix_gfs-kernel-makefile.dpatch Fri Dec 7 22:38:10 2007 @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_fix_gfs-kernel-makefile.dpatch by Frederik Schüler <[EMAIL PROTECTED]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + [EMAIL PROTECTED]@ +--- redhat-cluster-2.20071022/gfs-kernel/src/gfs/Makefile.old 2007-12-07 22:58:12.000000000 +0100 ++++ redhat-cluster-2.20071022/gfs-kernel/src/gfs/Makefile 2007-12-07 22:58:20.000000000 +0100 +@@ -11,10 +11,6 @@ + ############################################################################### + ############################################################################### + +-ifndef USING_KBUILD +-include ../../../make/defines.mk +-endif +- + PWD := $(shell pwd) + + SYMVERFILE := ${KERNEL_BUILD}/Module.symvers Modified: dists/trunk/redhat-cluster/redhat-cluster/debian/rules ============================================================================== --- dists/trunk/redhat-cluster/redhat-cluster/debian/rules (original) +++ dists/trunk/redhat-cluster/redhat-cluster/debian/rules Fri Dec 7 22:38:10 2007 @@ -60,11 +60,30 @@ dh_install --sourcedir=debian/tmp --list-missing - mkdir -p debian/gfs-source/usr/src/modules/gfs + # install gfs v1 kernel source + mkdir -p debian/gfs-source/usr/src/modules/gfs/debian + + # copy the source cp -a gfs-kernel/src/gfs/* debian/gfs-source/usr/src/modules/gfs/ + + # prepare the debian dir + cd debian ; \ + cp compat copyright gfs-modules-_KVERS_.postinst changelog rules \ + control.modules.in gfs-source/usr/src/modules/gfs/debian + cp debian/gfs-source.README.Debian \ + debian/gfs-source/usr/src/modules/gfs/debian/README.Debian + + # hack to fix changelog in the module source package + cat debian/changelog | sed -e "s/^redhat-cluster/gfs/" > \ + debian/gfs-source/usr/src/modules/gfs/debian/changelog + + # tar it up cd debian/gfs-source/usr/src/ ; tar cjf gfs.tar.bz2 modules/gfs/ rm -rf debian/gfs-source/usr/src/modules + install -D -m 755 debian/modass.gfs-source \ + debian/gfs-source/usr/share/modass/overrides/gfs-source + dh_installdirs dh_link dh_installdocs @@ -111,3 +130,36 @@ rm -rf *-stamp rm -rf debian/patched + +# module assistant stuff +PACKAGE=gfs-modules +MA_DIR ?= /usr/share/modass +-include $(MA_DIR)/include/generic.make +-include $(MA_DIR)/include/common-rules.make + +kdist_clean: prep-deb-files + dh_clean + $(MAKE) -C $(KSRC) M=$(CURDIR) clean + +kdist_config: prep-deb-files +binary-modules: kdist_config + dh_testdir + dh_testroot + dh_clean -k + # build the module + make -C $(KSRC) M=$(CURDIR)/ modules USING_KBUILD=1 + mkdir -p $(CURDIR)/debian/$(PKGNAME)/lib/modules/$(KVERS)/kernel/extra/ + install -m644 -b gfs.ko $(CURDIR)/debian/$(PKGNAME)/lib/modules/$(KVERS)/kernel/extra/gfs.ko + # this is broken, dunno why: + # #make -C $(KSRC) M=$(CURDIR)/ modules_install INSTALL_MOD_PATH=$(CURDIR)/debian/$(PKGNAME) INSTALL_MOD_DIR=extra/ + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_installmodules + dh_gencontrol -- -v$(VERSION) + dh_md5sums + dh_builddeb --destdir=$(DEB_DESTDIR) + +.PHONY: binary-modules kdist kdist_config kdist_image kdist_clean _______________________________________________ Kernel-svn-changes mailing list Kernel-svn-changes@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes