Package: fcgiwrap
Version: 1.1.0-12
Severity: important
Tags: patch

Dear Maintainer,

The systemd service file for fcgiwrap has support for an environment
file from /etc/default. However, the way it expands the DAEMON_OPTS
variable leads to the variable expanding to just one parameter, instead
of one parameter per whitespace-separated word.

This makes the default file pretty much useless as it cannot take more
than one option in DAEMON_OPTS. The default command line arguments in the
service file is "-f". The example default file gives DAEMON_OPTS="-f -c 4".
This however does not work, and fcgiwrap will fail to start. This is due
to the service file having

    ExecStart=/usr/sbin/fcgiwrap ${DAEMON_OPTS}

As explaioned in the "COMMAND LINES" section of systemd.service(5), if the
variable name is surrounded by curly brackets, the variable is expanded
into just one argument. Whereas if it doesn't have brackets, the
variable expands to one argument per whitespace-separated word. Thus the
following patch should fix this.

--- fcgiwrap.service.orig       2019-03-28 11:51:32.461170139 +0800
+++ fcgiwrap.service    2019-03-28 11:51:37.750524275 +0800
@@ -6,7 +6,7 @@
 [Service]
 Environment=DAEMON_OPTS=-f
 EnvironmentFile=-/etc/default/fcgiwrap
-ExecStart=/usr/sbin/fcgiwrap ${DAEMON_OPTS}
+ExecStart=/usr/sbin/fcgiwrap $DAEMON_OPTS
 User=www-data
 Group=www-data
 
---

The end result is that using the shipped example default file with
the DAEMON_OPTS line uncomment should work.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf, armel, i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=zh_TW.Big5, LC_CTYPE=zh_TW.Big5 (charmap=BIG5), 
LANGUAGE=zh_TW.Big5 (charmap=BIG5)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages fcgiwrap depends on:
ii  libc6         2.28-8
ii  libfcgi0ldbl  2.4.0-10
ii  libsystemd0   241-1
ii  lsb-base      10.2018112800
ii  spawn-fcgi    1.6.4-2

fcgiwrap recommends no packages.

fcgiwrap suggests no packages.

-- no debconf information

Reply via email to