xref: /netbsd-src/external/gpl3/binutils.old/dist/binutils/README-how-to-make-a-release (revision c42dbd0ed2e61fe6eda8590caa852ccf34719964)
1		README for MAKING BINUTILS RELEASES
2
3This is a collection of notes on how to perform a binutils release.  A
4lot of this information can also be found in the maintain.texi file in
5the gnulib project:
6
7  https://www.gnu.org/software/gnulib/
8
9It is useful to have a cloned copy of the sources of this project as
10it also contains an upload script used to install tarballs on the GNU
11FTP server.
12
13Make sure that you have upload authority on sourceware and fencepost.
14Beware - this is an involved process and can take weeks to complete.
15See the maintain.texi file for details on how to obtain these
16permissions.
17
18-------------------------------------------------
19How to perform a release.
20-------------------------------------------------
21
22  1. Send an email out warning contributors about the forthcoming
23     branch.  Set a date for the branch (weekends are better because
24     they are less busy).
25
26  2. When the branch date is near:  Update the libiberty and config
27     directories and the top level Makefile and configure files.  Also
28     consider updating the toplevel libtool files.
29
30
31Approx time to complete from here: 2 hours ....
32
33  3. When branch day arrives add markers for the upcoming release to
34     the NEWS files in gas, ld, and binutils.  No need to update NEWS
35     in the gold directory - it has its own release numbering.
36
37     Likewise for the ChangeLog files in: bfd, binutils, config, cpu,
38     elfcpp, gas, gold, gprof, include, ld, libctf, libiberty, opcodes
39     and toplevel.
40
41     Add a note of the name of the new branch to binutils/BRANCHES.
42
43     Commit these changes.
44
45  4. Create the release branch using:
46
47	git branch binutils-2_39-branch
48        git push origin binutils-2_39-branch
49
50     If you get a message like:
51
52       remote: fatal: Invalid revision range 0000000000000000000000000000000000000000..f974f26cb16cc6fe3946f163c787a05e713fb77b
53
54     It appears that this can be ignored...
55
56  5. Make sure that the branch is there.  IE check out the branch sources:
57
58        git clone ssh://sourceware.org/git/binutils-gdb.git -b binutils-2_39-branch 2.39
59
60     If you get a message about being in a "detached head" state, something
61     has gone wrong...
62
63     Keep the checked out sources - they are going to be needed in future
64     steps.
65
66  6. Update "BINUTILS_BRANCH" in gdbadmin's crontab:
67
68     Log in as gdbadmin on sourceware.org, and then:
69
70        $ cd crontab
71        $ vi crontab
72        [change BINUTILS_BRANCH]
73        $ cvs ci crontab
74        $ crontab crontab
75
76     If you do not have access to this account, please feel free to
77     ask Joel Brobecker <brobecker AT adacore DOT com>.
78
79  7. Rename the current HEAD version entry in Bugzilla, and create a
80     new one.  E.g. rename "2.38 (HEAD)" to 2.38, and create
81     "2.39 (HEAD)":
82
83        https://sourceware.org/bugzilla/editversions.cgi?product=binutils
84
85  8. Update bfd/version.m4 on HEAD to indicate that is now a snapshot
86     of the next release.  Note if the release is going to be 2.39 then
87     the version number on the branch is set to 2.38.90 - ie almost, but
88     not quite at 2.39, and the version number on the mainline is set to
89     2.39.50 - ie half way to the next release after 2.39.
90
91     So the branch bfd/version.m4 has:
92
93       m4_define([BFD_VERSION], [2.38.90])
94
95     and the mainline has:
96
97       m4_define([BFD_VERSION], [2.39.50])
98
99     Regenerate various files on both branch and HEAD by configuring
100     with "--enable-maintainer-mode --enable-gold --enable-shared" and then building
101     with "make all-binutils all-gas all-gold all-gprof all-gprofng all-ld"
102
103     Add ChangeLog entries for the updated files.  Commit the changes.
104     Make sure that this includes the .pot files as well as the
105     configure and makefiles.
106
107  9. Create an initial pre-release:
108
109     a. Remove any auto-generated files, in order to force the
110        src-release script to rebuild them.
111
112          cd <branch-sources>
113          git clean -fdx
114
115     b. Create a source tarball of the BRANCH sources:
116
117          ./src-release.sh -x binutils
118
119     c. Build a test target using this tarball.
120
121           cp binutils-2.38.90.tar.xz /dev/shm
122	   pushd /dev/shm
123	   tar xvf binutils-2.38.90.tar.xz
124	   mkdir build
125	   cd build
126	   ../binutils-2.38.90/configure --quiet --enable-gold
127	   make
128	   popd
129
130        If there are problems, fix them.
131
132     d. Upload the pre-release snapshot to the sourceware FTP site:
133
134          scp binutils-2.38.90.tar.xz sourceware.org:~ftp/pub/binutils/snapshots
135          ssh sourceware.org sha256sum ~ftp/pub/binutils/snapshots/binutils-2.38.90.tar.xz
136
137     e. Clean up the source directory again.
138
139         git clean -fdx
140
141  10. Tell the Translation Project where to find the new tarball.
142      <coordinator@translationproject.org>
143      qv: https://translationproject.org/html/maintainers.html
144
145------------------------------------------------------------------------
146Dear Translation Project
147
148  The 2.39 release branch has been created for the GNU Binutils project.
149
150  A snapshot of the branch sources can be found here:
151
152    https://sourceware.org/pub/binutils/snapshots/binutils-2.38.90.tar.xz
153
154  We hope to make the official release of the sources on the <DATE>
155  although that could change if there are important bugs that need to
156  be fixed before the release.
157------------------------------------------------------------------------
158
159  11. Announce the availability of the snapshot and the branch on the
160      binutils mailing list.  Set a date for when the release will
161      actually happen.  Something like:
162
163------------------------------------------------------------------------
164Hi Everyone,
165
166  The <NEW_VERSION> branch has now been created:
167
168     git clone git://sourceware.org/git/binutils-gdb.git -b binutils-<NEW_VERSION>-branch
169
170  A snapshot of the sources is also available here:
171
172    https://sourceware.org/pub/binutils/snapshots/binutils-<OLD_VERSION>.90.tar.xz
173
174  Please could all patches for the branch be run by me.
175  The rules for the branch are:
176
177    * No new features.
178    * Target specific bug fixes are OK.
179    * Generic bug fixes are OK if they are important and widely tested.
180    * Documentation updates/fixes are OK.
181    * Translation updates are OK.
182    * Fixes for testsuite failures are OK.
183
184  Ideally I would like to make the release happen in two weeks time,
185  i.e. <DATE>.  Which I hope will be enough time for everyone
186  to get their final fixes in.
187------------------------------------------------------------------------
188
189  12. Build various different toolchains, test them and nag
190      maintainers to fix any testsuite failures for their
191      architectures...
192
193==============================================================================
194
195When the time comes to actually make the release....
196
197
198  20. Make sure that the branch sources still build, test and install
199      correctly.  Make sure that the sources are clean, without any
200      patch files (.reg .orig *~) left over.
201
202         cd <branch>
203	 git clean -fdx
204
205  21. a. Update the release number in bfd/version.m4 on the release
206         branch to a whole new minor version number, without a point
207         value.  Eg "2.38.90" becomes "2.39".
208
209      b. Change bfd/development.sh to set all values to "false".
210
211      c. Regenerate the configure and makefiles.  And *info* files.
212
213      d. Create a ChangeLog from the git refs for all of the commits
214         from when changelog entries were no longer required:
215
216           gitlog-to-changelog --since=2021-07-03 > ChangeLog.git
217
218        The gitlog-to-changelog script is part of the sources
219	of the "config" project.
220
221      e.  Add ChangeLog entries for all of the updates and add a
222          "this-is-the-2.38-release" comment and commit.
223
224  22. Check that your file creation mask will create the
225      correct file permissions.  Eg:
226
227      	    % umask
228	    22
229
230      Remove any spurious autom4te.cache files left over from the
231      reconfiguring:
232
233            git clean -fdx
234
235  23. Note - check to see if any new files have been added to the top
236      level of the source directory, but which are not in the
237      DEVO_SUPPORT variable in the src-release.sh script.  If they are
238      needed then add them.  NB/ Add the new ChangeLog.git file.
239
240      Create the release tarballs:
241
242            ./src-release.sh -b -g -l -x binutils
243
244  24. Check that the files in the tarballs have the correct
245      permissions.
246
247           tar tvf binutils-2.39.tar.bz2 | grep -e "---"
248
249      Also check that the man files are not empty.  (cf PR 28144).
250
251           tar tvf binutils-2.39.tar.xz | grep -e "\.1"
252
253  25. Sanity check the release on x86_64-pc-linux-gnu by building and
254      running the testsuites (gas, gold, binutils and ld).  Make the
255      source directory read-only before building.  Also test
256      "make install".  If necessary fix any problems.
257
258        pushd /dev/shm
259	mkdir delme
260	cd delme
261	tar xvf <path-to-sources>/binutils-2.*.tar.lz
262	chmod -R -w binutils-2.*
263	mkdir build
264	cd build
265	../binutils-2.*/configure --quiet --enable-gold --prefix=`pwd`/install --enable-plugins --enable-shared
266	make all-gas all-gold all-ld all-binutils all-gprof all-gprofng
267	make check-gas check-binutils check-ld check-gold
268        make install-gas install-gold install-ld install-binutils
269
270        # Needed for step 29...
271        make html pdf
272
273        popd
274
275  26. Tag the branch with the new release number:
276	[optional: add "-u XXXXX" to sign with a gpg key]
277	enter a tag message such as: "Official GNU Binutils 2.3x release"
278
279	    git tag -a binutils-2_38 -u DD9E3C4F      <=== Be careful to get the tag right
280
281        NB/ If you do sign the binaries make sure to use a key
282	that has been published with the FSF.
283
284        Then push the release:
285
286	    git push origin binutils-2_3x
287
288        If you get an error message along the lines of:
289	"Invalid revision range ..." you can ignore it.
290
291  27.  Upload the tarballs to ftp.gnu.org.
292
293            gnupload --to ftp.gnu.org:binutils binutils-2.3*.tar.*
294
295        Be prepared to provide the password for the key, if you
296	signed the binaries.
297
298        The gnupload script is in the gnulib/build-aux directory.
299
300        Check for an email response from the upload.  If necessary
301        fix any problems.
302
303  28. Upload the tarballs (and signatures) to sourceware.org:
304
305       sftp sourceware.org
306         cd /sourceware/ftp/pub/binutils/releases
307 	 put binutils-2.3*.tar.*
308 	 chmod 644 binutils-2.3x.tar.*
309	 quit
310
311      FIXME: Are the signatures (created by the gnupload script in step 27)
312      needed ?  [The above commands upload them and nobody has complained,
313      so suggest that they are retained].
314
315  29. Update web pages.  For sourceware.org:
316
317      Create a new documentation folder on the sourceware.org web
318      pages as /sourceware/www/sourceware/htdocs/binutils/docs-2.3x.
319
320       sftp sourceware.org
321         cd /sourceware/www/sourceware/htdocs/binutils
322	 mkdir docs-2.3x
323	 cd docs-2.3x
324	 mkdir as
325	 mkdir bfd
326	 mkdir binutils
327	 mkdir gprof
328	 mkdir ld
329	 cd ../docs-2.3(x-1)
330	 get index.html
331
332      Update the (local copy of the) index.html file to point to the
333      new documentation and mention the new version and then upload it.
334
335	 cd ../docs-2.3x
336	 put index.html
337
338      Make the html documentation locally with the "make html" command
339      (see step 25 above).  Then upload and rename the directories as
340      needed.  (sftp does not appear to support recursive uploads
341      however, so the directories had to be made by hand, as shown above).
342
343         cd as
344	 lcd <build-dir>/gas/doc/as
345	 put *                {be patient - this takes a long time...}
346	 lcd ..
347	 cd ..
348	 put as.html
349	 put as.pdf
350	 cd bfd
351	 lcd ../../bfd/doc/bfd
352	 put *
353	 cd ..
354	 lcd ..
355	 put bfd.html
356	 put bfd.pdf
357	 cd binutils
358	 lcd ../../binutils/binutils      <=== NB/ Path not like others
359	 put *
360	 cd ..
361	 lcd ../doc
362	 put binutils.html
363	 put binutils.pdf
364	 cd gprof
365	 lcd ../../gprof/doc/gprof
366	 put *
367	 cd ..
368	 lcd ../..
369	 put gprof.html
370	 put gprof.pdf
371	 cd ld
372	 lcd ../ld/doc/ld
373	 put *
374	 cd ..
375	 lcd ../..
376	 put ld.html
377	 put ld.pdf
378
379      Edit the top level binutils index.html file to change the links
380      to point to the new documentation.
381
382         cd ../..
383	 get index.html
384	 [edit]
385	 put index.html
386         rm docs
387	 ln -s docs-2.3x docs
388	 quit
389
390      Check that the new web page is correct:
391
392          https://sourceware.org/binutils/
393
394      For the www.gnu.org site you have to email webmasters@gnu.org
395      and ask them to make the change(s):
396---------------------------------------
397Hi FSF Webmasters,
398
399  Please could the GNU Binutils webpage at:
400
401https://www.gnu.org/software/binutils/binutils.html
402
403  be updated to indicate that there is now a newer version available
404  (2.3x).  I have already updated the related page on the sourceware
405  website so this might be useful as a template:
406
407https://sourceware.org/binutils/
408
409  Thanks very much.
410
411Cheers
412--------------------------------------
413
414  30. Send emails to binutils@sourceware.org, info-gnu@gnu.org and
415      David Edelsohn <dje.gcc@gmail.com> announcing the new release.
416      Sign the email and include the checksum:
417
418          sha256sum binutils-2.3*.tar.*
419
420      (The email to Davis is so that he can update the GNU Toolchain
421      social media).  Something like this:
422      -----------------------------------------------------------------------
423        Hi Everyone,
424
425        We are pleased to announce that version 2.3x of the GNU Binutils project
426        sources have been released and are now available for download at:
427
428          https://ftp.gnu.org/gnu/binutils
429          https://sourceware.org/pub/binutils/releases/
430
431          checksums: xxxx
432
433        This release contains numerous bug fixes, and also the
434        following new features:
435
436          <extract info from the NEWS files>
437
438        Our thanks go out to all of the binutils contributors, past and
439        present, for helping to make this release possible.
440
441      -----------------------------------------------------------------------
442
443  31. Clean up the source tree:
444
445        git clean -fdx .
446
447  32. Edit bfd/development.sh on the branch and set the development flag
448      to "true".  (Leave the experimental flag set to "false").  Also bump
449      the version in bfd/version.m4 by adding a trailing .0, so that the
450      date suffix keeps the version lower than the trunk version.
451      Regenerate files.  Commit these changes.
452
453  33. Email the binutils list telling everyone that the 2.3x branch
454      is now open for business as usual and that patches no longer
455      need special approval.
456
457  34. Examine the bfd/config.bfd file in the mainline sources and move
458      any pending obsolete targets into the definitely obsolete
459      section.  Create a changelog entry and commit.
460
461
462
463
464--------------------------------------------------------------------------
465How to perform a POINT release.
466--------------------------------------------------------------------------
467
468A point release is easier than a normal release since a lot of the
469work has already been done.  The branch has been created, the
470translations updated and the documentation uploaded.  So the procedure
471looks like this:
472
473  0. Decide that a point release is necessary.
474
475     Usually this only happens when a sufficient number of serious
476     bugs have been found and fixed since the previous release, and a
477     new official release is not imminent.
478
479  1. Tell the community that a point release is happening.  Ask
480     maintainers to ensure that their ports are up to date on the
481     release branch.  Ask the community if there are any bug fixes
482     which are missing from the branch.  Allow some time for the
483     responses to this step.
484
485  2. Make sure that the branch sources build, test and install
486     correctly.
487
488  2.5 Prepare a list of the bugs which have been fixed.  This
489      will be needed for step 8.
490
491  3. In the branch sources:
492
493       a. Update the minor release number in bfd/version.m4.
494       b. Edit bfd/development.sh, set "development=false".
495       c. Regenerate the configure files.
496       d. Remove spurious autom4te.cache files:
497
498          git clean -fdx
499
500       e. Commit the updates along with a "this-is-the-2.3x.y-release"
501          note in all of the changelogs.
502       f. Tag the branch with the new release number:
503
504            git tag -a binutils-2_3x_y
505	      [optional: add "-u XXXXX" to sign with a gpg key]
506	    git push origin binutils-2_3x_y
507
508       g. Check that your file creation mask will create the
509          correct file permissions.  Ie:
510
511	    umask 022
512
513       h. Create the release tarballs:
514
515            ./src-release -b -g -l -x binutils
516
517       i. Check that the files in the tarballs have the correct
518          permissions.
519
520       j. Clean the source tree again
521
522	    git clean -fdx
523
524       k. Edit bfd/development.sh and set "development=true".
525       l. Commit this change.
526
527  4. [If paranoid - upload the tarballs to one of the FTP servers and
528      ask people to test it before going on to step 5].
529
530  5. Upload the tarballs to ftp.gnu.org.
531
532       gnupload --to ftp.gnu.org:binutils binutils-*.tar.*
533
534     The gnupload script is in the gnulib/build-aux directory.
535
536  6. Upload the tarballs to sourceware.org:
537
538       sftp sourceware.org
539         cd /sourceware/ftp/pub/binutils/releases
540 	 put binutils-*.tar.*
541 	 chmod 644 binutils-*.tar.*
542	 quit
543
544    It is OK to upload the signatures as well.
545
546  7. Update web pages.  For sourceware.org:
547
548      * Log on to sourceware.org
549      * Go to /sourceware/www/sourceware/htdocs/binutils
550      * Edit index.html and update the latest release number (if this is a latest release)
551
552      For the www.gnu.org site you have to email webmasters@gnu.org
553      and ask them to make the change(s).
554
555  8. Send an emails to the binutils list, info-gnu@gnu.org and
556     David Edelsohn <dje.gcc@gmail.com> announcing the new release.
557     (The email to Davis is so that he can update the GNU Toolchain
558     social media).  Something like this:
559
560------------------------------------------------------------------------
561Hi Everyone,
562
563  We are pleased to announce that version 2.3x.y of the GNU Binutils
564  project sources have been released and are now available for download at:
565
566    https://ftp.gnu.org/gnu/binutils
567    https://sourceware.org/pub/binutils/releases/
568
569  This is a point release over the previous 2.3x version, containing bug
570  fixes but no new features.
571
572  Our thanks go out to all of the binutils contributors, past and
573  present, for helping to make this release possible.
574
575  Here is a list of the bugs that have been fixed:
576    xx
577    xx
578    xx
579    xx
580--------------------------------------------------------------------------
581
582  9. Create a new Bugzilla entry for the point release.
583
584       https://sourceware.org/bugzilla/editversions.cgi?product=binutils
585
586     And a new milestone too:
587
588       https://sourceware.org/bugzilla/editmilestones.cgi?product=binutils
589
590Copyright (C) 2017-2022 Free Software Foundation, Inc.
591
592Copying and distribution of this file, with or without modification,
593are permitted in any medium without royalty provided the copyright
594notice and this notice are preserved.
595