Debian Bug report logs - #366843
apache postinstall script insists of (quietly) setting ServerName (to localhost)

version graph

Package: apache; Maintainer for apache is (unknown);

Reported by: Michael Tokarev <mjt@corpit.ru>

Date: Thu, 11 May 2006 15:18:04 UTC

Severity: grave

Found in versions apache/1.3.33-6sarge1, apache/1.3.34-3

Fixed in version 1.3.34-4

Done: martin f krafft <madduck@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#366843; Package apache. Full text and rfc822 format available.

Acknowledgement sent to Michael Tokarev <mjt@corpit.ru>:
New Bug report received and forwarded. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Michael Tokarev <mjt@corpit.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apache postinstall script insists of (quietly) setting ServerName (to localhost)
Date: Thu, 11 May 2006 19:11:26 +0400
Package: apache
Version: 1.3.33-6sarge1
Severity: grave

When upgrading apache (or dpkg-reconfiguring it), ServerName directive
is set to some value (defaults to `localhost').  Before upgrade the
configuration was perfectly valid, with ServerName taken from hostname
apache is running on.  After upgrades, ServerName is set to invalid
'localhost'.

Usually I keep local modifications in another file (httpd.conf.local) -
stuff like MinSpareServers, mod_proxy configs (if any) etc - it's easy
to overwrite those even if set in the default httpd.conf.  But I can't
"unset" ServerName which is being forcedly set in httpd.conf.

There's some words about "black magic" in
/usr/share/apache/postinst.common wrt setting ServerName.  I probably
can just remove the text postinst.common searches for, to avoid this
issue, but.. that required me about an hour to figure it all out!.. ;)

Why the ServerName is being set in the first place, anyway?  Setting it
quietly is bad (hence Severity set to "grave" - it silently brokes valid
configuration), but why to set it at all?

Thanks.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.16-i686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages apache depends on:
ii  apache-common             1.3.33-6sarge1 support files for all Apache webse
ii  debconf                   1.4.30.13      Debian configuration management sy
ii  dpkg                      1.10.28        Package maintenance system for Deb
ii  libc6                     2.3.2.ds1-22   GNU C Library: Shared libraries an
ii  libdb4.2                  4.2.52-18      Berkeley v4.2 Database Libraries [
ii  libexpat1                 1.95.8-3       XML parsing C library - runtime li
ii  libmagic1                 4.12-1         File type determination library us
ii  logrotate                 3.7-5          Log rotation utility
ii  mime-support              3.28-1         MIME files 'mime.types' & 'mailcap
ii  perl                      5.8.4-8sarge4  Larry Wall's Practical Extraction 

-- debconf information excluded



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#366843; Package apache. Full text and rfc822 format available.

Acknowledgement sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 366843@bugs.debian.org (full text, mbox):

From: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
To: 366843@bugs.debian.org
Subject: apache: same problem here...
Date: Thu, 17 Aug 2006 00:28:12 +0200 (CEST)
Followup-For: Bug #366843
Package: apache
Version: 1.3.34-3

...but with the latest unstable package. here is some info:

,----
| ...
| + '[' '!' /var/www ']'
| + '[' apache '!=' apache-ssl ']'
| + '[' '!' 80 ']'
| + '[' '!' localhost ']'
| + db_set apache/server-name localhost
| + _db_cmd 'SET apache/server-name' localhost
| + printf '%s\n' 'SET apache/server-namelocalhost'
| + IFS='
| '
| + read -r _db_internal_line
| + RET='10 apache/server-namelocalhost doesn'\''t exist'
| + case ${_db_internal_line%%[   ]*} in
| + return 10
| dpkg: error processing apache (--configure):
|  subprocess post-installation script returned error exit status 10
| Errors were encountered while processing:
|  apache
| E: Sub-process /usr/bin/dpkg returned an error code (1)
`----

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages apache depends on:
pn  apache-common                 <none>     (no description available)
ii  debconf [debconf-2.0]         1.5.3      Debian configuration management sy
ii  libc6                         2.3.6-19   GNU C Library: Shared libraries
ii  libdb4.4                      4.4.20-7   Berkeley v4.4 Database Libraries [
ii  libexpat1                     1.95.8-3.2 XML parsing C library - runtime li
ii  libmagic1                     4.17-3     File type determination library us
ii  logrotate                     3.7.1-3    Log rotation utility
ii  lsb-base                      3.1-14     Linux Standard Base 3.1 init scrip
ii  mime-support                  3.37-1     MIME files 'mime.types' & 'mailcap
ii  perl                          5.8.8-6.1  Larry Wall's Practical Extraction

apache recommends no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#366843; Package apache. Full text and rfc822 format available.

Acknowledgement sent to Adam Conrad <adconrad@0c3.net>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. Full text and rfc822 format available.

Message #15 received at 366843@bugs.debian.org (full text, mbox):

From: Adam Conrad <adconrad@0c3.net>
To: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>, 366843@bugs.debian.org
Subject: Re: Bug#366843: apache: same problem here...
Date: Thu, 17 Aug 2006 12:08:35 +1000
Cristian Ionescu-Idbohrn wrote:
> Version: 1.3.34-3
> 
> | dpkg: error processing apache (--configure):
> |  subprocess post-installation script returned error exit status 10

This is already fixed in 1.3.34-4.

... Adam




Reply sent to martin f krafft <madduck@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Michael Tokarev <mjt@corpit.ru>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #20 received at 366843-done@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: 366843-done@bugs.debian.org
Subject: Re: apache postinstall script insists of (quietly) setting ServerName (to localhost)
Date: Sat, 9 Sep 2006 11:32:46 +0200
[Message part 1 (text/plain, inline)]
Version: 1.3.34-4

also sprach Michael Tokarev <mjt@corpit.ru> [2006.05.11.1711 +0200]:
> When upgrading apache (or dpkg-reconfiguring it), ServerName
> directive is set to some value (defaults to `localhost').  Before
> upgrade the configuration was perfectly valid, with ServerName
> taken from hostname apache is running on.  After upgrades,
> ServerName is set to invalid 'localhost'.

If a global ServerName is set in the configuration, dpkg-reconfigure
works as it should, in my tests.

If I remove the global ServerName directive and reconfigure, a new
configuration is created and debconf asks for the server name to
use, defaulting to localhost. It then adds a global ServerName
directive and delegates to ucf to ask whether it's okay to replace
the file.

If for some reason, debconf or ucf don't get to do their jobs
(e.g. noninteractive frontend), the configuration file is not
changed.

This is the intended behaviour.

> Usually I keep local modifications in another file
> (httpd.conf.local) - stuff like MinSpareServers, mod_proxy configs
> (if any) etc - it's easy to overwrite those even if set in the
> default httpd.conf.  But I can't "unset" ServerName which is being
> forcedly set in httpd.conf.

Do you Include the httpd.conf.local file?

If I add a .local file Included from httpd.conf, and I unset
ServerName in httpd.conf and add it to httpd.conf.local,
dpkg-reconfigure correctly reads and writes to .local instead of
httpd.conf. It *will* use ucf to prompt you whether to replace the
file, which is sort of weird (I'll file another bug about this).

However, as before, I don't see a bug.

> Why the ServerName is being set in the first place, anyway?  Setting it
> quietly is bad (hence Severity set to "grave" - it silently brokes valid
> configuration), but why to set it at all?

From what I understand, it's needed for redirections when no vhost
matches. apache warns you if you start it without specifying
a value, so it's probably good that Debian sets it.

I am closing this bug. If you feel this is not okay, please provide
more information (like your configuration files), specify what
exactly you do to reproduce the problem, what the actual results
are, and what you would have wanted the results to be.

Cheers,

-- 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, author, administrator, and user
`. `'`     http://people.debian.org/~madduck http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 09:48:27 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 08:31:21 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.