Skip to content

Instantly share code, notes, and snippets.

@jbarber
Last active September 29, 2016 14:48
Show Gist options
  • Save jbarber/088f19cf1b6178adb3cb12fd52919d29 to your computer and use it in GitHub Desktop.
Save jbarber/088f19cf1b6178adb3cb12fd52919d29 to your computer and use it in GitHub Desktop.
Instructions for modifying existing debian packages
cat <<EOF > /etc/apt/sources.list.d/rainforest-ppa-trusty.list
deb http://ppa.launchpad.net/rainforest/ppa/ubuntu trusty main
deb-src http://ppa.launchpad.net/rainforest/ppa/ubuntu trusty main
EOF
apt-get update
mkdir debs; cd debs
apt-get source qemu
cd qemu-2.1.1
# Patch the code
## List the patches
quiltrc series
## Add a new change
quilt new NAME_OF_PATCH
## The change modifies README
quilt add README
## Add the change to the patchset
quilt refresh
## unapply all the patches to leave the source pristine
quilt pop -a
# After you've done all the patching, bump the changelog
# The versioning is described [here](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version)
dch -i --distribution=trusty
# Build the sources changes file, signed with the public key 3A352BE1. Include everything (`-sa`)
# The public key you sign the changes file with must be in your launchpad account, otherwise the
# build will be rejected. Use the key to make sure the correct key is used if you have multiple keys with the same GPG User-ID
debuild -k3A352BE1 -S -sa
# List the public keys (and their fingerprints) you have in GPG
gpg --fingerprints -k
# Upload the change to launchpad
# This creates a `qemu_2.1.1-11rainforest_source.changes` file, which will prevent dput from running on the same changes file until you remove it
cd ..
dput ppa:jonathan-barber/qemu qemu_2.1.1-11rainforest_source.changes
# You should get an email from launchpad telling you that the package was accepted
# You can check the package status at https://launchpad.net/~jonathan-barber/+archive/ubuntu/ppa/+builds?build_state=all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment