Skip to content

Ship /etc/sendspin-cli.conf in the Linux packages and document configuring after install - #130

Merged
chrisuthe merged 2 commits into
mainfrom
chrisuthe/task/ship-etc-sendspin-cli-conf-in-linux-packages-and
Nov 19, 2026
Merged

chrisuthe merged 2 commits into
mainfrom
chrisuthe/task/ship-etc-sendspin-cli-conf-in-linux-packages-and

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

After installing the .deb, .rpm or Arch package, the docs said to configure /etc/sendspin-cli.conf first, but the file didn't exist and the only path given for the example was the tarball's /usr/local/share/doc/....

Changes

  • Packaging: the packages now install the fully commented example as /etc/sendspin-cli.conf (0644, config|noreplace: deb conffile, rpm %config(noreplace), Arch backup). It changes nothing until edited, and the package still doesn't enable or start the unit. The example's header line now reads correctly both as the installed file and as the doc copy.
  • assert_linux_packages.sh: expects the new file and checks that each format marks it as config.
  • test_linux_packages.sh: checks after install that the file exists, is fully commented and is 0644. It then edits the file, reinstalls, and checks the edit survived with no prompt and no .rpmnew/.pacnew/.dpkg-* left behind. Removal checks follow each distro: deb remove keeps the file and purge deletes it; rpm and pacman delete it when unmodified.
  • Docs: Installation → Packages walks through -l → sudoedit /etc/sendspin-cli.conf → enable --now, says upgrades keep your edits, and links to Configuration, Pairing and the user unit. The README snippet gets a configure step. Configuration and Running-as-a-Service give the /usr/share/doc path alongside /usr/local.

Verified locally with podman on packages built from a stand-in binary: the assert passes, and the install/reinstall/remove run passes on trixie, Ubuntu 24.04, Fedora and Arch, with bookworm still refusing the deb.

Compatibility

Nothing breaks for CLI users: no flags, config keys, socket protocol, state format or exit codes change.

There's one visible packaging change, for anyone who created /etc/sendspin-cli.conf by hand (or kept it from a tarball install) before installing this package. Their file is always kept, but:

  • dpkg shows the conffile prompt; the default, N, keeps the existing file. A non-interactive install with no tty fails at that prompt unless it passes -o Dpkg::Options::=--force-confold.
  • dnf/rpm keeps the existing file and writes the packaged one as /etc/sendspin-cli.conf.rpmnew.
  • pacman keeps the existing file and writes /etc/sendspin-cli.conf.pacnew.

Installation.md documents this. Upgrading from an older package that didn't own the file behaves the same way as a first install over an existing file.

Installed from the fully commented example, so it changes nothing until edited; deb conffile, rpm %config(noreplace) and Arch backup keep edits across upgrades.
@chrisuthe
chrisuthe marked this pull request as ready for review November 19, 2026 23:12
@chrisuthe
chrisuthe merged commit ccd779a into main Nov 19, 2026
20 of 21 checks passed
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.

1 participant