table of contents
| PKGOS-UPDATE-PKG(1) | Debian OpenStack packaging | PKGOS-UPDATE-PKG(1) |
NAME¶
pkgos-update-pkg - semi-automate a new upstream OpenStack release for one package
SYNOPSIS¶
pkgos-update-pkg [source-package-name]
DESCRIPTION¶
pkgos-update-pkg must be run from inside the git checkout of the package to update, and semi-automates the packaging of a new upstream OpenStack release, as driven by the osbpo (Debian OpenStack) deb-status page. The source package name defaults to the name of the current directory, and the OpenStack release is derived from the debian/<release> git branch, which must be checked out.
The script first fetches the deb-status page (namely https://osbpo.debian.net/deb-status/trixie-<release>.html) and reads the row of the package, which holds the version currently published in Debian, the new upstream version, and the status. When the status is OK, the package is already up to date, and nothing is done. When it is MISSING, the package isn't in Debian yet, and the initial packaging must be done by hand. Otherwise, the target version <epoch><upstream>-1 is computed, and if the current debian/changelog version isn't lower than that, the script also exits doing nothing.
If an update is needed, and provided that the work tree is clean, the script fetches the upstream tags with debian/rules fetch-upstream-remote, checks that the tag of the new upstream version exists, merges it with git merge --no-edit -X theirs, and bumps debian/changelog to the target version with dch. It then shows the resulting diff and waits for a single y keypress (Enter isn't needed) to confirm; any other key aborts, leaving the new changelog entry uncommitted. Once confirmed, the script commits the changelog, generates the orig tarball with debian/rules gen-orig-xz, builds the package with gbp buildpackage, creates the signed debian/<version> tag, pushes the branch and the tags, then re-signs the .changes file with debsign and uploads it with dput from the ../build-area directory.
The script is interactive: it requires a terminal for the confirmation keypresses.
ENVIRONMENT¶
- DEBSIGN_KEYID
- The GPG key id used by debsign when re-signing the .changes file (see debsign(1)).
- OSBPO_STATUS_URL
- Overrides the URL of the osbpo deb-status page.
- TMPDIR
- Directory in which the temporary work directory is created (defaults to /tmp).
EXIT STATUS¶
Returns 0 when the package was updated, or when there was nothing to do, and 1 on any failure (status page unreachable, package not found on the page, dirty work tree, missing upstream tag, merge failure, aborted confirmation, build failure, ...).
EXAMPLES¶
SEE ALSO¶
pkgos-update-release(1), gbp-buildpackage(1), debchange(1), debsign(1), dput(1).
AUTHOR¶
This script and its man page: (c) 2026, Thomas Goirand <zigo@debian.org>, released under the Apache-2.0 license.
| 2 October 2026 | openstack-pkg-tools |