Skip to content

Commit e981f35

Browse files
CopilotadegeoBillWagner
authored
Replace shared include file with platform-specific checksum validation instructions (#47869)
* Initial plan * Add macOS-specific checksum validation instructions Co-authored-by: adegeo <[email protected]> * Port checksum validation from include file to platform-specific articles Co-authored-by: adegeo <[email protected]> * Apply suggestion from @adegeo * Apply suggestion from @adegeo * Fix broken image links by correcting media paths Co-authored-by: BillWagner <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: adegeo <[email protected]> Co-authored-by: BillWagner <[email protected]>
1 parent 46a330c commit e981f35

File tree

3 files changed

+107
-67
lines changed

3 files changed

+107
-67
lines changed

docs/core/install/includes/verify-download-macos-linux.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/core/install/linux-scripted-manual.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,60 @@ To learn how to use the .NET CLI, see [.NET CLI overview](../tools/index.md).
162162

163163
[!INCLUDE [verify-download-intro](includes/verify-download-intro.md)]
164164

165-
[!INCLUDE [verify-download-macos-linux](includes/verify-download-macos-linux.md)]
165+
Use the `sha512sum` command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the _dotnet-sdk-8.0.100-linux-x64.tar.gz_ file:
166+
167+
```bash
168+
$ sha512sum dotnet-sdk-8.0.100-linux-x64.tar.gz
169+
13905ea20191e70baeba50b0e9bbe5f752a7c34587878ee104744f9fb453bfe439994d38969722bdae7f60ee047d75dda8636f3ab62659450e9cd4024f38b2a5 dotnet-sdk-8.0.100-linux-x64.tar.gz
170+
```
171+
172+
Compare the checksum with the value provided by the download site.
173+
174+
### Use a checksum file to validate
175+
176+
The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary:
177+
178+
01. The release notes page for .NET 8 on GitHub at <https://github.com/dotnet/core/tree/main/release-notes/8.0#releases> contains a section named **Releases**. The table in that section links to the downloads and checksum files for each .NET 8 release:
179+
180+
:::image type="content" source="media/install-sdk/release-notes-root.png" alt-text="The github release notes version table for .NET":::
181+
182+
01. Select the link for the version of .NET that you downloaded.
183+
184+
The previous section used .NET SDK 8.0.100, which is in the .NET 8.0.0 release.
185+
186+
01. In the release page, you can see the .NET Runtime and .NET SDK version, and a link to the checksum file:
187+
188+
:::image type="content" source="media/install-sdk/release-notes-version.png" alt-text="The download table with checksums for .NET":::
189+
190+
01. Right-click on the **Checksum** link and copy it to your clipboard.
191+
192+
01. Open a terminal.
193+
194+
01. Use `curl -O {link}` to download the checksum file.
195+
196+
Replace the link in the following command with the link you copied.
197+
198+
```bash
199+
curl -O https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.0-sha.txt
200+
```
201+
202+
01. With both the checksum file and the .NET release file downloaded to the same directory, use the `sha512sum -c {file} --ignore-missing` command to validate the downloaded file.
203+
204+
When validation passes, you see the file printed with the **OK** status:
205+
206+
```bash
207+
$ sha512sum -c 8.0.0-sha.txt --ignore-missing
208+
dotnet-sdk-8.0.100-linux-x64.tar.gz: OK
209+
```
210+
211+
If you see the file marked as **FAILED**, the file you downloaded isn't valid and shouldn't be used.
212+
213+
```bash
214+
$ sha512sum -c 8.0.0-sha.txt --ignore-missing
215+
dotnet-sdk-8.0.100-linux-x64.tar.gz: FAILED
216+
sha512sum: WARNING: 1 computed checksum did NOT match
217+
sha512sum: 8.0.0-sha.txt: no file was verified
218+
```
166219

167220
## Set environment variables system-wide
168221

docs/core/install/macos.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,59 @@ For more information about how enforced-notarization affects .NET (and your .NET
243243
244244
[!INCLUDE [verify-download-intro](includes/verify-download-intro.md)]
245245
246-
[!INCLUDE [verify-download-macos-linux](includes/verify-download-macos-linux.md)]
246+
Use the `shasum -a 512` command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the _dotnet-sdk-8.0.100-osx-x64.tar.gz_ file:
247+
248+
```bash
249+
$ shasum -a 512 dotnet-sdk-8.0.100-osx-x64.tar.gz
250+
13905ea20191e70baeba50b0e9bbe5f752a7c34587878ee104744f9fb453bfe439994d38969722bdae7f60ee047d75dda8636f3ab62659450e9cd4024f38b2a5 dotnet-sdk-8.0.100-osx-x64.tar.gz
251+
```
252+
253+
Compare the checksum with the value provided by the download site.
254+
255+
### Use a checksum file to validate
256+
257+
The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary:
258+
259+
01. The release notes page for .NET 8 on GitHub at <https://github.com/dotnet/core/tree/main/release-notes/8.0#releases> contains a section named **Releases**. The table in that section links to the downloads and checksum files for each .NET 8 release:
260+
261+
:::image type="content" source="media/install-sdk/release-notes-root.png" alt-text="The github release notes version table for .NET":::
262+
263+
01. Select the link for the version of .NET that you downloaded.
264+
265+
The previous section used .NET SDK 8.0.100, which is in the .NET 8.0.0 release.
266+
267+
01. In the release page, you can see the .NET Runtime and .NET SDK version, and a link to the checksum file:
268+
269+
:::image type="content" source="media/install-sdk/release-notes-version.png" alt-text="The download table with checksums for .NET":::
270+
271+
01. Right-click on the **Checksum** link and copy it to your clipboard.
272+
273+
01. Open a terminal.
274+
275+
01. Use `curl -O {link}` to download the checksum file.
276+
277+
Replace the link in the following command with the link you copied.
278+
279+
```bash
280+
curl -O https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.0-sha.txt
281+
```
282+
283+
01. With both the checksum file and the .NET release file downloaded to the same directory, use the `shasum -a 512 -c {file}` command to validate the downloaded file.
284+
285+
When validation passes, you see the file printed with the **OK** status:
286+
287+
```bash
288+
$ shasum -a 512 -c 8.0.0-sha.txt
289+
dotnet-sdk-8.0.100-osx-x64.tar.gz: OK
290+
```
291+
292+
If you see the file marked as **FAILED**, the file you downloaded isn't valid and shouldn't be used.
293+
294+
```bash
295+
$ shasum -a 512 -c 8.0.0-sha.txt
296+
dotnet-sdk-8.0.100-osx-x64.tar.gz: FAILED
297+
shasum: WARNING: 1 computed checksum did NOT match
298+
```
247299

248300
## Arm-based Macs
249301

0 commit comments

Comments
 (0)