Skip to main content

ceph

Ceph uses sbuild to build the package

Dependencies

# sbuild dependencies
sudo apt install -yq sbuild debhelper ubuntu-dev-tools piuparts
# Ceph dependencies
sudo apt install -yq \
    default-jdk javahelper junit4 libatomic-ops-dev \
    libboost-dev libboost-program-options-dev libboost-system-dev \
    libboost-thread-dev libedit-dev libfcgi-dev libfuse-dev \
    libgoogle-perftools-dev libjerasure-dev libkeyutils-dev \
    libleveldb-dev libs3-dev libsnappy-dev libxml2-dev python-nose yasm

Setup sbuild

mkdir -p /home/ubuntu/ubuntu/logs

create /etc/schroot/sbuild/fstab

# fstab: static file system information for chroots.
# Note that the mount point will be prefixed by the chroot path
# (CHROOT_PATH)
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/proc           /proc           none    rw,bind         0       0
/sys            /sys            none    rw,bind         0       0
/dev/pts        /dev/pts        none    rw,bind         0       0
tmpfs           /dev/shm        tmpfs   defaults        0       0
# Mount a large scratch space for the build, so we don't use up
# space on an LVM snapshot of the chroot itself.
/var/lib/sbuild/build  /build   none    rw,bind         0       0

Create $HOME/.sbuildrc:

# *** VERIFY AND UPDATE $mailto and $maintainer_name BELOW ***

# Mail address where logs are sent to (mandatory, no default!)
$mailto = 'chris.macnaughton@canonical.com';

# Name to use as override in .changes files for the Maintainer: field
$maintainer_name='Chris MacNaughton <chris.macnaughton@canonical.com>';

# Directory for chroot symlinks and sbuild logs.  Defaults to the
# current directory if unspecified.
$build_dir='/home/ubuntu/ubuntu/build';

# Directory for writing build logs to
$log_dir="/home/ubuntu/ubuntu/logs";
# don't remove this, Perl needs it:
1;

Setup some chroots!

for distro in focal bionic; do
	mk-sbuild $distro
done

Build Ceph

sbuild ceph -c chroot:focal-amd64 --arch=amd64 --dist=focal --nolog -A