This directory contains my scripts to build backports of R software from Debian sid or even experimental to older Debian distributions. Currently I am using the following setup: ~/.pbuilderrc contains: NAME="$DIST-$ARCH" APTCACHEHARDLINK=yes DISTRIBUTION="$DIST" DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}") APTKEYRINGS="/home/jranke/.gnupg/pubring.gpg" BASETGZ="`dirname $BASETGZ`/$NAME-base.tgz" BUILDRESULT="/var/cache/pbuilder/$NAME/result/" APTCACHE="/var/cache/pbuilder/$NAME/aptcache/" MIRRORSITE="http://deb.debian.org/debian/" OTHERMIRROR="deb http://security.debian.org/debian-security $DIST-security main|deb http://ftp.de.debian.org/debian $DIST-backports main|deb http://localhost/r-cran $DIST-cran46/" COMPONENTS="main" This means I have the appropriate aptcache and buildresult directories set up under /var/cache/pbuilder. I have several pbuilder images used for package creation under /var/cache/pbuilder, among others: /var/cache/pbuilder/bookworm-amd64-base.tgz With the pbuilderrc mentioned above, this can be created as a normal user with sudo mkdir -p /var/cache/pbuilder/bookworm-amd64/{aptcache,build} export ARCH=amd64 export DIST=bookworm sudo -E pbuilder create When using these scripts on Debian, I used to configure sudo to allow my normal user to use pbuilder, apt-get and the backporting scripts. Currently, I have set up my Debian installations using the Ubuntu like sudo configuration that I select during the installation. I am building other architectures in a chroot, currently only arm64 on a different machine. For creating a local chroot, I am using (e.g. for trixie) cd /var/chroot sudo mkdir trixie-arm64 sudo debootstrap trixie trixie-arm64 http://deb.debian.org/debian/ Then I add a new entry in /etc/schroot/schroot.conf like [trixie] description=Debian trixie arm64 type=directory profile=default directory=/var/chroot/trixie-arm64 and use sudo schroot -c trixie to enter it. Within the chroot I install some necessary or useful stuff apt install neovim gnupg build-essential devscripts add the matching local or global r-cran repository to /etc/apt/sources.list.d/cran.sources Types: deb deb-src URIs: https://localhost/r-cran trixie-cran46 Suites: trixie-cran46/ Components: Signed-By: /etc/apt/trusted.gpg.d/cran_debian_key.asc and put my key to the specified location gpg --keyserver keyserver.ubuntu.com \ --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7' gpg --armor --export '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7' | \ sudo tee /etc/apt/trusted.gpg.d/cran_debian_key.asc In the chroot, build-essential and devscripts have to be installed