Skip to content

Commit 25f05c0

Browse files
[llvm][release] On release page, explain package types and verification (#138144)
Background: https://discourse.llvm.org/t/rfc-explaining-release-package-types-and-purposes/85985 So that users can understand which they should use, particularly for Windows. The original text about community builds is kept, after explaining the main release package formats. In addition, explain how to use gpg or gh to verify the packages.
1 parent 6181a06 commit 25f05c0

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

llvm/utils/release/github-upload-release.py

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,45 @@ def create_release(repo, release, tag=None, name=None, message=None):
4242
name = "LLVM {}".format(release)
4343

4444
if not message:
45+
# Note that these lines are not length limited because if we do so, GitHub
46+
# assumes that should be how it is laid out on the page. We want GitHub to
47+
# do the reflowing for us instead.
4548
message = dedent(
4649
"""\
47-
LLVM {} Release
50+
LLVM {release} Release
4851
49-
# A note on binaries
52+
## Package Types
5053
51-
Volunteers make binaries for the LLVM project, which will be uploaded
52-
when they have had time to test and build these binaries. They might
53-
not be available directly or not at all for each release. We suggest
54-
you use the binaries from your distribution or build your own if you
55-
rely on a specific platform or configuration."""
56-
).format(release)
54+
Each platform has one binary release package. The file name starts with either `LLVM-` or `clang+llvm-` and ends with the platform's name. For example, `LLVM-{release}-Linux-ARM64.tar.xz` contains LLVM binaries for Arm64 Linux.
55+
56+
Except for Windows. Where `LLVM-*.exe` is an installer intended for using LLVM as a toolchain and `clang+llvm-` contains the contents of the installer, plus libraries and tools not normally used in a toolchain. You most likely want the `LLVM-` installer, unless you are developing software which itself uses LLVM, in which case choose `clang+llvm-`.
57+
58+
If you do not find a release package for your platform, you may be able to find a community built package on the LLVM Discourse forum thread for this release. Remember that these are built by volunteers and may not always be available.
59+
60+
If you rely on a platform or configuration that is not one of the defaults, we suggest you use the binaries that your platform provides, or build your own release packages.
61+
62+
In addition, source archives are available:
63+
* `<sub-project>-{release}.src.tar.xz` are archives of the sources of specific sub-projects of `llvm-project` (except for `test-suite` which is an archive of the [LLVM Test Suite](https://github.com/llvm/llvm-test-suite)).
64+
* To get all the `llvm-project` source code for this release, choose `llvm-project-{release}.src.tar.xz`.
65+
66+
## Verifying Packages
67+
68+
All packages come with a matching `.sig` or `.jsonl` file. You should use these to verify the integrity of the packages.
69+
70+
If it has a `.sig` file, it should have been signed by the release managers using GPG. Download the keys from the [LLVM website](https://releases.llvm.org/release-keys.asc), import them into your keyring and use them to verify the file:
71+
```
72+
$ gpg --import release-keys.asc
73+
$ gpg --verify <package file name>.sig <package file name>
74+
```
75+
76+
If it has a `.jsonl` file, use [gh](https://cli.github.com/manual/gh_attestation_verify) to verify the package:
77+
```
78+
gh attestation verify --repo llvm/llvm-project <package file name>
79+
(if you are able to connect to GitHub)
80+
gh attestation verify --repo llvm/llvm-project <package file name> --bundle <package file name>.jsonl
81+
(using attestation file on disk)
82+
```"""
83+
).format(release=release)
5784

5885
prerelease = True if "rc" in release else False
5986

0 commit comments

Comments
 (0)