Skip to content
Caleb Maclennan edited this page Feb 12, 2022 · 16 revisions

The following is largely obsolete. For bumps I am using this script. Keeping for reference, but probably not the place to start...


From scratch:

# setup vm
pacman -S lxd
usermod -a -G lxd caleb
systemctl enable --now lxd
lxd init

# Setup bash shell env for builds & pushes
cat <<- EOF >> ~/.bashrc
export DEBFULLNAME="Caleb Maclennan"
export DEBEMAIL="[email protected]"
export QUILT_PATCHES=debian/patches
eval \$(gpg-agent)
eval \$(ssh-agent)
EOF

# map a host user to the home directory so we have GPG keys and a stable build dir
lxc launch images:ubuntu/bionic sile-bionic -c security.privileged=true
lxc config device add sile-bionic home disk source=$HOME path=/home/ubuntu
printf "uid $(id -u) 1000\ngid $(id -g) 1000" | lxc config set sile-bionic raw.idmap -

# install build tools
lxc exec sile-bionic -- apt-get install -y gpg curl wget bzr devscripts equivs software-properties-common

# add own PPA for deps
lxc exec sile-bionic -- add-apt-repository ppa:sile-typesetter/sile

# make it easier for GPG to get passphrase from nested container + shell
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf

# login to launchpad
bzr launchpad-login alerque

# Make sure bzr knows who we are
bzr whoami "Caleb Maclennan <[email protected]>"

From previous:

# enter vm
lxc exec sile-bionic -- su ubuntu -l

# get & extract source of the thing you'll build
curl -fsSL https://github.com/sile-typesetter/sile/releases/download/v0.12.1/sile-0.12.1.tar.xz -o sile_0.12.1.orig.tar.xz

# extract and enter
tar xfva sile_0.12.1.orig.tar.xz
cd sile-0.12.1

# clone bzr repo of debian build
bzr branch --use-existing-dir lp:sile .

# install all build deps
sudo mk-build-deps -i

# update debian changelog with new entry
dch -i

# rebuild source package
debuild -S -sA

# save packaging changes
bzr diff
bzr commit -m "Update bionic to v0.12.1"
bzr push :parent

# updload artifacts
cd ..
dput ppa:sile-typesetter/sile sile_0.12.1-1ppa1~ubuntu20.10_source.changes
Clone this wiki locally