Making a package in a PPA
Hey Chris,
This is how to create a PPA, make a minor package change, build a package, and upload to a PPA.
- Useful env vars:
export GPGKEY=0DCDF806
export EDITOR=/usr/bin/vim
export DEBFULLNAME="Corey Bryant"
export DEBEMAIL="corey.bryant@canonical.com"
export QUILT_PATCHES=debian/patches
-
Go to your launchpad page (e.g. https://launchpad.net/~chris.macnaughton) and click "Create a new PPA".
-
If working with bionic (queens by default), no changes are needed for your PPA dependencies. If working with xenial-queens (cloud archive) you'll need to "Edit PPA dependencies" and make your PPA depend on queens-staging. You may be able to get hints from https://launchpad.net/~corey.bryant/+archive/ubuntu/xenial-queens.
-
Clone package source: git clone https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/keystone; cd keystone; git checkout stable/queens
-
ls debian # the debian directory is where all package customization occurs
- poke around and see what's there
- maybe cherry-pick an upstream patch to debian/patches
-
dch -i # make a changelog entry
-
Bonus:
- cherry pick a patch from the corresponding upstream branch that is not yet in the package
- or use quilt to create a new patch (quilt new; quilt edit ; quilt refresh; quilt pop -a)
- patch goes in debian/patches; patch name goes in debian/patches/series; 'git add' any new files
-
debcommit -a -
git log# see your change? -
gbp buildpackage -S -sa -
ppa_upload.sh --yes -d bionic --upload ppa:chris.macnaughton/bionic-rocky ../build-area/keystone*.dsc# [1] -
look for package building in ppa
-
install package from ppa - ie.
sudo add-apt-repostiory ppa:chris.macnaughton/bionic-rocky && sudo apt update && sudo apt install keystone-common
[1] ppa_upload.sh
#!/bin/bash
#
# This script just makes it easier to upload the same package version to a PPA multiple times.
#
# ppa_upload.sh -d bionic --upload ppa:corey.bryant/bionic-queens ../build-area/keystone*.dsc
backportpackage -S ~ppa`date +%Y%m%d%H%M` $@
Trouble shooting:
* git build-package may fail with something like "dpkg-checkbuilddeps: error: Unmet build dependencies: apache2-dev dh-apache2 openstack-pkg-tools (>= 23~) python3-sphinx (>= 1.6.2) You will need to apt install these build dependency packages and try again. Note: look in debian/control at Build-Dependencies (that's where these are defined) and Depends are run-time dependencies
No comments to display
No comments to display