You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by ms...@apache.org on 2004/09/15 11:25:40 UTC

svn commit: rev 46098 - in spamassassin/trunk: . build

Author: mss
Date: Wed Sep 15 02:25:39 2004
New Revision: 46098

Added:
   spamassassin/trunk/build/sysreport
Modified:
   spamassassin/trunk/Makefile.PL
Log:
Some code I had lying around since ages, maybe it will become useful one day.  For now I dump it here to clean up my harddisk a bit ;~)


Modified: spamassassin/trunk/Makefile.PL
==============================================================================
--- spamassassin/trunk/Makefile.PL	(original)
+++ spamassassin/trunk/Makefile.PL	Wed Sep 15 02:25:39 2004
@@ -1151,6 +1151,10 @@
 	$(PERL) -e 'print "DIST_VERSION=$(VERSION_COOL)\n"' >> $@
 	$(PERL) -e 'print "CPAN_VERSION=$(VERSION)\n"' >> $@
 
+
+sysreport:
+	$(NOECHO) $(PERL) build/sysreport CC=$(CC) PERL=$(PERL) PERL_BIN=$(PERL_BIN) PERL_VERSION=$(PERL_VERSION)
+
   EOD
 
   clean_MY_globals($self);

Added: spamassassin/trunk/build/sysreport
==============================================================================
--- (empty file)
+++ spamassassin/trunk/build/sysreport	Wed Sep 15 02:25:39 2004
@@ -0,0 +1,107 @@
+#!/usr/bin/perl -w
+
+use strict;
+no strict 'refs';
+
+
+my %vars = ();
+
+foreach (@ARGV) {
+  my ($n, $v) = split('=', $_);
+  $vars{$n} = $v;
+}
+
+my @checks = qw(
+  PERL CC AUTOMAKE AUTOCONF LIBTOOL
+);
+
+foreach my $check (@checks) {
+  my @check = &{"check_$check"};
+  $check  = sprintf("% 10s %s %s", $check, shift(@check), shift(@check));
+  $check .= sprintf(" (%s)", join('; ', @check)) if @check;
+  $check .= "\n";
+  print $check;
+}
+
+
+sub check_PERL {
+  my @meta;
+
+  my $pl = $vars{'PERL_BIN'} || '';
+  $pl = '' if $pl eq 'this';
+  $pl ||= $vars{'PERL'} || "perl";
+  $pl = (split(/\s+/, $pl))[0];
+
+  my @plver = split(/\s+/, `$pl --version 2>&1` || '');
+  my $plver;
+  if($plver[4] ne 'version') {
+    $plver = $plver[4];
+    $plver =~ s/^v//;
+  } else {
+    $plver = sprintf("%i.%i.%i", split(/[._]/, $plver[5]), 0);
+  }
+
+  push(@meta, 'override') if $pl ne $vars{'PERL'};
+  return($pl, $plver, @meta);
+}
+
+sub check_CC {
+  my @meta;
+  my $cc = $vars{'CC'} || "cc";
+
+  my $ccver = (`$cc --version 2>&1`)[0] || 0;
+  chomp($ccver);
+  my $gnucc = grep("gnu", `$cc --help 2>&1` || '');
+
+  push(@meta, 'gnu') if $gnucc;
+  return($cc, $ccver, @meta);
+}
+
+sub check_LIBC {
+  my @meta;
+  my $lc = grep(/libc/, (`ldd /bin/sh 2>&1`));
+  $lc = (split(/\s+/, $lc))[3];
+
+  return($lc, 0, @meta);
+}
+
+sub check_LDD {
+  my @meta;
+  
+}
+
+sub check_AUTOMAKE {
+  my @meta;
+  my $am = $vars{'AUTOMAKE'} || "automake";
+
+  my @amver = split(/\s+/, `$am --version 2>&1` || '');
+  my $gnuam = $amver[1] =~ /GNU/i;
+  my $amver = $gnuam ? $amver[3] : 0;
+
+  push(@meta, 'gnu') if $gnuam;
+  return($am, $amver, @meta);
+}
+
+sub check_AUTOCONF {
+  my @meta;
+  my $ac = $vars{'AUTOCONF'} || "autoconf";
+
+  my @acver = split(/\s+/, `$ac --version 2>&1` || '');
+  my $gnuac = $acver[1] =~ /GNU/i;
+  my $acver = $gnuac ? $acver[3] : 0;
+
+  push(@meta, 'gnu') if $gnuac;
+  return($ac, $acver, @meta);
+}
+
+sub check_LIBTOOL {
+  my @meta;
+  my $lt = $vars{'LIBTOOL'} || "libtool";
+
+  my @ltver = split(/\s+/, `$lt --version 2>&1` || '');
+  my $gnult = $ltver[1] =~ /GNU/i;
+  my $ltver = $gnult ? $ltver[3] : 0;
+
+  push(@meta, 'gnu') if $gnult;
+  return($lt, $ltver, @meta);
+}

Re: svn commit: rev 46098 - in spamassassin/trunk: . build

Posted by Michael Parker <pa...@pobox.com>.
On Wed, Sep 15, 2004 at 03:31:26PM +0200, Malte S. Stretz wrote:
> 
> You're right.  Our log messages are often not very descriptive, we should 
> really take the time to write one or two sentences about a commit.
> 

It's too long to reproduce here, but I really like what the Subversion
folks have come up with, see section "Writing log messages:
http://svn.collab.net/repos/svn/trunk/HACKING

> > FYI: You can use svadmin to update the log message.
> 
> I think svnadmin works only if you have direct access to the repository.  I 
> used the command 'svn propset svn:log --revprop -r 46098 -F /dev/stdin' to 
> fix it.
> 

Yeah, that's what I meant :)

Michael

Re: svn commit: rev 46098 - in spamassassin/trunk: . build

Posted by "Malte S. Stretz" <ms...@gmx.net>.
On Wednesday 15 September 2004 14:30 CET Michael Parker wrote:
> > Log:
> > Some code I had lying around since ages, maybe it will become useful
> > one day.  For now I dump it here to clean up my harddisk a bit ;~)
>
> Just a pet peeve.  That's not really a "Log" message.  It should be
> much more descriptive as to the code you are committing.

You're right.  Our log messages are often not very descriptive, we should 
really take the time to write one or two sentences about a commit.

> FYI: You can use svadmin to update the log message.

I think svnadmin works only if you have direct access to the repository.  I 
used the command 'svn propset svn:log --revprop -r 46098 -F /dev/stdin' to 
fix it.

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Re: svn commit: rev 46098 - in spamassassin/trunk: . build

Posted by Michael Parker <pa...@pobox.com>.
> Log:
> Some code I had lying around since ages, maybe it will become useful one day.  For now I dump it here to clean up my harddisk a bit ;~)
> 
> 

Just a pet peeve.  That's not really a "Log" message.  It should be
much more descriptive as to the code you are committing.

FYI: You can use svadmin to update the log message.

Michael