Your message dated Sun, 22 Aug 2010 22:30:19 +0200
with message-id <[email protected]>
and subject line Preserving shell quoting within variables is hard
has caused the Debian Bug report #539769,
regarding varnish: Wrongly escaped quotes in configuration (DAEMON_OPTS)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
539769: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539769
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: varnish
Version: 1.1.2
Severity: important


Varnish has this very cool feature that let you write inline C in the 
configuration. If you 
need to link some libraries to the configuration you need to pass the CC 
parameters.
I used this, to link GeoIP to varnish:
DAEMON_OPTS=" -a :80
             -T localhost:6082 \
            -p 'cc_command=exec cc -fpic -shared -Wl,-x -L/usr/local/lib 
-lGeoIP -o %o %s' \
             -f /etc/varnish/default.vcl \
             -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,3G"

but it ends up escaped in a very weird way (output from sh -x 
/etc/init.d/varnish start)
[...]
+ DAEMON_OPTS=' -a :80 -p "cc_command=exec cc -fpic -shared -Wl,-x 
-L/usr/local/lib -lGeoIP -o 
%o %s" -T localhost:6082 -f /etc/varnish/default.vcl -s 
file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,3G'
[...]
varnishd+ start-stop-daemon --start --quiet --pidfile /var/run/varnishd.pid 
--exec 
/usr/sbin/varnishd -- -P /var/run/varnishd.pid -a :80 -p '"cc_command=exec' cc 
-fpic -shared 
-Wl,-x -L/usr/local/lib -lGeoIP -o %o '%s"' -T localhost:6082 -f 
/etc/varnish/default.vcl -s 
'file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,3G'
[...]

As a temp fix, you can hardcode the -p line directily in /etc/init.d/varnish 
but I would love 
to see a bugfix.

tnx

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages varnish depends on:
ii  adduser                   3.110          add and remove users and groups
ii  gcc                       4:4.3.2-2      The GNU C compiler
ii  libc6                     2.7-18         GNU C Library: Shared libraries
ii  libc6-dev [libc-dev]      2.7-18         GNU C Library: Development Librari
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand
ii  libvarnish0               1.1.2          Shared libraries for Varnish

varnish recommends no packages.

varnish suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
I think you need to write your own init script.

I've not found a shell that lets you preserve layers of shell quoting
between the default and init script.  I'm closing this bug.

-- 
Stig Sandbeck Mathisen
                      ooo, shiny!


--- End Message ---

Reply via email to