Skip to content
Caleb Maclennan edited this page Jul 3, 2020 · 16 revisions
# 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/focal sile-focal -c security.privileged=true
lxc config device add sile-focal home disk source=$HOME path=/home/ubuntu
printf "uid $(id -u) 1000\ngid $(id -g) 1000" | lxc config set sile-focal raw.idmap -

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

# add own PPA for deps
lxc exec sile-focal -- 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

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

# login to launchpad
bzr launchpad-login alerque

# get & extract source of the thing you'll build
wget https://github.com/sile-typesetter/sile/releases/download/v0.10.4/sile-0.10.4.tar.bz2

# move to debian source name
mv sile-0.10.4.tar.bz2 sile_0.10.4.orig.tar.bz2

# extract and enter
tar xfvj sile_0.10.4.orig.tar.bz2
cd sile-0.10.4

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

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

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

# update debian changelog with new entry
dch -i

# rebuild source package
debuild -S -sA

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

# updload artifacts
cd ..
dput ppa:sile-typesetter/sile sile_0.10.4-0sile1_source.changes
Clone this wiki locally