This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Release managers need to be careful in INSTALL
[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
48 perl5103delta.pod
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
JV
115should be a "For pumpkings only: Send a CC" tickbox. If not, ask Andreas
116König to add your ID to the list of people allowed to upload something
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
52a66c2c
DM
311some of which need to be left unchanged. Also note that this tool
312currently only detects a single substitution per line: so in particular,
313this line in README.vms needs special handling:
f6af4394
DM
314
315 rename perl-5^.10^.1.dir perl-5_10_1.dir
7277a900 316
45ce9531
FR
317When doing a blead release, also make sure the C<PERL_API_*> constants in
318F<patchlevel.h> are in sync with the with the version you're releasing, unless
319you're absolutely sure the release you're about to make is 100% binary
320compatible to an earlier release. When releasing a stable perl version, the
321C<PERL_API_*> constants C<MUST NOT> be changed as we aim to guarantee binary
322compatibility in maint branches.
323
54356a6f
JV
324Commit your changes:
325
326 $ git st
e91bd5c0
LB
327 $ git diff
328 B<review the delta carefully>
54356a6f
JV
329
330 $ git commit -a -m 'Bump the perl version in various places for 5.x.y'
dc0a62a1 331
81fc59ef
DG
332When the version number is bumped, you should also update Module::CoreList (as
333described below in L<"Building a release - on the day">) to reflect the new
334version number.
335
dc0a62a1
DM
336=item *
337
8c35d285
JV
338I<You MUST SKIP this step for SNAPSHOT>
339
dc0a62a1
DM
340Review and update INSTALL to account for the change in version number;
341in particular, the "Coexistence with earlier versions of perl 5" section.
342
c1b1cb88
FR
343Be particularly careful with the section "Upgrading from 5.X.Y or earlier". For
344stable releases, this needs to refer to the last release in the previous
345development cycle. For blead releases, it needs to refer to the previous blead
346release.
347
f6af4394 348=item *
7277a900 349
b82efa27
RS
350I<You MUST SKIP this step for SNAPSHOT>
351
352Update the F<Changes> file to contain the git log command which would show
353all the changes in this release. You will need assume the existence of a
354not-yet created tag for the forthcoming release; e.g.
355
356 git log ... perl-5.10.0..perl-5.12.0
357
358Due to warts in the perforce-to-git migration, some branches require extra
359exclusions to avoid other branches being pulled in. Make sure you have the
360correct incantation: replace the not-yet-created tag with C<HEAD> and see
361if C<git log> produces roughly the right number of commits across roughly the
362right time period (you may find C<git log --pretty=oneline | wc> useful).
363
364=item *
365
52a66c2c
DM
366Check some more build configurations. The check that setuid builds and
367installs is for < 5.11.0 only.
368
369 $ sh Configure -Dprefix=/tmp/perl-5.x.y -Uinstallusrbinperl \
370 -Duseshrplib -Dd_dosuid
371 $ make
372 $ LD_LIBRARY_PATH=`pwd` make test # or similar for useshrplib
7277a900 373
52a66c2c
DM
374 $ make suidperl
375 $ su -c 'make install'
376 $ ls -l .../bin/sperl
377 -rws--x--x 1 root root 69974 2009-08-22 21:55 .../bin/sperl
7277a900 378
52a66c2c 379(Then delete the installation directory.)
7277a900 380
52a66c2c 381XXX think of other configurations that need testing.
7277a900 382
f6af4394 383=item *
7277a900 384
8c35d285
JV
385I<You MAY SKIP this step for SNAPSHOT>
386
347f5124
RGS
387L<perlport> has a section currently named I<Supported Platforms> that
388indicates which platforms are known to build in the current release.
389If necessary update the list and the indicated version number.
390
2e831dfd
DM
391=back
392
393=head2 Building a release - on the day
394
395This section describes the actions required to make a release (or snapshot
396etc) that are performed on the actual day.
397
398=over 4
399
400=item *
401
402Review all the items in the previous section,
403L<"Building a release - advance actions"> to ensure they are all done and
404up-to-date.
405
8c35d285
JV
406=item *
407
04dbb930
DG
408For a blead release, if you did not bump the perl version number as part
409of I<advance actions>, do that now.
410
411=item *
412
a0db33fe 413I<You MAY SKIP this step for SNAPSHOT>
2e831dfd 414
04dbb930 415Finalize the perldelta. In particular, fill in the Acknowledgements
38195a8c
DG
416section. You can generate a list of contributors with checkAUTHORS.pl.
417For example:
418
419 $ git log --pretty=fuller v5.13.2..HEAD | \
420 perl Porting/checkAUTHORS.pl --who -
04dbb930 421
a0db33fe
DM
422Re-read the perldelta to try to find any embarrassing typos and thinkos;
423remove any C<TODO> or C<XXX> flags; update the "Known Problems" section
424with any serious issues for which fixes are not going to happen now; and
425run through pod and spell checkers, e.g.
2e831dfd 426
bf8ea215
JV
427 $ podchecker -warnings -warnings pod/perl5101delta.pod
428 $ spell pod/perl5101delta.pod
2e831dfd 429
a0db33fe
DM
430Also, you may want to generate and view an HTML version of it to check
431formatting, e.g.
2e831dfd 432
bf8ea215 433 $ perl pod/pod2html pod/perl5101delta.pod > /tmp/perl5101delta.html
2e831dfd 434
38195a8c
DG
435Another good HTML preview option is http://search.cpan.org/pod2html
436
437If you make changes, be sure to commit them.
438
8c35d285
JV
439=item *
440
a0db33fe
DM
441Make sure you have a gitwise-clean perl directory (no modified files,
442unpushed commits etc):
8c35d285 443
38195a8c 444 $ git clean -dxf
a0db33fe 445 $ git status
8c35d285
JV
446
447=item *
448
a0db33fe
DM
449If not already built, Configure and build perl so that you have a Makefile
450and porting tools:
8c35d285 451
52a66c2c 452 $ ./Configure -Dusedevel -des && make
8c35d285
JV
453
454=item *
455
a0db33fe
DM
456Check that files managed by F<regen.pl> and friends are up to date. From
457within your working directory:
8c35d285 458
a0db33fe 459 $ git status
8f83713a 460 $ make regen_all
a0db33fe
DM
461 $ make regen_perly
462 $ git status
8c35d285 463
a0db33fe
DM
464If any of the files managed by F<regen.pl> have changed, then you should
465re-make perl to check that it's okay, then commit the updated versions:
8c35d285 466
73ec421b 467 $ git commit -a -m 'make regen; make regen_perly'
8c35d285 468
38195a8c
DG
469(XXX regen might be a problem depending on the bison version available.
470We need to get a wizard to give better instructions on what to do or not do.)
471
8c35d285
JV
472=item *
473
bfadf2ba
JV
474I<You MUST SKIP this step for SNAPSHOT>
475
52a66c2c 476Update C<Module::Corelist> with module version data for the new release.
bfadf2ba
JV
477
478Note that if this is a maint release, you should run the following actions
38195a8c
DG
479from the maint branch, but commit the C<Corelist.pm> changes in
480I<blead> and subsequently cherry-pick it. XXX need a better example
bfadf2ba 481
a0db33fe 482F<corelist.pl> uses ftp.funet.fi to verify information about dual-lived
bfadf2ba 483modules on CPAN. It can use a full, local CPAN mirror or fall back
e8c01f92
SH
484to C<wget> or C<curl> to fetch only package metadata remotely. (If you're
485on Win32, then installing Cygwin is one way to have commands like C<wget>
486and C<curl> available.)
bfadf2ba
JV
487
488(If you'd prefer to have a full CPAN mirror, see
489http://www.cpan.org/misc/cpan-faq.html#How_mirror_CPAN)
490
a0db33fe 491Then change to your perl checkout, and if necessary,
bfadf2ba 492
a0db33fe 493 $ make perl
bfadf2ba 494
81fc59ef
DG
495If this not the first update for this version (e.g. if it was updated
496when the version number was originally bumped), first edit
d5bddf6e 497F<dist/Module-CoreList/lib/Module/CoreList.pm> to delete the existing
2ce7d676
RGS
498entries for this version from the C<%released> and C<%version> hashes:
499they will have a key like C<5.010001> for 5.10.1.
52a66c2c
DM
500
501XXX the edit-in-place functionality of Porting/corelist.pl should
502be fixed to handle this automatically.
503
bf8ea215 504Then, If you have a local CPAN mirror, run:
bfadf2ba 505
bfadf2ba
JV
506 $ ./perl -Ilib Porting/corelist.pl ~/my-cpan-mirror
507
508Otherwise, run:
509
bfadf2ba
JV
510 $ ./perl -Ilib Porting/corelist.pl cpan
511
52a66c2c 512This will chug for a while, possibly reporting various warnings about
2a720090 513badly-indexed CPAN modules unrelated to the modules actually in core.
2ce7d676 514Assuming all goes well, it will update
d5bddf6e 515F<dist/Module-CoreList/lib/Module/CoreList.pm>.
bfadf2ba
JV
516
517Check that file over carefully:
518
d5bddf6e 519 $ git diff dist/Module-CoreList/lib/Module/CoreList.pm
bfadf2ba 520
bfadf2ba
JV
521If necessary, bump C<$VERSION> (there's no need to do this for
522every RC; in RC1, bump the version to a new clean number that will
523appear in the final release, and leave as-is for the later RCs and final).
524
525Edit the version number in the new C<< 'Module::CoreList' => 'X.YZ' >>
526entry, as that is likely to reflect the previous version number.
527
e8c01f92
SH
528Also edit Module::CoreList's new version number in its F<Changes> file and
529in its F<META.yml> file.
530
a0db33fe 531In addition, if this is a final release (rather than a release candidate):
bfadf2ba
JV
532
533=over 4
534
535=item *
536
537Update this version's entry in the C<%released> hash with today's date.
538
539=item *
540
541Make sure that the script has correctly updated the C<CAVEATS> section
542
543=back
544
545Finally, commit the new version of Module::CoreList:
a0db33fe
DM
546(unless this is for maint; in which case commit it blead first, then
547cherry-pick it back).
bfadf2ba 548
770cf6ff 549 $ git commit -m 'Update Module::CoreList for 5.x.y' dist/Module-CoreList/lib/Module/CoreList.pm
bfadf2ba 550
bfadf2ba
JV
551=item *
552
a0db33fe 553Check that the manifest is sorted and correct:
8c35d285 554
a0db33fe
DM
555 $ make manisort
556 $ make distclean
300b5357 557 $ git clean -xdf # This shouldn't be necessary if distclean is correct
a0db33fe 558 $ perl Porting/manicheck
52a66c2c 559 $ git status
a0db33fe 560
d5bddf6e
JV
561 XXX manifest _sorting_ is now checked with make test_porting
562
a0db33fe
DM
563Commit MANIFEST if it has changed:
564
565 $ git commit -m 'Update MANIFEST' MANIFEST
566
567=item *
568
569I<You MUST SKIP this step for SNAPSHOT>
570
571Add an entry to F<pod/perlhist.pod> with the current date, e.g.:
572
573 David 5.10.1-RC1 2009-Aug-06
574
575Make sure that the correct pumpking is listed in the left-hand column, and
576if this is the first release under the stewardship of a new pumpking, make
577sure that his or her name is listed in the section entitled
578C<THE KEEPERS OF THE PUMPKIN>.
579
580Be sure to commit your changes:
581
582 $ git commit -m 'add new release to perlhist' pod/perlhist.pod
8c35d285
JV
583
584=item *
585
38195a8c 586I<You MUST SKIP this step for SNAPSHOT or BLEAD release>
d7eb1120 587
a42352ee
DM
588Update F<patchlevel.h> to add a C<-RC1>-or-whatever string; or, if this is
589a final release, remove it. For example:
d7eb1120
DM
590
591 static const char * const local_patches[] = {
592 NULL
593 + ,"RC1"
594 PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
595
596Be sure to commit your change:
597
598 $ git commit -m 'bump version to RCnnn' patchlevel.h
599
600=item *
601
a0db33fe
DM
602Build perl, then make sure it passes its own test suite, and installs:
603
604 $ git clean -xdf
a42352ee
DM
605 $ ./Configure -des -Dprefix=/tmp/perl-5.x.y-pretest
606
607 # or if it's an odd-numbered version:
a0db33fe 608 $ ./Configure -des -Dusedevel -Dprefix=/tmp/perl-5.x.y-pretest
a42352ee 609
a0db33fe
DM
610 $ make test install
611
612=item *
613
52a66c2c
DM
614Check that the output of C</tmp/perl-5.x.y-pretest/bin/perl -v> and
615C</tmp/perl-5.x.y-pretest/bin/perl -V> are as expected,
a0db33fe 616especially as regards version numbers, patch and/or RC levels, and @INC
52a66c2c
DM
617paths. Note that as they have been been built from a git working
618directory, they will still identify themselves using git tags and
619commits.
620
621Then delete the temporary installation.
622
623=item *
624
625If this is maint release, make sure F<Porting/mergelog> is saved and
626committed.
a0db33fe
DM
627
628=item *
629
630Push all your recent commits:
631
632 $ git push origin ....
633
96054f12
JV
634
635=item *
636
637I<You MUST SKIP this step for SNAPSHOT>
638
e8c01f92 639Tag the release (e.g.):
96054f12
JV
640
641 $ git tag v5.11.0 -m'First release of the v5.11 series!'
642
e8c01f92
SH
643(Adjust the syntax appropriately if you're working on Win32, i.e. use
644C<-m "..."> rather than C<-m'...'>.)
645
f662f3b7
JV
646It is VERY important that from this point forward, you not push
647your git changes to the Perl master repository. If anything goes
648wrong before you publish your newly-created tag, you can delete
649and recreate it. Once you push your tag, we're stuck with it
650and you'll need to use a new version number for your release.
651
a0db33fe
DM
652=item *
653
8c35d285
JV
654Create a tarball. Use the C<-s> option to specify a suitable suffix for
655the tarball and directory name:
656
657 $ cd root/of/perl/tree
658 $ make distclean
75a012fe
DM
659 $ git clean -xdf # make sure perl and git agree on files
660 $ git status # and there's nothing lying around
8c35d285
JV
661
662 $ perl Porting/makerel -b -s `git describe` # for a snapshot
663 $ perl Porting/makerel -b -s RC1 # for a release candidate
664 $ perl Porting/makerel -b # for a final release
665
666This creates the directory F<../perl-x.y.z-RC1> or similar, copies all
667the MANIFEST files into it, sets the correct permissions on them,
668adds DOS line endings to some, then tars it up as
669F<../perl-x.y.z-RC1.tar.gz>. With C<-b>, it also creates a C<tar.bz2> file.
670
6480287f
MT
671If you're getting your tarball suffixed with -uncommitted and you're sure
672your changes were all committed, you can override the suffix with:
673
674 $ perl Porting/makerel -b -s ''
96054f12 675
8c35d285
JV
676XXX if we go for extra tags and branches stuff, then add the extra details
677here
678
679=item *
680
a42352ee
DM
681Clean up the temporary directory, e.g.
682
683 $ rm -rf ../perl-x.y.z-RC1
684
685=item *
686
8c35d285
JV
687Copy the tarballs (.gz and possibly .bz2) to a web server somewhere you
688have access to.
689
690=item *
691
692Download the tarball to some other machine. For a release candidate,
693you really want to test your tarball on two or more different platforms
694and architectures. The #p5p IRC channel on irc.perl.org is a good place
695to find willing victims.
696
697=item *
698
699Check that basic configuration and tests work on each test machine:
700
701 $ ./Configure -des && make all test
f6af4394
DM
702
703=item *
704
8c35d285
JV
705Check that the test harness and install work on each test machine:
706
a42352ee 707 $ make distclean
8c35d285 708 $ ./Configure -des -Dprefix=/install/path && make all test_harness install
a42352ee 709 $ cd /install/path
8c35d285
JV
710
711=item *
712
713Check that the output of C<perl -v> and C<perl -V> are as expected,
714especially as regards version numbers, patch and/or RC levels, and @INC
715paths.
716
717Note that the results may be different without a F<.git/> directory,
718which is why you should test from the tarball.
719
720=item *
721
459fc3ca
DM
722Run the Installation Verification Procedure utility:
723
724 $ bin/perlivp
725 ...
726 All tests successful.
727 $
728
729=item *
730
d60a1044
DM
731Compare the pathnames of all installed files with those of the previous
732release (i.e. against the last installed tarball on this branch which you
733have previously verified using this same procedure). In particular, look
734for files in the wrong place, or files no longer included which should be.
735For example, suppose the about-to-be-released version is 5.10.1 and the
736previous is 5.10.0:
737
738 cd installdir-5.10.0/
739 find . -type f | perl -pe's/5\.10\.0/5.10.1/g' | sort > /tmp/f1
740 cd installdir-5.10.1/
741 find . -type f | sort > /tmp/f2
742 diff -u /tmp/f[12]
743
744=item *
745
8c35d285
JV
746Bootstrap the CPAN client on the clean install:
747
75a012fe 748 $ bin/perl -MCPAN -e'shell'
8c35d285 749
e8c01f92
SH
750(Use C<... -e "shell"> instead on Win32. You probably also need a set of
751Unix command-line tools available for CPAN to function correctly without
752Perl alternatives like LWP installed. Cygwin is an obvious choice.)
753
8c35d285
JV
754=item *
755
a42352ee
DM
756Try installing a popular CPAN module that's reasonably complex and that
757has dependencies; for example:
8c35d285 758
a42352ee
DM
759 CPAN> install Inline
760 CPAN> quit
8c35d285
JV
761
762Check that your perl can run this:
763
75a012fe 764 $ bin/perl -lwe 'use Inline C => "int f() { return 42;} "; print f'
a42352ee
DM
765 42
766 $
8c35d285 767
e8c01f92
SH
768(Use C<... -lwe "use ..."> instead on Win32.)
769
8c35d285
JV
770=item *
771
772Bootstrap the CPANPLUS client on the clean install:
773
75a012fe 774 $ bin/cpanp
8c35d285 775
e8c01f92
SH
776(Again, on Win32 you'll need something like Cygwin installed, but make sure
777that you don't end up with its various F<bin/cpan*> programs being found on
778the PATH before those of the Perl that you're trying to test.)
779
8c35d285
JV
780=item *
781
a42352ee 782Install an XS module, for example:
8c35d285 783
a42352ee
DM
784 CPAN Terminal> i DBI
785 CPAN Terminal> quit
786 $ bin/perl -MDBI -e 1
75a012fe 787 $
8c35d285
JV
788
789=item *
790
bc4c40f2
JV
791I<If you're building a SNAPSHOT, you should STOP HERE>
792
793=item *
8c35d285 794
47b1f096
DM
795Check that the C<perlbug> utility works. Try the following:
796
a14438df 797 $ bin/perlbug
47b1f096
DM
798 ...
799 Subject: test bug report
800 Local perl administrator [yourself]:
801 Editor [vi]:
802 Module:
803 Category [core]:
804 Severity [low]:
805 (edit report)
806 Action (Send/Display/Edit/Subject/Save to File): f
807 Name of file to save message in [perlbug.rep]:
808 Action (Send/Display/Edit/Subject/Save to File): q
809
810and carefully examine the output (in F<perlbug.rep]>), especially
811the "Locally applied patches" section. If everything appears okay, then
75a012fe
DM
812delete the file, and try it again, this time actually submitting the bug
813report. Check that it shows up, then remember to close it!
47b1f096
DM
814
815=item *
816
f6af4394
DM
817Wait for the smoke tests to catch up with the commit which this release is
818based on (or at least the last commit of any consequence).
7277a900 819
f6af4394
DM
820Then check that the smoke tests pass (particularly on Win32). If not, go
821back and fix things.
7277a900 822
7277a900 823
f6af4394 824=item *
7277a900 825
f6af4394 826Once smoking is okay, upload it to PAUSE. This is the point of no return.
db3f805e
JV
827If anything goes wrong after this point, you will need to re-prepare
828a new release with a new minor version or RC number.
829
a14438df
DM
830 https://pause.perl.org/
831
832(Login, then select 'Upload a file to CPAN')
833
45924287
RS
834If your workstation is not connected to a high-bandwidth,
835high-reliability connection to the Internet, you should probably use the
836"GET URL" feature (rather than "HTTP UPLOAD") to have PAUSE retrieve the
837new release from wherever you put it for testers to find it. This will
838eliminate anxious gnashing of teeth while you wait to see if your
83915 megabyte HTTP upload successfully completes across your slow, twitchy
c27b4e97
SH
840cable modem. You can make use of your home directory on dromedary for
841this purpose: F<http://users.perl5.git.perl.org/~USERNAME> maps to
842F</home/USERNAME/public_html>, where F<USERNAME> is your login account
843on dromedary. I<Remember>: if your upload is partially successful, you
844may need to contact a PAUSE administrator or even bump the version of perl.
45924287 845
a42352ee 846Upload both the .gz and .bz2 versions of the tarball.
f6af4394 847
c27b4e97 848Wait until you receive notification emails from the PAUSE indexer
38195a8c
DG
849confirming that your uploads have been received. IMPORTANT -- you will
850probably get an email that indexing has failed (due to dual-life modules,
851apparently). This is considered normal.
852
853Do not proceed any further until you are sure that your tarballs are on
854CPAN. Check your authors directory on one of the "fast" CPAN mirrors
855(e.g. cpan.shadowcatprojects.net, cpan.dagolden.com, cpan.hexten.net
856or cpan.cpantesters.org) to confirm that your uploads have been successful.
c27b4e97 857
210de33e
DM
858=item *
859
f662f3b7 860Now that you've shipped the new perl release to PAUSE, it's
e8c01f92 861time to publish the tag you created earlier to the public git repo (e.g.):
f662f3b7
JV
862
863 $ git push origin tag v5.11.0
f6af4394
DM
864
865=item *
866
a42352ee 867Disarm the F<patchlevel.h> change; for example,
d7eb1120
DM
868
869 static const char * const local_patches[] = {
870 NULL
871 - ,"RC1"
872 PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
873
874Be sure to commit your change:
875
876 $ git commit -m 'disarm RCnnn bump' patchlevel.h
a14438df 877 $ git push origin ....
d7eb1120 878
2e831dfd
DM
879
880=item *
881
db3f805e 882Mail p5p to announce your new release, with a quote you prepared earlier.
f6af4394
DM
883
884=item *
885
85531b0a
DG
886Add your quote to F<Porting/epigraphs.pod> and commit it.
887
888=item *
889
f6af4394 890Wait 24 hours or so, then post the announcement to use.perl.org.
addebd58
DM
891(if you don't have access rights to post news, ask someone like Rafael to
892do it for you.)
f6af4394 893
f6af4394 894=item *
7277a900 895
a377de85
SH
896Check http://www.cpan.org/src/ to see if the new tarballs have appeared.
897They should appear automatically, but if they don't then ask Jarkko to look
898into it, since his scripts must have broken.
746c0b35
DM
899
900=item *
901
bc4c40f2 902I<You MUST SKIP this step for RC, BLEAD>
7277a900 903
746c0b35
DM
904Ask Jarkko to update the descriptions of which tarballs are current in
905http://www.cpan.org/src/README.html, and Rafael to update
906http://dev.perl.org/perl5/
7277a900 907
f6af4394 908=item *
7277a900 909
bc4c40f2 910I<You MUST SKIP this step for RC>
8c35d285 911
75a012fe
DM
912Remind the current maintainer of C<Module::CoreList> to push a new release
913to CPAN.
7277a900 914
75a012fe 915=item *
a2cba4bc 916
bc4c40f2 917I<You MUST SKIP this step for RC>
7277a900 918
e8c01f92 919Bump the perlXYZdelta version number.
7277a900 920
75a012fe
DM
921First, create a new empty perlNNNdelta.pod file for the current release + 1;
922see F<Porting/how_to_write_a_perldelta.pod>.
7277a900 923
75a012fe
DM
924You should be able to do this by just copying in a skeleton template and
925then doing a quick fix up of the version numbers, e.g.
7277a900 926
8e967a1c
DG
927Then commit this file. (If this new perldelta needs to get cherrypicked
928anywhere, this provides a clean base to merge from.)
929
930For example, assuming 5.10.2:
931
ef72e12f 932 $ cp -i Porting/perldelta_template.pod pod/perl5102delta.pod
75a012fe
DM
933 $ (edit it)
934 $ git add pod/perl5102delta.pod
8e967a1c
DG
935 $ git commit -m 'create perl5102delta'
936
937Edit the previous delta file to change the C<NAME> from C<perldelta>
938to C<perlNNNdelta> and commit it. For example:
939
940 $ git add pod/perl5101delta.pod
941 $ git commit -m 'retitle perl5101delta'
942
943Now you need to update various tables of contents, most of which can be
944generated automatically.
7277a900 945
75a012fe
DM
946Edit F<pod.lst>: add the new entry, flagged as 'D', and unflag the previous
947entry from being 'D'; for example:
948
949 -D perl5101delta Perl changes in version 5.10.1
950 +D perl5102delta Perl changes in version 5.10.2
951 + perl5101delta Perl changes in version 5.10.1
7277a900 952
75a012fe
DM
953Run C<perl pod/buildtoc --build-all> to update the F<perldelta> version in
954the following files:
57433fbf
JV
955
956 MANIFEST
75a012fe
DM
957 Makefile.SH
958 pod.lst
57433fbf 959 pod/perl.pod
57433fbf 960 vms/descrip_mms.template
75a012fe
DM
961 win32/Makefile
962 win32/makefile.mk
963 win32/pod.mak
964
965Then manually edit (F<vms/descrip_mms.template> to bump the version
966in the following entry:
57433fbf 967
75a012fe
DM
968 [.pod]perldelta.pod : [.pod]perl5101delta.pod
969
970XXX this previous step needs to fixed to automate it in pod/buildtoc.
971
972Manually update references to the perlNNNdelta version in these files:
973
974 INSTALL
975 README
976
75a012fe
DM
977These two lists of files probably aren't exhaustive; do a recursive grep
978on the previous filename to look for suitable candidates that may have
979been missed.
980
981Finally, commit:
982
8e967a1c 983 $ git commit -a -m 'update TOC and perldelta references'
75a012fe
DM
984
985At this point you may want to compare the commit with a previous bump to
986see if they look similar. See commit ca8de22071 for an example of a
987previous version bump.
57433fbf
JV
988
989=item *
990
bc4c40f2 991I<You MUST SKIP this step for RC, BLEAD>
dc0a62a1 992
8c35d285
JV
993If this was a maint release, then edit F<Porting/mergelog> to change
994all the C<d> (deferred) flags to C<.> (needs review).
addebd58 995
addebd58
DM
996=item *
997
66d8ce14 998I<You MUST SKIP this step for RC, BLEAD>
addebd58 999
66d8ce14
JV
1000If this was the first release of a new maint series, (5.x.0 where x is
1001even), then create a new maint branch based on the commit tagged as
1002the current release and bump the version in the blead branch in git,
1003e.g. 5.12.0 to 5.13.0.
addebd58
DM
1004
1005[ XXX probably lots more stuff to do, including perldelta,
f6af4394 1006C<lib/feature.pm> ]
7277a900 1007
233ca920
JV
1008Assuming you're using git 1.7.x or newer:
1009
1010 $ git checkout -b maint-5.12
1011 $ git push origin -u maint-5.12
addebd58
DM
1012
1013=item *
1014
bc4c40f2 1015I<You MUST SKIP this step for RC, BLEAD>
8c35d285 1016
75a012fe
DM
1017Copy the perlNNNdelta.pod for this release into the other branches; for
1018example:
7277a900 1019
75a012fe
DM
1020 $ cp -i ../5.10.x/pod/perl5101delta.pod pod/ # for example
1021 $ git add pod/perl5101delta.pod
1022
1023Edit F<pod.lst> to add an entry for the file, e.g.:
1024
1025 perl5101delta Perl changes in version 5.10.1
bc4c40f2 1026
75a012fe 1027Then rebuild various files:
7277a900 1028
75a012fe
DM
1029 $ perl pod/buildtoc --build-all
1030
1031Finally, commit:
1032
1033 $ git commit -a -m 'add perlXXXdelta'
7277a900 1034
f6af4394 1035=item *
7277a900 1036
f6af4394
DM
1037Make sure any recent F<pod/perlhist.pod> entries are copied to
1038F<perlhist.pod> on other branches; typically the RC* and final entries,
1039e.g.
7277a900 1040
f6af4394
DM
1041 5.8.9-RC1 2008-Nov-10
1042 5.8.9-RC2 2008-Dec-06
1043 5.8.9 2008-Dec-14
7277a900 1044
6e40fbf9
DM
1045=item *
1046
a3738a12
DM
1047If necessary, send an email to C<perlbug-admin at perl.org> requesting
1048that new version numbers be added to the RT fields C<Perl Version> and
1049C<Fixed In>.
1050
1051=item *
1052
bc4c40f2
JV
1053I<You MUST RETIRE to your preferred PUB, CAFE or SEASIDE VILLA for some
1054much-needed rest and relaxation>.
8c35d285
JV
1055
1056Thanks for releasing perl!
1057
7277a900
GS
1058=back
1059
1060=head1 SOURCE
1061
f6af4394
DM
1062Based on
1063http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2009-05/msg00608.html,
1064plus a whole bunch of other sources, including private correspondence.
7277a900
GS
1065
1066=cut
1067