Bug#337223: fail2ban: leaves garbage around after purge

2005-11-03 Thread Jochen Voss
Package: fail2ban
Version: 0.5.4-7
Severity: normal

Hi,

when I install and then purge fail2ban, some files are left lying around in
/usr/share/fail2ban:

[EMAIL PROTECTED] [~] sudo aptitude purge fail2ban
Reading package lists... Done
Building dependency tree... Done
Reading extended state information  
Initializing package states... Done
Reading task descriptions... Done  
The following packages will be REMOVED:
  fail2ban 
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 246kB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 132413 files and directories currently installed.)
Removing fail2ban ...
Stopping fail2ban: Status of fail2ban: fail2ban is not running.
Not stopping fail2ban
invoke-rc.d: initscript fail2ban, action stop failed.
Purging configuration files for fail2ban ...
dpkg - warning: while removing fail2ban, directory 
`/usr/share/fail2ban/utils' not empty so not removed.
dpkg - warning: while removing fail2ban, directory 
`/usr/share/fail2ban/confreader' not empty so not removed.
dpkg - warning: while removing fail2ban, directory 
`/usr/share/fail2ban/logreader' not empty so not removed.
dpkg - warning: while removing fail2ban, directory 
`/usr/share/fail2ban/firewall' not empty so not removed.
dpkg - warning: while removing fail2ban, directory `/usr/share/fail2ban' 
not empty so not removed.
Reading package lists... Done 
Building dependency tree... Done
Reading extended state information  
Initializing package states... Done
Reading task descriptions... Done  
[EMAIL PROTECTED] [~] ll /usr/share/fail2ban/
total 56
drwxr-xr-x  2 root root  4096 2005-11-03 11:23 confreader/
-rw-r--r--  1 root root 15916 2005-11-03 11:14 fail2ban.pyc
-rw-r--r--  1 root root 15916 2005-11-03 11:14 fail2ban.pyo
drwxr-xr-x  2 root root  4096 2005-11-03 11:23 firewall/
drwxr-xr-x  2 root root  4096 2005-11-03 11:23 logreader/
drwxr-xr-x  2 root root  4096 2005-11-03 11:23 utils/
-rw-r--r--  1 root root   469 2005-11-03 11:14 version.pyc
-rw-r--r--  1 root root   469 2005-11-03 11:14 version.pyo

These files should be deleted when the package is purged.

I hope this helps,
Jochen
-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages fail2ban depends on:
ii  iptables  1.3.3-2Linux kernel 2.4+ iptables adminis
ii  python2.3.5-3An interactive high-level object-o

fail2ban recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#337223: fail2ban: leaves garbage around after purge

2005-11-03 Thread Yaroslav Halchenko
the key in all this is 
 Stopping fail2ban: Status of fail2ban: fail2ban is not running.
 Not stopping fail2ban
 invoke-rc.d: initscript fail2ban, action stop failed.

So it seems that fail2ban doesn't uninstall cleanly only if it wasn't
running at the moment and stop failed.
That is funny why it matters... 

For now could you please confirm that it uninstalls cleanly if it is
running before you do purge?

Cheeers
-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]




pgp17Ux92fehk.pgp
Description: PGP signature


Bug#337223: fail2ban: leaves garbage around after purge

2005-11-03 Thread Yaroslav Halchenko
Indeed so:

washoe[0] /var/lib/dpkg/info
 less fail2ban.prerm
#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x /etc/init.d/fail2ban ]; then
if [ -x `which invoke-rc.d 2/dev/null` ]; then
invoke-rc.d fail2ban stop || exit 0
else
/etc/init.d/fail2ban stop || exit 0
fi
fi
# End automatically added section
# Automatically added by dh_python
dpkg -L fail2ban |
awk '$0~/\.py$/ {print $0c\n $0o}' |
xargs rm -f 2
# End automatically added section

This issue seems to be something to ask about on the mailing list or
debhelper people since I don't want override global ERROR_HANDLER and we
need to have it something else from exit 0 when combining with
dh_python part of postrm.

-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]




pgplTcKNV3EuC.pgp
Description: PGP signature