Hi James!

On Sun, 06 Sep 2015, James Valleroy wrote:

> Package: privoxy
> Version: 3.0.23-3
> Severity: wishlist
> Tags: patch

> Please consider adding debconf support to privoxy, specifically for
> setting the listen-address. This change is needed for FreedomBox to
> offer smooth upgrades to our users.
> 
> The attached patch does this as follows:
> 1. The config shipped with privoxy is installed under /usr/share/privoxy
> instead of /etc/privoxy.
> 2. Debconf can ask for listen-address, with localhost:8118 as the
> default. The question priority is medium, so it won't be shown to those
> with the default debconf settings.
> 3. ucf is used to merge config updates during upgrades.
> 
> Some more background on why this is needed:
> FreedomBox (through its user interface, plinth) can install privoxy and
> configure it to be available to client devices on the LAN (by setting
> listen-address). But currently, our changes to /etc/privoxy/config  make
> it difficult to upgrade privoxy, because it will ask which config file
> to keep. If plinth can configure privoxy solely through debconf, then
> upgrades can be done without prompting (via unattended-upgrades), and
> our users can also receive any updates that are made to the packaged config.

This all sounds reasonable and I would add it, but there is one
problem with it: The listen-address directive can be used multiple
times in config, for example:

listen-address 127.0.0.1:8118
listen-address [::1]:8118

Since currently privoxy doesn't automatically listen on localhost via
IPv4 and IPv6 in parallel, the above is one possible workaround to
listen on both addresses.

But having multiple listen-address lines in config breaks your patch.
It seems, that the code in debian/config should concat multiple
listen-address values by white space (instead of linefeed) while the
postinst code should spread the whitespace separated addresses into
multiple lines (and remove leftover listen-address lines).

At the moment I don't have a solid implementation with sed or awk for
the latter, will think about it (and I'm open for support...).

Tschoeeee

        Roland

Attachment: signature.asc
Description: Digital signature

Reply via email to