Take the catalogue's composition rules into the node-engine
ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk carries no composition rule. The catalogue functions only the node-engine's composition reaches (Resolve, Resolution's Compose, Declaration, DataItems, LeftOut, Rules and the rest, the settings, placeholder and template refusals, the rendering helpers) are copied with their tests into internal/compose/resolution; a method of a mesh-sdk shape becomes a function taking it first. The composition calls its own copies, and the captured catalogue its tests read lives here now, shared by mesh-compose's tests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
# Generated by the mesh. Do not edit — module pacman writes this file and replaces it at every push.
|
||||
[Unit]
|
||||
Description=Weekly full upgrade (the mesh's pacman module, ADR 0477)
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
# The upgrade pacman_upgrade runs (pacman -Syu --noconfirm), as a oneshot whose result is the module's health
|
||||
# (pacman_upgrade_health). The mesh restarts no machine for an upgrade: a new kernel waits for the next restart.
|
||||
Type=oneshot
|
||||
Nice=10
|
||||
ExecStart=/usr/bin/pacman -Syu --noconfirm
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# Generated by the mesh. Do not edit — module pacman writes this file and replaces it at every push.
|
||||
[Unit]
|
||||
Description=Weekly full upgrade, Saturday 04:00 local time on every node (the mesh's pacman module, ADR 0477)
|
||||
|
||||
[Timer]
|
||||
# The same moment on every node: no random delay. A node that was off or asleep then upgrades at its next start.
|
||||
OnCalendar=Sat *-*-* 04:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,29 @@
|
||||
# The mesh's (module pacman, novox/hq to-be 42): the package manager's configuration. Written
|
||||
# whole at every push: an edit here is overwritten, and the file a machine had before is kept once by
|
||||
# the host. Owned whole because [options] cannot take a block by appending: anything added at the end
|
||||
# of the file lands in the last repository's section.
|
||||
#
|
||||
# The repositories are the union of what the machines had enabled when the module was written
|
||||
# (core, extra, multilib). The options are the distribution's defaults with four more: colour on a
|
||||
# terminal, parallel downloads, package lists in columns, and downloads run as the unprivileged
|
||||
# alpm user, which pacman 7 creates.
|
||||
|
||||
[options]
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
CheckSpace
|
||||
Color
|
||||
VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
DownloadUser = alpm
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
@@ -0,0 +1,8 @@
|
||||
# The mesh's (module pacman, novox/hq to-be 42): how reflector refreshes the mirror list, weekly,
|
||||
# through reflector.timer. Written whole at every push. Before the module, every machine's list was
|
||||
# generated once and never again.
|
||||
--save /etc/pacman.d/mirrorlist
|
||||
--protocol https
|
||||
--country Belgium,Netherlands,Luxembourg,Germany,France
|
||||
--latest 20
|
||||
--sort rate
|
||||
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"module": "pacman",
|
||||
"version": "1",
|
||||
"capabilities": [
|
||||
"package-manager",
|
||||
"service-manager"
|
||||
],
|
||||
"claims": [
|
||||
{
|
||||
"name": "node-package-manager",
|
||||
"scope": "node"
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
"pacman_search",
|
||||
"pacman_info",
|
||||
"pacman_installed",
|
||||
"pacman_owns",
|
||||
"pacman_files",
|
||||
"pacman_updates",
|
||||
"pacman_upgrade",
|
||||
"pacman_upgrade_health",
|
||||
"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": "upgrade-service",
|
||||
"type": "file",
|
||||
"path": "/etc/systemd/system/mesh-pacman-weekly-upgrade.service",
|
||||
"mode": "0644",
|
||||
"template": "files/mesh-pacman-weekly-upgrade.service"
|
||||
},
|
||||
{
|
||||
"id": "upgrade-timer",
|
||||
"type": "file",
|
||||
"path": "/etc/systemd/system/mesh-pacman-weekly-upgrade.timer",
|
||||
"mode": "0644",
|
||||
"template": "files/mesh-pacman-weekly-upgrade.timer"
|
||||
},
|
||||
{
|
||||
"id": "weekly-upgrade",
|
||||
"type": "service",
|
||||
"unit": "mesh-pacman-weekly-upgrade.timer",
|
||||
"state": "running",
|
||||
"boot": "enabled",
|
||||
"restart-on": [
|
||||
"upgrade-service",
|
||||
"upgrade-timer"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user