=head1 NAME release_managers_guide - Releasing a new version of perl 5.x XXX as of Jul 2009, this file is still a work-in-progress - DAPM =head1 SYNOPSIS This document describes the series of tasks required - some automatic, some manual - to produce a perl release of some description, be that a snaphot, release candidate, or final release. The release process is primarily executed by the current pumpking. This document both helps as a check-list for the pumpking and is a base for ideas on how the various tasks could be automated or distributed. The outline of a release cycle is as follows: (5.10.1 is released, and post-release action have been done) ...time passes... an occasional snapshot is released, that still identifies itself as 5.10.1 ...time passes... a few weeks before the release, a number of steps are performed, including bumping the version to 5.10.2 perl-5.10.2-RC1 is released perl-5.10.2 is released post-release actions are performed, including creating new perl5103delta.pod ... the cycle continues ... =head1 DETAILS =head2 Building a snapshot A snapshot is intended to encourage in-depth testing from time-to-time, for example after a key point in the stabilisation of a branch. It requires less steps than a full release, and the version number of perl in the tarball will usually still be the old one. =over 4 =item * As there are no regular smokes [ XXX yet - please fix?] find out about the state of VMS. If it's bad, think again. =item * Rebuild META.yml: $ rm META.yml $ make META.yml and commit it if it's changed. =item * Check that the manifest is sorted and correct: $ make distclean $ perl Porting/manisort $ perl Porting/manicheck =item * If this is a release candidate or final release, add an entry to F with the current date, e.g. 5.8.9-RC1 2008-Nov-10 Make sure the correct pumpking is listed, and if this is your first time, append your name to C. =item * Build perl, then make sure it passes its own test suite, and installs. =item * Create a tarball. Use the C<-s> option to specify a suitable suffix for the tarball and directory name: $ cd root/of/perl/tree $ git clean -xdf # make sure perl and git agree on files $ perl Porting/makerel -s `git describe` # for a snapshot $ perl Porting/makerel -s RC1 # for a release candidate $ perl Porting/makerel # for a final release This creates the directory F<../perl-x.y.z-RC1> or similar, copies all the MANIFEST files into it, sets the correct permissions on them, adds DOS line endings to some, then tars it up as F<../perl-x.y.z-RC1.tar.gz>. XXX if we go for extra tags and branches stuff, then add the extra details here =item * Copy the tarball to a web server somewhere you have access to. =item * Download the tarball to some other machine (for a release candidate, to two or more servers: IRC is good for this). =item * Check that C<./Configure -des && make all test> works in one place. =item * Check that C<./Configure ... && make all test_harness install> works. =item * Check that the output of C and C are as expected, especially as regards version numbers, patch and/or RC levels, and @INC paths. Note that the results may be different without a F<.git/> directory, which is why you should test from the tarball. =item * Bootstrap the CPAN client on the clean install. =item * Install CPANPLUS. XXX pick something new; this is now bundled =item * Bootstrap the CPANPLUS client. =item * Install an XS module. =item * If all is well, announce the snaphot to p5p. (For a release candidate, instead follow the further steps described later.) =back =head2 Actions prior to the first release candidate A week or two before the first release candidate, there are some additional tasks you should perform (actually, some of these should be done regularly anyway, but they definitely need doing now): =over 4 =item * Check F for consistency; both these commands should produce no output: perl Porting/Maintainers --checkmani perl Porting/Maintainers --checkmani lib/ ext/ =item * Ensure that dual-life CPAN modules are synchronised with CPAN. Basically, run the following: ./perl -Ilib Porting/core-cpan-diff -a -o /tmp/corediffs to see any inconsistencies between the core and CPAN versions of distros, then fix the core, or cajole CPAN authors as appropriate. See also the C<-d> and C<-v> options for more detail. You'll probably want to use the C<-c cachedir> option to avoid repeated CPAN downloads. To see which core distro versions differ from the current CPAN versions: ./perl -Ilib Porting/core-cpan-diff -x -a =item * Ensure dual-life CPAN modules are stable, which comes down to: for each module that fails its regression tests on $current did it fail identically on $previous? if yes, "SEP" (Somebody Else's Problem) else work out why it failed (a bisect is useful for this) attempt to group failure causes for each failure cause is that a regression? if yes, figure out how to fix it (more code? revert the code that broke it) else (presumably) it's relying on something un-or-under-documented should the existing behaviour stay? yes - goto "regression" no - note it in perldelta as a significant bugfix (also, try to inform the module's author) =item * Similarly, monitor the smoking of core tests, and try to fix. =item * Run F to compare the current source tree with the previous version to check for for modules that have identical version numbers but different contents, e.g.: $ cd ~/some-perl-root $ ./perl -Ilib Porting/cmpVERSION.pl -xd ~/my_perl-tarballs/perl-5.10.0 . then bump the version numbers of any non-dual-life modules that have changed since the previous release, but which still have the old version number. If there is more than one maintenance branch (e.g. 5.8.x, 5.10.x), then compare against both. Note that some of the files listed may be generated (e.g. copied from ext/ to lib/, or a script like lib/lib_pm.PL is run to produce lib/lib.pm); make sure you edit the correct file! Once all version numbers have been bumped, re-run the checks. Then run again without the -x option, to check that dual-life modules are also sensible. =item * Get perldelta in a mostly finished state. XXX expand =item * Bump the perl version number (e.g. from 5.10.0 to 5.10.1). There is a tool to semi-automate this process. It works in two stages. First, it generates a list of suggested changes, which you review and edit; then you feed this list back and it applies the edits. So, first scan the source dir looking for likely candidates: $ Porting/bump-perl-version -s 5.10.0 5.10.1 > /tmp/scan This produces a file containing a list of suggested edits, eg: NetWare/Makefile 89: -MODULE_DESC = "Perl 5.10.0 for NetWare" +MODULE_DESC = "Perl 5.10.1 for NetWare" i.e. in the file F, line 89 would be changed as shown. Review the file carefully, and delete any -/+ line pairs that you don't want changing. Remember that this tool is largely just grepping for '5.10.0' or whatever, so it will generate false positives. Be careful not change text like "this was fixed in 5.10.0"! Then run: $ Porting/bump-perl-version -u < /tmp/scan which will update all the files shown; then commit the changes. Be particularly careful with F, which contains a mixture of C<5.10.0>-type strings, some of which need bumping on every release, and some of which need to be left. Also note that this tool currently only performs a single change per line, so in particular, this line in README.vms needs special handling: rename perl-5^.10^.1.dir perl-5_10_1.dir =item * Update the F file to contain the git log command which would show all the changes in this release. You will need assume the existence of a not-yet created tag for the forthcoming release; e.g. git log ... perl-5.10.0..perl5.12.0 Due to warts in the perforce-to-git migration, some branches require extra exclusions to avoid other branches being pulled in. Make sure you have the correct incantation: replace the not-yet-created tag with C and see if git log produces roughly the right number of commits across roughly the right time period. =item * Check some more build configurations, e.g. -Duseshrplib -Dd_dosuid make suidperl Check that setuid installs works (for < 5.11.0 only). XXX any other configs? =item * Make sure you have a PAUSE account suitable for uploading a perl release. If you don't have a PAUSE account, then request one: https://pause.perl.org/pause/query?ACTION=request_id Check that your account is allowed to upload perl distros: goto https://pause.perl.org/, login, then select 'upload file to CPAN'; there should be a "For pumpkings only: Send a CC" tickbox. If not, ask Andreas to add your ID to the list of people allowed to upload something called perl. =item * Update F, using the C script, and if necessary, update the script to include new alias mappings. XXX This script is currently broken (7/2009). It needs updating to work with git and a lack of Changes files. =back =head2 Building a release candidate (At this point you should already have performed the actions described in L.) =over 4 =item * Re-read the perldelta to try to find any embarrassing typos and thinkos; remove any C or C flags; and run through pod and spell checkers. [XXX show how] =item * Update patchlevel.h to add a C<-RC1>-or-whatever string; or, if this is a final release, remove it. [ XXX how now?? see 34813 for old way ] =item * Update C. Note that if this is a maint release, you should run the following actions from the maint directory, but edit the C in I and subsequently cherry-pick it. First, in order to update the C<%upstream> and C<%bug_tracker> hashes, the C script requires you to have a local CPAN mirror. See http://www.cpan.org/misc/cpan-faq.html#How_mirror_CPAN for more details, but basically: $ mkdir ~/cpan-mirror $ rsync -av --delete ftp.funet.fi::CPAN ~/cpan-mirror/ (and re-run the rsync each time you need it to be up-to-date). [XXX this really needs fixing to not require a whole CPAN mirror] If necessary, bump C<$VERSION> (there's no need to do this for every RC; in RC1, bump the version to a new clean number that will appear in the final release, and leave as-is for the later RCs and final). Then do $ cd ~/perl/root; make perl $ ./perl -Ilib Porting/corelist.pl ~/cpan-mirror/ > /tmp/corelist This creates a file that looks something like 5.010001 => { 'AnyDBM_File' => '1.00', ... }, %upstream = ( 'App::Prove' => undef, ... ); %bug_tracker = ( 'App::Prove' => 'http://rt.cpan.org/...', ... ); Cut and paste these tables into F: the module version list should be appended as the last entry in the C<%version> hash (or replaced, if we've already added it for an earlier release candidate), while the existing C<%upstream> and C<%bug_tracker> hashes should be replaced with the new versions. Edit the version number in the new C<< 'Module::CoreList' => 'X.YZ' >> entry, as that is likely to reflect the previous version number. Then, add the current perl version to the C paragraph. Add or update an entry to the C<%released> hash, including today's date (if this is just a release candidate, set the date to '????-??-??'). =item * Follow the instructions in the section L, then carry on with the extra steps that follow here. =item * Disarm the patchlevel.h change [ XXX expand ] =item * Wait for the smoke tests to catch up with the commit which this release is based on (or at least the last commit of any consequence). Then check that the smoke tests pass (particularly on Win32). If not, go back and fix things. =item * Once smoking is okay, upload it to PAUSE. This is the point of no return. You may wish to create a .bz2 version of the tarball and upload that too. =item * create a tag [XXX and branches and stuff ????], e.g.: $ git tag perl-5.10.1-RC1 -m'Release Candidate 1 of Perl 5.10.1' $ git push origin tag perl-5.10.1-RC1 =item * Mail p5p to announce it, with a quote you prepared earlier. =item * Wait 24 hours or so, then post the announcement to use.perl.org. (if you don't have access rights to post news, ask someone like Rafael to do it for you.) =back =head2 Making a final release At this point you should have a working release candidate with few or no changes since. It's essentially the same procedure as for making a release candidate, but with a whole bunch of extra post-release steps. =over 4 =item * Follow the same steps as for making a release candidate, then =item * Ask Jarkko to update http://www.cpan.org/src/README.html and Rafael to update http://dev.perl.org/perl5/ =item * Create a new empty perlNNNdelta.pod file for the current release + 1; see F. [ XXX Perhaps we should have an empty template file we can copy in. ] In addition, edit F, adding the new entry as 'D', and unmark previous entry as 'D', then run C to update the following files: MANIFEST pod/perl.pod win32/pod.mak vms/descrip_mms.template (F still needs a manual edit to bump the C entry - it would be good for someone to figure out the fix.) and change perlNNNdelta references to the new version in these files INSTALL win32/Makefile.mk win32/Makefile Makefile.SH README Also, edit the previous delta file to change the C from C to C. These two lists of files probably aren't exhaustive; do a recursive grep on the previous filename to look for suitable candidates. (see 16410843ea for an example). =item * If this was a major release, then =over =item * bump the version, e.g. 5.12.0 to 5.13.0; =item * [ XXX probably lots more stuff to do, including perldelta, C ] =item * Create a new maint branch with an empty Porting/mergelog file [ XXX and lots of other stuff too, probably ] =back =item * Copy the perlNNNdelta.pod for this release into the other branches, and remember to update these files on those branches too: MANIFEST pod.lst pod/perl.pod vms/descrip_mms.template win32/pod.mak (see fc5be80860 for an example). =item * Make sure any recent F entries are copied to F on other branches; typically the RC* and final entries, e.g. 5.8.9-RC1 2008-Nov-10 5.8.9-RC2 2008-Dec-06 5.8.9 2008-Dec-14 =item * Remind the current maintainer of C to push a new release to CPAN. =back =head1 SOURCE Based on http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2009-05/msg00608.html, plus a whole bunch of other sources, including private correspondence. =cut