[Pkg-varnish-devel] Bug#698577: varnish: diff for NMU version 3.0.2-2.1

Jérémy Lal kapouer at melix.org
Mon Jan 28 00:39:24 UTC 2013


tags 698577 - patch
tags 698577 - pending
found 698577 2.1.3-8
thanks

On 27/01/2013 22:05, Julien Cristau wrote:
> On Sun, Jan 27, 2013 at 19:31:57 +0100, Jérémy Lal wrote:
> 
>> On 27/01/2013 19:03, Julien Cristau wrote:
>>> On Sun, Jan 27, 2013 at 18:54:12 +0100, Jérémy Lal wrote:
>>>
>>>> diff -Nru varnish-3.0.2/debian/varnish.postinst varnish-3.0.2/debian/varnish.postinst
>>>> --- varnish-3.0.2/debian/varnish.postinst	2012-05-01 16:22:42.000000000 +0200
>>>> +++ varnish-3.0.2/debian/varnish.postinst	2013-01-27 18:12:45.000000000 +0100
>>>> @@ -52,7 +52,12 @@
>>>>  # varnish version 2.1.3-1 and older started varnishd at boot, we keep
>>>>  # this default for upgrading clients
>>>>  upgrade_enable_varnishd() {
>>>> -    sed -i '/^START=/s/no/yes/g' /etc/default/varnish
>>>> +    tmpFile=$(tempfile)
>>>> +    sed '/^START=/s/no/yes/g' /etc/default/varnish > "${tmpFile}"
>>>> +    if which ucf >/dev/null; then
>>>> +        ucf --debconf-ok "${tmpFile}" /etc/default/varnish
>>>> +    fi
>>>> +    rm -f "${tmpFile}"
>>>>  }
>>>>  
>>>>  case ${1:-} in
>>>
>>> That's horrible. varnish doesn't use ucf so far, there should be a better way
>>> to go about that.
>>
>> Oh i was trying to fix the existing code, not remove it - which would
>> be a much better solution, along with a simple advice in NEWS.Debian, perhaps.
>>
>> I'm curious why ucf is horrible, though.
>>
> ucf itself isn't.  Using it on a conffile, OTOH...

I understand my mistake about conffile and ucf.

This bug is triggered when updating from a version lower than 2.1.3-2
(lenny to squeeze). The code responsible for the bug achieves nothing
since there was an entry in debian/NEWS explaining how to re-enable
varnishd at boot - so it was not necessary to hack it in postinst.
Since then (2.1.5-1) the default behavior changed back to START=yes.

Removing upgrade_enable_varnishd from postinst now is ok but won't fix the
upgrade from lenny to squeeze.

Jérémy.



More information about the Pkg-varnish-devel mailing list