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