could result in reuse of freed memory.
- STABLE14-rx-do-not-race-current-packet-20090105: fix rx race
condition.
+ * Add initial DKMS support via an openafs-modules-dkms package, based on
+ work by Robert Gerlach. (LP: #288743)
+ * Compress the source in openafs-modules-source with bzip2 instead of
+ gzip to reduce the package size.
* Make dynroot the default for new installations. It works much better
with systems that don't bring up their network until late in the boot
process, such as wireless laptops. (LP: #249240, #318605)
Package: openafs-modules-source
Priority: extra
Depends: ${misc:Depends}, bison, flex, debhelper (>= 5),
- kernel-package | module-assistant
+ module-assistant | kernel-package
Architecture: all
Description: AFS distributed filesystem kernel module source
AFS is a distributed filesystem allowing cross-platform sharing of
files among multiple computers. Facilities are provided for access
control, authentication, backup and administrative management.
.
- This package provides source to the AFS kernel modules.
+ This package provides the source to the AFS kernel module in a form
+ suitable for use by module-assistant or kernel-package.
+
+Package: openafs-modules-dkms
+Priority: extra
+Depends: ${misc:Depends}, bison, flex
+Architecture: all
+Description: AFS distributed filesystem kernel module DKMS source
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers. Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package contains the source for the AFS kernel module, packaged with
+ approriate configuration for DKMS to build new modules dynamically.
Package: libpam-openafs-kaserver
Architecture: alpha amd64 arm armel i386 ia64 lpia powerpc ppc64 s390 s390x sparc
--- /dev/null
+# DKMS configuration for the OpenAFS kernel module. -*- sh -*-
+
+# The version is replaced at build time by debian/rules.
+PACKAGE_NAME="openafs"
+PACKAGE_VERSION="@VERSION@"
+
+BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
+DEST_MODULE_LOCATION[0]="/updates/dkms/"
+AUTOINSTALL=yes
+
+MAKE[0]="./configure --with-linux-kernel-headers=${kernel_source_dir}
+ && make only_libafs
+ && mv src/libafs/MODLOAD-*/openafs.ko ."
+CLEAN="rm -f openafs.ko && make distclean"
CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo}
MODULEROOT=${MODULEROOT:-/lib/modules/`uname -r`}
MODULEDIR=${MODULEDIR:-$MODULEROOT/fs}
+DKMSDIR=${DKMSDIR:-$MODULEROOT/updates/dkms}
exec 3>/dev/null
exec </dev/null
# exists and this is an SMP system, use it; otherwise, use the default
# value. Unset $MP if not using it so that we can use it later in the
# call to modprobe.
- if [ -n "$MP" -a -f "$MODULEDIR/openafs${MP}.o" ] ; then
+ #
+ # Assume that if we're using DKMS, we won't have a .mp and we'll always
+ # have a *.ko module name.
+ if [ -f "$DKMSDIR/openafs.ko" ] ; then
+ LIBAFS=openafs.ko
+ elif [ -n "$MP" -a -f "$MODULEDIR/openafs${MP}.o" ] ; then
LIBAFS=openafs${MP}.o
elif [ -n "$MP" -a -f "$MODULEDIR/openafs${MP}.ko" ] ; then
LIBAFS=openafs${MP}.ko
if [ -z "$LIBAFS" ] ; then
choose_client
fi
- if [ ! -f "$MODULEDIR/$LIBAFS" ] ; then
+ if [ ! -f "$MODULEDIR/$LIBAFS" ] -a [ ! -f "$DKMSDIR/$LIBAFS" ] ; then
echo ""
cat <<EOF >&2
AFS module $MODULEDIR/$LIBAFS does not exist.
--- /dev/null
+#!/bin/sh
+set -e
+
+# Get the package version, which is the version of openafs-modules-dkms
+# without the dfsg part and without the Debian version.
+package=openafs-modules-dkms
+version=`dpkg-query -W -f='${Version}' "$package" | sed 's/[.+-].*//'`
+
+dkms add -m openafs -v "$version"
+if [ "$1" = 'configure' ] ; then
+ dkms build -m openafs -v "$version"
+ dkms install -m openafs -v "$version" --force
+fi
+
+#DEBHELPER#
--- /dev/null
+#!/bin/sh
+set -e
+
+# Get the package version, which is the version of openafs-modules-dkms
+# without the dfsg part and without the Debian version. I hope this is always
+# correct when running prerm and we won't get the new version.
+package=openafs-modules-dkms
+version=`dpkg-query -W -f='${Version}' "$package" | sed 's/[.+-].*//'`
+
+dkms remove -m openafs -v "$version" --all
+
+#DEBHELPER#
package = openafs
srcpkg = openafs-modules-source
+dkmspkg = openafs-modules-dkms
# The /usr/share/doc directory for these packages should be a symlink to
# /usr/share/doc/openafs-client. Any package on this list must depend on
|| mv doc/man-pages/pod1/afs-up.pod doc/man-pages/pod1/up.pod
dh clean
-# Rules for building the openafs-modules-source package.
+# Rules for building the openafs-modules-source package. We generate both a
+# DKMS package and a typical source tarball package usable by
+# module-assistant.
install-source-stamp:
dh_testdir
dh_testroot
find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
chmod 775 debian/$(srcpkg)/usr/src/modules
- cd debian/$(srcpkg)/usr/src && \
- tar cf $(package).tar modules && \
- rm -r modules
- gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
- chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
+ cd debian/$(srcpkg)/usr/src && tar cf $(package).tar modules
+ bzip2 debian/$(srcpkg)/usr/src/$(package).tar
+ chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.bz2
+ install -d debian/$(dkmspkg)/usr/src
+ mv debian/$(srcpkg)/usr/src/modules/$(package) \
+ debian/$(dkmspkg)/usr/src/openafs-$(VERSION)
+ sed -e 's/[@]VERSION[@]/$(VERSION)' debian/dkms.conf.in \
+ > debian/$(dkmspkg)/usr/src/openafs-$(VERSION)/dkms.conf
touch $@
install: install-stamp