Bug#689541: dacs: diff for NMU version 1.4.27b-1.1

2012-10-21 Thread Christoph Berg
Re: Salvatore Bonaccorso 2012-10-20 20121020075825.GA1961@elende
 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.

Hi Salvatore,

thanks for the extensive testing! I'll upload a new version tomorrow.

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


Bug#689541: dacs: diff for NMU version 1.4.27b-1.1

2012-10-20 Thread Salvatore Bonaccorso
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 

Bug#689541: dacs: diff for NMU version 1.4.27b-1.1

2012-10-19 Thread Christoph Berg
Re: Salvatore Bonaccorso 2012-10-18 20121018150723.ga10...@elende.valinor.li
 It only needs to remove /etc/apache2/mods-available/auth_dacs.load on
 purge of the package. I attach a possible patch to solve this, simply
 removing the postrm maintainer script.
 
 I have only done some basic testing with the builded package.

Hi Salvatore,

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.

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


Bug#689541: dacs: diff for NMU version 1.4.27b-1.1

2012-10-19 Thread Salvatore Bonaccorso
Hi Christoph!

Thanks a lot for your feedback. I was currently looking at open RC
bugs for wheezy.

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 cannot look at it right now, but maybe in the weekend. If I'm
correct your are doing this step already in the prerm for both remove
and purge. So the module get's disabled for apache2 on removal:

In prerm there is:

cut-cut-cut-cut-cut-cut-
#!/bin/sh

set -e

if [ $1 = remove ] || [ $1 = purge ]; then
a2dismod auth_dacs || true
fi

#DEBHELPER#

exit 0

cut-cut-cut-cut-cut-cut-

With dropping the removal of
/etc/apache2/mods-available/auth_dacs.load for the remove action (in
postrm), you leave the auth_dacs.load only around in
/etc/apache2/mods-available (not mods-enabled). On purge on the other
hand the file then get's removed. Having the file only available in
mods-available should not harm if it is not enabled (in mods-enabled)

But I can try to retest this approach and can report back to you.

Regards,
Salvatore


signature.asc
Description: Digital signature


Bug#689541: dacs: diff for NMU version 1.4.27b-1.1

2012-10-18 Thread Salvatore Bonaccorso
tags 689541 + patch
thanks

Hi Christoph

It only needs to remove /etc/apache2/mods-available/auth_dacs.load on
purge of the package. I attach a possible patch to solve this, simply
removing the postrm maintainer script.

I have only done some basic testing with the builded package.

Hope this information could help,

Regards,
Salvatore
diff -Nru dacs-1.4.27b/debian/changelog dacs-1.4.27b/debian/changelog
--- dacs-1.4.27b/debian/changelog	2012-03-23 12:25:51.0 +0100
+++ dacs-1.4.27b/debian/changelog	2012-10-18 16:48:04.0 +0200
@@ -1,3 +1,10 @@
+dacs (1.4.27b-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove auth_dacs.load only on purge (Closes: #689541)
+
+ -- Salvatore Bonaccorso car...@debian.org  Thu, 18 Oct 2012 16:31:30 +0200
+
 dacs (1.4.27b-1) unstable; urgency=low
 
   * New upstream version.
diff -Nru dacs-1.4.27b/debian/libapache2-mod-dacs.postrm dacs-1.4.27b/debian/libapache2-mod-dacs.postrm
--- dacs-1.4.27b/debian/libapache2-mod-dacs.postrm	2012-01-19 16:57:36.0 +0100
+++ dacs-1.4.27b/debian/libapache2-mod-dacs.postrm	1970-01-01 01:00:00.0 +0100
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ $1 = purge -o $1 = remove ]; then
-# remove pseudo conffile
-if test -e /etc/apache2/mods-available/auth_dacs.load; then
-rm -f /etc/apache2/mods-available/auth_dacs.load
-fi
-fi
-
-#DEBHELPER#
-
-exit 0
-


signature.asc
Description: Digital signature