Configuration¶
zoryn reads configuration from three places, in order of specificity:
| File | Purpose |
|---|---|
~/.zoryn | Global user config (TOML). Required for zoryn to work. |
~/.config/zoryn/builders.d/*.conf | One .conf per builder — local or remote hasher machine. |
.gear/version-up | Per-package overrides: upstream version mapping, CVE sources, merge hints. |
Run zoryn gen environment to bootstrap ~/.zoryn plus SSH, hasher and GPG configs in one shot.
~/.zoryn¶
Minimal example — zoryn works with just this:
All other sections have sensible defaults. Override only what genuinely differs for you.
Full example¶
[build]
command = "hsh -v --number={hasher_number} --mountpoint=/proc,/dev/pts,/dev/kvm --lazy-cleanup {hasher_dir}"
log_filename = "build.{batch}.{builder}.log"
[builders]
default = "local"
default_arch = "x86_64"
parallel = "off"
results_download_dir = "{git_root}/hasher_out"
batch_repo = "~/zoryn-batch-repo"
[gitery]
host = "gitery"
remote = "gitery"
[gyle]
host = "gyle"
[sources]
srpms_path = "/mnt/ftp/pub/distributions/ALTLinux/Sisyphus/files/SRPMS/"
[rebuild]
command = "hsh -v --mountpoint=/proc,/dev/pts,/dev/kvm --lazy-cleanup"
log_dir = "/tmp/rebuild-logs"
[add_changelog]
up_template = "- {old_version} -> {new_version} {cves}"
[ssh]
multiplexing = true # reuse TCP connections via ControlMaster (default: true)
persist = "2m" # keep master connection alive after last use (default: 2m)
[notify]
enabled = true # desktop notifications for long-running commands (default: true)
[commands]
# Optional: override paths and arguments for external commands
# git = "/usr/local/bin/git"
# git.fetch = "{git} fetch --prune"
# ssh = "ssh -o ConnectTimeout=10"
# ssh.gitery = "{ssh} -p 2222 -i ~/.ssh/alt_key"
Section reference¶
[build]¶
command— hsh command for local builds (default:hsh --lazy-cleanup). Usehsh, notgear-hsh— the tarball is created separately withgear --commit. For parallel builds with multiple local hashers, use{hasher_number}and{hasher_dir}placeholders.log_filename— log filename template (default:build.{batch}.{builder}.log). Placeholders:{builder},{batch},{pkgname}.
[builders]¶
default— default builder(s) when no--builderis specified and no per-branch override applies. Comma-separated string or TOML array (e.g."local"or["local", "arm-server"]).default_arch— default architecture(s) for multi-builder mode. Comma-separated string or TOML array. When multiple architectures are listed, multi-builder mode is enabled automatically.parallel— default parallel mode for multi-builder builds (onoroff, default:off). Override with--parallel/--sequential.results_download_dir— directory for downloading remote build results (default:{git_root}/hasher_out). Supports{git_root}.batch_repo— directory for accumulating RPMs during batch builds. Used bydownload_rpms/upload_rpms.
[builders.<branch>] — per-branch defaults¶
[builders]
default = "sis-x86, sis-arm"
default_arch = "x86_64"
[builders.p11]
default = "p11-x86"
default_arch = "x86_64"
[gitery]¶
host— SSH alias for gitery. Must match an entry in~/.ssh/config.remote— name of the git remote pointing to gitery, used for push operations.
[gyle]¶
host— SSH alias for the gyle build system.
[sources]¶
srpms_path— local SRPMS mirror (required forzoryn task rebuild).
[rebuild]¶
command— hasher command for rebuilding packages (default:hsh -v --mountpoint=/proc,/dev/pts,/dev/kvm --lazy-cleanup).log_dir— base directory for build logs (default:/tmp/rebuild-logs).
[tasks]¶
api_url— Tasks API base URL (default:https://git.altlinux.org/tasks/api).user— girar username for API queries (default: extracted from%packageremail in~/.rpmmacros).
[rdb]¶
api_url— RDB API base URL (default:https://rdb.altlinux.org/api).
[add_changelog]¶
up_template— changelog entry template forzoryn up(default:- updated from {old_version} to {new_version} {cves}).{old_version},{new_version},{cves}(the latter expands to(Fixes: CVE-...)or empty).- The per-package
.gear/version-up[add_changelog]takes priority over~/.zoryn. - Trailing whitespace is trimmed automatically.
[submit]¶
run— whether to run a task after creating/modifying (default:false).test_only— whether to mark tasks as test-only (default:true).
To restore the pre-zoryn behaviour (run with --commit by default):
[ssh]¶
multiplexing— enable SSH connection multiplexing via OpenSSH ControlMaster (default:true). Reuses TCP connections to the same host, reducing latency for multi-step builder operations.persist— how long the master connection stays alive after the last session ends (default:2m). Uses the same time format asssh_config(5)ControlPersist.- Socket files are stored in
$XDG_RUNTIME_DIR/zoryn/(or$TMPDIRfallback) and cleaned up automatically on exit.
[notify]¶
enabled— enable desktop notifications for long-running commands (default:true). Sends OSC 99 escape codes (kitty protocol) followed by BEL to stderr. Kitty, WezTerm and foot show a popup; other terminals play the bell. Notifications fire at completion of:build,up,task rebuild,task test-rebuild,task batch.
[commands]¶
- Override paths and global arguments for external commands (
git,ssh,gear-*,rpm, etc.). - Subcommands inherit from their base:
git.fetch = "{git} fetch --prune"— ifgitis overridden,git.fetchuses the override. ~/and$HOMEare expanded to absolute paths.- Shell metacharacters (
;,|,`,$()) are rejected at startup.
~/.config/zoryn/builders.d/¶
Each .conf file defines one builder — a local or remote hasher machine.
# ~/.config/zoryn/builders.d/arm-server.conf
[builder]
name = "arm-server"
type = "remote"
arch = "aarch64"
branch = "sisyphus"
host = "builder-arm.internal"
hasher_dir = "~/hasher"
remote_dir = "~/build"
# hasher_number = 1 # for parallel builds (requires hasher-useradd --number=N)
[commands]
upload = "rsync -av {tarball} {host}:{remote_dir}/"
build = "hsh -v --lazy-cleanup --apt-config=$HOME/hasher_{hasher_number}.env/{branch}/apt.conf {hasher_dir} {remote_dir}/{tarball_name}"
# download uses smart download by default (only newly built packages)
cleanup = "ssh {host} \"rm -rf {remote_dir}/*\""
shell = "hsh-shell {hasher_dir}"
install = "hsh-install {hasher_dir} {packages}"
[builder]¶
name— builder name (used for--builder).type—localorremote.arch— target architecture (x86_64,aarch64,i586, …).branch— target branch (sisyphus,p11, …).host— SSH host for remote builders.hasher_dir— hasher working directory (default:~/hasher).remote_dir— working directory on remote host.hasher_number— hasher subconfig number for parallel builds.
[commands]¶
upload— upload tarball (runs locally).build— build command (wrapped in SSH for remote builders).download— download results (runs locally). Smart by default: downloads only newly built packages viarsync --files-from. Old configs with full repo download are auto-migrated.list_rpms— list RPMs with mtimes in hasher repo (default:find {hasher_dir}/repo -name '*.rpm' -printf '%P\t%T@\n'). Feeds smart download.cleanup— cleanup command after build.shell— forzoryn builder shell.install— forzoryn builder install.check_busy,download_rpms,upload_rpms— auto-generated if not specified.
Variables available in command templates:
{host}, {hasher_dir}, {remote_dir}, {tarball}, {tarball_name}, {results_download_dir}, {git_root}, {packages}, {batch_repo}, {arch}, {name}, {hasher_number}, {branch}.
See zoryn builder add for the interactive and mass-creation workflows.
.gear/version-up¶
Per-package overrides for how zoryn converts upstream tags to RPM versions, where to fetch CVEs from, and merge strategy. TOML format.
[version]
pattern = "{major:+}.{minor:+}.{patch:+}"
template = "{major}.{minor}.{patch}"
strip-prefix = "v"
create-alias = true
filter = "minor=4"
[changelog]
file = "CHANGELOG.md"
# or use remote URL:
# url = "https://curl.se/docs/vuln.json"
# parser = "osv-json"
# cve-format = "extended"
# or use OSV API for projects without changelog files (e.g. Wireshark):
# parser = "osv-api"
# osv-package = "gitlab.com/wireshark/wireshark"
# osv-ecosystem = "GIT"
[merge]
use-theirs = ["meson.build", "configure.ac"]
# scheme = "git-merge" # override auto-detection: "git-merge" or "tarball"
[tarball]
gear-update-opts = "--all"
Validate your config with zoryn check version-up.
[version] — tag → RPM version mapping¶
Placeholder format: {name:length}
name— capture group name (e.g.major,minor,patch,year,month,day).length— digit count specifier:+or*— one or more digits (regex[0-9]+)N(number) — exactly N digits (regex[0-9]{N})
Literal characters: . matches a literal dot; -, _ match literal hyphen/underscore; any other character matches as-is.
Template field: uses captured group names without length specifier: {major}, {minor}, …
Pattern examples¶
| Upstream tag | pattern | template | RPM version |
|---|---|---|---|
v1.2.3 | v{major:+}.{minor:+}.{patch:+} | {major}.{minor}.{patch} | 1.2.3 |
release-1.2 | release-{major:+}.{minor:+} | {major}.{minor} | 1.2 |
20240115 | {year:4}{month:2}{day:2} | {year}.{month}.{day} | 2024.01.15 |
2.0.0-rc1 | {major:+}.{minor:+}.{patch:+}-{pre:+} | {major}.{minor}.{patch} | 2.0.0 |
camlidl113 | camlidl{major:1}{minor:2} | {major}.{minor} | 1.13 |
RELEASE_8_4_5 | RELEASE_{major:+}_{minor:+}_{patch:+} | {major}.{minor}.{patch} | 8.4.5 |
4.18 / 4.18_02 | {major:+}.{minor:+}(?:_{patch:+})? | {major}.{minor}(?:.{patch})? | 4.18 / 4.18.02 |
Optional groups use standard regex (?:...)?. When the optional part is absent in the tag, the corresponding segment in the template is omitted.
Filtering tags¶
filter limits which tags are considered. filter = "minor=4" matches only tags where captured minor equals 4. Multiple filters: filter = "major=8, minor=4".
[changelog] — CVE scanning source¶
Both CVE-YYYY-NNNNN and CVE:YYYY-NNNNN (ISC format) are normalized to the standard CVE-YYYY-NNNNN. Version headers like Product X.Y.Z (status) released on Date (ISC Kea/BIND) are recognised.
file— local changelog path (CHANGELOG.md,NEWS,ChangeLog).url— URL with security advisories (e.g.https://curl.se/docs/vuln.json).parser— parser type:auto(default) — auto-detect from content.osv-json/json— OSV JSON format (used by curl).markdown/md— standard markdown changelog.html/html-table— HTML table with CVE info.osv-api— query OSV API directly (requiresosv-package).oracle-csaf— Oracle CSAF JSON advisory (for Oracle products like MySQL).mozilla— Mozilla Foundation Security Advisories (structured YAML frommozilla/foundation-security-advisories). Use forfirefox,firefox-esr,thunderbird. Anonymous GitHub API calls are rate-limited to ~60/hour.
osv-package— package name(s) in the OSV database. Accepts a single name, comma-separated list, or TOML array.gitlab.com/wireshark/wireshark,"stdlib,toolchain",["stdlib", "toolchain"].osv-ecosystem— OSV ecosystem (default:GIT; alsoPyPI,npm,crates.io,Go,Maven).oracle-advisory-product— Oracle product name for filtering (e.g.MySQL Server). Auto-detected from SRPM name if not set.oracle-advisory-max-body-size— max response size for CSAF download in bytes (default: ~4 MB).mozilla-product— Mozilla product name used to match advisoryfixed_in:entries (e.g.Firefox,Firefox ESR,Thunderbird). Auto-detected from the SRPM name when omitted (firefox→Firefox,firefox-esr→Firefox ESR,thunderbird→Thunderbird).cve_format— CVE entry format in the RPM changelog:compact(default) — inline:(Fixes: CVE-..., CVE-...).compact_continuation— continuation lines with 4 CVEs per line:+ (fixes: CVE-..., ...).extended— multi-line with OSV descriptions:- Fixes:/* CVE-...: description.- With
compactand an existing spec, the format is auto-detected from the prior changelog style — both+and*sub-item markers are recognised, and the detected style is preserved.
url takes precedence over file if both are set. For parser = osv-api both url and file are ignored — the OSV API is queried directly. For parser = oracle-csaf, url is optional: the latest quarterly CPU URL is generated automatically if absent. For parser = mozilla, url and file are ignored — advisories are fetched from the mozilla/foundation-security-advisories repository, scanning up to three announce/<year>/ directories back and picking the advisory whose fixed_in: list mentions <mozilla-product> <new-version>.
Finding osv-package¶
- Open osv.dev and search for the project (e.g.
wireshark,curl). - Open any vulnerability for that project.
- Look at the Affected packages section — the package name is shown (e.g.
gitlab.com/wireshark/wiresharkfor theGITecosystem). - Copy name and ecosystem into the config.
Or query the API directly:
curl -s -X POST https://api.osv.dev/v1/query \
-d '{"package":{"name":"gitlab.com/wireshark/wireshark","ecosystem":"GIT"},"version":"4.4.3"}' \
| python3 -m json.tool | head -20
| Ecosystem | Package format | Example |
|---|---|---|
GIT (default) | Repository URL path | gitlab.com/wireshark/wireshark |
PyPI | PyPI name | requests |
npm | npm name | express |
crates.io | Crate name | tokio |
Go | Go module path | golang.org/x/net |
Maven | group:artifact | org.apache.logging.log4j:log4j-core |
Full list: https://ossf.github.io/osv-schema/#affectedpackage-field
[merge]¶
scheme— override auto-detection of update scheme:"git-merge"or"tarball". Automatically set by--switch-to-upstream-git.use-theirs— files to take from upstream on conflict (comma/space separated). Useful for version-bearing files likemeson.build,configure.ac.
[tarball]¶
gear-update-opts— extra options forgear-update(e.g.--allto extract every directory from the archive).subdir— subdirectory name inside the tarball to extract (passed asgear-update --subdir=<value>). Supports{version}and{name}placeholders, e.g.subdir = "thunderbird-{version}". Useful for tarballs with multiple top-level entries like./and<name>-<version>/(Mozilla source tarballs). Validated against shell metacharacters and path separators before use.
[add_changelog] — per-package override¶
up_template— changelog entry template forzoryn up. Supports{old_version},{new_version},{cves}. Example:up_template = "- {old_version} -> {new_version} {cves}".