|
1 | 1 | # How to re-bootstrap the toolset used to build the VMR
|
2 | 2 |
|
3 |
| -.NET utilizes itself to build. Therefore, in order to build .NET from source, you |
4 |
| -first need to acquire or build a bootstrapping .NET SDK and other tooling such |
5 |
| -as [Arcade](https://github.com/dotnet/arcade). Re-bootstrapping is the term used to describe when the bootstrapped |
6 |
| -toolset need to be updated. This document describes the steps to re-bootstrap |
7 |
| -the VMR. |
| 3 | +.NET utilizes itself to build. Therefore, in order to build .NET from source, |
| 4 | +you first need to acquire or build a bootstrapping .NET SDK and other tooling |
| 5 | +such as [Arcade](https://github.com/dotnet/arcade). Re-bootstrapping is the term |
| 6 | +used to describe when the bootstrapped toolset need to be updated. This document |
| 7 | +describes the steps to re-bootstrap the VMR. |
8 | 8 |
|
9 | 9 | ## When is it appropriate to re-bootstrap?
|
10 | 10 |
|
11 | 11 | As part of the release process, the toolset is updated (e.g. PRs are created via
|
12 |
| -the release automation). Outside of a release, re-bootstrapping is only permitted |
13 |
| -during preview releases. It is not allowed during RC, GA, or servicing releases. |
14 |
| -The reason it is not allowed during non-preview releases is because of the negative |
15 |
| -impact it has on Linux distro maintainers who source build .NET. It is often a long |
16 |
| -and time consuming process for them to re-bootstrap. It is likely to cause |
17 |
| -significant delays in the release/availability of .NET within the distros that are |
18 |
| -source built. |
| 12 | +the release automation). Outside of a release, re-bootstrapping is only |
| 13 | +permitted during preview releases. It is not allowed during RC, GA, or servicing |
| 14 | +releases. The reason it is not allowed during non-preview releases is because of |
| 15 | +the negative impact it has on Linux distro maintainers who source build .NET. It |
| 16 | +is often a long and time consuming process for them to re-bootstrap. It is |
| 17 | +likely to cause significant delays in the release/availability of .NET within |
| 18 | +the distros that are source built. |
19 | 19 |
|
20 | 20 | ## Why is re-bootstrap necessary?
|
21 | 21 |
|
22 | 22 | Re-bootstrapping is necessary when .NET takes a dependency on new functionality
|
23 |
| -added within the bootstrap toolset. For example suppose a new compiler feature is |
24 |
| -added. In order for a repo to take a dependency on the new feature, a re-bootstrap |
25 |
| -would be necessary. The implication of this, and the restrictions of when |
26 |
| -re-bootstrapping is allowed, means that repos should, in general, wait to take a |
27 |
| -dependency on a new toolset feature until after that feature has been released. |
| 23 | +added within the bootstrap toolset. For example suppose a new compiler feature |
| 24 | +is added. In order for a repo to take a dependency on the new feature, a |
| 25 | +re-bootstrap would be necessary. The implication of this, and the restrictions |
| 26 | +of when re-bootstrapping is allowed, means that repos should, in general, wait |
| 27 | +to take a dependency on a new toolset feature until after that feature has been |
| 28 | +released. |
28 | 29 |
|
29 | 30 | ## Steps to re-bootstrap
|
30 | 31 |
|
31 | 32 | ### Automated
|
32 | 33 |
|
33 | 34 | > [!IMPORTANT]
|
34 | 35 | > The re-bootstrap pipeline uploads the artifacts to the official blob storage,
|
35 |
| -> so do not use this pipeline for testing of any kind. |
36 |
| -> To test stage 2 failures, please refer to [this documentation](bootstrapping-guidelines.md#building-on-a-supported-platform-using-rid-known-to-net). |
| 36 | +> so do not use this pipeline for testing of any kind. To test stage 2 failures, |
| 37 | +> please refer to [this |
| 38 | +> documentation](bootstrapping-guidelines.md#building-on-a-supported-platform-using-rid-known-to-net). |
37 | 39 |
|
38 |
| -You can re-bootstrap the VMR using [this pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=1371). |
39 |
| -The pipeline will upload the artifacts & open the corresponding re-bootstrap PR. |
| 40 | +You can re-bootstrap the VMR using [this |
| 41 | +pipeline](https://dev.azure.com/dnceng/internal/_build?definitionId=1371). The |
| 42 | +pipeline will upload the artifacts & open the corresponding re-bootstrap PR. |
40 | 43 |
|
41 | 44 | ### Manual
|
42 | 45 |
|
43 |
| -In case the automated re-bootstrapping pipeline is unavailable, you can manually re-bootstrap the VMR: |
| 46 | +In case the automated re-bootstrapping pipeline is unavailable, you can manually |
| 47 | +re-bootstrap the VMR: |
44 | 48 |
|
45 | 49 | 1. Update previous source-build artifacts
|
46 |
| - 1. Find a [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) run |
47 |
| - with the desired changes. |
48 |
| - 1. If a rebootstrap is needed quickly and it is not feasibly to wait for a |
49 |
| - [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) run, |
50 |
| - you can also use the artifacts from a |
51 |
| - [dotnet-source-build-lite](https://dev.azure.com/dnceng/internal/_build?definitionId=1299) run. |
52 |
| - 1. Retrieve the built SDKs and private source-built artifacts archives, from the following legs: |
| 50 | + 1. Find a |
| 51 | + [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) |
| 52 | + run with the desired changes. |
| 53 | + 1. If a rebootstrap is needed quickly and it is not feasibly to wait for |
| 54 | + a |
| 55 | + [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) |
| 56 | + run, you can also use the artifacts from a |
| 57 | + [dotnet-source-build-lite](https://dev.azure.com/dnceng/internal/_build?definitionId=1299) |
| 58 | + run. |
| 59 | + 1. Retrieve the built SDKs and private source-built artifacts archives, from |
| 60 | + the following legs: |
53 | 61 | 1. Alpine\<nnn\>_Online_MsftSdk_x64
|
54 | 62 | 1. CentOSStream\<n\>_Online_MsftSdk_x64
|
55 |
| - 1. Upload the SDKs to the [source build sdk blob storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/sdks/) |
56 |
| - 1. Upload the private source-built artifacts archives to the [source build assets blob storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/assets/) |
| 63 | + 1. Upload the SDKs to the [source build sdk blob |
| 64 | + storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/sdks/) |
| 65 | + 1. Upload the private source-built artifacts archives to the [source build |
| 66 | + assets blob |
| 67 | + storage](https://dotnetcli.blob.core.windows.net/source-built-artifacts/assets/) |
57 | 68 | 1. Update .NET SDK
|
58 |
| - 1. Find the [dotnet-sdk-official-ci](https://dev.azure.com/dnceng/internal/_build?definitionId=140) build |
59 |
| - that best matches the dotnet-source-build. The following is the suggested |
60 |
| - order of precedence for finding the best match. |
| 69 | + 1. Find the |
| 70 | + [dotnet-sdk-official-ci](https://dev.azure.com/dnceng/internal/_build?definitionId=140) |
| 71 | + build that best matches the dotnet-source-build. The following is the |
| 72 | + suggested order of precedence for finding the best match. |
61 | 73 | 1. A build from the same commit.
|
62 |
| - 1. From the [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219), |
| 74 | + 1. From the |
| 75 | + [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219), |
63 | 76 | look at the build's installer tag.
|
64 |
| - 1. From a VMR commit, you can find the corresponding installer commit |
65 |
| - by looking at the [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
| 77 | + 1. From a VMR commit, you can find the corresponding installer |
| 78 | + commit by looking at the |
| 79 | + [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
66 | 80 | 1. The next passing build after the same commit.
|
67 | 81 | 1. In the odd case where the are no passing builds after the commit, you
|
68 | 82 | can try using an earlier passing build.
|
69 | 83 | 1. Retrieve the built SDK version from the build.
|
70 |
| - 1. Update the dotnet version in the [global.json](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/global.json). |
| 84 | + 1. Update the dotnet version in the |
| 85 | + [global.json](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/global.json). |
71 | 86 | 1. Update arcade
|
72 | 87 | 1. Lookup the arcade commit and version. From a VMR commit, you can find the
|
73 |
| - corresponding arcade commit/version by looking at the [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
74 |
| - 1. Update the arcade SDK version in the [global.json](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/global.json). |
75 |
| - 1. Update the arcade dependency commit and version in the [Version.Details.xml](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/eng/Version.Details.xml). |
| 88 | + corresponding arcade commit/version by looking at the |
| 89 | + [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
| 90 | + 1. Update the arcade SDK version in the |
| 91 | + [global.json](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/global.json). |
| 92 | + 1. Update the arcade dependency commit and version in the |
| 93 | + [Version.Details.xml](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/eng/Version.Details.xml). |
76 | 94 | 1. Update private source-built SDK and artifacts versions
|
77 |
| - 1. Update `PrivateSourceBuiltSdkVersion` and `PrivateSourceBuiltArtifactsVersion` in the [Versions.props](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/eng/Versions.props). |
| 95 | + 1. Update `PrivateSourceBuiltSdkVersion` and |
| 96 | + `PrivateSourceBuiltArtifactsVersion` in the |
| 97 | + [Versions.props](https://github.com/dotnet/installer/blob/main/src/SourceBuild/content/eng/Versions.props). |
78 | 98 |
|
79 |
| -[Tracking issue for automating this process.](https://github.com/dotnet/source-build/issues/4246) |
| 99 | +[Tracking issue for automating this |
| 100 | +process.](https://github.com/dotnet/source-build/issues/4246) |
0 commit comments