Bug#711493: No default site enabled after fresh (re)install

2013-07-29 Thread Jean-Michel Vourgère
Control: found -1 2.4.6-2

Looks like apache2.preinst is always creating /etc/apache2/.apache2_mpm_selected
because "if [ $? -eq 0 ]" on line 109 is always true.

This results in we_are_upgrading_from_wheezy in apache2.postinst to succeed
where it shouln't.

Attached is a log of apache2 maintainer scripts execution, with a set -x
# dpkg -i /home/nirgal/apache2_2.4.6-2_i386.deb 
Selecting previously unselected package apache2.
(Reading database ... 32799 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.4.6-2_i386.deb) ...
+ OBSOLETE_CONFFILES='/etc/apache2/mods-available/authz_default.load
/etc/apache2/mods-available/authn_default.load
/etc/apache2/mods-available/mem_cache.load
/etc/apache2/mods-available/mem_cache.conf
/etc/apache2/mods-available/authn_alias.load
/etc/apache2/mods-available/cern_meta.load
/etc/apache2/mods-available/disk_cache.load
/etc/apache2/mods-available/disk_cache.conf
/etc/apache2/mods-available/ident.load
/etc/apache2/mods-available/imagemap.load
/etc/apache2/mods-available/version.load'
+ MOVED_CONFFILES='/etc/bash_completion.d/apache2.2-common:/etc/bash_completion.d/apache2
/etc/apache2/sites-available/default:/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-available/default-ssl:/etc/apache2/sites-available/default-ssl.conf
/etc/apache2/conf.d/charset:/etc/apache2/conf-available/charset.conf
/etc/apache2/conf.d/localized-error-pages:/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf.d/other-vhosts-access-log:/etc/apache2/conf-available/other-vhosts-access-log.conf
/etc/apache2/conf.d/security:/etc/apache2/conf-available/security.conf'
+ case "$1" in
+ '[' -d /etc/apache2/ ']'
++ dpkg-query -f '${Package}\t${Status}\n' -W 'apache2-mpm-*'
+ mpm='apache2-mpm-event	unknown ok not-installed
apache2-mpm-itk	unknown ok not-installed
apache2-mpm-prefork	unknown ok not-installed
apache2-mpm-worker	unknown ok not-installed'
+ '[' 0 -eq 0 ']'
++ cut -f1
++ grep 'install ok'
++ echo 'apache2-mpm-event	unknown ok not-installed
apache2-mpm-itk	unknown ok not-installed
apache2-mpm-prefork	unknown ok not-installed
apache2-mpm-worker	unknown ok not-installed'
+ mpm=
+ '[' '!' -f /etc/apache2/.apache2_mpm_selected ']'
+ echo '# automatically created during upgrade'
+ echo '# it can be safely removed anytime'
+ echo ''
+ '[' -n '' ']'
+ obsolete_conffile_exists
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/authz_default.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/authn_default.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/mem_cache.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/mem_cache.conf ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/authn_alias.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/cern_meta.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/disk_cache.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/disk_cache.conf ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/ident.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/imagemap.load ']'
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/version.load ']'
+ return 1
+ exit 0
Setting up apache2 (2.4.6-2) ...
+ OBSOLETE_CONFFILES='/etc/apache2/mods-available/authz_default.load
/etc/apache2/mods-available/authn_default.load
/etc/apache2/mods-available/mem_cache.load
/etc/apache2/mods-available/mem_cache.conf
/etc/apache2/mods-available/authn_alias.load
/etc/apache2/mods-available/cern_meta.load
/etc/apache2/mods-available/disk_cache.load
/etc/apache2/mods-available/disk_cache.conf
/etc/apache2/mods-available/ident.load
/etc/apache2/mods-available/imagemap.load
/etc/apache2/mods-available/version.load'
+ MOVED_CONFFILES='/etc/bash_completion.d/apache2.2-common:/etc/bash_completion.d/apache2
/etc/apache2/sites-available/default:/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-available/default-ssl:/etc/apache2/sites-available/default-ssl.conf
/etc/apache2/conf.d/charset:/etc/apache2/conf-available/charset.conf
/etc/apache2/conf.d/localized-error-pages:/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf.d/other-vhosts-access-log:/etc/apache2/conf-available/other-vhosts-access-log.conf
/etc/apache2/conf.d/security:/etc/apache2/conf-available/security.conf'
+ WHEEZY_UPGRADE=0
+ case "$1" in
+ remove_conffiles configure
+ we_are_upgrading_from_wheezy configure
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -e /etc/apache2/.apache2_mpm_selected ']'
+ WHEEZY_UPGRADE=1
+ return 0
+ for CONFFILE in '$OBSOLETE_CONFFILES'
+ '[' -e /etc/apache2/mods-available/authz_default.load.dpkg-backup ']'
+ '[' -e /etc/apache2/mods-available/authz_default.load.dpkg-remove ']'
+ for

Bug#711493: No default site enabled after fresh (re)install

2013-06-07 Thread Michael Biebl
Am 07.06.2013 13:05, schrieb Arno Töll:
> Hi Michael,
> 
> On 07.06.2013 10:48, Michael Biebl wrote:
>> since something went wrong during the upgrade (I've purged the
>> transitional packages during the upgrade process, leading to a
>> misconfigured apache configuration), I've decided to purge and
>> re-install apache2. After the upgrade, I had not default site enabled.
> 
> I cannot reproduce this in a clean chroot.

Try this in a clean chroot:

apt-get install apache2 phpmyadmin
dpkg --purge apache2 apache2-data
apt-get install apache2
→ /etc/apache2/sites-enabled is empty

my guess is, that postinst get's confused by the phpmyadmin / existing
configuration.


Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#711493: No default site enabled after fresh (re)install

2013-06-07 Thread Arno Töll
Hi Michael,

On 07.06.2013 10:48, Michael Biebl wrote:
> since something went wrong during the upgrade (I've purged the
> transitional packages during the upgrade process, leading to a
> misconfigured apache configuration), I've decided to purge and
> re-install apache2. After the upgrade, I had not default site enabled.

I cannot reproduce this in a clean chroot.

> This is the purge and install log:
> Btw, should this be considered a separate bug, that the /var directories
> are not cleaned up on purge?

Depends on your point of view. I don't think so. You purge Apache
related packages, but you leave back reverse dependencies (e.g. you
still had mod-dnssd and php5 installed). These are left in config-file
state, and thus let back the conffiles they install into "our" directories.

Logs, however, are deliberately not purged.


-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D



signature.asc
Description: OpenPGP digital signature


Bug#711493: No default site enabled after fresh (re)install

2013-06-07 Thread Michael Biebl
Package: apache2
Version: 2.4.4-5
Severity: important

Hi,

since something went wrong during the upgrade (I've purged the
transitional packages during the upgrade process, leading to a
misconfigured apache configuration), I've decided to purge and
re-install apache2. After the upgrade, I had not default site enabled.
This is the purge and install log:
Btw, should this be considered a separate bug, that the /var directories
are not cleaned up on purge?


root@pluto:/etc/apache2# dpkg --purge apache2 apache2-data
(Reading database ... 263507 files and directories currently installed.)
Removing apache2 ...
Purging configuration files for apache2 ...
dpkg: warning: while removing apache2, directory '/var/log/apache2' not empty 
so not removed
dpkg: warning: while removing apache2, directory '/var/www' not empty so not 
removed
dpkg: warning: while removing apache2, directory '/var/lib/apache2' not empty 
so not removed
Removing apache2-data ...
Processing triggers for man-db ...
root@pluto:/etc/apache2# find /etc/apache2/
/etc/apache2/
/etc/apache2/mods-available
/etc/apache2/mods-available/php5.load
/etc/apache2/mods-available/dnssd.load
/etc/apache2/mods-available/dnssd.conf
/etc/apache2/mods-available/php5.conf
/etc/apache2/conf.d
/etc/apache2/conf.d/javascript-common.conf
root@pluto:/etc/apache2# apt-get install apache2 apache2-data
Reading package lists... Done
Building dependency tree   
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dbconfig-common libjs-codemirror libjs-jquery-cookie libjs-jquery-event-drag
  libjs-jquery-metadata libjs-jquery-mousewheel libjs-jquery-tablesorter
  libjs-jquery-ui libmcrypt4 php-gettext php5-gd php5-mcrypt php5-mysql
Use 'apt-get autoremove' to remove them.
Suggested packages:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
The following NEW packages will be installed:
  apache2 apache2-data
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/333 kB of archives.
After this operation, 1181 kB of additional disk space will be used.
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Selecting previously unselected package apache2-data.
(Reading database ... 263026 files and directories currently installed.)
Unpacking apache2-data (from .../apache2-data_2.4.4-5_all.deb) ...
Selecting previously unselected package apache2.
Unpacking apache2 (from .../apache2_2.4.4-5_amd64.deb) ...
Processing triggers for man-db ...
Setting up apache2-data (2.4.4-5) ...
Setting up apache2 (2.4.4-5) ...
Directory /etc/apache2/conf.d is not empty - leaving as is
Please note, that directory is considered obsolete and not read anymore by 
default
javascript-common.conf
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
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.

root@pluto:/etc/apache2# find /etc/apache2/sites-enabled/
/etc/apache2/sites-enabled/


-- Package-specific info:
Enabled MPM: event
List of enabled modules:
  filter (enabled by maintainer script)
   authn_file (enabled by maintainer script)
   dir (enabled by maintainer script)
   access_compat (enabled by maintainer script)
   setenvif (enabled by maintainer script)
   authz_user (enabled by maintainer script)
   auth_basic (enabled by maintainer script)
   mpm_event (enabled by site administrator)
   status (enabled by maintainer script)
   alias (enabled by maintainer script)
   mime (enabled by maintainer script)
   autoindex (enabled by maintainer script)
   deflate (enabled by maintainer script)
   env (enabled by maintainer script)
   authz_core (enabled by maintainer script)
   authz_host (enabled by maintainer script)
   negotiation (enabled by maintainer script)
List of enabled configurations:
  localized-error-pages (enabled by maintainer script)
   other-vhosts-access-log (enabled by maintainer script)
   security (enabled by maintainer script)
   charset (enabled by maintainer script)
   serve-cgi-bin (enabled by maintainer script)

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2 depends on:
ii  apache2-bin   2.4.4-5
ii  apache2-data  2.4.4-5
ii  lsb-base  4.1+Debian12
ii  mime-supp