Skip to content
zoryn/ maintainer-assistant

zoryn check

Pre-submit and pre-build checks. The spec and packages checks run automatically from zoryn up, zoryn build, and zoryn submit — they can also be invoked standalone.

zoryn check version

Check if a new upstream version is available.

zoryn check version [-p|--package <name>] [-B <repo>]

Options:

  • -p, --package <name> — package name (default: the Name: field of the .gear spec in the current directory).
  • -B, --branch <repo> — branch to check against (default: sisyphus).

PyPI is checked first when the spec URL: points at pypi.org. Otherwise the watch file is used when present, and remote git tags otherwise — comparing remote tags fetched with git ls-remote. A watch file that cannot be parsed, or whose upstream listing comes back empty, does not end the check: the git tags are consulted as a fallback, with a warning saying why. The upstream URL is resolved the same way zoryn up resolves it — .gear/upstream/remotes, then the spec Vcs: tag, then URL:, each candidate verified with git ls-remote — so any live git host works: GitHub, git.kernel.org, a self-hosted cgit, and so on. The release-targets/upstream-branch restriction honoured by zoryn up (.gear/release-targets, .gear/upstream-branch, upstream-branch in [version]) applies here too: candidate tags are limited to those merged into the locally fetched upstream branch, so a series-pinned kernel repo is not offered an out-of-series version — and, like in up, a configured branch that cannot be resolved fails the check. The filter only knows what has been fetched, so when the local upstream branch has fallen behind its remote — or the remote carries a tag the local repository never fetched, which git's tag auto-following can miss when the commits are already present — the check fetches that branch together with the tags (git fetch --tags, the incremental delta — seconds even on a kernel repo) and answers from the fresh state; a warning that newer versions may be hidden appears only when that fetch fails or still leaves the local state behind. When .gear/version-up defines a [version] pattern/template, only tags matching the pattern are considered and the version is derived via the template. Pre-release tags are skipped, because the template normally drops the pre-release segment and selecting 2.0.0-rc1 would announce a 2.0.0 that upstream never released; if every matching tag is a pre-release the command reports that and exits 0. The pre-release marker is looked for only in the part of the tag the pattern captures, so a package whose name contains rc/dev/pre (orc, mercurial, libevdev) is unaffected. Without a pattern the search anchors on the tag carrying the current version and considers only tags in the same naming style (same prefix and separators), so foreign-style tags a repo inherited in its history — c-ares carrying curl's curl-7_19_4 — never win. Only when no tag carries the current version does the style-blind "latest stable tag" heuristic run, which can pick a bogus non-release tag (e.g. llama.cpp's 9794052 outranking b10103).

The command exits 1 when the check itself fails: the remote cannot be listed, has no tags or no version-shaped tags, the watch file cannot be parsed or yields no upstream versions, the PyPI lookup fails, the configured pattern matches no tag (a config error — e.g. a typo'd pattern; the message names the pattern), tags match but no comparable version can be derived from them (a broken template), or the filter names a group the pattern never captures (it could never match any tag). Having nothing to compare against yet is not a failure: no watch file and no git URL, a [version] filter pinning a release line upstream has not published a tag for, or only pre-releases so far, is reported on stdout and exits 0.

Note this differs from the git-merge scheme of zoryn up, which compares local tags and applies its own alias/normalization rules; the tarball scheme's no-watch-file fallback uses the same remote-tag path described here.

zoryn check upstream

Analyse upstream and determine update method.

zoryn check upstream [-p|--package <name>]

--package defaults to the Name: field of the .gear spec in the current directory.

Where data is looked up. When run inside the package's gear repository (spec Name: matches the package), the local worktree is scanned first — so even uncommitted changes are seen. If the local tree has no watch file, the missing pieces are pulled from the remote gitweb (git.altlinux.org, the HEAD of the gears or srpms repo); local fields still take precedence. Outside the package's repository, only the remote gitweb is queried.

Where the watch file is looked for (in this order):

  1. the file named by a copy: directive in .gear/rules or .gear-rules. A file named just watch also qualifies (e.g. altlinux/watch); a * glob is substituted with the package name;
  2. .gear/watch;
  3. <package>.watch;
  4. .gear/<package>.watch;
  5. debian/watch.

Prints whether a watch file was found, its source, the VCS URL, and the upstream git repository.

zoryn check spec

Validate RPM spec file before submit.

zoryn check spec [--no-network] [SPECFILE] [-B BRANCH]

Checks:

  • Required fields (Name, Version, Release, Summary, License, Group).
  • Deprecated Packager tag.
  • Duplicate versions in changelog.
  • URL and VCS reachability (unless --no-network).
  • Changelog vulnerability identifiers (CVE/BDU/OVE/MFSA) formatting for the girar parser.
  • Changelog bug-closure syntax — detects invalid formats not recognised by girar (e.g. (fix #N) instead of (Closes: #N)), out-of-range bug numbers, non-existent bugs, and already-closed bugs (via Bugzilla REST API, requires network).
  • Non-printable characters in metadata fields — control characters, NBSP, invalid UTF-8, and other invisible bytes. Locale-tagged fields (Summary(ru_RU.UTF-8), %description -l ru_RU.UTF-8) allow valid Unicode text.

Options:

  • --no-network — skip URL/VCS reachability checks and RDB queries.
  • SPECFILE — path to spec file (default: auto-detect in gear repository).
  • -B, --branch BRANCH — target branch for RDB version check (default: sisyphus).

Errors block zoryn submit; warnings are displayed but don't block. Use --skip-check on submit to bypass.

zoryn check packages

Run package quality checks (sisyphus_check, etc.) on RPM packages.

zoryn check packages [PATH...] [-b name] [--skip-check=LIST] [--tool=NAME]

Checks RPM packages for policy violations. By default, runs sisyphus_check --no-check=gpg on the host. If no paths are specified, checks packages in the current builder's hasher repository (local) or the downloaded results directory (remote).

Also runs automatically after every successful zoryn build and zoryn up. Use --skip-check=all to disable.

Options:

  • PATH... — RPM files or directories to check (default: builder's hasher repo).
  • -b, --builder <name> — builder for template variable expansion (default: auto-detected).
  • --skip-check=LIST — skip specified tools (comma-separated, or all).
  • --tool=NAME — run only specified tool(s) (comma-separated).

Configuration in ~/.zoryn:

[check.tools.sisyphus_check]
command = "sisyphus_check --no-check=gpg {packages_dir}"
fatal = true
order = 10

zoryn check version-up

Validate .gear/version-up configuration.

zoryn check version-up [--from VERSION] [--to VERSION] [--no-network]

Validates [version], [changelog], [merge], [batch], [tarball] sections for invalid values, missing required fields, and unused keys. Checks all sections (including [sandbox], [add_changelog]) for unknown keys and unknown parser/format values. Optionally simulates changelog generation for a version range.

Options:

  • --from VERSION — old version for simulation (default: from spec).
  • --to VERSION — new version for simulation.
  • --no-network — skip network checks and simulation.

Exit code 0 if all OK, 1 if errors found.