User: stephent
Date: 05/09/15 05:14:10
Modified: xemacs-builds/stephen ChangeLog xre_data.py xre.py
Log:
handle new version.sh fields, fix typo
Revision Changes Path
1.11 +30 -7 XEmacs/xemacs-builds/stephen/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/stephen/ChangeLog,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- ChangeLog 2004/03/22 12:20:50 1.10
+++ ChangeLog 2005/09/15 03:14:08 1.11
@@ -1,12 +1,35 @@
-2004-03-22 Stephen J. Turnbull <turnbull(a)sk.tsukuba.ac.jp>
+2005-09-15 Stephen J. Turnbull <stephen(a)xemacs.org>
- * xre.py (Release): "Declare" member showstoppers.
- (Release.__init__): Initialize it.
- (Release.parseChangesFile): Set it.
- (Release.doit): Check it.
+ * xre_data.py (beta.intro): Add space at end.
- * xre_data.py (xemacs): Update sourceSize.
- (steve) Update my comment.
+ * xre.py (Release.validateVersionDictionary): Add logic to update
+ new version.sh fields.
+
+2005-05-27 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xre.py: Update header comment.
+
+ Refactor announcement composer:
+
+ (substituteHTMLEntities): New function.
+ (HTMLEntityDictionary): New variable, used by substituteHTMLEntities.
+ (formatNamedVariables): New function.
+ (Release.writeAnnouncements): Merge writeDotContent and
+ writeAnnouncePost. Allow boilerplate to vary with Release, and
+ substitute variable text by name globally. Use the above.
+ (Release.writeDotContent,Release.writeAnnouncePost): Remove.
+ (Release.finalize): Use writeAnnouncements.
+ (Release.__init__): Initialize new members.
+
+2004-03-20 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xre.py (Release.checkNoSpace): Handle exception if statvfs
+ not available.
+
+ * xre_data.py (test): Update for use on new host.
+ (tester): Update size estimates and data for testing Release.
+
+ * xre.texi: Assorted small fixes and updates.
2003-09-05 Stephen J. Turnbull <stephen(a)xemacs.org>
1.5 +85 -9 XEmacs/xemacs-builds/stephen/xre_data.py
Index: xre_data.py
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/stephen/xre_data.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- xre_data.py 2004/03/22 12:20:50 1.4
+++ xre_data.py 2005/09/15 03:14:08 1.5
@@ -9,8 +9,8 @@ xemacs = Project (
alias = "xemacs",
mailDomain = "xemacs.org",
homePage = "http://www.xemacs.org/",
- sourceSize = 60, # 21.5.17
- buildSize = 40, # guesstimate from 21.4.9
+ sourceSize = 60, # 21.5.16+CVS
+ buildSize = 60, # guesstimate from 21.5.16+CVS
uploadSize = 20, # 21.5.8 is 15
versionFile = "version.sh",
# Always exclude Emacs backup files, the CVS, xemacs-packages, and mule-
@@ -73,11 +73,11 @@ martin = Developer (
steve = Developer (
fullName = "Stephen J. Turnbull",
- comment = "Beta Release Engineer, XEmacs 21.5",
+ comment = "XEmacs 21.5 Beta Engineer",
projectAlias = "stephen",
mailingAddress = "turnbull(a)sk.tsukuba.ac.jp",
- stage = "/mnt/old.vicepa/tmp/staging",
- autoconf = "autoconf2.13",
+ stage = "/home/stephen/Projects/XEmacs/Releases/staging",
+ autoconf = "autoconf",
# Project resource accesses
cvsRW = Access (), # defaults
#cvsRO = Access (), # defaults
@@ -99,10 +99,11 @@ tester.fullName = "Tester",
tester.comment = "Test developer",
# Project resource accesses
tester.cvsRW.scheme = "dummy"
+tester.stage = "/Users/steve/Software/XEmacs/staging"
tester.cvsRO = Access (
scheme = "local",
host = None,
- path = "/usr/local/cvsroot/XEmacs",
+ path = "/Users/steve/Software/Repositories/cvs.xemacs.org",
user = None
)
tester.shell.scheme = "dummy"
@@ -121,6 +122,8 @@ tester.validate()
beta = Release(
#version = (21,5,4),
+ reliability = "beta",
+ announceAddress = "xemacs-beta(a)xemacs.org",
ancestorVersion = (21,2,47),
codenameFile = "etc/VEGETABLES",
project = xemacs,
@@ -132,12 +135,85 @@ beta = Release(
"shebang", "emacs_is_beta",
"emacs_major_version",
"emacs_minor_version", "emacs_beta_version",
'xemacs_codename',
"emacs_kit_version", "infodock_major_version",
- "infodock_minor_version", "infodock_build_version"
+ "infodock_minor_version", "infodock_build_version",
+ "xemacs_extra_name", "xemacs_release_date"
),
versionRequiredFields = (
"shebang", "emacs_is_beta",
"emacs_major_version",
"emacs_minor_version", "emacs_beta_version",
'xemacs_codename'
- )
+ ),
+ intro = """\
+* %(herald)s.
+ "%(codename)s" is the %(ordinal)s in the %(series)s series.
+
+
+The successor to XEmacs %(previousVersion)s "%(previousCodename)s",\
+ "%(codename)s" adds """,
+ # news should be placed in a x.y.z.news file.
+ blurb = """\
+This is the development line. The current series started with XEmacs 21.5.0
+(an alias for XEmacs 21.4.0 "Solid Vapor", the first release in the current
+stable line). 21.5 is the code base for introduction of major new subsystems
+and fixes to design bugs that experience shows will introduce instability.
+So far the main effort has been on improved support for Unicode, updates to
+the build infrastructure, and development of new features in memory allocation.
+
+For general information about XEmacs, the developers, and the user community,
+see our home page,
+
+
http://www.xemacs.org/""",
+ disclaimer = """\
+* XEmacs %(version)s is "%(reliability)s" software.
+
+The usual "no warranty" disclaimer (see etc/WARRANTY, sections 10 and 11)
+applies. At this point in time, it is the version that most developers
+are using for their daily work. However, it is certain that many bugs
+remain and new ones will be introduced as development proceeds. Be sure
+to take care to safe your work often and follow a regular backup
regime.""",
+ download = """\
+* Availability
+
+Anonymous ftp:
+
+
ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.5
+
+See
http://www.xemacs.org/Install/ for more information about building
+from source.
+
+If you already have a %(previousVersion)s source tree, a patchkit is available in
+xemacs-%(previousVersion)s-%(version)s.patch.gz. This does not update .elcs or
.infos,
+they will be rebuilt when you make XEmacs. If you have an earlier
+version, you can repeatedly apply patchkits.
+
+Also, if you don't have the packages yet, see
+
+
http://www.xemacs.org/Documentation/packageGuide.html.
+
+Anonymous (pserver) CVS:
+
+Anonymous CVS is available. We are very grateful to the staff at our
+host, SunSITE.dk, for a lot of help and quick reponse to all our
+requests.
+
+Take care that your Root is set correctly to
+
+ CVSROOT=:pserver:cvs@cvs.xemacs.org:/pack/xemacscvs
+
+On platforms with a Bourne shell and find available, something like
+
+ for r in `find . -name Root`; do echo $CVSROOT > $r; done
+
+will convert your entire tree.
+
+To make it straightforward to access certain versions of the code, we have
+a standard tagging policy. To update to release %(version)s, use the update
+flag "%(releaseSpec)s". To update to the current release without referring
to
+it specifically, use the flag "%(currentSpec)s". To update to the
+latest commits in CVS, use the flag "%(branchSpec)s". Then rebuild XEmacs.
+
+For more details, see
+
+
http://www.xemacs.org/Develop/cvsaccess.html ."""
)
@@ -169,7 +245,7 @@ candidate.isBeta = 1
candidate.cvsTag = "candidate-21-4"
-test = copy(candidate)
+test = copy(beta)
test.engineer = tester
1.8 +300 -275 XEmacs/xemacs-builds/stephen/xre.py
Index: xre.py
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/stephen/xre.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- xre.py 2004/03/22 12:20:50 1.7
+++ xre.py 2005/09/15 03:14:09 1.8
@@ -1,10 +1,10 @@
#### XEmacs Release Engineer module
-# Copyright (C) 2001, 2002 Free Software Foundation
+# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
# Author: Stephen J. Turnbull <stephen(a)xemacs.org>
# Created: 2001-09-26
-# Last-Modified: 2002-05-28
+# Last-Modified: 2005-09-15
# Keywords: releases, maint
# This program is part of XEmacs, which is free software; you can
@@ -31,13 +31,13 @@
# Usage:
# This code _requires_ Python 2. I run the Python interpreter from
-# M-x shell mode. Then I do "from xre import gamma", followed by
-# "gamma.doit()" which does most of what's necessary for a release.
-# Note that by default doit() is pretty conservative about what does.
-# You'll need to create a Developer object for yourself (these are in
-# the data module xre_data.py), and possibly one or more Server or
-# Access objects. The Project, Developer, and Release classes aren't
-# very orthogonal, sorry!
+# M-x shell mode. Then I do "from xre import beta", followed by
+# "beta.doit((21,5,21))" which does most of what's necessary for a
+# release. Note that by default doit() is pretty conservative about
+# what it does. You'll need to create a Developer object for yourself
+# (these are in the data module xre_data.py), and possibly one or more
+# Server or Access objects. The Project, Developer, and Release classes
+# aren't very orthogonal, sorry!
### Kudos:
# This program is based on Martin Buchholz's excellent Perl program `xre'.
@@ -89,10 +89,26 @@
# 51. For uploads, verbose=1 should get a ls -l.
# 52. Many utilities don't use flags intead of separate args yet.
# 56. There are still dict arguments not converted to Flags.
-# 57.
-
+# 59. Collect the formatNamedVariables in announcement generator.
+# 60. Move default values from writeAnnouncements into Release constructor.
+# 62. Fix the CVS tag generation description to work for stable branch, too.
+# 63. Fix CHANGES parsing to pick up headers.
+# 65. Parametrize test builds for different configures.
+# 67. Detect broken builds and abort release process.
+# 69. Refactor: automatic preparation = check out trees, create abstract, output
+# warnings; engineer documentation = update CHANGES, write $VERSION.news;
+# automatically build packages, output warnings, write $VERSION.content
+# in Web; engineer check, update Web index.content; automatically
+# commit code, tag, upload, make public, commit web, send web patch.
+# 71.
### DONE
-#
+# 70. Update xemacs_extra_name and xemacs_release_date in version.sh.
+# 68. Regularize and document the announcement construction parameters.
+# 66. Ensure configure is up to date before making tarbabies and testing.
+# 64. Fix test build to work right with autoconf changes.
+# 61. Review: are all variables initialized in write announcements?
+# 58. Abstract and refactor the announcement generator.
+# 57. Update the header comment.
# 55. Deal with the src/depends file per Martin.
# 54. Get rid of unnecessary shape attribute in HTML href tags.
# 53. Fix dict arg not converted to Flags bug.
@@ -143,6 +159,7 @@ from re import compile, match, search, I
from os.path import dirname, isdir, abspath
from types import *
from copy import copy
+from datetime import date
### main program
@@ -466,6 +483,14 @@ class Release:
Initializations written to file in order of this
attribute, followed by versionRogueFields.
versionRequiredFields Variable names required in version.sh.
+ reliability Used by writeAnnouncements.
+ announceAddress
+ intro Used by writeAnnouncements.
+ news The defaults for these are hard-coded.
+ blurb If the argument is None, the defaults will
+ disclaimer be used. If you want to have an empty
+ download part, use the empty string.
+
Attributes:
previousVersion Tuple giving previous version.
versionString String in dotted triple format (1.2.3),
@@ -478,8 +503,9 @@ class Release:
warnings Warnings accumulated over the build.
errors Serious errors accumulated over the build.
versionRogueFields Unknown fields found in version.sh.
- showstoppers List of (error, function, message) triples.
- If non-null, abort the release.
+ preamble Announcement variables
+ postamble which probably should
+ header not be changed.
Public methods:
prepare Create a clean source tree, updated to current
state of CVS branch, verify consistency.
@@ -509,27 +535,44 @@ class Release:
tagTail = None,
isBeta = None,
changesFile = None,
- branchPointTag = None
+ branchPointTag = None,
+ download = None,
+ blurb = None,
+ news = None,
+ intro = None,
+ disclaimer = None,
+ reliability = None,
+ announceAddress = None
):
- self.valid = 0
- self.state = None
- self.project = project
- self.engineer = engineer
- self.cvsTag = cvsTag
+ self.valid = 0
+ self.state = None
+ self.project = project
+ self.engineer = engineer
+ self.cvsTag = cvsTag
if tagTail is None:
self.tagTail = ""
else:
self.tagTail = tagTail
- self.version = None
- self.ancestorVersion = ancestorVersion # redundant?
- self.codenameFile = codenameFile
- self.isBeta = isBeta
- self.changesFile = changesFile
- self.branchPointTag = branchPointTag
+ self.version = None
+ self.ancestorVersion = ancestorVersion # redundant?
+ self.codenameFile = codenameFile
+ self.isBeta = isBeta
+ self.changesFile = changesFile
+ self.branchPointTag = branchPointTag
self.versionStandardFields = versionStandardFields
self.versionRequiredFields = versionRequiredFields
- self.warnings = []
- self.showstoppers = []
+ self.warnings = []
+ self.reliability = reliability
+ self.announceAddress = announceAddress
+ self.download = download
+ self.blurb = blurb
+ self.news = news
+ self.intro = intro
+ # we deliberately don't provide APIs to change these
+ self.header = None
+ self.preamble = None
+ self.postamble = None
+ self.disclaimer = disclaimer
# need a function to validate version in a tree
def setVersion (self, version):
@@ -593,14 +636,6 @@ class Release:
self.abstract()
self.package(flags=packageFlags)
self.check()
- if self.showstoppers:
- print """\
-The following serious errors were encountered. The build cannot continue
-until they are fixed."""
- for triple in self.showstoppers:
- print "%s in %s: %s" % triple
- # raise an arbitrary error
- raise self.showstoppers[0][0]
print "The automated portion is done. The rest is a dry run."
self.tag()
self.upload()
@@ -706,6 +741,12 @@ to the Release object in order."""
else:
execAndTrace("tar xvzf " + previousTarball)
+ # 5. check for a x.y.z.news file, and slurp it in if present
+ if os.access ("%d.%d.%d.news" % self.version, os.R_OK):
+ f = open ("%d.%d.%d.news" % self.version)
+ self.news = f.read()
+ f.close()
+
## Finalizing the CVS tree
# Finalizing is different depending on whether the release is a beta
@@ -779,8 +820,7 @@ to the Release object in order."""
if verbose:
print "Generating announcements ..."
- self.writeDotContent()
- self.writeAnnouncePost()
+ self.writeAnnouncements()
def abstract (self, flags=Flags({})):
@@ -856,12 +896,11 @@ to the Release object in order."""
int(m.group(2)) != self.version[0]):
# FIXME: should be able to make this exception a warning
if int(m.group(4)) != self.version[2] - 1:
- self.showstoppers.append((ValueError, 'abstract',
- "Incorrect version in "
- + changesFile))
+ raise ValueError, "Incorrect version in " + changesFile
else:
- self.warnings.append (changesFile
- + " is incomplete! Don't
upload!!")
+ # FIXME: should collect serious warnings in a list for
+ # regurgitation at end
+ print changesFile + " is incomplete! Don't upload!!"
line = f.readline()
while line:
if verbose > 1:
@@ -1268,32 +1307,40 @@ Post to xemacs-beta (for betas and prere
Returns true if space insufficient, otherwise false.
`raiseOnInsufficient' if true means raise an error condition rather
- than return. If `verbose', print OK status. `dryRun' is
ignored."""
+ than return. If `verbose', print OK status. `dryRun' is ignored.
+
+ This only works on Unix. If invoked on another platform and verbose > 0,
+ reports a warning that the method is a dummy."""
flags = Flags(flags)
verbose = flags.val('verbose')
raiseOnInsufficient = flags.val('raiseOnInsufficient')
- vfsstat = os.statvfs(self.engineer.stage)
- avail = vfsstat[F_BAVAIL]/((1024*1024)/vfsstat[F_FRSIZE])
- # We need space for the full previous source tree, plus the current
- # source and generated files, plus the tarballs for upload.
- # Add 20% safety factor.
- # This is approximately correct for betas, which add 10MB for the
- # .elc and .info files, but lose 10MB of tarballs, too.
- # Currently ~175MB.
- p = self.project
- needs = 6*(2*p.sourceSize + p.buildSize + p.uploadSize)/5
- format = "insufficient staging space (%d) for release (needs %d)."
- if (needs > avail):
- print format % (avail,needs)
- if raiseOnInsufficient:
- raise ValueError, "Aborting!"
- else:
- return 1
- elif verbose:
- print "XRE> ... Space OK (%s/%s)." % (avail,needs)
- return 0
+ try:
+ vfsstat = os.statvfs(self.engineer.stage)
+ avail = vfsstat[F_BAVAIL]/((1024*1024)/vfsstat[F_FRSIZE])
+ # We need space for the full previous source tree, plus the current
+ # source and generated files, plus the tarballs for upload.
+ # Add 20% safety factor.
+ # This is approximately correct for betas, which add 10MB for the
+ # .elc and .info files, but lose 10MB of tarballs, too.
+ # Currently ~175MB.
+ p = self.project
+ needs = 6*(2*p.sourceSize + p.buildSize + p.uploadSize)/5
+ format = "insufficient staging space (%d) for release (needs
%d)."
+ if (needs > avail):
+ print format % (avail,needs)
+ if raiseOnInsufficient:
+ raise ValueError, "Aborting!"
+ else:
+ return 1
+ elif verbose:
+ print "XRE> ... Space OK (%s/%s)." % (avail,needs)
+ return 0
+ except AttributeError:
+ if verbose > 0:
+ print "XRE> ... Can't check space, please pray."
+ return 0
# FIXME: learn to use string ops on the list (join?) so that returning
# a redundant tuple is unneccesary.
@@ -1347,6 +1394,16 @@ Post to xemacs-beta (for betas and prere
e = self.engineer
p = self.project
+ # ensure configure is up to date
+ if verbose:
+ print "Updating configure: ",
+ # NB: cvs will not commit unless it's different (according to diff)
+ os.chdir(e.stage + "/" + self.stem)
+ execAndTrace(self.engineer.autoconf)
+ if verbose:
+ print "done."
+ os.chdir(e.stage)
+
def makeTarball (tarball, arguments, verbose = 1):
if os.access(tarball,os.F_OK):
os.unlink(tarball)
@@ -1377,17 +1434,17 @@ Post to xemacs-beta (for betas and prere
# build and clean leaving .elcs and .infos
# FIXME: *must* check error returns!!
# FIXME: all of these flags should be configured in Release and
- # Project objects
- additionalConfigureFlags = " --with-sound=none"
+ # Project objects ESPECIALLY WITH autobumpf 2.13/2.5x CONFLICT!!
+ additionalConfigureFlags = " --enable-sound=none"
testXEmacsAuto = " && make check"
testXEmacsOnX = " && LC_ALL=C src/xemacs -vanilla" \
+ " -eval '(sleep-for 2)' -kill"
ret = execAndTrace("cd %s" % dir \
- + " && ./configure --with-mule" \
- + " --with-dialogs=athena" \
- + " --with-widgets=athena" \
+ + " && ./configure --enable-mule" \
+ + " --enable-dialogs=athena" \
+ + " --enable-widgets=athena" \
+ " --with-athena=xaw" \
- + " --pdump" \
+ + " --enable-pdump" \
+ additionalConfigureFlags \
+ " && make depend" \
+ " && make" \
@@ -1397,15 +1454,6 @@ Post to xemacs-beta (for betas and prere
# FIXME: a broken make doesn't seem to return true
self.warnings.append("Error return (%s) from build!" % (ret.code))
- if verbose:
- print "Updating configure: ",
- # NB: cvs will not commit unless it's different (according to diff)
- os.chdir(e.stage + "/" + self.stem)
- execAndTrace(self.engineer.autoconf)
- if verbose:
- print "done."
- os.chdir(e.stage)
-
# make full tarball
tarball = dir + ".tar"
targets = " " + dir
@@ -1486,6 +1534,11 @@ Post to xemacs-beta (for betas and prere
## codename handling
+ def getSeriesFromCodenameFilename (self, flags = {}):
+ """We assume codename files live in etc/ and names are
plural."""
+ # flags not used
+
+ return self.codenameFile[4:-1]
def getCodenameFromFile (self, versionTuple, flags = {}):
@@ -1557,6 +1610,7 @@ Post to xemacs-beta (for betas and prere
file.close()
+ # FIXME this isn't really "validation"
def validateVersionDictionary (self, dryRun=0, verbose=0):
"""Validate the version dictionary.
@@ -1600,6 +1654,10 @@ Post to xemacs-beta (for betas and prere
if not match(codename_re, value):
self.versionDictionary[key] = '"%s"' %
(self.codename, )
self.warnings.append('codename updated to current')
+ elif key == 'xemacs_extra_name':
+ self.versionDictionary[key] = '""'
+ elif key == 'xemacs_release_date':
+ self.versionDictionary[key] =
date.today().strftime('"%Y-%m-%d"')
for field in self.versionStandardFields:
if self.versionDictionary[field] is None:
@@ -1668,7 +1726,7 @@ Post to xemacs-beta (for betas and prere
warning or error."""
# #### Maybe these variables should move to a config object?
- kindRE = r'(fix|update|new)'
+ kindRE = r'(fix|update|new|improve)'
sectionRE = r'(UI|Lisp API|internal|doc)'
platformRE = r'(Unix|(native )?Windows|Cygwin|GTK|Motif|Qt)'
itemRE = r'^-- '
@@ -1697,17 +1755,16 @@ Post to xemacs-beta (for betas and prere
if m:
if verbose:
print "Found initial version marker."
- ver = (int (m.group (2)), int (m.group (3)), int (m.group (4)))
- codename = m.group (5)
+ ver = (int(m.group(2)), int(m.group(3)), int(m.group(4)))
+ codename = m.group(5)
if ver == self.version:
- if not match (codename, self.codename):
- self.warnings.append ("codename differs in %s" \
- % self.changesFile)
+ if not match(codename, self.codename):
+ self.warnings.append("codename differs in %s" \
+ % self.changesFile)
else:
- message = "%s not up to date (expected %s, found %s)" \
- % (self.changesFile, self.version, ver)
- self.showstoppers.append ((ValueError, 'parseChangesFile',
- message))
+ raise ValueError, \
+ "%s not up to date (expected %s, found %s)" \
+ % (self.changesFile, self.version, ver)
line = f.readline()
while line:
@@ -1765,9 +1822,8 @@ Post to xemacs-beta (for betas and prere
if ver == self.previousVersion:
break
else:
- self.showstoppers.append ((ValueError, 'parseChangesFile',
- "incorrect version marker in
%s"
- % self.changesFile))
+ raise ValueError, "incorrect version marker in %s" \
+ % self.changesFile
elif not match (r"^\s*$", line):
self.warnings.append ("unparsable line in %s:\n %s" \
% (self.changesFile, line))
@@ -2060,35 +2116,99 @@ Post to xemacs-beta (for betas and prere
+ strip(contents) + "\n\n"
- def writeDotContent (self):
- """Write an #.#.#.content file in the staging directory.
+ def writeAnnouncements (self):
+ """Write #.#.#.content and #.#.#.announce files in the staging
+ directory.
Requires codename and herald to be previously generated."""
- header = """\
-%%title%%
-%s
-%%author%%
+ map = {}
+ if self.announceAddress:
+ map['announceAddress'] = self.announceAddress
+ else:
+ map['announceAddress'] = 'xemacs-announce(a)xemacs.org'
+ map['herald'] = self.herald[:-1] # strip the period
+ #### These probably have ...String versions.
+ map['version'] = "%d.%d.%d" % self.version
+ map['previousVersion'] = "%d.%d.%d" % self.previousVersion
+ map['codename'] = self.codename
+ map['previousCodename'] = self.getCodenameFromFile
(self.previousVersion)
+ map['series'] = self.getSeriesFromCodenameFilename ()
+ if self.reliability:
+ map['reliability'] = self.reliability
+ else:
+ map['reliability'] = 'beta'
+ map['engineer'] = self.engineer.fullName
+ map['role'] = self.engineer.comment
+ map['alias'] = self.engineer.projectAlias
+ map['domain'] = self.project.mailDomain
+ #### This won't work for 21.4!
+ map['releaseSpec'] = "-r r%d-%d-%d" % self.version
+ map['currentSpec'] = "-r r%d-%d-current-beta" %
self.version[:2]
+ map['branchSpec'] = "-A"
+ ordinals = [ 'first', 'second', 'third',
'fourth', 'fifth', 'sixth', \
+ 'seventh', 'eighth', 'ninth',
'tenth', 'eleventh', \
+ 'twelfth', 'thirteenth', 'fourteenth',
'fifteenth', \
+ 'sixteenth', 'seventeenth', 'eighteenth',
'nineteenth', \
+ 'twentieth', 'twenty-first',
'twenty-second',
+ 'twenty-third', 'twenty-fourth',
'twenty-fifth',
+ 'twenty-sixth', 'twenty-seventh',
'twenty-eighth',
+ 'twenty-ninth', 'thirtieth' ]
+ map['ordinal'] = ordinals[self.version[2]]
+
+ # genpage wrapper
+ # **** You probably should NOT replace these. ****
+ if self.postamble is not None:
+ postamble = self.postamble
+ else:
+ postamble = """</pre>\n\n"""
+ if self.preamble is not None:
+ preamble = self.preamble
+ else:
+ preamble = formatNamedVariables ("""\
+%title%
+%(herald)s
+%author%
automatically generated (with release announcement) by xre.py
-%%main%%
- <h1><a name="announcement">XEmacs</a>
%s</h1>
+%main%
+ <h1><a
name="announcement">%(herald)s</a></h1>
<p>goto announcement,
<a href="#summary">summary</a>,
<a href="#changes">changes</a></p>
<pre xml:space="preserve">
-To: xemacs-announce(a)xemacs.org
-From: "Stephen J. Turnbull, XEmacs 21.4 Release Manager"
&lt;stephen(a)xemacs.org&gt;
-Subject: %s.
+""", map)
+
+ # **** You usually shouldn't need to replace this. ****
+ if self.header is not None:
+ header = formatNamedVariables (self.header, map)
+ else:
+ header = formatNamedVariables ("""\
+To: %(announceAddress)s
+From: "%(engineer)s, %(role)s" <%(alias)s@%(domain)s>
+Subject: %(herald)s.
Organization: The XEmacs Project
+""", map)
+ if self.intro is not None:
+ intro = formatNamedVariables (self.intro, map)
+ else:
+ intro = formatNamedVariables ("""\
+* %(herald)s.
+ "%(codename)s" is the %(ordinal)s in the %(series)s series.
-* %s.
- "%s" is the %s in the OXYMORON series.
+The successor to XEmacs %(previousVersion)s "%(previousCodename)s",\
+ "%(codename)s" adds """, map)
-Relative to XEmacs %d.%d.%d "%s", "%s"
-<INSERT NEWS HERE>
+ if self.news is not None:
+ news = formatNamedVariables (self.news, map)
+ else:
+ news = "<INSERT NEWS HERE>"
+ if self.blurb is not None:
+ blurb = formatNamedVariables (self.blurb, map)
+ else:
+ blurb = """\
The first release in this series, XEmacs 21.4.0 "Solid Vapor",
contained a large number of improvements and extensions to the current
stable version, XEmacs 21.1.14. For more information about the
@@ -2103,9 +2223,13 @@ and the release planning page,
For general information about XEmacs, the developers, and the user
community, see our home page,
-
http://www.xemacs.org/
+
http://www.xemacs.org/"""
-* XEmacs %d.%d.%d is "gamma" software.
+ if self.disclaimer is not None:
+ disclaimer = formatNamedVariables (self.disclaimer, map)
+ else:
+ disclaimer = formatNamedVariables ("""\
+* XEmacs %(version)s is "%(reliability)s" software.
The usual "no warranty" disclaimer (see etc/WARRANTY, sections 10 and
11) applies. However, we are now experimenting with a level of
@@ -2115,11 +2239,15 @@ code base with all their editing needs.
sufficiently stable that they've moved on to the development branch
again in search of some excitement.
-After several months of testing, XEmacs %d.%d.%d has been shown
+After several months of testing, XEmacs %(version)s has been shown
sufficiently stable to be recommended to all users. However, there
still remain a few outstanding problems that must be fixed before we
-retire 21.1.
+retire 21.1.""", map)
+ if self.download is not None:
+ download = formatNamedVariables (self.download, map)
+ else:
+ download = formatNamedVariables ("""\
* Availability
Anonymous ftp:
@@ -2128,11 +2256,11 @@ Anonymous ftp:
See
http://www.xemacs.org/Install/. (Note that the tarball breakdown
is slightly different from that implied for 21.1. For 21.4, the
-xemacs-%d.%d.%d.tar.gz tarball contains the full contents of the
-xemacs-%d.%d.%d-{src,elc,info}.tar.gz tarballs.)
+xemacs-%(version)s.tar.gz tarball contains the full contents of the
+xemacs-%(version)s-{src,elc,info}.tar.gz tarballs.)
-If you already have a %d.%d.%d source tree, a patchkit is available in
-xemacs-%d.%d.%d-%d.%d.%d.patch.gz. This does not update .elcs or .infos,
+If you already have a %(previousVersion)s source tree, a patchkit is available in
+xemacs-%(previousVersion)s-%(version)s.patch.gz. This does not update .elcs or
.infos,
they will be rebuilt when you make XEmacs. If you have an earlier
version, you can repeatedly apply patchkits.
@@ -2166,36 +2294,27 @@ On platforms with a Bourne shell and fin
will convert your entire tree.
-Tags are also the same; to update to release %d.%d.%d, use the release
-tag "r%d-%d-%d". To set a sticky tag which will always update to the
-current release, use the branch tag "release-21-4".
+Tags are also the same; to update to release %(version)s, use the release
+tag "%(releaseSpec)s". To update to the current release, use the flag
+"%(currentSpec)s". To update to the latest commits in CVS, use the flag
+"%(branchSpec)s".
For more details, see
http://www.xemacs.org/Develop/cvsaccess.html
Unique branch and release tags are assigned to the Windows branch.
-See Andy Piper's announcements and release notes for
details.</pre>\n\n"""
+See Andy Piper's announcements and release notes for details.""",
map)
- h = self.herald[:-1] # strip the period
- v = self.version
- pv = self.previousVersion
- c = self.codename
- pc = self.getCodenameFromFile (pv)
- ordinals = [ 'first', 'second', 'third',
'fourth', 'fifth', 'sixth', \
- 'seventh', 'eighth', 'ninth',
'tenth', 'eleventh', \
- 'twelfth', 'thirteenth', 'fourteenth',
'fifteenth', \
- 'sixteenth', 'seventeenth', 'eighteenth',
'nineteenth', \
- 'twentieth' ]
- o = ordinals[v[2]]
- parms = (h, h, h, h, c, o) + pv + (pc, c) + v + v + v \
- + v + pv + pv + v + v + v
-
- html = header % parms
+ post = header + "\n\n\n" + intro + news + "\n\n" + \
+ blurb + "\n\n" + disclaimer + "\n\n" + download +
"\n\n\n"
+ html = preamble + post + postamble
+ post = substituteHTMLEntities (post, HTMLEntityDictionary)
self.parseChangesFile() # FIXME: this should only be done once
#self.sortChanges()
html += self.changesToHTML()
+ post += self.changesToText()
# FIXME: this header should be generated
# FIXME: ChangeLogs should be sorted
@@ -2206,6 +2325,13 @@ See Andy Piper's announcements and relea
changes</p>
<ul>
<li>ChangeLog Entries from <a
href="#ChangeLog">ChangeLog</a></li>
+""" % (self.versionString, self.codename)
+ v = self.version
+ if v[0] > 21 or v[0] == 21 and (v[1] > 5 or v[1] == 5 and v[2] > 15):
+ html += """\
+ <li>ChangeLog Entries from <a
href="#etc:ChangeLog">etc/ChangeLog</a></li>
+"""
+ html += """\
<li>ChangeLog Entries from <a
href="#lib-src:ChangeLog">lib-src/ChangeLog</a></li>
<li>ChangeLog Entries from <a
href="#lisp:ChangeLog">lisp/ChangeLog</a></li>
<li>ChangeLog Entries from <a
href="#lwlib:ChangeLog">lwlib/ChangeLog</a></li>
@@ -2214,9 +2340,14 @@ See Andy Piper's announcements and relea
<li>ChangeLog Entries from <a
href="#nt:ChangeLog">nt/ChangeLog</a></li>
<li>ChangeLog Entries from <a
href="#src:ChangeLog">src/ChangeLog</a></li>
<li>ChangeLog Entries from <a
href="#tests:ChangeLog">tests/ChangeLog</a></li>
- </ul>\n\n""" % (self.versionString, self.codename)
+ </ul>\n\n"""
+
for log in self.findChangeLogs ("."):
html += self.changeLogToHTML (log)
+ # FIXME: this header should be generated
+ # FIXME: ChangeLogs should be sorted
+ for log in self.findChangeLogs ("."):
+ post += self.changeLogToText (log)
html += """\
<p>goto <a
href="#announcement">announcement</a>,
@@ -2241,146 +2372,7 @@ sgml-local-ecat-files:nil
End:
-->
"""
-
- stage = self.engineer.stage
- f = open ("%s/%s.content" % (stage, self.versionString),
"w")
- f.write (html)
- f.close()
-
-
- def writeAnnouncePost (self):
- """Write an #.#.#.announce file in the staging directory.
-
- Requires codename and herald to be previously generated."""
-
- header = """\
-To: xemacs-announce(a)xemacs.org
-From: "Stephen J. Turnbull, XEmacs 21.4 Release Manager"
<stephen(a)xemacs.org>
-Subject: %s.
-Organization: The XEmacs Project
-
-
-* %s.
- "%s" is the %s in the OXYMORON series.
-
-
-Relative to XEmacs %d.%d.%d "%s", "%s"
-<INSERT NEWS HERE>
-
-The first release in this series, XEmacs 21.4.0 "Solid Vapor",
-contained a large number of improvements and extensions to the current
-stable version, XEmacs 21.1.14. For more information about the
-OXYMORON series, see etc/NEWS, the initial release announcement
-
-
http://www.xemacs.org/Releases/21.4.0.html
-
-and the release planning page,
-
-
http://www.xemacs.org/Releases/Public-21.2/
-
-For general information about XEmacs, the developers, and the user
-community, see our home page,
-
-
http://www.xemacs.org/
-
-* XEmacs %d.%d.%d is "gamma" software.
-
-The usual "no warranty" disclaimer (see etc/WARRANTY, sections 10 and
-11) applies. However, we are now experimenting with a level of
-stability intermediate between "beta" and "stable", dubbed
"gamma".
-At this point all the developers and our beta testers trust the 21.4
-code base with all their editing needs. Many have found it
-sufficiently stable that they've moved on to the development branch
-again in search of some excitement.
-
-After several months of testing, XEmacs %d.%d.%d has been shown
-sufficiently stable to be recommended to all users. However, there
-still remain a few outstanding problems that must be fixed before we
-retire 21.1.
-
-* Availability
-
-Anonymous ftp:
-
-
ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.4
-
-See
http://www.xemacs.org/Install/. (Note that the tarball breakdown
-is slightly different from that implied for 21.1. For 21.4, the
-xemacs-%d.%d.%d.tar.gz tarball contains the full contents of the
-xemacs-%d.%d.%d-{src,elc,info}.tar.gz tarballs.)
-
-If you already have a %d.%d.%d source tree, a patchkit is available in
-xemacs-%d.%d.%d-%d.%d.%d.patch.gz. This does not update .elcs or .infos,
-they will be rebuilt when you make XEmacs. If you have an earlier
-version, you can repeatedly apply patchkits.
-
-Also, if you don't have the packages yet, see
-
-
http://www.xemacs.org/Documentation/packageGuide.html.
-
-Windows branch and installers:
-
-The Windows branch continues to have a few changes not yet included in
-the mainline. It is preferred to the mainline for Windows users.
-
-Anonymous (pserver) CVS:
-
-Anonymous CVS is available. We are very grateful to the staff at our
-host, SunSITE.dk, for a lot of help and quick reponse to all our
-requests.
-
-If you haven't used XEmacs CVS recently, we moved the repository
-before the 21.4.6 release. The repository structure is the same as
-before, so it should be possible to reuse an existing checked-out CVS
-tree.
-
-Take care that your Root is set correctly to
-
- CVSROOT=:pserver:cvs@cvs.xemacs.org:/pack/xemacscvs
-
-On platforms with a Bourne shell and find available, something like
-
- for r in `find . -name Root`; do echo $CVSROOT > $r; done
-
-will convert your entire tree.
-
-Tags are also the same; to update to release %d.%d.%d, use the release
-tag "r%d-%d-%d". To set a sticky tag which will always update to the
-current release, use the branch tag "release-21-4".
-
-For more details, see
-
-
http://www.xemacs.org/Develop/cvsaccess.html
-
-Unique branch and release tags are assigned to the Windows branch.
-See Andy Piper's announcements and release notes for
details.\n\n"""
-
- h = self.herald[:-1] # strip the period
- v = self.version
- pv = self.previousVersion
- c = self.codename
- pc = self.getCodenameFromFile (pv)
- ordinals = [ 'first', 'second', 'third',
'fourth', 'fifth', 'sixth', \
- 'seventh', 'eighth', 'ninth',
'tenth', 'eleventh', \
- 'twelfth', 'thirteenth', 'fourteenth',
'fifteenth', \
- 'sixteenth', 'seventeenth', 'eighteenth',
'nineteenth', \
- 'twentieth' ]
- o = ordinals[v[2]]
- parms = (h, h, c, o) + pv + (pc, c) + v + v + v \
- + v + pv + pv + v + v + v
-
- post = header % parms
-
- self.parseChangesFile() # FIXME: this should only be done once
- #self.sortChanges()
- post += self.changesToText()
-
- # FIXME: this header should be generated
- # FIXME: ChangeLogs should be sorted
- for log in self.findChangeLogs ("."):
- post += self.changeLogToText (log)
-
- post += """--
+ post += """--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
@@ -2388,6 +2380,9 @@ University of Tsukuba
"""
stage = self.engineer.stage
+ f = open ("%s/%s.content" % (stage, self.versionString),
"w")
+ f.write (html)
+ f.close()
f = open ("%s/%s.announce" % (stage, self.versionString),
"w")
f.write (post)
f.close()
@@ -2871,6 +2866,36 @@ def printObject (objectName):
print "Contents of", objectName
for att in dir(eval(objectName)):
print att, ':', eval(objectName + "." + att)
+
+
+HTMLEntityDictionary = { '>' : '>', '<' :
'<', '&' : '&',
+ '&etago' : '</' }
+
+def substituteHTMLEntities (string, map):
+ """Substitute strings for HTML entities in STRING according to MAP.
+ MAP is a dictionary with keys being entities (including the leading
+ ampersand and trailing semicolon) and values being strings.
+ #### Currently limited to ASCII values."""
+
+ for (entity, subst) in map.iteritems():
+ string = replace (string, entity, subst)
+ return string
+
+
+def formatNamedVariables (string, map):
+ """Substitute strings for variable references in STRING according to
MAP.
+ MAP is a dictionary with keys being variable names (should be valid
+ Python identifiers) and values arbitrary strings. A variable reference
+ looks like "%(identifier)s".
+ #### There is no way to escape an apparent variable reference.
+ #### If a replacement creates a variable reference, it may or may not
+ be processed, depending on the order in which Python presents the
+ items in MAP.
+ #### Currently limited to ASCII values."""
+
+ for (entity, subst) in map.iteritems():
+ string = replace (string, "%("+entity+")s", subst)
+ return string
#### data initialization