From 903b0498f0996fd45edfe33078f210381c228b27 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 6 Feb 2010 13:54:43 +0100 Subject: Update documents/scripts after SVN -> Git move. --- dist-tools/getstats.py | 3 + dist-tools/makerelease | 157 ---------------------------------- dist-tools/makerelease.pl | 159 +++++++++++++++++++++++++++++++++++ dist-tools/send-security-announce.sh | 4 +- 4 files changed, 164 insertions(+), 159 deletions(-) delete mode 100755 dist-tools/makerelease create mode 100755 dist-tools/makerelease.pl (limited to 'dist-tools') diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index 17fcab50..df2fbeaf 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -4,6 +4,9 @@ import commands, os, string, ftplib +print "This script must be adjusted for Git." +exit(1) + # Get version and date date = commands.getoutput("LC_TIME=C date -u") pid = os.getpid() diff --git a/dist-tools/makerelease b/dist-tools/makerelease deleted file mode 100755 index 59b120e3..00000000 --- a/dist-tools/makerelease +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/bin/env perl -# -# Make a fetchmail release. -# Dumps a release notice and diffs as a MIME multipart message -# in RELEASE_NOTES -# -use POSIX qw(strftime); -$tmp = $ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp"; - -$project = "fetchmail"; -$svnrepos = "http://mknod.org/svn/$project"; -$website = "http://developer.berlios.de/projects/$project"; -$mailfrom = "<$project-devel-owner\@lists.berlios.de> (Fetchmail Development Team)"; - -die "Need GNU sort!" unless `sort --version | head -n1` =~ /GNU/; - -# parse options -$diffs = 0; -$verbose = 0; -$null = ">/dev/null"; -$errnull = "2>/dev/null"; -while ($i = shift @ARGV) -{ - if ($i =~ /^(--diffs|-d)$/i) - { - $diffs = 1; - next; - } - - if ($i =~ /^(--verbose|-v)$/i) - { - $verbose = 1; - $null = ""; - next; - } - - die "Error: Unknown option: $i\n"; -} - -# extract version from source -$version=`grep 'AC_INIT' configure.ac`; -$version =~ /AC_INIT\([^,]*,\[?([0-9.rc-]+)\]?\,.*\)/; -$version = $1; -die "cannot determine version" unless defined $1; -$tag = "RELEASE_$version"; -$tag =~ tr/./-/; - -# extract existing tags -open(ID, "svn ls \"$svnrepos/tags\" | sort -t- -k1,1 -k2,2n -k3,3n |") || die "cannot run svn ls: $!\naborting"; -while () { - if (m{^(RELEASE_.*)/}) { - unshift(@versions, $1); - } -} -close ID || die "svn ls failed, aborting"; - -if ($versions[0] eq $tag) { - $tag = $versions[0]; - $oldtag = $versions[1]; -} else { - $tag = ''; - $oldtag = $versions[0]; -} - -$pwd = `pwd`; chomp $pwd; - -$ENV{PATH} .= ":$pwd/dist-tools:$pwd/dist-tools/shipper"; - -print "Building $version release, tag $tag, previous tag $oldtag\n"; - -if (-d "autom4te.cache") { - system("rm -rf autom4te.cache") - and die "Failure in removing autom4te.cache"; -} - -if (system("autoreconf -isv")) { - die("Failure in regenerating autoconf files\n"); -} - -print "### Test-building the software...\n"; -if (system("mkdir -p autobuild && cd autobuild && ../configure -C --silent && make -s clean && make check distcheck")) { - die("Compilation failure\n"); -} - -# print "### Building the RPMs...\n"; -# if (system("cd autobuild && cp ../fetchmail.xpm . && buildrpms $project-${version}.tar.bz2 $null")) { -# die("RPM-build failure\n"); -# } - -open(REPORT, ">$tmp/$project.PREAMBLE.$$"); - -print REPORT <. - -The source archive is available at: -<$website/$project-${version}.tar.gz> - -Here are the release notes: - -EOF - -# Extract the current notes -open(NEWS, "NEWS"); -while () { - if (/^$project/) { - print REPORT $_; - last; - } -} -while () { - if (/^$project/) { - last; - } - print REPORT $_; -} - -$oldver = $oldtag; -$oldver =~ tr/-/./; -$oldver =~ s/^RELEASE_//; - -if ($diffs) { - print REPORT "Diffs from the previous ($oldver) release follow as a MIME attachment." -} else { - print REPORT "By popular demand, diffs from the previous release have been omitted." -} - -close(NEWS); - -close(REPORT); - -if ($tag eq '') { - system("svn diff -r$oldtag $errnull >$tmp/$project.DIFFS.$$"); -} else { - system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$"); -} -print "Diff size:"; -system("wc <$tmp/$project.DIFFS.$$"); - -if ($diffs) { - system "metasend -b" - ." -D '$project-$tag announcement' -m 'text/plain' -e 7bit -f $tmp/$project.PREAMBLE.$$" - ." -n -D 'diff between $oldver and $version' -m 'text/plain' -e 7bit -f $tmp/$project.DIFFS.$$" - ." -o ANNOUNCE.EMAIL"; -} else { - system("mv", "$tmp/$project.PREAMBLE.$$", "ANNOUNCE.EMAIL"); -} - -#unlink("$tmp/$project.PREAMBLE.$$"); -unlink("$tmp/$project.DIFFS.$$"); - -print "Done\n"; - -# makerelease ends here diff --git a/dist-tools/makerelease.pl b/dist-tools/makerelease.pl new file mode 100755 index 00000000..9578eb52 --- /dev/null +++ b/dist-tools/makerelease.pl @@ -0,0 +1,159 @@ +#!/usr/bin/env perl +# +# Make a fetchmail release. +# Dumps a release notice and diffs as a MIME multipart message +# in RELEASE_NOTES +# +use POSIX qw(strftime); +$tmp = $ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp"; + +die "This script ($0) needs to be updated for the Git-orious repo."; + +$project = "fetchmail"; +$svnrepos = "http://mknod.org/svn/$project"; +$website = "http://developer.berlios.de/projects/$project"; +$mailfrom = "<$project-devel-owner\@lists.berlios.de> (Fetchmail Development Team)"; + +die "Need GNU sort!" unless `sort --version | head -n1` =~ /GNU/; + +# parse options +$diffs = 0; +$verbose = 0; +$null = ">/dev/null"; +$errnull = "2>/dev/null"; +while ($i = shift @ARGV) +{ + if ($i =~ /^(--diffs|-d)$/i) + { + $diffs = 1; + next; + } + + if ($i =~ /^(--verbose|-v)$/i) + { + $verbose = 1; + $null = ""; + next; + } + + die "Error: Unknown option: $i\n"; +} + +# extract version from source +$version=`grep 'AC_INIT' configure.ac`; +$version =~ /AC_INIT\([^,]*,\[?([0-9.rc-]+)\]?\,.*\)/; +$version = $1; +die "cannot determine version" unless defined $1; +$tag = "RELEASE_$version"; +$tag =~ tr/./-/; + +# extract existing tags +open(ID, "svn ls \"$svnrepos/tags\" | sort -t- -k1,1 -k2,2n -k3,3n |") || die "cannot run svn ls: $!\naborting"; +while () { + if (m{^(RELEASE_.*)/}) { + unshift(@versions, $1); + } +} +close ID || die "svn ls failed, aborting"; + +if ($versions[0] eq $tag) { + $tag = $versions[0]; + $oldtag = $versions[1]; +} else { + $tag = ''; + $oldtag = $versions[0]; +} + +$pwd = `pwd`; chomp $pwd; + +$ENV{PATH} .= ":$pwd/dist-tools:$pwd/dist-tools/shipper"; + +print "Building $version release, tag $tag, previous tag $oldtag\n"; + +if (-d "autom4te.cache") { + system("rm -rf autom4te.cache") + and die "Failure in removing autom4te.cache"; +} + +if (system("autoreconf -isv")) { + die("Failure in regenerating autoconf files\n"); +} + +print "### Test-building the software...\n"; +if (system("mkdir -p autobuild && cd autobuild && ../configure -C --silent && make -s clean && make check distcheck")) { + die("Compilation failure\n"); +} + +# print "### Building the RPMs...\n"; +# if (system("cd autobuild && cp ../fetchmail.xpm . && buildrpms $project-${version}.tar.bz2 $null")) { +# die("RPM-build failure\n"); +# } + +open(REPORT, ">$tmp/$project.PREAMBLE.$$"); + +print REPORT <. + +The source archive is available at: +<$website/$project-${version}.tar.gz> + +Here are the release notes: + +EOF + +# Extract the current notes +open(NEWS, "NEWS"); +while () { + if (/^$project/) { + print REPORT $_; + last; + } +} +while () { + if (/^$project/) { + last; + } + print REPORT $_; +} + +$oldver = $oldtag; +$oldver =~ tr/-/./; +$oldver =~ s/^RELEASE_//; + +if ($diffs) { + print REPORT "Diffs from the previous ($oldver) release follow as a MIME attachment." +} else { + print REPORT "By popular demand, diffs from the previous release have been omitted." +} + +close(NEWS); + +close(REPORT); + +if ($tag eq '') { + system("svn diff -r$oldtag $errnull >$tmp/$project.DIFFS.$$"); +} else { + system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$"); +} +print "Diff size:"; +system("wc <$tmp/$project.DIFFS.$$"); + +if ($diffs) { + system "metasend -b" + ." -D '$project-$tag announcement' -m 'text/plain' -e 7bit -f $tmp/$project.PREAMBLE.$$" + ." -n -D 'diff between $oldver and $version' -m 'text/plain' -e 7bit -f $tmp/$project.DIFFS.$$" + ." -o ANNOUNCE.EMAIL"; +} else { + system("mv", "$tmp/$project.PREAMBLE.$$", "ANNOUNCE.EMAIL"); +} + +#unlink("$tmp/$project.PREAMBLE.$$"); +unlink("$tmp/$project.DIFFS.$$"); + +print "Done\n"; + +# makerelease ends here diff --git a/dist-tools/send-security-announce.sh b/dist-tools/send-security-announce.sh index 2fe60265..d7da5fbb 100755 --- a/dist-tools/send-security-announce.sh +++ b/dist-tools/send-security-announce.sh @@ -1,7 +1,7 @@ test "$SEND_ANNOUNCEMENTS" = doit || { echo "read the source, luke! -> $0" ; cat "$0" ; exit 1 ; } -ANN=fetchmail-SA-2009-01 -FILE=$HOME/VCS-mine/fetchmail.svn/BRANCH_6-3/$ANN.txt +ANN=fetchmail-SA-2010-01 +FILE=$HOME/VCS-mine/fetchmail.git/$ANN.txt test -r $FILE || { echo "Cannot find $FILE." ; exit 1 ; } CVE=$(sed -n '/^CVE Name:/ { s/^.*:[ ]*//p;q; }' $FILE) SUBJECT="fetchmail security announcement $ANN ($CVE)" -- cgit v1.2.3