From 49b630f8ea30b7a5066f87b16b42cffec00a7bef Mon Sep 17 00:00:00 2001 From: Rob Funk Date: Fri, 18 Jun 2004 06:55:28 +0000 Subject: Start converting release scripts over to new environment svn path=/trunk/; revision=3894 --- Makefile.in | 19 +++++------ growthplot | 38 +++++++++++++--------- listsize | 31 +++++++++++++++--- makerelease | 105 ++++++++++++++++++++++++++++++++++-------------------------- specgen.sh | 18 ++++++++--- 5 files changed, 130 insertions(+), 81 deletions(-) diff --git a/Makefile.in b/Makefile.in index 14cf0db5..3d38ed22 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,7 +184,7 @@ clean: -cd intl; $(MAKE) clean -rm -f $(top_builddir)/intl/libintl.h # work around GNU gettext brain-damage -cd po; $(MAKE) clean - -rm -f fetchmail *.o core fetchmail.dvi \ + -rm -f fetchmail *.o core *~ fetchmail.dvi \ rcfile_l.c rcfile_y.h rcfile_y.c \ fetchmail.tar fetchmail.tar.gz \ netrc rfc822 unmime fetchmail-man.html @@ -196,7 +196,8 @@ distclean: clean -cd intl; $(MAKE) distclean -cd po; $(MAKE) distclean -rm -f TAGS tags config.h config.log \ - config.cache stamp-h stamp-h.in # config.status Makefile + config.cache stamp-h stamp-h.in + -rm -f config.status Makefile realclean: distclean -rm -f FAQ FEATURES NOTES MANIFEST @@ -276,7 +277,7 @@ all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts) \ $(srcdir)/po/* $(srcdir)/intl $(srcdir)/beos/* ABOUT-NLS $(srcdir)/MANIFEST fetchmail.spec: Makefile.in - specgen.sh $(VERSION) >fetchmail.spec + $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec MANIFEST: $(srcdir) Makefile.in @echo $(all) | tr "[ \t]" '\n' | sed -e '/^\.\//s///' | sort >MANIFEST @@ -303,20 +304,20 @@ TODO: todo.html # man2html no longer chokes and dies on this man page, # but manServer.pl does a much better job. fetchmail-man.html: fetchmail.man - manServer.pl fetchmail.man >fetchmail-man.html + PATH=\${PATH}:$(srcdir)/dist-tools manServer.pl fetchmail.man >fetchmail-man.html # Make distribution. -dist: distclean MANIFEST Makefile.in distdocs - touch fetchmail.lsm - make fetchmail-$(VERSION).tar.gz +dist: MANIFEST Makefile.in distdocs fetchmail-$(VERSION).tar.gz + #touch fetchmail.lsm + #make fetchmail-$(VERSION).tar.gz #-cd po; make update-po ls -l fetchmail-$(VERSION).tar.gz - @echo "Don't forget to build RPMs from root!" + #@echo "Don't forget to build RPMs from root!" # Firewall against the lossage in autoconf that keeps breaking our build. EX = --exclude "fetchmail-$(VERSION)/intl/libintl.h" fetchmail-$(VERSION).tar.gz: $(all) - (cd ..; ln -sf fetchmail fetchmail-$(VERSION)) + (cd ..; ln -sf $(shell basename \${PWD}) fetchmail-$(VERSION)) (cd ..; tar $(EX) -czf fetchmail-$(VERSION).tar.gz `sed /tmp/growthplot$$ -grep "^[0-9]" /tmp/growthplot$$ >/tmp/growthnumbers$$ -grep "^[0-9.]*.[05].0 " /tmp/growthplot$$ >/tmp/growthmajors$$ -sed '/^4.2.9/,$d' /tmp/growthannounce$$ +timeseries >$tmp/growthplot$$ +grep "^[0-9]" $tmp/growthplot$$ >$tmp/growthnumbers$$ +grep "^[0-9.]*.[05].0 " $tmp/growthplot$$ >$tmp/growthmajors$$ +sed '/^4.2.9/,$d' <$tmp/growthnumbers$$ >$tmp/growthannounce$$ # gnuplot line styles. These occasionally change (like beteween 3.5 and 3.7); -# use "echo "set terminal png color; test" | gnuplot | display - to check. +# use "echo 'set terminal png; test' | gnuplot | display -" to check. blue_boxes=3 green_crosses=2 cyan_diamonds=37 # Once purple triangles, but we can't do that anymore brown_triangles=23 -cat >/tmp/growthimage$$ <$tmp/growthimage$$ <>/tmp/growthimage$$ +) <$tmp/growthplot$$ >>$tmp/growthimage$$ # OK, now write the major-release labels ( @@ -81,22 +86,23 @@ EOF echo "set arrow from $days, $total - 55 to $days, $total - 15 head" echo "set label '$version' at $days - 5, $total - 65" done -) >/tmp/growthimage$$ +) <$tmp/growthmajors$$ >>$tmp/growthimage$$ -cat >>/tmp/growthimage$$ <>$tmp/growthimage$$ <growth.png +gnuplot $tmp/growthimage$$ >growth.png -rm -f /tmp/growth* +rm -f $tmp/growth* +rmdir $tmp # growthplot ends here diff --git a/listsize b/listsize index e677fd7a..73e25887 100755 --- a/listsize +++ b/listsize @@ -1,15 +1,36 @@ #!/bin/sh # # Mine list sizes from MailMan web interfaces +# +# * Must set environment variable FETCHMAIL_LIST_PASS to list admin password + +project="fetchmail" +admin="http://lists.berlios.de/mailman/admin" +adminpw=$FETCHMAIL_LIST_PASS -admin="http://lists.ccil.org/mailman/admin" list="$1" -tmp="/usr/tmp/listsize.$$" +if [ ! "$list" ]; then + echo "Usage: $0 list" 1>&2 + exit 1 +fi +case "$list" in +$project-*) + # already gave us the full name, e.g. fetchmail-announce + ;; +*) + # only gave us the last part of the name, e.g. announce + list="$project-$list" + ;; +esac +hexpw=`echo "$adminpw" | od -t x1 -w64 | sed -e 's/^[0-9]*//' -e '/^ *$/d' -e 's/ /%/g'` +umask 077 +tmp="/tmp/$project-$list.listsize.$$" # First get the login cookie... -curl -s -D $tmp $admin/fetchmail-${list}?adminpw=mypaswrd >/dev/null +curl -s -D "$tmp" "$admin/${list}?adminpw=$hexpw" >/dev/null # Second gets the actual stat -curl -s -b $tmp $admin/fetchmail-${list}/members \ - | sed -n '/.*>\([0-9][0-9]*\) members total.*/s//\1/p' +curl -s -b "$tmp" "$admin/${list}/members" \ + | sed -n '/.*>(\([0-9][0-9]*\) members total.*/s//\1/p' +rm -f "$tmp" # end diff --git a/makerelease b/makerelease index 37a2fe95..035ea012 100755 --- a/makerelease +++ b/makerelease @@ -4,11 +4,19 @@ # Dumps a release notice and diffs as a MIME multipart message # in RELEASE_NOTES # -$timezone = "-0500"; +use POSIX qw(strftime); +$timezone = strftime('%z', localtime) || "-0500"; +$tmp = $ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp"; + +$project = "fetchmail"; +$svnrepos = "svn://svn.berlios.de/$project"; +$website = "http://developer.berlios.de/projects/$project"; +$mailfrom = "<$project-devel-owner\@lists.berlios.de> (Fetchmail Development Team)"; $diffs = 0; $verbose = 0; $null = ">/dev/null"; +$errnull = "2>/dev/null"; while ($i = shift @ARGV) { if ($i =~ /^(--diffs|-d)$/i) @@ -31,38 +39,39 @@ while ($i = shift @ARGV) $version=`grep 'VERSION *=' Makefile.in`; $version =~ /VERSION *= *(.*)/; $version = $1; -$rcsid = $version; -$rcsid =~ tr/./-/; +$tag = "RELEASE_$version"; +$tag =~ tr/./-/; -open(ID, "rlog -h NEWS|"); -while () { - last if /^symbolic names/; -} +open(ID, "svn ls $svnrepos/tags|"); while () { - if (/^\t(.*):/) { - push(@versions, $1); + if (m{^(RELEASE_.*)/}) { + unshift(@versions, $1); } } close(ID); -if ($versions[0] eq $rcsid) { - $rcsid = $versions[0]; - $oldid = $versions[1]; +if ($versions[0] eq $tag) { + $tag = $versions[0]; + $oldtag = $versions[1]; } else { - $rcsid = ''; - $oldid = $versions[0]; + $tag = ''; + $oldtag = $versions[0]; } -#$ENV{'PATH'} = "~esr/bin:/bin:/usr/bin"; +$ENV{PATH} .= ":./dist-tools:./dist-tools/shipper:."; -print "Building $version release, RCS ID $rcsid, previous RCS ID $oldid\n"; +print "Building $version release, tag $tag, previous tag $oldtag\n"; -if (system("./configure; make -C po update-po; make clean")) { - die("Failure in translation-file rebuild.") +if (system("aclocal && autoconf")) { + die("Failure in regenerating autoconf files\n"); +} + +if (system("./configure && make clean && make -C po update-po && make clean")) { + die("Failure in translation-file rebuild\n"); } print "### Test-building the software...\n"; -if (system("configure --disable-nls; make")) { +if (system("./configure --disable-nls && make clean && make")) { die("Compilation failure\n"); } @@ -72,23 +81,21 @@ if (system("make dist $null")) { } print "### Building the RPMs...\n"; -if (system("buildrpms fetchmail-${version}.tar.gz $null")) { +if (system("buildrpms $project-${version}.tar.gz $null")) { die("RPM-build failure\n"); } -open(REPORT, ">PREAMBLE.$$"); +open(REPORT, ">$tmp/$project.PREAMBLE.$$"); print REPORT <. +The $version release of $project is now available at the usual locations, +including . The source archive is available at: - + Here are the release notes: @@ -97,23 +104,24 @@ EOF # Extract the current notes open(NEWS, "NEWS"); while () { - if (/^fetchmail/) { + if (/^$project/) { print REPORT $_; last; } } while () { - if (/^fetchmail/) { + if (/^$project/) { last; } print REPORT $_; } -$oldrcs = $oldid; -$oldrcs =~ tr/-/./; +$oldver = $oldtag; +$oldver =~ tr/-/./; +$oldver =~ s/^RELEASE_//; if ($diffs) { - print REPORT "Diffs from the previous ($oldrcs) release follow as a MIME attachment." + 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." } @@ -122,33 +130,38 @@ close(NEWS); close(REPORT); -if ($rcsid eq '') { - system("rcsdiff -u -r$oldid RCS/* 2>/dev/null >DIFFS.$$"); +if ($tag eq '') { + system("svn diff -r$oldtag $errnull >$tmp/$project.DIFFS.$$"); } else { - system("rcsdiff -u -r$oldid -r$rcsid RCS/* 2>/dev/null >DIFFS.$$"); + system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$"); } print "Diff size:"; -system("wc testservers.html"); +if (-r "testsites") { + print "Building test server list...\n"; + system("rm -f testservers.html; testservers-gen.sh >testservers.html"); +} print "Making activity graph..."; -growthplot; +system "growthplot"; print "Done\n"; diff --git a/specgen.sh b/specgen.sh index 7531aa27..5134e6df 100755 --- a/specgen.sh +++ b/specgen.sh @@ -1,11 +1,19 @@ +#!/bin/sh + +user=`whoami` +name=`grep "^${user}:" /etc/passwd | cut -d: -f5|sed -e 's/^.*,//'` +domain=mail.berlios.de +email="$user@$domain" +packager="$name <$email>" + cat < -URL: http://www.catb.org/~esr/fetchmail/ +Vendor: The Community Fetchmail Project +Packager: $packager +URL: http://developer.berlios.de/projects/fetchmail Source: %{name}-%{version}.tar.gz Group: Applications/Mail Group(pt_BR): Aplicações/Correio Eletrônico @@ -23,7 +31,7 @@ Summary(tr): POP2, POP3, APOP, IMAP protokolleri ile uzaktan mektup alma yaz Summary(da): Alsidig POP/IMAP post-afhentnings dæmon BuildRoot: %{_tmppath}/%{name}-root #Keywords: mail, client, POP, POP2, POP3, APOP, RPOP, KPOP, IMAP, ETRN, ODMR, SMTP, ESMTP, GSSAPI, RPA, NTLM, CRAM-MD5, SASL -#Destinations: fetchmail-friends@ccil.org, fetchmail-announce@ccil.org +#Destinations: fetchmail-users@lists.berlios.de, fetchmail-announce@lists.berlios.de %description Fetchmail is a free, full-featured, robust, and well-documented remote @@ -155,6 +163,6 @@ rm -rf \$RPM_BUILD_ROOT /usr/lib/rhs/control-panel/fetchmailconf.init %changelog -* `date '+%a %b %d %Y'` ${version} +* `date '+%a %b %d %Y'` <$email> ${version} - See the project news file for recent changes. EOF -- cgit v1.2.3