Re: sa-compile seems to not clean up after itself

2015-02-12 Thread Kevin A. McGrail

On 2/11/2015 7:25 PM, listsb-spamassas...@bitrate.net wrote:

i hope another solicitation for this help request is ok.


It's ok.

Overall, I agree.  I tested on a devel box and running sa-compile does 
have an rm line but did leave these files listed below.


Because /tmp is a considered auto cleaning, I consider it a very low 
priority but either re2c or the process in sa-compile is leaving files 
behind and you should open a ticket with bugzilla, please.


regards,
KAM

Orphaned files:

-rw---1 root root 2796 Feb 12 14:01 
.spamassassin274315sKPf3tmp
-rw---1 root root   45 Feb 12 14:01 
.spamassassin274319FoF6ltmp
-rw---1 root root  124 Feb 12 14:01 
.spamassassin27431a5kKo2tmp
-rw---1 root root 2816 Feb 12 14:01 
.spamassassin27431jsY1kCtmp
-rw---1 root root 3852 Feb 12 14:01 
.spamassassin27431kTvcGstmp
-rw---1 root root  839 Feb 12 14:01 
.spamassassin27431LEsufptmp
-rw---1 root root 1582 Feb 12 14:01 
.spamassassin27431o7GmV7tmp
-rw---1 root root 1337 Feb 12 14:01 
.spamassassin27431phBnYHtmp
-rw---1 root root 2673 Feb 12 14:01 
.spamassassin27431QxVWegtmp
-rw---1 root root  341 Feb 12 14:01 
.spamassassin27431W2HB3ctmp
-rw---1 root root 2653 Feb 12 14:01 
.spamassassin27431x1CzgItmp


Here's the full output for sa-compile
Feb 12 14:01:09.827 [27431] info: generic: base extraction starting. 
this can take a while...
Feb 12 14:01:09.827 [27431] info: generic: extracting from rules of type 
body_0
100% 
[] 
102.46 rules/sec 00m05s DONE
100% 
[=== 
] 177.71 bases/sec 00m15s DONE
Feb 12 14:01:30.616 [27431] info: body_0: 1128 base strings extracted in 
21 seconds
Feb 12 14:01:31.122 [27431] info: rules: meta test LOC_SHORT has 
dependency 'BAYES_00' with a zero score

cd /tmp/.spamassassin27431YWLPSstmp
reading bases_body_0.in
cd Mail-SpamAssassin-CompiledRegexps-body_0
re2c -i -b -o scanner1.c scanner1.re
re2c -i -b -o scanner2.c scanner2.re
re2c -i -b -o scanner3.c scanner3.re
re2c -i -b -o scanner4.c scanner4.re
re2c -i -b -o scanner5.c scanner5.re
re2c -i -b -o scanner6.c scanner6.re
/usr/local/bin/perl Makefile.PL 
PREFIX=/tmp/.spamassassin27431YWLPSstmp/ignored 
INSTALLSITEARCH=/var/lib/spamassassin/compiled/5.008/3.004001

Writing Makefile for Mail::SpamAssassin::CompiledRegexps::body_0
Writing MYMETA.yml and MYMETA.json
make
cp body_0.pm blib/lib/Mail/SpamAssassin/CompiledRegexps/body_0.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap 
/usr/local/lib/perl5/5.8.6/ExtUtils/typemap  body_0.xs  body_0.xsc  
mv body_0.xsc body_0.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   body_0.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner1.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner2.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner3.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner4.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner5.c
cc -c   -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 
-DVERSION=\1.0\ -DXS_VERSION=\1.0\ -fpic 
-I/usr/local/lib/perl5/5.8.6/i686-linux/CORE   scanner6.c

Running Mkbootstrap for Mail::SpamAssassin::CompiledRegexps::body_0 ()
chmod 644 body_0.bs
rm -f blib/arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
cc  -shared -L/usr/local/lib body_0.o scanner1.o scanner2.o scanner3.o 
scanner4.o scanner5.o scanner6.o  -o 

Re: sa-compile seems to not clean up after itself

2015-02-12 Thread RW
On Thu, 12 Feb 2015 14:09:00 -0500
Kevin A. McGrail wrote:

 On 2/11/2015 7:25 PM, listsb-spamassas...@bitrate.net wrote:
  i hope another solicitation for this help request is ok.
 
 It's ok.
 
 Overall, I agree.  I tested on a devel box and running sa-compile
 does have an rm line but did leave these files listed below.

sa-compile uses a temporary directory, the files (which start with use
bytes) appear to be from Plugin/BodyRuleBaseExtractor.pm:


  my ($tmpf, $tmpfh) = Mail::SpamAssassin::Util::secure_tmpfile();
  $tmpfh  or die failed to create a temporary file;
  untaint_var(\$tmpf);

  print $tmpfh use bytes; m{ . $rule . } . $mods
or die error writing to $tmpf: $!;
  close $tmpfh  or die error closing $tmpf: $!;

  my $perl = $self-get_perl();
  local *IN;
  open (IN, $perl -c -Mre=debug $tmpf 21 |)
or die cannot run $perl: .exit_status_str($?,$!);

  my($inbuf,$nread,$fullstr); $fullstr = '';
  while ( $nread=read(IN,$inbuf,16384) ) { $fullstr .= $inbuf }
  defined $nread  or die error reading from pipe: $!;

  close IN  or die error closing pipe: $!;
  unlink $tmpf  or die cannot unlink $tmpf: $!;
  defined $fullstr  or warn empty result from a pipe;


I had some in /tmp, but  I'm not seeing any new ones when I run
sa-compile.


Re: sa-compile seems to not clean up after itself

2015-02-12 Thread listsb-spamassassin

 On Feb 12, 2015, at 14.09, Kevin A. McGrail kmcgr...@pccc.com wrote:
 
 On 2/11/2015 7:25 PM, listsb-spamassas...@bitrate.net wrote:
 i hope another solicitation for this help request is ok.
 
 It's ok.
 
 Overall, I agree.  I tested on a devel box and running sa-compile does have 
 an rm line but did leave these files listed below.
 
 Because /tmp is a considered auto cleaning, I consider it a very low priority 
 but either re2c or the process in sa-compile is leaving files behind and you 
 should open a ticket with bugzilla, please.

yes, certainly - we just do housekeeping in the cron job which runs sa-compile 
for now, and that's just fine.

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7138

-ben

Re: sa-compile seems to not clean up after itself

2015-02-11 Thread listsb-spamassassin
i hope another solicitation for this help request is ok.

 On Feb 04, 2015, at 09.19, btb listsb-spamassas...@bitrate.net wrote:
 
 hi-
 
 i happened to notice a bunch of old files in /tmp/, related to spamassassin.  
 after a bit of testing, it looks like sa-compile isn't cleaning up after 
 itself?
 
 ls -alH /tmp/
 total 44
 drwxrwxrwt  2 root root 36864 Feb  3 17:18 .
 drwxr-xr-x 22 root root  4096 Dec 25 00:34 ..
 
 sa-compile --quiet
 
 l /tmp
 total 60K
 -rw--- 1 root root  131 Feb  4 09:09 .spamassassin315050WnT59tmp
 -rw--- 1 root root 2.7K Feb  4 09:10 .spamassassin31505283bEDtmp
 -rw--- 1 root root 1.3K Feb  4 09:09 .spamassassin31505arXK9ytmp
 -rw--- 1 root root  528 Feb  4 09:09 .spamassassin31505aZnGbDtmp
 -rw--- 1 root root 1.4K Feb  4 09:09 .spamassassin31505CzdUbftmp
 -rw--- 1 root root  839 Feb  4 09:09 .spamassassin31505DPLUxbtmp
 -rw--- 1 root root 3.1K Feb  4 09:10 .spamassassin31505dSWwz5tmp
 -rw--- 1 root root  341 Feb  4 09:10 .spamassassin31505foYv8Ptmp
 -rw--- 1 root root   97 Feb  4 09:09 .spamassassin31505iM2hTCtmp
 -rw--- 1 root root  715 Feb  4 09:09 .spamassassin31505jYeOoltmp
 -rw--- 1 root root 2.6K Feb  4 09:09 .spamassassin31505mpa4T2tmp
 -rw--- 1 root root   45 Feb  4 09:09 .spamassassin31505RfvOddtmp
 -rw--- 1 root root 2.8K Feb  4 09:10 .spamassassin31505TZTv3Ntmp
 -rw--- 1 root root  124 Feb  4 09:09 .spamassassin31505uJAibhtmp
 -rw--- 1 root root 2.8K Feb  4 09:10 .spamassassin31505vf0B0Wtmp
 
 is this expected behavior?  if i'm correctly interpreting the man page [e.g. 
 --keep-tmps], they should be deleted?
 
 -ben



sa-compile seems to not clean up after itself

2015-02-04 Thread btb

hi-

i happened to notice a bunch of old files in /tmp/, related to 
spamassassin.  after a bit of testing, it looks like sa-compile isn't 
cleaning up after itself?


ls -alH /tmp/
total 44
drwxrwxrwt  2 root root 36864 Feb  3 17:18 .
drwxr-xr-x 22 root root  4096 Dec 25 00:34 ..

sa-compile --quiet

l /tmp
total 60K
-rw--- 1 root root  131 Feb  4 09:09 .spamassassin315050WnT59tmp
-rw--- 1 root root 2.7K Feb  4 09:10 .spamassassin31505283bEDtmp
-rw--- 1 root root 1.3K Feb  4 09:09 .spamassassin31505arXK9ytmp
-rw--- 1 root root  528 Feb  4 09:09 .spamassassin31505aZnGbDtmp
-rw--- 1 root root 1.4K Feb  4 09:09 .spamassassin31505CzdUbftmp
-rw--- 1 root root  839 Feb  4 09:09 .spamassassin31505DPLUxbtmp
-rw--- 1 root root 3.1K Feb  4 09:10 .spamassassin31505dSWwz5tmp
-rw--- 1 root root  341 Feb  4 09:10 .spamassassin31505foYv8Ptmp
-rw--- 1 root root   97 Feb  4 09:09 .spamassassin31505iM2hTCtmp
-rw--- 1 root root  715 Feb  4 09:09 .spamassassin31505jYeOoltmp
-rw--- 1 root root 2.6K Feb  4 09:09 .spamassassin31505mpa4T2tmp
-rw--- 1 root root   45 Feb  4 09:09 .spamassassin31505RfvOddtmp
-rw--- 1 root root 2.8K Feb  4 09:10 .spamassassin31505TZTv3Ntmp
-rw--- 1 root root  124 Feb  4 09:09 .spamassassin31505uJAibhtmp
-rw--- 1 root root 2.8K Feb  4 09:10 .spamassassin31505vf0B0Wtmp

is this expected behavior?  if i'm correctly interpreting the man page 
[e.g. --keep-tmps], they should be deleted?


-ben