Hi Christoph

On Fri, Oct 19, 2012 at 11:16:51AM +0200, Christoph Berg wrote:
> thanks for the patch, but I don't think it is valid. If you remove the
> dacs module, but leave the apache config there, apache will not be
> happy. I guess the best would be to call a2dismod to remove the
> symlink when the package is removed.

I just checked this again, here is the log from the test in a virtual
machine. The symlink is removed in preinst. And removing the
/etc/apache2/mods-available/auth_dacs.load is then left to when the
package is purged.

----cut---------cut---------cut---------cut---------cut---------cut-----
root@sid:~# dpkg -i libdacs1_1.4.27b-1.1_amd64.deb 
libapache2-mod-dacs_1.4.27b-1.1_amd64.deb dacs_1.4.27b-1.1_amd64.deb
(Reading database ... 31077 files and directories currently installed.)
Preparing to replace libdacs1 1.4.27b-1 (using libdacs1_1.4.27b-1.1_amd64.deb) 
...
Unpacking replacement libdacs1 ...
Selecting previously unselected package libapache2-mod-dacs.
Unpacking libapache2-mod-dacs (from libapache2-mod-dacs_1.4.27b-1.1_amd64.deb) 
...
Preparing to replace dacs 1.4.27b-1 (using dacs_1.4.27b-1.1_amd64.deb) ...
Unpacking replacement dacs ...
Setting up libdacs1 (1.4.27b-1.1) ...
Setting up dacs (1.4.27b-1.1) ...
Installing new version of config file /etc/dacs/acls/INDEX ...
Processing triggers for man-db ...
Setting up libapache2-mod-dacs (1.4.27b-1.1) ...
[....] Reloading web server config: apache2apache2: Could not reliably 
determine the server's fully qualified domain name, using 192.168.122.53 for 
ServerName
. ok 
root@sid:~# ls -lah /etc/apache2/mods-{available,enabled}/auth_dacs.load
-rw-r--r-- 1 root root 85 Oct 18 16:48 
/etc/apache2/mods-available/auth_dacs.load
lrwxrwxrwx 1 root root 32 Oct 20 09:25 /etc/apache2/mods-enabled/auth_dacs.load 
-> ../mods-available/auth_dacs.load
----cut---------cut---------cut---------cut---------cut---------cut-----

Ok, now only remove the package without deleting
/etc/apache2/mods-available/auth_dacs.load:

----cut---------cut---------cut---------cut---------cut---------cut-----
root@sid:~# apt-get remove libapache2-mod-dacs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dacs libdacs1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libapache2-mod-dacs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 121 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 31083 files and directories currently installed.)
Removing libapache2-mod-dacs ...
Module auth_dacs disabled.
To activate the new configuration, you need to run:
  service apache2 restart
root@sid:~# service apache2 restart
[....] Restarting web server: apache2apache2: Could not reliably determine the 
server's fully qualified domain name, using 192.168.122.53 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified 
domain name, using 192.168.122.53 for ServerName
. ok 
root@sid:~# ls -lah /etc/apache2/mods-{available,enabled}/auth_dacs.load
ls: cannot access /etc/apache2/mods-enabled/auth_dacs.load: No such file or 
directory
-rw-r--r-- 1 root root 85 Oct 18 16:48 
/etc/apache2/mods-available/auth_dacs.load
root@sid:~# service apache2 status
Apache2 is running (pid 7602).
----cut---------cut---------cut---------cut---------cut---------cut-----

So the file /etc/apache2/mods-available/auth_dacs.load is left, and
apache2 still starts. If now package is purged, all (also
conffile dissapear):

----cut---------cut---------cut---------cut---------cut---------cut-----
root@sid:~# apt-get purge libapache2-mod-dacs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dacs libdacs1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libapache2-mod-dacs*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 31078 files and directories currently installed.)
Removing libapache2-mod-dacs ...
Purging configuration files for libapache2-mod-dacs ...
root@sid:~# ls -lah /etc/apache2/mods-{available,enabled}/auth_dacs.load
ls: cannot access /etc/apache2/mods-available/auth_dacs.load: No such file or 
directory
ls: cannot access /etc/apache2/mods-enabled/auth_dacs.load: No such file or 
directory
root@sid:~# service apache2 restart
[....] Restarting web server: apache2apache2: Could not reliably determine the 
server's fully qualified domain name, using 192.168.122.53 for ServerName
 ... waiting ^[[Aapache2: Could not reliably determine the server's fully 
qualified domain name, using 192.168.122.53 for ServerName
. ok 
root@sid:~# service apache2 status
Apache2 is running (pid 7790).
----cut---------cut---------cut---------cut---------cut---------cut-----

I hope I did not miss something.

Regards,
Salvatore

Attachment: signature.asc
Description: Digital signature

Reply via email to