Files
mesh-catalog/modules/pacman/module.json
T
jschoubben 43fccb843c issue 1841/S10: return a node to a run's record, saying first what each package goes back to and from where
pacman_rollback plans from the bus: each package now -> record from the node's cache, else the archive's
exact version, else the archive's repository on the record's date; added packages listed and removed only
when asked; foreign packages untouched. apply is an ask the node's keeper runs as a rollback run through the
root helper's new Rollback act (RootActs, upgrades.go), with rollback.started, rollback.finished and the
after-upgrade check (TakeAsk's rollback case, transaction.go).
2026-10-22 14:44:24 +02:00

232 lines
5.3 KiB
JSON

{
"module": "pacman",
"version": "1",
"capabilities": [
"package-manager",
"service-manager"
],
"claims": [
{
"name": "node-package-manager",
"scope": "node"
}
],
"reads": [
"mesh-controller.declared-packages"
],
"config": {
"upgrade-order": {
"type": "list",
"description": "The nodes in the order they upgrade, each by its name: the first opens each week's round on Saturday at 04:00 local time, and each node upgrades after the one before it passed its after-upgrade check (novox/hq ADR 0508 §5). Empty: no round starts, and every node's health says why. Falls back to the mesh-level key of the same name.",
"trusted": true,
"predefined": "upgrade-order",
"default": []
},
"record-days": {
"type": "number",
"description": "How many days a package record taken before an upgrade is kept on the bus before it is deleted (novox/hq ADR 0508 §2); a rollback can return only to a record still kept.",
"minimum": 1,
"trusted": false,
"default": 180
},
"round-start-minutes": {
"type": "number",
"description": "How many minutes a node whose turn in the round came may take to start its upgrade before the round is said to stand still, in that node's and the waiting nodes' health (novox/hq ADR 0508 §6).",
"minimum": 1,
"trusted": false,
"default": 120
}
},
"own-secrets": {
"broker-keeper": {
"path": "${dir:state}/broker-keeper.secret",
"owner": "pacman-keeper"
}
},
"state": [
"installed",
"updates",
"runs",
"records",
"rounds",
"asks"
],
"emits": [
"package.changed",
"upgrade.recorded",
"upgrade.kernel-held",
"upgrade.started",
"upgrade.finished",
"upgrade.failed",
"upgrade.checked",
"rollback.started",
"rollback.finished"
],
"tools": [
"pacman_search",
"pacman_info",
"pacman_installed",
"pacman_packages",
"pacman_owns",
"pacman_files",
"pacman_updates",
"pacman_upgrade",
"pacman_upgrade_health",
"pacman_upgrades",
"pacman_rollback",
"pacman_orphans",
"pacman_remove_orphans",
"pacman_cache",
"pacman_history",
"pacman_mirrors",
"pacman_foreign",
"pacman_news",
"pacman_config"
],
"resources": [
{
"id": "package",
"type": "package",
"package": "pacman"
},
{
"id": "config",
"type": "file",
"path": "/etc/pacman.conf",
"mode": "0644",
"template": "files/pacman.conf"
},
{
"id": "contrib",
"type": "package",
"package": "pacman-contrib"
},
{
"id": "reflector",
"type": "package",
"package": "reflector"
},
{
"id": "mirrors",
"type": "file",
"path": "/etc/xdg/reflector/reflector.conf",
"mode": "0644",
"template": "files/reflector.conf"
},
{
"id": "mirror-refresh",
"type": "service",
"unit": "reflector.timer",
"state": "running",
"boot": "enabled",
"health": {
"kind": "unit"
}
},
{
"id": "cache-cleaning",
"type": "service",
"unit": "paccache.timer",
"state": "running",
"boot": "enabled",
"health": {
"kind": "unit"
}
},
{
"id": "keeper-account",
"type": "user",
"name": "pacman-keeper",
"shell": "/usr/bin/nologin"
},
{
"id": "state",
"type": "directory",
"mode": "0711",
"place": ".",
"unknown": "program"
},
{
"id": "keeper-config",
"type": "file",
"path": "${dir:state}/keeper.json",
"mode": "0644",
"takes-config": [
"upgrade-order",
"record-days",
"round-start-minutes"
],
"merge": "json",
"template": "files/keeper.json",
"trusted": true
},
{
"id": "keeper",
"type": "process",
"name": "pacman-keeper",
"artifact": "tools",
"run": [
"./pacman-tools",
"keeper"
],
"user": "pacman-keeper",
"env": {
"PACMAN_KEEPER_BROKER": "${dir:state}/broker-keeper.secret",
"PACMAN_KEEPER_CONFIG": "${dir:state}/keeper.json"
},
"restart-on": [
"keeper-config"
],
"bus": {
"state": [
"installed",
"updates",
"runs",
"records",
"rounds",
"asks"
],
"emits": [
"package.changed",
"upgrade.recorded",
"upgrade.kernel-held",
"upgrade.started",
"upgrade.finished",
"upgrade.failed",
"upgrade.checked",
"rollback.started",
"rollback.finished"
]
},
"health": {
"kind": "tool",
"tool": "pacman_upgrade_health",
"interval": "60s",
"timeout": "20s",
"looks": 2,
"grace": "60s"
}
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/pacman-tools",
"binary": "pacman-tools",
"loads": [
"pacman-tools"
]
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}