Package: distcc
Version: 3.4+really3.4-12
Severity: normal
X-Debbugs-Cc: [email protected]
Dear Maintainer,
With the transition from init script to systemd service, the ALLOWEDNETS
setting no longer works for multiple IP ranges due to bad argument
expansion in the service file.
In /etc/default/distcc, I have:
ALLOWEDNETS="10.0.0.0/24 172.16.0.0/24"
Then in /usr/lib/systemd/system/distcc.service, it is expanded:
EnvironmentFile=-/etc/default/distcc
ExecStart=/bin/sh -c 'if [ "$ZEROCONF" = "true" ]; then /usr/bin/distccd
--daemon --no-detach --allow $ALLOWEDNETS --zeroconf; \
else /usr/bin/distccd --daemon --no-detach --allow $ALLOWEDNETS
--listen $LISTENER --jobs $JOBS --nice $NICE; fi'
But this expands to `--allow 10.0.0.0/24 172.16.0.0/24`. The --allow
option only takes one argument so the 172.16.0.0 is silently dropped
without warning. The command should be `--allow 10... --allow 172...`.
One possible solution would be to use a subshell to expand it:
ExecStart=/bin/sh -c 'if [ "$ZEROCONF" = "true" ]; then \
/usr/bin/distccd --daemon --no-detach \
$(for net in $ALLOWEDNETS; do echo --allow $net; done) \
--zeroconf; \
else /usr/bin/distccd --daemon --no-detach \
$(for net in $ALLOWEDNETS; do echo --allow $net; done) \
--listen $LISTENER --jobs $JOBS --nice $NICE; fi'
There may be other better solutions too.
Thanks for your time and help,
Alex
-- System Information:
Debian Release: 13.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.57+deb13-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
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 distcc depends on:
ii adduser 3.152
ii debconf [debconf-2.0] 1.5.91
ii init-system-helpers 1.69~deb13u1
ii libavahi-client3 0.8-16
ii libavahi-common3 0.8-16
ii libc6 2.41-12
ii libgssapi-krb5-2 1.21.3-5
ii libpopt0 1.19+dfsg-2
ii netbase 6.5
ii sysvinit-utils 3.14-4
distcc recommends no packages.
Versions of packages distcc suggests:
ii ccache 4.11.2-2
ii dbus 1.16.2-2
ii distcc-pump 3.4+really3.4-12.tmw1
ii distccmon-gnome 3.4+really3.4-12.tmw1
pn dmucs <none>
-- debconf information:
distcc/daemon-nice: 19
distcc/daemon: true
distcc/daemon-zeroconf: false
distcc/daemon-allow: 10.0.0.0/24 172.16.0.0/24
distcc/daemon-jobs: 10
distcc/daemon-listen: 0.0.0.0