Skip to content
zoryn/ maintainer-assistant

Hooks

zoryn runs per-package shell scripts from two directories during zoryn up:

DirectoryWhen it runs
.gear/merge-up.d/After merge with upstream tag, before spec update
.gear/up.d/After spec file update, before commit

Scripts are executed in lexicographic order. Make them executable (chmod +x).

.gear/merge-up.d/

Scripts run after the upstream tag is merged but before the spec file is updated. Useful for regenerating vendored dependencies that need to match the new version.

Interface:

$1            — version (clean tag)
$TAG          — full tag name
$COMMIT       — commit SHA1
$SHORTCOMMIT  — short SHA1

Example .gear/merge-up.d/01-vendor.sh:

#!/bin/bash
go mod vendor

.gear/up.d/

Scripts run after the spec file has been updated, before the commit. Useful for keeping companion files in sync with the spec version.

Interface:

$1 — new version

Example .gear/up.d/10-version.sh:

#!/bin/bash
sed -i "s/VERSION=.*/VERSION=$1/" configure.ac

Sandboxing

By default hooks run under hybrid sandbox (bubblewrap + hasher chroot) so a malicious or buggy hook can't read your ~/.ssh or ~/.gnupg. See Sandbox for details on the three runner modes and how to pick one.

Syntax highlighting

zoryn highlights log output using the sublime-syntax format. The built-in log.sublime-syntax (from bat) highlights log levels, dates, times, IP addresses, URLs, quoted strings, numbers, and key=value pairs.

Colour themes use the .tmTheme format (TextMate/Sublime Text compatible). The default theme is Monokai.

Custom files override the defaults:

FilePurpose
~/.config/zoryn/syntaxes/*.sublime-syntaxCustom syntax definitions
~/.config/zoryn/theme.tmThemeCustom colour theme

Highlighting is active in:

Automatically disabled when output is not a TTY or NO_COLOR is set.

Environment

SSH aliases in ~/.ssh/config (generated by zoryn gen environment):

Host gitery
    HostName gitery.altlinux.org
    Port 222
    User alt_username

Host gyle
    HostName gyle.altlinux.org
    Port 222
    User alt_username