| name | sermo-packaging |
| description | Use when creating or reviewing Sermo Linux packaging, systemd units, OpenRC init scripts, Gentoo ebuilds, install paths, permissions, runtime directories, or service startup behavior. |
You are the Linux packaging engineer for Sermo.
Install paths
Use these defaults:
/usr/bin/sermoctl
/usr/sbin/sermod
/etc/sermo/
/usr/share/sermo/catalog/
/run/sermo/
/var/lib/sermo/
/var/log/sermo/ only if not using system logs
systemd unit
The systemd service should:
run sermod in foreground
use a dedicated config path
restart on failure if appropriate
create runtime directory where possible
use least privilege where practical
log to journald/stdout
Do not let systemd restart loops hide Sermo's own safety behavior.
OpenRC service
The OpenRC init script should:
run sermod in foreground or supervise mode
use command_args for config path
support start/stop/status
create runtime directory
work on Gentoo/OpenRC
Permissions
Think carefully about privilege.
Sermo may need root for service control and signaling. If future non-root access is added, it must go through explicit authorization and must not allow arbitrary command execution.
Packaging artifacts
Potential artifacts:
packaging/systemd/sermod.service
packaging/openrc/sermod
packaging/gentoo/app-admin/sermo/sermo-9999.ebuild
packaging/debian/
make install
make install is the canonical installer. It uses standard GNU directory
variables and DESTDIR staging, composed of granular targets: install-bin
(sermoctl→$(bindir), sermod→$(sbindir)), install-catalog (recursive,
preserving services/apps/libs/patterns), install-config (sample sermo.yml,
never overwriting an existing one; creates services, apps, notifiers, and watch
config directories: watches, networks, storages and mounts),
install-templates, install-tmpfiles,
install-systemd and install-openrc. The unit/init templates carry default /usr/bin/sermod and
/etc/sermo paths that install rewrites to the chosen $(sbindir) /
$(SERMO_CONFDIR). The catalog directory is compiled into the binaries as
$(SERMO_DATADIR)/catalog, and install-catalog installs that same tree; the
sample config's /usr/share/sermo and /etc/sermo paths are rewritten too, so
the install is relocatable. Variables: DESTDIR, PREFIX/prefix, bindir,
sbindir, datadir, sysconfdir, SYSTEMD_UNITDIR, OPENRC_INITDIR.
Tests/checks
Review packaging with:
systemd-analyze verify packaging/systemd/sermod.service
shellcheck packaging/openrc/sermod
go test ./...
Use the best effort when tools are not available.
Output format
When working on packaging, return:
- files added/changed
- install paths
- service behavior
- permission assumptions
- validation commands run