Package: gpsd
Version: 3.25-5+deb13u1
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]
Dear Maintainer,
* What led up to the situation?
Trying to allow gpsd to listed for clients on interfaces in addition to
localhost.
* What exactly did you do (or not do) that was effective (or
ineffective)?
The normal solution to this is to add -G to gpsd's command line. In Debian one
does this by adding it to GPSD_OPTIONS in /et/default/gpsd. In addition, one
must change the two ListenStream lines in gpsd.socket, and allow the gpsd port
in one's firewall.
* What was the outcome of this action?
Alas, inspection via "systemctl status gpsd.service" and some trials showed
that this didn't work.
* What outcome did you expect instead?
To run clients on other computers.
Solution 1
Per the documentation for systemd
(https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html?__goaway_challenge=meta-refresh&__goaway_id=0b05803d66e99ff3865d62fa1b482943)
one must use a PassEnvironment line to tell systemd to pass desired
environment variables. So I added the following line to gpsd.service
("systemctl edit gpsd.service"):
PassEnvironment=GPSD_OPTIONS OPTIONS DEVICES
right after the EnvironmentFile line. That worked.
Solution 2
Another way to handle the issue is to edit the desired option right into the
ExecStart line. That would suggest instead getting rid of the EnvironmentFile
line and /etc/default/gpsd. That also works, but is less "the Debian way".
Thank you.
-- System Information:
Debian Release: 13.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.90+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gpsd depends on:
ii adduser 3.152
ii libbluetooth3 5.82-1.1
ii libc6 2.41-12+deb13u3
ii libdbus-1-3 1.16.2-2
ii libgps30t64 3.25-5+deb13u1
ii libusb-1.0-0 2:1.0.28-1
ii netbase 6.5
ii python3 3.13.5-1
ii systemd-sysv 257.13-1~deb13u1
Versions of packages gpsd recommends:
ii gpsd-tools 3.25-5+deb13u1
ii udev 257.13-1~deb13u1
Versions of packages gpsd suggests:
ii apparmor 4.1.0-1
ii dbus 1.16.2-2
ii gpsd-clients 3.25-5+deb13u1
-- Configuration Files:
/etc/default/gpsd changed:
DEVICES=""
GPSD_OPTIONS="-G"
USBAUTO="true"
-- no debconf information