Html5Depurate/Updating apt.wikimedia.org
How to update the html5depurate package in apt.wikimedia.org:
Setup
editgit clone https://gerrit.wikimedia.org/r/mediawiki/services/html5depurate
- Get pbuilder, devscripts, dupload
- Create pbuilder roots
sudo pbuilder --create \ --basetgz /var/cache/pbuilder/jessie.tgz \ --distribution jessie \ --mirror <debian-mirror> sudo pbuilder --create \ --basetgz /var/cache/pbuilder/trusty.tgz \ --distribution trusty \ --components 'main universe' \ --mirror <trusty-mirror>
- Get the debian branches
git branch debian gerrit/debian git branch debian-trusty gerrit/debian-trusty
Update git branches
edit- Merge changes from master and resolve conflicts
git checkout debian git merge master git commit --amend -C HEAD
- Add a changelog entry (the package version comes from here)
dch git commit -a -m "Changelog for package version x.y.z" git review debian
- Merge changes from debian into debian-trusty
git checkout debian-trusty git merge debian git commit --amend -C HEAD dch git commit -a -m "Changelog for package x.y.z~trusty" git review debian-trusty
Build and upload
editI've automated the rest:
#!/bin/bash
set -e
srcdir=~/src/wmf/mediawiki/services/html5depurate
# Test SSH connection
ssh carbon.wikimedia.org true
tmpdir=~/tmp/pbuilder
mkdir -p "$tmpdir" || true
tmpsrcdir=$(mktemp -d --tmpdir="$tmpdir")
cd "$tmpsrcdir"
git clone -b debian "$srcdir" html5depurate
jessiedsc=$(dpkg-source -b html5depurate | perl -ne 'if (/(html5depurate_.*\.dsc)/) {print "$1\n";}')
sudo pbuilder --build \
--basetgz /var/cache/pbuilder/jessie.tgz \
--configfile html5depurate/debian/pbuilderrc \
$jessiedsc
cd html5depurate
git checkout debian-trusty
cd ..
trustydsc=$(dpkg-source -b html5depurate | perl -ne 'if (/(html5depurate_.*\.dsc)/) {print "$1\n";}')
sudo pbuilder --build \
--basetgz /var/cache/pbuilder/trusty.tgz \
--configfile html5depurate/debian/pbuilderrc \
$trustydsc
cd /var/cache/pbuilder/result
jessiechanges=${jessiedsc%.dsc}_amd64.changes
trustychanges=${trustydsc%.dsc}_amd64.changes
debsign $jessiechanges
debsign $trustychanges
dupload --nomail $jessiechanges
dupload --nomail $trustychanges
ssh carbon.wikimedia.org "
set -ve
cd /srv/wikimedia/incoming
export REPREPRO_BASE_DIR=/srv/wikimedia
export GNUPGHOME=/root/.gnupg
sudo -E reprepro -C main --ignore wrongdistribution include jessie-wikimedia $jessiechanges
sudo -E reprepro -C main --ignore wrongdistribution include trusty-wikimedia $trustychanges
"
rm -rf "$tmpsrcdir"