Handbook
Configuration
zenpac reads its configuration from /etc/zenpac/. Every file is optional.
Without any, zenpac uses the official zen/core repository. Unknown keys are
errors, so a typo is reported instead of being silently ignored.
| File | Content |
|---|---|
zenpac.toml |
Global settings |
sources.d/*.toml |
Additional sources (hosts), e.g. mirrors |
repos.d/*.toml |
Repositories: enabled or not, priority, signatures |
Every key, with its type, default and description, is in the generated configuration reference. This page explains how the files work together.
Files in sources.d/ and repos.d/ are read in file-name order, and only
files ending in .toml count. A later file overrides only the fields it
sets, so repos.d/50-local.toml can change the priority of a repo without
repeating the rest.
Who writes what
zenpac never changes your own files. zp repo enable and zp repo disable
write a single managed drop-in, repos.d/99-zenpac.toml. It’s read last, so
its settings override the other files field by field. zp repo add writes
repos.d/<namespace>.toml, or the managed drop-in if that file is your own,
and zp repo remove takes repos out of both again.
You can edit both like any other file. Changing files in /etc/zenpac
needs root.
Global settings: zenpac.toml
arch = "auto" # the system architecture; "auto" detects it
cache_dir = "/var/cache/zenpac"
state_dir = "/var/lib/zenpac"
elevate = "auto" # how a user gets root for a change: auto | run0 | sudo | doas | never
appstream = true # install the official repos' AppStream catalogs with `update`
[ui]
color = "auto" # auto | always | never
unicode = "auto"
progress = "auto" # live progress on stderr; "auto": if it's a terminal
Any setting can be overridden for a single run with -o key=value, e.g.
zp -o ui.color=never search editor. Overrides go through the same checks as
the file.
Editing: zp edit-sources
zp edit-sources [<file>] opens a config file in your editor
($VISUAL, else $EDITOR, else vi), and saves it only if the
configuration it makes is valid:
- Which file:
zenpac.toml,repos.d/<name>.tomlorsources.d/<name>.tomlunder/etc/zenpac; it may be new. Without one,repos.d/99-zenpac.toml, the drop-inzp repo enable|disableandzp keyswrite. zenpac rewrites that one, so comments in it don’t survive: keep yours in a file of your own. - Checked before it’s saved: you edit a copy beside the file. When the editor exits, zenpac loads the whole configuration with your text in place. If it’s valid, the copy replaces the file; if not, you see why and choose to edit again or to discard the changes (exit code 4).
- It needs a terminal, and root for the files in
/etc(zenpac gets it itself, see running as yourself).
What’s in effect: zp config show
zp config show prints the configuration zenpac uses, merged from the
files, the built-in definitions and the defaults, as TOML, with where each
value comes from:
$ zp -o ui.color=never config show
arch = "auto" # default
elevate = "sudo" # /etc/zenpac/zenpac.toml
...
[ui]
color = "never" # -o ui.color=never
...
[repo."zen/core"]
enabled = true # built in
priority = 10 # built in
signatures = "none" # default
source = "zenlinux" # default
A value is default if nothing sets it, built in if zenpac’s own
definitions do (the zenlinux source, zen/core, zen/test), or comes
from the file or -o override that set it last. --json gives the same
as data.
Repositories: repos.d/*.toml
Built in, and changeable here: zen/core (enabled) and zen/test
(disabled). To try test builds:
[repo."zen/test"]
enabled = true
A user repository on repos.zenlinux.org:
[repo."masterfix/tools"]
fingerprint = "0123456789ABCDEF0123456789ABCDEF01234567"
Rules:
- Repo names:
namespace/repo, with each part matching^[a-z][a-z0-9]{0,31}$(lowercase letters and digits, starting with a letter, at most 32 characters). Uppercase is an error in config files. - Reserved namespaces:
zenandzenlinuxare official and may only come from thezenlinuxsource or one of its mirrors. - Order: official repos always rank above user repos.
priorityonly orders repos within the same tier. - Unsigned user repos: a user repo without signatures must say
signatures = "none"explicitly. - Fingerprints: 40 or 64 hex digits; case and spaces don’t matter, so a fingerprint can be copied as GnuPG prints it. What the fingerprint means is in signatures and trust.
Sources: sources.d/*.toml
The official source zenlinux (https://repos.zenlinux.org) is built in and
can’t be redefined. A mirror, or a test instance of the dojo, is a new source
marked as a mirror. It may then serve the official namespaces:
[source.dojodev]
base = "https://repos.zenlinux.dev"
mirror_of = "zenlinux"
[repo."zen/core"]
source = "dojodev"
From zenpac’s documentation: docs/user/configuration.md at v0.9.5.