[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#760084: sitesummary: postinst fail on first but not second invocation



I was able to reproduce this in a chroot, and start to suspect the cause
is that sitesummary is configured before apache2.  I checked a main
server install, and the same happen there.  First is sitesummary and
apache2 unpacked, then their postinst script are executed.  Here is what
I get during testing:

[...]
Setting up sitesummary (0.1.13) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
apache2_invoke: Enable configuration sitesummary.conf
Action 'configtest' failed.
The Apache error log may have more information.
apache2_reload: Your configuration is broken. Not reloading Apache 2
dpkg: error processing package sitesummary (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up file (1:5.19-1) ...
Setting up mime-support (3.56) ...
Setting up pciutils (1:3.2.1-2) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.5.3-3) ...
Setting up libaprutil1-ldap:amd64 (1.5.3-3) ...
Setting up apache2-bin (2.4.10-1) ...
Setting up apache2-data (2.4.10-1) ...
Setting up apache2 (2.4.10-1) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libsasl2-modules:amd64 (2.1.26.dfsg1-11) ...
Setting up lsscsi (0.27-2) ...
Setting up openssl (1.0.1i-2) ...
Setting up sitesummary-client (0.1.13) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up ssl-cert (1.0.34) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
hostname: Name or service not known
make-ssl-cert: Could not get FQDN, using "minerva.reinholdtsen.name".
make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run
make-ssl-cert: make-ssl-cert generate-default-snakeoil --force-overwrite
make-ssl-cert: again.
Setting up usbutils (1:007-2) ...
Setting up xml-core (0.13+nmu2) ...
Setting up apache2-mpm-worker (2.4.10-1) ...
Setting up iproute (1:3.16.0-1) ...
Processing triggers for libc-bin (2.19-9) ...
Processing triggers for sgml-base (1.26+nmu4) ...
Errors were encountered while processing:
 sitesummary
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@minerva:/# service apache2 configtest
Usage: apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean}
root@minerva:/# apachectl configtest
AH00557: apache2: apr_sockaddr_info_get() failed for minerva.reinholdtsen.name
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
root@minerva:/# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LC_TIME = "nb_NO.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Setting up sitesummary (0.1.13) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
apache2_invoke sitesummary.conf: already enabled
invoke-rc.d: policy-rc.d denied execution of reload.
apache2_invoke: Enable module cgi.load
invoke-rc.d: policy-rc.d denied execution of restart.
root@minerva:/# 

As sitesummary only recommend apache2, I am not quite sure how to avoid
this.

These are the commands required to reproduce the issue:

  debootstrap testing /tmp/chroot-testing
  printf '#!/bin/sh\nexit 101\n' >
  /tmp/chroot-testing/usr/sbin/policy-rc.d
  chmod a+rx /tmp/chroot-testing/usr/sbin/policy-rc.d
  chroot /tmp/chroot-testing apt-get install sitesummary

-- 
Happy hacking
Petter Reinholdtsen


Reply to: