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