Building LXC and LXCFS 3.0.1 for Debian Stretch

Building LXC and LXCFS 3.0.1 for Debian Stretch

I've been keen to try the new LXC 3.0.1 release on Debian 9, and have got it packaged by re-using the official Debian LXC and LXCFS packages, and tweaking the build process as follows:

LXC:

mkdir lxc
cd lxc
apt-get source lxc
wget https://linuxcontainers.org/downloads/lxc/lxc-3.0.0.tar.gz
cd lxc-2.0.7/
uupdate ../lxc-3.0.0.tar.gz
cd ../lxc-3.0.0
rm debian/patches/*
rm debian/lua-lxc* -Rvf
  • Remove references to python in debian/control and debian/rules files.
  • Remove references to python in debian/control and debian/rules files.
dpkg-buildpackage

LXCFS:

mkdir lxcfs
cd lxcfs
apt-get source lxcfs
wget https://linuxcontainers.org/downloads/lxcfs/lxc-3.0.1.tar.gz
cd lxcfs-2.0.7
uupdate ../lxcfs-3.0.1.tar.gz
cd ../lxcfs-3.0.1
rm debian/lxcfs.install
  • Now remove the override_dh_install section from debian/rules.
  • Modify override_dh_installinit section from debian/rules to remove cp lines.
  • Remove libpam-cgfs section from debian/control file.
dpkg-buildpackage or dpkg-buildpackage -nc (if rebuilding from a failed build)

And thats all there is to it!