Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] Archived.pl

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Mathieu Kretchner <address@concealed>
  • To: David Verdin <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-dev] Archived.pl
  • Date: Mon, 05 May 2008 15:59:22 +0200

Thanks, it's working now.

I've modified it before with a less restrictive regexp, but the line you gave me is good too.


David Verdin a écrit :
Hi, and sorry for this late answer,

Actually, this is a patch introduced in order to resolve an issue with
Gentoo distribution which creates, everywhere in the filesystem, files
starting with a dot. These are probably metadata.
Anyway, these files where found by Sympa in the spools and generated
errors, as they had nothing to do with Sympa functioning.
So, in order to fix your problem without reintroducing the problem with
gentoo, I suggest the following modification:
Replace
my @files = (grep(!/^\./, readdir DIR ));
by
my @files = (grep(/(^[^\.]|^\.(remove|rebuild)\.(.*))/, readdir DIR ));

This will include all the files that don't start with a dot plus the
files starting with .rebuild* or .remove*.

Here is the patch for the 5.4.2 :
http://sourcesup.cru.fr/viewvc/viewvc/branches/sympa-5.4-branch/wwsympa/archived.pl?r1=4986&r2=4985&pathrev=4986

Here is the patch for development trunk:
http://sourcesup.cru.fr/viewvc/viewvc/trunk/wwsympa/archived.pl?r1=4985&r2=4984&pathrev=4985

Thanks for reporting this bug!


Mathieu Kretchner a écrit :
So I think, I resolve the bug with a substitution of code at the line 194 in archived.pl, I replace :
my @files = (grep(!/^\./, readdir DIR ));
by
my @files = readdir (DIR);

and now the rebuild operation are well done !

Now I would like to determine if there is no side effects with this change ?

Thanks.


Mathieu Kretchner a écrit :
Hello all,

It seems that the archived.pl can't do this part of code (line 302 of archived.pl)

}elsif ($file =~ /^\.rebuild\.(.*)$/ ) {
($Log::log_level >= 1) && do_log('debug',"rebuild found : $file for list $1");
&rebuild($1);
unless (unlink("$queue/$file")) {
($Log::log_level >= 0) && do_log ('err',"Ignoring file $queue/$file because couldn't remove it, archived.pl must use the same uid as sympa");
next;
}

In order to test it, I try to touch some files directly in the outgoing spool and the results show that all files without a "." at the beginning are caught by the daemon, but the command .rebuild or .remove are not interpreted.

Could someone test it for me with the 5.4.2 ?

Do you think the line 194 is correct ? Because this regexp list all the files which aren't beginning with a "." (dot)
my @files = (grep(!/^\./, readdir DIR ));




begin:vcard
fn:Mathieu Kretchner
n:Kretchner;Mathieu
org:INRIA;Syslog
adr;dom:;;2007 route des lucioles - BP93;Sophia Antipolis;;06902 CEDEX
email;internet:address@concealed
tel;work:04 92 38 76 67
x-mozilla-html:FALSE
version:2.1
end:vcard




Archive powered by MHonArc 2.6.19+.

Top of Page