Skip to content

fix: pullgate-listen.service gets an [Install] section - #24

Merged
groupsky merged 3 commits into
mainfrom
fix/listen-unit-install
Nov 16, 2026
Merged

groupsky merged 3 commits into
mainfrom
fix/listen-unit-install

Conversation

@groupsky

@groupsky groupsky commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #20.

What was wrong

pullgate-listen.service had no [Install] section. systemctl enable printed "The unit files have no installation config" and did nothing, so the listener did not start after a reboot.

The fix

  • contrib/systemd/pullgate-listen.service: [Install] with WantedBy=multi-user.target.
  • README, "Update from 0.1.0": every host updated from 0.1.0 runs systemctl daemon-reload and systemctl reenable pullgate-listen.service. The issue proposed systemctl remove-wants, but systemd has no such command (systemd 255 has only add-wants). The add-wants workaround made the same link in multi-user.target.wants/ that enable makes now, and reenable removes it and makes it again. It also says to keep your own unit changes in drop-ins, because the update copies the unit files again.

Tests

  • test/units/install-sections.sh (CI job "example units", no root): reads every systemctl enable line of the README (also with sudo, options, or a \ line break) and checks that each unit has an [Install] section with WantedBy=. It fails if it finds fewer than 4 units. The job already runs systemd-analyze verify on every unit in contrib/systemd/.
  • test/units/first-run.sh (CI job "first run under the units", root on the throwaway runner), new at the end:
    • The 0.1.0 update as the README says: the old unit (no [Install]) with add-wants, then the new unit, daemon-reload, reenable. The link must exist and is-enabled must say enabled.
    • systemctl enable on the four units of the README. Each must then be enabled, not static.
  • The first commit of this PR had only the tests. On the old unit both failed: FAIL: contrib/systemd/pullgate-listen.service has no [Install] section with WantedBy=, and FAIL: pullgate-listen.service: systemctl is-enabled says 'static' after enable, want 'enabled'.

DESIGN.md section 14 describes the new checks. THREAT-MODEL.md does not change: no check, message, user or file location changes.

Reviews

The security reviewer and a correctness review ran on the diff. Fixed: the update test now uses the real old unit and checks is-enabled; the README covers 0.1.0 hosts with no workaround too; the README parsing is wider and has a minimum count; the DESIGN text and the CI comment are exact; a sentence about drop-ins. Not changed: the awk check refuses WantedBy = x with spaces; this can only fail, never pass wrongly, and no unit uses that form.

🤖 Generated with Claude Code

groupsky and others added 3 commits November 16, 2026 14:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@groupsky
groupsky marked this pull request as ready for review November 16, 2026 12:47
@groupsky
groupsky merged commit 053d0aa into main Nov 16, 2026
10 checks passed
@groupsky
groupsky deleted the fix/listen-unit-install branch November 16, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: pullgate-listen.service has no [Install] section, so enable fails and the listener does not start after a reboot

1 participant