diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-12-19 23:36:25 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-12-19 23:36:25 +0000 |
commit | aa526f6a34933327bd78007cf05c4117d568bb36 (patch) | |
tree | 3a4c0664828840b6f8e27bb5e09d7583d7f22570 | |
parent | 19680f5f4fbd3b662f7ddcc6fadb828beac33f7b (diff) | |
download | drakx-backup-do-not-use-aa526f6a34933327bd78007cf05c4117d568bb36.tar drakx-backup-do-not-use-aa526f6a34933327bd78007cf05c4117d568bb36.tar.gz drakx-backup-do-not-use-aa526f6a34933327bd78007cf05c4117d568bb36.tar.bz2 drakx-backup-do-not-use-aa526f6a34933327bd78007cf05c4117d568bb36.tar.xz drakx-backup-do-not-use-aa526f6a34933327bd78007cf05c4117d568bb36.zip |
tools to auto generate the ChangeLog and the mail to changelog
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | docs/comparisons | 6 | ||||
-rwxr-xr-x | tools/addchangelog.pl | 21 | ||||
-rwxr-xr-x | tools/cvslog2changelog.pl | 67 | ||||
-rwxr-xr-x | tools/mailchangelog.pl | 12 |
5 files changed, 107 insertions, 3 deletions
@@ -92,9 +92,7 @@ upload: clean install for i in $(RELEASE_BOOT_IMG); do upload images $$i; done ;\ echo - perl -pe 'exit if / DrakX </' perl-install/ChangeLog | tools/mailchangelog - tools/addchangelog perl-install/ChangeLog 'snapshot uploaded' - cvs commit perl-install/ChangeLog # otherwise i always have a conflict :-( + tools/addchangelog.pl perl-install tools/cvslog2changelog.pl | tools/mailchangelog.pl upload_sparc: touch /tmp/mdkinst_done diff --git a/docs/comparisons b/docs/comparisons index 881cf3a27..ea7725986 100644 --- a/docs/comparisons +++ b/docs/comparisons @@ -36,3 +36,9 @@ compssLevel df rpm time fs df/time 90 289 281 4:20 ext2 500M 1.11 80 373 361 5:41 ext2 500M 1.09 70 890 794 13:28 ext2 1G 1.10 + + +mem used 7.2cooker +gtk: runinstall2 13608(data 9572) + FBDev 2984(data 1544) +newt: runinstall2 9516(data 7528) +stdio: runinstall2 9160(data 7372) diff --git a/tools/addchangelog.pl b/tools/addchangelog.pl new file mode 100755 index 000000000..eff3e76ea --- /dev/null +++ b/tools/addchangelog.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +@ARGV == 2 or die "usage $0: <dir> <cvslog2changelog script>\n"; + +($dir, $script) = @ARGV; + +chomp(my $cwd = `pwd`); +$script = "$cwd/$script" if $script !~ m|^/|; + +chdir $dir; +$date = (split('/', `grep ChangeLog CVS/Entries`))[3]; + +@changelog = `cvs log -d ">$date" | $script`; +@before = `cat ChangeLog`; + +print foreach @changelog; + +open F, ">ChangeLog"; +print F foreach @changelog, @before; + +system(q(cvs commit -m "New snapshot uploaded" ChangeLog)); diff --git a/tools/cvslog2changelog.pl b/tools/cvslog2changelog.pl new file mode 100755 index 000000000..4b33fed45 --- /dev/null +++ b/tools/cvslog2changelog.pl @@ -0,0 +1,67 @@ +#!/usr/bin/perl + +while (<>) { + if ($e = /^description:/ .. /^={77}/) { + next if $e == 1 || $e =~ /E0/; + if (/^-{28}/ .. /^date: /) { + if (/^date: (\S+)\s.*author: (\S+);/) { + ($date, $user) = ($1, $2); + } + } elsif (!/^branches: / && !/file .* was initially added on branch/ && !/empty log message/ && !/no_comment/) { + $l{$date}{$user}{$file} .= $_; + } + } elsif (/Working file: (.*)/) { + $file = $1; + } +} + +foreach $date (reverse sort keys %l) { + foreach $user (sort keys %{$l{$date}}) { + $fuser = $users{$user} || $user; + print "$date $fuser\n\n"; + my %inv; + while (($file, $log) = each %{$l{$date}{$user}}) { + $log =~ s/^\s+( \*)?//ms; + $log =~ s/\s+$//ms; + push @{$inv{$log}}, $file; + } + foreach $log (keys %inv) { + $line = join(', ', @{$inv{$log}}) . ($log !~ /^\(/ && ':') . " $log"; + print "\t* ", join("\n\t", auto_fill($line, 72)), "\n\n"; + } + } +} + +1; + +sub auto_fill { + my ($line, $col) = @_; + map { + my @l; + my $l = ''; + while ($_) { + s/^(\s*)(\S*)//; + my $m = "$l$1$2"; + if (length $m > $col) { + push @l, $l; + $l = $2; + } else { + $l = $m + } + } + @l, $l; + } split("\n", $line); +} + +BEGIN { + %users = ( + 'gc' => 'Guillaume Cottenceau <gc@mandrakesoft.com>', + 'fpons' => 'François Pons <fpons@mandrakesoft.com>', + 'pablo' => 'Pablo Saratxaga <pablo@mandrakesoft.com>', + 'damien' => 'dam\'s <damien@mandrakesoft.com>', + 'install' => 'DrakX <install@linux-mandrake.com>', + 'prigaux' => 'Pixel <pixel@mandrakesoft.com>', + 'flepied' => 'Frederic Lepied <flepied@mandrakesoft.com>', + 'chmouel' => 'Chmouel Boudjnah <chmouel@mandrakesoft.com>', + ); +} diff --git a/tools/mailchangelog.pl b/tools/mailchangelog.pl new file mode 100755 index 000000000..88320a061 --- /dev/null +++ b/tools/mailchangelog.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl + +open F, '| /usr/sbin/sendmail -f devel@mandrakesoft.com'; + +print F +q(Subject: [DrakX] new DrakX snapshot uploaded +From: devel@mandrakesoft.com +To: changelog@linux-mandrake.com, install@mandrakesoft.com +Reply-To: install@mandrakesoft.com + +); +print F foreach <STDIN>; |