Once in a while I have to build Ubuntu packages (.deb) for Ceph to test some of the Pull Requests I write.
I always forget on how to build these packages and probably other people do so as well.
I build Ceph on my laptop using a Docker container with a few commands.
docker run -v /home/wido/repos/ceph:/usr/src/ceph -ti ubuntu:18.04 bash
I have the Ceph repository checked out locally in /home/wido/repos/ceph which I then map into the Docker container.
Once in the container it’s fairly simple:
apt update
apt -y install dpkg-dev
cd /usr/src/ceph
dpkg-buildpackage -us -uc -b -j 4
This will now yield a list of packages you need to install. Once you’ve installed them:
./do_cmake.sh
dpkg-buildpackage -us -uc -b -j 4
Now be ready to wait for a long time as this can take 2 hours as it does on my laptop.
After the build succeeds you’ll find the .deb files in /usr/src
Last Updated on 11-12-2020 by Wido den Hollander