Skip to content

docs(run-a-node): the apt package ships dign, runs as root, and can install without joining - #83

Closed
MichaelTaylor3d wants to merge 1 commit into
mainfrom
loop/316-apt-doc-dign
Closed

docs(run-a-node): the apt package ships dign, runs as root, and can install without joining#83
MichaelTaylor3d wants to merge 1 commit into
mainfrom
loop/316-apt-doc-dign

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

Brings docs/run-a-node/apt.md in line with what the apt package actually installs and does.

Companion to DIG-Network/dig-node#359, which closes DIG-Network/dig-node#316 and
DIG-Network/dig-node#317. Filed together because a docs page that describes the old package is the
half-migrated state those tickets exist to remove.

Two things this change makes true

  • The package installs dign. dig-node#316 — dign is the name used everywhere, and until now
    the .deb shipped only dig-node, so a reader following any documented dign … command got
    command not found. The page now says both names ship and are interchangeable, and warns about
    the n: dig alone is Ubuntu's unrelated DNS lookup tool.
  • Installing without joining the public network first. dig-node#317 — a new section covering the
    /etc/dig-node/no-autostart marker and the /etc/dig-node/dig-node.env settings file, for anyone
    standing up a private or isolated network. It is explicit that DIG_BOOTSTRAP_PEERS=off is
    written off rather than empty, because an empty value can arrive as unset and an unset value
    means "use the public peers" — the node then quietly joins the public network while looking
    configured.

Two pre-existing errors, fixed while here

Both were found by reading the page against the shipped unit file and dig-node's SPEC.md, and both
are user-visible, so they are fixed rather than filed.

  1. The unit name was wrong. The page said dig-node.service; the unit the package installs is
    net.dignetwork.dig-node.service. Every systemctl and journalctl example on the page —
    status, restart, stop, disable, edit — therefore failed for a reader who copied it. All are
    corrected.
  2. The privilege claim was false. The page said the service "runs as its own unprivileged
    dig-node system account — never root"
    . It runs as root: the shipped unit sets no User=,
    and SPEC.md states the systemd/launchd services run as root precisely so /var/lib/dig-node
    can be root-owned 0700 and keep the control token unreadable by other local users. A docs page
    that understates the privilege a service holds is worse than one that says nothing, so this now
    states the real model and why it is that way.

Verified

The unit name, the root execution and the marker behaviour were all measured on a real Ubuntu 24.04
host in dig-node#359, installing a package built from the 0.149.0 release binary — not read off the
source. Evidence is on DIG-Network/dig-node#316 and DIG-Network/dig-node#317.

Version bumped 0.17.10.18.0 (minor: new documented capability).

…nstall without joining

Co-Authored-By: Claude <noreply@anthropic.com>
@MichaelTaylor3d

Copy link
Copy Markdown
Contributor Author

Closing as not planned — this change was wrong, and tests/unit/install-path-lint.test.mjs correctly caught it.

I wrote it while fixing DIG-Network/dig-node#316 and #317, on the assumption that the .deb the apt repository serves is the one dig-node's own packaging/linux/build-deb.sh produces. It is not. There are two different packages that both install a binary called dig-node, and this page documents the other one:

dig-node's release .deb the apt.dig.net package
built by dig-node/packaging/linux/build-deb.sh apt.dig.net/packaging/build-deb.sh
from its own build the raw dig-node-<ver>-linux-<arch> release binary
unit net.dignetwork.dig-node.service dig-node.service
runs as root User=dig-node / Group=dig-node

So both "corrections" in this PR were regressions: the page's systemctl status dig-node and its "runs as its own unprivileged dig-node system account — never root" are accurate for the apt route, which is the route this page documents. packaging/debian/dig-node/dig-node.service:13-14 in apt.dig.net is the evidence.

The lint test's comment says exactly this and I did not read it before editing. That test is doing its job precisely as designed.

What is genuinely still missing here is different, and belongs to apt.dig.net rather than to this repo: its package sets no PKG_dig_node_EXTRA_BINS, so — like dig-node's .deb before #316 — it ships no dign, while every doc in the ecosystem names dign. (PKG_dig_store_EXTRA_BINS="digs" shows the mechanism exists and is simply unused for dig-node.) It also has its own postinst and so does not inherit #317's configure-before-joining marker. Filed on apt.dig.net; this page should be updated only once that package actually ships those, and not before.

No docs change is needed here today. The version bump goes with it.

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.

the .deb ships no dign binary — documented dign capsule fetch is command-not-found on a package install

1 participant