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