From dave at badgers-in-foil.co.uk Sun Sep 7 00:22:14 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Sun, 7 Sep 2003 00:22:14 +0000 Subject: [cvsspam-devel] Re: [Saw your post on RubyForge...] In-Reply-To: <200309021031.03985.sdmitry@lrn.ru> References: <20030901145610.GC18527@vhost.badgers-in-foil.co.uk> <200309021031.03985.sdmitry@lrn.ru> Message-ID: <20030907002214.GA24229@vhost.badgers-in-foil.co.uk> On Tue, Sep 02, 2003 at 10:31:03AM +0800, Dmitry V. Sabanin wrote: > For cvsweb integration i had to fix 'cvsroot' problem, on rubyforge, cvsweb > URL's have additional variable 'cvsroot', like in this URL: > http://rubyforge.org/cgi-bin/cvsweb.cgi/photokeeper/?cvsroot=muravey-tools > And i fixed that with overwriting some code inside cvsspam.rb. > You can look at patch I've attached. So, I'm adding a $repository_name configuration option that can be set to either be a string, or the special constant, GUESS. I notice that your regex removes any spaces from the last segment of the CVSROOT path when working out the repository: Do you know if this something that Gforge does to the viewcvs configuration? I was thinking of just url_encode()ing the string, rather than removing spaces, but maybe that's incorrect? Also, would you be able to test the new version? (I don't have ViewCVS set up with multiple repositories.) ta, dave From matt at raibledesigns.com Wed Sep 10 16:25:05 2003 From: matt at raibledesigns.com (Matt Raible) Date: Wed, 10 Sep 2003 09:25:05 -0700 (PDT) Subject: [cvsspam-devel] record_lastdir.rb: No such file or directory Message-ID: <20030910162505.64654.qmail@web14306.mail.yahoo.com> I'm getting the following error when trying to install CVSSpam: cvs server: cannot exec /usr/local/cvsroot/CVSROOT/record_lastdir.rb: No such file or directory cvs server: Pre-commit check failed cvs [server aborted]: correct above errors first! cvs commit: saving log message in /tmp/cvsvoAWAR I tried the solution mentioned at http://tinyurl.com/mvuk by changing my CVSROOT/cvsspam.conf file to have: $cvs_prog = "/usr/bin/cvs" No dice though. Your help is appreciated. Thanks, Matt __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dave at badgers-in-foil.co.uk Wed Sep 10 16:37:34 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 10 Sep 2003 16:37:34 +0000 Subject: [cvsspam-devel] record_lastdir.rb: No such file or directory In-Reply-To: <20030910162505.64654.qmail@web14306.mail.yahoo.com> References: <20030910162505.64654.qmail@web14306.mail.yahoo.com> Message-ID: <20030910163734.GA860@vhost.badgers-in-foil.co.uk> Hello there, On Wed, Sep 10, 2003 at 09:25:05AM -0700, Matt Raible wrote: > cvs server: cannot exec /usr/local/cvsroot/CVSROOT/record_lastdir.rb: No such > file or directory If '/usr/local/cvsroot/CVSROOT/record_lastdir.rb' exists, check the first line of the script and see if the ruby it specifies matches the location ruby is installed in on your system. dave From matt at raibledesigns.com Wed Sep 10 18:43:26 2003 From: matt at raibledesigns.com (Matt Raible) Date: Wed, 10 Sep 2003 11:43:26 -0700 (PDT) Subject: [cvsspam-devel] record_lastdir.rb: No such file or directory In-Reply-To: <20030910163734.GA860@vhost.badgers-in-foil.co.uk> Message-ID: <20030910184327.55472.qmail@web14304.mail.yahoo.com> That was it - ruby was in /usr/local/bin - so I created a symlink to /usr/bin. I'm getting e-mails now - man this is a sweet product. Nice job! I'm getting the following warnings - should I just ignore them? /usr/local/cvsroot/CVSROOT/cvsspam.rb:919: warning: global variable `$viewcvsURL' not initialized /usr/local/cvsroot/CVSROOT/cvsspam.rb:922: warning: global variable `$choraURL' not initialized /usr/local/cvsroot/CVSROOT/cvsspam.rb:924: warning: global variable `$cvswebURL' not initialized Thanks, Matt --- David Holroyd wrote: > Hello there, > > On Wed, Sep 10, 2003 at 09:25:05AM -0700, Matt Raible wrote: > > cvs server: cannot exec /usr/local/cvsroot/CVSROOT/record_lastdir.rb: No > such > > file or directory > > If '/usr/local/cvsroot/CVSROOT/record_lastdir.rb' exists, check the > first line of the script and see if the ruby it specifies matches the > location ruby is installed in on your system. > > > dave > > _______________________________________________ > cvsspam-devel mailing list > cvsspam-devel@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dave at badgers-in-foil.co.uk Thu Sep 11 09:38:09 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 11 Sep 2003 09:38:09 +0000 Subject: [cvsspam-devel] record_lastdir.rb: No such file or directory In-Reply-To: <20030910184327.55472.qmail@web14304.mail.yahoo.com> References: <20030910163734.GA860@vhost.badgers-in-foil.co.uk> <20030910184327.55472.qmail@web14304.mail.yahoo.com> Message-ID: <20030911093809.GA14492@vhost.badgers-in-foil.co.uk> On Wed, Sep 10, 2003 at 11:43:26AM -0700, Matt Raible wrote: > That was it - ruby was in /usr/local/bin - so I created a symlink to /usr/bin. Great. > I'm getting e-mails now - man this is a sweet product. Nice job! Thanks! > I'm getting the following warnings - should I just ignore them? > > /usr/local/cvsroot/CVSROOT/cvsspam.rb:919: warning: global variable `$viewcvsURL' not initialized > /usr/local/cvsroot/CVSROOT/cvsspam.rb:922: warning: global variable `$choraURL' not initialized > /usr/local/cvsroot/CVSROOT/cvsspam.rb:924: warning: global variable `$cvswebURL' not initialized It's safe to ignore them, but I should fix this. Not sure why I've not seen the same messages, tbh. Thanks for pointing out the problem! dave From matt at raibledesigns.com Thu Sep 11 17:22:57 2003 From: matt at raibledesigns.com (Matt Raible) Date: Thu, 11 Sep 2003 11:22:57 -0600 Subject: [cvsspam-devel] Error in collect_diffs Message-ID: <004801c37888$bc360c90$6400a8c0@fatbastard> I'm having issues with my cvs spam install because CVSROOT is not an environment variable on my server. So I altered collect_diffs.rb to have: $cvsroot = ENV["CVSROOT"] || "/usr/bin/cvs" And then I reference $cvsroot wherever it's making a call to get the environment variable. Now I'm getting: Checking in log4j-1.2.8/cvsspam-test.txt; /repos/libs/log4j-1.2.8/cvsspam-test.txt,v <-- cvsspam-test.txt new revision: 1.5; previous revision: 1.4 done /usr/bin/ruby: invalid option - (-h will show valid options) Thanks, Matt Here's my full collect_diffs.rb file: #!/usr/bin/ruby -w # Part of CVSspam # http://www.badgers-in-foil.co.uk/projects/cvsspam/ # Copyright (c) David Holroyd # CVSROOT is /var/lib/cvs # ARGV is 'CVSROOT/foo/space dir space file,NONE,1.1 some,file,1.4,1.5' # ---- # Update of /var/lib/cvs/CVSROOT/foo/space dir # In directory foil:/tmp/cvs-serv13059 # # Modified Files: # some,file # Added Files: # space file # Log Message: # msg # # Assumptions # - file names do not contain newlines or single quotes $tmpdir = ENV["TMPDIR"] || "/tmp" $cvsroot = ENV["CVSROOT"] || "/usr/bin/cvs" $dirtemplate = "#cvsspam.#{Process.getpgrp}.#{Process.uid}" def find_data_dir Dir["#{$tmpdir}/#{$dirtemplate}-*"].each do |dir| stat = File.stat(dir) return dir if stat.owned? end nil end def blah(msg) if $debug puts "collect_diffs.rb: #{msg}" end end # Like IO.popen, but accepts multiple arguments like Kernel.exec # (So no need to escape shell metacharacters) def safer_popen(*args) IO.popen("-") do |pipe| if pipe==nil exec(*args) else yield pipe end end end class ChangeInfo def initialize(file, fromVer, toVer) @file, @fromVer, @toVer = file, fromVer, toVer if fromVer == toVer fail "'from' and 'to' versions should be different ('#{fromVer}')" end end attr_reader :file, :fromVer, :toVer def to_s "" end def isAddition ; fromVer == 'NONE' end def isRemoval ; toVer == 'NONE' end #def isModification ; !(isAddition || isRemoval) end end $commitinfo_tags = nil def get_commitinfo_tag(filename) if $commitinfo_tags.nil? return nil unless FileTest.exists?("#{$datadir}/commitinfo-tags") File.open("#{$datadir}/commitinfo-tags") do |file| $commitinfo_tags = Hash.new file.each_line do |line| line =~ /([^\t]+)\t(.+)/ key = $2 val = $1 key.sub!(/^$cvsroot\//, '') $commitinfo_tags[key] = val end end end return $commitinfo_tags[filename] end def process_log(cvs_info) cvsroot = $cvsroot $datadir = find_data_dir() raise "missing data dir (#{$tmpdir}/#{$dirtemplate}-XXXXXX)" if $datadir==nil line = $stdin.gets unless line =~ /^Update of (.+)/ fail "Log preamble looks suspect (doesn't start 'Update of ...')" end # cvs_info comes from the command line, ultimately as the expansion of the # %{sVv} in $CVSROOT/loginfo. It isn't possible to parse this value # unambiguously, but we make an effort to get it right in as many cases as # possible. $path = $1 unless $path.slice(0,cvsroot.length) == cvsroot fail "CVSROOT ('#{cvsroot}') doesn't match log preamble ('#{$path}')" end $repository_path = $path.slice(cvsroot.length+1, $path.length-cvsroot.length-1) unless cvs_info.slice(0, $repository_path.length+1) == "#{$repository_path} " fail "calculated repository path ('#{$repository_path}') doesn't match start of command line arg ('#{cvs_info}')" end version_info = cvs_info.slice($repository_path.length, cvs_info.length-$repository_path.length) changes = Array.new # make a list of changed files given on the command line while version_info.length>0 if version_info.sub!(/^ (.+?),(NONE|[.0-9]+),(NONE|[.0-9]+)/, '') == nil fail "'#{version_info}' doesn't match ' ,, ...'" end changes << ChangeInfo.new($1, $2, $3) end # look for the start of the user's comment $stdin.each do |line| break if line =~ /^Log Message/ end unless line =~ /^Log Message/ fail "Input did not contain a 'Log Message:' entry" end File.open("#{$datadir}/logfile", File::WRONLY|File::CREAT|File::APPEND) do |file| $stdin.each do |line| file.puts "#> #{line}" end changes.each do |change| # record version information file.puts "#V #{change.fromVer},#{change.toVer}" # note if the file is on a branch tag = nil if change.isRemoval tag = get_commitinfo_tag("#{$repository_path}/#{change.file}") else status = nil safer_popen($cvs_prog, "-nq", "status", change.file) do |io| status = io.read end fail "couldn't get cvs status: #{$!}" unless ($?>>8)==0 if status =~ /^\s*Sticky Tag:\s*(.+) \(branch: +/m tag = $1 end end file.puts "#T #{tag}" unless tag.nil? diff_cmd = Array.new << $cvs_prog << "-nq" << "diff" << "-Nu" diff_cmd << "-kk" if $diff_ignore_keywords if change.isAddition file.write "#A " # cruft up a date in the distant past, when the file would not have # existed, so that the diff will show all lines as added diff_cmd << "-D1/26/1977" << "-r#{change.toVer}" elsif change.isRemoval file.write "#R " # just specifying one version, cvs will diff between that version and # the current version (will show all lines removed) diff_cmd << "-r#{change.fromVer}" else file.write "#M " diff_cmd << "-r#{change.fromVer}" << "-r#{change.toVer}" end file.puts "#{$repository_path}/#{change.file}" diff_cmd << change.file # do a cvs diff and place the output into our temp file blah("about to run #{diff_cmd.join(' ')}") safer_popen(*diff_cmd) do |pipe| # skip over cvs-diff's preamble pipe.each do |line| break if line =~ /^diff / end file.puts "#U #{line}" pipe.each do |line| file.puts "#U #{line}" end end # TODO: don't how to do this reliably on different systems... #fail "cvsdiff did not give exit status 1 for invocation: #{diff_cmd.join(' ')}" unless ($?>>8)==1 end end end def choose_operation(op) if op =~ / - New directory$/ blah("No action taken on directory creation") elsif op =~ / - Imported sources$/ blah("Imported not handled") else process_log(op) mailtest end end def mailtest lastdir = nil File.open("#{$datadir}/lastdir") do |file| lastdir = file.gets end if $path == lastdir blah("sending spam. (I am #{$0})") # REVISIT: $0 will not contain the path to this script on all systems cmd = File.dirname($0) + "/cvsspam.rb" unless system(cmd, "#{$datadir}/logfile", *$passthoughArgs) fail "problem running '#{cmd}'" end if $debug blah("leaving file #{$datadir}/logfile") else File.unlink("#{$datadir}/logfile") end File.unlink("#{$datadir}/lastdir") File.unlink("#{$datadir}/commitinfo-tags") if FileTest.exists?("#{$datadir}/commitinfo-tags") Dir.rmdir($datadir) unless $debug else blah("not spam time yet, #{$path}!=#{lastdir}") end end $config = "$cvsroot/CVSROOT/cvsspam.conf" $cvs_prog = "cvs" $debug = false $diff_ignore_keywords = false $task_keywords = [] unless ENV.has_key?('CVSROOT') fail "$CVSROOT not defined. It should be when I am invoked from CVSROOT/loginfo" end require 'getoptlong' opts = GetoptLong.new( [ "--to", "-t", GetoptLong::REQUIRED_ARGUMENT ], [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ], [ "--debug", "-d", GetoptLong::NO_ARGUMENT ], [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ] ) # arguments to pass though to 'cvsspam.rb' $passthoughArgs = Array.new opts.each do |opt, arg| if ["--to", "--config", "--from"].include?(opt) $passthoughArgs << opt << arg end if ["--debug"].include?(opt) $passthoughArgs << opt end $config = arg if opt=="--config" $debug = true if opt == "--debug" end blah("CVSROOT is $cvsroot") blah("ARGV is '#{ARGV.join(', ')}'") if FileTest.exists?($config) def addHeader(name,val) end def addRecipient(who) end load $config else blah("Config file '#{$config}' not found, ignoring") end if ARGV.length != 1 $stderr.puts "Expected arguments missing" $stderr.puts "* You shouldn't run collect_diffs by hand, but from a CVSROOT/loginfo entry *" $stderr.puts "Usage: collect_diffs.rb [ --to ] [ --config ] %{sVv}" $stderr.puts " (the sequence '%{sVv}' is expanded by CVS, when found in CVSROOT/loginfo)" exit end choose_operation(ARGV[0]) From dave at badgers-in-foil.co.uk Thu Sep 11 17:36:04 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 11 Sep 2003 17:36:04 +0000 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <004801c37888$bc360c90$6400a8c0@fatbastard> References: <004801c37888$bc360c90$6400a8c0@fatbastard> Message-ID: <20030911173604.GA19151@vhost.badgers-in-foil.co.uk> On Thu, Sep 11, 2003 at 11:22:57AM -0600, Matt Raible wrote: > I'm having issues with my cvs spam install because CVSROOT is not an > environment variable on my server. So I altered collect_diffs.rb to > have: > > $cvsroot = ENV["CVSROOT"] || "/usr/bin/cvs" > > And then I reference $cvsroot wherever it's making a call to get the > environment variable. Now I'm getting: Oops, I'd assumed that cvs would always set $CVSROOT to the 'right' value, so that its children could pick it up. Maybe this in only the case when using cvs in pserver mode (which is what I've most experience with). Are you using a local repository in this case? > /usr/bin/ruby: invalid option - > (-h will show valid options) Looks suspiciously like the script has been converted to DOS format. (That would add a to the end of the line, which ruby would see as an extra character tagged onto the '-w' option, hence the odd-looking error message.) dave From matt at raibledesigns.com Thu Sep 11 17:59:14 2003 From: matt at raibledesigns.com (Matt Raible) Date: Thu, 11 Sep 2003 11:59:14 -0600 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <20030911173604.GA19151@vhost.badgers-in-foil.co.uk> Message-ID: <005801c3788e$6c9f6360$6400a8c0@fatbastard> Local repository: no, it's on a linux box in my office. It is a pserver. DOS: yes, I did copy the file to my XP box to edit the file and do a search/replace since it wasn't working in vi. Thinking that this might be a problem with the DOS format, I copied the collect_diffs.rb out of the original distro and added the line: ENV['CVSROOT'] = "/usr/bin/cvs" Now I'm getting: /repos/CVSROOT/collect_diffs.rb:101:in `process_log': missing data dir (/tmp/#cvsspam.2777.508-XXXXXX) (RuntimeError) from /repos/CVSROOT/collect_diffs.rb:216:in `choose_operation' from /repos/CVSROOT/collect_diffs.rb:300 Does the /tmp directory need to have write permissions for the cvs user? Thanks, Matt -----Original Message----- From: cvsspam-devel-admin@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-admin@lists.badgers-in-foil.co.uk] On Behalf Of David Holroyd Sent: Thursday, September 11, 2003 11:36 AM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Error in collect_diffs On Thu, Sep 11, 2003 at 11:22:57AM -0600, Matt Raible wrote: > I'm having issues with my cvs spam install because CVSROOT is not an > environment variable on my server. So I altered collect_diffs.rb to > have: > > $cvsroot = ENV["CVSROOT"] || "/usr/bin/cvs" > > And then I reference $cvsroot wherever it's making a call to get the > environment variable. Now I'm getting: Oops, I'd assumed that cvs would always set $CVSROOT to the 'right' value, so that its children could pick it up. Maybe this in only the case when using cvs in pserver mode (which is what I've most experience with). Are you using a local repository in this case? > /usr/bin/ruby: invalid option - > (-h will show valid options) Looks suspiciously like the script has been converted to DOS format. (That would add a to the end of the line, which ruby would see as an extra character tagged onto the '-w' option, hence the odd-looking error message.) dave _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From dave at badgers-in-foil.co.uk Thu Sep 11 18:45:39 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 11 Sep 2003 18:45:39 +0000 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <005801c3788e$6c9f6360$6400a8c0@fatbastard> References: <20030911173604.GA19151@vhost.badgers-in-foil.co.uk> <005801c3788e$6c9f6360$6400a8c0@fatbastard> Message-ID: <20030911184539.GB19151@vhost.badgers-in-foil.co.uk> On Thu, Sep 11, 2003 at 11:59:14AM -0600, Matt Raible wrote: > Thinking that this might be a problem with the DOS format, I copied the > collect_diffs.rb out of the original distro and added the line: > > ENV['CVSROOT'] = "/usr/bin/cvs" Ah, I missed that in your previous message; CVSROOT contains the location of the repository, not the CVS executable. Looking at the output below, I guess you need the value "/repos"? [In our pserver setup, nothing in the configuration of the server sets $CVSROOT, it's just available when the script needs it. Looking at the latest CVS source, there's (void) sprintf (env, "%s=%s", CVSROOT_ENV, current_parsed_root->directory); (void) putenv (env); in server.c, but maybe this isn't being used in the binaries you have. What version of CVS does the server run?] > Now I'm getting: > > /repos/CVSROOT/collect_diffs.rb:101:in `process_log': missing data dir > (/tmp/#cvsspam.2777.508-XXXXXX) (RuntimeError) > from /repos/CVSROOT/collect_diffs.rb:216:in `choose_operation' > from /repos/CVSROOT/collect_diffs.rb:300 > > Does the /tmp directory need to have write permissions for the cvs user? Yes, the tmp dir needs to be writable by the owner of the cvs pserver process. Check that record_lastdir.rb is set up ok, as this is the script that actually creates the directory for each commit. dave From matt at raibledesigns.com Thu Sep 11 20:34:24 2003 From: matt at raibledesigns.com (Matt Raible) Date: Thu, 11 Sep 2003 14:34:24 -0600 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <20030911184539.GB19151@vhost.badgers-in-foil.co.uk> Message-ID: <009701c378a4$1729c950$6400a8c0@fatbastard> I think this was all caused by having settings for a project in loginfo and then not having that same project configured in commitinfo. But now I can't get back to where it was working yesterday. I'm getting the following errors: /repos/CVSROOT/cvsspam.rb:916: warning: global variable `$viewcvsURL' not initialized /repos/CVSROOT/cvsspam.rb:919: warning: global variable `$choraURL' not initialized /repos/CVSROOT/cvsspam.rb:921: warning: global variable `$cvswebURL' not initialized Which should be fixed by hardcoding this line in cvsspam.rb: $config = "/repos/cvsspam.conf" And putting cvsspam.conf here and then configuring: $cvs_prog = "/usr/bin/cvs" But no dice, I'm still getting the above error messages. Should I un-comment these variables to eliminate this message? Sorry for all the trouble. Matt -----Original Message----- From: cvsspam-devel-admin@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-admin@lists.badgers-in-foil.co.uk] On Behalf Of David Holroyd Sent: Thursday, September 11, 2003 12:46 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Error in collect_diffs On Thu, Sep 11, 2003 at 11:59:14AM -0600, Matt Raible wrote: > Thinking that this might be a problem with the DOS format, I copied > the collect_diffs.rb out of the original distro and added the line: > > ENV['CVSROOT'] = "/usr/bin/cvs" Ah, I missed that in your previous message; CVSROOT contains the location of the repository, not the CVS executable. Looking at the output below, I guess you need the value "/repos"? [In our pserver setup, nothing in the configuration of the server sets $CVSROOT, it's just available when the script needs it. Looking at the latest CVS source, there's (void) sprintf (env, "%s=%s", CVSROOT_ENV, current_parsed_root->directory); (void) putenv (env); in server.c, but maybe this isn't being used in the binaries you have. What version of CVS does the server run?] > Now I'm getting: > > /repos/CVSROOT/collect_diffs.rb:101:in `process_log': missing data dir > (/tmp/#cvsspam.2777.508-XXXXXX) (RuntimeError) > from /repos/CVSROOT/collect_diffs.rb:216:in `choose_operation' > from /repos/CVSROOT/collect_diffs.rb:300 > > Does the /tmp directory need to have write permissions for the cvs > user? Yes, the tmp dir needs to be writable by the owner of the cvs pserver process. Check that record_lastdir.rb is set up ok, as this is the script that actually creates the directory for each commit. dave _______________________________________________ cvsspam-devel mailing list cvsspam-devel@lists.badgers-in-foil.co.uk http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel From dave at badgers-in-foil.co.uk Thu Sep 11 20:53:14 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 11 Sep 2003 20:53:14 +0000 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <009701c378a4$1729c950$6400a8c0@fatbastard> References: <20030911184539.GB19151@vhost.badgers-in-foil.co.uk> <009701c378a4$1729c950$6400a8c0@fatbastard> Message-ID: <20030911205314.GA23708@vhost.badgers-in-foil.co.uk> --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 11, 2003 at 02:34:24PM -0600, Matt Raible wrote: > I'm getting the following errors: > > /repos/CVSROOT/cvsspam.rb:916: warning: global variable `$viewcvsURL' > not initialized > /repos/CVSROOT/cvsspam.rb:919: warning: global variable `$choraURL' not > initialized > /repos/CVSROOT/cvsspam.rb:921: warning: global variable `$cvswebURL' not > initialized I think maybe older versions of Ruby (that I've been using) are happy to treat undefined variables as nil-valued. Try the attached patch, which explicitly initializes the problem variables. > $config = "/repos/cvsspam.conf" If you place your config at "/repos/CVSROOT/cvsspam.conf", it should be picked up automatically. > Sorry for all the trouble. No trouble! dave --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fix_global_var_not_initialized-patch.diff" Index: cvsspam.rb =================================================================== RCS file: /var/lib/cvs/cvsspam/cvsspam.rb,v retrieving revision 1.37 diff -u -r1.37 cvsspam.rb --- cvsspam.rb 7 Sep 2003 18:10:50 -0000 1.37 +++ cvsspam.rb 11 Sep 2003 20:41:50 -0000 @@ -878,6 +878,9 @@ $bugzillaURL = nil $jiraURL = nil $ticketURL = nil +$viewcvsURL = nil +$choraURL = nil +$cvswebURL = nil $from_address = nil $subjectPrefix = nil $files_in_subject = false; --C7zPtVaVf+AK4Oqc-- From matt at raibledesigns.com Thu Sep 11 21:04:03 2003 From: matt at raibledesigns.com (Matt Raible) Date: Thu, 11 Sep 2003 15:04:03 -0600 Subject: [cvsspam-devel] Error in collect_diffs In-Reply-To: <20030911205314.GA23708@vhost.badgers-in-foil.co.uk> Message-ID: <00a601c378a8$3ff07d30$6400a8c0@fatbastard> This worked - thanks! I'm using the latest version of Ruby, so that explains the problem. Matt -----Original Message----- From: cvsspam-devel-admin@lists.badgers-in-foil.co.uk [mailto:cvsspam-devel-admin@lists.badgers-in-foil.co.uk] On Behalf Of David Holroyd Sent: Thursday, September 11, 2003 2:53 PM To: cvsspam-devel@lists.badgers-in-foil.co.uk Subject: Re: [cvsspam-devel] Error in collect_diffs On Thu, Sep 11, 2003 at 02:34:24PM -0600, Matt Raible wrote: > I'm getting the following errors: > > /repos/CVSROOT/cvsspam.rb:916: warning: global variable `$viewcvsURL' > not initialized > /repos/CVSROOT/cvsspam.rb:919: warning: global variable `$choraURL' > not initialized > /repos/CVSROOT/cvsspam.rb:921: warning: global variable `$cvswebURL' > not initialized I think maybe older versions of Ruby (that I've been using) are happy to treat undefined variables as nil-valued. Try the attached patch, which explicitly initializes the problem variables. > $config = "/repos/cvsspam.conf" If you place your config at "/repos/CVSROOT/cvsspam.conf", it should be picked up automatically. > Sorry for all the trouble. No trouble! dave From dave at badgers-in-foil.co.uk Mon Sep 22 22:01:36 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Mon, 22 Sep 2003 22:01:36 +0000 Subject: [cvsspam-devel] [ANN] CVSspam 0.2.8 Message-ID: <20030922220135.GA12273@vhost.badgers-in-foil.co.uk> The latest version is now available at, http://www.badgers-in-foil.co.uk/projects/cvsspam/ Mail can now be sent using Net::SNMP, for people with no MTA on their CVS server. ViewCVS support has been extended to handle confugurations using multiple repositories. The documentation was reoganised a bit, and some undocumented features were noted. A few 'uninitialized variable' warnings have been fixed. Long ChangeLog: 2003-09-22 22:18 dave * cvsspam.rb: When I changed the header name, I forgot to put 'CVSspam' into the value 2003-09-21 13:47 dave * cvsspam.rb: Fix for the name of the ViewCVS parameter, from Dmitry. 2003-09-11 22:29 dave * CREDITS: Matt pointed out some uninitialised variables were causing problems in the latest Ruby (that being 1.8.0). 2003-09-11 22:15 dave * cvsspam.rb: Explicitly initialise variables to prevent warning messages 2003-09-07 19:10 dave * cvsspam.rb: "X-Mailer" is a more 'standard' non-standard header. 2003-09-07 19:09 dave * cvsspam.rb: Bump version number in preparation for a new release. 2003-09-07 19:08 dave * cvsspam-doc.xml: Re-orded sections in the documentation to follow what I think users will want. Noted that '/etc/cvsspam/cvsspam.conf' will be used if available. 2003-09-07 19:05 dave * collect_diffs.rb: Look for cvsspam.conf under /etc/cvsspam/ as well as in $CVSROOT/CVSROOT/. The derived filename is passed to cvsspam.rb, to save it duplicating this logic. 2003-09-07 15:31 dave * CREDITS, collect_diffs.rb, cvsspam-doc.xml, cvsspam.rb: Support for multiple repositories with ViewCVS, suggested by Dmitry V. abanin 2003-09-06 23:53 dave * collect_diffs.rb: Debug should go to stderr, not stdout 2003-09-06 23:25 dave * cvsspam-doc.xml: Caution users against breaking their remote repositories. 2003-09-06 22:27 dave * cvsspam-doc.xml: Make this an SGML, rather than an XML document. The docbook toolchain I have installed (Debian unstable) seems to be broken for XML documents. 2003-09-01 00:41 dave * cvsspam-doc.xml: Cleanup, and document the '--from' option 2003-07-26 16:09 dave * cvsspam.conf, cvsspam.rb: Support for SMTP, instead of $sendmail 2003-07-15 23:33 dave * cvsspam.rb: Start factoring out HTML generating code from the rest of the file From daniel.pfuhl at imk.fraunhofer.de Tue Sep 23 13:10:02 2003 From: daniel.pfuhl at imk.fraunhofer.de (Daniel Pfuhl) Date: Tue, 23 Sep 2003 15:10:02 +0200 Subject: [cvsspam-devel] missing data dir Message-ID: <3F70462A.2050304@imk.fraunhofer.de> hi after installing and configuring cvsspam like described in the docs i got the following error message after committing a change to a file. does anyone has an idea about how to avoid this ? --------- cvs -z5 commit -m "no message" collect_diffs.rb loginfo (in directory C:\data\cvs\CAT1\CVSROOT\) Checking in collect_diffs.rb; /var/cvs/daniel/CVSROOT/collect_diffs.rb,v <-- collect_diffs.rb new revision: 1.3; previous revision: 1.2 done Checking in loginfo; /var/cvs/daniel/CVSROOT/loginfo,v <-- loginfo new revision: 1.4; previous revision: 1.3 done /var/cvs/daniel/CVSROOT/collect_diffs.rb:100:in `process_log': missing data dir (/tmp/#cvsspam.24380.527-XXXXXX) (RuntimeError) from /var/cvs/daniel/CVSROOT/collect_diffs.rb:215:in `choose_operation' from /var/cvs/daniel/CVSROOT/collect_diffs.rb:314 cvs server: Rebuilding administrative file database ***** CVS exited normally with code 0 ***** ---------------- thanks in advance !! -- daniel From dave at badgers-in-foil.co.uk Tue Sep 23 13:39:12 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 23 Sep 2003 13:39:12 +0000 Subject: [cvsspam-devel] missing data dir In-Reply-To: <3F70462A.2050304@imk.fraunhofer.de> References: <3F70462A.2050304@imk.fraunhofer.de> Message-ID: <20030923133912.GA25055@vhost.badgers-in-foil.co.uk> Hello, On Tue, Sep 23, 2003 at 03:10:02PM +0200, Daniel Pfuhl wrote: > cvs -z5 commit -m "no message" collect_diffs.rb loginfo (in directory > C:\data\cvs\CAT1\CVSROOT\) > Checking in collect_diffs.rb; > /var/cvs/daniel/CVSROOT/collect_diffs.rb,v <-- collect_diffs.rb > new revision: 1.3; previous revision: 1.2 > done > Checking in loginfo; > /var/cvs/daniel/CVSROOT/loginfo,v <-- loginfo > new revision: 1.4; previous revision: 1.3 > done > /var/cvs/daniel/CVSROOT/collect_diffs.rb:100:in `process_log': missing > data dir (/tmp/#cvsspam.24380.527-XXXXXX) (RuntimeError) > from /var/cvs/daniel/CVSROOT/collect_diffs.rb:215:in > `choose_operation' > from /var/cvs/daniel/CVSROOT/collect_diffs.rb:314 > cvs server: Rebuilding administrative file database Have you got the 'record_lastdir.rb' script configured properly in 'CVSROOT/commitinfo'? (This is the script that creates the temporary dir.) If you do have an entry for 'record_lastdir.rb', ensure that the expression on left matches the one you specified for the module in 'loginfo'. dave From dave at badgers-in-foil.co.uk Tue Sep 23 14:18:35 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 23 Sep 2003 14:18:35 +0000 Subject: [cvsspam-devel] missing data dir In-Reply-To: <3F705425.5030501@imk.fraunhofer.de> References: <3F70462A.2050304@imk.fraunhofer.de> <20030923133912.GA25055@vhost.badgers-in-foil.co.uk> <3F705425.5030501@imk.fraunhofer.de> Message-ID: <20030923141835.GB25055@vhost.badgers-in-foil.co.uk> On Tue, Sep 23, 2003 at 04:09:41PM +0200, Daniel Pfuhl wrote: > hi dave, > > how do i configure all the scripts in the right way ? > at this time i had only the collect_diffs.rb configured > as follows: > > ALL /var/cvs/daniel/CVSROOT/collect_diffs.rb --to > daniel.pfuhl@imk.fraunhofer.de %{sVv} > > do i have to add the same for all the thre scripts ? > > btw: i have configured this in loginfo - this shouldn't > be a problem, is it ? You have to do all the configuration before commiting. Given your example values, I'd suggest you use something like this: == in commitinfo == ALL /var/cvs/daniel/CVSROOT/record_lastdir.rb == in loginfo == ALL /var/cvs/daniel/CVSROOT/collect_diffs.rb --to daniel.pfuhl@imk.fraunhofer.de %{sVv} You also need to add all three of the scripts to CVSROOT and then commit everything once all is in place. [Note that if you have no other way of accessing /var/cvs/daniel/ on the server than by using CVS itself, using the 'ALL' match is dangerous, because if there is a problem with the script, you will no longer ba able to commit to teh repository.] Hope that helps! dave From richard.bos at xs4all.nl Tue Sep 23 19:25:50 2003 From: richard.bos at xs4all.nl (Richard Bos) Date: Tue, 23 Sep 2003 21:25:50 +0200 Subject: [cvsspam-devel] missing data dir Message-ID: <200309232125.50064.radoeka@xs4all.nl> Hello, I get the same error. Some information about my setup: I have several lines in commit- and loginfo, both ending in ALL. cvsspam works fine for commits that are being performed via ALL. For the other entries the commit fails (is it possible that the regular expression fails in collect_diffs.rb?). My commitinfo: sqr /home/cvs/bin/record_lastdir.rb sucont /home/cvs/bin/record_lastdir.rb suverif /home/cvs/bin/record_lastdir.rb ALL /home/cvs/bin/record_lastdir.rb My loginfo file: sqr /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ron@blah.net %{sVv} sucont /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ruin@blah.net %{sVv} suverif /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ron@blah.net --to heid@blah.net %{sVv} ALL /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to bos@blah.net %{sVv} The modules directory looks as follows: web/sqr tools/sucont tools/suverif The regular expression I used does not start at CVSROOT. Is that required? The *info entries are tab seperated. Did I make a configure mistake or is something else wrong? >On Tue, Sep 23, 2003 at 04:09:41PM +0200, Daniel Pfuhl wrote: >> hi dave, >> >> how do i configure all the scripts in the right way ? >> at this time i had only the collect_diffs.rb configured >> as follows: >> >> ALL /var/cvs/daniel/CVSROOT/collect_diffs.rb --to >> daniel.pfuhl@imk.fraunhofer.de %{sVv} >> >> do i have to add the same for all the thre scripts ? >> >> btw: i have configured this in loginfo - this shouldn't >> be a problem, is it ? > >You have to do all the configuration before commiting. Given your >example values, I'd suggest you use something like this: > > >== in commitinfo == > >ALL /var/cvs/daniel/CVSROOT/record_lastdir.rb > > > >== in loginfo == > >ALL /var/cvs/daniel/CVSROOT/collect_diffs.rb --to daniel.pfuhl@imk.fraunhofer.de %{sVv} > > >You also need to add all three of the scripts to CVSROOT and then commit >everything once all is in place. > > >[Note that if you have no other way of accessing /var/cvs/daniel/ on the >server than by using CVS itself, using the 'ALL' match is dangerous, >because if there is a problem with the script, you will no longer ba >able to commit to teh repository.] -- Richard Bos Without a home the journey is endless From dave at badgers-in-foil.co.uk Wed Sep 24 10:00:21 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 24 Sep 2003 10:00:21 +0000 Subject: [cvsspam-devel] missing data dir In-Reply-To: <200309232125.50064.radoeka@xs4all.nl> References: <200309232125.50064.radoeka@xs4all.nl> Message-ID: <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> Hi, On Tue, Sep 23, 2003 at 09:25:50PM +0200, Richard Bos wrote: > I have several lines in commit- and loginfo, both ending in ALL. > cvsspam works fine for commits that are being performed via ALL. > For the other entries the commit fails (is it possible that the regular > expression fails in collect_diffs.rb?). > > My commitinfo: > sqr /home/cvs/bin/record_lastdir.rb > sucont /home/cvs/bin/record_lastdir.rb > suverif /home/cvs/bin/record_lastdir.rb > > ALL /home/cvs/bin/record_lastdir.rb > > > My loginfo file: > sqr /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ron@blah.net %{sVv} > > sucont /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ruin@blah.net %{sVv} > > suverif /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to ron@blah.net --to heid@blah.net %{sVv} > > ALL /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to bos@blah.net %{sVv} I the problem may be that you're using 'ALL', but you need to use 'DEFAULT'. I think that if you specify hooks for the 'ALL' match, these will be run *in addition* to any other scripts specified. Does email get sent, even when you see the error message? If that's not the issue, try changing the commitinfo entries so that they just run 'echo Hello World', and see if that appears on your console when you do a commit. (I'd expect record_lastdir.rb to give you an error if it couldn't create the data-dir in the first place, so maybe it isn't even getting executed?) > The modules directory looks as follows: > web/sqr > tools/sucont > tools/suverif > > The regular expression I used does not start at CVSROOT. Is that required? > The *info entries are tab seperated. CVS doesn't require it, but in my experience the most restrictive possible expression should be used. Consider that this text may appear as a substring of a file's path in some other module: If you create a file called 'sucont.txt' in 'tools/suverif', you might get unexpected results. I'd use expressions like this in the config files, ^web/sqr ^tools/sucont ^tools/suverif (However, I don't think CVSspam will mind the setup you've already got.) > Did I make a configure mistake or is something else wrong? Well, let us know if changing ALL to DEFAULT helps. dave From dave at badgers-in-foil.co.uk Wed Sep 24 10:07:19 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 24 Sep 2003 10:07:19 +0000 Subject: [cvsspam-devel] missing data dir In-Reply-To: <200309232125.50064.radoeka@xs4all.nl> References: <200309232125.50064.radoeka@xs4all.nl> Message-ID: <20030924100718.GB8894@vhost.badgers-in-foil.co.uk> On Tue, Sep 23, 2003 at 09:25:50PM +0200, Richard Bos wrote: > For the other entries the commit fails (is it possible that the regular > expression fails in collect_diffs.rb?). Oh, I forgot to say; could you post the text of the error message too? thanks, dave From richard.bos at xs4all.nl Wed Sep 24 20:51:16 2003 From: richard.bos at xs4all.nl (Richard Bos) Date: Wed, 24 Sep 2003 22:51:16 +0200 Subject: [cvsspam-devel] missing data dir In-Reply-To: <20030924100718.GB8894@vhost.badgers-in-foil.co.uk> References: <200309232125.50064.radoeka@xs4all.nl> <20030924100718.GB8894@vhost.badgers-in-foil.co.uk> Message-ID: <200309242251.16298.radoeka@xs4all.nl> Op woensdag 24 september 2003 12:07, schreef David Holroyd: > On Tue, Sep 23, 2003 at 09:25:50PM +0200, Richard Bos wrote: > > For the other entries the commit fails (is it possible that the regular > > expression fails in collect_diffs.rb?). > > Oh, I forgot to say; could you post the text of the error message too? Ah, that is the easy part: /home/cvs/CVS/tools/suverif/tessum,v <-- tessum new revision: 1.6; previous revision: 1.5 done /home/cvs/bin/collect_diffs.rb:100:in `process_log': missing data dir (/tmp/#cvsspam.4129.503-XXXXXX) (RuntimeError) from /home/cvs/bin/collect_diffs.rb:215:in `choose_operation' from /home/cvs/bin/collect_diffs.rb:314 -- Richard Bos Without a home the journey is endless From richard.bos at xs4all.nl Wed Sep 24 21:21:38 2003 From: richard.bos at xs4all.nl (Richard Bos) Date: Wed, 24 Sep 2003 23:21:38 +0200 Subject: [cvsspam-devel] missing data dir In-Reply-To: <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> References: <200309232125.50064.radoeka@xs4all.nl> <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> Message-ID: <200309242321.38911.radoeka@xs4all.nl> Hello David, Op woensdag 24 september 2003 12:00, schreef David Holroyd: > Hi, > > On Tue, Sep 23, 2003 at 09:25:50PM +0200, Richard Bos wrote: > > I have several lines in commit- and loginfo, both ending in ALL. > > cvsspam works fine for commits that are being performed via ALL. > > For the other entries the commit fails (is it possible that the regular > > expression fails in collect_diffs.rb?). > > > > My commitinfo: > > sqr /home/cvs/bin/record_lastdir.rb > > sucont /home/cvs/bin/record_lastdir.rb > > suverif /home/cvs/bin/record_lastdir.rb > > > > ALL /home/cvs/bin/record_lastdir.rb > > > > > > My loginfo file: > > sqr /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to > > ron@blah.net %{sVv} > > > > sucont /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to > > ruin@blah.net %{sVv} > > > > suverif /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to > > ron@blah.net --to heid@blah.net %{sVv} > > > > ALL /home/cvs/bin/collect_diffs.rb --from $USER@blah.net --to > > bos@blah.net %{sVv} > > I the problem may be that you're using 'ALL', but you need to use > 'DEFAULT'. I think that if you specify hooks for the 'ALL' match, these > will be run *in addition* to any other scripts specified. I really want it like this... In this case I don't need to list myself in every line. That is what I should do in case I would use DEFAULT isn't it? > Does email get sent, even when you see the error message? Yes and no. Email is sent via the ALL line, but not via the regular expressions. The commit succeeds successfully as well. > If that's not the issue, try changing the commitinfo entries so that > they just run 'echo Hello World', and see if that appears on your > console when you do a commit. (I'd expect record_lastdir.rb to give you > an error if it couldn't create the data-dir in the first place, so maybe > it isn't even getting executed?) > > > The modules directory looks as follows: > > web/sqr > > tools/sucont > > tools/suverif > > > > The regular expression I used does not start at CVSROOT. Is that > > required? The *info entries are tab seperated. > > CVS doesn't require it, but in my experience the most restrictive > possible expression should be used. Consider that this text may appear > as a substring of a file's path in some other module: If you create > a file called 'sucont.txt' in 'tools/suverif', you might get unexpected > results. > > > I'd use expressions like this in the config files, > > ^web/sqr > ^tools/sucont > ^tools/suverif > > (However, I don't think CVSspam will mind the setup you've already got.) I will try this out. > > Did I make a configure mistake or is something else wrong? > > Well, let us know if changing ALL to DEFAULT helps. See my comment above. Should I really need to change to DEFAULT, it should be really necessary as cvs allows it..... -- Richard Bos Without a home the journey is endless From dave at badgers-in-foil.co.uk Wed Sep 24 22:06:17 2003 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 24 Sep 2003 22:06:17 +0000 Subject: [cvsspam-devel] missing data dir In-Reply-To: <200309242321.38911.radoeka@xs4all.nl> References: <200309232125.50064.radoeka@xs4all.nl> <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> <200309242321.38911.radoeka@xs4all.nl> Message-ID: <20030924220617.GA18583@vhost.badgers-in-foil.co.uk> On Wed, Sep 24, 2003 at 11:21:38PM +0200, Richard Bos wrote: > > I the problem may be that you're using 'ALL', but you need to use > > 'DEFAULT'. I think that if you specify hooks for the 'ALL' match, these > > will be run *in addition* to any other scripts specified. > > I really want it like this... In this case I don't need to list myself in > every line. That is what I should do in case I would use DEFAULT isn't it? > > > Does email get sent, even when you see the error message? > > Yes and no. Email is sent via the ALL line, but not via the regular > expressions. The commit succeeds successfully as well. Ah, I see now. Well, this presents some implementation difficulties: The first script (run from commitinfo) creates some files, and the second script (run from loginfo) removes them when we're done. Since the scripts are listed twice, the 'second' invocation of collect_diffs.rb will happen after this cleanup has happened, hence the error. We could implement an extra commandline switch to say "don't delete the data files just yet". That's not so elegant, but then having to hook into both commitinfo and loginfo is a (necessary) hack, in any case. If you simply want the convenience of not having to specify your own address for everything (and aren't bothered exactly how it's implemented) try the addRecipient[1] option in your cvsspam.conf. What do you think? dave [1] http://www.badgers-in-foil.co.uk/projects/cvsspam/cvsspam-doc.html#AEN107 From richard.bos at xs4all.nl Wed Sep 24 22:08:34 2003 From: richard.bos at xs4all.nl (Richard Bos) Date: Thu, 25 Sep 2003 00:08:34 +0200 Subject: [cvsspam-devel] missing data dir In-Reply-To: <20030924220617.GA18583@vhost.badgers-in-foil.co.uk> References: <200309232125.50064.radoeka@xs4all.nl> <200309242321.38911.radoeka@xs4all.nl> <20030924220617.GA18583@vhost.badgers-in-foil.co.uk> Message-ID: <200309250008.34816.radoeka@xs4all.nl> Op donderdag 25 september 2003 00:06, schreef David Holroyd: > On Wed, Sep 24, 2003 at 11:21:38PM +0200, Richard Bos wrote: > > > I the problem may be that you're using 'ALL', but you need to use > > > 'DEFAULT'. I think that if you specify hooks for the 'ALL' match, > > > these will be run *in addition* to any other scripts specified. > > > > I really want it like this... In this case I don't need to list myself > > in every line. That is what I should do in case I would use DEFAULT > > isn't it? > > > > > Does email get sent, even when you see the error message? > > > > Yes and no. Email is sent via the ALL line, but not via the regular > > expressions. The commit succeeds successfully as well. > > Ah, I see now. > > Well, this presents some implementation difficulties: The > first script (run from commitinfo) creates some files, and the second > script (run from loginfo) removes them when we're done. Since > the scripts are listed twice, the 'second' invocation of collect_diffs.rb > will happen after this cleanup has happened, hence the error. > > We could implement an extra commandline switch to say "don't delete > the data files just yet". That's not so elegant, but then having to > hook into both commitinfo and loginfo is a (necessary) hack, in any case. > > If you simply want the convenience of not having to specify your own > address for everything (and aren't bothered exactly how it's > implemented) try the addRecipient[1] option in your cvsspam.conf. If possible try to prevent the error or get an info message stating what might be the error (ALL in this case). I'll see if I can implement the DEFAULT configuration and adding myself to the other lines in commit and loginfo. -- Richard Bos Without a home the journey is endless From richard.bos at xs4all.nl Thu Sep 25 20:20:46 2003 From: richard.bos at xs4all.nl (Richard Bos) Date: Thu, 25 Sep 2003 22:20:46 +0200 Subject: [cvsspam-devel] missing data dir In-Reply-To: <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> References: <200309232125.50064.radoeka@xs4all.nl> <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> Message-ID: <200309252220.47005.radoeka@xs4all.nl> Op woensdag 24 september 2003 12:00, schreef David Holroyd: > I'd use expressions like this in the config files, > > ^web/sqr > ^tools/sucont > ^tools/suverif > > (However, I don't think CVSspam will mind the setup you've already got.) I changed to the schema above and it still works (of course :) > > Did I make a configure mistake or is something else wrong? > > Well, let us know if changing ALL to DEFAULT helps. Yes, no error messages, the right recipients are addressed and the change seems to be committed. 1 more question, why is in the underneath example the "file#1" string not a url to the file it self? It now seems to point to nowhere. Commit in *5ess/updodd* on MAIN ToDo <#file1> +1 1.2 References: <200309232125.50064.radoeka@xs4all.nl> <20030924100021.GA8894@vhost.badgers-in-foil.co.uk> <200309252220.47005.radoeka@xs4all.nl> Message-ID: <20030926133153.GA18305@vhost.badgers-in-foil.co.uk> On Thu, Sep 25, 2003 at 10:20:46PM +0200, Richard Bos wrote: > 1 more question, why is in the underneath example the "file#1" string not a > url to the file it self? It now seems to point to nowhere. > > Commit in *5ess/updodd* on MAIN > ToDo <#file1> +1 1.2 > References: <200309232125.50064.radoeka@xs4all.nl> <200309252220.47005.radoeka@xs4all.nl> <20030926133153.GA18305@vhost.badgers-in-foil.co.uk> Message-ID: <200309262125.45498.radoeka@xs4all.nl> Op vrijdag 26 september 2003 15:31, schreef David Holroyd: > On Thu, Sep 25, 2003 at 10:20:46PM +0200, Richard Bos wrote: > > 1 more question, why is in the underneath example the "file#1" string not > > a url to the file it self? It now seems to point to nowhere. > > > > Commit in *5ess/updodd* on MAIN > > ToDo <#file1> +1 1.2 > > > The filenames in the top-of-message index are internal links to the point > in the email where that file's diff is. Internal links work in some mail > clients, but not in others. I've seen it in action now, it's nice :) -- Richard Bos Without a home the journey is endless