zoryn gen¶
File generators.
zoryn gen opam2spec¶
Generate an RPM spec from an opam file.
Options:
-o, --output <file>— output spec file (default: stdout).-p, --packager <name>— packager name for changelog.--prefix <prefix>— package name prefix (default:ocaml-).--no-check— disable%checksection.--no-rules— disable.gear/rulesgeneration.--no-rdb-check— don't check RDB for existing packages.--tag-prefix <prefix>— upstream tag prefix (default:v).-V <version>— override version.--clone— clone repository and generate files.--build— build after generation.--verbose— verbose output.
zoryn gen opam2spec mypackage.opam # from local file
zoryn gen opam2spec dune -o ocaml-dune.spec # from opam repository
zoryn gen opam2spec ppx_deriving --clone # clone and generate
zoryn gen pypi2spec¶
Generate an RPM spec file from a PyPI package.
Options:
--url <url>— git repository URL. Overrides any URL discovered in PyPI metadata and is used both forgit cloneand for the spec'sVCS:tag. Trailing.gitsuffix is stripped.--name <name>— override RPM package name.-V <version>— override package version.--no-check— skip%checksection generation.--no-clone— generate spec in current directory without cloning.--packager <name>— packager name and email.--verbose— verbose output.
Clones the upstream git repository, detects the test framework (pytest/tox), and creates .gear/ artifacts (spec file, pyproject_deps.json, rules) ready for building. The spec file is named after the normalised PyPI package name (e.g. .gear/hdbscan.spec). Generated spec includes AutoReq: yes, nopython3, %pyproject_runtimedeps_metadata, and %global _unpackaged_files_terminate_build 1.
zoryn gen pypi2spec hdbscan # clone and generate
zoryn gen pypi2spec hdbscan --url https://github.com/scikit-learn-contrib/hdbscan
zoryn gen pypi2spec hdbscan --no-clone # generate in current directory
zoryn gen watch¶
Generate a watch file from Debian, Gentoo or Arch Linux.
Without a package name, uses the current directory's package name from the spec file.
The command queries multiple sources (Debian, Gentoo, Arch) via the Repology API and generates a Debian-style watch file. When multiple sources are found, a comparison table shows versions and URL patterns from each source.
Options:
--debian-pkg <name>— specify Debian package name explicitly (when ALT and Debian names differ, e.g.--debian-pkg fox1.6for libfox).--gentoo-pkg <name>— specify Gentoo package name explicitly.--arch-pkg <name>— specify Arch package name explicitly.--no-compare— skip comparison table, use first found source.-f, --force— overwrite existing watch file.-p, --print— print watch file without saving.
Source priority: Debian > Gentoo > Arch. When patterns match across sources, the source with the newer version is preferred.
zoryn gen watch # generate for current package
zoryn gen watch mac # generate for mac package
zoryn gen watch --debian-pkg fox1.6 # use explicit Debian name
zoryn gen watch --gentoo-pkg mac # use explicit Gentoo name
zoryn gen watch --no-compare # skip comparison, use first found
zoryn gen watch -p # preview without saving
zoryn gen environment¶
Initialise ALT Linux development environment configuration files.
Creates the following configuration files:
~/.zoryn— zoryn config with[build],[clone],[sources]sections.~/.ssh/config— SSH aliases for gitery and gyle.~/.hasher/config— hasher workdir and packager.~/.rpmmacros—%packagermacro.~/.gitconfig— gituser.nameanduser.email(if not set).
Also generates SSH key (ed25519) and GPG key (RSA 4096-bit) if they don't exist.
Options¶
| Option | Description |
|---|---|
--name NAME | Your name in English (required for non-interactive mode) |
--email EMAIL | Your email for changelog (required for non-interactive mode) |
--login LOGIN | Your login for gitery/gyle (optional) |
--skip-keys | Skip SSH and GPG key generation |
--update-config | Update existing ~/.zoryn with missing default settings |
--update-config adds missing sections and keys to an existing config file without overwriting existing values or removing comments. Useful after upgrading zoryn to get new configuration options.
Examples¶
zoryn gen environment # interactive mode
zoryn gen environment --name 'Ivan Ivanov' --email ivan@altlinux.org --login ivan
zoryn gen environment --name 'Ivan Ivanov' --email ivan@example.org # without gitery/gyle
zoryn gen environment --skip-keys # skip key generation
zoryn gen environment --update-config # update existing config
zoryn gen version-up¶
Generate .gear/version-up configuration file based on the current package version.
Finds the git tag matching the current spec version and generates a pattern/template for version conversion. This config helps zoryn up filter tags correctly and handle cases where tag format differs from version format (e.g. underscores vs dots).
Options:
--tag TAG— git tag corresponding to current version (auto-detected if omitted).--to-version VERSION— version that the tag converts to. Use with--tagwhen tag format differs.--filter VERSION— version prefix to filter tags (e.g.--filter 4.5generatesfilter = "major=4, minor=5"). If.gear/version-upalready exists, adds filter to existing config.--force— overwrite existing.gear/version-upfile.
Examples¶
zoryn gen version-up # auto-detect tag and generate
zoryn gen version-up --tag v1.2.3 # specify tag explicitly
zoryn gen version-up --tag osec-12_11_22.11 --to-version 12.11.22.11 # different tag format
zoryn gen version-up --force # overwrite existing config
zoryn gen version-up --filter 4.5 # add filter to existing config
zoryn gen version-up --tag v4.5.5 --to-version 4.5.5 --filter 4.5