reminder: update Module::CoreList when bumping version number
[p5sagit/p5-mst-13.2.git] / Porting / release_managers_guide.pod
CommitLineData
7277a900 1=head1 NAME
2
3release_managers_guide - Releasing a new version of perl 5.x
4
c67d51c3 5As of August 2009, this file is mostly complete, although it is missing
6some detail on doing a major release (e.g. 5.10.0 -> 5.12.0). Note that
d60a1044 7things change at each release, so there may be new things not covered
8here, or tools may need updating.
f6af4394 9
7277a900 10=head1 SYNOPSIS
11
f6af4394 12This document describes the series of tasks required - some automatic, some
13manual - to produce a perl release of some description, be that a snaphot,
8c35d285 14release candidate, or final, numbered release of maint or blead.
f6af4394 15
8c35d285 16The release process has traditionally been executed by the current
ee76d676 17pumpking. Blead releases from 5.11.0 forward are made each month on the
1820th by a non-pumpking release engineer. The release engineer roster
19and schedule can be found in Porting/release_schedule.pod.
7277a900 20
8c35d285 21This document both helps as a check-list for the release engineer
22and is a base for ideas on how the various tasks could be automated
23or distributed.
7277a900 24
636a1918 25The outline of a typical release cycle is as follows:
f6af4394 26
636a1918 27 (5.10.1 is released, and post-release actions have been done)
f6af4394 28
29 ...time passes...
30
31 an occasional snapshot is released, that still identifies itself as
32 5.10.1
33
34 ...time passes...
35
36 a few weeks before the release, a number of steps are performed,
37 including bumping the version to 5.10.2
636a1918 38
39 ...a few weeks passes...
46743ef7 40
f6af4394 41 perl-5.10.2-RC1 is released
42
43 perl-5.10.2 is released
44
45 post-release actions are performed, including creating new
46 perl5103delta.pod
47
48 ... the cycle continues ...
7277a900 49
50=head1 DETAILS
51
8c35d285 52Some of the tasks described below apply to all four types of
53release of Perl. (snapshot, RC, final release of maint, final
54release of blead). Some of these tasks apply only to a subset
55of these release types. If a step does not apply to a given
56type of release, you will see a notation to that effect at
57the beginning of the step.
58
59=head2 Release types
60
61=over 4
62
63=item Snapshot
64
65A snapshot is intended to encourage in-depth testing from time-to-time,
66for example after a key point in the stabilisation of a branch. It
67requires fewer steps than a full release, and the version number of perl in
68the tarball will usually be the same as that of the previous release.
69
70=item Release Candidate (RC)
71
d60a1044 72A release candidate is an attempt to produce a tarball that is a close as
73possible to the final release. Indeed, unless critical faults are found
74during the RC testing, the final release will be identical to the RC
75barring a few minor fixups (updating the release date in F<perlhist.pod>,
76removing the RC status from F<patchlevel.h>, etc). If faults are found,
77then the fixes should be put into a new release candidate, never directly
78into a final release.
8c35d285 79
80=item Stable/Maint release
81
82At this point you should have a working release candidate with few or no
83changes since.
84
85It's essentially the same procedure as for making a release candidate, but
86with a whole bunch of extra post-release steps.
87
88=item Blead release
89
90It's essentially the same procedure as for making a release candidate, but
91with a whole bunch of extra post-release steps.
92
93=back
7277a900 94
fd838dcf 95=head2 Prerequisites
96
97Before you can make an official release of perl, there are a few
98hoops you need to jump through:
99
100=over 4
101
8c35d285 102=item PAUSE account
103
104I<SKIP this step for SNAPSHOT>
fd838dcf 105
106Make sure you have a PAUSE account suitable for uploading a perl release.
107If you don't have a PAUSE account, then request one:
108
109 https://pause.perl.org/pause/query?ACTION=request_id
110
111Check that your account is allowed to upload perl distros: goto
b386fa44 112L<https://pause.perl.org/>, login, then select 'upload file to CPAN'; there
fd838dcf 113should be a "For pumpkings only: Send a CC" tickbox. If not, ask Andreas
114König to add your ID to the list of people allowed to upload something
115called perl. You can find Andreas' email address at:
4d2c8158 116
fd838dcf 117 https://pause.perl.org/pause/query?ACTION=pause_04imprint
118
fdabea7a 119=item search.cpan.org
120
121Make sure that search.cpan.org knows that you're allowed to upload
122perl distros. Contact Graham Barr to make sure that you're on the right
123list.
124
8c35d285 125=item CPAN mirror
126
127Some release engineering steps require a full mirror of the CPAN.
128Work to fall back to using a remote mirror via HTTP is incomplete
129but ongoing. (No, a minicpan mirror is not sufficient)
130
131=item git checkout and commit bit
fd838dcf 132
133You will need a working C<git> installation, checkout of the perl
134git repository and perl commit bit. For information about working
135with perl and git, see F<pod/perlrepository.pod>.
136
137If you are not yet a perl committer, you won't be able to make a
138release. Have a chat with whichever evil perl porter tried to talk
139you into the idea in the first place to figure out the best way to
140resolve the issue.
141
f6af4394 142
8c35d285 143=item Quotation for release announcement epigraph
f6af4394 144
8c35d285 145I<SKIP this step for SNAPSHOT and RC>
f6af4394 146
8c35d285 147For a numbered blead or maint release of perl, you will need a quotation
148to use as an epigraph to your release announcement. (There's no harm
149in having one for a snapshot, but it's not required).
46743ef7 150
f6af4394 151
152=back
153
f6af4394 154
2e831dfd 155=head2 Building a release - advance actions
8c35d285 156
157The work of building a release candidate for a numbered release of
158perl generally starts several weeks before the first release candidate.
52a66c2c 159Some of the following steps should be done regularly, but all I<must> be
160done in the run up to a release.
7277a900 161
162=over 4
163
f6af4394 164=item *
165
8c35d285 166I<You MAY SKIP this step for SNAPSHOT>
167
f6af4394 168Ensure that dual-life CPAN modules are synchronised with CPAN. Basically,
169run the following:
170
db3f805e 171 $ ./perl -Ilib Porting/core-cpan-diff -a -o /tmp/corediffs
7277a900 172
f6af4394 173to see any inconsistencies between the core and CPAN versions of distros,
174then fix the core, or cajole CPAN authors as appropriate. See also the
175C<-d> and C<-v> options for more detail. You'll probably want to use the
176C<-c cachedir> option to avoid repeated CPAN downloads.
7277a900 177
f6af4394 178To see which core distro versions differ from the current CPAN versions:
7277a900 179
db3f805e 180 $ ./perl -Ilib Porting/core-cpan-diff -x -a
7277a900 181
52a66c2c 182If you are making a maint release, run C<core-cpan-diff> on both blead and
636a1918 183maint, then diff the two outputs. Compare this with what you expect, and if
184necessary, fix things up. For example, you might think that both blead
185and maint are synchronised with a particular CPAN module, but one might
186have some extra changes.
187
f6af4394 188=item *
7277a900 189
8c35d285 190I<You MAY SKIP this step for SNAPSHOT>
191
f6af4394 192Ensure dual-life CPAN modules are stable, which comes down to:
7277a900 193
194 for each module that fails its regression tests on $current
f6af4394 195 did it fail identically on $previous?
196 if yes, "SEP" (Somebody Else's Problem)
197 else work out why it failed (a bisect is useful for this)
7277a900 198
199 attempt to group failure causes
200
201 for each failure cause
f6af4394 202 is that a regression?
203 if yes, figure out how to fix it
204 (more code? revert the code that broke it)
205 else
206 (presumably) it's relying on something un-or-under-documented
207 should the existing behaviour stay?
208 yes - goto "regression"
209 no - note it in perldelta as a significant bugfix
210 (also, try to inform the module's author)
1aff5354 211
f6af4394 212=item *
7277a900 213
8c35d285 214I<You MAY SKIP this step for SNAPSHOT>
215
f6af4394 216Similarly, monitor the smoking of core tests, and try to fix.
7277a900 217
f6af4394 218=item *
7277a900 219
8c35d285 220I<You MAY SKIP this step for SNAPSHOT>
221
636a1918 222Similarly, monitor the smoking of perl for compiler warnings, and try to
223fix.
224
225=item *
226
8c35d285 227I<You MAY SKIP this step for SNAPSHOT>
228
f6af4394 229Run F<Porting/cmpVERSION.pl> to compare the current source tree with the
230previous version to check for for modules that have identical version
231numbers but different contents, e.g.:
7277a900 232
f6af4394 233 $ cd ~/some-perl-root
234 $ ./perl -Ilib Porting/cmpVERSION.pl -xd ~/my_perl-tarballs/perl-5.10.0 .
235
236then bump the version numbers of any non-dual-life modules that have
237changed since the previous release, but which still have the old version
238number. If there is more than one maintenance branch (e.g. 5.8.x, 5.10.x),
239then compare against both.
240
241Note that some of the files listed may be generated (e.g. copied from ext/
242to lib/, or a script like lib/lib_pm.PL is run to produce lib/lib.pm);
243make sure you edit the correct file!
244
245Once all version numbers have been bumped, re-run the checks.
246
247Then run again without the -x option, to check that dual-life modules are
248also sensible.
249
54356a6f 250 $ ./perl -Ilib Porting/cmpVERSION.pl -d ~/my_perl-tarballs/perl-5.10.0 .
251
55878aed 252=item *
253
8c35d285 254I<You MAY SKIP this step for SNAPSHOT>
255
f6af4394 256Get perldelta in a mostly finished state.
db3f805e 257
636a1918 258Peruse F<Porting/how_to_write_a_perldelta.pod>, and try to make sure that
259every section it lists is, if necessary, populated and complete. Copy
260edit the whole document.
f6af4394 261
262=item *
263
8c35d285 264I<You MUST SKIP this step for SNAPSHOT>
265
2e831dfd 266A week or two before the first release candidate, bump the perl version
267number (e.g. from 5.10.0 to 5.10.1), to allow sufficient time for testing
268and smoking with the target version built into the perl executable. For
269subsequent release candidates and the final release, it it not necessary
270to bump the version further.
f6af4394 271
272There is a tool to semi-automate this process. It works in two stages.
273First, it generates a list of suggested changes, which you review and
274edit; then you feed this list back and it applies the edits. So, first
52a66c2c 275scan the source directory looking for likely candidates. The command line
276arguments are the old and new version numbers, and -s means scan:
f6af4394 277
278 $ Porting/bump-perl-version -s 5.10.0 5.10.1 > /tmp/scan
279
52a66c2c 280This produces a file containing a list of suggested edits, e.g.:
f6af4394 281
282 NetWare/Makefile
283
284 89: -MODULE_DESC = "Perl 5.10.0 for NetWare"
285 +MODULE_DESC = "Perl 5.10.1 for NetWare"
286
287i.e. in the file F<NetWare/Makefile>, line 89 would be changed as shown.
288Review the file carefully, and delete any -/+ line pairs that you don't
52a66c2c 289want changing. You can also edit just the C<+> line to change the
290suggested replacement text. Remember that this tool is largely just
291grepping for '5.10.0' or whatever, so it will generate false positives. Be
292careful not change text like "this was fixed in 5.10.0"! Then run:
f6af4394 293
294 $ Porting/bump-perl-version -u < /tmp/scan
295
54356a6f 296which will update all the files shown.
f6af4394 297
298Be particularly careful with F<INSTALL>, which contains a mixture of
299C<5.10.0>-type strings, some of which need bumping on every release, and
52a66c2c 300some of which need to be left unchanged. Also note that this tool
301currently only detects a single substitution per line: so in particular,
302this line in README.vms needs special handling:
f6af4394 303
304 rename perl-5^.10^.1.dir perl-5_10_1.dir
7277a900 305
54356a6f 306Have a look a couple lines up from that. You'll see roman numerals.
307Update those too. Find someone with VMS clue if you have to update
308the Roman numerals for a .0 release.
309
310Commit your changes:
311
312 $ git st
313 $ git diff
314 B<review the delta carefully>
315
316 $ git commit -a -m 'Bump the perl version in various places for 5.x.y'
dc0a62a1 317
81fc59ef 318When the version number is bumped, you should also update Module::CoreList (as
319described below in L<"Building a release - on the day">) to reflect the new
320version number.
321
dc0a62a1 322=item *
323
8c35d285 324I<You MUST SKIP this step for SNAPSHOT>
325
dc0a62a1 326Review and update INSTALL to account for the change in version number;
327in particular, the "Coexistence with earlier versions of perl 5" section.
328
f6af4394 329=item *
7277a900 330
8c35d285 331I<You MUST SKIP this step for SNAPSHOT>
332
f6af4394 333Update the F<Changes> file to contain the git log command which would show
334all the changes in this release. You will need assume the existence of a
335not-yet created tag for the forthcoming release; e.g.
7277a900 336
b4d6b7c5 337 git log ... perl-5.10.0..perl-5.12.0
7277a900 338
f6af4394 339Due to warts in the perforce-to-git migration, some branches require extra
340exclusions to avoid other branches being pulled in. Make sure you have the
341correct incantation: replace the not-yet-created tag with C<HEAD> and see
52a66c2c 342if C<git log> produces roughly the right number of commits across roughly the
343right time period (you may find C<git log --pretty=oneline | wc> useful).
dc0a62a1 344
f6af4394 345=item *
7277a900 346
52a66c2c 347Check some more build configurations. The check that setuid builds and
348installs is for < 5.11.0 only.
349
350 $ sh Configure -Dprefix=/tmp/perl-5.x.y -Uinstallusrbinperl \
351 -Duseshrplib -Dd_dosuid
352 $ make
353 $ LD_LIBRARY_PATH=`pwd` make test # or similar for useshrplib
7277a900 354
52a66c2c 355 $ make suidperl
356 $ su -c 'make install'
357 $ ls -l .../bin/sperl
358 -rws--x--x 1 root root 69974 2009-08-22 21:55 .../bin/sperl
7277a900 359
52a66c2c 360(Then delete the installation directory.)
7277a900 361
52a66c2c 362XXX think of other configurations that need testing.
7277a900 363
f6af4394 364=item *
7277a900 365
8c35d285 366I<You MAY SKIP this step for SNAPSHOT>
367
f6af4394 368Update F<AUTHORS>, using the C<Porting/checkAUTHORS.pl> script, and if
ce80ee91 369necessary, update the script to include new alias mappings for porters
370already in F<AUTHORS>
f6af4394 371
ce80ee91 372 $ git log | perl Porting/checkAUTHORS.pl --acknowledged AUTHORS -
f6af4394 373
2e831dfd 374=back
375
376=head2 Building a release - on the day
377
378This section describes the actions required to make a release (or snapshot
379etc) that are performed on the actual day.
380
381=over 4
382
383=item *
384
385Review all the items in the previous section,
386L<"Building a release - advance actions"> to ensure they are all done and
387up-to-date.
388
8c35d285 389=item *
390
a0db33fe 391I<You MAY SKIP this step for SNAPSHOT>
2e831dfd 392
a0db33fe 393Re-read the perldelta to try to find any embarrassing typos and thinkos;
394remove any C<TODO> or C<XXX> flags; update the "Known Problems" section
395with any serious issues for which fixes are not going to happen now; and
396run through pod and spell checkers, e.g.
2e831dfd 397
bf8ea215 398 $ podchecker -warnings -warnings pod/perl5101delta.pod
399 $ spell pod/perl5101delta.pod
2e831dfd 400
a0db33fe 401Also, you may want to generate and view an HTML version of it to check
402formatting, e.g.
2e831dfd 403
bf8ea215 404 $ perl pod/pod2html pod/perl5101delta.pod > /tmp/perl5101delta.html
2e831dfd 405
8c35d285 406=item *
407
a0db33fe 408Make sure you have a gitwise-clean perl directory (no modified files,
409unpushed commits etc):
8c35d285 410
a0db33fe 411 $ git status
8c35d285 412
413=item *
414
a0db33fe 415If not already built, Configure and build perl so that you have a Makefile
416and porting tools:
8c35d285 417
52a66c2c 418 $ ./Configure -Dusedevel -des && make
8c35d285 419
420=item *
421
a0db33fe 422Check that files managed by F<regen.pl> and friends are up to date. From
423within your working directory:
8c35d285 424
a0db33fe 425 $ git status
426 $ make regen
427 $ make regen_perly
428 $ git status
8c35d285 429
a0db33fe 430If any of the files managed by F<regen.pl> have changed, then you should
431re-make perl to check that it's okay, then commit the updated versions:
8c35d285 432
73ec421b 433 $ git commit -a -m 'make regen; make regen_perly'
8c35d285 434
435=item *
436
a0db33fe 437Rebuild META.yml:
bfadf2ba 438
a0db33fe 439 $ rm META.yml
440 $ make META.yml
441 $ git diff
bfadf2ba 442
a0db33fe 443XXX it would be nice to make Porting/makemeta use regen_lib.pl
444to get the same 'update the file if its changed' functionality
445we get with 'make regen' etc.
bfadf2ba 446
a0db33fe 447Commit META.yml if it has changed:
dd0e54ba 448
a0db33fe 449 $ git commit -m 'Update META.yml' META.yml
dd0e54ba 450
bfadf2ba 451=item *
452
453I<You MUST SKIP this step for SNAPSHOT>
454
52a66c2c 455Update C<Module::Corelist> with module version data for the new release.
bfadf2ba 456
457Note that if this is a maint release, you should run the following actions
dd0e54ba 458from the maint directory, but commit the C<Corelist.pm> changes in
459I<blead> and subsequently cherry-pick it.
bfadf2ba 460
a0db33fe 461F<corelist.pl> uses ftp.funet.fi to verify information about dual-lived
bfadf2ba 462modules on CPAN. It can use a full, local CPAN mirror or fall back
463to C<wget> or C<curl> to fetch only package metadata remotely.
464
465(If you'd prefer to have a full CPAN mirror, see
466http://www.cpan.org/misc/cpan-faq.html#How_mirror_CPAN)
467
a0db33fe 468Then change to your perl checkout, and if necessary,
bfadf2ba 469
a0db33fe 470 $ make perl
bfadf2ba 471
81fc59ef 472If this not the first update for this version (e.g. if it was updated
473when the version number was originally bumped), first edit
d5bddf6e 474F<dist/Module-CoreList/lib/Module/CoreList.pm> to delete the existing
2ce7d676 475entries for this version from the C<%released> and C<%version> hashes:
476they will have a key like C<5.010001> for 5.10.1.
52a66c2c 477
478XXX the edit-in-place functionality of Porting/corelist.pl should
479be fixed to handle this automatically.
480
bf8ea215 481Then, If you have a local CPAN mirror, run:
bfadf2ba 482
bfadf2ba 483 $ ./perl -Ilib Porting/corelist.pl ~/my-cpan-mirror
484
485Otherwise, run:
486
bfadf2ba 487 $ ./perl -Ilib Porting/corelist.pl cpan
488
52a66c2c 489This will chug for a while, possibly reporting various warnings about
2a720090 490badly-indexed CPAN modules unrelated to the modules actually in core.
2ce7d676 491Assuming all goes well, it will update
d5bddf6e 492F<dist/Module-CoreList/lib/Module/CoreList.pm>.
bfadf2ba 493
494Check that file over carefully:
495
d5bddf6e 496 $ git diff dist/Module-CoreList/lib/Module/CoreList.pm
bfadf2ba 497
bfadf2ba 498If necessary, bump C<$VERSION> (there's no need to do this for
499every RC; in RC1, bump the version to a new clean number that will
500appear in the final release, and leave as-is for the later RCs and final).
501
502Edit the version number in the new C<< 'Module::CoreList' => 'X.YZ' >>
503entry, as that is likely to reflect the previous version number.
504
a0db33fe 505In addition, if this is a final release (rather than a release candidate):
bfadf2ba 506
507=over 4
508
509=item *
510
511Update this version's entry in the C<%released> hash with today's date.
512
513=item *
514
515Make sure that the script has correctly updated the C<CAVEATS> section
516
517=back
518
519Finally, commit the new version of Module::CoreList:
a0db33fe 520(unless this is for maint; in which case commit it blead first, then
521cherry-pick it back).
bfadf2ba 522
770cf6ff 523 $ git commit -m 'Update Module::CoreList for 5.x.y' dist/Module-CoreList/lib/Module/CoreList.pm
bfadf2ba 524
bfadf2ba 525=item *
526
a0db33fe 527Check that the manifest is sorted and correct:
8c35d285 528
a0db33fe 529 $ make manisort
530 $ make distclean
300b5357 531 $ git clean -xdf # This shouldn't be necessary if distclean is correct
a0db33fe 532 $ perl Porting/manicheck
52a66c2c 533 $ git status
a0db33fe 534
d5bddf6e 535 XXX manifest _sorting_ is now checked with make test_porting
536
a0db33fe 537Commit MANIFEST if it has changed:
538
539 $ git commit -m 'Update MANIFEST' MANIFEST
540
541=item *
542
543I<You MUST SKIP this step for SNAPSHOT>
544
545Add an entry to F<pod/perlhist.pod> with the current date, e.g.:
546
547 David 5.10.1-RC1 2009-Aug-06
548
549Make sure that the correct pumpking is listed in the left-hand column, and
550if this is the first release under the stewardship of a new pumpking, make
551sure that his or her name is listed in the section entitled
552C<THE KEEPERS OF THE PUMPKIN>.
553
554Be sure to commit your changes:
555
556 $ git commit -m 'add new release to perlhist' pod/perlhist.pod
8c35d285 557
558=item *
559
d7eb1120 560I<You MUST SKIP this step for SNAPSHOT>
561
a42352ee 562Update F<patchlevel.h> to add a C<-RC1>-or-whatever string; or, if this is
563a final release, remove it. For example:
d7eb1120 564
565 static const char * const local_patches[] = {
566 NULL
567 + ,"RC1"
568 PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
569
570Be sure to commit your change:
571
572 $ git commit -m 'bump version to RCnnn' patchlevel.h
573
574=item *
575
a0db33fe 576Build perl, then make sure it passes its own test suite, and installs:
577
578 $ git clean -xdf
a42352ee 579 $ ./Configure -des -Dprefix=/tmp/perl-5.x.y-pretest
580
581 # or if it's an odd-numbered version:
a0db33fe 582 $ ./Configure -des -Dusedevel -Dprefix=/tmp/perl-5.x.y-pretest
a42352ee 583
a0db33fe 584 $ make test install
585
586=item *
587
52a66c2c 588Check that the output of C</tmp/perl-5.x.y-pretest/bin/perl -v> and
589C</tmp/perl-5.x.y-pretest/bin/perl -V> are as expected,
a0db33fe 590especially as regards version numbers, patch and/or RC levels, and @INC
52a66c2c 591paths. Note that as they have been been built from a git working
592directory, they will still identify themselves using git tags and
593commits.
594
595Then delete the temporary installation.
596
597=item *
598
599If this is maint release, make sure F<Porting/mergelog> is saved and
600committed.
a0db33fe 601
602=item *
603
604Push all your recent commits:
605
606 $ git push origin ....
607
96054f12 608
609=item *
610
611I<You MUST SKIP this step for SNAPSHOT>
612
613Tag the release:
614
615 $ git tag v5.11.0 -m'First release of the v5.11 series!'
616
f662f3b7 617It is VERY important that from this point forward, you not push
618your git changes to the Perl master repository. If anything goes
619wrong before you publish your newly-created tag, you can delete
620and recreate it. Once you push your tag, we're stuck with it
621and you'll need to use a new version number for your release.
622
a0db33fe 623=item *
624
8c35d285 625Create a tarball. Use the C<-s> option to specify a suitable suffix for
626the tarball and directory name:
627
628 $ cd root/of/perl/tree
629 $ make distclean
75a012fe 630 $ git clean -xdf # make sure perl and git agree on files
631 $ git status # and there's nothing lying around
8c35d285 632
633 $ perl Porting/makerel -b -s `git describe` # for a snapshot
634 $ perl Porting/makerel -b -s RC1 # for a release candidate
635 $ perl Porting/makerel -b # for a final release
636
637This creates the directory F<../perl-x.y.z-RC1> or similar, copies all
638the MANIFEST files into it, sets the correct permissions on them,
639adds DOS line endings to some, then tars it up as
640F<../perl-x.y.z-RC1.tar.gz>. With C<-b>, it also creates a C<tar.bz2> file.
641
96054f12 642
8c35d285 643XXX if we go for extra tags and branches stuff, then add the extra details
644here
645
646=item *
647
a42352ee 648Clean up the temporary directory, e.g.
649
650 $ rm -rf ../perl-x.y.z-RC1
651
652=item *
653
8c35d285 654Copy the tarballs (.gz and possibly .bz2) to a web server somewhere you
655have access to.
656
657=item *
658
659Download the tarball to some other machine. For a release candidate,
660you really want to test your tarball on two or more different platforms
661and architectures. The #p5p IRC channel on irc.perl.org is a good place
662to find willing victims.
663
664=item *
665
666Check that basic configuration and tests work on each test machine:
667
668 $ ./Configure -des && make all test
f6af4394 669
670=item *
671
8c35d285 672Check that the test harness and install work on each test machine:
673
a42352ee 674 $ make distclean
8c35d285 675 $ ./Configure -des -Dprefix=/install/path && make all test_harness install
a42352ee 676 $ cd /install/path
8c35d285 677
678=item *
679
680Check that the output of C<perl -v> and C<perl -V> are as expected,
681especially as regards version numbers, patch and/or RC levels, and @INC
682paths.
683
684Note that the results may be different without a F<.git/> directory,
685which is why you should test from the tarball.
686
687=item *
688
459fc3ca 689Run the Installation Verification Procedure utility:
690
691 $ bin/perlivp
692 ...
693 All tests successful.
694 $
695
696=item *
697
d60a1044 698Compare the pathnames of all installed files with those of the previous
699release (i.e. against the last installed tarball on this branch which you
700have previously verified using this same procedure). In particular, look
701for files in the wrong place, or files no longer included which should be.
702For example, suppose the about-to-be-released version is 5.10.1 and the
703previous is 5.10.0:
704
705 cd installdir-5.10.0/
706 find . -type f | perl -pe's/5\.10\.0/5.10.1/g' | sort > /tmp/f1
707 cd installdir-5.10.1/
708 find . -type f | sort > /tmp/f2
709 diff -u /tmp/f[12]
710
711=item *
712
8c35d285 713Bootstrap the CPAN client on the clean install:
714
75a012fe 715 $ bin/perl -MCPAN -e'shell'
8c35d285 716
717=item *
718
a42352ee 719Try installing a popular CPAN module that's reasonably complex and that
720has dependencies; for example:
8c35d285 721
a42352ee 722 CPAN> install Inline
723 CPAN> quit
8c35d285 724
725Check that your perl can run this:
726
75a012fe 727 $ bin/perl -lwe 'use Inline C => "int f() { return 42;} "; print f'
a42352ee 728 42
729 $
8c35d285 730
731=item *
732
733Bootstrap the CPANPLUS client on the clean install:
734
75a012fe 735 $ bin/cpanp
8c35d285 736
8c35d285 737=item *
738
a42352ee 739Install an XS module, for example:
8c35d285 740
a42352ee 741 CPAN Terminal> i DBI
742 CPAN Terminal> quit
743 $ bin/perl -MDBI -e 1
75a012fe 744 $
8c35d285 745
746=item *
747
bc4c40f2 748I<If you're building a SNAPSHOT, you should STOP HERE>
749
750=item *
8c35d285 751
47b1f096 752Check that the C<perlbug> utility works. Try the following:
753
a14438df 754 $ bin/perlbug
47b1f096 755 ...
756 Subject: test bug report
757 Local perl administrator [yourself]:
758 Editor [vi]:
759 Module:
760 Category [core]:
761 Severity [low]:
762 (edit report)
763 Action (Send/Display/Edit/Subject/Save to File): f
764 Name of file to save message in [perlbug.rep]:
765 Action (Send/Display/Edit/Subject/Save to File): q
766
767and carefully examine the output (in F<perlbug.rep]>), especially
768the "Locally applied patches" section. If everything appears okay, then
75a012fe 769delete the file, and try it again, this time actually submitting the bug
770report. Check that it shows up, then remember to close it!
47b1f096 771
772=item *
773
f6af4394 774Wait for the smoke tests to catch up with the commit which this release is
775based on (or at least the last commit of any consequence).
7277a900 776
f6af4394 777Then check that the smoke tests pass (particularly on Win32). If not, go
778back and fix things.
7277a900 779
7277a900 780
f6af4394 781=item *
7277a900 782
f6af4394 783Once smoking is okay, upload it to PAUSE. This is the point of no return.
db3f805e 784If anything goes wrong after this point, you will need to re-prepare
785a new release with a new minor version or RC number.
786
a14438df 787 https://pause.perl.org/
788
789(Login, then select 'Upload a file to CPAN')
790
a42352ee 791Upload both the .gz and .bz2 versions of the tarball.
f6af4394 792
210de33e 793=item *
794
f662f3b7 795Now that you've shipped the new perl release to PAUSE, it's
796time to publish the tag you created earlier to the public git repo:
797
798 $ git push origin tag v5.11.0
f6af4394 799
800=item *
801
a42352ee 802Disarm the F<patchlevel.h> change; for example,
d7eb1120 803
804 static const char * const local_patches[] = {
805 NULL
806 - ,"RC1"
807 PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
808
809Be sure to commit your change:
810
811 $ git commit -m 'disarm RCnnn bump' patchlevel.h
a14438df 812 $ git push origin ....
d7eb1120 813
2e831dfd 814
815=item *
816
db3f805e 817Mail p5p to announce your new release, with a quote you prepared earlier.
f6af4394 818
819=item *
820
821Wait 24 hours or so, then post the announcement to use.perl.org.
addebd58 822(if you don't have access rights to post news, ask someone like Rafael to
823do it for you.)
f6af4394 824
f6af4394 825=item *
7277a900 826
746c0b35 827Ask Jarkko to add the tarball to http://www.cpan.org/src/
828
829=item *
830
bc4c40f2 831I<You MUST SKIP this step for RC, BLEAD>
7277a900 832
746c0b35 833Ask Jarkko to update the descriptions of which tarballs are current in
834http://www.cpan.org/src/README.html, and Rafael to update
835http://dev.perl.org/perl5/
7277a900 836
f6af4394 837=item *
7277a900 838
bc4c40f2 839I<You MUST SKIP this step for RC>
8c35d285 840
75a012fe 841Remind the current maintainer of C<Module::CoreList> to push a new release
842to CPAN.
7277a900 843
75a012fe 844=item *
a2cba4bc 845
bc4c40f2 846I<You MUST SKIP this step for RC>
7277a900 847
75a012fe 848Bump the perlXYZ version number.
7277a900 849
75a012fe 850First, create a new empty perlNNNdelta.pod file for the current release + 1;
851see F<Porting/how_to_write_a_perldelta.pod>.
7277a900 852
75a012fe 853You should be able to do this by just copying in a skeleton template and
854then doing a quick fix up of the version numbers, e.g.
7277a900 855
ef72e12f 856 $ cp -i Porting/perldelta_template.pod pod/perl5102delta.pod
75a012fe 857 $ (edit it)
858 $ git add pod/perl5102delta.pod
7277a900 859
75a012fe 860Edit F<pod.lst>: add the new entry, flagged as 'D', and unflag the previous
861entry from being 'D'; for example:
862
863 -D perl5101delta Perl changes in version 5.10.1
864 +D perl5102delta Perl changes in version 5.10.2
865 + perl5101delta Perl changes in version 5.10.1
7277a900 866
75a012fe 867Run C<perl pod/buildtoc --build-all> to update the F<perldelta> version in
868the following files:
57433fbf 869
870 MANIFEST
75a012fe 871 Makefile.SH
872 pod.lst
57433fbf 873 pod/perl.pod
57433fbf 874 vms/descrip_mms.template
75a012fe 875 win32/Makefile
876 win32/makefile.mk
877 win32/pod.mak
878
879Then manually edit (F<vms/descrip_mms.template> to bump the version
880in the following entry:
57433fbf 881
75a012fe 882 [.pod]perldelta.pod : [.pod]perl5101delta.pod
883
884XXX this previous step needs to fixed to automate it in pod/buildtoc.
885
886Manually update references to the perlNNNdelta version in these files:
887
888 INSTALL
889 README
890
891Edit the previous delta file to change the C<NAME> from C<perldelta>
892to C<perlNNNdelta>.
893
894These two lists of files probably aren't exhaustive; do a recursive grep
895on the previous filename to look for suitable candidates that may have
896been missed.
897
898Finally, commit:
899
900 $ git commit -a -m 'create perlXXXdelta'
901
902At this point you may want to compare the commit with a previous bump to
903see if they look similar. See commit ca8de22071 for an example of a
904previous version bump.
57433fbf 905
906=item *
907
bc4c40f2 908I<You MUST SKIP this step for RC, BLEAD>
dc0a62a1 909
8c35d285 910If this was a maint release, then edit F<Porting/mergelog> to change
911all the C<d> (deferred) flags to C<.> (needs review).
addebd58 912
addebd58 913=item *
914
bc4c40f2 915I<You MUST SKIP this step for RC, BLEAD>
addebd58 916
8c35d285 917If this was a major release (5.x.0), then create a new maint branch
918based on the commit tagged as the current release and bump the version
919in the blead branch in git, e.g. 5.12.0 to 5.13.0.
addebd58 920
921[ XXX probably lots more stuff to do, including perldelta,
f6af4394 922C<lib/feature.pm> ]
7277a900 923
8c35d285 924XXX need a git recipe
addebd58 925
926=item *
927
bc4c40f2 928I<You MUST SKIP this step for RC, BLEAD>
8c35d285 929
75a012fe 930Copy the perlNNNdelta.pod for this release into the other branches; for
931example:
7277a900 932
75a012fe 933 $ cp -i ../5.10.x/pod/perl5101delta.pod pod/ # for example
934 $ git add pod/perl5101delta.pod
935
936Edit F<pod.lst> to add an entry for the file, e.g.:
937
938 perl5101delta Perl changes in version 5.10.1
bc4c40f2 939
75a012fe 940Then rebuild various files:
7277a900 941
75a012fe 942 $ perl pod/buildtoc --build-all
943
944Finally, commit:
945
946 $ git commit -a -m 'add perlXXXdelta'
7277a900 947
f6af4394 948=item *
7277a900 949
f6af4394 950Make sure any recent F<pod/perlhist.pod> entries are copied to
951F<perlhist.pod> on other branches; typically the RC* and final entries,
952e.g.
7277a900 953
f6af4394 954 5.8.9-RC1 2008-Nov-10
955 5.8.9-RC2 2008-Dec-06
956 5.8.9 2008-Dec-14
7277a900 957
6e40fbf9 958=item *
959
bc4c40f2 960I<You MUST RETIRE to your preferred PUB, CAFE or SEASIDE VILLA for some
961much-needed rest and relaxation>.
8c35d285 962
963Thanks for releasing perl!
964
7277a900 965=back
966
967=head1 SOURCE
968
f6af4394 969Based on
970http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2009-05/msg00608.html,
971plus a whole bunch of other sources, including private correspondence.
7277a900 972
973=cut
974