Debian

Build custom Debian packages

We will install a current Debian release to a build environment which will spawn in an isolated light-weight namespace container. mount /var/lib/machines/build debootstrap –arch amd64 bookworm /var/lib/machines/build/ http://ftp.de.debian.org/debian/ Create a start script to spawn the container. cat << EOF > ~/bin/c-buildstart.sh #!/bin/sh mount /var/lib/machines/build systemd-nspawn -D /var/lib/machines/build EOF Copy custom shell configuration to the container. […]

Namespace containers using systemd-nspawn

We will use systemd-nspawn to create a container that will use a fully isolated environment. This environment will use a virtualized filesystem and process hierarchy. It will allow us to install Linux-based operating systems on our host. We can change to our container to compile packages or to launch a virtual OS image. Create a […]

Allow SFTP to chrooted directories

Accessing files inside the directory of a virtual host, e.g. to troubleshoot code issues, is classically a domain of FTP.  Since we don’t want to introduce the detriments of FTP in our setup, we will be using internal-sftp, a subsystem of the ssh-daemon. We will want to allow sftp-Access to our server only when required and jail the […]

Custom Debian apt repository

Let’s set up a local repository that will host our custom Debian packages using reprepro. We can configure multiple release trees in /var/www/leuxner.net/apt/debian/conf/distributions if we want to support multiple distributions. reprepro does not support multiple versions per distribution as of now. Origin: edi.leuxner.net Label: Edi-Builds Suite: edi-bookworm Codename: bookworm Architectures: amd64 Components: main Description: Apt […]