DAEMON landed packaging/nativehost/, packaging/systemd/{velox.service,velox.socket}
(real sd_listen_fds() socket activation) and cli/man/velox.1 on main while this was
in flight, duplicating paths this branch had drafted independently. Per CLAUDE.md
(packaging/nativehost/ is DAEMON's; the rest of packaging/ is PKG/QA's), DAEMON's
copies are kept as the single source and this branch's packaging/native-messaging/,
packaging/man/velox.1 and stale packaging/systemd/velox.service are dropped rather
than maintained twice. The root CMakeLists.txt's install() rules now point at
DAEMON's paths directly, install both systemd units (not just velox.service), and
docs/07-packaging.md / packaging/README.md no longer claim there's no socket
activation — there is, and this package now ships it.
Adds the local-test-only .deb itself: debian/{control,rules,postinst,postrm,
changelog,copyright}, a placeholder icon set, the desktop entry and PKG/QA's own
man pages (veloxd.8, velox-gui.1 — velox.1 stays DAEMON's). libveloxcore stays
static (no consumer needs a .so yet); pairing has no real approval UI in this
build (D1 unbuilt), so postinst and packaging/README.md both say VELOX_PAIR_AUTO=1
is required and print it prominently. No PPA, no GPG — local dpkg -i only.
Verified live: dpkg-buildpackage -us -uc -b, dpkg -i, socket activation (systemctl
--user enable --now velox.socket), `velox ls` against the running daemon, lintian
clean, dpkg -r removes the manifest/units and leaves $XDG_DATA_HOME/velox alone.
.gitignore now excludes dpkg-buildpackage's debhelper build tree and obj-*/ (the
debuild output dir) — debian/control et al. stay tracked, everything debhelper
regenerates does not.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0176u3fTrxegrGNm2yC7r69W
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# postrm for velox (local test build). See packaging/README.md.
|
|
set -e
|
|
|
|
NM_MANIFEST_NAME=com.velox.host.json
|
|
|
|
real_users() {
|
|
getent passwd | awk -F: '$3 >= 1000 && $3 < 60000 && $6 != "" {print $1":"$6}'
|
|
}
|
|
|
|
# Undoes exactly what postinst's install_per_user_manifests() did — never anything
|
|
# beyond that file. In particular this never touches a user's Velox data
|
|
# ($XDG_DATA_HOME/velox, i.e. normally ~/.local/share/velox — the task database and
|
|
# any settings) on either `remove` or `purge`: per-user, root-owned deletion across
|
|
# every account on the system is exactly the kind of destructive multi-user operation
|
|
# that deserves its own careful design and testing, not a first cut bolted onto this
|
|
# local test package. Documented as a deliberate simplification in
|
|
# packaging/README.md, not a silent gap.
|
|
remove_per_user_manifests() {
|
|
real_users | while IFS=: read -r user home; do
|
|
f="$home/.mozilla/native-messaging-hosts/$NM_MANIFEST_NAME"
|
|
[ -e "$f" ] && rm -f "$f"
|
|
done
|
|
}
|
|
|
|
case "$1" in
|
|
remove|purge)
|
|
remove_per_user_manifests
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|