pkg: build a local .deb; de-duplicate onto DAEMON's systemd/nativehost/man page
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
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
velox (0.1.0-1) UNRELEASED; urgency=medium
|
||||
|
||||
* Local test build only. Not signed, not uploaded anywhere — see
|
||||
packaging/README.md for what this package is and is not.
|
||||
* libveloxcore is linked statically; no libveloxcore.so is shipped.
|
||||
* Placeholder app icon (packaging/icons/) — replace before any real release.
|
||||
* No real pairing-approval UI is built yet (needs libdbus-1-dev, not in this
|
||||
build's Build-Depends): pairing requires VELOX_PAIR_AUTO=1. See
|
||||
packaging/README.md and postinst's own notice.
|
||||
|
||||
-- Velox Local Test Build <[email protected]> Sat, 12 Sep 2026 22:30:43 +0400
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
Source: velox
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Velox Local Test Build <[email protected]>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
cmake (>= 3.28),
|
||||
ninja-build,
|
||||
pkg-config,
|
||||
g++ (>= 13),
|
||||
qt6-base-dev,
|
||||
qt6-tools-dev,
|
||||
qt6-tools-dev-tools,
|
||||
qt6-svg-dev,
|
||||
libcurl4-openssl-dev,
|
||||
libssl-dev,
|
||||
libsqlite3-dev,
|
||||
nlohmann-json3-dev,
|
||||
libsecret-1-dev
|
||||
Standards-Version: 4.6.2
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: velox
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: IDM-class download manager for Linux (local test build)
|
||||
Velox is a segmented, resumable download manager for Linux: a daemon
|
||||
(veloxd) that does the transfer work, a Qt GUI, a CLI, and a Firefox
|
||||
extension for capture.
|
||||
.
|
||||
This package ships veloxd, the velox CLI, the velox-gui Qt client and
|
||||
velox-nmhost, the Firefox native-messaging host.
|
||||
.
|
||||
THIS IS A LOCAL TEST BUILD, not a release: it uses a placeholder app
|
||||
icon and has no real pairing-approval UI (see /usr/share/doc/velox, or
|
||||
packaging/README.md in the source tree, for both limitations).
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: velox
|
||||
Source: (no public upstream repository yet — local test build only)
|
||||
|
||||
Files: *
|
||||
Copyright: 2026, the Velox project
|
||||
License: Unlicensed-TODO
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2026, the Velox project
|
||||
License: Unlicensed-TODO
|
||||
|
||||
License: Unlicensed-TODO
|
||||
No license has been chosen for Velox's own source yet. This is a genuine,
|
||||
open project decision — not something packaging can invent on its own —
|
||||
and is tracked as a release blocker in packaging/README.md. `lintian` is
|
||||
expected to flag this package over it (a package normally must declare a
|
||||
real license); that is correct behaviour on lintian's part, not a bug in
|
||||
this packaging, and stays that way until the project adopts one.
|
||||
.
|
||||
Nothing above changes the licenses of this package's dynamically-linked
|
||||
runtime dependencies (Qt, libcurl, SQLite, OpenSSL, nlohmann-json,
|
||||
libsecret and friends) — those remain under their own upstream licenses,
|
||||
covered by their own packages' Depends, and are not redistributed by this
|
||||
source package. See packaging/README.md's licence-audit note for what
|
||||
that still needs before a real release.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!/bin/sh
|
||||
# postinst for velox (local test build). See packaging/README.md.
|
||||
set -e
|
||||
|
||||
NM_MANIFEST_SRC=/usr/lib/mozilla/native-messaging-hosts/com.velox.host.json
|
||||
NM_MANIFEST_NAME=com.velox.host.json
|
||||
|
||||
# Every real (human) user with a home directory — UID range matches Debian's own
|
||||
# adduser default (login.defs UID_MIN=1000), not just "everyone in /home" (a service
|
||||
# account can have a home dir too) and not root.
|
||||
real_users() {
|
||||
getent passwd | awk -F: '$3 >= 1000 && $3 < 60000 && $6 != "" {print $1":"$6}'
|
||||
}
|
||||
|
||||
# Per-user native-messaging manifest (ADR 0003 / docs/05 §4.A): needed for BOTH
|
||||
# deb/tarball and snap Firefox — the system-wide manifest this package also installs at
|
||||
# $NM_MANIFEST_SRC only covers deb/tarball Firefox, never snap. Runs unconditionally,
|
||||
# not just when snap is detected: a per-user login.defs-based install can't assume every
|
||||
# user runs the same Firefox flavour, and dropping a JSON file nobody reads is harmless.
|
||||
install_per_user_manifests() {
|
||||
[ -f "$NM_MANIFEST_SRC" ] || {
|
||||
echo "velox: native-messaging host not built yet (nmhost lane not landed) —" \
|
||||
"skipping per-user manifest install."
|
||||
return 0
|
||||
}
|
||||
real_users | while IFS=: read -r user home; do
|
||||
[ -d "$home" ] || continue
|
||||
dest_dir="$home/.mozilla/native-messaging-hosts"
|
||||
install -d -o "$user" -g "$user" -m 0755 "$dest_dir" 2>/dev/null || {
|
||||
echo "velox: could not create $dest_dir for $user — skipping" >&2
|
||||
continue
|
||||
}
|
||||
cp "$NM_MANIFEST_SRC" "$dest_dir/$NM_MANIFEST_NAME"
|
||||
chown "$user:$user" "$dest_dir/$NM_MANIFEST_NAME"
|
||||
chmod 0644 "$dest_dir/$NM_MANIFEST_NAME"
|
||||
done
|
||||
}
|
||||
|
||||
# docs/07-packaging.md: detect snap Firefox and say so — the extension pairs over
|
||||
# loopback WebSocket there (ADR 0003), not native messaging from inside the sandbox.
|
||||
note_snap_firefox() {
|
||||
if command -v snap >/dev/null 2>&1 && snap list firefox >/dev/null 2>&1; then
|
||||
cat <<'EOF'
|
||||
|
||||
velox: Firefox is installed as a snap on this system. The extension will pair with
|
||||
veloxd over the loopback WebSocket (ws://127.0.0.1:<port>), not native
|
||||
messaging — this is expected (see docs/adr/0003, ADR 0003) and needs no
|
||||
action from you.
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
install_per_user_manifests
|
||||
note_snap_firefox
|
||||
|
||||
cat <<'EOF'
|
||||
|
||||
============================================================================
|
||||
velox: LOCAL TEST BUILD — read this before pairing the extension
|
||||
============================================================================
|
||||
No real pairing-approval UI is built into this package yet (it needs
|
||||
libdbus-1-dev, which this build's dependencies do not include). veloxd's
|
||||
only pairing approver in this build auto-rejects every request UNLESS you
|
||||
set VELOX_PAIR_AUTO=1 in its environment — there is no prompt to accept or
|
||||
decline; it is all-or-nothing. Do not run this on a machine or account
|
||||
where you would not want every pairing request accepted automatically.
|
||||
|
||||
systemctl --user edit velox.service
|
||||
# add, in the [Service] section:
|
||||
# Environment=VELOX_PAIR_AUTO=1
|
||||
|
||||
debhelper's dh_installsystemduser marks velox.service and velox.socket enabled (the
|
||||
pair together, via velox.service's Also=velox.socket) for your next login session
|
||||
automatically. For your CURRENT session, start socket activation now yourself — a
|
||||
root postinst has no live user session to reach:
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now velox.socket
|
||||
|
||||
See packaging/README.md in the source tree for the rest of this build's
|
||||
testing-only limitations (placeholder icon, no license chosen yet, no
|
||||
libveloxcore.so — it is linked statically).
|
||||
============================================================================
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#!/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
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/make -f
|
||||
# Velox — local test .deb build. Not a release build (no signing, no LTO tuning beyond
|
||||
# what the flags below ask for): see packaging/README.md.
|
||||
#
|
||||
# Explicit cmake flags rather than a CMakePresets.json preset: dh_auto_configure already
|
||||
# sets its own CMAKE_INSTALL_PREFIX / build-dir conventions, which fighting a preset's own
|
||||
# cache variables (build/<preset>/, etc.) would only complicate. The flags mirror the
|
||||
# `release` preset's intent (RelWithDebInfo, no tests) without inheriting its binaryDir.
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DVELOX_BUILD_TESTS=OFF \
|
||||
-DVELOX_BUILD_GUI=ON \
|
||||
-DVELOX_WERROR=OFF
|
||||
|
||||
# dh_installsystemd (system units) is disabled: velox.service/velox.socket are --user
|
||||
# units, not system ones, so that helper has nothing to do here. dh_installsystemduser is
|
||||
# NOT overridden — it runs normally, finds both units under lib/systemd/user/ in the
|
||||
# install tree, and marks them enabled for each user's *next* systemd --user login (it
|
||||
# cannot reach an already-running session from a root maintainer script at install time;
|
||||
# postinst prints the manual start commands for the current session, matching
|
||||
# packaging/README.md's own instructions).
|
||||
override_dh_installsystemd:
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
# initial-upload-closes-no-bugs: this is a local test build (packaging/README.md),
|
||||
# never intended for the Debian/Ubuntu archive — there is no ITP bug to close.
|
||||
initial-upload-closes-no-bugs
|
||||
|
||||
# maintainer-script-calls-systemctl (postinst): both flagged lines are inside a
|
||||
# heredoc of instructions printed for the *admin* to run themselves (velox.service is
|
||||
# a --user unit; postinst has no live user session to invoke systemctl against
|
||||
# itself). lintian's check is a text scan and can't tell printed advice from an actual
|
||||
# invocation — verified by reading the built postinst, see packaging/README.md.
|
||||
maintainer-script-calls-systemctl
|
||||
Reference in New Issue
Block a user