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