Version bumps (zpkg bump)
Overview
Section titled “Overview”zpkg bump detects new upstream releases and updates a recipe’s version,
sources, checksums, build and revision together.
Detection uses update.conf when present. Otherwise it is inferred from the
recipe’s version and single sources entry: GitHub archive/release URLs and
listing URLs with a version in the filename or a version directory are
supported. Every recipe in every channel is covered by --check. --check
never writes, so you can review the whole plan first.
# Detection only (read-only)zpkg bump --check --all-channelszpkg bump --check --channel testing curl mesa
# Apply an explicit version (works without update.conf)zpkg bump hwdata 0.413 --channel stable --apply
# Detect upstream and verify with a buildzpkg bump mesa --channel testing --apply --build
# Commit / PR (a PR requires --build and --yes)zpkg bump mesa --channel testing --apply --build --commitzpkg bump mesa --channel testing --apply --build --pr --yesAn open update path for every recipe
Section titled “An open update path for every recipe”Because recipes without update.conf are inferred from version and
sources, every recipe in every channel participates in --check. Inference
handles:
- GitHub archives —
github.com/<owner>/<repo>/archive/refs/tags/<tag>... - GitHub releases —
github.com/<owner>/<repo>/releases/download/<tag>/<asset> - Listing URLs — a version in the filename, or a version directory such as
.../6.8.3/(the parent listing is read)
Only upstreams that cannot be inferred (meta packages, multiple sources,
commit pins, unusual tag formats) show up as manual. Adding update.conf
opts them into detection; TYPE=manual opts out explicitly.
This gives recipe authors and maintainers the same reviewable workflow for proposing updates: a clear, understandable way for anyone to contribute to development.
A full --check reports an unreachable upstream as error and continues with
the other recipes. When you name a specific package, its detection error stops
the command.
Apply every package at once
Section titled “Apply every package at once”--all-packages scans every recipe in the selected channel(s). With --apply,
it applies every update that can be detected and validated.
# Apply every recipe in testing and verify each buildzpkg bump --all-packages --channel testing --apply --build
# Put all channels into one branch and one PRzpkg bump --all-packages --all-channels --apply --build --pr --yes- Recipes reported as
manual,no-update,blocked,downgradeorerrorare left unchanged and remain in the table and summary --buildfirst checks that depends and makedepends are installed. A recipe with missing packages becomesblockedand the rest continue. The check is package-level; it does not prove that headers or executables are present- If one recipe fails detection, download or validation, the others continue; nothing is written for the recipe that failed
- If any
--buildfails, the whole batch is rolled back --prputs every applied recipe into one branch and one PR (--buildand--yesare required)--all-channelsis for producing one bulk PR. Merge channel by channel, following the unstable → testing → stable validation order
Progress
Section titled “Progress”While --check / --apply runs, stderr shows Checking / Preparing /
Building / Built progress. On a terminal the checking line updates in
place; in pipes and logs each line is kept. The --json plan still goes to
stdout, so progress never mixes with the JSON.
Safety model
Section titled “Safety model”bump separates detection from application so an automatic run cannot leave
the tree half-updated.
--checkis read-only. Files are written only with an explicit--apply- The new source is actually downloaded and hashed with SHA-256
- The rewritten recipe is reloaded in a temporary directory and validated
- Multiple recipes run as prepare → write → build, and every file is restored from a backup on failure
- A git tree with uncommitted changes is rejected (override with
--force) - Downgrades are rejected by default (
--allow-downgrade); the same version recomputes checksums only with--accept-retag --prrequires--buildand--yes, and never merges automatically- Candidates outside
SERIESare rejected unless--allow-series-change
A recipe counts as applied only after every step succeeds. With --build, a
failed build rolls the writes back.
Minimum dependency versions
Section titled “Minimum dependency versions”--apply extracts minimum dependency versions from the new source’s
configure.ac / CMakeLists.txt / meson.build and checks them against the
versions in the recipe tree. If a declared dependency is too old, no recipe
file is written.
zpkg bump libxslt 1.1.45 --channel testing --apply# libxslt: upstream requires libxml2 >= 2.15.1 (configure.ac:407; tree: 2.13.9)
# Override explicitlyzpkg bump libxslt 1.1.45 --channel testing --apply --ignore-requirementsFor an explicit package the same inspection is available without writing:
zpkg bump --check --check-deps libxslt 1.1.45 --channel testing- Module names are resolved to recipes through
pkgconfig.mapat the tree root and zpkg’s built-in table. Unknown modules are warnings, not blockers - Only dependencies actually declared in the recipe’s
depends/makedependsblock the update, which keeps conditional or disabled features from producing false positives - A full
--check --all-channelsdoes not download sources. The deep check runs on--applyand on explicit--check-depsonly - This checks minimum versions only; soname / ABI changes are not detected
update.conf
Section titled “update.conf”Use this file to override the inference. KEY=VALUE lines; lines starting with
# are comments. The keys depend on TYPE.
| TYPE | Required | Meaning |
|---|---|---|
github |
REPO, TAG_REGEX |
Merges GitHub Releases and tags. PRERELEASE=1 allows release candidates |
kernel |
SERIES |
kernel.org releases.json; SERIES=mainline or a numeric series such as 6.18 |
url |
URL, REGEX |
Scrape a listing page; one capture group is the version |
self |
ARCHIVE |
Self-hosted archive; needs --source and an explicit version |
manual |
— | Never auto-detected (for companion-only recipes) |
Common keys:
| Key | Meaning |
|---|---|
SERIES |
Version prefix, used when upstream maintains release branches |
PRERELEASE |
1 includes alpha / beta / rc candidates (excluded by default) |
SOURCE_TEMPLATE |
Source URL template; supports ${VERSION} ${TAG} ${MAJOR} ${MINOR} ${SERIES} ${NAME} |
SOURCE1..SOURCE16 |
Per-source templates; cannot be combined with SOURCE_TEMPLATE |
COMPANION |
Recipe updated to the same version (for example linux-headers) |
BUILD_REWRITE |
Rewrite the old version string in build scripts (default 1) |
Examples
Section titled “Examples”TYPE=urlURL=https://archive.mesa3d.org/REGEX=mesa-([0-9]+\.[0-9]+\.[0-9]+)\.tar\.xzSOURCE_TEMPLATE=https://archive.mesa3d.org/mesa-${VERSION}.tar.xzSERIES=26.3TYPE=kernelSERIES=7.3SOURCE_TEMPLATE=https://cdn.kernel.org/pub/linux/kernel/v${MAJOR}.x/linux-${VERSION}.tar.xzCOMPANION=linux-headersTYPE=githubREPO=Keychrom/TessaTAG_REGEX=^v?([0-9]+\.[0-9]+\.[0-9]+)$SOURCE_TEMPLATE=https://github.com/Keychrom/Tessa/archive/refs/tags/v${VERSION}.tar.gzChannel policy
Section titled “Channel policy”Set SERIES only for packages whose upstream maintains release branches.
- linux — stable follows the LTS series (
6.18), testing7.3, and unstablemainlinewithPRERELEASE=1 - mesa — stable
26.2, testing / unstable26.3, so only patches within the maintained branch are picked up - curl / hwdata — upstream maintains only the latest release, so there is
no
SERIES; apply when it suits each channel
--all-channels detects in every channel, but apply one channel at a time and
promote unstable → testing → stable.
Rewriting build scripts
Section titled “Rewriting build scripts”Many recipes use cd "$ZPKG_SRC/foo-$ZPKG_VERSION", but some hardcode
cd "$ZPKG_SRC/foo-1.2.3". bump replaces the old version with boundaries so
1.0 does not corrupt 1.0.1. If a hardcoded source directory cannot be
rewritten, the run stops with an error. Disable rewriting with
BUILD_REWRITE=0 or --no-build-rewrite.
revision is removed when the upstream version changes (channel-local
revisions are not carried over). Use --keep-revision to keep it.
CI and PRs
Section titled “CI and PRs”--check --json --exit-code exits with status 2 when an update is available.
The bump-check.yml workflow in zignos-recipes runs --check daily and
writes the result to the job summary and an artifact. GitHub-hosted runners do
not build packages.
Run --build and --pr on a build host. --commit commits to a
bump/<pkg>-<version> branch, and --pr --yes pushes it.
A git worktree for pull requests
Section titled “A git worktree for pull requests”--commit and --pr use the recipe tree’s .git and origin.
zpkg sync --git uses git to fetch recipes, but it leaves only a .zpkg-git
commit stamp in the installed tree, not .git. A synced tree such as
/usr/share/zignos/recipes therefore cannot be used for --pr.
Clone the repository for the PR and pass it with --tree.
git clone https://github.com/studio-nosa-tech/zignos-recipes /var/tmp/zignos-recipesgit -C /var/tmp/zignos-recipes status --short
zpkg bump --tree /var/tmp/zignos-recipes \ --all-packages --all-channels --apply --build --pr --yes/usr/share/zignos/recipesis the recipe tree used by the system/var/tmp/zignos-recipesis the worktree used for the PR- After the PR is merged, update the system with
zpkg sync --git
zpkg sync --git does not replace the tree when the commit is unchanged. If a
failed --pr left applied changes behind, move the tree aside and sync again.
mv /usr/share/zignos/recipes /usr/share/zignos/recipes.bakzpkg sync --gitrm -rf /usr/share/zignos/recipes.bakWith and without GitHub CLI
Section titled “With and without GitHub CLI”--pr --yes pushes the branch and creates a PR. How the PR is created depends
on whether gh is available.
With GitHub CLI
If gh is on PATH, it runs gh pr create after the push. The PR body lists the
channel, packages and build result. If gh fails (not logged in, missing
permissions, and so on), the branch stays pushed and a compare URL is printed.
Without GitHub CLI
The branch is still pushed and a GitHub compare URL is printed. Open the URL and
create the PR in the web UI. stage3 does not include gh by default.
Recommended: install github-cli and log in first
Install gh with zpkg install github-cli, run gh auth login once, and then
use --pr --yes. This automates PR creation and makes failures easier to
diagnose. Check the login state with gh auth status.
zpkg install github-cligh auth loginzpkg bump --all-packages --channel testing --apply --build --pr --yesgh auth login signs in through the browser or a token. In CI, use
GH_TOKEN / GITHUB_TOKEN.
The commit created by --commit is unsigned. Before pushing it directly to
main, sign the tree with scripts/sign-recipes.sh in zignos-recipes.
Branches pushed for --pr may stay unsigned; the maintainer signs after the
merge.
Limitations
Section titled “Limitations”- Upstreams that cannot be inferred (meta packages, multiple sources, commit
pins, unusual tag formats) stay
manual; an explicit version still works, andupdate.confopts them into detection - GitHub API rate limits apply (60 requests/hour unauthenticated); CI uses
GITHUB_TOKEN - Upstream signatures are not verified; the SHA-256 of the downloaded source is recorded
- Dependency changes (soname bumps and similar) are not detected;
--buildand testing cover that - Nothing is merged automatically
