[Bug 292817] security/headscale: Add two missing replacements of `/etc/headscale` with ${ETCDIR}

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 29 Jan 2026 22:28:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292817

            Bug ID: 292817
           Summary: security/headscale: Add two missing replacements of
                    `/etc/headscale` with ${ETCDIR}
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: freebsd@cooltrainer.org
                CC: m.muenz@gmail.com
                CC: m.muenz@gmail.com
             Flags: maintainer-feedback?(m.muenz@gmail.com)

Created attachment 267605
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=267605&action=edit
Add missing replacements of hard-coded `/etc/headscale` path

The port already replaces some of these cases, but not all of them.

Relevant code search:
https://github.com/search?q=repo%3Ajuanfont%2Fheadscale%20%22%2Fetc%2Fheadscale%22%20language%3AGo&type=code&l=Go

---------------

Previously, the --help message claimed that the `headscale` CLI would
automatically try `/usr/local/etc/headscale/config.yaml`, but that wasn't
actually true!


[root@CURUS#/root] pwd
/root
[root@CURUS#/root] headscale | grep etc
  -c, --config string   config file (default is
/usr/local/etc/headscale/config.yaml)

[root@CURUS#/root] headscale configtest
2026-01-29T13:11:50-08:00 WRN No config file found, using defaults
2026-01-29T13:11:50-08:00 FTL
github.com/juanfont/headscale/cmd/headscale/cli/configtest.go:19 > Error
initializing error="loading configuration: Fatal config error: headscale now
requires a new noise.private_key_path field in the config file for the
Tailscale v2 protocol\nFatal config error: server_url must start with https://
or http://nfatal/ config error: dns.nameservers.global must be set when
dns.override_local_dns is true"

---------------

With this patch, it is actually true!


[root@CURUS#/root] headscale | grep etc
  -c, --config string   config file (default is
/usr/local/etc/headscale/config.yaml)

[root@CURUS#/root] headscale configtest
2026-01-29T13:22:47-08:00 WRN Prefix fd7a:c001:7232::/48 is not in the
fd7a:115c:a1e0::/48 range. This is an unsupported configuration.
2026-01-29T13:22:47-08:00 INF Opening database database=sqlite3
path=/var/db/headscale/db.sqlite

-- 
You are receiving this mail because:
You are the assignee for the bug.