severity 317358 serious
tags 317358 - unreproducible - moreinfo
thanks

* Adam Woodworth <a...@mirkwood.com> [20091228 11:06]:

> When I did a recent "aptitude dist-upgrade", I saw the portmap question
> about binding to loopback or not.  I chose "Yes" (bind to loopback), but I
> noticed that /etc/default/portmap isn't correctly updated.  It should have
> the OPTIONS="-i 127.0.0.1" line uncommented if you select "Yes", but I'm
> seeing that it is still commented.

> However, when I run "dpkg-reconfigure portmap" and select "Yes", it will
> correctly uncomment the OPTIONS line in /etc/default/portmap.  And running
> "dpkg-reconfigure portmap" and selecting "No" will correctly comment it
> out again.

> So selecting "Yes" to the portmap question is broken when
> upgrading/installing portmap.

This is even broken if doing a FRESH installation using debconf
preseeding.

Before portmap is installed the debconf setting looks like:

  # dpkg --list portmap
  [...]
  un  portmap                                      <none>                       
                (no description available)

  # grep -A1 portmap/loopback /var/cache/debconf/config.dat
  Name: portmap/loopback
  Template: portmap/loopback
  Value: false

Installing portmap in non-interactive mode then:

  # dpkg --list portmap
  [...]
  ii  portmap                                      6.0.0-1                      
                RPC port mapper

Now the configuration is NOT what debconf preseeding told it to be:

  # grep -A1 portmap/loopback /var/cache/debconf/config.dat
  Name: portmap/loopback
  Template: portmap/loopback
  Value: true

  # cat /etc/default/portmap
  # Portmap configuration file
  #
  # Note: if you manually edit this configuration file,
  # portmap configuration scripts will avoid modifying it
  # (for example, by running 'dpkg-reconfigure portmap').

  # If you want portmap to listen only to the loopback
  # interface, uncomment the following line (it will be
  # uncommented automatically if you configure this
  # through debconf).
  OPTIONS="-i 127.0.0.1"

Looking at postinst script:

  if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 
"5-7ubuntu2"; then
      db_set portmap/loopback true
  fi

... this won't work:

  # dpkg --compare-versions 6.0.0-1 lt "5-7ubuntu2" && echo ok || echo error
  error

So you're overriding the configuration with each
installation/upgrade process (at least for >=6.x versions).

regards,
-mika-

Attachment: signature.asc
Description: Digital signature

Reply via email to