Re: Bug#556388: Problem with cyrus-common-2.2.postinst script

2011-09-27 Thread Ondřej Surý
Version: 2.2.13-19

Hi,

thanks for catching that, I have further optimized the code in
cyrus-imapd-2.4 to:

find $confdir \( -not -user cyrus -or -not -group mail \) -execdir
chown cyrus:mail '{}' \;

find $i \( -not -user cyrus -or -not -group mail \) -execdir chown
cyrus:mail '{}' \;

find $sievedir \( -not -user cyrus -or -not -group mail \) -execdir
chown cyrus:mail '{}' \;

Anyway in cyrus-imapd-2.4 there's a code which runs this code only on
new installs.


I am afraid that oldstable will not receive this optimization, it's
not security related.

And squeeze has this optimization:

if [ $2 =  ] || dpkg --compare-versions $( echo $2 | cut
-d- -f2) lt 2.2.13 ; then
cyrus-makedirs --cleansquat
fi

So it should not be run on upgrade from lenny to squeeze and I think I
can close this bug for squeeze and sid.

O.

On Tue, Sep 27, 2011 at 13:32, Bas van Sisseren b...@quarantainenet.nl wrote:
 Hello,

 It would help a lot to change these lines in /usr/sbin/cyrus-makedirs:

 (line 92)
 find $confdir -print0 \( -not -user cyrus -or  -not -group mail \) | xargs
 -r -0 chown cyrus:mail

 (line 105)
 find $i -print0 \( -not -user cyrus -or  -not -group mail \) | xargs -r -0
 chown cyrus:mail

 (line 118)
 find $sievedir -print0 \( -not -user cyrus -or  -not -group mail \) |
 xargs -r -0 chown cyrus:mail


 into:

 (line 92)
 find $confdir \( -not -user cyrus -or  -not -group mail \) -print0 | xargs
 -r -0 chown cyrus:mail

 (line 105)
 find $i \( -not -user cyrus -or  -not -group mail \) -print0 | xargs -r -0
 chown cyrus:mail

 (line 118)
 find $sievedir \( -not -user cyrus -or  -not -group mail \) -print0 |
 xargs -r -0 chown cyrus:mail


 This way the file is only chowned when the user/group is incorrect. With the
 -print0 statement in the front, just all files are printed, user cyrus or 
 not..

 If another security update will be released for oldstable, I would really
 like this fix. Without the fix, the upgrade took me more than 1.5 hours
 downtime. With the fix, this will probably be only 5 minutes.


 Regards,

 Bas van Sisseren

 --
 Bas van Sisseren b...@quarantainenet.nl
 Quarantainenet



 ___
 Pkg-Cyrus-imapd-Debian-devel mailing list
 Pkg-Cyrus-imapd-Debian-devel@lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-cyrus-imapd-debian-devel




-- 
Ondřej Surý ond...@sury.org

___
Pkg-Cyrus-imapd-Debian-devel mailing list
Pkg-Cyrus-imapd-Debian-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-cyrus-imapd-debian-devel

Re: Bug#556388: Problem with cyrus-common-2.2.postinst script

2009-11-21 Thread Henrique de Moraes Holschuh
On Sat, 21 Nov 2009, Sven Müller wrote:
 Henrique, you probably know this better than anyone else in the
 packaging team, so:
 
 Could we skip this script during package upgrades?

I think so.  In fact, I am not sure we still need this script at all, it is
stuff from 2002, Cyrus has came a long way since...

 I actually even think we don't need the --cleansquat here, even during
 upgrade from 2.2, since the format doesn't seem to have changed.

AFAIK, it hasn't changed, so we shouldn't need it.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh

___
Pkg-Cyrus-imapd-Debian-devel mailing list
Pkg-Cyrus-imapd-Debian-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-cyrus-imapd-debian-devel