|
| 1 | +# How to re-bootstrap the toolset used to build the VMR |
| 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. |
| 8 | + |
| 9 | +# When is it appropriate to re-bootstrap? |
| 10 | + |
| 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. |
| 19 | + |
| 20 | +# Why is re-bootstrap necessary? |
| 21 | + |
| 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. |
| 28 | + |
| 29 | +# Steps to re-bootstrap |
| 30 | + |
| 31 | +1. Update previous source-build artifacts |
| 32 | + 1. Find a [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219) |
| 33 | + with the desired changes. |
| 34 | + 1. Retrieve the built SDKs from the following legs: |
| 35 | + 1. Alpine\<nnn\>_Online_MsftSdk_x64 |
| 36 | + 1. CentOSStream\<8\>_Online_MsftSdk_x64 |
| 37 | + 1. Upload the SDKs to https://dotnetcli.blob.core.windows.net/source-built-artifacts/sdks/ |
| 38 | +1. Update .NET SDK |
| 39 | + 1. Find the [dotnet-installer-official-ci](https://dev.azure.com/dnceng/internal/_build?definitionId=286) |
| 40 | + build that best matches the dotnet-source-build. The following is the suggested |
| 41 | + order of precedence for finding the best match. |
| 42 | + 1. A build from the same commit. |
| 43 | + 1. From the [dotnet-source-build](https://dev.azure.com/dnceng/internal/_build?definitionId=1219), |
| 44 | + look at the build's installer tag. |
| 45 | + 1. From a VMR commit, you can find the corresponding installer commit |
| 46 | + by looking at the [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
| 47 | + 1. The next passing build after the same commit. |
| 48 | + 1. In the odd case where the are no passing builds after the commit, you |
| 49 | + can try using an earlier passing build. |
| 50 | + 1. Retrieve the built SDK version from the build. |
| 51 | + 1. Update the dotnet version in the [global.json](https://github.com/dotnet/dotnet/blob/main/global.json). |
| 52 | +1. Update arcade |
| 53 | + 1. Lookup the arcade commit and version. From a VMR commit, you can find the |
| 54 | + corresponding arcade commit/version by looking at the [source-manifest.json](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json). |
| 55 | + 1. Update the arcade SDK version in the [global.json](https://github.com/dotnet/dotnet/blob/main/global.json). |
| 56 | + 1. Update the arcade dependency commit and version in the [Version.Details.xml](https://github.com/dotnet/dotnet/blob/main/eng/Version.Details.xml). |
| 57 | + |
| 58 | +[Tracking issue for automating this process.](https://github.com/dotnet/source-build/issues/4246) |
0 commit comments