Skip to content

Maintaining the APT repositories

alexsdutton edited this page Mar 22, 2012 · 2 revisions

Creating a package

# Clone the source repository # Make sure the version number in setup.py (or datastage/__init__.py, in DataStage's case) and debian/changelog is different from any previous release. If not, run dch to create a new entry at the top of the changelog, and edit setup.py to match. # Use dpkg-buildpackage to build the package. If you haven't done this before on this particular machine you may need to install the Build-Depends packages listed in debian/control.

Once you're done, you should have a few files in the directory above called <package_name>_<version>_<architecture>.(deb|dsc|changes|tar.gz).

Uploading to the repository

Copy all the files for your package onto apt-repo.bodleian.ox.ac.uk. If you don't have an account, ask on the [email protected] mailing list. Use sudo to become the repoadmin user:

sudo -u repoadmin -i

Then include the package in the repository:

reprepro -b /path/to/repo include unstable /path/to/package.changes

The repositories on apt-repo.bodleian.ox.ac.uk are in the /srv/databank/ and /srv/datastage/ directories.

You should always include the package in the unstable distribution first in order to test it. Once you're happy that it works as expected you can copy it into the stable distribution, where it will be picked up by users:

reprepro -b /path/to/repo copy stable unstable [package-name]

Notes

  • If you make a mistake in an uploaded package you really shouldn't replace it with a package with the same version number. Instead, bump the version number, retag it, and go through the build and upload process again.
  • Jenkins pushes packages into the unstable DataStage distribution with a ~snapshots-YYYYMMDDHHMMSS suffix after every successful build. When you push a manually-built package into unstable without this suffix (e.g. in preparation for a release), the Jenkins-originated packages will have older version numbers and won't start appearing again until you bump the version number.