|
1 | 1 | # PHP release process
|
2 | 2 |
|
| 3 | +A release managers role includes making packaged source code from the canonical repository |
| 4 | +available according to their release schedule. The release schedule for their branch is |
| 5 | +available on a Uncyclo page. |
| 6 | + |
| 7 | +There are two types of release: |
| 8 | + |
| 9 | + - non stable (alpha/beta/RC) |
| 10 | + - stable |
| 11 | + |
| 12 | +The process of making packaged source available and announcing availability is explained |
| 13 | +in detail below. The process differs slightly for non-stable and stable releases. |
| 14 | + |
| 15 | +Before a release manager can begin their work, there are several things that must happen, |
| 16 | +explained at the end of this document in |
| 17 | + [New Release Manager Checklist](#new-release-manager-checklist). |
| 18 | + |
3 | 19 | ## General notes and tips
|
4 | 20 |
|
5 | 21 | 1. Do not release on Fridays, Saturdays or Sundays because the sysadmins cannot
|
|
8 | 24 | 2. Package two days before a release. So if the release is to be on Thursday,
|
9 | 25 | package on Tuesday. Think about timezones as well.
|
10 | 26 |
|
11 |
| - 3. Ensure that the tests on Travis CI are green. |
| 27 | + 3. Ensure that the relevant tests on CI are green. |
12 | 28 |
|
13 |
| - See: https://travis-ci.org/php/php-src/builds |
| 29 | + See: |
| 30 | + https://travis-ci.org/php/php-src/builds |
| 31 | + https://dev.azure.com/phpazuredevops/PHP/ |
14 | 32 |
|
15 | 33 | It is recommended to do so a couple of days before the packaging day, to
|
16 | 34 | have enough time to investigate failures, communicate with the authors and
|
17 | 35 | commit the fixes.
|
18 | 36 |
|
19 |
| - The RM for the branch is also responsible for keeping the CI green on |
20 |
| - ongoing basis between the releases. Check the CI status for your branch |
21 |
| - periodically and resolve the failures ASAP. See more in |
22 |
| - https://wiki.php.net/rfc/travis_ci. |
| 37 | + Check the CI status for your branch periodically and resolve the failures ASAP. |
| 38 | + |
| 39 | + See more in https://wiki.php.net/rfc/travis_ci. |
23 | 40 |
|
24 |
| - 4. Ensure that Windows builds will work before packaging. |
25 |
| - |
26 |
| - 5. Follow all steps to the letter. When unclear ask previous RM's (David, |
27 |
| - Julien, Johannes, Stas, Derick, Ilia, Sara, Remi, or Christoph) before |
| 41 | + 4. Follow all steps to the letter. When unclear ask previous RM's before |
28 | 42 | proceeding. Ideally make sure that for the first releases one of the
|
29 | 43 | previous RM's is around to answer questions. For the steps related to the
|
30 | 44 | php/QA/bug websites try to have someone from the webmaster team (Bjori) on
|
31 | 45 | hand.
|
32 | 46 |
|
33 |
| - 6. Verify the tags to be extra sure everything was tagged properly. |
34 |
| - |
35 |
| - 7. Moving extensions from/to PECL requires write access to the destination. |
36 |
| - Most developers should have this. |
37 |
| - |
38 |
| - Moving extensions from php-src to PECL: |
| 47 | + 5. Verify the tags to be extra sure everything was tagged properly. |
39 | 48 |
|
40 |
| - * Ask someone with Git admin access to create a new empty repository GitHub. |
41 |
| - |
42 |
| - * Clone a new copy of the php-src repository (it will rewrite history, keep |
43 |
| - contributors commits and include only the extension folder): |
44 |
| - |
45 |
| - ```sh |
46 |
| - git clone [email protected]:php/php-src.git ext-name |
47 |
| - cd ext-name |
48 |
| - git filter-branch --prune-empty --subdirectory-filter ext/ext-name master |
49 |
| - ``` |
50 |
| - |
51 |
| - * Set remote Git push URL for the PECL extension: |
52 |
| - |
53 |
| - ```sh |
54 |
| - git remote set-url origin [email protected]:php/pecl-ext-name.git |
55 |
| - ``` |
56 |
| - |
57 |
| - * Create branch and tags structure appropriate for the extension and push: |
58 |
| - |
59 |
| - ```sh |
60 |
| - git push -u origin master |
61 |
| - ``` |
62 |
| - |
63 |
| - If the extension is still usable or not dead, in cooperation with the |
64 |
| - extension maintainers if any: |
65 |
| - |
66 |
| - * Create the pecl.php.net/foo package and its content, license, maintainer |
67 |
| - * Create the package.xml, commit |
68 |
| - * Release the package |
69 |
| - |
70 |
| - For moving extensions from PECL to php-src the procedure needs to go through |
71 |
| - the RFC process and a new Git commit without rewriting the php-src Git |
72 |
| - commit history. |
73 |
| - |
74 |
| - 8. There is a PHP release Docker image https://github.com/sgolemon/php-release |
| 49 | + 6. There is a PHP release Docker image https://github.com/sgolemon/php-release |
75 | 50 | with forks available to help releasing.
|
76 | 51 |
|
77 |
| -## Rolling a non stable release (alpha/beta/RC) |
| 52 | + 7. Communication with previous release managers should be conducted via |
| 53 | + |
| 54 | + |
| 55 | + 8. References to repositories in this document refer to the canonical source |
| 56 | + located at https://github.com/php |
| 57 | + |
| 58 | +## Packaging a non stable release (alpha/beta/RC) |
78 | 59 |
|
79 | 60 | 1. Check Windows snapshot builder logs https://windows.php.net/downloads/snaps/
|
80 | 61 | the last revision.
|
|
123 | 104 | This is to make sure `version_compare()` can correctly work. Commit the
|
124 | 105 | changes to the main branch.
|
125 | 106 |
|
126 |
| -11. Push the changes to the main repo, the tag, the main branch and the release |
127 |
| - branch. Release branches for alpha/beta/.0RCx releases before the GA release |
128 |
| - don't need to be pushed (a local temporary branch should be used). |
| 107 | +11. Push the changes to the `php-src`. |
| 108 | +
|
| 109 | + Non stable release branches don't need to be pushed |
| 110 | + (a local temporary branch should be used). |
129 | 111 |
|
130 | 112 | ```sh
|
131 | 113 | git push --tags origin HEAD
|
|
136 | 118 | 12. Run: `./scripts/dev/makedist php-7.4.0RC2`, this will export the tree,
|
137 | 119 | create `configure` and build three tarballs (gz, bz2 and xz).
|
138 | 120 |
|
139 |
| -13. Run `scripts/dev/gen_verify_stub <version> [identity]`, this will sign the |
| 121 | +13. Run `./scripts/dev/gen_verify_stub <version> [identity]`, this will sign the |
140 | 122 | tarballs and output verification information to be included in announcement
|
141 | 123 | email.
|
142 | 124 |
|
|
151 | 133 | list so that Windows binaries can be created. Once those are made, they can
|
152 | 134 | be found at https://windows.php.net/download.
|
153 | 135 |
|
154 |
| -## Getting the non stable release (alpha/beta/RC) announced |
| 136 | +## Announcing a non stable release (alpha/beta/RC) |
155 | 137 |
|
156 |
| - 1. Update `qa.git/include/release-qa.php` with the appropriate information. See |
| 138 | + 1. Update `web-qa:include/release-qa.php` with the appropriate information. See |
157 | 139 | the documentation within release-qa.php for more information, but all
|
158 | 140 | releases and RCs are configured here. Only `$QA_RELEASES` needs to be
|
159 | 141 | edited.
|
160 | 142 |
|
161 |
| - Example: When rolling an RC, set the `rc` with appropriate information for |
| 143 | + Example: When packaging an RC, set the `rc` with appropriate information for |
162 | 144 | the given version.
|
163 | 145 |
|
164 | 146 | Note: Remember to update the sha256 checksum information.
|
165 | 147 |
|
166 | 148 | 2. Skip this step for non stable releases after GA of minor or major versions
|
167 | 149 | (e.g. announce 7.4.0RC1, but not 7.4.1RC1):
|
168 | 150 |
|
169 |
| - Add a short notice to phpweb stating that there is a new release, and |
| 151 | + Add a short notice to web-php stating that there is a new release, and |
170 | 152 | highlight the major important things (security fixes) and when it is
|
171 | 153 | important to upgrade.
|
172 | 154 |
|
173 |
| - * Call `php bin/createNewsEntry` in your local phpweb checkout. Use category |
| 155 | + * Call `php bin/createNewsEntry` in your local web-php checkout. Use category |
174 | 156 | "frontpage" *and* "releases" for all stable releases. Use category
|
175 | 157 | "frontpage" for X.Y.0 non-stable releases only (news only).
|
176 | 158 |
|
|
205 | 187 | 6. For RCs, post tweet with release announcement (and link to news article on
|
206 | 188 | php.net) ([@official_php](https://twitter.com/official_php))
|
207 | 189 |
|
208 |
| -## Rolling a stable release |
| 190 | +## Packaging a stable release |
209 | 191 |
|
210 | 192 | 1. Checkout your release branch, you should have created when releasing
|
211 | 193 | previous RC and bump the version numbers in `main/php_version.h`,
|
|
245 | 227 | email.
|
246 | 228 |
|
247 | 229 | 11. Commit and push all the tarballs and signature files to
|
248 |
| - `web/php-distributions.git`, then update the git submodule reference in |
249 |
| - `web/php.git`: |
| 230 | + `web-php-distributions.git`, then update the git submodule reference in |
| 231 | + `web-php.git`: |
250 | 232 |
|
251 | 233 | ```sh
|
252 | 234 | git submodule init
|
|
259 | 241 | git push
|
260 | 242 | ```
|
261 | 243 |
|
262 |
| - This is to fetch the last commit id from php-distributions.git and commit |
263 |
| - this last commit id to `web/php.git`, then, website will now sync. |
| 244 | + This is to fetch the last commit id from `web-php-distributions.git` and commit |
| 245 | + this last commit id to `web-php.git`, then, website will now sync. |
264 | 246 |
|
265 | 247 | 12. Once the release has been tagged, contact release managers, Windows
|
266 | 248 | builders, and package maintainers so that they can build releases. Do not
|
267 | 249 | send this announcement to any public lists.
|
268 | 250 |
|
269 |
| -## Getting the stable release announced |
| 251 | +## Announcing a stable release |
270 | 252 |
|
271 |
| - 1. Update `phpweb/include/releases.inc` with the old release info (updates the |
| 253 | + 1. Update `web-php:include/releases.inc` with the old release info (updates the |
272 | 254 | download archives).
|
273 | 255 |
|
274 | 256 | * You can run `php bin/bumpRelease 7 4` where the first number is the major
|
|
277 | 259 | * If that fails for any non-trivially fixable reason, you can manually copy
|
278 | 260 | the old information to `include/releases.inc`.
|
279 | 261 |
|
280 |
| - 2. Update $data['X.Y'] in `phpweb/include/version.inc` |
| 262 | + 2. Update $data['X.Y'] in `web-php:include/version.inc` |
281 | 263 | (X.Y=major.minor release, e.g. '8.0'):
|
282 | 264 |
|
283 | 265 | * `version` to the full version number (e.g. '8.0.1')
|
|
287 | 269 |
|
288 | 270 | 3. Create the release file (`releases/x_y_z.php`):
|
289 | 271 |
|
290 |
| - Optionally use `phpweb/bin/createReleaseEntry -v x.y.z -r` to create |
| 272 | + Optionally use `bin/createReleaseEntry -v x.y.z -r` to create |
291 | 273 | a standard announcement template for this and step 6.
|
292 | 274 | Add `--security` for a security release.
|
293 | 275 |
|
|
296 | 278 |
|
297 | 279 | Edit the generated files to expand on the base message if needed.
|
298 | 280 |
|
299 |
| - 4. Update `php-qa/include/release-qa.php` and add the next version as an |
| 281 | + 4. Update `web-qa:include/release-qa.php` and add the next version as an |
300 | 282 | QARELEASE (prepare for next RC). Keep `active => true` until there will be
|
301 | 283 | no more QA releases. Setting the release number to 0 is sufficient to
|
302 | 284 | remove the old QA release from the available QA releases list.
|
|
305 | 287 |
|
306 | 288 | e.g. `ChangeLog-7.php` from the `NEWS` file
|
307 | 289 |
|
308 |
| - * You may want to try `php-web/bin/news2html` to automate this task. |
| 290 | + * You may want to try `web-php:bin/news2html` to automate this task. |
309 | 291 |
|
310 | 292 | * Go over the list and put every element on one line.
|
311 | 293 | * Check for `&`, `<` and `>` and escape them if necessary.
|
|
322 | 304 |
|
323 | 305 | V. `s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/`
|
324 | 306 |
|
325 |
| - 6. Add a short notice to phpweb stating that there is a new release, and |
| 307 | + 6. Add a short notice to `web-php` stating that there is a new release, and |
326 | 308 | highlight the major important things (security fixes) and when it is
|
327 | 309 | important to upgrade.
|
328 | 310 |
|
329 | 311 | * Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
|
330 |
| - local phpweb checkout. |
| 312 | + local web-php checkout. |
331 | 313 |
|
332 | 314 | 7. Commit and push all the changes to their respective git repos
|
333 | 315 |
|
|
352 | 334 |
|
353 | 335 | ## Re-releasing the same version (or -pl)
|
354 | 336 |
|
355 |
| - 1. Commit the new binaries to `phpweb/distributions/` |
| 337 | + 1. Commit the new binaries to `web-php-distributions` |
356 | 338 |
|
357 |
| - 2. Update $data['X.Y'] in `phpweb/include/version.inc` |
| 339 | + 2. Update $data['X.Y'] in `web-php:/include/version.inc` |
358 | 340 | (X.Y=major.minor release, e.g. '8.0'):
|
359 | 341 |
|
360 | 342 | * `version` to the full version number (e.g. '8.0.1-pl1')
|
361 | 343 | * `date` to the release date in `j M Y` format (e.g. '9 Jan 2021')
|
362 | 344 | * `tags` array should include `security` if this is a security release
|
363 | 345 | * `sha256` array and sub-elements for all SHA256 sums
|
364 | 346 |
|
365 |
| - 3. Add a short notice to phpweb stating that there is a new release, and |
| 347 | + 3. Add a short notice to `web-php` stating that there is a new release, and |
366 | 348 | highlight the major important things (security fixes) and when it is
|
367 | 349 | important to upgrade.
|
368 | 350 |
|
369 | 351 | * Call `php bin/createReleaseEntry -v <version> [ --security ]` in your
|
370 |
| - local phpweb checkout. |
| 352 | + local web-php checkout. |
371 | 353 |
|
372 | 354 | 4. Commit all the changes (`include/version.inc`, `archive/archive.xml`,
|
373 | 355 | `archive/entries/YYYY-MM-DD-N.xml`).
|
|
412 | 394 |
|
413 | 395 | http://news.php.net/php.internals/99903
|
414 | 396 |
|
415 |
| - 4. Update php-web:git.php and https://wiki.php.net/vcs/gitworkflow to reflect |
| 397 | + 4. Update `web-php:git.php` and https://wiki.php.net/vcs/gitworkflow to reflect |
416 | 398 | the new branch. Example:
|
417 | 399 |
|
418 | 400 | https://github.com/php/web-php/commit/74bcad4c770d95f21b7fbeeedbd76d943bb83f23
|
@@ -448,28 +430,26 @@ branch:
|
448 | 430 |
|
449 | 431 | 3. Help the new release managers with their first steps.
|
450 | 432 |
|
451 |
| -## New Release Manager checklist |
| 433 | +## New Release Manager Checklist |
452 | 434 |
|
453 |
| - 1. Email systems@ to get setup for access to downloads.php.net and to be added |
| 435 | + 1. Email systems@php.net to get setup for access to downloads.php.net and to be added |
454 | 436 | to the release-managers@ distribution list.
|
455 |
| -
|
456 |
| - 2. Create a GPG key for your @php.net address and publish it by editing |
| 437 | + |
| 438 | + 2. Request membership for the following repositories: |
| 439 | + - `php-src` - you must be able to edit version and build files |
| 440 | + - `web-php` - for publishing announcements |
| 441 | + - `web-qa` - for publishing QA information |
| 442 | + - `web-php-distributions` - for publishing releases |
| 443 | +
|
| 444 | + 3. Create a GPG key for your @php.net address and publish it by editing |
457 | 445 | `include/gpg-keys.inc` in the `web-php` repository, adding the output of
|
458 | 446 | `gpg --fingerprint "[email protected]"`. Let one or more of the previous RMs
|
459 | 447 | sign your key. Publish your public key to pgp.mit.edu with:
|
460 | 448 | `gpg --keyserver pgp.mit.edu --send-keys $KEYID`
|
461 | 449 | Add new keys in the php-keyring.gpg in distribution repository using:
|
462 | 450 | `gpg2 --export --export-options export-minimal --armor <all RM keys>`
|
463 | 451 |
|
464 |
| - 3. Request karma to edit `main/php_version.h` and `Zend/zend.h`. Possibly karma |
465 |
| - for other restricted parts of php-src might come in question. To edit |
466 |
| - `main/php_version.h` in a release branch, you need release manager karma in |
467 |
| - `global_avail`. |
468 |
| -
|
469 |
| - 4. Request karma for `web/qa.git` and `web/php.git` for publishing release |
470 |
| - announcements. |
471 |
| -
|
472 |
| - 5. Request moderation access to [email protected] and |
| 452 | + 4. Request moderation access to [email protected] and |
473 | 453 | [email protected] lists, to be able to moderate your release
|
474 | 454 | announcements. All the announcements should ideally be sent from the
|
475 | 455 | @php.net alias. Note, that for sending emails as @php.net alias a custom
|
|
0 commit comments