Logo

HPC @ Uni.lu

High Performance Computing in Luxembourg

Generating Debian Packages Under 3.2 Kernel for Lustre 2.4

During the last maintenance of the gaia cluster, I had to generate the Debian packages for a Lustre client version 2.4 over a 3.2 backported Linux kernel (on gaia-74 node).

Here are some notes to share, adapted from the ones of Nicolas Capit might be useful for other sysadmins.

  $> uname -a
  Linux gaia-74 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.46-1~bpo60+1 x86_64 GNU/Linux

Once collected the source archive for Lustre 2.4.1 in /tmp/lustre-2.4.1.tar.xz on the node:

  $> export LANG=C
  $> apt-get install automake linux-headers-3.2.0-4-all-amd64 gcc make linux-source-3.2 libncurses5-dev ed dpkg-dev libreadline-dev debhelper dpatch libsnmp-dev quilt rsync module-assistant 

Compile the kernel (nothing special here):

  $> cd /usr/src/
  $> tar xf /usr/src/linux-source-3.2.tar.bz2
  $> cp /boot/config-3.2.0-0.bpo.4-amd64 .config
  $> sed -i s/^SUBLEVEL.*/SUBLEVEL\ =\ 0/g Makefile
  $> sed -i s/^EXTRAVERSION.*/EXTRAVERSION\ =\ -0\.bpo\.4-amd64/g Makefile
  $> make menuconfig # to load the .config - exit on menu
  $> make -j `cat /proc/cpuinfo | grep processor | wc -l`

Prepare the compilation of Lustre client against the freshly compiled kernel tree

  $> mv /usr/src/linux-headers-3.2.0-0.bpo.4-amd64 /usr/src/linux-headers-3.2.0-0.bpo.4-amd64.orig
  $> cd /usr/src/linux-source-3.2/
  $> echo $PWD
  /usr/src/linux-source-3.2/
  
  $> ln -s $PWD /usr/src/linux-headers-3.2.0-4-amd64
  $> cp /usr/src/linux-headers-3.2.0-0.bpo.4-amd64.orig/Module.symvers .

Now generate the debian packages for Lustre client 2.4.1:

  $> cd /tmp
  $> tar xf lustre-2.4.1.tar.xz
  $> cd lustre-2.4.1
  $> mkdir .git
  $> chmod +x autogen.sh 
  $> ./autogen.sh
  $> ./configure --disable-server --with-linux=/usr/src/linux-headers-3.2.0-0.bpo.4-amd64
  $> sed -i s/^SUPPORTED_KERNELS.*/SUPPORTED_KERNELS=3\.2\.0/g debian/rules
  $> make debs | tee /root/debbuild-lustre-2.4.1.log
Note that the compilation will fail due to the absence of some diff files at the end. That’s normal (!).

You shall now have the generated debian packages in /tmp/lustre-2.4.1/debs. You can install them:

 $> ls -lh debs/
 $> dpkg -i lustre-client-modules-3.2.0-0.bpo.4-amd64_2.4.1-1_amd64.deb lustre-utils_2.4.1-1_amd64.deb liblustre_2.4.1-1_amd64.deb 

That’s all forks!