README.RELEASE_PROCESS 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. =======================
  2. PHP Release Process
  3. =======================
  4. General notes and tips
  5. ----------------------
  6. 1. Do not release on Fridays, Saturdays or Sundays
  7. because the sysadmins can not upgrade stuff then.
  8. 2. Package two days before a release. So if the release is to be on Thursday,
  9. package on Tuesday. Think about timezones as well.
  10. 3. Ensure that the tests on Travis CI are green.
  11. See: https://travis-ci.org/php/php-src/builds
  12. It is recommended to do so a couple of days before the packaging day, to
  13. have enough time to investigate failures, communicate with the authors and
  14. commit the fixes.
  15. The RM for the branch is also responsible for keeping the CI green on
  16. ongoing bases between the releases. Check the CI status for your branch
  17. periodically and resolve the failures ASAP. See more in:
  18. https://wiki.php.net/rfc/travis_ci
  19. 4. Ensure that Windows builds will work before packaging
  20. 5. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
  21. Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
  22. first releases one of the previous RM's is around to answer questions. For the
  23. steps related to the php/QA/bug websites try to have someone from the webmaster
  24. team (Bjori) on hand.
  25. 6. Verify the tags to be extra sure everything was tagged properly.
  26. 7. Moving extensions from/to PECL requires write acces to the destination.
  27. Most developers should have this.
  28. Moving extensions from php-src to PECL
  29. - Checkout the pecl directory, most likely you want a sparse-root checkout
  30. svn co --depth=empty https://svn.php.net/repository/pecl
  31. - Create an directory for the extension incl. branch and tag structure,
  32. no trunk at this point and commit this to svn
  33. cd pecl; mkdir foo foo/tags foo/branches; svn add foo; svn commit
  34. - Move the extension from php-src to the new location
  35. svn mv https://svn.php.net/repository/php/php-src/trunk/ext/foo \
  36. https://svn.php.net/repository/pecl/foo/trunk
  37. If the extension is still usable or not dead, in cooperation with the extension
  38. maintainers if any:
  39. - create the pecl.php.net/foo package and its content, license, maintainer
  40. - create the package.xml, commit
  41. - release the package
  42. For Moving extensions from PECL to php-src the svn mv has to be tone the other
  43. way round.
  44. Rolling a non stable release (alpha/beta/RC)
  45. --------------------------------------------
  46. 1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
  47. 2. Check the tests at https://travis-ci.org/php/php-src/builds
  48. 3. run the "scripts/dev/credits" script in php-src and commit the changes in the
  49. credits files in ext/standard.
  50. 4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
  51. 5. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
  52. Do not use abbreviations for alpha and beta. Do not use dashes, you should
  53. ``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
  54. 6. Compile and make test, with and without ZTS, using the right Bison version
  55. (for example, for 5.5, Bison 2.4.1 is used)
  56. 7. Check ./sapi/cli/php -v output for version matching.
  57. 8. If all is right, commit the changes to the release branch with ``git commit -a``.
  58. 9. Tag the repository release branch with the version, e.g.:
  59. ``git tag -u YOURKEYID php-5.4.2RC2``
  60. 10. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
  61. in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
  62. F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
  63. a new RC or not. This is to make sure ``version_compare()`` can correctly work.
  64. Commit the changes to the main branch.
  65. 11. Push the changes to the main repo, the tag, the main branch and the release branch :
  66. ``git push --tags origin HEAD``
  67. ``git push origin {main branch}``
  68. ``git push origin {release branch}``
  69. 12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
  70. and build three tarballs (gz, bz2 and xz).
  71. 13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
  72. directory "downloads/". Copy them into there, so that the system can generate
  73. MD5 sums. If you do not have this directory, talk to Derick or Dan.
  74. 14. Now the RC can be found on http://downloads.php.net/yourname,
  75. f.e. http://downloads.php.net/derick/
  76. 15. Once the release has been tagged, contact the PHP Windows development team
  77. (internals-win@lists.php.net) so that Windows binaries can be created. Once
  78. those are made, they should be placed into the same directory as the source snapshots.
  79. Getting the non stable release (alpha/beta/RC) announced
  80. --------------------------------------------------------
  81. 1. Send an email (see example here: http://news.php.net/php.internals/19486)
  82. **To** ``internals@lists.php.net`` and ``php-general@lists.php.net`` lists
  83. pointing out "the location of the release" and "the possible release date of
  84. either the next RC, or the final release".
  85. 2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
  86. ``php-qa@lists.php.net`` and ``primary-qa-tester@lists.php.net``.
  87. This email is to notify the selected projects about a new release so that they
  88. can make sure their projects keep working. Make sure that you have been setup
  89. as a moderator for ``primary-qa-tester@lists.php.net`` by having someone (Hannes, Dan,
  90. Derick) run the following commands for you:
  91. ``ssh lists.php.net``
  92. ``sudo -u ezmlm ezmlm-sub ~ezmlm/primary-qa-tester/mod moderator-email-address``
  93. 3. Update ``qa.git/include/release-qa.php`` with the appropriate information.
  94. See the documentation within release-qa.php for more information, but all releases
  95. and RCs are configured here. Only $QA_RELEASES needs to be edited.
  96. Example: When rolling an RC, set the 'rc' with appropriate information for the
  97. given version.
  98. Note: Remember to update the MD5 checksum information.
  99. 4. Update ``web/php.git/include/version.inc`` (x=major version number)
  100. a. ``$PHP_x_RC`` = "5.4.0RC1" (should be set to "false" before)
  101. b. ``$PHP_x_RC_DATE`` = "06 September 2007"
  102. 5. Commit and push those changes:
  103. a. ``git commit -a && git push origin master``
  104. 6. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the
  105. INSTALL and win32/install.txt files which are generated from the PHP manual sources.
  106. Rolling a stable release
  107. ------------------------
  108. 1. Checkout your release branch, you should have created when releasing previous RC
  109. and bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
  110. 2. If a CVE commit needs to be merged to the release, then have it committed to
  111. the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
  112. merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
  113. Don't forget to update NEWS manually in an extra commit then.
  114. 3. Commit those changes. Ensure the tests at https://travis-ci.org/php/php-src/builds are
  115. still passing.
  116. 4. run the "scripts/dev/credits" script in php-src and commit the changes in the
  117. credits files in ext/standard.
  118. 5. Compile and make test, with and without ZTS, using the right Bison version
  119. (for example, for 5.5, Bison 2.4.1 is used)
  120. 6. Check ./sapi/cli/php -v output for version matching.
  121. 7. tag the repository with the version f.e. "``git tag -u YOURKEYID -s php-5.4.1``"
  122. 8. Push the tag f.e. "``git push origin php-5.4.1``"
  123. 9. run: ``PHPROOT=. ./makedist php 5.4.1``, this will export the tag, create configure
  124. and build three tarballs (gz, bz2 and xz).
  125. Check if the pear files are updated (phar).
  126. 10. Generate the GPG signature files for the archives.
  127. ``gpg -u YOUREMAIL --armor --detach-sign php-X.Y.Z.tar.xxx``
  128. 11. Commit and push all the tarballs and signature files to web/php-distributions.git,
  129. then update the git submodule reference in web/php.git:
  130. ``git submodule init;
  131. git submodule update;
  132. cd distributions;
  133. git pull origin master;
  134. cd ..;
  135. git commit distributions;
  136. git push;``
  137. This is to fetch the last commit id from php-distributions.git and commit this
  138. last commit id to web/php.git, then, mirrors will now sync
  139. 12. Once the release has been tagged, contact the PHP Windows development team
  140. (internals-win@lists.php.net) so that Windows binaries can be created.
  141. Getting the stable release announced
  142. ------------------------------------
  143. 1. Update phpweb/include/releases.inc with the old release info
  144. (updates the download archives)
  145. a. You can run ``php bin/bumpRelease 5`` if you are making a release for the
  146. highest branch, otherwise you have to do this manually, see point 1.b
  147. b. In case multiple PHP minor versions are in active development you have
  148. to manually copy the old information to include/releases.inc
  149. 2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
  150. a. ``$PHP_X_VERSION`` to the correct version
  151. b. ``$PHP_X_DATE`` to the release date
  152. c. ``$PHP_X_MD5`` array and update all the md5 sums
  153. d. ``$PHP_X_SHA256`` array and update all the SHA256 sums
  154. e. set ``$PHP_X_RC`` to false!
  155. f. Make sure there are no outdated "notes" or edited "date" keys in the
  156. ``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
  157. g. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
  158. 3. Create the release file (releases/x_y_z.php)
  159. Usually we use the same content as for point 6, but included in php template
  160. instead of the release xml.
  161. 4. Update php-qa/include/release-qa.php and add the next version as an QARELEASE
  162. (prepare for next RC)
  163. 5. Update the ChangeLog file for the given major version
  164. f.e. ``ChangeLog-5.php`` from the NEWS file
  165. a. go over the list and put every element on one line
  166. b. check for &, < and > and escape them if necessary
  167. c. remove all the names at the ends of lines
  168. d. for marking up, you can do the following (with VI):
  169. I. ``s/^- /<li>/``
  170. II. ``s/$/<\/li>/``
  171. III. ``s/Fixed bug #\([0-9]\+\)/<?php bugfix(\1); ?>/``
  172. IV. ``s/Fixed PECL bug #\([0-9]\+\)/<?php peclbugfix(\1); ?>/``
  173. V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
  174. e. You may want to try php-web/bin/news2html to automate this task
  175. 6. Add a short notice to phpweb stating that there is a new release, and
  176. highlight the major important things (security fixes) and when it is important
  177. to upgrade.
  178. a. Call php bin/createNewsEntry in your local phpweb checkout
  179. b. Add the content for the news entry
  180. 7. **Check mirrors have been synced before announcing or pushing news**
  181. Try, f.e. http://www.php.net/get/php-5.5.1.tar.bz2/from/a/mirror
  182. Try several mirrors, mirrors may update slowly (may take an hour)
  183. 8. Commit all the changes to their respective git repos
  184. 9. Wait an hour or two, then send a mail to php-announce@lists.php.net,
  185. php-general@lists.php.net and internals@lists.php.net with a text similar to
  186. http://news.php.net/php.internals/17222.
  187. Please make sure that the mail to php-announce@ is its own completely seperate email.
  188. This is to make sure that repiles to the announcement on php-general@ or internals@
  189. will not accidentally hit the php-announce@ mailinglist.
  190. Re-releasing the same version (or -pl)
  191. --------------------------------------
  192. 1. Commit the new binaries to ``phpweb/distributions/``
  193. 2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
  194. a. If only releasing for one OS, make sure you edit only those variables
  195. b. ``$PHP_X_VERSION`` to the correct version
  196. c. ``$PHP_X_DATE`` to the release date
  197. d. ``$PHP_X_MD5`` array and update all the md5 sums
  198. e. ``$PHP_X_SHA256`` array and update all the SHA256 sums
  199. f. Make sure there are no outdated "notes" or edited "date" keys in the
  200. ``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
  201. 3. Add a short notice to phpweb stating that there is a new release, and
  202. highlight the major important things (security fixes) and when it is important
  203. to upgrade.
  204. a. Call php bin/createNewsEntry in your local phpweb checkout
  205. b. Add the content for the news entry
  206. 4. Commit all the changes (``include/version.inc``, ``archive/archive.xml``,
  207. ``archive/entries/YYYY-MM-DD-N.xml``)
  208. 5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
  209. php-general@lists.php.net and internals@lists.php.net with a text similar to
  210. the news entry.
  211. Please make sure that the mail to php-announce@ is its own completely seperate email.
  212. This is to make sure that repiles to the announcement on php-general@ or internals@
  213. will not accidentally hit the php-announce@ mailinglist.