Debian Packaging Workflow
Notes on Maintaining the Debian Packages
Although you may still find a debian subdirectory in our OPM repositories this is obsolete and should not be used as it is rather outdated. The Debian packaging effort takes place on salsa.debian.org and is managed by the Debian Science Team. To contribute you will have to create an account on salsa.debian.org and apply for being added to the Debian Science Team. If it takes long then you might want to send an email to the Debian Science mailinglist debian-science@lists.debian.org.
Repositories on Salsa
For each module there is a corresponding repository on sala. These are:
- https://salsa.debian.org/science-team/opm-common
- https://salsa.debian.org/science-team/opm-material
- https://salsa.debian.org/science-team/opm-grid
- https://salsa.debian.org/science-team/opm-models
- https://salsa.debian.org/science-team/opm-simulators
- https://salsa.debian.org/science-team/opm-upscaling
The packaging effort uses git-buildpackage as the main tool and bases the packaging on release tarballs and quilt for patching the upstream versions found in OPM's git repositories.
git-buildpackage instruction
repository management with git-buildpackage
- To clone a repository please use gbp use e.g.:
gbp clone https://salsa.debian.org/science-team/opm-common
This will clone the repository with the three banches master (Where the debian packaging effort is), upstream (The upstream repository as of the last release that was imported), and pristine-tar (The branch holding the deltas for reconstructing the original tarball).
- To download the recent changes to the packaging effort from other do
gbp pull
- To upload your recent changes (to all relevant branches) use
gbp push
Import new (final) upstream release
For more information see gbp documentation.
For importing a new upstream version, please follow the following recipe:
- If not done yet, add the upstream git to repo , e.g.
git remote add upstream https://github.com/OPM/opm-common
- make sure the patch-queue branch is up to date
- update upstream:
git fetch upstream
- update necessary branches from debian repo (in case of changes from others): gbp pull
- import new version:
gbp import-orig --uscan
- rebase patch queue:
gbp pq rebase
- resolve conflicts, etc.
- export the patch queue:
gbp pq export --commit
- change the commit message to something more meaningful
Import a prerelease version using a tarball of a git commit
Instead of importing the new version using uscan as above, you manually create a tarball based on a git check checkout of upstream. This assumes that you have checked out the version that you need.
PACKAGE=opm-common # name of the package NEXTVERSION=2022.04 # next stable version VERSION=$(git log -1 --date=format:%Y%m%d --pretty=$NEXTVERSION~git%cd.%h) PREFIX=${PACKAGE}_${VERSION}; DIR_PREFIX=${PACKAGE}-${VERSION}; git archive --format=tar --prefix=$DIR_PREFIX/ HEAD | gzip -c > ../$PREFIX.orig.tar.gz git checkout master # branch with the debian packaging