| 1 |
Release process checklist |
| 2 |
========================= |
| 3 |
|
| 4 |
Feel free to print this document or copy it to a text editor to check |
| 5 |
off items while making a release. |
| 6 |
|
| 7 |
- ☐ Refresh your memory with |
| 8 |
https://handbook.gnome.org/maintainers/making-a-release.html |
| 9 |
|
| 10 |
**Versions:** |
| 11 |
|
| 12 |
- ☐ Increase the package version number in ``meson.build`` (it may |
| 13 |
already be increased but not released; double-check it). |
| 14 |
- ☐ Copy version number to ``Cargo.toml``. |
| 15 |
- ☐ Copy version number to ``doc/librsvg.toml``. |
| 16 |
- ☐ Compute crate version number and write it to ``rsvg/Cargo.toml``, see :ref:`crate version<crate_version>` below. |
| 17 |
- ☐ Copy the crate version number to the example in ``rsvg/src/lib.rs``. |
| 18 |
- ☐ ``cargo update -p librsvg`` - needed because you tweaked ``Cargo.toml``, and |
| 19 |
also to get new dependencies. |
| 20 |
- ☐ Tweak the library version number in ``meson.build`` if the API |
| 21 |
changed; follow the steps there. |
| 22 |
- ☐ Adjust the supported versions in ``README.md``. |
| 23 |
- ☐ Adjust the supported versions in ``devel-docs/supported_versions.rst``. |
| 24 |
- ☐ Adjust the supported versions in ``.gitlab/issue_templates/default.md``. |
| 25 |
|
| 26 |
**Rust Bindings:** |
| 27 |
|
| 28 |
- ☐ Make sure that librsvg-rebind is in sync with librsvg C bindings by calling ``./librsvg-rebind/regen.sh`` |
| 29 |
- ☐ If the bindings have changed from the last version, increase the package version in |
| 30 |
- ☐ librsvg-rebind/librsvg-rebind/Cargo.toml |
| 31 |
- ☐ librsvg-rebind/librsvg-rebind/sys/Cargo.toml |
| 32 |
- ☐ For .0 releases, don't forget to update the librsvg-rebind{,sys} version number if it's still a beta. |
| 33 |
- For either of those version updates, ``cargo update -p librsvg-rebind-sys -p librsvg-rebind`` |
| 34 |
|
| 35 |
**Release notes:** |
| 36 |
|
| 37 |
- ☐ Update ``NEWS``, see below for the preferred format. |
| 38 |
|
| 39 |
**CI:** |
| 40 |
|
| 41 |
- ☐ Commit the changes above; push a branch. |
| 42 |
- ☐ Create a merge request; fix it until it passes the CI. Merge it. |
| 43 |
|
| 44 |
**Publish:** |
| 45 |
|
| 46 |
- ☐ Publish ``librsvg`` to crates.io, see :ref:`crate_release` for details. |
| 47 |
- ☐ ``cargo publish -p librsvg`` |
| 48 |
|
| 49 |
- ☐ Publish ``librsvg-rebind`` to crates.io: |
| 50 |
- The publish process does a test compilation and needs the `.so` installed to build, so do |
| 51 |
``meson setup _build --prefix /usr/local/librsvg && meson compile -C _build && meson install -C _build`` |
| 52 |
- ☐ ``cargo publish -p librsvg-rebind-sys`` |
| 53 |
- ☐ ``cargo publish -p librsvg-rebind`` |
| 54 |
- ☐ If this is a development release, create a signed tag for the crate's version - ``git tag -s x.y.z-beta.w``. |
| 55 |
- ☐ Create a signed tag for the merge commit - ``git tag -s x.y.z`` with the version number. |
| 56 |
- ☐ If this is a development release ``git push`` the signed tag for the crate's version to gitlab.gnome.org/GNOME/librsvg |
| 57 |
- ☐ ``git push`` the signed tag for the GNOME version to gitlab.gnome.org/GNOME/librsvg |
| 58 |
- ☐ Optionally edit the `release page ing Gitlab <https://gitlab.gnome.org/GNOME/librsvg/-/releases>`_. |
| 59 |
|
| 60 |
For ``x.y.0`` releases, do the following: |
| 61 |
|
| 62 |
- ☐ `Notify the release |
| 63 |
team <https://gitlab.gnome.org/GNOME/releng/-/issues>`__ on whether |
| 64 |
to use this ``librsvg-x.y.0`` for the next GNOME version via an issue |
| 65 |
on their ``GNOME/releng`` project. |
| 66 |
|
| 67 |
- ☐ ``cargo-audit audit`` and ensure we don’t have vulnerable |
| 68 |
dependencies. |
| 69 |
|
| 70 |
Gitlab release |
| 71 |
-------------- |
| 72 |
|
| 73 |
- ☐ Select the tag ``x.y.z`` you just pushed. |
| 74 |
|
| 75 |
- ☐ If there is an associated milestone, select it too. |
| 76 |
|
| 77 |
- ☐ Fill in the release title - ``x.y.z``. |
| 78 |
|
| 79 |
- ☐ Copy the release notes from NEWS (By default it uses the GIT_TAG_MESSAGE). |
| 80 |
|
| 81 |
- ☐ Add a release asset link to |
| 82 |
``https://download.gnome.org/sources/librsvg/x.y/librsvg-x.y.z.tar.xz`` |
| 83 |
and call it ``librsvg-x.y.z.tar.xz - release tarball``. |
| 84 |
|
| 85 |
- ☐ Add a release asset link to |
| 86 |
``https://download.gnome.org/sources/librsvg/x.y/librsvg-x.y.z.sha256sum`` |
| 87 |
and call it |
| 88 |
``librsvg-x.y.z.sha256sum - release tarball sha256sum``. |
| 89 |
|
| 90 |
Version numbers and release schedule |
| 91 |
------------------------------------ |
| 92 |
|
| 93 |
``meson.build`` and ``Cargo.toml`` must have the same **package |
| 94 |
version** number - this is the number that users of the library see. |
| 95 |
|
| 96 |
``meson.build`` is where the **library version** is defined; this is |
| 97 |
what gets encoded in the SONAME of ``librsvg.so``. |
| 98 |
|
| 99 |
Librsvg follows `GNOME's release versioning as of 2022/September |
| 100 |
<https://discourse.gnome.org/t/even-odd-versioning-is-confusing-lets-stop-doing-it/10391>`_. |
| 101 |
(Note that it used an even/odd numbering scheme before librsvg 2.55.x) |
| 102 |
|
| 103 |
Librsvg follows `GNOME's six-month release schedule |
| 104 |
<https://release.gnome.org/calendar/index.html>`_. |
| 105 |
|
| 106 |
The `release-team <https://gitlab.gnome.org/GNOME/releng/-/issues>`__ |
| 107 |
needs to be notified when a new series comes about, so they can adjust |
| 108 |
their tooling for the stable GNOME releases. File an |
| 109 |
issue in their `repository |
| 110 |
<https://gitlab.gnome.org/GNOME/releng/-/issues>`__ to indicate that |
| 111 |
the new ``librsvg-x.y.0`` is a stable series. |
| 112 |
|
| 113 |
.. _crate_version: |
| 114 |
|
| 115 |
Version number for public Rust crate |
| 116 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 117 |
|
| 118 |
The ``librsvg`` crate is `available on crates.io |
| 119 |
<https://crates.io/crates/librsvg/>`_. This is for people who wish to |
| 120 |
use librsvg directly from Rust, instead of via the C ABI library |
| 121 |
(i.e. the ``.tar.xz`` release). |
| 122 |
|
| 123 |
While the C ABI library uses the GNOME versioning scheme, Rust crates |
| 124 |
use `SemVer <https://semver.org>`_. So, for librsvg, we have the |
| 125 |
following scheme: |
| 126 |
|
| 127 |
**Stable releases:** |
| 128 |
|
| 129 |
* GNOME tarball: 2.57.0 |
| 130 |
* Rust crate: 2.57.0 (i.e. the same) |
| 131 |
|
| 132 |
**Development releases:** |
| 133 |
|
| 134 |
* GNOME tarball: 2.57.90 through 2.57.99 (.9x patch version means development release) |
| 135 |
* Rust crate: 2.58.0-beta.0 through -beta.9 (SemVer supports a -beta.x suffix) |
| 136 |
|
| 137 |
When making releases, you have to edit ``Cargo.toml`` and |
| 138 |
``rsvg/Cargo.toml`` by hand to put in version numbers like the above. |
| 139 |
The CI scripts will check that the correct versions are in place. |
| 140 |
|
| 141 |
.. _crate_release: |
| 142 |
|
| 143 |
Releasing to crates.io |
| 144 |
---------------------- |
| 145 |
|
| 146 |
After preparing a GNOME release, you'll also want to release to |
| 147 |
crates.io. This requires an `API token |
| 148 |
<https://doc.rust-lang.org/cargo/reference/publishing.html#before-your-first-publish>`_; |
| 149 |
if you are maintainer you should have one, and also write access to |
| 150 |
the ``librsvg`` crate on crates.io. |
| 151 |
|
| 152 |
To make a release, ``cargo publish -p librsvg``. |
| 153 |
|
| 154 |
To publish the Rust bindings to the C library, ``cargo publish -p librsvg-rebind-sys``, ``cargo publish -p librsvg-rebind``. |
| 155 |
|
| 156 |
After this succeeds, proceed with the rest of the steps in the |
| 157 |
ref:`release_process_checklist`. |
| 158 |
|
| 159 |
Minimum supported Rust version (MSRV) |
| 160 |
------------------------------------- |
| 161 |
|
| 162 |
While it may seem desirable to always require the latest released |
| 163 |
version of the Rust toolchain, to get new language features and such, |
| 164 |
this is really inconvenient for distributors of librsvg which do not |
| 165 |
update Rust all the time. So, we make a compromise. |
| 166 |
|
| 167 |
The ``meson.build`` script defines ``msrv`` with librsvg’s minimum |
| 168 |
supported Rust version (MSRV). This ensures that distros will get an |
| 169 |
early failure during a build, at the ``meson setup`` step, if they have |
| 170 |
a version of Rust that is too old — instead of getting an obscure |
| 171 |
error message from ``rustc`` in the middle of the build when it finds |
| 172 |
an unsupported language construct. |
| 173 |
|
| 174 |
Please update all of these values when increasing the MSRV: |
| 175 |
|
| 176 |
- ``msrv`` in ``meson.build``. |
| 177 |
|
| 178 |
- ``cargo_c`` version in ``meson.build``. |
| 179 |
|
| 180 |
- ``rust-version`` in ``Cargo.toml``. |
| 181 |
|
| 182 |
- ``RUST_MINIMUM`` in ``ci/container_builds.yml``. |
| 183 |
|
| 184 |
- The ``Compilers and build tools`` section in ``devel-docs/_build_dependencies.rst``. |
| 185 |
|
| 186 |
Sometimes librsvg’s dependencies update their MSRV and librsvg may need |
| 187 |
to increase it as well. Please consider the following before doing this: |
| 188 |
|
| 189 |
- Absolutely do not require a nightly snapshot of the compiler, or |
| 190 |
crates that only build on nightly. |
| 191 |
|
| 192 |
- Distributions with rolling releases usually keep their Rust |
| 193 |
toolchains fairly well updated, maybe not always at the latest, but |
| 194 |
within two or three releases earlier than the latest. If the MSRV you |
| 195 |
want is within about six months of the latest, things are probably |
| 196 |
safe. |
| 197 |
|
| 198 |
- Enterprise distributions update more slowly. It is useful to watch |
| 199 |
for the MSRV that Firefox requires, although sometimes Firefox |
| 200 |
updates Rust very slowly as well. Now that distributions are shipping |
| 201 |
packages other than Firefox that require Rust, they will probably |
| 202 |
start updating more frequently. |
| 203 |
|
| 204 |
Generally — two or three releases earlier than the latest stable Rust is |
| 205 |
OK for rolling distros, probably perilous for enterprise distros. |
| 206 |
Releases within a year of an enterprise distro’s shipping date are |
| 207 |
probably OK. |
| 208 |
|
| 209 |
If you are not sure, ask on the `forum for GNOME |
| 210 |
distributors <https://discourse.gnome.org/tag/distributor>`__ about |
| 211 |
their plans! (That is, posts on ``discourse.gnome.org`` with the |
| 212 |
``distributor`` tag.) |
| 213 |
|
| 214 |
Format for release notes in NEWS |
| 215 |
-------------------------------- |
| 216 |
|
| 217 |
The ``NEWS`` file contains the release notes. Please use something |
| 218 |
close to this format; it is not mandatory, but makes the formatting |
| 219 |
consistent, and is what tooling expects elsewhere - also by writing |
| 220 |
Markdown, you can just cut&paste it into a Gitlab release. You can skim |
| 221 |
bits of the ``NEWS`` file for examples on style and content. |
| 222 |
|
| 223 |
New entries go at the **top** of the file. |
| 224 |
|
| 225 |
:: |
| 226 |
|
| 227 |
Version x.y.z |
| 228 |
============= |
| 229 |
|
| 230 |
Commentary on the release; put anything here that you want to |
| 231 |
highlight. Note changes in the build process, if any, or any other |
| 232 |
things that may trip up distributors. |
| 233 |
|
| 234 |
## Description of a special feature |
| 235 |
|
| 236 |
You can include headings with `##` in Markdown syntax. |
| 237 |
|
| 238 |
Blah blah blah. |
| 239 |
|
| 240 |
|
| 241 |
Next is a list of features added and issues fixed; use gitlab's issue |
| 242 |
numbers. I tend to use this order: first security bugs, then new |
| 243 |
features and user-visible changes, finally regular bugs. The |
| 244 |
rationale is that if people stop reading early, at least they will |
| 245 |
have seen the most important stuff first. |
| 246 |
|
| 247 |
## Changes: |
| 248 |
|
| 249 |
- #123 - title of the issue, or short summary if it warrants more |
| 250 |
discussion than just the title. |
| 251 |
|
| 252 |
- #456 - fix blah blah (Contributor's Name). |
| 253 |
|
| 254 |
## Special thanks for this release: |
| 255 |
|
| 256 |
- Any people that you want to highlight. Feel free to omit this |
| 257 |
section if the release is otherwise unremarkable. |
| 258 |
|
| 259 |
Making a tarball |
| 260 |
---------------- |
| 261 |
|
| 262 |
Don't make a tarball by hand. Let the CI system do it. Look for |
| 263 |
``distcheck`` in the checklist above. That job in the CI pipelines |
| 264 |
has the release tarball which you can download. |
| 265 |
|
| 266 |
Copying the tarball to master.gnome.org |
| 267 |
--------------------------------------- |
| 268 |
|
| 269 |
If you don’t have a maintainer account there, ask [email protected] to |
| 270 |
do it or `ask the release |
| 271 |
team <https://gitlab.gnome.org/GNOME/releng/-/issues>`__ to do it by |
| 272 |
filing an issue on their ``GNOME/releng`` project. |
| 273 |
|
| 274 |
Rust dependencies |
| 275 |
----------------- |
| 276 |
|
| 277 |
Librsvg's ``Cargo.lock`` is checked into git because the resolved |
| 278 |
versions of crates that it mentions are the ones that were actually |
| 279 |
used to run the test suite automatically in CI, and are "known good". |
| 280 |
In other words: `keep the results of dependency resolution in version |
| 281 |
control, and update those results manually |
| 282 |
<https://blog.ometer.com/2017/01/10/dear-package-managers-dependency-resolution-results-should-be-in-version-control/>`_. |
| 283 |
|
| 284 |
It is important to keep these dependencies updated; you can do that |
| 285 |
regularly with the ``cargo update`` step listed in the checklist |
| 286 |
above. |
| 287 |
|
| 288 |
`cargo-audit <https://github.com/rustsec/rustsec>`__ is very useful to |
| 289 |
scan the list of dependencies for registered vulnerabilities in the |
| 290 |
`RustSec vulnerability database <https://rustsec.org/>`__. Run it |
| 291 |
especially before making a new ``x.y.0`` release, or check the output |
| 292 |
of the ``deny`` job in CI pipelines — this runs `cargo-deny |
| 293 |
<https://embarkstudios.github.io/cargo-deny/>`_ to check for |
| 294 |
vulnerable and duplicate dependencies. |
| 295 |
|
| 296 |
Sometimes cargo-audit will report crates that are not vulnerable, but |
| 297 |
that are unmaintained. Keep an eye of those; you may want to file bugs |
| 298 |
upstream to see if the crates are really unmaintained or if they should |
| 299 |
be substituted for something else. |
| 300 |
|
| 301 |
Creating a stable release branch |
| 302 |
-------------------------------- |
| 303 |
|
| 304 |
- Create a branch named ``librsvg-xx.yy``, e.g. ``librsvg-2.54`` |
| 305 |
|
| 306 |
- Make the ``BASE_TAG`` in ``ci/container-builds.yml`` refer to the new |
| 307 |
``librsvg-xx.yy`` branch instead of ``main``. |
| 308 |
|
| 309 |
- Push that branch to origin. |
| 310 |
|
| 311 |
- (Branches with that naming scheme are already automatically protected |
| 312 |
in gitlab’s Settings/Repository/Protected branches.) |
| 313 |
|
| 314 |
- Edit the badge for the stable branch so it points to the new branch: |
| 315 |
Settings/General/Badges, find the existing badge for the stable |
| 316 |
branch, click on the edit button that looks like a pencil. Change the |
| 317 |
**Link** and **Badge image URL**; usually it is enough to just change |
| 318 |
the version number in both. |