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