From 4835749509a65dfe449fbcbdb6386af2cb768c10 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 28 Mar 2010 17:29:36 +0200 Subject: Update for 6.3.15 release. --- dist-tools/getstats.py | 20 ++++-------- dist-tools/makerelease.pl | 81 ++++++++++++++++++++++------------------------- 2 files changed, 44 insertions(+), 57 deletions(-) (limited to 'dist-tools') diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index df2fbeaf..f48c153a 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -4,28 +4,20 @@ 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") +date = commands.getoutput("LC_TIME=C date +'%Y-%m-%d'") pid = os.getpid() -if True: - # this is a fast variant using the base of the current working directory - # (ignores uncommitted modifications) - cmd = "svn export -q -rBASE . /tmp/getstats.%d" % pid -else: - # this is a slower variant that may export the whole tree across - # the net - cmd = "svn export -rCOMMITTED . /tmp/getstats.%d" % pid +os.mkdir("/tmp/getstats.%d" % pid) + +cmd = "git archive --format=tar HEAD | ( cd /tmp/getstats.%d && tar -xf -)" % pid if os.system(cmd): - print "SVN FAILED" + print "git-archive FAILED" os.exit(1) ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid) os.system("rm -rf /tmp/getstats.%d" % pid) vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\\[.\\+\\],\\[\\(.*\\)\\],.*)/\\1/p' ) { - if (m{^(RELEASE_.*)/}) { - unshift(@versions, $1); - } + chomp; + if (m{^(RELEASE_.*)$}) { + unshift(@versions, $1); + } } -close ID || die "svn ls failed, aborting"; +close ID || die "git tag failed, aborting"; if ($versions[0] eq $tag) { - $tag = $versions[0]; - $oldtag = $versions[1]; + $tag = $versions[0]; + $oldtag = $versions[1]; } else { - $tag = ''; - $oldtag = $versions[0]; + $tag = ''; + $oldtag = $versions[0]; } $pwd = `pwd`; chomp $pwd; @@ -71,24 +71,19 @@ $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"; + system("rm -rf autom4te.cache") + and die "Failure in removing autom4te.cache"; } -if (system("autoreconf -isv")) { +if (system("autoreconf -ifs") . ($verbose ? 'v' : '')) { 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")) { +if (system("mkdir -p autobuild && cd autobuild && ../configure -C --silent && make -s clean && make " . ($verbose ? '' : '-s') . " 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 <) { - if (/^$project/) { - print REPORT $_; - last; - } + if (/^$project/) { + print REPORT $_; + last; + } } while () { - if (/^$project/) { - last; - } - print REPORT $_; + if (/^$project/) { + last; + } + print REPORT $_; } $oldver = $oldtag; @@ -127,26 +122,26 @@ $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." + 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) { + 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.$$"); + 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"; + ." -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"); } -- cgit v1.2.3