../lustre_$${VER}.tar.gz ../lustre-*-modules-$${KVERS}_$${VER}_*.deb \
debs/
+dkms-debs: undef.h
+ lversion=$$(echo @VERSION@ | tr '_' '-'); \
+ cversion=$$(sed -ne '1s/^lustre (\(.*\)-[0-9][0-9]*).*$$/\1/p' debian/changelog); \
+ if [ "$$lversion" != "$$cversion" ]; then \
+ echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca> $$(date -R)\n\n.\nwq" | ed debian/changelog; \
+ fi; \
+ rm -rf debs; \
+ export DEB_BUILD_PROFILES="client"; \
+ export KERNEL_CFG="$(LINUX_CONFIG)"; \
+ export KERNEL_SRC="$(LINUX)"; \
+ echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \
+ echo "Kernel Source: $${KERNEL_SRC}"; \
+ echo "Kernel Config: $${KERNEL_CFG}"; \
+ export BUILD_DKMS="true" && \
+ dpkg-buildpackage -us -uc -I.git -I\*.out[0-9]\* -I\*.swp || { \
+ rc=$${PIPESTATUS[0]}; \
+ [ $${rc} -gt 1 ] && exit $${rc}; \
+ exit 0; \
+ }; \
+ VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \
+ mkdir -p debs && \
+ mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \
+ ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \
+ ../lustre-*-utils_$${VER}_*.deb \
+ ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \
+ ../lustre_$${VER}.tar.gz ../lustre-*-modules-dkms_$${VER}_*.deb \
+ debs/
+
if USES_DPKG
EXTRA_DIST += debian/*
endif
install lustre-source and build the module as described in 1.)
- mount -t lustre mgsnode@tcp0:/spfs /mnt
+#5. Building client modules with DKMS
+
+ Lustre client-only kernel modules can built against non-patched, vanilla
+ kernels. This may be more convenient than installing the patched kernel
+ and server modules.
+
+ Installing the lustre-client-modules-dkms package will automatically
+ build modules for all currently installed kernels using DKMS
+ (http://linux.dell.com/dkms/) for which you will need to have the relevant
+ linux-headers packages installed. When a new kernel is installed on the
+ machine, DKMS will automatically build a new set of Lustre client modules.
+
+ You can also use DKMS to create a new deb containing the pre-built kernel
+ modules, suitable for installing on other machines which may not have a
+ full build environment.
+
+ - dkms build -m lustre-client-modules -v <version> -k <kernel-version>
+ (repeat the above step for all required kernel versions)
+ - dkms mkdeb -m lustre-client-modules -v <version>
+ - dkms mkdsc -m lustre-client-modules -v <version>
+
+
###########
Please have also a look into the official documentation for Lustre available at:
https://wiki.whamcloud.com/
.
This package provides development libraries for the Lustre filesystem.
+
+Package: lustre-client-modules-dkms
+Section: admin
+Architecture: i386 powerpc ppc64el amd64 ia64
+Priority: optional
+Depends: dkms, automake, libtool, linux-headers-generic | linux-headers | linux-headers-amd64
+Recommends: linux-image, lustre-utils
+Provides: lustre-client-modules
+Description: Lustre Linux kernel module (DKMS)
+ This package contains the loadable kernel modules for the patchless client
+ for the Lustre cluster filesystem.
+ .
+ These modules are compiled using DKMS.
https://wiki.whamcloud.com/
.
This package provides development libraries for the Lustre filesystem.
+
+Package: lustre-client-modules-dkms
+Section: admin
+Architecture: i386 powerpc ppc64el amd64 ia64
+Priority: optional
+Depends: dkms, automake, libtool, linux-headers-generic | linux-headers | linux-headers-amd64
+Recommends: linux-image, lustre-utils
+Provides: lustre-client-modules
+Description: Lustre Linux kernel module (DKMS)
+ This package contains the loadable kernel modules for the patchless client
+ for the Lustre cluster filesystem.
+ .
+ These modules are compiled using DKMS.
--- /dev/null
+# Lustre Linux kernel module (DKMS)
+# Created by Guy Coates
+# Updated by Michael Kuhn
+# Copyright 2012 Genome Research Ltd.
+# 2017-2018 Universität Hamburg
+
+PACKAGE_NAME="lustre-client-modules"
+PACKAGE_VERSION="@UPVERSION@"
+
+# We need to run autogen.sh between builds, see Ubuntu bug #952817
+MAKE="sh autogen.sh && ./configure --with-linux=$kernel_source_dir --with-linux-obj=$kernel_source_dir --disable-server --disable-quilt --disable-dependency-tracking --disable-doc --disable-utils --disable-iokit --disable-snmp --disable-tests --enable-quota --with-kmp-moddir=updates && make"
+CLEAN="make distclean || true"
+
+AUTOINSTALL="yes"
+STRIP="no"
+
+# Module names
+BUILT_MODULE_NAME[0]="fid"
+BUILT_MODULE_NAME[1]="fld"
+BUILT_MODULE_NAME[2]="lmv"
+BUILT_MODULE_NAME[3]="lov"
+BUILT_MODULE_NAME[4]="lustre"
+BUILT_MODULE_NAME[5]="mdc"
+BUILT_MODULE_NAME[6]="mgc"
+BUILT_MODULE_NAME[7]="obdclass"
+BUILT_MODULE_NAME[8]="obdecho"
+BUILT_MODULE_NAME[9]="osc"
+BUILT_MODULE_NAME[10]="ptlrpc"
+BUILT_MODULE_NAME[11]="ko2iblnd"
+BUILT_MODULE_NAME[12]="ksocklnd"
+BUILT_MODULE_NAME[13]="libcfs"
+BUILT_MODULE_NAME[14]="lnet"
+BUILT_MODULE_NAME[15]="lnet_selftest"
+
+# Location of the modules in the source tree after build
+BUILT_MODULE_LOCATION[0]="lustre/fid"
+BUILT_MODULE_LOCATION[1]="lustre/fld"
+BUILT_MODULE_LOCATION[2]="lustre/lmv"
+BUILT_MODULE_LOCATION[3]="lustre/lov"
+BUILT_MODULE_LOCATION[4]="lustre/llite"
+BUILT_MODULE_LOCATION[5]="lustre/mdc"
+BUILT_MODULE_LOCATION[6]="lustre/mgc"
+BUILT_MODULE_LOCATION[7]="lustre/obdclass"
+BUILT_MODULE_LOCATION[8]="lustre/obdecho"
+BUILT_MODULE_LOCATION[9]="lustre/osc"
+BUILT_MODULE_LOCATION[10]="lustre/ptlrpc"
+BUILT_MODULE_LOCATION[11]="lnet/klnds/o2iblnd"
+BUILT_MODULE_LOCATION[12]="lnet/klnds/socklnd"
+BUILT_MODULE_LOCATION[13]="libcfs/libcfs"
+BUILT_MODULE_LOCATION[14]="lnet/lnet"
+BUILT_MODULE_LOCATION[15]="lnet/selftest"
+
+# Final destination of the modules under /lib/modules/<kernel>/
+DEST_MODULE_LOCATION[0]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[1]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[2]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[3]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[4]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[5]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[6]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[7]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[8]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[9]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[10]="/updates/kernel/fs/lustre"
+DEST_MODULE_LOCATION[11]="/updates/kernel/net/lustre"
+DEST_MODULE_LOCATION[12]="/updates/kernel/net/lustre"
+DEST_MODULE_LOCATION[13]="/updates/kernel/net/lustre"
+DEST_MODULE_LOCATION[14]="/updates/kernel/net/lustre"
+DEST_MODULE_LOCATION[15]="/updates/kernel/net/lustre"
--- /dev/null
+#!/bin/sh
+
+set -e
+
+# Get the package version
+package="lustre-client-modules"
+version="$(dpkg-query -W -f='${Version}' "${package}-dkms" | sed -e 's/-[^-]*$//')"
+
+dkms add -m "${package}" -v "${version}"
+dkms build -m "${package}" -v "${version}" && dkms install -m "${package}" -v "${version}" || true
--- /dev/null
+#!/bin/sh
+
+set -e
+
+# Get the package version
+package="lustre-client-modules"
+version="$(dpkg-query -W -f='${Version}' "${package}-dkms" | sed -e 's/-[^-]*$//')"
+
+dkms remove -m "${package}" -v "${version}" --all || true
# whether to use module-assistant to build the kernel modules or not
USE_MA = true
+# Whether to build the DKMS packages
+BUILD_DKMS ?= false
+
+ifeq ($(BUILD_DKMS),true)
+ DKMS_TARGET = binary-$(DKMS_PKG)
+else
+ DKMS_TARGET =
+endif
+
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
# This is the Lustre version
VERSION=$(shell sed -n -e '1s/.*(\(.*\)) .*/\1/p' debian/changelog)
-UPVERSION=$(shell echo $VERSION | sed -e 's/-[^-]*$$//')
+UPVERSION=$(shell echo $(VERSION) | sed -e 's/-[^-]*$$//')
# KVER is set to LINUXRELEASE being by autoconf which is either
# $(uname -r) or the version of the source specified by the user
ifneq (,$(findstring server,$(DEB_BUILD_PROFILES)))
UTILS_PKG=lustre-server-utils
MODS_PKG=lustre-server-modules
+ DKMS_PKG=
else
UTILS_PKG=lustre-client-utils
MODS_PKG=lustre-client-modules
+ DKMS_PKG=lustre-client-modules-dkms
endif
#Build dir
binary-arch: binary-$(UTILS_PKG) binary-$(DEV_PKG) \
binary-$(IOKIT_PKG) binary-$(TESTS_PKG)
-binary-indep: binary-$(SOURCE_PKG)
+binary-indep: binary-$(SOURCE_PKG) $(DKMS_TARGET)
binary: binary-indep binary-arch
dh_md5sums -p $(SOURCE_PKG)
dh_builddeb -p $(SOURCE_PKG)
+binary-$(DKMS_PKG): build-stamp
+ dh_testdir
+ dh_testroot
+ # Create /usr/src/lustre-client-modules-<version>
+ dh_installdirs -p $(DKMS_PKG) usr/src/lustre-client-modules-$(UPVERSION)
+ # Copy the source
+ rsync -av --exclude='debian/$(DKMS_PKG)/*' --exclude='.git/' \
+ --link-dest=$(PWD) \
+ . debian/$(DKMS_PKG)/usr/src/lustre-client-modules-$(UPVERSION)
+ # Clean it up
+ $(MAKE) -C debian/$(DKMS_PKG)/usr/src/lustre-client-modules-$(UPVERSION) -f debian/rules clean
+
+ # Put the DKMS configuration file in place
+ sed -e 's/[@]UPVERSION[@]/$(UPVERSION)/' debian/dkms.conf.in > debian/$(DKMS_PKG)/usr/src/lustre-client-modules-$(UPVERSION)/dkms.conf
+ dh_install -p $(DKMS_PKG)
+ dh_installchangelogs -p $(DKMS_PKG) lustre/ChangeLog
+ dh_installdocs -p $(DKMS_PKG)
+ dh_compress -p $(DKMS_PKG)
+ dh_installdeb -p $(DKMS_PKG)
+ dh_strip -p $(DKMS_PKG)
+ dh_fixperms -p $(DKMS_PKG)
+ dh_gencontrol -p $(DKMS_PKG)
+ dh_md5sums -p $(DKMS_PKG)
+ dh_builddeb -p $(DKMS_PKG)
+
# if only we could use m-a for this, but this stupid "compliant.list"
# thing fouls that up
binary-kern-mods:
dpatch deapply-all -v
-$(MAKE) distclean
rm -rf debian/substvars debian/*.bak debian/*~ *~ *-stamp
- ls -d debian/lustre-*-modules-* | grep -v _KVERS_ | xargs rm -f || true
+ ls -d debian/lustre-*-modules-* | grep -v _KVERS_ | grep -v dkms | xargs rm -f || true
# only remove this if the clean was not called from kdist_clean
if [ "$$MA_SOURCE_PKG" = "" ]; then \
rm -rf debian/m-a_root; \