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