Skip to content

Version bumps (zpkg bump)

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-channels
zpkg 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 build
zpkg bump mesa --channel testing --apply --build
# Commit / PR (a PR requires --build and --yes)
zpkg bump mesa --channel testing --apply --build --commit
zpkg bump mesa --channel testing --apply --build --pr --yes

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.

--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 build
zpkg bump --all-packages --channel testing --apply --build
# Put all channels into one branch and one PR
zpkg bump --all-packages --all-channels --apply --build --pr --yes
  • Recipes reported as manual, no-update, blocked, downgrade or error are left unchanged and remain in the table and summary
  • --build first checks that depends and makedepends are installed. A recipe with missing packages becomes blocked and 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 --build fails, the whole batch is rolled back
  • --pr puts every applied recipe into one branch and one PR (--build and --yes are required)
  • --all-channels is for producing one bulk PR. Merge channel by channel, following the unstable → testing → stable validation order

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.

bump separates detection from application so an automatic run cannot leave the tree half-updated.

  1. --check is read-only. Files are written only with an explicit --apply
  2. The new source is actually downloaded and hashed with SHA-256
  3. The rewritten recipe is reloaded in a temporary directory and validated
  4. Multiple recipes run as prepare → write → build, and every file is restored from a backup on failure
  5. A git tree with uncommitted changes is rejected (override with --force)
  6. Downgrades are rejected by default (--allow-downgrade); the same version recomputes checksums only with --accept-retag
  7. --pr requires --build and --yes, and never merges automatically
  8. Candidates outside SERIES are rejected unless --allow-series-change

A recipe counts as applied only after every step succeeds. With --build, a failed build rolls the writes back.

--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 explicitly
zpkg bump libxslt 1.1.45 --channel testing --apply --ignore-requirements

For 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.map at the tree root and zpkg’s built-in table. Unknown modules are warnings, not blockers
  • Only dependencies actually declared in the recipe’s depends / makedepends block the update, which keeps conditional or disabled features from producing false positives
  • A full --check --all-channels does not download sources. The deep check runs on --apply and on explicit --check-deps only
  • This checks minimum versions only; soname / ABI changes are not detected

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)
testing/desktop/mesa/update.conf
TYPE=url
URL=https://archive.mesa3d.org/
REGEX=mesa-([0-9]+\.[0-9]+\.[0-9]+)\.tar\.xz
SOURCE_TEMPLATE=https://archive.mesa3d.org/mesa-${VERSION}.tar.xz
SERIES=26.3
testing/core/linux/update.conf
TYPE=kernel
SERIES=7.3
SOURCE_TEMPLATE=https://cdn.kernel.org/pub/linux/kernel/v${MAJOR}.x/linux-${VERSION}.tar.xz
COMPANION=linux-headers
testing/desktop/tessa/update.conf
TYPE=github
REPO=Keychrom/Tessa
TAG_REGEX=^v?([0-9]+\.[0-9]+\.[0-9]+)$
SOURCE_TEMPLATE=https://github.com/Keychrom/Tessa/archive/refs/tags/v${VERSION}.tar.gz

Set SERIES only for packages whose upstream maintains release branches.

  • linux — stable follows the LTS series (6.18), testing 7.3, and unstable mainline with PRERELEASE=1
  • mesa — stable 26.2, testing / unstable 26.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.

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.

--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.

--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-recipes
git -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/recipes is the recipe tree used by the system
  • /var/tmp/zignos-recipes is 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.bak
zpkg sync --git
rm -rf /usr/share/zignos/recipes.bak

--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-cli
gh auth login
zpkg bump --all-packages --channel testing --apply --build --pr --yes

gh 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.

  • Upstreams that cannot be inferred (meta packages, multiple sources, commit pins, unusual tag formats) stay manual; an explicit version still works, and update.conf opts 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; --build and testing cover that
  • Nothing is merged automatically