[Pkg-nagios-devel] Bug#549683: Bug#549683: nagios3-cgi: all db_set and db_get operations in the postinst script fail with error 10

Richard Brookhuis richard at brookhuis.ath.cx
Mon Oct 19 10:50:40 UTC 2009


On Sun, 18 Oct 2009 22:25:44 +0200, Alexander Wirt <formorer at debian.org>
wrote:
> tag 549683 moreinfo unreproducible
> severity 549683 important 
> thanks
> 
> Richard Brookhuis schrieb am Montag, den 05. Oktober 2009:
> 
>> Package: nagios3-cgi
>> Version: 3.2.0-1
>> Severity: grave
>> Justification: renders package unusable
> Hmm, 
> I'm not able to reproduce that problem. Do you have any more
informations
> for
> me? Like a log? 
> 
> Thanks in advance
> Alex

Hi,

first of all I need to say I never used or installed nagios before. 
So it's a fresh and clean install of nagios3 for me.
I personally think that the postinst script expects things to be there
which were set up by previous versions of nagios3.
So, in my opinion, upgrading to 3.2.0 is no problem, but a clean install
of 3.2.0 is.

here goes:

# apt-get install nagios3-cgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  nagios3-cgi
0 upgraded, 1 newly installed, 0 to remove and 127 not upgraded.
Need to get 0B/1301kB of archives.
After this operation, 4051kB of additional disk space will be used.
Selecting previously deselected package nagios3-cgi.
(Reading database ... 130560 files and directories currently installed.)
Unpacking nagios3-cgi (from .../nagios3-cgi_3.2.0-1_i386.deb) ...
Setting up nagios3-cgi (3.2.0-1) ...
dpkg: error processing nagios3-cgi (--configure):
 subprocess installed post-installation script returned error exit status
10
Errors were encountered while processing:
 nagios3-cgi
[ Rootkit Hunter version 1.3.4 ]
File updated: searched for 155 files, found 135
E: Sub-process /usr/bin/dpkg returned an error code (1)


After editing /var/lib/dpkg/info/nagios3-cgi.postinst to get some debug
info:
#if [ -n "$NAG3DEBUG" ]; then
  echo "now debugging $0 $@"
  set -x
#fi


I get this:

# apt-get install nagios3-cgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
nagios3-cgi is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 127 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up nagios3-cgi (3.2.0-1) ...
now debugging /var/lib/dpkg/info/nagios3-cgi.postinst configure
+ apacheconf=/etc/nagios3/apache2.conf
+ htpw=/etc/nagios3/htpasswd.users
+ case "$1" in
+ getent passwd nagios
+ db_get nagios3/httpd
+ _db_cmd 'GET nagios3/httpd'
+ IFS=' '
+ printf '%s\n' 'GET nagios3/httpd'
+ IFS='
'
+ read -r _db_internal_line
+ RET='10 nagios3/httpd doesn'\''t exist'
+ case ${_db_internal_line%%[   ]*} in
+ return 10
dpkg: error processing nagios3-cgi (--configure):
 subprocess installed post-installation script returned error exit status
10
Errors were encountered while processing:
 nagios3-cgi
[ Rootkit Hunter version 1.3.4 ]
File updated: searched for 155 files, found 135
E: Sub-process /usr/bin/dpkg returned an error code (1)

As you can see, the line "db_cmd 'GET nagios3/httpd'" fails getting any
configuration value.
That's ok, because I cannot find 'SET nagios3/httpd' or whatever necessary
in the pre/postinst scripts.
I believe that in version 3.0.6 the missing 'SET nagios3/httpd' were
there, but I'm not sure.

I hope I've provided sufficient information.
If you need more info, just ask.

Richard









More information about the Pkg-nagios-devel mailing list