You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Nigel Frankcom <ni...@blue-canoe.net> on 2006/08/03 11:19:44 UTC

sa-update error

Hi All,

I ran sa-update across several Centos 64 & 32 bit machines here
yesterday and today and received the following error...

channel: attempt to rm channel pre file failed, attempting to continue
anyway at /usr/bin/sa-update line 694

--lint -D shows no errors, just wondering if I should be concerned?

TIA

Nigel

Re: sa-update error

Posted by Chris <cp...@earthlink.net>.
On Friday 04 August 2006 9:33 am, Theo Van Dinter wrote:

> The problem is, yet again, of assumption.  The code assumes that if the
> update directory exists, that certain channel files will be in there
> because it creates them (aka: channel.cf and channel.pre).  So when an
> update occurs, the code dutifully removes those files before installing
> the update where it'll recreate them for the new files.  Unfortunately,
> there's a flaw in the assumption wherein the channel files only _may_
> exist -- if sa-update doesn't have anything to put into the file,
> it doesn't bother writing it out.  So in the end we get this warning
> because the attempt to remove the non-existant file failed.
>
> I had also forgotten that the "don't create if empty" bit was in the
> code, hence my "Crap!" when I was reading through and found it. :|
>
> > channel: attempt to rm channel pre file failed, attempting to continue
> > anyway at /usr/bin/sa-update line 691.
> > /bin/sh: line 1: service: command not found
> >
> > Or is that also part of the bug?
>
> The "service: command not found" line?  No, that's something you're
> calling outside of sa-update.  My guess is you're trying something like:
>
> sa-update && service spamassassin restart
>
> which assumes you're on an OS with the "service" command and that it's
> in your path (amongst other things).

Yes, I'm running it as a cronjob with sa-update && service spamassassin 
restart. It worked the first time it ran and it must have worked today as 
the "updates.spamassassinorg.cf file is time stamped today at 6:11am as 
well as all the files in /var/lib/spamassassin/3.001004. Thats assuming 
there was an update since yesterday, however, looking at my syslog it 
appears as though spamassassin did not restart.

-- 
Chris
17:37:47 up 4 days, 23:06, 1 user, load average: 0.22, 0.20, 0.19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Any sufficiently advanced technology is indistinguishable from a rigged 
demo.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: sa-update error

Posted by Theo Van Dinter <fe...@apache.org>.
On Fri, Aug 04, 2006 at 06:25:04AM -0500, Chris wrote:
> > Aha!  I see the issue!  Crap!
> 
> Theo, why would you get this if the /var/lib/spamassassin/3.001004 'does' 
> exist? 

The problem is, yet again, of assumption.  The code assumes that if the
update directory exists, that certain channel files will be in there
because it creates them (aka: channel.cf and channel.pre).  So when an
update occurs, the code dutifully removes those files before installing
the update where it'll recreate them for the new files.  Unfortunately,
there's a flaw in the assumption wherein the channel files only _may_
exist -- if sa-update doesn't have anything to put into the file,
it doesn't bother writing it out.  So in the end we get this warning
because the attempt to remove the non-existant file failed.

I had also forgotten that the "don't create if empty" bit was in the code,
hence my "Crap!" when I was reading through and found it. :|

> channel: attempt to rm channel pre file failed, attempting to continue 
> anyway at /usr/bin/sa-update line 691.
> /bin/sh: line 1: service: command not found
> 
> Or is that also part of the bug?

The "service: command not found" line?  No, that's something you're calling
outside of sa-update.  My guess is you're trying something like:

sa-update && service spamassassin restart

which assumes you're on an OS with the "service" command and that it's
in your path (amongst other things).

-- 
Randomly Generated Tagline:
"Depends on how you define 'always'.  :-)"   - Larry Wall

Re: sa-update error

Posted by Chris <cp...@earthlink.net>.
On Thursday 03 August 2006 10:17 am, Theo Van Dinter wrote:
> On Thu, Aug 03, 2006 at 04:08:16PM +0100, Nigel Frankcom wrote:
> > >> channel: attempt to rm channel pre file failed, attempting to
> > >> continue anyway at /usr/bin/sa-update line 694
> > >> --lint -D shows no errors, just wondering if I should be concerned?
> >
> > I don't use updatedir - just straight sa-update. I'll add detail to
> > the ticket
>
> Aha!  I see the issue!  Crap!
>
> Yeah, please open the ticket and I'll get a patch written up.  Dang it.

Theo, why would you get this if the /var/lib/spamassassin/3.001004 'does' 
exist? 

channel: attempt to rm channel pre file failed, attempting to continue 
anyway at /usr/bin/sa-update line 691.
/bin/sh: line 1: service: command not found

Or is that also part of the bug?

-- 
Chris
06:21:46 up 4 days, 11:50, 1 user, load average: 0.39, 0.38, 0.20


Re: sa-update error

Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Aug 03, 2006 at 04:08:16PM +0100, Nigel Frankcom wrote:
> >> channel: attempt to rm channel pre file failed, attempting to continue
> >> anyway at /usr/bin/sa-update line 694
> >> --lint -D shows no errors, just wondering if I should be concerned?
> 
> I don't use updatedir - just straight sa-update. I'll add detail to
> the ticket

Aha!  I see the issue!  Crap!

Yeah, please open the ticket and I'll get a patch written up.  Dang it.

-- 
Randomly Generated Tagline:
"It timed me out... I hate Windows."         - Prof. Farr

Re: sa-update error

Posted by Nigel Frankcom <ni...@blue-canoe.net>.
On Thu, 3 Aug 2006 10:06:31 -0400, Theo Van Dinter
<fe...@apache.org> wrote:

>On Thu, Aug 03, 2006 at 10:19:44AM +0100, Nigel Frankcom wrote:
>> channel: attempt to rm channel pre file failed, attempting to continue
>> anyway at /usr/bin/sa-update line 694
>> --lint -D shows no errors, just wondering if I should be concerned?
>
>Hrm.  Well, it's one of those "features" as opposed to a bug
>(though I'd appreciate it if you could open a BZ ticket about it:
>http://issues.apache.org/SpamAssassin/).  In short, there's no problem --
>it'll happen the first time you run sa-update in 3.1.4 and you're using
>updatedir to aim at a non-standard (and already existing) location.
>
>The code assumes that certain files should exist if the update directory
>already exists, so when it tries to delete the files and they're not
>there, it shows a warning -- but if this is the first time sa-update
>from 3.1.4 is run, the channel pre file won't exist.

I don't use updatedir - just straight sa-update. I'll add detail to
the ticket

Kind regards

Nigel

Re: sa-update error

Posted by Theo Van Dinter <fe...@apache.org>.
On Thu, Aug 03, 2006 at 10:19:44AM +0100, Nigel Frankcom wrote:
> channel: attempt to rm channel pre file failed, attempting to continue
> anyway at /usr/bin/sa-update line 694
> --lint -D shows no errors, just wondering if I should be concerned?

Hrm.  Well, it's one of those "features" as opposed to a bug
(though I'd appreciate it if you could open a BZ ticket about it:
http://issues.apache.org/SpamAssassin/).  In short, there's no problem --
it'll happen the first time you run sa-update in 3.1.4 and you're using
updatedir to aim at a non-standard (and already existing) location.

The code assumes that certain files should exist if the update directory
already exists, so when it tries to delete the files and they're not
there, it shows a warning -- but if this is the first time sa-update
from 3.1.4 is run, the channel pre file won't exist.

-- 
Randomly Generated Tagline:
Gimme two brains on drugs, over easy, and bacon...