diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 000000000..b8aebb8b0 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "microsoft.dotnet.darc": { + "version": "1.1.0-beta.23621.3", + "commands": [ + "darc" + ] + } + } +} diff --git a/.devcontainer/vmr-source-build/README.md b/.devcontainer/vmr-source-build/README.md new file mode 100644 index 000000000..84e425bc2 --- /dev/null +++ b/.devcontainer/vmr-source-build/README.md @@ -0,0 +1,55 @@ + + +This Codespace can help you debug the source build of .NET. In case you have run this from a +`dotnet/installer` PR branch, it will contain the VMR (`dotnet/dotnet`) checked out into +`/workspaces/dotnet` with the PR changes pulled into it. You can then attempt to source-build +the VMR which is what the VMR leg in the installer PR build doing. This build takes about 45 +minutes and, after completion, produces an archived .NET SDK located in +`/workspaces/dotnet/artifacts/x64/Release`. + +## Build the SDK + +To build the VMR, run following: +```bash +cd /workspaces/dotnet +./build.sh --online +``` + +> Please note that, at this time, the build modifies some of the checked-in sources so it might +be preferential to rebuild the Codespace between attempts (or reset the working tree changes). + +For more details, see the instructions at https://github.com/dotnet/dotnet. + +## Synchronize your changes in locally + +When debugging the build, you have two options how to test your changes in this environment. + +### Making changes to the VMR directly + +You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You +can then try to build the VMR and see if the change works for you. + +### Pull changes into the Codespace from your fork + +You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the +fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this +version of the repository into the Codespace by running: + +``` +/workspaces/synchronize-vmr.sh \ + --repository : \ + --remote : +``` + +You can now proceed building the VMR in the Codespace using instructions above. You can repeat +this process and sync a new commit from your fork. Only note that, at this time, Source-Build +modifies some of the checked-in sources so you'll need to revert the working tree changes +between attempts. diff --git a/.devcontainer/vmr-source-build/devcontainer.json b/.devcontainer/vmr-source-build/devcontainer.json new file mode 100644 index 000000000..01eecb5dd --- /dev/null +++ b/.devcontainer/vmr-source-build/devcontainer.json @@ -0,0 +1,25 @@ +// Container suitable for investigating issues with source build +// Contains the VMR (dotnet/dotnet) with applied changes from the current PR +// The container supports source-building the SDK +{ + "name": "VMR with PR changes", + "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36", + "hostRequirements": { + // A completely source built .NET is >64 GB with all the repos/artifacts + "storage": "128gb" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-dotnettools.csharp" + ] + }, + "codespaces": { + "openFiles": [ + "installer/.devcontainer/vmr-source-build/README.md" + ] + } + }, + "onCreateCommand": "${containerWorkspaceFolder}/installer/.devcontainer/vmr-source-build/init.sh", + "workspaceFolder": "/workspaces" +} \ No newline at end of file diff --git a/.devcontainer/vmr-source-build/init.sh b/.devcontainer/vmr-source-build/init.sh new file mode 100755 index 000000000..86ebf4065 --- /dev/null +++ b/.devcontainer/vmr-source-build/init.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -ex + +source="${BASH_SOURCE[0]}" +script_root="$( cd -P "$( dirname "$source" )" && pwd )" + +installer_dir=$(realpath "$script_root/../..") +workspace_dir=$(realpath "$installer_dir/../") +tmp_dir=$(realpath "$workspace_dir/tmp") +vmr_dir=$(realpath "$workspace_dir/dotnet") + +cp "$installer_dir/.devcontainer/vmr-source-build/synchronize-vmr.sh" "$workspace_dir" + +mkdir -p "$tmp_dir" + +# Codespaces performs a shallow fetch only +git -C "$installer_dir" fetch --all --unshallow + +# We will try to figure out, which branch is the current (PR) branch based off of +# We need this to figure out, which VMR branch to use +vmr_branch=$(git -C "$installer_dir" log --pretty=format:'%D' HEAD^ \ + | grep 'origin/' \ + | head -n1 \ + | sed 's@origin/@@' \ + | sed 's@,.*@@') + +"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug + +(cd "$vmr_dir" && ./prep.sh) diff --git a/.devcontainer/vmr-source-build/synchronize-vmr.sh b/.devcontainer/vmr-source-build/synchronize-vmr.sh new file mode 100755 index 000000000..274ca22ab --- /dev/null +++ b/.devcontainer/vmr-source-build/synchronize-vmr.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +(cd /workspaces/installer \ + && ./eng/vmr-sync.sh --vmr /workspaces/dotnet --tmp /workspaces/tmp $*) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 528479925..fa5705869 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -7,31 +7,23 @@ trigger: - main - master - release/* - - internal/release/3.* - - internal/release/5.* - - internal/release/6.* + - internal/release/* variables: - name: _PublishUsingPipelines value: false -- name: PostBuildSign - value: true +- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: + - name: PostBuildSign + value: false +- ${{ else }}: + - name: PostBuildSign + value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: Codeql.Enabled value: true - group: DotNet-Installer-SDLValidation-Params - name: _PublishUsingPipelines value: true -# Default to running tests in PRs and public CI, but not in official builds -- name: _WindowsTestArg - value: '-test' -- name: _NonWindowsTestArg - value: '--test' -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _WindowsTestArg - value: '' - - name: _NonWindowsTestArg - value: '' - name: _InternalRuntimeDownloadArgs value: '' - ${{ if eq(variables['System.TeamProject'], 'internal') }}: @@ -39,10 +31,7 @@ variables: value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) -- name: DncEngPublicBuildPool - value: NetCore-Svc-Public -- name: DncEngInternalBuildPool - value: NetCore1ESPool-Svc-Internal +- template: /eng/common/templates/variables/pool-providers.yml # Set the MicroBuild plugin installation directory to the agent temp directory to avoid SDL tool scanning. - name: MicroBuildOutputFolderOverride value: $(Agent.TempDirectory) @@ -61,395 +50,299 @@ extends: template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines parameters: containers: - fedora39: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39 + alpine319WithNode: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode + cblMariner20Fpm: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm + centosStream8: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 + debian11: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64 + fedora36: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36 + ubuntu2204: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04 + mariner20CrossArm: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine + ubuntu2204DebPkg: + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg sdl: sourceAnalysisPool: name: $(DncEngInternalBuildPool) - image: 1es-windows-2019 + image: 1es-windows-2022 os: windows ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: componentgovernance: ignoreDirectories: artifacts, .packages + # Temporary to workaround MicroBuild issues. + credscan: + enabled: false + justificationForDisabling: 'CredScan is failing on the MicroBuild signing plugin. "MicroBuild/Plugins/nuget.config" has changing content and thus cannot be baselined.' stages: - - stage: build + - stage: Build jobs: # Build Retry Configuration - job: Publish_Build_Configuration pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $(DncEngPublicBuildPool) - image: 1es-windows-2019-open + image: 1es-windows-2022-open os: windows ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $(DncEngInternalBuildPool) - image: 1es-windows-2019 + image: 1es-windows-2022 os: windows steps: - task: 1ES.PublishPipelineArtifact@1 displayName: Publish Build Config inputs: - targetPath: $(Build.SourcesDirectory)\eng\BuildConfiguration - artifactName: BuildConfiguration - - template: /eng/build.yml@self - parameters: - agentOs: Windows_NT - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - image: 1es-windows-2019-open - os: windows - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2019 - os: windows - timeoutInMinutes: 180 - strategy: - matrix: - # Public-only builds - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - Build_Debug_x86: - _BuildConfig: Debug - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: $(_WindowsTestArg) - Build_ES_Debug_x64: - _BuildConfig: Debug - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: es - _AdditionalBuildParameters: '' - _TestArg: '' - # Internal-only builds - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - Build_Release_x86: - _BuildConfig: Release - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: $(_WindowsTestArg) - # Always run builds - Build_Release_x64: - _BuildConfig: Release - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '/p:PublishInternalAsset=true' - _TestArg: $(_WindowsTestArg) - Build_Release_arm: - _BuildConfig: Release - _BuildArchitecture: arm - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - # Never run tests on arm64 - _TestArg: '' - Build_Release_arm64: - _BuildConfig: Release - _BuildArchitecture: arm64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - # Never run tests on arm64 - _TestArg: '' + targetPath: $(Build.SourcesDirectory)\eng\buildConfiguration + artifactName: buildConfiguration - - template: /eng/build.yml@self - parameters: - agentOs: Windows_NT - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - image: 1es-windows-2019-open - os: windows - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - image: 1es-windows-2019 - os: windows - timeoutInMinutes: 180 - strategy: - matrix: - # Always run builds - Build_Release_x64: - _BuildConfig: Release - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '/p:PublishInternalAsset=true' - # Never run tests on PGO bits - _TestArg: '' - Build_Release_x86: - _BuildConfig: Release - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: '' - pgoInstrument: true + # PR-only jobs + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + # Windows + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Debug_x64 + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: true + # Linux + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Ubuntu_22_04_Debug_x64 + container: ubuntu2204 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Fedora_36_Debug_x64 + container: fedora36 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_CentOS_8_Stream_Debug_x64 + container: centosStream8 + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Debian_11_Debug_x64 + container: debian11 + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:BuildSdkDeb=true' + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm64_Debug + buildConfiguration: Debug + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + # Never run tests on arm64 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Debug_x64 + container: alpine319WithNode + buildConfiguration: Debug + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: true + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: true - - template: /eng/build.yml@self - parameters: - agentOs: Linux - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - image: 1es-ubuntu-2004-open - os: linux - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - image: 1es-ubuntu-2004 - os: linux - timeoutInMinutes: 180 - strategy: - matrix: - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - Build_Ubuntu_18_04_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Fedora_29_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker fedora.29' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Debian_11_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker debian' - _LinuxPortable: '' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _AdditionalBuildParameters: '/p:BuildSdkDeb=true' - _TestArg: $(_NonWindowsTestArg) - Build_Rhel_7_2_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Rhel_7_2_Release_Arm64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm - _TestArg: '' - _AdditionalBuildParameters: '/p:CLIBUILD_SKIP_TESTS=true' - Build_Arm_Debug: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm' - _BuildArchitecture: 'arm' - # Never run tests on arm - _TestArg: '' - Build_Arm64_Debug: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Debug_arm: - _BuildConfig: Debug - # linux-musl-arm cross gen depends on glibc 2.27 (this OS has it) - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm' - _BuildArchitecture: 'arm' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm - _TestArg: '' - Build_Linux_musl_Debug_arm64: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm64' - _BuildArchitecture: 'arm64' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker alpine.3.15' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-x64' - _BuildArchitecture: 'x64' - # Pass in HostOSName when running on alpine - _AdditionalBuildParameters: '/p:HostOSName="linux-musl"' - _TestArg: $(_NonWindowsTestArg) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - Build_Arm_Release: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm' - _BuildArchitecture: 'arm' - # Never run tests on arm - _TestArg: '' - Build_Arm64_Release: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Release_arm: - _BuildConfig: Release - # linux-musl-arm cross gen depends on glibc 2.27 (this OS has it) - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm' - _BuildArchitecture: 'arm' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm - _TestArg: '' - Build_Linux_musl_Release_arm64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm64' - _BuildArchitecture: 'arm64' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker alpine.3.15' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-x64' - _BuildArchitecture: 'x64' - # Pass in HostOSName when running on alpine - _AdditionalBuildParameters: '/p:HostOSName="linux-musl"' - Build_Linux_Portable_Deb_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' - _TestArg: $(_NonWindowsTestArg) - Build_Linux_Portable_Rpm_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false' - _TestArg: $(_NonWindowsTestArg) - Build_Linux_Portable_Rpm_Release_Arm64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true' - # Never run tests on arm64 - _TestArg: '' - Build_LinuxPortable_Release_x64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) + # MacOS + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: true - - template: /eng/build.yml@self - parameters: - agentOs: Linux - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: $(DncEngPublicBuildPool) - image: 1es-ubuntu-2004-open - os: linux - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: $(DncEngInternalBuildPool) - image: 1es-ubuntu-2004 - os: linux - timeoutInMinutes: 180 - strategy: - matrix: - # Always run builds - Build_LinuxPortable_Release_x64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: '' - pgoInstrument: true + # Official/PGO instrumentation Builds + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + # Windows + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_x86 + buildConfiguration: Release + buildArchitecture: x86 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Windows_NT + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + # Linux + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm_Release + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-arm' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Arm64_Release + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm + container: mariner20CrossArm + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-musl-arm' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-musl-arm64' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_x64 + container: alpine319WithNode + buildConfiguration: Release + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Deb_Release_x64 + container: ubuntu2204DebPkg + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_x64 + container: cblMariner20Fpm + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_Arm64 + container: cblMariner20Fpm + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false - - template: /eng/build.yml@self - parameters: - agentOs: Darwin - pool: - name: Azure Pipelines - image: macOS-latest - os: macOS - timeoutInMinutes: 180 - strategy: - matrix: - Build_Release_x64: - _BuildConfig: Release - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Release_arm64: - _BuildConfig: Release - _RuntimeIdentifier: '--runtime-id osx-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' + # MacOS + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: false + - template: eng/build.yml@self + parameters: + agentOs: Darwin + jobName: Build_Release_arm64 + runtimeIdentifier: 'osx-arm64' + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + # Source Build - template: /eng/common/templates-official/jobs/source-build.yml@self parameters: enableInternalSources: true - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml@self - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - stage: Publish + dependsOn: + - Build + jobs: - template: /eng/common/templates-official/job/publish-build-assets.yml@self parameters: - dependsOn: - - Windows_NT - - Linux - - Darwin - - Source_Build_Managed - - Source_Build_Create_Tarball - - PGO_Linux - - PGO_Windows_NT publishUsingPipelines: true + publishAssetsImmediately: true pool: name: $(DncEngInternalBuildPool) - image: 1es-windows-2019 + image: 1es-windows-2022 os: windows - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates-official/post-build/post-build.yml@self - parameters: - publishingInfraVersion: 3 - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false - publishInstallersAndChecksums: true - SDLValidationParameters: - enable: false - params: ' -SourceToolsList @("policheck","credscan") - -TsaInstanceURL $(_TsaInstanceURL) - -TsaProjectName $(_TsaProjectName) - -TsaNotificationEmail $(_TsaNotificationEmail) - -TsaCodebaseAdmin $(_TsaCodebaseAdmin) - -TsaBugAreaPath $(_TsaBugAreaPath) - -TsaIterationPath $(_TsaIterationPath) - -TsaRepositoryName "dotnet-installer" - -TsaCodebaseName "dotnet-installer" - -TsaPublish $True' diff --git a/.vsts-pr.yml b/.vsts-pr.yml index daac90107..3698546de 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -5,403 +5,355 @@ trigger: - main - master - release/* - - internal/release/3.* - - internal/release/5.* - - internal/release/6.* + - internal/release/* variables: - name: _PublishUsingPipelines value: false -- name: PostBuildSign - value: true +- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: + - name: PostBuildSign + value: false +- ${{ else }}: + - name: PostBuildSign + value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: Codeql.Enabled value: true - group: DotNet-Installer-SDLValidation-Params - name: _PublishUsingPipelines value: true -# Default to running tests in PRs and public CI, but not in official builds -- name: _WindowsTestArg - value: '-test' -- name: _NonWindowsTestArg - value: '--test' -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _WindowsTestArg - value: '' - - name: _NonWindowsTestArg - value: '' + - name: _InternalRuntimeDownloadArgs value: '' + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: _InternalRuntimeDownloadArgs value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) /p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64) +- template: /eng/common/templates/variables/pool-providers.yml + stages: -- stage: build +- stage: Build jobs: + # This job is for build retry configuration. - job: Publish_Build_Configuration pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals windows.vs2019.amd64.open + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals windows.vs2022preview.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals windows.vs2019.amd64 + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2022preview.amd64 steps: - - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration - artifact: BuildConfiguration + - publish: $(Build.SourcesDirectory)\eng\buildConfiguration + artifact: buildConfiguration displayName: Publish Build Config - - template: /eng/build-pr.yml - parameters: - agentOs: Windows_NT - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals windows.vs2019.amd64.open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals windows.vs2019.amd64 - timeoutInMinutes: 180 - strategy: - matrix: - # Public-only builds - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - Build_Debug_x86: - _BuildConfig: Debug - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: $(_WindowsTestArg) - Build_ES_Debug_x64: - _BuildConfig: Debug - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: es - _AdditionalBuildParameters: '' - _TestArg: '' - # Internal-only builds - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - Build_Release_x86: - _BuildConfig: Release - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: $(_WindowsTestArg) - # Always run builds - Build_Release_x64: - _BuildConfig: Release - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '/p:PublishInternalAsset=true' - _TestArg: $(_WindowsTestArg) - Build_Release_arm: - _BuildConfig: Release - _BuildArchitecture: arm - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - # Never run tests on arm64 - _TestArg: '' - Build_Release_arm64: - _BuildConfig: Release - _BuildArchitecture: arm64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - # Never run tests on arm64 - _TestArg: '' + + ## PR-only jobs + + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + ## Windows + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + jobName: Build_Debug_x64 + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: true - - template: /eng/build-pr.yml - parameters: - agentOs: Windows_NT - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals windows.vs2019.amd64.open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals windows.vs2019.amd64 - timeoutInMinutes: 180 - strategy: - matrix: - # Always run builds - Build_Release_x64: - _BuildConfig: Release - _BuildArchitecture: x64 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '/p:PublishInternalAsset=true' - # Never run tests on PGO bits - _TestArg: '' - Build_Release_x86: - _BuildConfig: Release - _BuildArchitecture: x86 - _DOTNET_CLI_UI_LANGUAGE: '' - _AdditionalBuildParameters: '' - _TestArg: '' - pgoInstrument: true + ## Linux - - template: /eng/build-pr.yml - parameters: - agentOs: Linux - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - timeoutInMinutes: 180 - strategy: - matrix: - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - Build_Ubuntu_18_04_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Fedora_29_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker fedora.29' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Debian_11_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker debian' - _LinuxPortable: '' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _AdditionalBuildParameters: '/p:BuildSdkDeb=true' - _TestArg: $(_NonWindowsTestArg) - Build_Rhel_7_2_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Rhel_7_2_Release_Arm64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm - _TestArg: '' - _AdditionalBuildParameters: '/p:CLIBUILD_SKIP_TESTS=true' - Build_Arm_Debug: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm' - _BuildArchitecture: 'arm' - # Never run tests on arm - _TestArg: '' - Build_Arm64_Debug: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Debug_arm: - _BuildConfig: Debug - # linux-musl-arm cross gen depends on glibc 2.27 (this OS has it) - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm' - _BuildArchitecture: 'arm' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm - _TestArg: '' - Build_Linux_musl_Debug_arm64: - _BuildConfig: Debug - _DockerParameter: '' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm64' - _BuildArchitecture: 'arm64' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Debug_x64: - _BuildConfig: Debug - _DockerParameter: '--docker alpine.3.15' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-x64' - _BuildArchitecture: 'x64' - # Pass in HostOSName when running on alpine - _AdditionalBuildParameters: '/p:HostOSName="linux-musl"' - _TestArg: $(_NonWindowsTestArg) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - Build_Arm_Release: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm' - _BuildArchitecture: 'arm' - # Never run tests on arm - _TestArg: '' - Build_Arm64_Release: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Release_arm: - _BuildConfig: Release - # linux-musl-arm cross gen depends on glibc 2.27 (this OS has it) - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm' - _BuildArchitecture: 'arm' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm - _TestArg: '' - Build_Linux_musl_Release_arm64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-arm64' - _BuildArchitecture: 'arm64' - _AdditionalBuildParameters: '/p:OSName="linux-musl"' - # Never run tests on arm64 - _TestArg: '' - Build_Linux_musl_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker alpine.3.15' - _LinuxPortable: '' - _RuntimeIdentifier: '--runtime-id linux-musl-x64' - _BuildArchitecture: 'x64' - # Pass in HostOSName when running on alpine - _AdditionalBuildParameters: '/p:HostOSName="linux-musl"' - Build_Linux_Portable_Deb_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker ubuntu.18.04' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' - _TestArg: $(_NonWindowsTestArg) - Build_Linux_Portable_Rpm_Release_x64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false' - _TestArg: $(_NonWindowsTestArg) - Build_Linux_Portable_Rpm_Release_Arm64: - _BuildConfig: Release - _DockerParameter: '--docker rhel' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '--runtime-id linux-arm64' - _BuildArchitecture: 'arm64' - # Do not publish zips and tarballs. The linux-x64 binaries are - # already published by Build_LinuxPortable_Release_x64 - _AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true' - # Never run tests on arm64 - _TestArg: '' - Build_LinuxPortable_Release_x64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Ubuntu_22_04_Debug_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04' + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Fedora_36_Debug_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36' + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: true + runTests: true + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_CentOS_8_Stream_Debug_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' + buildConfiguration: Debug + buildArchitecture: x64 + linuxPortable: false + runTests: true + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Debian_11_Debug_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64' + buildConfiguration: Debug + buildArchitecture: x64 + additionalBuildParameters: '/p:BuildSdkDeb=true' + linuxPortable: false + runTests: true + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Arm64_Debug + buildConfiguration: Debug + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + # Never run tests on arm64 + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Debug_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode' + buildConfiguration: Debug + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: true + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: true - - template: /eng/build-pr.yml - parameters: - agentOs: Linux - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - timeoutInMinutes: 180 - strategy: - matrix: - # Always run builds - Build_LinuxPortable_Release_x64: - _BuildConfig: Release - _DockerParameter: '' - _LinuxPortable: '--linux-portable' - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: '' - pgoInstrument: true - - template: /eng/build-pr.yml - parameters: - agentOs: Darwin - pool: - vmImage: 'macOS-latest' - timeoutInMinutes: 180 - strategy: - matrix: - Build_Release_x64: - _BuildConfig: Release - _RuntimeIdentifier: '' - _BuildArchitecture: 'x64' - _TestArg: $(_NonWindowsTestArg) - Build_Release_arm64: - _BuildConfig: Release - _RuntimeIdentifier: '--runtime-id osx-arm64' - _BuildArchitecture: 'arm64' - # Never run tests on arm64 - _TestArg: '' + # MacOS + - template: eng/build-pr.yml + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: true + + ## Official/PGO instrumentation Builds + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + + ## Windows + + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + jobName: Build_Release_x86 + buildConfiguration: Release + buildArchitecture: x86 + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + ## Linux + + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Arm_Release + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-arm' + linuxPortable: true + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Arm64_Release + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine' + buildConfiguration: Release + buildArchitecture: arm + runtimeIdentifier: 'linux-musl-arm' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-musl-arm64' + additionalBuildParameters: '/p:OSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_musl_Release_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode' + buildConfiguration: Release + buildArchitecture: x64 + runtimeIdentifier: 'linux-musl-x64' + # Pass in HostOSName when running on alpine + additionalBuildParameters: '/p:HostOSName="linux-musl"' + linuxPortable: false + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Deb_Release_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg' + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' + linuxPortable: true + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_x64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm' + buildConfiguration: Release + buildArchitecture: x64 + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_Linux_Portable_Rpm_Release_Arm64 + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm' + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + # Do not publish zips and tarballs. The linux-x64 binaries are + # already published by Build_LinuxPortable_Release_x64 + additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true' + linuxPortable: true + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false + + # MacOS + + - template: eng/build-pr.yml + parameters: + agentOs: Darwin + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Darwin + jobName: Build_Release_arm64 + runtimeIdentifier: 'osx-arm64' + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + ## Windows PGO Instrumentation builds + + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + additionalBuildParameters: '/p:PublishInternalAsset=true' + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_x86 + buildConfiguration: Release + buildArchitecture: x86 + runTests: false + - template: eng/build-pr.yml + parameters: + agentOs: Windows_NT + pgoInstrument: true + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + runTests: false + + ## Linux PGO Instrumentation builds + + - template: eng/build-pr.yml + parameters: + agentOs: Linux + pgoInstrument: true + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false + + - template: eng/build-pr.yml + parameters: + agentOs: Linux + pgoInstrument: true + jobName: Build_Release_arm64 + buildConfiguration: Release + buildArchitecture: arm64 + linuxPortable: true + runTests: false - template: /eng/common/templates/jobs/source-build.yml parameters: enableInternalSources: true - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball-pr.yml - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - stage: Publish + dependsOn: + - Build + jobs: - template: /eng/common/templates/job/publish-build-assets.yml parameters: - dependsOn: - - Windows_NT - - Linux - - Darwin - - Source_Build_Managed - - Source_Build_Create_Tarball - - PGO_Linux - - PGO_Windows_NT publishUsingPipelines: true + publishAssetsImmediately: true pool: ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals windows.vs2017.amd64 - -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: eng\common\templates\post-build\post-build.yml - parameters: - publishingInfraVersion: 3 - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false - publishInstallersAndChecksums: true - SDLValidationParameters: - enable: false - params: ' -SourceToolsList @("policheck","credscan") - -TsaInstanceURL $(_TsaInstanceURL) - -TsaProjectName $(_TsaProjectName) - -TsaNotificationEmail $(_TsaNotificationEmail) - -TsaCodebaseAdmin $(_TsaCodebaseAdmin) - -TsaBugAreaPath $(_TsaBugAreaPath) - -TsaIterationPath $(_TsaIterationPath) - -TsaRepositoryName "dotnet-installer" - -TsaCodebaseName "dotnet-installer" - -TsaPublish $True' + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2022.amd64 diff --git a/CODEOWNERS b/CODEOWNERS index df0cb831e..1272a3799 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,7 +1,8 @@ # Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths. # See https://help.github.com/articles/about-code-owners/ -# Snaps - +/.devcontainer/ @dotnet/source-build-internal +/eng/SourceBuild* @dotnet/source-build-internal /src/snaps/ @rbhanda -/src/SourceBuild/ @dotnet/source-build-internal \ No newline at end of file +/src/SourceBuild/ @dotnet/source-build-internal +/src/VirtualMonoRepo/ @dotnet/product-construction diff --git a/Directory.Build.props b/Directory.Build.props index e1ad6e446..39b30a121 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,6 +11,7 @@ $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) $(BuildArchitecture) $(BuildArchitecture) + $(BuildArchitecture) x64 @@ -24,7 +25,7 @@ true true - net6.0 + net8.0 - - + + - + - - + + - - - - + + + + - - + + + - - + + + + - - - - - - + diff --git a/README.md b/README.md index 4be3949f9..e3e9d63b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -# .NET Core SDK +# .NET SDK Installers -[![Join the chat at https://gitter.im/dotnet/cli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub release](https://img.shields.io/github/release/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/releases/) [![GitHub repo size](https://img.shields.io/github/repo-size/dotnet/installer)](https://github.com/dotnet/installer) [![GitHub issues-opened](https://img.shields.io/github/issues/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/issues?q=is%3Aissue+is%3Aopened) @@ -9,15 +8,24 @@ [![GitHub pulls-merged](https://img.shields.io/github/issues-search/dotnet/installer?label=merged%20pull%20requests&query=is%3Apr%20is%3Aclosed%20is%3Amerged&color=darkviolet)](https://github.com/dotnet/installer/pulls?q=is%3Apr+is%3Aclosed+is%3Amerged) [![GitHub pulls-unmerged](https://img.shields.io/github/issues-search/dotnet/installer?label=unmerged%20pull%20requests&query=is%3Apr%20is%3Aclosed%20is%3Aunmerged&color=red)](https://github.com/dotnet/installer/pulls?q=is%3Apr+is%3Aclosed+is%3Aunmerged) [![GitHub contributors](https://img.shields.io/github/contributors/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/graphs/contributors/) -[![Commit Activity](https://img.shields.io/github/commit-activity/m/badges/shields)]() +[![Commit Activity](https://img.shields.io/github/commit-activity/m/dotnet/installer)]() +This repo contains the source code for the cross-platform [.NET](http://github.com/dotnet/core) SDK. It aggregates the .NET toolchain, the .NET runtime, the templates, and the .NET Windows Desktop runtime. It produces zip, tarballs, and native packages for various supported platforms. -This repo contains the source code for the cross-platform [.NET Core](http://github.com/dotnet/core) SDK. It aggregates the .NET Toolchain, the .NET Core runtime, the templates, and the .NET Core Windows Desktop runtime. It produces zip, tarballs, and native packages for various supported platforms. - -Looking for released versions of the .NET Core tooling? +Looking for released versions of the .NET tooling? ---------------------------------------- -Download released versions of the .NET Core tools (CLI, MSBuild and the new csproj) at https://dot.net/core. +The links below are for preview versions of .NET tooling. Prefer to use released versions of the .NET tools? Go to https://dot.net/download. + +Looking for .NET Framework downloads? +---------------------------------------- + +.NET Framework is the product from which the .NET Core project originated. .NET Core (mostly just called ".NET" here) adds many features and improvements and supports many more platforms than .NET Framework. .NET Framework remains fully supported and you can find the downloads on the [.NET website](https://dotnet.microsoft.com/download/dotnet-framework). For new projects, we recommend you use .NET Core. + +Want to contribute or find out more about the .NET project? +---------------------------------------- + +This repo is for the installers. Most of the implementation is in other repos, such as the [dotnet/runtime repo](https://github.com/dotnet/runtime) or the [dotnet/aspnetcore repo](https://github.com/dotnet/aspnetcore) and [many others](https://github.com/dotnet/core/blob/main/Documentation/core-repos.md). We welcome you to join us there! Found an issue? --------------- @@ -25,7 +33,7 @@ You can consult the [Documents Index for the SDK repo](https://github.com/dotnet This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct). -# Build .NET installer +# Build .NET installer The repository contains native code project required for the Windows installer. If you intend to build it locally on Windows, you will need to ensure that you have the following items installed. - Install CMAKE 3.21.0 is required if you're building VS 17.0. Make sure to add CMAKE to your PATH (the installer will prompt you). @@ -43,15 +51,30 @@ Please see the [dotnet/source-build](https://github.com/dotnet/source-build) rep ## Support -.NET Source-Build is supported on the oldest available .NET SDK feature update, and on Linux only. -For example, if both .NET 6.0.1XX and 6.0.2XX feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will only support 6.0.1XX. +.NET Source-Build is supported on the oldest available .NET SDK feature update for each major release, and on Linux only. +For example, if .NET 6.0.1xx, 6.0.2xx, and 7.0.1xx feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will support 6.0.1xx and 7.0.1xx. For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements. ## Prerequisites The dependencies for building .NET from source can be found [here](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md). -## Building +## Building .NET 8.0 + +.NET 8.0 (currently in prerelease) and newer will be built from the [dotnet/dotnet](https://github.com/dotnet/dotnet) repo. +Clone the dotnet/dotnet repo and check out the tag for the desired release. +Then, follow the instructions in [dotnet/dotnet's README](https://github.com/dotnet/dotnet/blob/main/README.md#dev-instructions) to build .NET from source. + +### Codespaces + +It is also possible to utilize [GitHub Codespaces](https://github.com/features/codespaces) and build .NET from the `dotnet/dotnet` repository from source that way. +You can either create a Codespace in `dotnet/dotnet` directly or you can also make one from a PR branch in `dotnet/installer`. This will give you an environment with the VMR checked out and containing all of new changes from the PR. +This can be especially valuable for investigations of source-build failures during PRs. + +To create a Codespace for a `dotnet/installer` PR, use the `vmr-source-build` devcontainer configuration (select this when "newing the Codespace with options" under the three-dots-menu). +Further instructions on how to build inside of the Codespace will be available upon launch. + +## Building .NET 7.0 and .NET 6.0 1. Create a .NET source tarball. @@ -67,10 +90,8 @@ The dependencies for building .NET from source can be found [here](https://githu ```bash cd /path/to/complete/dotnet/sources - ./prep.sh + ./prep.sh --bootstrap ``` - - On arm64, please use `./prep.sh --bootstrap` instead. This issue is being tracked [here](https://github.com/dotnet/source-build/issues/2758). 3. Build the .NET SDK @@ -79,7 +100,7 @@ The dependencies for building .NET from source can be found [here](https://githu ``` This builds the entire .NET SDK from source. - The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz`. + The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz`. Optionally add the `--online` flag to add online NuGet restore sources to the build. This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet. @@ -90,7 +111,7 @@ The dependencies for building .NET from source can be found [here](https://githu ```bash mkdir -p $HOME/dotnet - tar zxf artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz -C $HOME/dotnet + tar zxf artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz -C $HOME/dotnet ln -s $HOME/dotnet/dotnet /usr/bin/dotnet ``` @@ -104,498 +125,301 @@ The dependencies for building .NET from source can be found [here](https://githu Visibility|All legs| |:------|:------| -|Public|[![Status](https://dev.azure.com/dnceng/public/_apis/build/status/176)](https://dev.azure.com/dnceng/public/_build?definitionId=176)| +|Public|[![Status](https://dev.azure.com/dnceng-public/public/_apis/build/status%2Fdotnet%2Finstaller%2Finstaller?branchName=main)](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=20&branchName=main)| |Microsoft Internal|[![Status](https://dev.azure.com/dnceng/internal/_apis/build/status/286)](https://dev.azure.com/dnceng/internal/_build?definitionId=286)| -Installers and Binaries ------------------------ +## Installers and Binaries -You can download the .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET Core SDK contains both the .NET Core runtime and CLI tools. +You can download the .NET SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET SDK contains both the .NET runtime and CLI tools. **Note:** Be aware that the following installers are the **latest bits**. If you want to install the latest released versions, check out the [preceding section](#looking-for-released-versions-of-the-net-core-tooling). With development builds, internal NuGet feeds are necessary for some scenarios (for example, to acquire the runtime pack for self-contained apps). You can use the following NuGet.config to configure these feeds. See the following document [Configuring NuGet behavior](https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior) for more information on where to modify your NuGet.config to apply the changes. -> Example: -**For .NET 6 builds** +**For .NET 8 builds** -``` +```xml - - - -``` -**Note:** that you may need to add the dotnet5 feed for a short period of time while .NET transitions to .NET 6 - -**For .NET 6 Optional workloads** - -We strongly recommend using `--skip-manifest-update` with `dotnet workload install` as otherwise you could pick up a random build of various workloads as we'll automatically update to the newest one available on the feed. - -``` - - - + ``` -**For .NET 5 builds** +**For .NET 7 builds** -``` +```xml - + ``` -**For .NET 3.1 builds** +Do not directly edit the table below. Use https://github.com/dotnet/installer/tree/main/tools/sdk-readme-table-generator to help you generate it. Make sure to run the table generator test and make any changes to the generator along with your changes to the table. Daily servicing builds aren't shown here because they may contain upcoming security fixes. All public servicing builds can be downloaded at http://aka.ms/dotnet-download. -``` - - - - - -``` +### Table +*Note* the 7.0.100 build will be finished internally. Below is the last public version available from that branch but is not fully updated with the final runtime. -Please do not directly edit the table below. Use https://github.com/dotnet/installer/tree/main/tools/sdk-readme-table-generator to help you generate it. Make sure to run the table generator test and make any changes to the generator along with your changes to the table. - -| Platform | Release/6.0.1XX
(6.0.x Runtime) | Release/6.0.1XX-rc1
(6.0 Runtime) | Release/5.0.4XX
(5.0 Runtime) | Release/5.0.2XX
(5.0 Runtime) | Release/3.1.4XX
(3.1.x Runtime) | Release/3.1.1XX
(3.1.x Runtime) | -| :--------- | :----------: | :----------: | :----------: | :----------: | :----------: | :----------: | -| **Windows x64** | [![][win-x64-badge-6.0.1XX]][win-x64-version-6.0.1XX]
[Installer][win-x64-installer-6.0.1XX] - [Checksum][win-x64-installer-checksum-6.0.1XX]
[zip][win-x64-zip-6.0.1XX] - [Checksum][win-x64-zip-checksum-6.0.1XX] | [![][win-x64-badge-6.0.1XX-rc1]][win-x64-version-6.0.1XX-rc1]
[Installer][win-x64-installer-6.0.1XX-rc1] - [Checksum][win-x64-installer-checksum-6.0.1XX-rc1]
[zip][win-x64-zip-6.0.1XX-rc1] - [Checksum][win-x64-zip-checksum-6.0.1XX-rc1] | [![][win-x64-badge-5.0.4XX]][win-x64-version-5.0.4XX]
[Installer][win-x64-installer-5.0.4XX] - [Checksum][win-x64-installer-checksum-5.0.4XX]
[zip][win-x64-zip-5.0.4XX] - [Checksum][win-x64-zip-checksum-5.0.4XX] | [![][win-x64-badge-5.0.2XX]][win-x64-version-5.0.2XX]
[Installer][win-x64-installer-5.0.2XX] - [Checksum][win-x64-installer-checksum-5.0.2XX]
[zip][win-x64-zip-5.0.2XX] - [Checksum][win-x64-zip-checksum-5.0.2XX] | [![][win-x64-badge-3.1.4XX]][win-x64-version-3.1.4XX]
[Installer][win-x64-installer-3.1.4XX] - [Checksum][win-x64-installer-checksum-3.1.4XX]
[zip][win-x64-zip-3.1.4XX] - [Checksum][win-x64-zip-checksum-3.1.4XX] | [![][win-x64-badge-3.1.1XX]][win-x64-version-3.1.1XX]
[Installer][win-x64-installer-3.1.1XX] - [Checksum][win-x64-installer-checksum-3.1.1XX]
[zip][win-x64-zip-3.1.1XX] - [Checksum][win-x64-zip-checksum-3.1.1XX] | -| **Windows x86** | [![][win-x86-badge-6.0.1XX]][win-x86-version-6.0.1XX]
[Installer][win-x86-installer-6.0.1XX] - [Checksum][win-x86-installer-checksum-6.0.1XX]
[zip][win-x86-zip-6.0.1XX] - [Checksum][win-x86-zip-checksum-6.0.1XX] | [![][win-x86-badge-6.0.1XX-rc1]][win-x86-version-6.0.1XX-rc1]
[Installer][win-x86-installer-6.0.1XX-rc1] - [Checksum][win-x86-installer-checksum-6.0.1XX-rc1]
[zip][win-x86-zip-6.0.1XX-rc1] - [Checksum][win-x86-zip-checksum-6.0.1XX-rc1] | [![][win-x86-badge-5.0.4XX]][win-x86-version-5.0.4XX]
[Installer][win-x86-installer-5.0.4XX] - [Checksum][win-x86-installer-checksum-5.0.4XX]
[zip][win-x86-zip-5.0.4XX] - [Checksum][win-x86-zip-checksum-5.0.4XX] | [![][win-x86-badge-5.0.2XX]][win-x86-version-5.0.2XX]
[Installer][win-x86-installer-5.0.2XX] - [Checksum][win-x86-installer-checksum-5.0.2XX]
[zip][win-x86-zip-5.0.2XX] - [Checksum][win-x86-zip-checksum-5.0.2XX] | [![][win-x86-badge-3.1.4XX]][win-x86-version-3.1.4XX]
[Installer][win-x86-installer-3.1.4XX] - [Checksum][win-x86-installer-checksum-3.1.4XX]
[zip][win-x86-zip-3.1.4XX] - [Checksum][win-x86-zip-checksum-3.1.4XX] | [![][win-x86-badge-3.1.1XX]][win-x86-version-3.1.1XX]
[Installer][win-x86-installer-3.1.1XX] - [Checksum][win-x86-installer-checksum-3.1.1XX]
[zip][win-x86-zip-3.1.1XX] - [Checksum][win-x86-zip-checksum-3.1.1XX] | -| **Windows arm** | **N/A** | **N/A** | **N/A** | **N/A** | [![][win-arm-badge-3.1.4XX]][win-arm-version-3.1.4XX]
[zip][win-arm-zip-3.1.4XX] - [Checksum][win-arm-zip-checksum-3.1.4XX] | [![][win-arm-badge-3.1.1XX]][win-arm-version-3.1.1XX]
[zip][win-arm-zip-3.1.1XX] - [Checksum][win-arm-zip-checksum-3.1.1XX] | -| **Windows arm64** | [![][win-arm64-badge-6.0.1XX]][win-arm64-version-6.0.1XX]
[Installer][win-arm64-installer-6.0.1XX] - [Checksum][win-arm64-installer-checksum-6.0.1XX]
[zip][win-arm64-zip-6.0.1XX] | [![][win-arm64-badge-6.0.1XX-rc1]][win-arm64-version-6.0.1XX-rc1]
[Installer][win-arm64-installer-6.0.1XX-rc1] - [Checksum][win-arm64-installer-checksum-6.0.1XX-rc1]
[zip][win-arm64-zip-6.0.1XX-rc1] | [![][win-arm64-badge-5.0.4XX]][win-arm64-version-5.0.4XX]
[Installer][win-arm64-installer-5.0.4XX] - [Checksum][win-arm64-installer-checksum-5.0.4XX]
[zip][win-arm64-zip-5.0.4XX] | [![][win-arm64-badge-5.0.2XX]][win-arm64-version-5.0.2XX]
[Installer][win-arm64-installer-5.0.2XX] - [Checksum][win-arm64-installer-checksum-5.0.2XX]
[zip][win-arm64-zip-5.0.2XX] | **N/A** | **N/A** | -| **macOS x64** | [![][osx-x64-badge-6.0.1XX]][osx-x64-version-6.0.1XX]
[Installer][osx-x64-installer-6.0.1XX] - [Checksum][osx-x64-installer-checksum-6.0.1XX]
[tar.gz][osx-x64-targz-6.0.1XX] - [Checksum][osx-x64-targz-checksum-6.0.1XX] | [![][osx-x64-badge-6.0.1XX-rc1]][osx-x64-version-6.0.1XX-rc1]
[Installer][osx-x64-installer-6.0.1XX-rc1] - [Checksum][osx-x64-installer-checksum-6.0.1XX-rc1]
[tar.gz][osx-x64-targz-6.0.1XX-rc1] - [Checksum][osx-x64-targz-checksum-6.0.1XX-rc1] | [![][osx-x64-badge-5.0.4XX]][osx-x64-version-5.0.4XX]
[Installer][osx-x64-installer-5.0.4XX] - [Checksum][osx-x64-installer-checksum-5.0.4XX]
[tar.gz][osx-x64-targz-5.0.4XX] - [Checksum][osx-x64-targz-checksum-5.0.4XX] | [![][osx-x64-badge-5.0.2XX]][osx-x64-version-5.0.2XX]
[Installer][osx-x64-installer-5.0.2XX] - [Checksum][osx-x64-installer-checksum-5.0.2XX]
[tar.gz][osx-x64-targz-5.0.2XX] - [Checksum][osx-x64-targz-checksum-5.0.2XX] | [![][osx-x64-badge-3.1.4XX]][osx-x64-version-3.1.4XX]
[Installer][osx-x64-installer-3.1.4XX] - [Checksum][osx-x64-installer-checksum-3.1.4XX]
[tar.gz][osx-x64-targz-3.1.4XX] - [Checksum][osx-x64-targz-checksum-3.1.4XX] | [![][osx-x64-badge-3.1.1XX]][osx-x64-version-3.1.1XX]
[Installer][osx-x64-installer-3.1.1XX] - [Checksum][osx-x64-installer-checksum-3.1.1XX]
[tar.gz][osx-x64-targz-3.1.1XX] - [Checksum][osx-x64-targz-checksum-3.1.1XX] | -| **macOS arm64** | [![][osx-arm64-badge-6.0.1XX]][osx-arm64-version-6.0.1XX]
[Installer][osx-arm64-installer-6.0.1XX] - [Checksum][osx-arm64-installer-checksum-6.0.1XX]
[tar.gz][osx-arm64-targz-6.0.1XX] - [Checksum][osx-arm64-targz-checksum-6.0.1XX] | [![][osx-arm64-badge-6.0.1XX-rc1]][osx-arm64-version-6.0.1XX-rc1]
[Installer][osx-arm64-installer-6.0.1XX-rc1] - [Checksum][osx-arm64-installer-checksum-6.0.1XX-rc1]
[tar.gz][osx-arm64-targz-6.0.1XX-rc1] - [Checksum][osx-arm64-targz-checksum-6.0.1XX-rc1] | **N/A** | **N/A** | **N/A** | **N/A** | -| **Linux x64** | [![][linux-badge-6.0.1XX]][linux-version-6.0.1XX]
[DEB Installer][linux-DEB-installer-6.0.1XX] - [Checksum][linux-DEB-installer-checksum-6.0.1XX]
[RPM Installer][linux-RPM-installer-6.0.1XX] - [Checksum][linux-RPM-installer-checksum-6.0.1XX]
_see installer note below_1
[tar.gz][linux-targz-6.0.1XX] - [Checksum][linux-targz-checksum-6.0.1XX] | [![][linux-badge-6.0.1XX-rc1]][linux-version-6.0.1XX-rc1]
[DEB Installer][linux-DEB-installer-6.0.1XX-rc1] - [Checksum][linux-DEB-installer-checksum-6.0.1XX-rc1]
[RPM Installer][linux-RPM-installer-6.0.1XX-rc1] - [Checksum][linux-RPM-installer-checksum-6.0.1XX-rc1]
_see installer note below_1
[tar.gz][linux-targz-6.0.1XX-rc1] - [Checksum][linux-targz-checksum-6.0.1XX-rc1] | [![][linux-badge-5.0.4XX]][linux-version-5.0.4XX]
[DEB Installer][linux-DEB-installer-5.0.4XX] - [Checksum][linux-DEB-installer-checksum-5.0.4XX]
[RPM Installer][linux-RPM-installer-5.0.4XX] - [Checksum][linux-RPM-installer-checksum-5.0.4XX]
_see installer note below_1
[tar.gz][linux-targz-5.0.4XX] - [Checksum][linux-targz-checksum-5.0.4XX] | [![][linux-badge-5.0.2XX]][linux-version-5.0.2XX]
[DEB Installer][linux-DEB-installer-5.0.2XX] - [Checksum][linux-DEB-installer-checksum-5.0.2XX]
[RPM Installer][linux-RPM-installer-5.0.2XX] - [Checksum][linux-RPM-installer-checksum-5.0.2XX]
_see installer note below_1
[tar.gz][linux-targz-5.0.2XX] - [Checksum][linux-targz-checksum-5.0.2XX] | [![][linux-badge-3.1.4XX]][linux-version-3.1.4XX]
[DEB Installer][linux-DEB-installer-3.1.4XX] - [Checksum][linux-DEB-installer-checksum-3.1.4XX]
[RPM Installer][linux-RPM-installer-3.1.4XX] - [Checksum][linux-RPM-installer-checksum-3.1.4XX]
_see installer note below_1
[tar.gz][linux-targz-3.1.4XX] - [Checksum][linux-targz-checksum-3.1.4XX] | [![][linux-badge-3.1.1XX]][linux-version-3.1.1XX]
[DEB Installer][linux-DEB-installer-3.1.1XX] - [Checksum][linux-DEB-installer-checksum-3.1.1XX]
[RPM Installer][linux-RPM-installer-3.1.1XX] - [Checksum][linux-RPM-installer-checksum-3.1.1XX]
_see installer note below_1
[tar.gz][linux-targz-3.1.1XX] - [Checksum][linux-targz-checksum-3.1.1XX] | -| **Linux arm** | [![][linux-arm-badge-6.0.1XX]][linux-arm-version-6.0.1XX]
[tar.gz][linux-arm-targz-6.0.1XX] - [Checksum][linux-arm-targz-checksum-6.0.1XX] | [![][linux-arm-badge-6.0.1XX-rc1]][linux-arm-version-6.0.1XX-rc1]
[tar.gz][linux-arm-targz-6.0.1XX-rc1] - [Checksum][linux-arm-targz-checksum-6.0.1XX-rc1] | [![][linux-arm-badge-5.0.4XX]][linux-arm-version-5.0.4XX]
[tar.gz][linux-arm-targz-5.0.4XX] - [Checksum][linux-arm-targz-checksum-5.0.4XX] | [![][linux-arm-badge-5.0.2XX]][linux-arm-version-5.0.2XX]
[tar.gz][linux-arm-targz-5.0.2XX] - [Checksum][linux-arm-targz-checksum-5.0.2XX] | [![][linux-arm-badge-3.1.4XX]][linux-arm-version-3.1.4XX]
[tar.gz][linux-arm-targz-3.1.4XX] - [Checksum][linux-arm-targz-checksum-3.1.4XX] | [![][linux-arm-badge-3.1.1XX]][linux-arm-version-3.1.1XX]
[tar.gz][linux-arm-targz-3.1.1XX] - [Checksum][linux-arm-targz-checksum-3.1.1XX] | -| **Linux arm64** | [![][linux-arm64-badge-6.0.1XX]][linux-arm64-version-6.0.1XX]
[tar.gz][linux-arm64-targz-6.0.1XX] - [Checksum][linux-arm64-targz-checksum-6.0.1XX] | [![][linux-arm64-badge-6.0.1XX-rc1]][linux-arm64-version-6.0.1XX-rc1]
[tar.gz][linux-arm64-targz-6.0.1XX-rc1] - [Checksum][linux-arm64-targz-checksum-6.0.1XX-rc1] | [![][linux-arm64-badge-5.0.4XX]][linux-arm64-version-5.0.4XX]
[tar.gz][linux-arm64-targz-5.0.4XX] - [Checksum][linux-arm64-targz-checksum-5.0.4XX] | [![][linux-arm64-badge-5.0.2XX]][linux-arm64-version-5.0.2XX]
[tar.gz][linux-arm64-targz-5.0.2XX] - [Checksum][linux-arm64-targz-checksum-5.0.2XX] | [![][linux-arm64-badge-3.1.4XX]][linux-arm64-version-3.1.4XX]
[tar.gz][linux-arm64-targz-3.1.4XX] - [Checksum][linux-arm64-targz-checksum-3.1.4XX] | [![][linux-arm64-badge-3.1.1XX]][linux-arm64-version-3.1.1XX]
[tar.gz][linux-arm64-targz-3.1.1XX] - [Checksum][linux-arm64-targz-checksum-3.1.1XX] | -| **Linux-musl-x64** | [![][linux-musl-x64-badge-6.0.1XX]][linux-musl-x64-version-6.0.1XX]
[tar.gz][linux-musl-x64-targz-6.0.1XX] - [Checksum][linux-musl-x64-targz-checksum-6.0.1XX] | [![][linux-musl-x64-badge-6.0.1XX-rc1]][linux-musl-x64-version-6.0.1XX-rc1]
[tar.gz][linux-musl-x64-targz-6.0.1XX-rc1] - [Checksum][linux-musl-x64-targz-checksum-6.0.1XX-rc1] | [![][linux-musl-x64-badge-5.0.4XX]][linux-musl-x64-version-5.0.4XX]
[tar.gz][linux-musl-x64-targz-5.0.4XX] - [Checksum][linux-musl-x64-targz-checksum-5.0.4XX] | [![][linux-musl-x64-badge-5.0.2XX]][linux-musl-x64-version-5.0.2XX]
[tar.gz][linux-musl-x64-targz-5.0.2XX] - [Checksum][linux-musl-x64-targz-checksum-5.0.2XX] | [![][linux-musl-x64-badge-3.1.4XX]][linux-musl-x64-version-3.1.4XX]
[tar.gz][linux-musl-x64-targz-3.1.4XX] - [Checksum][linux-musl-x64-targz-checksum-3.1.4XX] | [![][linux-musl-x64-badge-3.1.1XX]][linux-musl-x64-version-3.1.1XX]
[tar.gz][linux-musl-x64-targz-3.1.1XX] - [Checksum][linux-musl-x64-targz-checksum-3.1.1XX] | -| **Linux-musl-arm** | [![][linux-musl-arm-badge-6.0.1XX]][linux-musl-arm-version-6.0.1XX]
[tar.gz][linux-musl-arm-targz-6.0.1XX] - [Checksum][linux-musl-arm-targz-checksum-6.0.1XX] | [![][linux-musl-arm-badge-6.0.1XX-rc1]][linux-musl-arm-version-6.0.1XX-rc1]
[tar.gz][linux-musl-arm-targz-6.0.1XX-rc1] - [Checksum][linux-musl-arm-targz-checksum-6.0.1XX-rc1] | [![][linux-musl-arm-badge-5.0.4XX]][linux-musl-arm-version-5.0.4XX]
[tar.gz][linux-musl-arm-targz-5.0.4XX] - [Checksum][linux-musl-arm-targz-checksum-5.0.4XX] | [![][linux-musl-arm-badge-5.0.2XX]][linux-musl-arm-version-5.0.2XX]
[tar.gz][linux-musl-arm-targz-5.0.2XX] - [Checksum][linux-musl-arm-targz-checksum-5.0.2XX] | **N/A** | **N/A** | -| **Linux-musl-arm64** | [![][linux-musl-arm64-badge-6.0.1XX]][linux-musl-arm64-version-6.0.1XX]
[tar.gz][linux-musl-arm64-targz-6.0.1XX] - [Checksum][linux-musl-arm64-targz-checksum-6.0.1XX] | [![][linux-musl-arm64-badge-6.0.1XX-rc1]][linux-musl-arm64-version-6.0.1XX-rc1]
[tar.gz][linux-musl-arm64-targz-6.0.1XX-rc1] - [Checksum][linux-musl-arm64-targz-checksum-6.0.1XX-rc1] | [![][linux-musl-arm64-badge-5.0.4XX]][linux-musl-arm64-version-5.0.4XX]
[tar.gz][linux-musl-arm64-targz-5.0.4XX] - [Checksum][linux-musl-arm64-targz-checksum-5.0.4XX] | [![][linux-musl-arm64-badge-5.0.2XX]][linux-musl-arm64-version-5.0.2XX]
[tar.gz][linux-musl-arm64-targz-5.0.2XX] - [Checksum][linux-musl-arm64-targz-checksum-5.0.2XX] | **N/A** | **N/A** | -| **RHEL 6** | **N/A** | **N/A** | **N/A** | **N/A** | [![][rhel-6-badge-3.1.4XX]][rhel-6-version-3.1.4XX]
[tar.gz][rhel-6-targz-3.1.4XX] - [Checksum][rhel-6-targz-checksum-3.1.4XX] | [![][rhel-6-badge-3.1.1XX]][rhel-6-version-3.1.1XX]
[tar.gz][rhel-6-targz-3.1.1XX] - [Checksum][rhel-6-targz-checksum-3.1.1XX] | +| Platform | main
(8.0.x Runtime) | 8.0.1xx-preview7
(8.0-preview7 Runtime) | Release/7.0.4xx
(7.0.x Runtime) | +| :--------- | :----------: | :----------: | :----------: | +| **Windows x64** | [![][win-x64-badge-main]][win-x64-version-main]
[Installer][win-x64-installer-main] - [Checksum][win-x64-installer-checksum-main]
[zip][win-x64-zip-main] - [Checksum][win-x64-zip-checksum-main] | [![][win-x64-badge-8.0.1XX-preview7]][win-x64-version-8.0.1XX-preview7]
[Installer][win-x64-installer-8.0.1XX-preview7] - [Checksum][win-x64-installer-checksum-8.0.1XX-preview7]
[zip][win-x64-zip-8.0.1XX-preview7] - [Checksum][win-x64-zip-checksum-8.0.1XX-preview7] | [![][win-x64-badge-7.0.4XX]][win-x64-version-7.0.4XX]
[Installer][win-x64-installer-7.0.4XX] - [Checksum][win-x64-installer-checksum-7.0.4XX]
[zip][win-x64-zip-7.0.4XX] - [Checksum][win-x64-zip-checksum-7.0.4XX] | +| **Windows x86** | [![][win-x86-badge-main]][win-x86-version-main]
[Installer][win-x86-installer-main] - [Checksum][win-x86-installer-checksum-main]
[zip][win-x86-zip-main] - [Checksum][win-x86-zip-checksum-main] | [![][win-x86-badge-8.0.1XX-preview7]][win-x86-version-8.0.1XX-preview7]
[Installer][win-x86-installer-8.0.1XX-preview7] - [Checksum][win-x86-installer-checksum-8.0.1XX-preview7]
[zip][win-x86-zip-8.0.1XX-preview7] - [Checksum][win-x86-zip-checksum-8.0.1XX-preview7] | [![][win-x86-badge-7.0.4XX]][win-x86-version-7.0.4XX]
[Installer][win-x86-installer-7.0.4XX] - [Checksum][win-x86-installer-checksum-7.0.4XX]
[zip][win-x86-zip-7.0.4XX] - [Checksum][win-x86-zip-checksum-7.0.4XX] | +| **Windows arm** | **N/A** | **N/A** | **N/A** | +| **Windows arm64** | [![][win-arm64-badge-main]][win-arm64-version-main]
[Installer][win-arm64-installer-main] - [Checksum][win-arm64-installer-checksum-main]
[zip][win-arm64-zip-main] | [![][win-arm64-badge-8.0.1XX-preview7]][win-arm64-version-8.0.1XX-preview7]
[Installer][win-arm64-installer-8.0.1XX-preview7] - [Checksum][win-arm64-installer-checksum-8.0.1XX-preview7]
[zip][win-arm64-zip-8.0.1XX-preview7] | [![][win-arm64-badge-7.0.4XX]][win-arm64-version-7.0.4XX]
[Installer][win-arm64-installer-7.0.4XX] - [Checksum][win-arm64-installer-checksum-7.0.4XX]
[zip][win-arm64-zip-7.0.4XX] | +| **macOS x64** | [![][osx-x64-badge-main]][osx-x64-version-main]
[Installer][osx-x64-installer-main] - [Checksum][osx-x64-installer-checksum-main]
[tar.gz][osx-x64-targz-main] - [Checksum][osx-x64-targz-checksum-main] | [![][osx-x64-badge-8.0.1XX-preview7]][osx-x64-version-8.0.1XX-preview7]
[Installer][osx-x64-installer-8.0.1XX-preview7] - [Checksum][osx-x64-installer-checksum-8.0.1XX-preview7]
[tar.gz][osx-x64-targz-8.0.1XX-preview7] - [Checksum][osx-x64-targz-checksum-8.0.1XX-preview7] | [![][osx-x64-badge-7.0.4XX]][osx-x64-version-7.0.4XX]
[Installer][osx-x64-installer-7.0.4XX] - [Checksum][osx-x64-installer-checksum-7.0.4XX]
[tar.gz][osx-x64-targz-7.0.4XX] - [Checksum][osx-x64-targz-checksum-7.0.4XX] | +| **macOS arm64** | [![][osx-arm64-badge-main]][osx-arm64-version-main]
[Installer][osx-arm64-installer-main] - [Checksum][osx-arm64-installer-checksum-main]
[tar.gz][osx-arm64-targz-main] - [Checksum][osx-arm64-targz-checksum-main] | [![][osx-arm64-badge-8.0.1XX-preview7]][osx-arm64-version-8.0.1XX-preview7]
[Installer][osx-arm64-installer-8.0.1XX-preview7] - [Checksum][osx-arm64-installer-checksum-8.0.1XX-preview7]
[tar.gz][osx-arm64-targz-8.0.1XX-preview7] - [Checksum][osx-arm64-targz-checksum-8.0.1XX-preview7] | [![][osx-arm64-badge-7.0.4XX]][osx-arm64-version-7.0.4XX]
[Installer][osx-arm64-installer-7.0.4XX] - [Checksum][osx-arm64-installer-checksum-7.0.4XX]
[tar.gz][osx-arm64-targz-7.0.4XX] - [Checksum][osx-arm64-targz-checksum-7.0.4XX] | +| **Linux x64** | [![][linux-badge-main]][linux-version-main]
[DEB Installer][linux-DEB-installer-main] - [Checksum][linux-DEB-installer-checksum-main]
[RPM Installer][linux-RPM-installer-main] - [Checksum][linux-RPM-installer-checksum-main]
_see installer note below_1
[tar.gz][linux-targz-main] - [Checksum][linux-targz-checksum-main] | [![][linux-badge-8.0.1XX-preview7]][linux-version-8.0.1XX-preview7]
[DEB Installer][linux-DEB-installer-8.0.1XX-preview7] - [Checksum][linux-DEB-installer-checksum-8.0.1XX-preview7]
[RPM Installer][linux-RPM-installer-8.0.1XX-preview7] - [Checksum][linux-RPM-installer-checksum-8.0.1XX-preview7]
_see installer note below_1
[tar.gz][linux-targz-8.0.1XX-preview7] - [Checksum][linux-targz-checksum-8.0.1XX-preview7] | [![][linux-badge-7.0.4XX]][linux-version-7.0.4XX]
[DEB Installer][linux-DEB-installer-7.0.4XX] - [Checksum][linux-DEB-installer-checksum-7.0.4XX]
[RPM Installer][linux-RPM-installer-7.0.4XX] - [Checksum][linux-RPM-installer-checksum-7.0.4XX]
_see installer note below_1
[tar.gz][linux-targz-7.0.4XX] - [Checksum][linux-targz-checksum-7.0.4XX] | +| **Linux arm** | [![][linux-arm-badge-main]][linux-arm-version-main]
[tar.gz][linux-arm-targz-main] - [Checksum][linux-arm-targz-checksum-main] | [![][linux-arm-badge-8.0.1XX-preview7]][linux-arm-version-8.0.1XX-preview7]
[tar.gz][linux-arm-targz-8.0.1XX-preview7] - [Checksum][linux-arm-targz-checksum-8.0.1XX-preview7] | [![][linux-arm-badge-7.0.4XX]][linux-arm-version-7.0.4XX]
[tar.gz][linux-arm-targz-7.0.4XX] - [Checksum][linux-arm-targz-checksum-7.0.4XX] | +| **Linux arm64** | [![][linux-arm64-badge-main]][linux-arm64-version-main]
[tar.gz][linux-arm64-targz-main] - [Checksum][linux-arm64-targz-checksum-main] | [![][linux-arm64-badge-8.0.1XX-preview7]][linux-arm64-version-8.0.1XX-preview7]
[tar.gz][linux-arm64-targz-8.0.1XX-preview7] - [Checksum][linux-arm64-targz-checksum-8.0.1XX-preview7] | [![][linux-arm64-badge-7.0.4XX]][linux-arm64-version-7.0.4XX]
[tar.gz][linux-arm64-targz-7.0.4XX] - [Checksum][linux-arm64-targz-checksum-7.0.4XX] | +| **Linux-musl-x64** | [![][linux-musl-x64-badge-main]][linux-musl-x64-version-main]
[tar.gz][linux-musl-x64-targz-main] - [Checksum][linux-musl-x64-targz-checksum-main] | [![][linux-musl-x64-badge-8.0.1XX-preview7]][linux-musl-x64-version-8.0.1XX-preview7]
[tar.gz][linux-musl-x64-targz-8.0.1XX-preview7] - [Checksum][linux-musl-x64-targz-checksum-8.0.1XX-preview7] | [![][linux-musl-x64-badge-7.0.4XX]][linux-musl-x64-version-7.0.4XX]
[tar.gz][linux-musl-x64-targz-7.0.4XX] - [Checksum][linux-musl-x64-targz-checksum-7.0.4XX] | +| **Linux-musl-arm** | [![][linux-musl-arm-badge-main]][linux-musl-arm-version-main]
[tar.gz][linux-musl-arm-targz-main] - [Checksum][linux-musl-arm-targz-checksum-main] | [![][linux-musl-arm-badge-8.0.1XX-preview7]][linux-musl-arm-version-8.0.1XX-preview7]
[tar.gz][linux-musl-arm-targz-8.0.1XX-preview7] - [Checksum][linux-musl-arm-targz-checksum-8.0.1XX-preview7] | [![][linux-musl-arm-badge-7.0.4XX]][linux-musl-arm-version-7.0.4XX]
[tar.gz][linux-musl-arm-targz-7.0.4XX] - [Checksum][linux-musl-arm-targz-checksum-7.0.4XX] | +| **Linux-musl-arm64** | [![][linux-musl-arm64-badge-main]][linux-musl-arm64-version-main]
[tar.gz][linux-musl-arm64-targz-main] - [Checksum][linux-musl-arm64-targz-checksum-main] | [![][linux-musl-arm64-badge-8.0.1XX-preview7]][linux-musl-arm64-version-8.0.1XX-preview7]
[tar.gz][linux-musl-arm64-targz-8.0.1XX-preview7] - [Checksum][linux-musl-arm64-targz-checksum-8.0.1XX-preview7] | [![][linux-musl-arm64-badge-7.0.4XX]][linux-musl-arm64-version-7.0.4XX]
[tar.gz][linux-musl-arm64-targz-7.0.4XX] - [Checksum][linux-musl-arm64-targz-checksum-7.0.4XX] | +| **RHEL 6** | **N/A** | **N/A** | **N/A** | Reference notes: > **1**: Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first: -> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime#daily-builds) +> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table) > * [ASP.NET Core Shared Framework](https://github.com/aspnet/AspNetCore/blob/main/docs/DailyBuilds.md) -.NET Core SDK 2.x downloads can be found here: [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) - -[win-x64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/win_x64_Release_version_badge.svg -[win-x64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-win-x64.txt -[win-x64-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x64.exe -[win-x64-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x64.exe.sha -[win-x64-zip-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x64.zip -[win-x64-zip-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x64.zip.sha - -[win-x64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/win_x64_Release_version_badge.svg -[win-x64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-win-x64.txt -[win-x64-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x64.exe -[win-x64-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x64.exe.sha -[win-x64-zip-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x64.zip -[win-x64-zip-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x64.zip.sha - -[win-x64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/win_x64_Release_version_badge.svg -[win-x64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-win-x64.txt -[win-x64-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x64.exe -[win-x64-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x64.exe.sha -[win-x64-zip-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x64.zip -[win-x64-zip-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x64.zip.sha - -[win-x64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/win_x64_Release_version_badge.svg -[win-x64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-win-x64.txt -[win-x64-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x64.exe -[win-x64-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x64.exe.sha -[win-x64-zip-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x64.zip -[win-x64-zip-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x64.zip.sha - -[win-x64-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/win_x64_Release_version_badge.svg -[win-x64-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[win-x64-installer-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x64.exe -[win-x64-installer-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x64.exe.sha -[win-x64-zip-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x64.zip -[win-x64-zip-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x64.zip.sha - -[win-x64-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/win_x64_Release_version_badge.svg -[win-x64-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[win-x64-installer-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x64.exe -[win-x64-installer-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x64.exe.sha -[win-x64-zip-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x64.zip -[win-x64-zip-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x64.zip.sha - -[win-x86-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/win_x86_Release_version_badge.svg -[win-x86-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-win-x86.txt -[win-x86-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x86.exe -[win-x86-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x86.exe.sha -[win-x86-zip-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x86.zip -[win-x86-zip-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-x86.zip.sha - -[win-x86-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/win_x86_Release_version_badge.svg -[win-x86-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-win-x86.txt -[win-x86-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x86.exe -[win-x86-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x86.exe.sha -[win-x86-zip-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x86.zip -[win-x86-zip-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-x86.zip.sha - -[win-x86-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/win_x86_Release_version_badge.svg -[win-x86-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-win-x86.txt -[win-x86-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x86.exe -[win-x86-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x86.exe.sha -[win-x86-zip-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x86.zip -[win-x86-zip-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-x86.zip.sha - -[win-x86-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/win_x86_Release_version_badge.svg -[win-x86-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-win-x86.txt -[win-x86-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x86.exe -[win-x86-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x86.exe.sha -[win-x86-zip-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x86.zip -[win-x86-zip-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-x86.zip.sha - -[win-x86-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/win_x86_Release_version_badge.svg -[win-x86-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[win-x86-installer-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x86.exe -[win-x86-installer-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x86.exe.sha -[win-x86-zip-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x86.zip -[win-x86-zip-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-x86.zip.sha - -[win-x86-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/win_x86_Release_version_badge.svg -[win-x86-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[win-x86-installer-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x86.exe -[win-x86-installer-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x86.exe.sha -[win-x86-zip-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x86.zip -[win-x86-zip-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-x86.zip.sha - -[osx-x64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/osx_x64_Release_version_badge.svg -[osx-x64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-osx-x64.txt -[osx-x64-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-x64.pkg -[osx-x64-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-x64.pkg.sha -[osx-x64-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-x64.tar.gz -[osx-x64-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha - -[osx-x64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/osx_x64_Release_version_badge.svg -[osx-x64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-osx-x64.txt -[osx-x64-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-x64.pkg -[osx-x64-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-x64.pkg.sha -[osx-x64-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-x64.tar.gz -[osx-x64-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha - -[osx-x64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/osx_x64_Release_version_badge.svg -[osx-x64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-osx-x64.txt -[osx-x64-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-osx-x64.pkg -[osx-x64-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-osx-x64.pkg.sha -[osx-x64-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-osx-x64.tar.gz -[osx-x64-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha - -[osx-x64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/osx_x64_Release_version_badge.svg -[osx-x64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-osx-x64.txt -[osx-x64-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-osx-x64.pkg -[osx-x64-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-osx-x64.pkg.sha -[osx-x64-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-osx-x64.tar.gz -[osx-x64-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-osx-x64.pkg.tar.gz.sha - -[osx-x64-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/osx_x64_Release_version_badge.svg -[osx-x64-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[osx-x64-installer-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-osx-x64.pkg -[osx-x64-installer-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-osx-x64.pkg.sha -[osx-x64-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-osx-x64.tar.gz -[osx-x64-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-osx-x64.tar.gz.sha - -[osx-x64-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/osx_x64_Release_version_badge.svg -[osx-x64-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[osx-x64-installer-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-osx-x64.pkg -[osx-x64-installer-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-osx-x64.pkg.sha -[osx-x64-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-osx-x64.tar.gz -[osx-x64-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-osx-x64.tar.gz.sha - -[osx-arm64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/osx_arm64_Release_version_badge.svg -[osx-arm64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-osx-arm64.txt -[osx-arm64-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-arm64.pkg -[osx-arm64-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-arm64.pkg.sha -[osx-arm64-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-arm64.tar.gz -[osx-arm64-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha - -[osx-arm64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/osx_arm64_Release_version_badge.svg -[osx-arm64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-osx-arm64.txt -[osx-arm64-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-arm64.pkg -[osx-arm64-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-arm64.pkg.sha -[osx-arm64-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-arm64.tar.gz -[osx-arm64-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha - -[linux-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_x64_Release_version_badge.svg -[linux-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-x64.txt -[linux-DEB-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-x64.deb -[linux-DEB-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-x64.deb.sha -[linux-RPM-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-x64.rpm -[linux-RPM-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-x64.rpm.sha -[linux-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-x64.tar.gz -[linux-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-x64.tar.gz.sha - -[linux-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_x64_Release_version_badge.svg -[linux-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-x64.txt -[linux-DEB-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-x64.deb -[linux-DEB-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-x64.deb.sha -[linux-RPM-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-x64.rpm -[linux-RPM-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-x64.rpm.sha -[linux-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-x64.tar.gz -[linux-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-x64.tar.gz.sha - -[linux-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_x64_Release_version_badge.svg -[linux-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-x64.txt -[linux-DEB-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-x64.deb -[linux-DEB-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-x64.deb.sha -[linux-RPM-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-x64.rpm -[linux-RPM-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-x64.rpm.sha -[linux-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-x64.tar.gz -[linux-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-x64.tar.gz.sha - -[linux-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_x64_Release_version_badge.svg -[linux-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-x64.txt -[linux-DEB-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-x64.deb -[linux-DEB-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-x64.deb.sha -[linux-RPM-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-x64.rpm -[linux-RPM-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-x64.rpm.sha -[linux-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-x64.tar.gz -[linux-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-x64.tar.gz.sha - -[linux-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/linux_x64_Release_version_badge.svg -[linux-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[linux-DEB-installer-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-x64.deb -[linux-DEB-installer-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-x64.deb.sha -[linux-RPM-installer-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-x64.rpm -[linux-RPM-installer-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-x64.rpm.sha -[linux-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-x64.tar.gz -[linux-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-x64.tar.gz.sha - -[linux-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/linux_x64_Release_version_badge.svg -[linux-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[linux-DEB-installer-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-x64.deb -[linux-DEB-installer-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-x64.deb.sha -[linux-RPM-installer-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-x64.rpm -[linux-RPM-installer-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-x64.rpm.sha -[linux-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-x64.tar.gz -[linux-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-x64.tar.gz.sha - -[linux-arm-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_arm_Release_version_badge.svg -[linux-arm-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-arm.txt -[linux-arm-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-arm.tar.gz -[linux-arm-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-arm.tar.gz.sha - -[linux-arm-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_arm_Release_version_badge.svg -[linux-arm-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-arm.txt -[linux-arm-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-arm.tar.gz -[linux-arm-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-arm.tar.gz.sha - -[linux-arm-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_arm_Release_version_badge.svg -[linux-arm-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-arm.txt -[linux-arm-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-arm.tar.gz -[linux-arm-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-arm.tar.gz.sha - -[linux-arm-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_arm_Release_version_badge.svg -[linux-arm-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-arm.txt -[linux-arm-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-arm.tar.gz -[linux-arm-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-arm.tar.gz.sha - -[linux-arm-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/linux_arm_Release_version_badge.svg -[linux-arm-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[linux-arm-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-arm.tar.gz -[linux-arm-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-arm.tar.gz.sha - -[linux-arm-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/linux_arm_Release_version_badge.svg -[linux-arm-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[linux-arm-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-arm.tar.gz -[linux-arm-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-arm.tar.gz.sha - -[linux-arm64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_arm64_Release_version_badge.svg -[linux-arm64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-arm64.txt -[linux-arm64-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-arm64.tar.gz -[linux-arm64-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-arm64.tar.gz.sha - -[linux-arm64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_arm64_Release_version_badge.svg -[linux-arm64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-arm64.txt -[linux-arm64-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-arm64.tar.gz -[linux-arm64-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-arm64.tar.gz.sha - -[linux-arm64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_arm64_Release_version_badge.svg -[linux-arm64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-arm64.txt -[linux-arm64-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-arm64.tar.gz -[linux-arm64-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha - -[linux-arm64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_arm64_Release_version_badge.svg -[linux-arm64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-arm64.txt -[linux-arm64-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-arm64.tar.gz -[linux-arm64-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-arm64.tar.gz.sha - -[linux-arm64-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/linux_arm64_Release_version_badge.svg -[linux-arm64-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[linux-arm64-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-arm64.tar.gz -[linux-arm64-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-arm64.tar.gz.sha - -[linux-arm64-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/linux_arm64_Release_version_badge.svg -[linux-arm64-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[linux-arm64-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-arm64.tar.gz -[linux-arm64-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-arm64.tar.gz.sha - -[rhel-6-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-rhel.6-x64.txt -[rhel-6-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha - -[rhel-6-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-rhel.6-x64.txt -[rhel-6-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha - -[rhel-6-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-rhel.6-x64.txt -[rhel-6-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha - -[rhel-6-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-rhel.6-x64.txt -[rhel-6-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-rhel.6-x64.tar.gz.sha - -[rhel-6-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[rhel-6-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha - -[rhel-6-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/rhel.6_x64_Release_version_badge.svg -[rhel-6-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[rhel-6-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha - -[linux-musl-x64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-musl-x64.txt -[linux-musl-x64-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha - -[linux-musl-x64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-musl-x64.txt -[linux-musl-x64-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha - -[linux-musl-x64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-musl-x64.txt -[linux-musl-x64-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha - -[linux-musl-x64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-musl-x64.txt -[linux-musl-x64-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-x64.tar.gz.sha - -[linux-musl-x64-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[linux-musl-x64-targz-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-linux-musl-x64.tar.gz.sha - -[linux-musl-x64-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/linux_musl_x64_Release_version_badge.svg -[linux-musl-x64-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[linux-musl-x64-targz-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-musl-x64.tar.gz.sha - -[linux-musl-arm-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_musl_arm_Release_version_badge.svg -[linux-musl-arm-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-musl-arm.txt -[linux-musl-arm-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-arm.tar.gz -[linux-musl-arm-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha - -[linux-musl-arm-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_musl_arm_Release_version_badge.svg -[linux-musl-arm-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-musl-arm.txt -[linux-musl-arm-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-arm.tar.gz -[linux-musl-arm-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha - -[linux-musl-arm-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_musl_arm_Release_version_badge.svg -[linux-musl-arm-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-musl-arm.txt -[linux-musl-arm-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-arm.tar.gz -[linux-musl-arm-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha - -[linux-musl-arm-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_musl_arm_Release_version_badge.svg -[linux-musl-arm-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-musl-arm.txt -[linux-musl-arm-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-arm.tar.gz -[linux-musl-arm-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-arm.tar.gz.sha - -[linux-musl-arm64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/linux_musl_arm64_Release_version_badge.svg -[linux-musl-arm64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-linux-musl-arm64.txt -[linux-musl-arm64-targz-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-arm64.tar.gz -[linux-musl-arm64-targz-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha - -[linux-musl-arm64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/linux_musl_arm64_Release_version_badge.svg -[linux-musl-arm64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-linux-musl-arm64.txt -[linux-musl-arm64-targz-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-arm64.tar.gz -[linux-musl-arm64-targz-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha - -[linux-musl-arm64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/linux_musl_arm64_Release_version_badge.svg -[linux-musl-arm64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-linux-musl-arm64.txt -[linux-musl-arm64-targz-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz -[linux-musl-arm64-targz-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha - -[linux-musl-arm64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/linux_musl_arm64_Release_version_badge.svg -[linux-musl-arm64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-linux-musl-arm64.txt -[linux-musl-arm64-targz-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-arm64.tar.gz -[linux-musl-arm64-targz-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-linux-musl-arm64.tar.gz.sha - -[win-arm-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/win_arm_Release_version_badge.svg -[win-arm-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-win-arm.txt -[win-arm-zip-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm.zip -[win-arm-zip-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm.zip.sha - -[win-arm-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/win_arm_Release_version_badge.svg -[win-arm-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-win-arm.txt -[win-arm-zip-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm.zip -[win-arm-zip-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm.zip.sha - -[win-arm-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/win_arm_Release_version_badge.svg -[win-arm-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-win-arm.txt -[win-arm-zip-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm.zip -[win-arm-zip-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm.zip.sha - -[win-arm-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/win_arm_Release_version_badge.svg -[win-arm-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-win-arm.txt -[win-arm-zip-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm.zip -[win-arm-zip-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm.zip.sha - -[win-arm-badge-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/win_arm_Release_version_badge.svg -[win-arm-version-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/latest.version -[win-arm-zip-3.1.4XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-arm.zip -[win-arm-zip-checksum-3.1.4XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.4xx/dotnet-sdk-latest-win-arm.zip.sha - -[win-arm-badge-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/win_arm_Release_version_badge.svg -[win-arm-version-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/latest.version -[win-arm-zip-3.1.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-arm.zip -[win-arm-zip-checksum-3.1.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-win-arm.zip.sha - -[win-arm64-badge-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/win_arm64_Release_version_badge.svg -[win-arm64-version-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/productCommit-win-arm64.txt -[win-arm64-installer-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm64.exe -[win-arm64-installer-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm64.exe.sha -[win-arm64-zip-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm64.zip -[win-arm64-zip-checksum-6.0.1XX]: https://aka.ms/dotnet/6.0/daily/dotnet-sdk-win-arm64.zip.sha - -[win-arm64-badge-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/win_arm64_Release_version_badge.svg -[win-arm64-version-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/productCommit-win-arm64.txt -[win-arm64-installer-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm64.exe -[win-arm64-installer-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm64.exe.sha -[win-arm64-zip-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm64.zip -[win-arm64-zip-checksum-6.0.1XX-rc1]: https://aka.ms/dotnet/6.0.1XX-rc1/daily/dotnet-sdk-win-arm64.zip.sha - -[win-arm64-badge-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/win_arm64_Release_version_badge.svg -[win-arm64-version-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/productCommit-win-arm64.txt -[win-arm64-installer-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm64.exe -[win-arm64-installer-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm64.exe.sha -[win-arm64-zip-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm64.zip -[win-arm64-zip-checksum-5.0.4XX]: https://aka.ms/dotnet/5.0.4xx/daily/dotnet-sdk-win-arm64.zip.sha - -[win-arm64-badge-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/win_arm64_Release_version_badge.svg -[win-arm64-version-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/productCommit-win-arm64.txt -[win-arm64-installer-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm64.exe -[win-arm64-installer-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm64.exe.sha -[win-arm64-zip-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm64.zip -[win-arm64-zip-checksum-5.0.2XX]: https://aka.ms/dotnet/5.0.2xx/daily/Sdk/dotnet-sdk-win-arm64.zip.sha +.NET Core SDK 2.x downloads can be found at [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) but they are [out of support](https://dotnet.microsoft.com/platform/support/policy/dotnet-core). + +[win-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_x64_Release_version_badge.svg?no-cache +[win-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-x64.txt +[win-x64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x64.exe +[win-x64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x64.exe.sha +[win-x64-zip-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x64.zip +[win-x64-zip-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x64.zip.sha + +[win-x64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/win_x64_Release_version_badge.svg?no-cache +[win-x64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-win-x64.txt +[win-x64-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x64.exe +[win-x64-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x64.exe.sha +[win-x64-zip-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x64.zip +[win-x64-zip-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x64.zip.sha + +[win-x64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/win_x64_Release_version_badge.svg?no-cache +[win-x64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-win-x64.txt +[win-x64-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x64.exe +[win-x64-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x64.exe.sha +[win-x64-zip-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x64.zip +[win-x64-zip-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x64.zip.sha + +[win-x86-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_x86_Release_version_badge.svg?no-cache +[win-x86-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-x86.txt +[win-x86-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.exe +[win-x86-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.exe.sha +[win-x86-zip-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.zip +[win-x86-zip-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.zip.sha + +[win-x86-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/win_x86_Release_version_badge.svg?no-cache +[win-x86-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-win-x86.txt +[win-x86-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x86.exe +[win-x86-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x86.exe.sha +[win-x86-zip-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x86.zip +[win-x86-zip-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-x86.zip.sha + +[win-x86-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/win_x86_Release_version_badge.svg?no-cache +[win-x86-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-win-x86.txt +[win-x86-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x86.exe +[win-x86-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x86.exe.sha +[win-x86-zip-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x86.zip +[win-x86-zip-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-x86.zip.sha + +[osx-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_x64_Release_version_badge.svg?no-cache +[osx-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-osx-x64.txt +[osx-x64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.pkg +[osx-x64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.pkg.sha +[osx-x64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.tar.gz +[osx-x64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha + +[osx-x64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/osx_x64_Release_version_badge.svg?no-cache +[osx-x64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-osx-x64.txt +[osx-x64-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-x64.pkg +[osx-x64-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-x64.pkg.sha +[osx-x64-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-x64.tar.gz +[osx-x64-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha + +[osx-x64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/osx_x64_Release_version_badge.svg?no-cache +[osx-x64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-osx-x64.txt +[osx-x64-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-x64.pkg +[osx-x64-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-x64.pkg.sha +[osx-x64-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-x64.tar.gz +[osx-x64-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha + +[osx-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_arm64_Release_version_badge.svg?no-cache +[osx-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-osx-arm64.txt +[osx-arm64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.pkg +[osx-arm64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.pkg.sha +[osx-arm64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.tar.gz +[osx-arm64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha + +[osx-arm64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/osx_arm64_Release_version_badge.svg?no-cache +[osx-arm64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-osx-arm64.txt +[osx-arm64-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-arm64.pkg +[osx-arm64-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-arm64.pkg.sha +[osx-arm64-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-arm64.tar.gz +[osx-arm64-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha + +[osx-arm64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/osx_arm64_Release_version_badge.svg?no-cache +[osx-arm64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-osx-arm64.txt +[osx-arm64-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-arm64.pkg +[osx-arm64-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-arm64.pkg.sha +[osx-arm64-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-arm64.tar.gz +[osx-arm64-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha + +[linux-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_x64_Release_version_badge.svg?no-cache +[linux-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-x64.txt +[linux-DEB-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.deb +[linux-DEB-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.deb.sha +[linux-RPM-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.rpm +[linux-RPM-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.rpm.sha +[linux-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz +[linux-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz.sha + +[linux-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_x64_Release_version_badge.svg?no-cache +[linux-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-x64.txt +[linux-DEB-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-x64.deb +[linux-DEB-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-x64.deb.sha +[linux-RPM-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-x64.rpm +[linux-RPM-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-x64.rpm.sha +[linux-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-x64.tar.gz +[linux-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-x64.tar.gz.sha + +[linux-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_x64_Release_version_badge.svg?no-cache +[linux-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-x64.txt +[linux-DEB-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-x64.deb +[linux-DEB-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-x64.deb.sha +[linux-RPM-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-x64.rpm +[linux-RPM-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-x64.rpm.sha +[linux-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-x64.tar.gz +[linux-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-x64.tar.gz.sha + +[linux-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm_Release_version_badge.svg?no-cache +[linux-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-arm.txt +[linux-arm-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz +[linux-arm-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz.sha + +[linux-arm-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_arm_Release_version_badge.svg?no-cache +[linux-arm-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-arm.txt +[linux-arm-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-arm.tar.gz +[linux-arm-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-arm.tar.gz.sha + +[linux-arm-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_arm_Release_version_badge.svg?no-cache +[linux-arm-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-arm.txt +[linux-arm-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-arm.tar.gz +[linux-arm-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-arm.tar.gz.sha + +[linux-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm64_Release_version_badge.svg?no-cache +[linux-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-arm64.txt +[linux-arm64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz +[linux-arm64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha + +[linux-arm64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_arm64_Release_version_badge.svg?no-cache +[linux-arm64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-arm64.txt +[linux-arm64-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-arm64.tar.gz +[linux-arm64-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-arm64.tar.gz.sha + +[linux-arm64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_arm64_Release_version_badge.svg?no-cache +[linux-arm64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-arm64.txt +[linux-arm64-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-arm64.tar.gz +[linux-arm64-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha + +[rhel-6-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/rhel.6_x64_Release_version_badge.svg?no-cache +[rhel-6-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-rhel.6-x64.txt +[rhel-6-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz +[rhel-6-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha + +[rhel-6-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/rhel.6_x64_Release_version_badge.svg?no-cache +[rhel-6-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-rhel.6-x64.txt +[rhel-6-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-rhel.6-x64.tar.gz +[rhel-6-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha + +[rhel-6-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/rhel.6_x64_Release_version_badge.svg?no-cache +[rhel-6-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-rhel.6-x64.txt +[rhel-6-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-rhel.6-x64.tar.gz +[rhel-6-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha + +[linux-musl-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_x64_Release_version_badge.svg?no-cache +[linux-musl-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-x64.txt +[linux-musl-x64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz +[linux-musl-x64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha + +[linux-musl-x64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_musl_x64_Release_version_badge.svg?no-cache +[linux-musl-x64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-musl-x64.txt +[linux-musl-x64-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-x64.tar.gz +[linux-musl-x64-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha + +[linux-musl-x64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_musl_x64_Release_version_badge.svg?no-cache +[linux-musl-x64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-musl-x64.txt +[linux-musl-x64-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-x64.tar.gz +[linux-musl-x64-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha + +[linux-musl-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm_Release_version_badge.svg?no-cache +[linux-musl-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-arm.txt +[linux-musl-arm-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz +[linux-musl-arm-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha + +[linux-musl-arm-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_musl_arm_Release_version_badge.svg?no-cache +[linux-musl-arm-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-musl-arm.txt +[linux-musl-arm-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-arm.tar.gz +[linux-musl-arm-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha + +[linux-musl-arm-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_musl_arm_Release_version_badge.svg?no-cache +[linux-musl-arm-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-musl-arm.txt +[linux-musl-arm-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-arm.tar.gz +[linux-musl-arm-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha + +[linux-musl-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm64_Release_version_badge.svg?no-cache +[linux-musl-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-arm64.txt +[linux-musl-arm64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz +[linux-musl-arm64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha + +[linux-musl-arm64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/linux_musl_arm64_Release_version_badge.svg?no-cache +[linux-musl-arm64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-linux-musl-arm64.txt +[linux-musl-arm64-targz-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-arm64.tar.gz +[linux-musl-arm64-targz-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha + +[linux-musl-arm64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/linux_musl_arm64_Release_version_badge.svg?no-cache +[linux-musl-arm64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-linux-musl-arm64.txt +[linux-musl-arm64-targz-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz +[linux-musl-arm64-targz-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha + +[win-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm_Release_version_badge.svg?no-cache +[win-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-arm.txt +[win-arm-zip-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm.zip +[win-arm-zip-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm.zip.sha + +[win-arm-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/win_arm_Release_version_badge.svg?no-cache +[win-arm-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-win-arm.txt +[win-arm-zip-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm.zip +[win-arm-zip-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm.zip.sha + +[win-arm-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/win_arm_Release_version_badge.svg?no-cache +[win-arm-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-win-arm.txt +[win-arm-zip-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm.zip +[win-arm-zip-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm.zip.sha + +[win-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm64_Release_version_badge.svg?no-cache +[win-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-arm64.txt +[win-arm64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.exe +[win-arm64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.exe.sha +[win-arm64-zip-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.zip +[win-arm64-zip-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.zip.sha + +[win-arm64-badge-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/win_arm64_Release_version_badge.svg?no-cache +[win-arm64-version-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/productCommit-win-arm64.txt +[win-arm64-installer-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm64.exe +[win-arm64-installer-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm64.exe.sha +[win-arm64-zip-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm64.zip +[win-arm64-zip-checksum-8.0.1XX-preview7]: https://aka.ms/dotnet/8.0.1xx-preview7/daily/dotnet-sdk-win-arm64.zip.sha + +[win-arm64-badge-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/win_arm64_Release_version_badge.svg?no-cache +[win-arm64-version-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/productCommit-win-arm64.txt +[win-arm64-installer-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm64.exe +[win-arm64-installer-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm64.exe.sha +[win-arm64-zip-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm64.zip +[win-arm64-zip-checksum-7.0.4XX]: https://aka.ms/dotnet/7.0.4xx/daily/dotnet-sdk-win-arm64.zip.sha [sdk-shas-2.2.1XX]: https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release/2.2#built-repositories @@ -607,10 +431,11 @@ Sources for dotnet-install.sh and dotnet-install.ps1 are in the [install-scripts Questions & Comments -------------------- -For all feedback, use the Issues on the [.NET CLI](https://github.com/dotnet/cli) repository. +For all feedback, use the Issues on the [.NET SDK](https://github.com/dotnet/sdk) repository. License ------- -By downloading the .zip you are agreeing to the terms in the project [EULA](https://aka.ms/dotnet-core-eula). +The .NET project uses the [MIT license](LICENSE). +The LICENSE and ThirdPartyNotices in any downloaded archives are authoritative. diff --git a/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj b/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj index 85367b5e2..35e8e88e2 100644 --- a/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj +++ b/TestAssets/TestProjects/UseCswinrt/consolecswinrt.csproj @@ -1,7 +1,7 @@ Exe - net6.0 + net8.0 Windows diff --git a/build.sh b/build.sh index 7ff647c40..d65f55854 100755 --- a/build.sh +++ b/build.sh @@ -29,11 +29,6 @@ args= while [[ $# > 0 ]]; do lowerI="$(echo $1 | awk '{print tolower($0)}')" case $lowerI in - --docker) - export BUILD_IN_DOCKER=1 - export DOCKER_IMAGENAME=$2 - shift - ;; --noprettyprint) export DOTNET_CORESDK_NOPRETTYPRINT=1 ;; @@ -44,14 +39,4 @@ while [[ $# > 0 ]]; do shift done -dockerbuild() -{ - BUILD_COMMAND=$DIR/run-build.sh $DIR/eng/dockerrun.sh --non-interactive "$@" -} - -# Check if we need to build in docker -if [ ! -z "$BUILD_IN_DOCKER" ]; then - dockerbuild $args -else - $DIR/run-build.sh $args -fi +$DIR/run-build.sh $args diff --git a/eng/AfterSigning.targets b/eng/AfterSigning.targets new file mode 100644 index 000000000..b8a08378a --- /dev/null +++ b/eng/AfterSigning.targets @@ -0,0 +1,24 @@ + + + <_SuppressSdkImports>false + + + + + + + + + + + + + %(FullPath).sha512 + + + + + + diff --git a/eng/Build.props b/eng/Build.props index 85e7bc70e..7e501b9fc 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -1,12 +1,21 @@ - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/eng/Publishing.props b/eng/Publishing.props index 3d0751dd8..bbbcbbf60 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -8,8 +8,11 @@ Sdk $(Product) - true + + false + - - - - - - + + + + + + + - - + + + + + + + 3PartySHA2 diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index a2831d574..e3cb1741c 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -1,3 +1,5 @@ + + @@ -11,6 +13,7 @@ $(InnerBuildArgs) /p:IncludeNuGetPackageArchive=false $(InnerBuildArgs) /p:IncludeAdditionalSharedFrameworks=false $(InnerBuildArgs) /p:IncludeSharedFrameworksForBackwardsCompatibilityTests=false + $(InnerBuildArgs) /p:DISABLE_CROSSGEN=true diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml index c1b6dfbf0..ee09742d3 100644 --- a/eng/SourceBuildPrebuiltBaseline.xml +++ b/eng/SourceBuildPrebuiltBaseline.xml @@ -1,5 +1,17 @@ + + + - + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3775c4ec5..cebc01e95 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,50 @@ - + + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - d0dfc3119d2aa9f601fcbdc56717b2f49781898e + dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - d0dfc3119d2aa9f601fcbdc56717b2f49781898e + dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - d0dfc3119d2aa9f601fcbdc56717b2f49781898e + dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 - + https://dev.azure.com/dnceng/internal/_git/dotnet-windowsdesktop - d0dfc3119d2aa9f601fcbdc56717b2f49781898e + dda23bbe00c4a4bfdd3732783f0cce37c11a4f40 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 + - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b - + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 97d8f4cade971b93794a3805e7d72ee388f14c9b + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 @@ -48,182 +52,206 @@ https://github.com/dotnet/core-setup 7d57652f33493fa022125b7f63aad0d70c52d810 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 189fbbd88d97dd6d65515ba2da05b62eab4e5039 + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 + - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 - + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore - 1d696053fcd6735aaac1902afdb0b92edbf43e71 + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - - https://github.com/dotnet/test-templates - 9388790ba9ed8fef11584b2c74fe6789782a1592 + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore + c9e3996173cec136bc2e9f3b4ec45f2a323b1d63 - - https://github.com/dotnet/test-templates - 9388790ba9ed8fef11584b2c74fe6789782a1592 - - - https://github.com/dotnet/test-templates - 9388790ba9ed8fef11584b2c74fe6789782a1592 - - - - https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 086db5520af132ac32dcf8cce8ad4d561b868363 - - - https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 086db5520af132ac32dcf8cce8ad4d561b868363 - - - - https://dev.azure.com/dnceng/internal/_git/dotnet-templating - 086db5520af132ac32dcf8cce8ad4d561b868363 - - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - b47e9d314726020921851f007797b479a5f6905e + ecfb8a05aeaa93057ae0003d406280239b2c4c7b + + + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk + ecfb8a05aeaa93057ae0003d406280239b2c4c7b + + + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk + ecfb8a05aeaa93057ae0003d406280239b2c4c7b - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - b47e9d314726020921851f007797b479a5f6905e + ecfb8a05aeaa93057ae0003d406280239b2c4c7b + + + https://github.com/dotnet/test-templates + 0385265f4d0b6413d64aea0223172366a9b9858c + + + https://github.com/dotnet/test-templates + 1e5f3603af2277910aad946736ee23283e7f3e16 + + + https://github.com/dotnet/test-templates + 1e5f3603af2277910aad946736ee23283e7f3e16 + + + https://github.com/dotnet/test-templates + 1e5f3603af2277910aad946736ee23283e7f3e16 + + + + https://github.com/dotnet/test-templates + 1e5f3603af2277910aad946736ee23283e7f3e16 - + https://dev.azure.com/dnceng/internal/_git/dotnet-winforms - 431a1dcb7d4eafa215951499ad374ffde8622e61 + 6c37c986b6c8fc0669b38a03a03445a75b8227a6 - + https://dev.azure.com/dnceng/internal/_git/dotnet-wpf - dee47a1e2958aa9b97d3c5edf9433312cc5a4634 + b5af29a8f41f880f38fd015c6bcb7aeb816fcef6 - + https://github.com/dotnet/fsharp - 5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc + fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 - + https://github.com/dotnet/fsharp - 5d69143fbe992d8fa33d5b83d5fdd5f4ed7bb4fc + fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 - + https://github.com/microsoft/vstest - 6e76d580fcc69954441344175bd1b0ab2e432026 - + aa59400b11e1aeee2e8af48928dbd48748a8bef9 + - - https://github.com/dotnet/linker - 4be765525a1b45d28ab69a48f92e008b70a4e56e - - linker + + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime + 087e15321bb712ef6fe8b0ba6f8bd12facf92629 - + https://github.com/dotnet/roslyn - 41a5af9d2c459a06c0795bf21a1c046200f375bf + 263571123fc3dc4a638e071234ac9fbf91913962 - + https://github.com/dotnet/msbuild - a400405ba8c43976eda92a70d4adf72f9d292a22 - + b5265ef370a651f8c3458110b804e5cbf869eeb5 - + + https://github.com/dotnet/msbuild + b5265ef370a651f8c3458110b804e5cbf869eeb5 + + + https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 5ec7c4dd0086f968a8bc5a20d5cc77b1454469f3 + 550277e0616e549446f03fda35d3e23dff75dc01 https://github.com/Microsoft/ApplicationInsights-dotnet 53b80940842204f78708a538628288ff5d741a1d - - - https://github.com/dotnet/xdt - 698fdad58fa64a55f16cd9562c90224cc498ed02 - - - + https://github.com/dotnet/emsdk - 3b28b2c8eb8a64c82c01e3deb104cfedf3b6a8ca + 71359b18c2d83c01a68bf155244a65962a7e8c8e - - https://github.com/dotnet/source-build - 10d0f7e94aa45889155c312f51cfc01bf326b853 - + + https://dev.azure.com/dnceng/internal/_git/dotnet-aspire + 48e42f59d64d84b404e904996a9ed61f2a17a569 + - - https://github.com/dotnet/clicommandlineparser - 3198bf5660cad3dab85f5475bf1fda9688146e3f - + + https://github.com/dotnet/emsdk + 71359b18c2d83c01a68bf155244a65962a7e8c8e + - + https://github.com/dotnet/deployment-tools - 7431bf2f3c204cbbc326c8d55ce4ac5cad7661d6 - + 5957c5c5f85f17c145e7fab4ece37ad6aafcded9 - - https://github.com/dotnet/diagnostics - ab3eb7a525e31dc6fb4d9cc0b7154fa2be58dac1 - + + + https://github.com/dotnet/deployment-tools + 5957c5c5f85f17c145e7fab4ece37ad6aafcded9 + - + + https://github.com/dotnet/source-build-externals + 4f2151df120194f0268944f1b723c14820738fc8 + + + https://github.com/dotnet/symreader - 7b9791daa3a3477eb22ec805946c9fff8b42d8ca - + 2c8079e2e8e78c0cd11ac75a32014756136ecdb9 + + + + https://github.com/dotnet/command-line-api + 02fe27cd6a9b001c8feb7938e6ef4b3799745759 + + + https://github.com/dotnet/command-line-api + 02fe27cd6a9b001c8feb7938e6ef4b3799745759 + - + https://github.com/dotnet/arcade - 1844d819e6f33f1106083c5066ea01e0310eefa3 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - 1844d819e6f33f1106083c5066ea01e0310eefa3 - + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + https://github.com/dotnet/arcade - 1844d819e6f33f1106083c5066ea01e0310eefa3 + 8b879da4e449c48d99f3f642fc429379a64e8fe8 - + + https://github.com/dotnet/arcade-services + 5263b603d90991a0c200aca8b8892c3d7cfe4751 + + + https://github.com/dotnet/arcade-services + 5263b603d90991a0c200aca8b8892c3d7cfe4751 + + + https://github.com/dotnet/runtime + af841c8b33cecc92d74222298f1e45bf7bf3d90a + + https://github.com/dotnet/source-build-reference-packages - b6e3937b3818bb214a967e990da7002dd8f20fad - + 6ed73280a6d70f7e7ac39c86f2abe8c10983f0bb + - - https://github.com/dotnet/sourcelink - 8031e5220baf2acad991e661d8308b783d2acf3e - - - + https://github.com/dotnet/xliff-tasks - bc3233146e1fcd393ed471d5005333c83363e0fe + 73f0850939d96131c28cf6ea6ee5aacb4da0083a diff --git a/eng/Versions.props b/eng/Versions.props index d09290b7a..4cddaab3e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -5,37 +5,59 @@ true
- 6 + 8 0 - 4 - 25 + 1 + 08 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) - servicing $(VersionMajor).$(VersionMinor) $(MajorMinorVersion).$(VersionSDKMinor) true release + + rtm + rtm + servicing + + + + + 30 + 32 + 17 + $([MSBuild]::Add($(VersionFeature), 25)) + 20 + + <_NET70ILLinkPackVersion>7.0.100-1.23211.1 + + + + + https://dotnetbuilds.blob.core.windows.net/public/ + https://dotnetclimsrc.blob.core.windows.net/dotnet/ - 6.0.0-beta.24326.2 + 8.0.0-beta.24352.1 + + + + 1.1.0-beta.23621.3 - 6.0.30-servicing.24216.19 + 8.0.5-servicing.24217.4 - 6.0.30-servicing.24216.7 + 8.0.5-servicing.24217.2 - - 6.0.422 - - - - 1.0.2-beta4.22207.1 + + 1.1.0-rc.23410.2 + 1.1.0-rc.23410.2 @@ -43,44 +65,50 @@ - 6.0.30 - 6.0.30 - 6.0.30-servicing.24216.19 - 6.0.30-servicing.24216.19 - 6.0.30-servicing.24216.19 - 6.0.30-servicing.24216.19 + 8.0.5 + 8.0.5 + 8.0.5-servicing.24224.4 + 8.0.5-servicing.24224.4 + 8.0.5-servicing.24224.4 + 8.0.5-servicing.24224.4 + 8.0.5-servicing.24224.4 0.2.0 - 6.0.422-servicing.24229.15 - 6.0.422-servicing.24229.15 + 8.0.105 + 8.0.105-servicing.24224.15 + 8.0.105-servicing.24224.15 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) + + + 4.8.0-7.24067.24 + - 6.0.13 + 8.0.5-servicing.24216.15 - 6.0.30-servicing.24215.25 - 6.0.30-servicing.24215.25 - 6.0.30 - 6.0.30 - 6.0.30 - 6.0.30 + 8.0.5-servicing.24216.15 + 8.0.5-servicing.24216.15 + 8.0.5 + 8.0.5 + 8.0.5 + 8.0.5 2.1.0 - 6.0.30-servicing.24217.3 - 6.0.30-servicing.24217.3 - 6.0.30 - 6.0.30 + 8.0.5-servicing.24217.5 + 8.0.5-servicing.24217.5 + 8.0.5 + 8.0.5 @@ -92,71 +120,102 @@ - 6.3.4-rc.2 - $(NuGetBuildTasksPackageVersion) + 6.8.1-rc.2 - 17.3.4 + 17.8.5 + + + + 2.0.0-preview.1.23463.1 + + + + + $(MicrosoftNETSdkPackageVersion.Split('.')[2]) + $(MicrosoftNETSdkFeatureAndPatchVersion.Split('-')[0]) + $(MicrosoftNETSdkFeatureAndPatchVersion.Substring(1)) + + true + true + true + $([MSBuild]::Subtract($(VersionFeature60), 1)) + $(VersionFeature60) + $([MSBuild]::Subtract($(AspNetCoreTemplateFeature60), 1)) + + + + 6.0.302 + 6.0.14 + 6.0.7-servicing.22322.3 + 6.0.7-servicing.22322.2 $(MicrosoftNETCoreAppRuntimePackageVersion) $(MicrosoftNETCoreAppRuntimePackageVersion) - + 3.14.1.8722 - - 3.14.1-8722.20240403.1 + + $(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion) + $(MicrosoftDotNetWpfProjectTemplatesPackageVersion) + $(NUnit3DotNetNewTemplatePackageVersion) + $(MicrosoftDotNetCommonItemTemplatesPackageVersion) + $(MicrosoftDotNetCommonItemTemplatesPackageVersion) + $(MicrosoftAspNetCoreAppRuntimePackageVersion) - $(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion) - $(MicrosoftDotNetWpfProjectTemplatesPackageVersion) + $(MicrosoftWinFormsProjectTemplates60PackageVersion) + $(MicrosoftWPFProjectTemplates60PackageVersion) $(NUnit3DotNetNewTemplatePackageVersion) - $(MicrosoftDotNetCommonItemTemplatesPackageVersion) - 6.0.422 - $(MicrosoftAspNetCoreAppRuntimePackageVersion) + $(MicrosoftDotNetCommonItemTemplates60PackageVersion) + $(MicrosoftDotNetCommonItemTemplates60PackageVersion) + 6.0.$(AspNetCoreTemplateFeature60) 2.2.0-beta.19072.10 2.0.0 - 17.3.3-release-20230405-02 - - - - - 15.7.179 - 15.7.179 - - 6.0.131 + 17.8.0-release-23615-02 + 8.0.0-alpha.1.22557.12 - 6.0.312 - 32.0.301 - 15.4.303 - 15.4.303 - 12.3.303 - 15.4.303 - 6.0.5 - 6.0.30 - $(MicrosoftNETWorkloadEmscriptenManifest60400Version) + 8.0.100 + 8.0.0-preview.1.23557.2 + 8.0.100 + 8.0.3 + 34.0.43 + 17.0.8478 + 17.0.8478 + 14.0.8478 + 17.0.8478 + + 8.0.5 + $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100PackageVersion) + + 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(EmscriptenWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) + + $(MicrosoftNETCoreAppRefPackageVersion) + + 8.0.100$([System.Text.RegularExpressions.Regex]::Match($(MonoWorkloadManifestVersion), `-rtm|-[A-z]*\.*\d*`)) + + + + + 15.7.179 + 15.7.179 diff --git a/eng/build-pr.yml b/eng/build-pr.yml index 653774872..d86f37aab 100644 --- a/eng/build-pr.yml +++ b/eng/build-pr.yml @@ -1,60 +1,165 @@ parameters: - # Agent OS identifier and used as job name - agentOs: '' +# Agent OS identifier and used as job name +- name: agentOs + type: string - # Agent pool - pool: {} +# Job name +- name: jobName + type: string - # Additional variables - variables: {} +# Container to run the build in, if any +- name: container + type: string + default: '' - # Build strategy - matrix - strategy: {} +# Job timeout +- name: timeoutInMinutes + type: number + default: 180 - # Job timeout - timeoutInMinutes: 180 +# Build configuration (Debug, Release) +- name: buildConfiguration + type: string + values: + - Debug + - Release - # Publish using pipelines - enablePublishUsingPipelines: true +# Build architecture +- name: buildArchitecture + type: string + values: + - arm + - arm64 + - x64 + - x86 + +# Linux portable. If true, passes portable switch to build +- name: linuxPortable + type: boolean + default: false -phases: -- template: /eng/common/templates/job/job.yml +# Runtime Identifier +- name: runtimeIdentifier + type: string + default: '' + +# UI lang +- name: dotnetCLIUILanguage + type: string + default: '' + +# Additional parameters +- name: additionalBuildParameters + type: string + default: '' + +# Run tests +- name: runTests + type: boolean + default: true + +# PGO instrumentation jobs +- name: pgoInstrument + type: boolean + default: false + +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet + type: boolean + default: false + +jobs: +- template: common/templates/job/job.yml parameters: + # Set up the name of the job. ${{ if parameters.pgoInstrument }}: - name: PGO_${{ parameters.agentOs }} + name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }} ${{ if not(parameters.pgoInstrument) }}: - name: ${{ parameters.agentOs }} - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + name: ${{ parameters.agentOs }}_${{ parameters.jobName }} + + # Set up the pool/machine info to be used based on the Agent OS ${{ if eq(parameters.agentOs, 'Windows_NT') }}: enableMicrobuild: true - enablePublishBuildAssets: true - enablePublishUsingPipelines: ${{parameters.enablePublishUsingPipelines}} - enableTelemetry: true + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64.open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64 + ${{ if eq(parameters.agentOs, 'Linux') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + container: ${{ parameters.container }} + ${{ if eq(parameters.agentOs, 'Darwin') }}: + pool: + vmImage: 'macOS-latest' + + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + ${{ if parameters.isBuiltFromVmr }}: + enableSbom: false + ${{ else }}: + enablePublishBuildAssets: true + enablePublishUsingPipelines: true + enableTelemetry: true helixRepo: dotnet/installer - pool: ${{ parameters.pool }} - ${{ if ne(parameters.strategy, '') }}: - strategy: ${{ parameters.strategy }} workspace: clean: all variables: + # Test variables + - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '-pack' + - ${{ if parameters.runTests }}: + - _TestArg: '-test' + - ${{ else }}: + - _TestArg: '' + - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '--pack' + - ${{ if parameters.runTests }}: + - _TestArg: '--test' + - ${{ else }}: + - _TestArg: '' + + - ${{ if parameters.pgoInstrument }}: + - _PgoInstrument: '/p:PgoInstrument=true' + - _PackArg: '' + - ${{ else }}: - _PgoInstrument: '' - - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - _PackArg: '-pack' - - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - - _PackArg: '--pack' - - ${{ if parameters.pgoInstrument }}: - - _PgoInstrument: '/p:PgoInstrument=true' - - _PackArg: '' - - _AgentOSName: ${{ parameters.agentOs }} - - _TeamName: Roslyn-Project-System + + - ${{ if parameters.linuxPortable }}: + - _LinuxPortable: '--linux-portable' + - ${{ else }}: + - _LinuxPortable: '' + + - ${{ if ne(parameters.runtimeIdentifier, '') }}: + - _RuntimeIdentifier: '--runtime-id ${{ parameters.runtimeIdentifier }}' + - ${{ else }}: + - _RuntimeIdentifier: '' + + - _AgentOSName: ${{ parameters.agentOs }} + - _TeamName: Roslyn-Project-System + - _SignType: test + - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' + + - ${{ if parameters.isBuiltFromVmr }}: + - installerRoot: '$(Build.SourcesDirectory)/src/installer' - _SignType: test - - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' + - _PushToVSFeed: false + - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:TeamName=$(_TeamName) + /p:DotNetPublishUsingPipelines=true + /p:PublishToSymbolServer=false + $(_PgoInstrument) + - ${{ else }}: + - installerRoot: '$(Build.SourcesDirectory)' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Symbol-Server-PATs - group: DotNet-HelixApi-Access - - group: DotNet-Blob-Feed - - _DotNetPublishToBlobFeed: true - _PushToVSFeed: true - _SignType: real - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) @@ -63,95 +168,86 @@ phases: /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) $(_PgoInstrument) + - template: /eng/common/templates/variables/pool-providers.yml + steps: - checkout: self clean: true - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: PowerShell@2 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: build.cmd + - script: $(installerRoot)/build.cmd $(_TestArg) $(_PackArg) -publish -ci -sign - -Configuration $(_BuildConfig) - -Architecture $(_BuildArchitecture) + -Configuration ${{ parameters.buildConfiguration }} + -Architecture ${{ parameters.buildArchitecture }} $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build env: - DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE) + DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }} - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: Bash@3 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.sh + arguments: $(installerRoot)/NuGet.config $Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - ${{ if eq(parameters.agentOs, 'Linux') }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) $(_PackArg) --publish --ci --noprettyprint - --configuration $(_BuildConfig) - $(_DockerParameter) - --architecture $(_BuildArchitecture) + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} $(_LinuxPortable) $(_RuntimeIdentifier) $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build - ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) --pack --publish --ci --noprettyprint - --configuration $(_BuildConfig) - --architecture $(_BuildArchitecture) + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} $(_RuntimeIdentifier) $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.agentOs, 'Windows_NT'), ne(variables['PostBuildSign'], 'true')) }}: - - task: NuGetCommand@2 - displayName: Push Visual Studio NuPkgs - inputs: - command: push - packagesToPush: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/NonShipping/VS.*.nupkg' - nuGetFeedType: external - publishFeedCredentials: 'DevDiv - VS package feed' - condition: and(succeeded(), ne(variables['PostBuildSign'], true), eq(variables['_PushToVSFeed'], 'true'), eq(variables['_DotNetPublishToBlobFeed'], 'true'), or(eq(variables['_BuildArchitecture'], 'x64'), eq(variables['_BuildArchitecture'], 'x86'))) - - task: PublishTestResults@2 displayName: Publish Test Results inputs: testRunner: XUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml' testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' platform: '$(BuildPlatform)' - configuration: '$(_BuildConfig)' + configuration: '${{ parameters.buildConfiguration }}' condition: ne(variables['_TestArg'], '') - task: CopyFiles@2 displayName: Gather Logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' + SourceFolder: '$(installerRoot)/artifacts' Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + log/${{ parameters.buildConfiguration }}/**/* + TestResults/${{ parameters.buildConfiguration }}/**/* TargetFolder: '$(Build.ArtifactStagingDirectory)' continueOnError: true condition: always() diff --git a/eng/build.yml b/eng/build.yml index 84d86839b..23b1c7148 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -1,60 +1,171 @@ parameters: - # Agent OS identifier and used as job name - agentOs: '' +# Agent OS identifier and used as job name +- name: agentOs + type: string - # Agent pool - pool: {} +# Job name +- name: jobName + type: string - # Additional variables - variables: {} +# Container to run the build in, if any +- name: container + type: string + default: '' - # Build strategy - matrix - strategy: {} +# Job timeout +- name: timeoutInMinutes + type: number + default: 180 - # Job timeout - timeoutInMinutes: 180 +# Build configuration (Debug, Release) +- name: buildConfiguration + type: string + values: + - Debug + - Release - # Publish using pipelines - enablePublishUsingPipelines: true +# Build architecture +- name: buildArchitecture + type: string + values: + - arm + - arm64 + - x64 + - x86 + +# Linux portable. If true, passes portable switch to build +- name: linuxPortable + type: boolean + default: false -phases: -- template: /eng/common/templates-official/job/job.yml +# Runtime Identifier +- name: runtimeIdentifier + type: string + default: '' + +# UI lang +- name: dotnetCLIUILanguage + type: string + default: '' + +# Additional parameters +- name: additionalBuildParameters + type: string + default: '' + +# Run tests +- name: runTests + type: boolean + default: true + +# PGO instrumentation jobs +- name: pgoInstrument + type: boolean + default: false + +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet + type: boolean + default: false + +jobs: +- template: common/templates-official/job/job.yml parameters: + # Set up the name of the job. ${{ if parameters.pgoInstrument }}: - name: PGO_${{ parameters.agentOs }} + name: PGO_${{ parameters.agentOs }}_${{ parameters.jobName }} ${{ if not(parameters.pgoInstrument) }}: - name: ${{ parameters.agentOs }} - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + name: ${{ parameters.agentOs }}_${{ parameters.jobName }} + + # Set up the pool/machine info to be used based on the Agent OS ${{ if eq(parameters.agentOs, 'Windows_NT') }}: enableMicrobuild: true - enablePublishBuildAssets: true - enablePublishUsingPipelines: ${{parameters.enablePublishUsingPipelines}} - enableTelemetry: true + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-windows-2019-open + os: windows + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2019 + os: windows + ${{ if eq(parameters.agentOs, 'Linux') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-ubuntu-2004-open + os: linux + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + image: 1es-ubuntu-2004 + os: linux + container: ${{ parameters.container }} + ${{ if eq(parameters.agentOs, 'Darwin') }}: + pool: + name: Azure Pipelines + image: macOS-latest + os: macOS + + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + ${{ if parameters.isBuiltFromVmr }}: + enableSbom: false + ${{ else }}: + enablePublishBuildAssets: true + enablePublishUsingPipelines: true + enableTelemetry: true helixRepo: dotnet/installer - pool: ${{ parameters.pool }} - ${{ if ne(parameters.strategy, '') }}: - strategy: ${{ parameters.strategy }} workspace: clean: all variables: + # Test variables + - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '-pack' + - ${{ if parameters.runTests }}: + - _TestArg: '-test' + - ${{ else }}: + - _TestArg: '' + - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + - _PackArg: '--pack' + - ${{ if parameters.runTests }}: + - _TestArg: '--test' + - ${{ else }}: + - _TestArg: '' + + - ${{ if parameters.pgoInstrument }}: + - _PgoInstrument: '/p:PgoInstrument=true' + - _PackArg: '' + - ${{ else }}: - _PgoInstrument: '' - - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - _PackArg: '-pack' - - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - - _PackArg: '--pack' - - ${{ if parameters.pgoInstrument }}: - - _PgoInstrument: '/p:PgoInstrument=true' - - _PackArg: '' - - _AgentOSName: ${{ parameters.agentOs }} - - _TeamName: Roslyn-Project-System + + - ${{ if parameters.linuxPortable }}: + - _LinuxPortable: '--linux-portable' + - ${{ else }}: + - _LinuxPortable: '' + + - ${{ if ne(parameters.runtimeIdentifier, '') }}: + - _RuntimeIdentifier: '--runtime-id ${{ parameters.runtimeIdentifier }}' + - ${{ else }}: + - _RuntimeIdentifier: '' + + - _AgentOSName: ${{ parameters.agentOs }} + - _TeamName: Roslyn-Project-System + - _SignType: test + - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' + + - ${{ if parameters.isBuiltFromVmr }}: + - installerRoot: '$(Build.SourcesDirectory)/src/installer' - _SignType: test - - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' + - _PushToVSFeed: false + - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:TeamName=$(_TeamName) + /p:DotNetPublishUsingPipelines=true + /p:PublishToSymbolServer=false + $(_PgoInstrument) + - ${{ else }}: + - installerRoot: '$(Build.SourcesDirectory)' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Symbol-Server-PATs - group: DotNet-HelixApi-Access - - group: DotNet-Blob-Feed - - _DotNetPublishToBlobFeed: true - _PushToVSFeed: true - _SignType: real - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) @@ -63,95 +174,86 @@ phases: /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) $(_PgoInstrument) + - template: /eng/common/templates-official/variables/pool-providers.yml + steps: - checkout: self clean: true - template: /eng/common/templates/steps/enable-internal-runtimes.yml - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: PowerShell@2 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: build.cmd + - script: $(installerRoot)/build.cmd $(_TestArg) $(_PackArg) -publish -ci -sign - -Configuration $(_BuildConfig) - -Architecture $(_BuildArchitecture) + -Configuration ${{ parameters.buildConfiguration }} + -Architecture ${{ parameters.buildArchitecture }} $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build env: - DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE) + DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }} - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: Bash@3 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.sh + arguments: $(installerRoot)/NuGet.config $Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - - ${{ if eq(parameters.agentOs, 'Linux') }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) $(_PackArg) --publish --ci --noprettyprint - --configuration $(_BuildConfig) - $(_DockerParameter) - --architecture $(_BuildArchitecture) + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} $(_LinuxPortable) $(_RuntimeIdentifier) $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build - ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) --pack --publish --ci --noprettyprint - --configuration $(_BuildConfig) - --architecture $(_BuildArchitecture) + --configuration ${{ parameters.buildConfiguration }} + --architecture ${{ parameters.buildArchitecture }} $(_RuntimeIdentifier) $(_BuildArgs) - $(_AdditionalBuildParameters) + ${{ parameters.additionalBuildParameters }} $(_InternalRuntimeDownloadArgs) displayName: Build - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.agentOs, 'Windows_NT'), ne(variables['PostBuildSign'], 'true')) }}: - - task: 1ES.PublishNuget@1 - displayName: Push Visual Studio NuPkgs - inputs: - packagesToPush: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/NonShipping/VS.*.nupkg' - nuGetFeedType: external - publishFeedCredentials: 'DevDiv - VS package feed' - condition: and(succeeded(), ne(variables['PostBuildSign'], true), eq(variables['_PushToVSFeed'], 'true'), eq(variables['_DotNetPublishToBlobFeed'], 'true'), or(eq(variables['_BuildArchitecture'], 'x64'), eq(variables['_BuildArchitecture'], 'x86'))) - - task: PublishTestResults@2 displayName: Publish Test Results inputs: testRunner: XUnit - testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml' + testResultsFiles: 'artifacts/TestResults/${{ parameters.buildConfiguration }}/*.xml' testRunTitle: '$(_AgentOSName)_$(Agent.JobName)' platform: '$(BuildPlatform)' - configuration: '$(_BuildConfig)' + configuration: '${{ parameters.buildConfiguration }}' condition: ne(variables['_TestArg'], '') - task: CopyFiles@2 displayName: Gather Logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' + SourceFolder: '$(installerRoot)/artifacts' Contents: | - log/$(_BuildConfig)/**/* - TestResults/$(_BuildConfig)/**/* + log/${{ parameters.buildConfiguration }}/**/* + TestResults/${{ parameters.buildConfiguration }}/**/* TargetFolder: '$(Build.ArtifactStagingDirectory)' continueOnError: true condition: always() diff --git a/eng/common/BuildConfiguration/build-configuration.json b/eng/common/BuildConfiguration/build-configuration.json new file mode 100644 index 000000000..3d1cc8989 --- /dev/null +++ b/eng/common/BuildConfiguration/build-configuration.json @@ -0,0 +1,4 @@ +{ + "RetryCountLimit": 1, + "RetryByAnyError": false +} diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 4ed5c54e7..efa2fd72b 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -48,7 +48,6 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern else { Write-Host "Package source $SourceName already present." } - AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd } @@ -82,6 +81,7 @@ function AddCredential($creds, $source, $username, $pwd) { $passwordElement.SetAttribute("key", "ClearTextPassword") $sourceElement.AppendChild($passwordElement) | Out-Null } + $passwordElement.SetAttribute("value", $pwd) } @@ -146,22 +146,22 @@ $userName = "dn-bot" # Insert credential nodes for Maestro's private feeds InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password +# 3.1 uses a different feed url format so it's handled differently here $dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") if ($dotnet31Source -ne $null) { AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password } -$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']") -if ($dotnet5Source -ne $null) { - AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password +$dotnetVersions = @('5','6','7','8') + +foreach ($dotnetVersion in $dotnetVersions) { + $feedPrefix = "dotnet" + $dotnetVersion; + $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") + if ($dotnetSource -ne $null) { + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password + AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password + } } -$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']") -if ($dotnet6Source -ne $null) { - AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password - AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password -} - -$doc.Save($filename) +$doc.Save($filename) \ No newline at end of file diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index ad3fb74fd..d387c7eac 100644 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -105,53 +105,33 @@ if [ "$?" == "0" ]; then PackageSources+=('dotnet3.1-internal-transport') fi -# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present -grep -i "" +DotNetVersions=('5' '6' '7' '8') - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile +for DotNetVersion in ${DotNetVersions[@]} ; do + FeedPrefix="dotnet${DotNetVersion}"; + grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=("$FeedPrefix-internal") + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding $FeedPrefix-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=("$FeedPrefix-internal-transport") fi - PackageSources+=('dotnet5-internal') - - grep -i "" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding dotnet5-internal-transport to the packageSources." - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=('dotnet5-internal-transport') -fi - -# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present -grep -i "" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=('dotnet6-internal') - - grep -i "" $ConfigFile - if [ "$?" != "0" ]; then - echo "Adding dotnet6-internal-transport to the packageSources." - PackageSourcesNodeFooter="" - PackageSourceTemplate="${TB}" - - sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile - fi - PackageSources+=('dotnet6-internal-transport') -fi +done # I want things split line by line PrevIFS=$IFS diff --git a/eng/common/build.sh b/eng/common/build.sh index a16e18b17..50af40cdd 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -19,6 +19,9 @@ usage() echo "Actions:" echo " --restore Restore dependencies (short: -r)" echo " --build Build solution (short: -b)" + echo " --sourceBuild Source-build the solution (short: -sb)" + echo " Will additionally trigger the following actions: --restore, --build, --pack" + echo " If --configuration is not set explicitly, will also set it to 'Release'" echo " --rebuild Rebuild solution" echo " --test Run all unit tests in the solution (short: -t)" echo " --integrationTest Run all integration tests in the solution" @@ -55,6 +58,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" restore=false build=false +source_build=false rebuild=false test=false integration_test=false @@ -73,7 +77,7 @@ exclude_ci_binary_log=false pipelines_log=false projects='' -configuration='Debug' +configuration='' prepare_machine=false verbosity='minimal' runtime_source_feed='' @@ -119,6 +123,12 @@ while [[ $# > 0 ]]; do -pack) pack=true ;; + -sourcebuild|-sb) + build=true + source_build=true + restore=true + pack=true + ;; -test|-t) test=true ;; @@ -168,6 +178,10 @@ while [[ $# > 0 ]]; do shift done +if [[ -z "$configuration" ]]; then + if [[ "$source_build" = true ]]; then configuration="Release"; else configuration="Debug"; fi +fi + if [[ "$ci" == true ]]; then pipelines_log=true node_reuse=false @@ -187,7 +201,6 @@ function InitializeCustomToolset { } function Build { - InitializeToolset InitializeCustomToolset @@ -206,6 +219,7 @@ function Build { /p:RepoRoot="$repo_root" \ /p:Restore=$restore \ /p:Build=$build \ + /p:ArcadeBuildFromSource=$source_build \ /p:Rebuild=$rebuild \ /p:Test=$test \ /p:Pack=$pack \ diff --git a/eng/common/cross/arm/sources.list.focal b/eng/common/cross/arm/sources.list.focal new file mode 100644 index 000000000..4de2600c1 --- /dev/null +++ b/eng/common/cross/arm/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jammy b/eng/common/cross/arm/sources.list.jammy new file mode 100644 index 000000000..6bb045302 --- /dev/null +++ b/eng/common/cross/arm/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.xenial b/eng/common/cross/arm/sources.list.xenial index eacd86b7d..56fbb36a5 100644 --- a/eng/common/cross/arm/sources.list.xenial +++ b/eng/common/cross/arm/sources.list.xenial @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse \ No newline at end of file +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse diff --git a/eng/common/cross/arm/tizen/tizen.patch b/eng/common/cross/arm/tizen/tizen.patch new file mode 100644 index 000000000..fb12ade72 --- /dev/null +++ b/eng/common/cross/arm/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf32-littlearm) +-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) ) diff --git a/eng/common/cross/arm64/sources.list.focal b/eng/common/cross/arm64/sources.list.focal new file mode 100644 index 000000000..4de2600c1 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.focal @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.jammy b/eng/common/cross/arm64/sources.list.jammy new file mode 100644 index 000000000..6bb045302 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.jammy @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.xenial b/eng/common/cross/arm64/sources.list.xenial index eacd86b7d..56fbb36a5 100644 --- a/eng/common/cross/arm64/sources.list.xenial +++ b/eng/common/cross/arm64/sources.list.xenial @@ -8,4 +8,4 @@ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse \ No newline at end of file +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/tizen-fetch.sh b/eng/common/cross/arm64/tizen-fetch.sh deleted file mode 100644 index 16d1301f2..000000000 --- a/eng/common/cross/arm64/tizen-fetch.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [[ -z "${VERBOSE// }" ]] || [ "$VERBOSE" -ne "$VERBOSE" ] 2>/dev/null; then - VERBOSE=0 -fi - -Log() -{ - if [ $VERBOSE -ge $1 ]; then - echo ${@:2} - fi -} - -Inform() -{ - Log 1 -e "\x1B[0;34m$@\x1B[m" -} - -Debug() -{ - Log 2 -e "\x1B[0;32m$@\x1B[m" -} - -Error() -{ - >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" -} - -Fetch() -{ - URL=$1 - FILE=$2 - PROGRESS=$3 - if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then - CURL_OPT="--progress-bar" - else - CURL_OPT="--silent" - fi - curl $CURL_OPT $URL > $FILE -} - -hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } -hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } -hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } - -TMPDIR=$1 -if [ ! -d $TMPDIR ]; then - TMPDIR=./tizen_tmp - Debug "Create temporary directory : $TMPDIR" - mkdir -p $TMPDIR -fi - -TIZEN_URL=http://download.tizen.org/snapshots/tizen/ -BUILD_XML=build.xml -REPOMD_XML=repomd.xml -PRIMARY_XML=primary.xml -TARGET_URL="http://__not_initialized" - -Xpath_get() -{ - XPATH_RESULT='' - XPATH=$1 - XML_FILE=$2 - RESULT=$(xmllint --xpath $XPATH $XML_FILE) - if [[ -z ${RESULT// } ]]; then - Error "Can not find target from $XML_FILE" - Debug "Xpath = $XPATH" - exit 1 - fi - XPATH_RESULT=$RESULT -} - -fetch_tizen_pkgs_init() -{ - TARGET=$1 - PROFILE=$2 - Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" - - TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs - if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi - mkdir -p $TMP_PKG_DIR - - PKG_URL=$TIZEN_URL/$PROFILE/latest - - BUILD_XML_URL=$PKG_URL/$BUILD_XML - TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML - TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML - TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML - TMP_PRIMARYGZ=${TMP_PRIMARY}.gz - - Fetch $BUILD_XML_URL $TMP_BUILD - - Debug "fetch $BUILD_XML_URL to $TMP_BUILD" - - TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" - Xpath_get $TARGET_XPATH $TMP_BUILD - TARGET_PATH=$XPATH_RESULT - TARGET_URL=$PKG_URL/$TARGET_PATH - - REPOMD_URL=$TARGET_URL/repodata/repomd.xml - PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' - - Fetch $REPOMD_URL $TMP_REPOMD - - Debug "fetch $REPOMD_URL to $TMP_REPOMD" - - Xpath_get $PRIMARY_XPATH $TMP_REPOMD - PRIMARY_XML_PATH=$XPATH_RESULT - PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH - - Fetch $PRIMARY_URL $TMP_PRIMARYGZ - - Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" - - gunzip $TMP_PRIMARYGZ - - Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" -} - -fetch_tizen_pkgs() -{ - ARCH=$1 - PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' - - PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' - - for pkg in ${@:2} - do - Inform "Fetching... $pkg" - XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - PKG_PATH=$XPATH_RESULT - - XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - CHECKSUM=$XPATH_RESULT - - PKG_URL=$TARGET_URL/$PKG_PATH - PKG_FILE=$(basename $PKG_PATH) - PKG_PATH=$TMPDIR/$PKG_FILE - - Debug "Download $PKG_URL to $PKG_PATH" - Fetch $PKG_URL $PKG_PATH true - - echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null - if [ $? -ne 0 ]; then - Error "Fail to fetch $PKG_URL to $PKG_PATH" - Debug "Checksum = $CHECKSUM" - exit 1 - fi - done -} - -Inform "Initialize arm base" -fetch_tizen_pkgs_init standard base -Inform "fetch common packages" -fetch_tizen_pkgs aarch64 gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils -Inform "fetch coreclr packages" -fetch_tizen_pkgs aarch64 lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu -Inform "fetch corefx packages" -fetch_tizen_pkgs aarch64 libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel - -Inform "Initialize standard unified" -fetch_tizen_pkgs_init standard unified -Inform "fetch corefx packages" -fetch_tizen_pkgs aarch64 gssdp gssdp-devel tizen-release - diff --git a/eng/common/cross/armel/tizen-build-rootfs.sh b/eng/common/cross/armel/tizen-build-rootfs.sh deleted file mode 100755 index 9a4438af6..000000000 --- a/eng/common/cross/armel/tizen-build-rootfs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -set -e - -__ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen" - -if [[ -z "$ROOTFS_DIR" ]]; then - echo "ROOTFS_DIR is not defined." - exit 1; -fi - -TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp -mkdir -p $TIZEN_TMP_DIR - -# Download files -echo ">>Start downloading files" -VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR -echo "<>Start constructing Tizen rootfs" -TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` -cd $ROOTFS_DIR -for f in $TIZEN_RPM_FILES; do - rpm2cpio $f | cpio -idm --quiet -done -echo "<>Start configuring Tizen rootfs" -ln -sfn asm-arm ./usr/include/asm -patch -p1 < $__TIZEN_CROSSDIR/tizen.patch -echo "</dev/null; then - VERBOSE=0 -fi - -Log() -{ - if [ $VERBOSE -ge $1 ]; then - echo ${@:2} - fi -} - -Inform() -{ - Log 1 -e "\x1B[0;34m$@\x1B[m" -} - -Debug() -{ - Log 2 -e "\x1B[0;32m$@\x1B[m" -} - -Error() -{ - >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" -} - -Fetch() -{ - URL=$1 - FILE=$2 - PROGRESS=$3 - if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then - CURL_OPT="--progress-bar" - else - CURL_OPT="--silent" - fi - curl $CURL_OPT $URL > $FILE -} - -hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } -hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } -hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } - -TMPDIR=$1 -if [ ! -d $TMPDIR ]; then - TMPDIR=./tizen_tmp - Debug "Create temporary directory : $TMPDIR" - mkdir -p $TMPDIR -fi - -TIZEN_URL=http://download.tizen.org/snapshots/tizen -BUILD_XML=build.xml -REPOMD_XML=repomd.xml -PRIMARY_XML=primary.xml -TARGET_URL="http://__not_initialized" - -Xpath_get() -{ - XPATH_RESULT='' - XPATH=$1 - XML_FILE=$2 - RESULT=$(xmllint --xpath $XPATH $XML_FILE) - if [[ -z ${RESULT// } ]]; then - Error "Can not find target from $XML_FILE" - Debug "Xpath = $XPATH" - exit 1 - fi - XPATH_RESULT=$RESULT -} - -fetch_tizen_pkgs_init() -{ - TARGET=$1 - PROFILE=$2 - Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" - - TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs - if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi - mkdir -p $TMP_PKG_DIR - - PKG_URL=$TIZEN_URL/$PROFILE/latest - - BUILD_XML_URL=$PKG_URL/$BUILD_XML - TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML - TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML - TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML - TMP_PRIMARYGZ=${TMP_PRIMARY}.gz - - Fetch $BUILD_XML_URL $TMP_BUILD - - Debug "fetch $BUILD_XML_URL to $TMP_BUILD" - - TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" - Xpath_get $TARGET_XPATH $TMP_BUILD - TARGET_PATH=$XPATH_RESULT - TARGET_URL=$PKG_URL/$TARGET_PATH - - REPOMD_URL=$TARGET_URL/repodata/repomd.xml - PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' - - Fetch $REPOMD_URL $TMP_REPOMD - - Debug "fetch $REPOMD_URL to $TMP_REPOMD" - - Xpath_get $PRIMARY_XPATH $TMP_REPOMD - PRIMARY_XML_PATH=$XPATH_RESULT - PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH - - Fetch $PRIMARY_URL $TMP_PRIMARYGZ - - Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" - - gunzip $TMP_PRIMARYGZ - - Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" -} - -fetch_tizen_pkgs() -{ - ARCH=$1 - PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' - - PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' - - for pkg in ${@:2} - do - Inform "Fetching... $pkg" - XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - PKG_PATH=$XPATH_RESULT - - XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - CHECKSUM=$XPATH_RESULT - - PKG_URL=$TARGET_URL/$PKG_PATH - PKG_FILE=$(basename $PKG_PATH) - PKG_PATH=$TMPDIR/$PKG_FILE - - Debug "Download $PKG_URL to $PKG_PATH" - Fetch $PKG_URL $PKG_PATH true - - echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null - if [ $? -ne 0 ]; then - Error "Fail to fetch $PKG_URL to $PKG_PATH" - Debug "Checksum = $CHECKSUM" - exit 1 - fi - done -} - -Inform "Initialize arm base" -fetch_tizen_pkgs_init standard base -Inform "fetch common packages" -fetch_tizen_pkgs armv7l gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils -Inform "fetch coreclr packages" -fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7l libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel - -Inform "Initialize standard unified" -fetch_tizen_pkgs_init standard unified -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7l gssdp gssdp-devel tizen-release - diff --git a/eng/common/cross/armel/tizen/tizen-dotnet.ks b/eng/common/cross/armel/tizen/tizen-dotnet.ks deleted file mode 100644 index 506d455bd..000000000 --- a/eng/common/cross/armel/tizen/tizen-dotnet.ks +++ /dev/null @@ -1,50 +0,0 @@ -lang en_US.UTF-8 -keyboard us -timezone --utc Asia/Seoul - -part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime - -rootpw tizen -desktop --autologinuser=root -user --name root --groups audio,video --password 'tizen' - -repo --name=standard --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/ --ssl_verify=no -repo --name=base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/ --ssl_verify=no - -%packages -tar -gzip - -sed -grep -gawk -perl - -binutils -findutils -util-linux -lttng-ust -userspace-rcu -procps-ng -tzdata -ca-certificates - - -### Core FX -libicu -libunwind -iputils -zlib -krb5 -libcurl -libopenssl - -%end - -%post - -### Update /tmp privilege -chmod 777 /tmp -#################################### - -%end diff --git a/eng/common/cross/armv6/sources.list.buster b/eng/common/cross/armv6/sources.list.buster new file mode 100644 index 000000000..f27fc4fb3 --- /dev/null +++ b/eng/common/cross/armv6/sources.list.buster @@ -0,0 +1,2 @@ +deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi +deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh index 42516bbee..f163fb9da 100755 --- a/eng/common/cross/build-android-rootfs.sh +++ b/eng/common/cross/build-android-rootfs.sh @@ -107,12 +107,12 @@ __AndroidPackages+=" liblzma" __AndroidPackages+=" krb5" __AndroidPackages+=" openssl" -for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArch/Packages |\ +for path in $(wget -qO- https://packages.termux.dev/termux-main-21/dists/stable/main/binary-$__AndroidArch/Packages |\ grep -A15 "Package: \(${__AndroidPackages// /\\|}\)" | grep -v "static\|tool" | grep Filename); do if [[ "$path" != "Filename:" ]]; then echo "Working on: $path" - wget -qO- http://termux.net/$path | dpkg -x - "$__TmpDir" + wget -qO- https://packages.termux.dev/termux-main-21/$path | dpkg -x - "$__TmpDir" fi done diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 5c05b39f1..9caf9b021 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -4,22 +4,30 @@ set -e usage() { - echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir ]" - echo "BuildArch can be: arm(default), armel, arm64, x86" - echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." - echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13" - echo " for illumos can be: illumos." + echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir ]" + echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86" + echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine" + echo " for alpine can be specified with version: alpineX.YY or alpineedge" + echo " for FreeBSD can be: freebsd12, freebsd13" + echo " for illumos can be: illumos" + echo " for Haiku can be: haiku." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" + echo "llvmx[.y] - optional, LLVM version for LLVM related packages." echo "--skipunmount - optional, will skip the unmount of rootfs folder." + echo "--skipsigcheck - optional, will skip package signature checks (allowing untrusted packages)." echo "--use-mirror - optional, use mirror URL to fetch resources, when available." + echo "--jobs N - optional, restrict to N jobs." exit 1 } __CodeName=xenial __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__InitialDir=$PWD __BuildArch=arm __AlpineArch=armv7 +__FreeBSDArch=arm +__FreeBSDMachineArch=armv7 +__IllumosArch=arm7 +__HaikuArch=arm __QEMUArch=arm __UbuntuArch=armhf __UbuntuRepo="http://ports.ubuntu.com/" @@ -32,24 +40,27 @@ __UbuntuPackages="build-essential" __AlpinePackages="alpine-base" __AlpinePackages+=" build-base" __AlpinePackages+=" linux-headers" -__AlpinePackagesEdgeCommunity=" lldb-dev" -__AlpinePackagesEdgeMain+=" python3" -__AlpinePackagesEdgeMain+=" libedit" +__AlpinePackages+=" lldb-dev" +__AlpinePackages+=" python3" +__AlpinePackages+=" libedit" # symlinks fixer __UbuntuPackages+=" symlinks" -# CoreCLR and CoreFX dependencies +# runtime dependencies __UbuntuPackages+=" libicu-dev" __UbuntuPackages+=" liblttng-ust-dev" __UbuntuPackages+=" libunwind8-dev" +__UbuntuPackages+=" libnuma-dev" __AlpinePackages+=" gettext-dev" __AlpinePackages+=" icu-dev" __AlpinePackages+=" libunwind-dev" __AlpinePackages+=" lttng-ust-dev" +__AlpinePackages+=" compiler-rt" +__AlpinePackages+=" numactl-dev" -# CoreFX dependencies +# runtime libraries' dependencies __UbuntuPackages+=" libcurl4-openssl-dev" __UbuntuPackages+=" libkrb5-dev" __UbuntuPackages+=" libssl-dev" @@ -60,36 +71,76 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="12.2-RELEASE" -__FreeBSDPkg="1.12.0" +__FreeBSDBase="12.4-RELEASE" +__FreeBSDPkg="1.17.0" __FreeBSDABI="12" __FreeBSDPackages="libunwind" __FreeBSDPackages+=" icu" __FreeBSDPackages+=" libinotify" -__FreeBSDPackages+=" lttng-ust" +__FreeBSDPackages+=" openssl" __FreeBSDPackages+=" krb5" __FreeBSDPackages+=" terminfo-db" -__IllumosPackages="icu-64.2nb2" -__IllumosPackages+=" mit-krb5-1.16.2nb4" -__IllumosPackages+=" openssl-1.1.1e" -__IllumosPackages+=" zlib-1.2.11" +__IllumosPackages="icu" +__IllumosPackages+=" mit-krb5" +__IllumosPackages+=" openssl" +__IllumosPackages+=" zlib" + +__HaikuPackages="gcc_syslibs" +__HaikuPackages+=" gcc_syslibs_devel" +__HaikuPackages+=" gmp" +__HaikuPackages+=" gmp_devel" +__HaikuPackages+=" icu66" +__HaikuPackages+=" icu66_devel" +__HaikuPackages+=" krb5" +__HaikuPackages+=" krb5_devel" +__HaikuPackages+=" libiconv" +__HaikuPackages+=" libiconv_devel" +__HaikuPackages+=" llvm12_libunwind" +__HaikuPackages+=" llvm12_libunwind_devel" +__HaikuPackages+=" mpfr" +__HaikuPackages+=" mpfr_devel" +__HaikuPackages+=" openssl" +__HaikuPackages+=" openssl_devel" +__HaikuPackages+=" zlib" +__HaikuPackages+=" zlib_devel" # ML.NET dependencies __UbuntuPackages+=" libomp5" __UbuntuPackages+=" libomp-dev" +# Taken from https://github.com/alpinelinux/alpine-chroot-install/blob/6d08f12a8a70dd9b9dc7d997c88aa7789cc03c42/alpine-chroot-install#L85-L133 +__AlpineKeys=' +4a6a0840:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1yHJxQgsHQREclQu4Ohe\nqxTxd1tHcNnvnQTu/UrTky8wWvgXT+jpveroeWWnzmsYlDI93eLI2ORakxb3gA2O\nQ0Ry4ws8vhaxLQGC74uQR5+/yYrLuTKydFzuPaS1dK19qJPXB8GMdmFOijnXX4SA\njixuHLe1WW7kZVtjL7nufvpXkWBGjsfrvskdNA/5MfxAeBbqPgaq0QMEfxMAn6/R\nL5kNepi/Vr4S39Xvf2DzWkTLEK8pcnjNkt9/aafhWqFVW7m3HCAII6h/qlQNQKSo\nGuH34Q8GsFG30izUENV9avY7hSLq7nggsvknlNBZtFUcmGoQrtx3FmyYsIC8/R+B\nywIDAQAB +5243ef4b:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvNijDxJ8kloskKQpJdx+\nmTMVFFUGDoDCbulnhZMJoKNkSuZOzBoFC94omYPtxnIcBdWBGnrm6ncbKRlR+6oy\nDO0W7c44uHKCFGFqBhDasdI4RCYP+fcIX/lyMh6MLbOxqS22TwSLhCVjTyJeeH7K\naA7vqk+QSsF4TGbYzQDDpg7+6aAcNzg6InNePaywA6hbT0JXbxnDWsB+2/LLSF2G\nmnhJlJrWB1WGjkz23ONIWk85W4S0XB/ewDefd4Ly/zyIciastA7Zqnh7p3Ody6Q0\nsS2MJzo7p3os1smGjUF158s6m/JbVh4DN6YIsxwl2OjDOz9R0OycfJSDaBVIGZzg\ncQIDAQAB +524d27bb:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr8s1q88XpuJWLCZALdKj\nlN8wg2ePB2T9aIcaxryYE/Jkmtu+ZQ5zKq6BT3y/udt5jAsMrhHTwroOjIsF9DeG\ne8Y3vjz+Hh4L8a7hZDaw8jy3CPag47L7nsZFwQOIo2Cl1SnzUc6/owoyjRU7ab0p\niWG5HK8IfiybRbZxnEbNAfT4R53hyI6z5FhyXGS2Ld8zCoU/R4E1P0CUuXKEN4p0\n64dyeUoOLXEWHjgKiU1mElIQj3k/IF02W89gDj285YgwqA49deLUM7QOd53QLnx+\nxrIrPv3A+eyXMFgexNwCKQU9ZdmWa00MjjHlegSGK8Y2NPnRoXhzqSP9T9i2HiXL\nVQIDAQAB +5261cecb:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwlzMkl7b5PBdfMzGdCT0\ncGloRr5xGgVmsdq5EtJvFkFAiN8Ac9MCFy/vAFmS8/7ZaGOXoCDWbYVLTLOO2qtX\nyHRl+7fJVh2N6qrDDFPmdgCi8NaE+3rITWXGrrQ1spJ0B6HIzTDNEjRKnD4xyg4j\ng01FMcJTU6E+V2JBY45CKN9dWr1JDM/nei/Pf0byBJlMp/mSSfjodykmz4Oe13xB\nCa1WTwgFykKYthoLGYrmo+LKIGpMoeEbY1kuUe04UiDe47l6Oggwnl+8XD1MeRWY\nsWgj8sF4dTcSfCMavK4zHRFFQbGp/YFJ/Ww6U9lA3Vq0wyEI6MCMQnoSMFwrbgZw\nwwIDAQAB +58199dcc:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3v8/ye/V/t5xf4JiXLXa\nhWFRozsnmn3hobON20GdmkrzKzO/eUqPOKTpg2GtvBhK30fu5oY5uN2ORiv2Y2ht\neLiZ9HVz3XP8Fm9frha60B7KNu66FO5P2o3i+E+DWTPqqPcCG6t4Znk2BypILcit\nwiPKTsgbBQR2qo/cO01eLLdt6oOzAaF94NH0656kvRewdo6HG4urbO46tCAizvCR\nCA7KGFMyad8WdKkTjxh8YLDLoOCtoZmXmQAiwfRe9pKXRH/XXGop8SYptLqyVVQ+\ntegOD9wRs2tOlgcLx4F/uMzHN7uoho6okBPiifRX+Pf38Vx+ozXh056tjmdZkCaV\naQIDAQAB +58cbb476:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoSPnuAGKtRIS5fEgYPXD\n8pSGvKAmIv3A08LBViDUe+YwhilSHbYXUEAcSH1KZvOo1WT1x2FNEPBEFEFU1Eyc\n+qGzbA03UFgBNvArurHQ5Z/GngGqE7IarSQFSoqewYRtFSfp+TL9CUNBvM0rT7vz\n2eMu3/wWG+CBmb92lkmyWwC1WSWFKO3x8w+Br2IFWvAZqHRt8oiG5QtYvcZL6jym\nY8T6sgdDlj+Y+wWaLHs9Fc+7vBuyK9C4O1ORdMPW15qVSl4Lc2Wu1QVwRiKnmA+c\nDsH/m7kDNRHM7TjWnuj+nrBOKAHzYquiu5iB3Qmx+0gwnrSVf27Arc3ozUmmJbLj\nzQIDAQAB +58e4f17d:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvBxJN9ErBgdRcPr5g4hV\nqyUSGZEKuvQliq2Z9SRHLh2J43+EdB6A+yzVvLnzcHVpBJ+BZ9RV30EM9guck9sh\nr+bryZcRHyjG2wiIEoduxF2a8KeWeQH7QlpwGhuobo1+gA8L0AGImiA6UP3LOirl\nI0G2+iaKZowME8/tydww4jx5vG132JCOScMjTalRsYZYJcjFbebQQolpqRaGB4iG\nWqhytWQGWuKiB1A22wjmIYf3t96l1Mp+FmM2URPxD1gk/BIBnX7ew+2gWppXOK9j\n1BJpo0/HaX5XoZ/uMqISAAtgHZAqq+g3IUPouxTphgYQRTRYpz2COw3NF43VYQrR\nbQIDAQAB +60ac2099:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwR4uJVtJOnOFGchnMW5Y\nj5/waBdG1u5BTMlH+iQMcV5+VgWhmpZHJCBz3ocD+0IGk2I68S5TDOHec/GSC0lv\n6R9o6F7h429GmgPgVKQsc8mPTPtbjJMuLLs4xKc+viCplXc0Nc0ZoHmCH4da6fCV\ntdpHQjVe6F9zjdquZ4RjV6R6JTiN9v924dGMAkbW/xXmamtz51FzondKC52Gh8Mo\n/oA0/T0KsCMCi7tb4QNQUYrf+Xcha9uus4ww1kWNZyfXJB87a2kORLiWMfs2IBBJ\nTmZ2Fnk0JnHDb8Oknxd9PvJPT0mvyT8DA+KIAPqNvOjUXP4bnjEHJcoCP9S5HkGC\nIQIDAQAB +6165ee59:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAutQkua2CAig4VFSJ7v54\nALyu/J1WB3oni7qwCZD3veURw7HxpNAj9hR+S5N/pNeZgubQvJWyaPuQDm7PTs1+\ntFGiYNfAsiibX6Rv0wci3M+z2XEVAeR9Vzg6v4qoofDyoTbovn2LztaNEjTkB+oK\ntlvpNhg1zhou0jDVYFniEXvzjckxswHVb8cT0OMTKHALyLPrPOJzVtM9C1ew2Nnc\n3848xLiApMu3NBk0JqfcS3Bo5Y2b1FRVBvdt+2gFoKZix1MnZdAEZ8xQzL/a0YS5\nHd0wj5+EEKHfOd3A75uPa/WQmA+o0cBFfrzm69QDcSJSwGpzWrD1ScH3AK8nWvoj\nv7e9gukK/9yl1b4fQQ00vttwJPSgm9EnfPHLAtgXkRloI27H6/PuLoNvSAMQwuCD\nhQRlyGLPBETKkHeodfLoULjhDi1K2gKJTMhtbnUcAA7nEphkMhPWkBpgFdrH+5z4\nLxy+3ek0cqcI7K68EtrffU8jtUj9LFTUC8dERaIBs7NgQ/LfDbDfGh9g6qVj1hZl\nk9aaIPTm/xsi8v3u+0qaq7KzIBc9s59JOoA8TlpOaYdVgSQhHHLBaahOuAigH+VI\nisbC9vmqsThF2QdDtQt37keuqoda2E6sL7PUvIyVXDRfwX7uMDjlzTxHTymvq2Ck\nhtBqojBnThmjJQFgZXocHG8CAwEAAQ== +61666e3f:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlEyxkHggKCXC2Wf5Mzx4\nnZLFZvU2bgcA3exfNPO/g1YunKfQY+Jg4fr6tJUUTZ3XZUrhmLNWvpvSwDS19ZmC\nIXOu0+V94aNgnhMsk9rr59I8qcbsQGIBoHzuAl8NzZCgdbEXkiY90w1skUw8J57z\nqCsMBydAueMXuWqF5nGtYbi5vHwK42PffpiZ7G5Kjwn8nYMW5IZdL6ZnMEVJUWC9\nI4waeKg0yskczYDmZUEAtrn3laX9677ToCpiKrvmZYjlGl0BaGp3cxggP2xaDbUq\nqfFxWNgvUAb3pXD09JM6Mt6HSIJaFc9vQbrKB9KT515y763j5CC2KUsilszKi3mB\nHYe5PoebdjS7D1Oh+tRqfegU2IImzSwW3iwA7PJvefFuc/kNIijfS/gH/cAqAK6z\nbhdOtE/zc7TtqW2Wn5Y03jIZdtm12CxSxwgtCF1NPyEWyIxAQUX9ACb3M0FAZ61n\nfpPrvwTaIIxxZ01L3IzPLpbc44x/DhJIEU+iDt6IMTrHOphD9MCG4631eIdB0H1b\n6zbNX1CXTsafqHRFV9XmYYIeOMggmd90s3xIbEujA6HKNP/gwzO6CDJ+nHFDEqoF\nSkxRdTkEqjTjVKieURW7Swv7zpfu5PrsrrkyGnsRrBJJzXlm2FOOxnbI2iSL1B5F\nrO5kbUxFeZUIDq+7Yv4kLWcCAwEAAQ== +616a9724:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnC+bR4bHf/L6QdU4puhQ\ngl1MHePszRC38bzvVFDUJsmCaMCL2suCs2A2yxAgGb9pu9AJYLAmxQC4mM3jNqhg\n/E7yuaBbek3O02zN/ctvflJ250wZCy+z0ZGIp1ak6pu1j14IwHokl9j36zNfGtfv\nADVOcdpWITFFlPqwq1qt/H3UsKVmtiF3BNWWTeUEQwKvlU8ymxgS99yn0+4OPyNT\nL3EUeS+NQJtDS01unau0t7LnjUXn+XIneWny8bIYOQCuVR6s/gpIGuhBaUqwaJOw\n7jkJZYF2Ij7uPb4b5/R3vX2FfxxqEHqssFSg8FFUNTZz3qNZs0CRVyfA972g9WkJ\nhPfn31pQYil4QGRibCMIeU27YAEjXoqfJKEPh4UWMQsQLrEfdGfb8VgwrPbniGfU\nL3jKJR3VAafL9330iawzVQDlIlwGl6u77gEXMl9K0pfazunYhAp+BMP+9ot5ckK+\nosmrqj11qMESsAj083GeFdfV3pXEIwUytaB0AKEht9DbqUfiE/oeZ/LAXgySMtVC\nsbC4ESmgVeY2xSBIJdDyUap7FR49GGrw0W49NUv9gRgQtGGaNVQQO9oGL2PBC41P\niWF9GLoX30HIz1P8PF/cZvicSSPkQf2Z6TV+t0ebdGNS5DjapdnCrq8m9Z0pyKsQ\nuxAL2a7zX8l5i1CZh1ycUGsCAwEAAQ== +616abc23:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0MfCDrhODRCIxR9Dep1s\neXafh5CE5BrF4WbCgCsevyPIdvTeyIaW4vmO3bbG4VzhogDZju+R3IQYFuhoXP5v\nY+zYJGnwrgz3r5wYAvPnLEs1+dtDKYOgJXQj+wLJBW1mzRDL8FoRXOe5iRmn1EFS\nwZ1DoUvyu7/J5r0itKicZp3QKED6YoilXed+1vnS4Sk0mzN4smuMR9eO1mMCqNp9\n9KTfRDHTbakIHwasECCXCp50uXdoW6ig/xUAFanpm9LtK6jctNDbXDhQmgvAaLXZ\nLvFqoaYJ/CvWkyYCgL6qxvMvVmPoRv7OPcyni4xR/WgWa0MSaEWjgPx3+yj9fiMA\n1S02pFWFDOr5OUF/O4YhFJvUCOtVsUPPfA/Lj6faL0h5QI9mQhy5Zb9TTaS9jB6p\nLw7u0dJlrjFedk8KTJdFCcaGYHP6kNPnOxMylcB/5WcztXZVQD5WpCicGNBxCGMm\nW64SgrV7M07gQfL/32QLsdqPUf0i8hoVD8wfQ3EpbQzv6Fk1Cn90bZqZafg8XWGY\nwddhkXk7egrr23Djv37V2okjzdqoyLBYBxMz63qQzFoAVv5VoY2NDTbXYUYytOvG\nGJ1afYDRVWrExCech1mX5ZVUB1br6WM+psFLJFoBFl6mDmiYt0vMYBddKISsvwLl\nIJQkzDwtXzT2cSjoj3T5QekCAwEAAQ== +616ac3bc:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvaaoSLab+IluixwKV5Od\n0gib2YurjPatGIbn5Ov2DLUFYiebj2oJINXJSwUOO+4WcuHFEqiL/1rya+k5hLZt\nhnPL1tn6QD4rESznvGSasRCQNT2vS/oyZbTYJRyAtFkEYLlq0t3S3xBxxHWuvIf0\nqVxVNYpQWyM3N9RIeYBR/euXKJXileSHk/uq1I5wTC0XBIHWcthczGN0m9wBEiWS\n0m3cnPk4q0Ea8mUJ91Rqob19qETz6VbSPYYpZk3qOycjKosuwcuzoMpwU8KRiMFd\n5LHtX0Hx85ghGsWDVtS0c0+aJa4lOMGvJCAOvDfqvODv7gKlCXUpgumGpLdTmaZ8\n1RwqspAe3IqBcdKTqRD4m2mSg23nVx2FAY3cjFvZQtfooT7q1ItRV5RgH6FhQSl7\n+6YIMJ1Bf8AAlLdRLpg+doOUGcEn+pkDiHFgI8ylH1LKyFKw+eXaAml/7DaWZk1d\ndqggwhXOhc/UUZFQuQQ8A8zpA13PcbC05XxN2hyP93tCEtyynMLVPtrRwDnHxFKa\nqKzs3rMDXPSXRn3ZZTdKH3069ApkEjQdpcwUh+EmJ1Ve/5cdtzT6kKWCjKBFZP/s\n91MlRrX2BTRdHaU5QJkUheUtakwxuHrdah2F94lRmsnQlpPr2YseJu6sIE+Dnx4M\nCfhdVbQL2w54R645nlnohu8CAwEAAQ== +616adfeb:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq0BFD1D4lIxQcsqEpQzU\npNCYM3aP1V/fxxVdT4DWvSI53JHTwHQamKdMWtEXetWVbP5zSROniYKFXd/xrD9X\n0jiGHey3lEtylXRIPxe5s+wXoCmNLcJVnvTcDtwx/ne2NLHxp76lyc25At+6RgE6\nADjLVuoD7M4IFDkAsd8UQ8zM0Dww9SylIk/wgV3ZkifecvgUQRagrNUdUjR56EBZ\nraQrev4hhzOgwelT0kXCu3snbUuNY/lU53CoTzfBJ5UfEJ5pMw1ij6X0r5S9IVsy\nKLWH1hiO0NzU2c8ViUYCly4Fe9xMTFc6u2dy/dxf6FwERfGzETQxqZvSfrRX+GLj\n/QZAXiPg5178hT/m0Y3z5IGenIC/80Z9NCi+byF1WuJlzKjDcF/TU72zk0+PNM/H\nKuppf3JT4DyjiVzNC5YoWJT2QRMS9KLP5iKCSThwVceEEg5HfhQBRT9M6KIcFLSs\nmFjx9kNEEmc1E8hl5IR3+3Ry8G5/bTIIruz14jgeY9u5jhL8Vyyvo41jgt9sLHR1\n/J1TxKfkgksYev7PoX6/ZzJ1ksWKZY5NFoDXTNYUgzFUTOoEaOg3BAQKadb3Qbbq\nXIrxmPBdgrn9QI7NCgfnAY3Tb4EEjs3ON/BNyEhUENcXOH6I1NbcuBQ7g9P73kE4\nVORdoc8MdJ5eoKBpO8Ww8HECAwEAAQ== +616ae350:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyduVzi1mWm+lYo2Tqt/0\nXkCIWrDNP1QBMVPrE0/ZlU2bCGSoo2Z9FHQKz/mTyMRlhNqTfhJ5qU3U9XlyGOPJ\npiM+b91g26pnpXJ2Q2kOypSgOMOPA4cQ42PkHBEqhuzssfj9t7x47ppS94bboh46\nxLSDRff/NAbtwTpvhStV3URYkxFG++cKGGa5MPXBrxIp+iZf9GnuxVdST5PGiVGP\nODL/b69sPJQNbJHVquqUTOh5Ry8uuD2WZuXfKf7/C0jC/ie9m2+0CttNu9tMciGM\nEyKG1/Xhk5iIWO43m4SrrT2WkFlcZ1z2JSf9Pjm4C2+HovYpihwwdM/OdP8Xmsnr\nDzVB4YvQiW+IHBjStHVuyiZWc+JsgEPJzisNY0Wyc/kNyNtqVKpX6dRhMLanLmy+\nf53cCSI05KPQAcGj6tdL+D60uKDkt+FsDa0BTAobZ31OsFVid0vCXtsbplNhW1IF\nHwsGXBTVcfXg44RLyL8Lk/2dQxDHNHzAUslJXzPxaHBLmt++2COa2EI1iWlvtznk\nOk9WP8SOAIj+xdqoiHcC4j72BOVVgiITIJNHrbppZCq6qPR+fgXmXa+sDcGh30m6\n9Wpbr28kLMSHiENCWTdsFij+NQTd5S47H7XTROHnalYDuF1RpS+DpQidT5tUimaT\nJZDr++FjKrnnijbyNF8b98UCAwEAAQ== +616db30d:MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnpUpyWDWjlUk3smlWeA0\nlIMW+oJ38t92CRLHH3IqRhyECBRW0d0aRGtq7TY8PmxjjvBZrxTNDpJT6KUk4LRm\na6A6IuAI7QnNK8SJqM0DLzlpygd7GJf8ZL9SoHSH+gFsYF67Cpooz/YDqWrlN7Vw\ntO00s0B+eXy+PCXYU7VSfuWFGK8TGEv6HfGMALLjhqMManyvfp8hz3ubN1rK3c8C\nUS/ilRh1qckdbtPvoDPhSbTDmfU1g/EfRSIEXBrIMLg9ka/XB9PvWRrekrppnQzP\nhP9YE3x/wbFc5QqQWiRCYyQl/rgIMOXvIxhkfe8H5n1Et4VAorkpEAXdsfN8KSVv\nLSMazVlLp9GYq5SUpqYX3KnxdWBgN7BJoZ4sltsTpHQ/34SXWfu3UmyUveWj7wp0\nx9hwsPirVI00EEea9AbP7NM2rAyu6ukcm4m6ATd2DZJIViq2es6m60AE6SMCmrQF\nwmk4H/kdQgeAELVfGOm2VyJ3z69fQuywz7xu27S6zTKi05Qlnohxol4wVb6OB7qG\nLPRtK9ObgzRo/OPumyXqlzAi/Yvyd1ZQk8labZps3e16bQp8+pVPiumWioMFJDWV\nGZjCmyMSU8V6MB6njbgLHoyg2LCukCAeSjbPGGGYhnKLm1AKSoJh3IpZuqcKCk5C\n8CM1S15HxV78s9dFntEqIokCAwEAAQ== +' +__Keyring= +__SkipSigCheck=0 __UseMirror=0 __UnprocessedBuildArgs= while :; do - if [ $# -le 0 ]; then + if [[ "$#" -le 0 ]]; then break fi - lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" + lowerI="$(echo "$1" | tr "[:upper:]" "[:lower:]")" case $lowerI in - -?|-h|--help) + -\?|-h|--help) usage exit 1 ;; @@ -104,6 +155,8 @@ while :; do __UbuntuArch=arm64 __AlpineArch=aarch64 __QEMUArch=aarch64 + __FreeBSDArch=arm64 + __FreeBSDMachineArch=aarch64 ;; armel) __BuildArch=armel @@ -111,129 +164,211 @@ while :; do __UbuntuRepo="http://ftp.debian.org/debian/" __CodeName=jessie ;; + armv6) + __BuildArch=armv6 + __UbuntuArch=armhf + __QEMUArch=arm + __UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/" + __CodeName=buster + __LLDB_Package="liblldb-6.0-dev" + + if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then + __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg" + fi + ;; + riscv64) + __BuildArch=riscv64 + __AlpineArch=riscv64 + __AlpinePackages="${__AlpinePackages// lldb-dev/}" + __QEMUArch=riscv64 + __UbuntuArch=riscv64 + __UbuntuRepo="http://deb.debian.org/debian-ports" + __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" + unset __LLDB_Package + + if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then + __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring" + fi + ;; + ppc64le) + __BuildArch=ppc64le + __AlpineArch=ppc64le + __QEMUArch=ppc64le + __UbuntuArch=ppc64el + __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/" + __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp5/}" + unset __LLDB_Package + ;; s390x) __BuildArch=s390x + __AlpineArch=s390x + __QEMUArch=s390x __UbuntuArch=s390x __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/" - __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//') - __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//') - __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//') + __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp-dev/}" + __UbuntuPackages="${__UbuntuPackages// libomp5/}" unset __LLDB_Package ;; + x64) + __BuildArch=x64 + __AlpineArch=x86_64 + __UbuntuArch=amd64 + __FreeBSDArch=amd64 + __FreeBSDMachineArch=amd64 + __illumosArch=x86_64 + __HaikuArch=x86_64 + __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" + ;; x86) __BuildArch=x86 __UbuntuArch=i386 + __AlpineArch=x86 __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" ;; - lldb3.6) - __LLDB_Package="lldb-3.6-dev" - ;; - lldb3.8) - __LLDB_Package="lldb-3.8-dev" - ;; - lldb3.9) - __LLDB_Package="liblldb-3.9-dev" - ;; - lldb4.0) - __LLDB_Package="liblldb-4.0-dev" - ;; - lldb5.0) - __LLDB_Package="liblldb-5.0-dev" - ;; - lldb6.0) - __LLDB_Package="liblldb-6.0-dev" + lldb*) + version="${lowerI/lldb/}" + parts=(${version//./ }) + + # for versions > 6.0, lldb has dropped the minor version + if [[ "${parts[0]}" -gt 6 ]]; then + version="${parts[0]}" + fi + + __LLDB_Package="liblldb-${version}-dev" ;; no-lldb) unset __LLDB_Package ;; + llvm*) + version="${lowerI/llvm/}" + parts=(${version//./ }) + __LLVM_MajorVersion="${parts[0]}" + __LLVM_MinorVersion="${parts[1]}" + + # for versions > 6.0, llvm has dropped the minor version + if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then + __LLVM_MinorVersion=0; + fi + ;; xenial) # Ubuntu 16.04 - if [ "$__CodeName" != "jessie" ]; then + if [[ "$__CodeName" != "jessie" ]]; then __CodeName=xenial fi ;; zesty) # Ubuntu 17.04 - if [ "$__CodeName" != "jessie" ]; then + if [[ "$__CodeName" != "jessie" ]]; then __CodeName=zesty fi ;; bionic) # Ubuntu 18.04 - if [ "$__CodeName" != "jessie" ]; then + if [[ "$__CodeName" != "jessie" ]]; then __CodeName=bionic fi ;; + focal) # Ubuntu 20.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=focal + fi + ;; + jammy) # Ubuntu 22.04 + if [[ "$__CodeName" != "jessie" ]]; then + __CodeName=jammy + fi + ;; jessie) # Debian 8 __CodeName=jessie - __UbuntuRepo="http://ftp.debian.org/debian/" + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi ;; stretch) # Debian 9 __CodeName=stretch - __UbuntuRepo="http://ftp.debian.org/debian/" __LLDB_Package="liblldb-6.0-dev" + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi ;; buster) # Debian 10 __CodeName=buster - __UbuntuRepo="http://ftp.debian.org/debian/" __LLDB_Package="liblldb-6.0-dev" + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi + ;; + bullseye) # Debian 11 + __CodeName=bullseye + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi + ;; + sid) # Debian sid + __CodeName=sid + + if [[ -z "$__UbuntuRepo" ]]; then + __UbuntuRepo="http://ftp.debian.org/debian/" + fi ;; tizen) - if [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then - echo "Tizen is available only for armel and arm64." - usage; - exit 1; - fi __CodeName= __UbuntuRepo= __Tizen=tizen ;; - alpine|alpine3.9) + alpine*) __CodeName=alpine __UbuntuRepo= - __AlpineVersion=3.9 - __AlpinePackagesEdgeMain+=" llvm11-libs" - __AlpinePackagesEdgeMain+=" clang-libs" + version="${lowerI/alpine/}" + + if [[ "$version" == "edge" ]]; then + __AlpineVersion=edge + else + parts=(${version//./ }) + __AlpineMajorVersion="${parts[0]}" + __AlpineMinoVersion="${parts[1]}" + __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion" + fi ;; - alpine3.13) - __CodeName=alpine - __UbuntuRepo= - __AlpineVersion=3.13 - # Alpine 3.13 has all the packages we need in the 3.13 repository - __AlpinePackages+=$__AlpinePackagesEdgeCommunity - __AlpinePackagesEdgeCommunity= - __AlpinePackages+=$__AlpinePackagesEdgeMain - __AlpinePackagesEdgeMain= - __AlpinePackages+=" llvm10-libs" - ;; - freebsd11) - __FreeBSDBase="11.3-RELEASE" - __FreeBSDABI="11" - ;& freebsd12) __CodeName=freebsd - __BuildArch=x64 __SkipUnmount=1 ;; freebsd13) __CodeName=freebsd - __FreeBSDBase="13.0-RELEASE" + __FreeBSDBase="13.2-RELEASE" __FreeBSDABI="13" - __BuildArch=x64 __SkipUnmount=1 ;; illumos) __CodeName=illumos - __BuildArch=x64 + __SkipUnmount=1 + ;; + haiku) + __CodeName=haiku __SkipUnmount=1 ;; --skipunmount) __SkipUnmount=1 ;; + --skipsigcheck) + __SkipSigCheck=1 + ;; --rootfsdir|-rootfsdir) shift - __RootfsDir=$1 + __RootfsDir="$1" ;; --use-mirror) __UseMirror=1 ;; + --use-jobs) + shift + MAXJOBS=$1 + ;; *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" ;; @@ -242,85 +377,154 @@ while :; do shift done -if [ "$__BuildArch" == "armel" ]; then +case "$__AlpineVersion" in + 3.14) __AlpinePackages+=" llvm11-libs" ;; + 3.15) __AlpinePackages+=" llvm12-libs" ;; + 3.16) __AlpinePackages+=" llvm13-libs" ;; + 3.17) __AlpinePackages+=" llvm15-libs" ;; + edge) __AlpineLlvmLibsLookup=1 ;; + *) + if [[ "$__AlpineArch" =~ s390x|ppc64le ]]; then + __AlpineVersion=3.15 # minimum version that supports lldb-dev + __AlpinePackages+=" llvm12-libs" + elif [[ "$__AlpineArch" == "x86" ]]; then + __AlpineVersion=3.17 # minimum version that supports lldb-dev + __AlpinePackages+=" llvm15-libs" + elif [[ "$__AlpineArch" == "riscv64" ]]; then + __AlpineLlvmLibsLookup=1 + __AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive) + else + __AlpineVersion=3.13 # 3.13 to maximize compatibility + __AlpinePackages+=" llvm10-libs" + + if [[ "$__AlpineArch" == "armv7" ]]; then + __AlpinePackages="${__AlpinePackages//numactl-dev/}" + fi + fi +esac + +if [[ "$__AlpineVersion" =~ 3\.1[345] ]]; then + # compiler-rt--static was merged in compiler-rt package in alpine 3.16 + # for older versions, we need compiler-rt--static, so replace the name + __AlpinePackages="${__AlpinePackages/compiler-rt/compiler-rt-static}" +fi + +if [[ "$__BuildArch" == "armel" ]]; then __LLDB_Package="lldb-3.5-dev" fi -__UbuntuPackages+=" ${__LLDB_Package:-}" -if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then - __RootfsDir=$ROOTFS_DIR +if [[ "$__CodeName" == "xenial" && "$__UbuntuArch" == "armhf" ]]; then + # libnuma-dev is not available on armhf for xenial + __UbuntuPackages="${__UbuntuPackages//libnuma-dev/}" fi -if [ -z "$__RootfsDir" ]; then +__UbuntuPackages+=" ${__LLDB_Package:-}" + +if [[ -n "$__LLVM_MajorVersion" ]]; then + __UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev" +fi + +if [[ -z "$__RootfsDir" && -n "$ROOTFS_DIR" ]]; then + __RootfsDir="$ROOTFS_DIR" +fi + +if [[ -z "$__RootfsDir" ]]; then __RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch" fi -if [ -d "$__RootfsDir" ]; then - if [ $__SkipUnmount == 0 ]; then - umount $__RootfsDir/* || true +if [[ -d "$__RootfsDir" ]]; then + if [[ "$__SkipUnmount" == "0" ]]; then + umount "$__RootfsDir"/* || true fi - rm -rf $__RootfsDir + rm -rf "$__RootfsDir" fi -mkdir -p $__RootfsDir +mkdir -p "$__RootfsDir" __RootfsDir="$( cd "$__RootfsDir" && pwd )" if [[ "$__CodeName" == "alpine" ]]; then - __ApkToolsVersion=2.9.1 - __ApkToolsDir=$(mktemp -d) - wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir - tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir - mkdir -p $__RootfsDir/usr/bin - cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin + __ApkToolsVersion=2.12.11 + __ApkToolsSHA512SUM=53e57b49230da07ef44ee0765b9592580308c407a8d4da7125550957bb72cb59638e04f8892a18b584451c8d841d1c7cb0f0ab680cc323a3015776affaa3be33 + __ApkToolsDir="$(mktemp -d)" + __ApkKeysDir="$(mktemp -d)" - $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ - -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \ - -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \ - -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ - add $__AlpinePackages + wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir" + echo "$__ApkToolsSHA512SUM $__ApkToolsDir/apk.static" | sha512sum -c + chmod +x "$__ApkToolsDir/apk.static" - if [[ -n "$__AlpinePackagesEdgeMain" ]]; then - $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/main \ - -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ - add $__AlpinePackagesEdgeMain + if [[ -f "/usr/bin/qemu-$__QEMUArch-static" ]]; then + mkdir -p "$__RootfsDir"/usr/bin + cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin" fi - if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then - $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ - -X http://dl-cdn.alpinelinux.org/alpine/edge/community \ - -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ - add $__AlpinePackagesEdgeCommunity + if [[ "$__AlpineVersion" == "edge" ]]; then + version=edge + else + version="v$__AlpineVersion" fi - rm -r $__ApkToolsDir + for line in $__AlpineKeys; do + id="${line%%:*}" + content="${line#*:}" + + echo -e "-----BEGIN PUBLIC KEY-----\n$content\n-----END PUBLIC KEY-----" > "$__ApkKeysDir/alpine-devel@lists.alpinelinux.org-$id.rsa.pub" + done + + if [[ "$__SkipSigCheck" == "1" ]]; then + __ApkSignatureArg="--allow-untrusted" + else + __ApkSignatureArg="--keys-dir $__ApkKeysDir" + fi + + # initialize DB + "$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" --initdb add + + if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then + __AlpinePackages+=" $("$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \ + search 'llvm*-libs' | sort | tail -1 | sed 's/-[^-]*//2g')" + fi + + # install all packages in one go + "$__ApkToolsDir/apk.static" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \ + -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \ + -U $__ApkSignatureArg --root "$__RootfsDir" --arch "$__AlpineArch" \ + add $__AlpinePackages + + rm -r "$__ApkToolsDir" elif [[ "$__CodeName" == "freebsd" ]]; then - mkdir -p $__RootfsDir/usr/local/etc - JOBS="$(getconf _NPROCESSORS_ONLN)" - wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version - echo "ABI = \"FreeBSD:${__FreeBSDABI}:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf - echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf - mkdir -p $__RootfsDir/tmp + mkdir -p "$__RootfsDir"/usr/local/etc + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} + wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version + echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf + echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf + mkdir -p "$__RootfsDir"/tmp # get and build package manager - wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf - - cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg} + wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf - + cd "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}" # needed for install to succeed - mkdir -p $__RootfsDir/host/etc - ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make -j "$JOBS" && make install - rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg} + mkdir -p "$__RootfsDir"/host/etc + ./autogen.sh && ./configure --prefix="$__RootfsDir"/host && make -j "$JOBS" && make install + rm -rf "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}" # install packages we need. - INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update - INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages + INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update + INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages elif [[ "$__CodeName" == "illumos" ]]; then mkdir "$__RootfsDir/tmp" pushd "$__RootfsDir/tmp" - JOBS="$(getconf _NPROCESSORS_ONLN)" + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} echo "Downloading sysroot." wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - echo "Building binutils. Please wait.." wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf - mkdir build-binutils && cd build-binutils - ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir" + ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" make -j "$JOBS" && make install && cd .. echo "Building gcc. Please wait.." wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf - @@ -330,22 +534,27 @@ elif [[ "$__CodeName" == "illumos" ]]; then CFLAGS_FOR_TARGET="-fPIC" export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET mkdir build-gcc && cd build-gcc - ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ + ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ --with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \ --disable-libquadmath-support --disable-shared --enable-tls make -j "$JOBS" && make install && cd .. - BaseUrl=https://pkgsrc.joyent.com + BaseUrl=https://pkgsrc.smartos.org if [[ "$__UseMirror" == 1 ]]; then - BaseUrl=http://pkgsrc.smartos.skylime.net + BaseUrl=https://pkgsrc.smartos.skylime.net fi - BaseUrl="$BaseUrl"/packages/SmartOS/2020Q1/x86_64/All + BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All" + echo "Downloading manifest" + wget "$BaseUrl" echo "Downloading dependencies." read -ra array <<<"$__IllumosPackages" for package in "${array[@]}"; do - echo "Installing $package..." + echo "Installing '$package'" + # find last occurrence of package in listing and extract its name + package="$(sed -En '/.*href="('"$package"'-[0-9].*).tgz".*/h;$!d;g;s//\1/p' All)" + echo "Resolved name '$package'" wget "$BaseUrl"/"$package".tgz ar -x "$package".tgz - tar --skip-old-files -xzf "$package".tmp.tgz -C "$__RootfsDir" 2>/dev/null + tar --skip-old-files -xzf "$package".tmp.tg* -C "$__RootfsDir" 2>/dev/null done echo "Cleaning up temporary files." popd @@ -356,26 +565,82 @@ elif [[ "$__CodeName" == "illumos" ]]; then wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h -elif [[ -n $__CodeName ]]; then - qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo - cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list - chroot $__RootfsDir apt-get update - chroot $__RootfsDir apt-get -f -y install - chroot $__RootfsDir apt-get -y install $__UbuntuPackages - chroot $__RootfsDir symlinks -cr /usr - chroot $__RootfsDir apt-get clean +elif [[ "$__CodeName" == "haiku" ]]; then + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} - if [ $__SkipUnmount == 0 ]; then - umount $__RootfsDir/* || true + echo "Building Haiku sysroot for $__HaikuArch" + mkdir -p "$__RootfsDir/tmp" + pushd "$__RootfsDir/tmp" + + mkdir "$__RootfsDir/tmp/download" + + echo "Downloading Haiku package tool" + git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 $__RootfsDir/tmp/script + wget -O "$__RootfsDir/tmp/download/hosttools.zip" $($__RootfsDir/tmp/script/fetch.sh --hosttools) + unzip -o "$__RootfsDir/tmp/download/hosttools.zip" -d "$__RootfsDir/tmp/bin" + + DepotBaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg" + HpkgBaseUrl="https://eu.hpkg.haiku-os.org/haiku/master/$__HaikuArch/current" + + # Download Haiku packages + echo "Downloading Haiku packages" + read -ra array <<<"$__HaikuPackages" + for package in "${array[@]}"; do + echo "Downloading $package..." + # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60 + # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598 + hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \ + --header='Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" + wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl" + done + for package in haiku haiku_devel; do + echo "Downloading $package..." + hpkgVersion="$(wget -qO- $HpkgBaseUrl | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')" + wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg" + done + + # Set up the sysroot + echo "Setting up sysroot and extracting required packages" + mkdir -p "$__RootfsDir/boot/system" + for file in "$__RootfsDir/tmp/download/"*.hpkg; do + echo "Extracting $file..." + LD_LIBRARY_PATH="$__RootfsDir/tmp/bin" "$__RootfsDir/tmp/bin/package" extract -C "$__RootfsDir/boot/system" "$file" + done + + # Download buildtools + echo "Downloading Haiku buildtools" + wget -O "$__RootfsDir/tmp/download/buildtools.zip" $($__RootfsDir/tmp/script/fetch.sh --buildtools --arch=$__HaikuArch) + unzip -o "$__RootfsDir/tmp/download/buildtools.zip" -d "$__RootfsDir" + + # Cleaning up temporary files + echo "Cleaning up temporary files" + popd + rm -rf "$__RootfsDir/tmp" +elif [[ -n "$__CodeName" ]]; then + + if [[ "$__SkipSigCheck" == "0" ]]; then + __Keyring="$__Keyring --force-check-gpg" + fi + + debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" + cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list" + chroot "$__RootfsDir" apt-get update + chroot "$__RootfsDir" apt-get -f -y install + chroot "$__RootfsDir" apt-get -y install $__UbuntuPackages + chroot "$__RootfsDir" symlinks -cr /usr + chroot "$__RootfsDir" apt-get clean + + if [[ "$__SkipUnmount" == "0" ]]; then + umount "$__RootfsDir"/* || true fi if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then - pushd $__RootfsDir - patch -p1 < $__CrossDir/$__BuildArch/armel.jessie.patch + pushd "$__RootfsDir" + patch -p1 < "$__CrossDir/$__BuildArch/armel.jessie.patch" popd fi elif [[ "$__Tizen" == "tizen" ]]; then - ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh + ROOTFS_DIR="$__RootfsDir" "$__CrossDir/tizen-build-rootfs.sh" "$__BuildArch" else echo "Unsupported target platform." usage; diff --git a/eng/common/cross/ppc64le/sources.list.bionic b/eng/common/cross/ppc64le/sources.list.bionic new file mode 100644 index 000000000..210955740 --- /dev/null +++ b/eng/common/cross/ppc64le/sources.list.bionic @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse diff --git a/eng/common/cross/riscv64/sources.list.sid b/eng/common/cross/riscv64/sources.list.sid new file mode 100644 index 000000000..65f730d22 --- /dev/null +++ b/eng/common/cross/riscv64/sources.list.sid @@ -0,0 +1 @@ +deb http://deb.debian.org/debian-ports sid main diff --git a/eng/common/cross/arm64/tizen-build-rootfs.sh b/eng/common/cross/tizen-build-rootfs.sh similarity index 55% rename from eng/common/cross/arm64/tizen-build-rootfs.sh rename to eng/common/cross/tizen-build-rootfs.sh index 13bfddb5e..ac84173d4 100644 --- a/eng/common/cross/arm64/tizen-build-rootfs.sh +++ b/eng/common/cross/tizen-build-rootfs.sh @@ -1,8 +1,34 @@ #!/usr/bin/env bash set -e +ARCH=$1 +LINK_ARCH=$ARCH + +case "$ARCH" in + arm) + TIZEN_ARCH="armv7hl" + ;; + armel) + TIZEN_ARCH="armv7l" + LINK_ARCH="arm" + ;; + arm64) + TIZEN_ARCH="aarch64" + ;; + x86) + TIZEN_ARCH="i686" + ;; + x64) + TIZEN_ARCH="x86_64" + LINK_ARCH="x86" + ;; + *) + echo "Unsupported architecture for tizen: $ARCH" + exit 1 +esac + __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__CrossDir/tizen" +__TIZEN_CROSSDIR="$__CrossDir/${ARCH}/tizen" if [[ -z "$ROOTFS_DIR" ]]; then echo "ROOTFS_DIR is not defined." @@ -14,7 +40,7 @@ mkdir -p $TIZEN_TMP_DIR # Download files echo ">>Start downloading files" -VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR +VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH echo "<>Start constructing Tizen rootfs" @@ -30,6 +56,6 @@ rm -rf $TIZEN_TMP_DIR # Configure Tizen rootfs echo ">>Start configuring Tizen rootfs" -ln -sfn asm-arm64 ./usr/include/asm +ln -sfn asm-${LINK_ARCH} ./usr/include/asm patch -p1 < $__TIZEN_CROSSDIR/tizen.patch echo "</dev/null; then + VERBOSE=0 +fi + +Log() +{ + if [ $VERBOSE -ge $1 ]; then + echo ${@:2} + fi +} + +Inform() +{ + Log 1 -e "\x1B[0;34m$@\x1B[m" +} + +Debug() +{ + Log 2 -e "\x1B[0;32m$@\x1B[m" +} + +Error() +{ + >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" +} + +Fetch() +{ + URL=$1 + FILE=$2 + PROGRESS=$3 + if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then + CURL_OPT="--progress-bar" + else + CURL_OPT="--silent" + fi + curl $CURL_OPT $URL > $FILE +} + +hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } +hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } +hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } + +TMPDIR=$1 +if [ ! -d $TMPDIR ]; then + TMPDIR=./tizen_tmp + Debug "Create temporary directory : $TMPDIR" + mkdir -p $TMPDIR +fi + +TIZEN_ARCH=$2 + +TIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen +BUILD_XML=build.xml +REPOMD_XML=repomd.xml +PRIMARY_XML=primary.xml +TARGET_URL="http://__not_initialized" + +Xpath_get() +{ + XPATH_RESULT='' + XPATH=$1 + XML_FILE=$2 + RESULT=$(xmllint --xpath $XPATH $XML_FILE) + if [[ -z ${RESULT// } ]]; then + Error "Can not find target from $XML_FILE" + Debug "Xpath = $XPATH" + exit 1 + fi + XPATH_RESULT=$RESULT +} + +fetch_tizen_pkgs_init() +{ + TARGET=$1 + PROFILE=$2 + Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" + + TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs + if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi + mkdir -p $TMP_PKG_DIR + + PKG_URL=$TIZEN_URL/$PROFILE/latest + + BUILD_XML_URL=$PKG_URL/$BUILD_XML + TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML + TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML + TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML + TMP_PRIMARYGZ=${TMP_PRIMARY}.gz + + Fetch $BUILD_XML_URL $TMP_BUILD + + Debug "fetch $BUILD_XML_URL to $TMP_BUILD" + + TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" + Xpath_get $TARGET_XPATH $TMP_BUILD + TARGET_PATH=$XPATH_RESULT + TARGET_URL=$PKG_URL/$TARGET_PATH + + REPOMD_URL=$TARGET_URL/repodata/repomd.xml + PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' + + Fetch $REPOMD_URL $TMP_REPOMD + + Debug "fetch $REPOMD_URL to $TMP_REPOMD" + + Xpath_get $PRIMARY_XPATH $TMP_REPOMD + PRIMARY_XML_PATH=$XPATH_RESULT + PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH + + Fetch $PRIMARY_URL $TMP_PRIMARYGZ + + Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" + + gunzip $TMP_PRIMARYGZ + + Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" +} + +fetch_tizen_pkgs() +{ + ARCH=$1 + PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' + + PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' + + for pkg in ${@:2} + do + Inform "Fetching... $pkg" + XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + PKG_PATH=$XPATH_RESULT + + XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + CHECKSUM=$XPATH_RESULT + + PKG_URL=$TARGET_URL/$PKG_PATH + PKG_FILE=$(basename $PKG_PATH) + PKG_PATH=$TMPDIR/$PKG_FILE + + Debug "Download $PKG_URL to $PKG_PATH" + Fetch $PKG_URL $PKG_PATH true + + echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null + if [ $? -ne 0 ]; then + Error "Fail to fetch $PKG_URL to $PKG_PATH" + Debug "Checksum = $CHECKSUM" + exit 1 + fi + done +} + +Inform "Initialize ${TIZEN_ARCH} base" +fetch_tizen_pkgs_init standard Tizen-Base +Inform "fetch common packages" +fetch_tizen_pkgs ${TIZEN_ARCH} gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils +Inform "fetch coreclr packages" +fetch_tizen_pkgs ${TIZEN_ARCH} lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu +Inform "fetch corefx packages" +fetch_tizen_pkgs ${TIZEN_ARCH} libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel + +Inform "Initialize standard unified" +fetch_tizen_pkgs_init standard Tizen-Unified +Inform "fetch corefx packages" +fetch_tizen_pkgs ${TIZEN_ARCH} gssdp gssdp-devel tizen-release + diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 51f30e53d..0998e875e 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -6,25 +6,31 @@ unset(FREEBSD) unset(ILLUMOS) unset(ANDROID) unset(TIZEN) +unset(HAIKU) set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) set(CMAKE_SYSTEM_NAME FreeBSD) + set(FREEBSD 1) elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc) set(CMAKE_SYSTEM_NAME SunOS) set(ILLUMOS 1) +elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h) + set(CMAKE_SYSTEM_NAME Haiku) + set(HAIKU 1) else() set(CMAKE_SYSTEM_NAME Linux) + set(LINUX 1) endif() set(CMAKE_SYSTEM_VERSION 1) -if(TARGET_ARCH_NAME STREQUAL "armel") - set(CMAKE_SYSTEM_PROCESSOR armv7l) - set(TOOLCHAIN "arm-linux-gnueabi") - if("$ENV{__DistroRid}" MATCHES "tizen.*") - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") - endif() -elseif(TARGET_ARCH_NAME STREQUAL "arm") +if(EXISTS ${CROSS_ROOTFS}/etc/tizen-release) + set(TIZEN 1) +elseif(EXISTS ${CROSS_ROOTFS}/android_platform) + set(ANDROID 1) +endif() + +if(TARGET_ARCH_NAME STREQUAL "arm") set(CMAKE_SYSTEM_PROCESSOR armv7l) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf) set(TOOLCHAIN "armv7-alpine-linux-musleabihf") @@ -33,30 +39,83 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm") else() set(TOOLCHAIN "arm-linux-gnueabihf") endif() + if(TIZEN) + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) set(TOOLCHAIN "aarch64-alpine-linux-musl") - else() + elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") + if(TIZEN) + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + endif() + elseif(FREEBSD) + set(triple "aarch64-unknown-freebsd12") endif() - if("$ENV{__DistroRid}" MATCHES "tizen.*") - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") +elseif(TARGET_ARCH_NAME STREQUAL "armel") + set(CMAKE_SYSTEM_PROCESSOR armv7l) + set(TOOLCHAIN "arm-linux-gnueabi") + if(TIZEN) + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "armv6") + set(CMAKE_SYSTEM_PROCESSOR armv6l) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf) + set(TOOLCHAIN "armv6-alpine-linux-musleabihf") + else() + set(TOOLCHAIN "arm-linux-gnueabihf") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") + set(CMAKE_SYSTEM_PROCESSOR ppc64le) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl) + set(TOOLCHAIN "powerpc64le-alpine-linux-musl") + else() + set(TOOLCHAIN "powerpc64le-linux-gnu") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "riscv64") + set(CMAKE_SYSTEM_PROCESSOR riscv64) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl) + set(TOOLCHAIN "riscv64-alpine-linux-musl") + else() + set(TOOLCHAIN "riscv64-linux-gnu") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") set(CMAKE_SYSTEM_PROCESSOR s390x) - set(TOOLCHAIN "s390x-linux-gnu") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl) + set(TOOLCHAIN "s390x-alpine-linux-musl") + else() + set(TOOLCHAIN "s390x-linux-gnu") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "x64") + set(CMAKE_SYSTEM_PROCESSOR x86_64) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl) + set(TOOLCHAIN "x86_64-alpine-linux-musl") + elseif(LINUX) + set(TOOLCHAIN "x86_64-linux-gnu") + if(TIZEN) + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + endif() + elseif(FREEBSD) + set(triple "x86_64-unknown-freebsd12") + elseif(ILLUMOS) + set(TOOLCHAIN "x86_64-illumos") + elseif(HAIKU) + set(TOOLCHAIN "x86_64-unknown-haiku") + endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) - set(TOOLCHAIN "i686-linux-gnu") -elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(CMAKE_SYSTEM_PROCESSOR "x86_64") - set(triple "x86_64-unknown-freebsd11") -elseif (ILLUMOS) - set(CMAKE_SYSTEM_PROCESSOR "x86_64") - set(TOOLCHAIN "x86_64-illumos") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + set(TOOLCHAIN "i586-alpine-linux-musl") + else() + set(TOOLCHAIN "i686-linux-gnu") + endif() + if(TIZEN) + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + endif() else() - message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64, s390x and x86 are supported!") + message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") endif() if(DEFINED ENV{TOOLCHAIN}) @@ -64,7 +123,11 @@ if(DEFINED ENV{TOOLCHAIN}) endif() # Specify include paths -if(DEFINED TIZEN_TOOLCHAIN) +if(TIZEN) + if(TARGET_ARCH_NAME STREQUAL "arm") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) + endif() if(TARGET_ARCH_NAME STREQUAL "armel") include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) @@ -73,9 +136,17 @@ if(DEFINED TIZEN_TOOLCHAIN) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) endif() + if(TARGET_ARCH_NAME STREQUAL "x86") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) + endif() + if(TARGET_ARCH_NAME STREQUAL "x64") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) + endif() endif() -if("$ENV{__DistroRid}" MATCHES "android.*") +if(ANDROID) if(TARGET_ARCH_NAME STREQUAL "arm") set(ANDROID_ABI armeabi-v7a) elseif(TARGET_ARCH_NAME STREQUAL "arm64") @@ -83,7 +154,9 @@ if("$ENV{__DistroRid}" MATCHES "android.*") endif() # extract platform number required by the NDK's toolchain - string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "$ENV{__DistroRid}") + file(READ "${CROSS_ROOTFS}/android_platform" RID_FILE_CONTENTS) + string(REPLACE "RID=" "" ANDROID_RID "${RID_FILE_CONTENTS}") + string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "${ANDROID_RID}") set(ANDROID_TOOLCHAIN clang) set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository @@ -92,12 +165,15 @@ if("$ENV{__DistroRid}" MATCHES "android.*") # include official NDK toolchain script include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake) -elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") +elseif(FREEBSD) # we cross-compile by instructing clang set(CMAKE_C_COMPILER_TARGET ${triple}) set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld") elseif(ILLUMOS) set(CMAKE_SYSROOT "${CROSS_ROOTFS}") @@ -129,6 +205,39 @@ elseif(ILLUMOS) set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") +elseif(HAIKU) + set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin") + + set(TOOLSET_PREFIX ${TOOLCHAIN}-) + function(locate_toolchain_exec exec var) + string(TOUPPER ${exec} EXEC_UPPERCASE) + if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") + set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) + return() + endif() + + find_program(EXEC_LOCATION_${exec} + NAMES + "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" + "${TOOLSET_PREFIX}${exec}") + + if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") + message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") + endif() + set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) + endfunction() + + set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") + + locate_toolchain_exec(gcc CMAKE_C_COMPILER) + locate_toolchain_exec(g++ CMAKE_CXX_COMPILER) + + set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") + set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") + + # let CMake set up the correct search paths + include(Platform/Haiku) else() set(CMAKE_SYSROOT "${CROSS_ROOTFS}") @@ -149,20 +258,20 @@ function(add_toolchain_linker_flag Flag) set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE) endfunction() -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(LINUX) add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}") endif() -if(TARGET_ARCH_NAME STREQUAL "armel") - if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only +if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") + if(TIZEN) add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") endif() -elseif(TARGET_ARCH_NAME STREQUAL "arm64") - if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only +elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$") + if(TIZEN) add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") @@ -173,15 +282,28 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + add_toolchain_linker_flag("--target=${TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}") + endif() add_toolchain_linker_flag(-m32) + if(TIZEN) + add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib") +elseif(HAIKU) + add_toolchain_linker_flag("-lnetwork") + add_toolchain_linker_flag("-lroot") endif() # Specify compile options -if((TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|s390x)$" AND NOT "$ENV{__DistroRid}" MATCHES "android.*") OR ILLUMOS) +if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) @@ -200,16 +322,22 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY}) + # persist variables across multiple try_compile passes + list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CLR_ARM_FPU_TYPE CLR_ARM_FPU_CAPABILITY) + if(TARGET_ARCH_NAME STREQUAL "armel") add_compile_options(-mfloat-abi=softfp) endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) + add_compile_options(--target=${TOOLCHAIN}) + endif() add_compile_options(-m32) add_compile_options(-Wno-error=unused-command-line-argument) endif() -if(DEFINED TIZEN_TOOLCHAIN) - if(TARGET_ARCH_NAME MATCHES "^(armel|arm64)$") +if(TIZEN) + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|x86)$") add_compile_options(-Wno-deprecated-declarations) # compile-time option add_compile_options(-D__extern_always_inline=inline) # compile-time option endif() diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index 4e4116f1d..c305ae6bd 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -53,7 +53,7 @@ fi function InstallDarcCli { local darc_cli_package_name="microsoft.dotnet.darc" - InitializeDotNetCli + InitializeDotNetCli true local dotnet_root=$_InitializeDotNetCli if [ -z "$toolpath" ]; then diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index b09ea669f..7e69e3a9e 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -54,6 +54,13 @@ cpuname=$(uname -m) case $cpuname in arm64|aarch64) buildarch=arm64 + if [ "$(getconf LONG_BIT)" -lt 64 ]; then + # This is 32-bit OS running on 64-bit CPU (for example Raspberry Pi OS) + buildarch=arm + fi + ;; + loongarch64) + buildarch=loongarch64 ;; amd64|x86_64) buildarch=x64 diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index 25e97ac00..524aaa57f 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -10,9 +10,7 @@ Param( Set-StrictMode -Version 2.0 $ErrorActionPreference = "Stop" -. $PSScriptRoot\tools.ps1 - -Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') +. $PSScriptRoot\pipeline-logging-functions.ps1 $exclusionsFilePath = "$SourcesDirectory\eng\Localize\LocExclusions.json" $exclusions = @{ Exclusions = @() } @@ -28,13 +26,34 @@ $jsonFiles = @() $jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern $jsonTemplateFiles | ForEach-Object { $null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json - + $destinationFile = "$($_.Directory.FullName)\$($Matches.1).json" $jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru } $jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern +$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them +if (-not $wxlFiles) { + $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files + if ($wxlEnFiles) { + $wxlFiles = @() + $wxlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } + } +} + +$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html$" } # add installer HTML files +$macosHtmlFiles = @() +if ($macosHtmlEnFiles) { + $macosHtmlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru + } +} + $xlfFiles = @() $allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf" @@ -46,7 +65,7 @@ if ($allXlfFiles) { } $langXlfFiles | ForEach-Object { $null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf - + $destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf" $xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru } @@ -59,10 +78,10 @@ $locJson = @{ LanguageSet = $LanguageSet LocItems = @( $locFiles | ForEach-Object { - $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" + $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { - if ($outputPath.Contains($exclusion)) + if ($_.FullName.Contains($exclusion)) { $continue = $false } @@ -79,8 +98,7 @@ $locJson = @{ CopyOption = "LangIDOnPath" OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\" } - } - else { + } else { return @{ SourceFile = $sourceFile CopyOption = "LangIDOnName" @@ -90,6 +108,60 @@ $locJson = @{ } } ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "WiX_CloneLanguages" + LssFiles = @( "wxl_loc.lss" ) + LocItems = @( + $wxlFiles | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if ($continue) + { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath + } + } + } + ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "VS_macOS_CloneLanguages" + LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" ) + LocItems = @( + $macosHtmlFiles | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + $lciFile = $sourceFile + ".lci" + if ($continue) { + $result = @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath + } + if (Test-Path $lciFile -PathType Leaf) { + $result["LciFile"] = $lciFile + } + return $result + } + } + ) } ) } @@ -108,10 +180,10 @@ else { if ((Get-FileHash "$SourcesDirectory\eng\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\eng\Localize\LocProject.json").Hash) { Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them." - + exit 1 } else { Write-Host "Generated LocProject.json and current LocProject.json are identical." } -} \ No newline at end of file +} diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 6c7a851a8..27ccdb9ec 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -83,7 +83,8 @@ try { Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue if ($NativeTools) { if ($PathPromotion -eq $True) { - if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build + $ArcadeToolsDirectory = "$env:SYSTEMDRIVE\arcade-tools" + if (Test-Path $ArcadeToolsDirectory) { # if this directory exists, we should use native tools on machine $NativeTools.PSObject.Properties | ForEach-Object { $ToolName = $_.Name $ToolVersion = $_.Value @@ -93,16 +94,12 @@ try { if ($ToolVersion -eq "latest") { $ToolVersion = "" } - $ArcadeToolsDirectory = "C:\arcade-tools" - if (-not (Test-Path $ArcadeToolsDirectory)) { - Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed." - exit 1 - } - $ToolDirectory = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)[0] - if ([string]::IsNullOrWhiteSpace($ToolDirectory)) { + $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending) + if ($ToolDirectories -eq $null) { Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image." exit 1 } + $ToolDirectory = $ToolDirectories[0] $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt" if (-not (Test-Path -Path "$BinPathFile")) { Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool." @@ -124,6 +121,7 @@ try { if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) { Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding." + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "If this is running on a build machine, the arcade-tools directory was not found, which means there's an error with the image." } } exit 0 @@ -202,4 +200,4 @@ catch { Write-Host $_.ScriptStackTrace Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ ExitWithExitCode 1 -} \ No newline at end of file +} diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss new file mode 100644 index 000000000..5d892d619 --- /dev/null +++ b/eng/common/loc/P22DotNetHtmlLocalization.lss @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1 index eea19cd84..f041e5ddd 100644 --- a/eng/common/msbuild.ps1 +++ b/eng/common/msbuild.ps1 @@ -6,6 +6,7 @@ Param( [switch] $ci, [switch] $prepareMachine, [switch] $excludePrereleaseVS, + [string] $msbuildEngine = $null, [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs ) diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1 index adf707c8f..ca38268c4 100644 --- a/eng/common/native/CommonLibrary.psm1 +++ b/eng/common/native/CommonLibrary.psm1 @@ -276,7 +276,8 @@ function Get-MachineArchitecture { } if (($ProcessorArchitecture -Eq "AMD64") -Or ($ProcessorArchitecture -Eq "IA64") -Or - ($ProcessorArchitecture -Eq "ARM64")) { + ($ProcessorArchitecture -Eq "ARM64") -Or + ($ProcessorArchitecture -Eq "LOONGARCH64")) { return "x64" } return "x86" diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/find-native-compiler.sh deleted file mode 100644 index aed19d07d..000000000 --- a/eng/common/native/find-native-compiler.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env bash -# -# This file locates the native compiler with the given name and version and sets the environment variables to locate it. -# - -source="${BASH_SOURCE[0]}" - -# resolve $SOURCE until the file is no longer a symlink -while [[ -h $source ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -if [ $# -lt 0 ] -then - echo "Usage..." - echo "find-native-compiler.sh " - echo "Specify the name of compiler (clang or gcc)." - echo "Specify the major version of compiler." - echo "Specify the minor version of compiler." - exit 1 -fi - -. $scriptroot/../pipeline-logging-functions.sh - -compiler="$1" -cxxCompiler="$compiler++" -majorVersion="$2" -minorVersion="$3" - -if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi - -check_version_exists() { - desired_version=-1 - - # Set up the environment to be used for building with the desired compiler. - if command -v "$compiler-$1.$2" > /dev/null; then - desired_version="-$1.$2" - elif command -v "$compiler$1$2" > /dev/null; then - desired_version="$1$2" - elif command -v "$compiler-$1$2" > /dev/null; then - desired_version="-$1$2" - fi - - echo "$desired_version" -} - -if [ -z "$CLR_CC" ]; then - - # Set default versions - if [ -z "$majorVersion" ]; then - # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) - elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi - - for version in "${versions[@]}"; do - parts=(${version//./ }) - desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")" - if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi - done - - if [ -z "$majorVersion" ]; then - if command -v "$compiler" > /dev/null; then - if [ "$(uname)" != "Darwin" ]; then - Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH." - fi - export CC="$(command -v "$compiler")" - export CXX="$(command -v "$cxxCompiler")" - else - Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found." - exit 1 - fi - else - if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then - if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then - if command -v "$compiler" > /dev/null; then - Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH." - export CC="$(command -v "$compiler")" - export CXX="$(command -v "$cxxCompiler")" - else - Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." - exit 1 - fi - fi - fi - fi - else - desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" - if [ "$desired_version" = "-1" ]; then - Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion." - exit 1 - fi - fi - - if [ -z "$CC" ]; then - export CC="$(command -v "$compiler$desired_version")" - export CXX="$(command -v "$cxxCompiler$desired_version")" - if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi - fi -else - if [ ! -f "$CLR_CC" ]; then - Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist" - exit 1 - fi - export CC="$CLR_CC" - export CXX="$CLR_CXX" -fi - -if [ -z "$CC" ]; then - Write-PipelineTelemetryError -category "Build" "Unable to find $compiler." - exit 1 -fi - -export CCC_CC="$CC" -export CCC_CXX="$CXX" -export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh new file mode 100644 index 000000000..2d5660642 --- /dev/null +++ b/eng/common/native/init-compiler.sh @@ -0,0 +1,137 @@ +#!/bin/sh +# +# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables +# +# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here! + +if [ -z "$build_arch" ] || [ -z "$compiler" ]; then + echo "Usage..." + echo "build_arch= compiler= init-compiler.sh" + echo "Specify the target architecture." + echo "Specify the name of compiler (clang or gcc)." + exit 1 +fi + +case "$compiler" in + clang*|-clang*|--clang*) + # clangx.y or clang-x.y + version="$(echo "$compiler" | tr -d '[:alpha:]-=')" + majorVersion="${version%%.*}" + [ -z "${version##*.*}" ] && minorVersion="${version#*.}" + + if [ -z "$minorVersion" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -le 6 ]; then + minorVersion=0; + fi + compiler=clang + ;; + + gcc*|-gcc*|--gcc*) + # gccx.y or gcc-x.y + version="$(echo "$compiler" | tr -d '[:alpha:]-=')" + majorVersion="${version%%.*}" + [ -z "${version##*.*}" ] && minorVersion="${version#*.}" + compiler=gcc + ;; +esac + +cxxCompiler="$compiler++" + +# clear the existing CC and CXX from environment +CC= +CXX= +LDFLAGS= + +if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi + +check_version_exists() { + desired_version=-1 + + # Set up the environment to be used for building with the desired compiler. + if command -v "$compiler-$1.$2" > /dev/null; then + desired_version="-$1.$2" + elif command -v "$compiler$1$2" > /dev/null; then + desired_version="$1$2" + elif command -v "$compiler-$1$2" > /dev/null; then + desired_version="-$1$2" + fi + + echo "$desired_version" +} + +if [ -z "$CLR_CC" ]; then + + # Set default versions + if [ -z "$majorVersion" ]; then + # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. + if [ "$compiler" = "clang" ]; then versions="18 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" + elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi + + for version in $versions; do + _major="${version%%.*}" + [ -z "${version##*.*}" ] && _minor="${version#*.}" + desired_version="$(check_version_exists "$_major" "$_minor")" + if [ "$desired_version" != "-1" ]; then majorVersion="$_major"; break; fi + done + + if [ -z "$majorVersion" ]; then + if command -v "$compiler" > /dev/null; then + if [ "$(uname)" != "Darwin" ]; then + echo "Warning: Specific version of $compiler not found, falling back to use the one in PATH." + fi + CC="$(command -v "$compiler")" + CXX="$(command -v "$cxxCompiler")" + else + echo "No usable version of $compiler found." + exit 1 + fi + else + if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then + if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then + if command -v "$compiler" > /dev/null; then + echo "Warning: Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH." + CC="$(command -v "$compiler")" + CXX="$(command -v "$cxxCompiler")" + else + echo "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." + exit 1 + fi + fi + fi + fi + else + desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" + if [ "$desired_version" = "-1" ]; then + echo "Could not find specific version of $compiler: $majorVersion $minorVersion." + exit 1 + fi + fi + + if [ -z "$CC" ]; then + CC="$(command -v "$compiler$desired_version")" + CXX="$(command -v "$cxxCompiler$desired_version")" + if [ -z "$CXX" ]; then CXX="$(command -v "$cxxCompiler")"; fi + fi +else + if [ ! -f "$CLR_CC" ]; then + echo "CLR_CC is set but path '$CLR_CC' does not exist" + exit 1 + fi + CC="$CLR_CC" + CXX="$CLR_CXX" +fi + +if [ -z "$CC" ]; then + echo "Unable to find $compiler." + exit 1 +fi + +# Only lld version >= 9 can be considered stable. lld doesn't support s390x. +if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then + if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then + LDFLAGS="-fuse-ld=lld" + fi +fi + +SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" + +export CC CXX LDFLAGS SCAN_BUILD_COMMAND diff --git a/eng/common/native/init-distro-rid.sh b/eng/common/native/init-distro-rid.sh new file mode 100644 index 000000000..de1687b2c --- /dev/null +++ b/eng/common/native/init-distro-rid.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env bash + +# getNonPortableDistroRid +# +# Input: +# targetOs: (str) +# targetArch: (str) +# rootfsDir: (str) +# +# Return: +# non-portable rid +getNonPortableDistroRid() +{ + local targetOs="$1" + local targetArch="$2" + local rootfsDir="$3" + local nonPortableRid="" + + if [ "$targetOs" = "linux" ]; then + if [ -e "${rootfsDir}/etc/os-release" ]; then + source "${rootfsDir}/etc/os-release" + + if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi + + if [[ "${VERSION_ID:-}" =~ ^([[:digit:]]|\.)+$ ]]; then + nonPortableRid="${ID}.${VERSION_ID}-${targetArch}" + else + # Rolling release distros either do not set VERSION_ID, set it as blank or + # set it to non-version looking string (such as TEMPLATE_VERSION_ID on ArchLinux); + # so omit it here to be consistent with everything else. + nonPortableRid="${ID}-${targetArch}" + fi + + elif [ -e "${rootfsDir}/android_platform" ]; then + source "$rootfsDir"/android_platform + nonPortableRid="$RID" + fi + fi + + if [ "$targetOs" = "freebsd" ]; then + # $rootfsDir can be empty. freebsd-version is shell script and it should always work. + __freebsd_major_version=$($rootfsDir/bin/freebsd-version | { read v; echo "${v%%.*}"; }) + nonPortableRid="freebsd.$__freebsd_major_version-${targetArch}" + elif command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then + __android_sdk_version=$(getprop ro.build.version.sdk) + nonPortableRid="android.$__android_sdk_version-${targetArch}" + elif [ "$targetOs" = "illumos" ]; then + __uname_version=$(uname -v) + case "$__uname_version" in + omnios-*) + __omnios_major_version=$(echo "${__uname_version:8:2}") + nonPortableRid=omnios."$__omnios_major_version"-"$targetArch" + ;; + joyent_*) + __smartos_major_version=$(echo "${__uname_version:7:4}") + nonPortableRid=smartos."$__smartos_major_version"-"$targetArch" + ;; + illumos_*) + nonPortableRid=openindiana-"$targetArch" + ;; + esac + elif [ "$targetOs" = "solaris" ]; then + __uname_version=$(uname -v) + __solaris_major_version=$(echo "${__uname_version%.*}") + nonPortableRid=solaris."$__solaris_major_version"-"$targetArch" + elif [ "$targetOs" = "haiku" ]; then + __uname_release=$(uname -r) + nonPortableRid=haiku.r"$__uname_release"-"$targetArch" + fi + + echo "$(echo $nonPortableRid | tr '[:upper:]' '[:lower:]')" +} + +# initDistroRidGlobal +# +# Input: +# os: (str) +# arch: (str) +# rootfsDir?: (nullable:string) +# +# Return: +# None +# +# Notes: +# +# It is important to note that the function does not return anything, but it +# exports the following variables on success: +# +# __DistroRid : Non-portable rid of the target platform. +# __PortableTargetOS : OS-part of the portable rid that corresponds to the target platform. +# +initDistroRidGlobal() +{ + local targetOs="$1" + local targetArch="$2" + local rootfsDir="" + if [ "$#" -ge 3 ]; then + rootfsDir="$3" + fi + + if [ -n "${rootfsDir}" ]; then + # We may have a cross build. Check for the existence of the rootfsDir + if [ ! -e "${rootfsDir}" ]; then + echo "Error rootfsDir has been passed, but the location is not valid." + exit 1 + fi + fi + + __DistroRid=$(getNonPortableDistroRid "${targetOs}" "${targetArch}" "${rootfsDir}") + + if [ -z "${__PortableTargetOS:-}" ]; then + __PortableTargetOS="$targetOs" + + STRINGS="$(command -v strings || true)" + if [ -z "$STRINGS" ]; then + STRINGS="$(command -v llvm-strings || true)" + fi + + # Check for musl-based distros (e.g Alpine Linux, Void Linux). + if "${rootfsDir}/usr/bin/ldd" --version 2>&1 | grep -q musl || + ( [ -n "$STRINGS" ] && "$STRINGS" "${rootfsDir}/usr/bin/ldd" 2>&1 | grep -q musl ); then + __PortableTargetOS="linux-musl" + fi + fi + + export __DistroRid __PortableTargetOS +} diff --git a/eng/common/native/init-os-and-arch.sh b/eng/common/native/init-os-and-arch.sh new file mode 100644 index 000000000..e693617a6 --- /dev/null +++ b/eng/common/native/init-os-and-arch.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +# Use uname to determine what the OS is. +OSName=$(uname -s | tr '[:upper:]' '[:lower:]') + +if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then + OSName="android" +fi + +case "$OSName" in +freebsd|linux|netbsd|openbsd|sunos|android|haiku) + os="$OSName" ;; +darwin) + os=osx ;; +*) + echo "Unsupported OS $OSName detected!" + exit 1 ;; +esac + +# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html +# and `uname -p` returns processor type (e.g. i386 on amd64). +# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html. +if [ "$os" = "sunos" ]; then + if uname -o 2>&1 | grep -q illumos; then + os="illumos" + else + os="solaris" + fi + CPUName=$(isainfo -n) +else + # For the rest of the operating systems, use uname(1) to determine what the CPU is. + CPUName=$(uname -m) +fi + +case "$CPUName" in + arm64|aarch64) + arch=arm64 + ;; + + loongarch64) + arch=loongarch64 + ;; + + riscv64) + arch=riscv64 + ;; + + amd64|x86_64) + arch=x64 + ;; + + armv7l|armv8l) + if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then + arch=armel + else + arch=arm + fi + ;; + + armv6l) + arch=armv6 + ;; + + i[3-6]86) + echo "Unsupported CPU $CPUName detected, build might not succeed!" + arch=x86 + ;; + + s390x) + arch=s390x + ;; + + ppc64le) + arch=ppc64le + ;; + *) + echo "Unknown CPU $CPUName detected!" + exit 1 + ;; +esac diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 index 5a3a32ea8..238945cb5 100644 --- a/eng/common/post-build/publish-using-darc.ps1 +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -2,7 +2,6 @@ param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, - [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, @@ -31,13 +30,13 @@ try { } & $darc add-build-to-channel ` - --id $buildId ` - --publishing-infra-version $PublishingInfraVersion ` - --default-channels ` - --source-branch main ` - --azdev-pat $AzdoToken ` - --bar-uri $MaestroApiEndPoint ` - --password $MaestroToken ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch main ` + --azdev-pat "$AzdoToken" ` + --bar-uri "$MaestroApiEndPoint" ` + --ci ` @optionalParams if ($LastExitCode -ne 0) { diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index e8ab29afe..4011d324e 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -22,6 +22,11 @@ $RetryWaitTimeInSeconds = 30 # Wait time between check for system load $SecondsBetweenLoadChecks = 10 +if (!$InputPath -or !(Test-Path $InputPath)){ + Write-Host "No files to validate." + ExitWithExitCode 0 +} + $ValidatePackage = { param( [string] $PackagePath # Full path to a Symbols.NuGet package diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index a5af041ba..cd2181baf 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -4,9 +4,11 @@ param( [Parameter(Mandatory = $true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use [Parameter(Mandatory = $false)][switch] $CheckForWindowsPdbs, # If we should check for the existence of windows pdbs in addition to portable PDBs [Parameter(Mandatory = $false)][switch] $ContinueOnError, # If we should keep checking symbols after an error - [Parameter(Mandatory = $false)][switch] $Clean # Clean extracted symbols directory after checking symbols + [Parameter(Mandatory = $false)][switch] $Clean, # Clean extracted symbols directory after checking symbols + [Parameter(Mandatory = $false)][string] $SymbolExclusionFile # Exclude the symbols in the file from publishing to symbol server ) +. $PSScriptRoot\..\tools.ps1 # Maximum number of jobs to run in parallel $MaxParallelJobs = 16 @@ -25,14 +27,28 @@ if ($CheckForWindowsPdbs) { $WindowsPdbVerificationParam = "--windows-pdbs" } +$ExclusionSet = New-Object System.Collections.Generic.HashSet[string]; + +if (!$InputPath -or !(Test-Path $InputPath)){ + Write-Host "No symbols to validate." + ExitWithExitCode 0 +} + +#Check if the path exists +if ($SymbolExclusionFile -and (Test-Path $SymbolExclusionFile)){ + [string[]]$Exclusions = Get-Content "$SymbolExclusionFile" + $Exclusions | foreach { if($_ -and $_.Trim()){$ExclusionSet.Add($_)} } +} +else{ + Write-Host "Symbol Exclusion file does not exists. No symbols to exclude." +} + $CountMissingSymbols = { param( [string] $PackagePath, # Path to a NuGet package [string] $WindowsPdbVerificationParam # If we should check for the existence of windows pdbs in addition to portable PDBs ) - . $using:PSScriptRoot\..\tools.ps1 - Add-Type -AssemblyName System.IO.Compression.FileSystem Write-Host "Validating $PackagePath " @@ -118,17 +134,17 @@ $CountMissingSymbols = { # Save the output and get diagnostic output $output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String - if (Test-Path $PdbPath) { - return 'PDB' + if ((Test-Path $PdbPath) -and (Test-path $SymbolPath)) { + return 'Module and PDB for Module' } - elseif (Test-Path $NGenPdb) { - return 'NGen PDB' + elseif ((Test-Path $NGenPdb) -and (Test-Path $PdbPath) -and (Test-Path $SymbolPath)) { + return 'Dll, PDB and NGen PDB' } - elseif (Test-Path $SODbg) { - return 'DBG for SO' + elseif ((Test-Path $SODbg) -and (Test-Path $SymbolPath)) { + return 'So and DBG for SO' } - elseif (Test-Path $DylibDwarf) { - return 'Dwarf for Dylib' + elseif ((Test-Path $DylibDwarf) -and (Test-Path $SymbolPath)) { + return 'Dylib and Dwarf for Dylib' } elseif (Test-Path $SymbolPath) { return 'Module' @@ -142,37 +158,44 @@ $CountMissingSymbols = { return $null } - $FileGuid = New-Guid - $ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid - - $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault ` - -FullPath $FileName ` - -TargetServerParam '--microsoft-symbol-server' ` - -SymbolsPath "$ExpandedSymbolsPath-msdl" ` - -WindowsPdbVerificationParam $WindowsPdbVerificationParam - $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault ` - -FullPath $FileName ` - -TargetServerParam '--internal-server' ` - -SymbolsPath "$ExpandedSymbolsPath-symweb" ` - -WindowsPdbVerificationParam $WindowsPdbVerificationParam - - Write-Host -NoNewLine "`t Checking file " $FileName "... " - - if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { - Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" + $FileRelativePath = $FileName.Replace("$ExtractPath\", "") + if (($($using:ExclusionSet) -ne $null) -and ($($using:ExclusionSet).Contains($FileRelativePath) -or ($($using:ExclusionSet).Contains($FileRelativePath.Replace("\", "/"))))){ + Write-Host "Skipping $FileName from symbol validation" } - else { - $MissingSymbols++ - if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { - Write-Host 'No symbols found on MSDL or SymWeb!' + else { + $FileGuid = New-Guid + $ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid + + $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault ` + -FullPath $FileName ` + -TargetServerParam '--microsoft-symbol-server' ` + -SymbolsPath "$ExpandedSymbolsPath-msdl" ` + -WindowsPdbVerificationParam $WindowsPdbVerificationParam + $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault ` + -FullPath $FileName ` + -TargetServerParam '--internal-server' ` + -SymbolsPath "$ExpandedSymbolsPath-symweb" ` + -WindowsPdbVerificationParam $WindowsPdbVerificationParam + + Write-Host -NoNewLine "`t Checking file " $FileName "... " + + if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { + Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" } else { - if ($SymbolsOnMSDL -eq $null) { - Write-Host 'No symbols found on MSDL!' + $MissingSymbols++ + + if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { + Write-Host 'No symbols found on MSDL or SymWeb!' } else { - Write-Host 'No symbols found on SymWeb!' + if ($SymbolsOnMSDL -eq $null) { + Write-Host 'No symbols found on MSDL!' + } + else { + Write-Host 'No symbols found on SymWeb!' + } } } } diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index b1bca63ab..73828dd30 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -64,7 +64,7 @@ try { $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty } if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "16.10.0-preview2" -MemberType NoteProperty + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.8.1-2" -MemberType NoteProperty } if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config index 0c5451c11..3849bdb3c 100644 --- a/eng/common/sdl/NuGet.config +++ b/eng/common/sdl/NuGet.config @@ -7,6 +7,11 @@ + + + + + diff --git a/eng/common/sdl/configure-sdl-tool.ps1 b/eng/common/sdl/configure-sdl-tool.ps1 index adea8e8da..27f5a4115 100644 --- a/eng/common/sdl/configure-sdl-tool.ps1 +++ b/eng/common/sdl/configure-sdl-tool.ps1 @@ -17,7 +17,9 @@ Param( # Optional: Additional params to add to any tool using PoliCheck. [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional params to add to any tool using CodeQL/Semmle. - [string[]] $CodeQLAdditionalRunConfigParams + [string[]] $CodeQLAdditionalRunConfigParams, + # Optional: Additional params to add to any tool using Binskim. + [string[]] $BinskimAdditionalRunConfigParams ) $ErrorActionPreference = 'Stop' @@ -69,22 +71,34 @@ try { $gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig" # For some tools, add default and automatic args. - if ($tool.Name -eq 'credscan') { - if ($targetDirectory) { - $tool.Args += "TargetDirectory < $TargetDirectory" + switch -Exact ($tool.Name) { + 'credscan' { + if ($targetDirectory) { + $tool.Args += "`"TargetDirectory < $TargetDirectory`"" + } + $tool.Args += "`"OutputType < pre`"" + $tool.Args += $CrScanAdditionalRunConfigParams } - $tool.Args += "OutputType < pre" - $tool.Args += $CrScanAdditionalRunConfigParams - } elseif ($tool.Name -eq 'policheck') { - if ($targetDirectory) { - $tool.Args += "Target < $TargetDirectory" + 'policheck' { + if ($targetDirectory) { + $tool.Args += "`"Target < $TargetDirectory`"" + } + $tool.Args += $PoliCheckAdditionalRunConfigParams } - $tool.Args += $PoliCheckAdditionalRunConfigParams - } elseif ($tool.Name -eq 'semmle' -or $tool.Name -eq 'codeql') { - if ($targetDirectory) { - $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`"" + {$_ -in 'semmle', 'codeql'} { + if ($targetDirectory) { + $tool.Args += "`"SourceCodeDirectory < $TargetDirectory`"" + } + $tool.Args += $CodeQLAdditionalRunConfigParams + } + 'binskim' { + if ($targetDirectory) { + # Binskim crashes due to specific PDBs. GitHub issue: https://github.com/microsoft/binskim/issues/924. + # We are excluding all `_.pdb` files from the scan. + $tool.Args += "`"Target < $TargetDirectory\**;-:file|$TargetDirectory\**\_.pdb`"" + } + $tool.Args += $BinskimAdditionalRunConfigParams } - $tool.Args += $CodeQLAdditionalRunConfigParams } # Create variable pointing to the args array directly so we can use splat syntax later. diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 index b9fe73179..4715d75e9 100644 --- a/eng/common/sdl/execute-all-sdl-tools.ps1 +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -35,6 +35,7 @@ Param( [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") [string[]] $CodeQLAdditionalRunConfigParams, # Optional: Additional Params to custom build a Semmle/CodeQL run config in the format @("xyz < abc","sdf < 1") + [string[]] $BinskimAdditionalRunConfigParams, # Optional: Additional Params to custom build a Binskim run config in the format @("xyz < abc","sdf < 1") [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run ) @@ -107,7 +108,8 @@ try { -GuardianLoggerLevel $GuardianLoggerLevel ` -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams ` -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams ` - -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams + -CodeQLAdditionalRunConfigParams $CodeQLAdditionalRunConfigParams ` + -BinskimAdditionalRunConfigParams $BinskimAdditionalRunConfigParams if ($BreakOnFailure) { Exit-IfNZEC "Sdl" } @@ -126,7 +128,7 @@ try { Exec-BlockVerbosely { & $(Join-Path $PSScriptRoot 'run-sdl.ps1') ` -GuardianCliLocation $guardianCliLocation ` - -WorkingDirectory $workingDirectory ` + -WorkingDirectory $SourceDirectory ` -UpdateBaseline $UpdateBaseline ` -GdnFolder $gdnFolder } diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1 index 7f28d9c59..f031ed5b2 100644 --- a/eng/common/sdl/extract-artifact-packages.ps1 +++ b/eng/common/sdl/extract-artifact-packages.ps1 @@ -35,31 +35,33 @@ try { param( [string] $PackagePath # Full path to a NuGet package ) - + if (!(Test-Path $PackagePath)) { Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath" ExitWithExitCode 1 } - + $RelevantExtensions = @('.dll', '.exe', '.pdb') Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...' - + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - + Add-Type -AssemblyName System.IO.Compression.FileSystem - + [System.IO.Directory]::CreateDirectory($ExtractPath); - + try { $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) $zip.Entries | Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | ForEach-Object { - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + $TargetPath = Join-Path -Path $ExtractPath -ChildPath (Split-Path -Path $_.FullName) + [System.IO.Directory]::CreateDirectory($TargetPath); + + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.FullName + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile) } } catch { diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config index b7bcfe38c..4585cfd6b 100644 --- a/eng/common/sdl/packages.config +++ b/eng/common/sdl/packages.config @@ -1,4 +1,4 @@ - + diff --git a/eng/common/sdl/trim-assets-version.ps1 b/eng/common/sdl/trim-assets-version.ps1 new file mode 100644 index 000000000..a2e004877 --- /dev/null +++ b/eng/common/sdl/trim-assets-version.ps1 @@ -0,0 +1,75 @@ +<# +.SYNOPSIS +Install and run the 'Microsoft.DotNet.VersionTools.Cli' tool with the 'trim-artifacts-version' command to trim the version from the NuGet assets file name. + +.PARAMETER InputPath +Full path to directory where artifact packages are stored + +.PARAMETER Recursive +Search for NuGet packages recursively + +#> + +Param( + [string] $InputPath, + [bool] $Recursive = $true +) + +$CliToolName = "Microsoft.DotNet.VersionTools.Cli" + +function Install-VersionTools-Cli { + param( + [Parameter(Mandatory=$true)][string]$Version + ) + + Write-Host "Installing the package '$CliToolName' with a version of '$version' ..." + $feed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" + + $argumentList = @("tool", "install", "--local", "$CliToolName", "--add-source $feed", "--no-cache", "--version $Version", "--create-manifest-if-needed") + Start-Process "$dotnet" -Verbose -ArgumentList $argumentList -NoNewWindow -Wait +} + +# ------------------------------------------------------------------- + +if (!(Test-Path $InputPath)) { + Write-Host "Input Path '$InputPath' does not exist" + ExitWithExitCode 1 +} + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true +$global:LASTEXITCODE = 0 + +# `tools.ps1` checks $ci to perform some actions. Since the SDL +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + +try { + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + + $toolsetVersion = Read-ArcadeSdkVersion + Install-VersionTools-Cli -Version $toolsetVersion + + $cliToolFound = (& "$dotnet" tool list --local | Where-Object {$_.Split(' ')[0] -eq $CliToolName}) + if ($null -eq $cliToolFound) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "The '$CliToolName' tool is not installed." + ExitWithExitCode 1 + } + + Exec-BlockVerbosely { + & "$dotnet" $CliToolName trim-assets-version ` + --assets-path $InputPath ` + --recursive $Recursive + Exit-IfNZEC "Sdl" + } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 21945ebdc..1f035fee7 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -25,7 +25,9 @@ parameters: enablePublishBuildAssets: false enablePublishTestResults: false enablePublishUsingPipelines: false + enableBuildRetry: false disableComponentGovernance: '' + componentGovernanceIgnoreDirectories: '' mergeTestResults: false testRunTitle: '' testResultsFormat: '' @@ -34,7 +36,7 @@ parameters: runAsPublic: false # Sbom related params enableSbom: true - PackageVersion: 6.0.0 + PackageVersion: 7.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' jobs: @@ -94,10 +96,20 @@ jobs: - ${{ if ne(variable.group, '') }}: - group: ${{ variable.group }} + # handle template variable syntax + # example: + # - template: path/to/template.yml + # parameters: + # [key]: [value] + - ${{ if ne(variable.template, '') }}: + - template: ${{ variable.template }} + ${{ if ne(variable.parameters, '') }}: + parameters: ${{ variable.parameters }} + # handle key-value variable syntax. # example: # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: + - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: - ${{ each pair in variable }}: - name: ${{ pair.key }} value: ${{ pair.value }} @@ -128,9 +140,10 @@ jobs: continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: - task: NuGetAuthenticate@1 - - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: - task: DownloadPipelineArtifact@2 inputs: buildType: current @@ -148,6 +161,7 @@ jobs: languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }} richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true - template: /eng/common/templates-official/steps/component-governance.yml @@ -159,6 +173,7 @@ jobs: disableComponentGovernance: true ${{ else }}: disableComponentGovernance: ${{ parameters.disableComponentGovernance }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -170,7 +185,7 @@ jobs: TeamName: $(_TeamName) - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - task: CopyFiles@2 displayName: Gather binaries for publish to artifacts inputs: @@ -191,7 +206,7 @@ jobs: ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} continueOnError: true condition: always() - - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - task: 1ES.PublishPipelineArtifact@1 inputs: targetPath: 'artifacts/log' @@ -200,25 +215,6 @@ jobs: continueOnError: true condition: always() - - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: CopyFiles@2 - displayName: Gather Asset Manifests - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' - TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests' - PublishLocation: Container - ArtifactName: AssetManifests - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - task: 1ES.PublishBuildArtifacts@1 displayName: Publish Logs @@ -251,27 +247,18 @@ jobs: mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true condition: always() - - - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: CopyFiles@2 - displayName: Gather Asset Manifests - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' - TargetFolder: '$(Build.StagingDirectory)/AssetManifests' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - - task: 1ES.PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' - PublishLocation: Container - ArtifactName: AssetManifests - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - template: /eng/common/templates-official/steps/generate-sbom.yml parameters: PackageVersion: ${{ parameters.packageVersion}} BuildDropPath: ${{ parameters.buildDropPath }} + IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - task: 1ES.PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration' + artifactName: 'BuildConfiguration' + displayName: 'Publish build retry configuration' + continueOnError: true \ No newline at end of file diff --git a/eng/common/templates-official/job/onelocbuild.yml b/eng/common/templates-official/job/onelocbuild.yml index 08df56375..52b4d05d3 100644 --- a/eng/common/templates-official/job/onelocbuild.yml +++ b/eng/common/templates-official/job/onelocbuild.yml @@ -14,6 +14,7 @@ parameters: ReusePr: true UseLfLineEndings: true UseCheckedInLocProjectJson: false + SkipLocProjectJsonGeneration: false LanguageSet: VS_Main_Languages LclSource: lclFilesInRepo LclPackageId: '' @@ -22,13 +23,25 @@ parameters: MirrorRepo: '' MirrorBranch: main condition: '' + JobNameSuffix: '' jobs: -- job: OneLocBuild +- job: OneLocBuild${{ parameters.JobNameSuffix }} dependsOn: ${{ parameters.dependsOn }} - displayName: OneLocBuild + displayName: OneLocBuild${{ parameters.JobNameSuffix }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + - template: /eng/common/templates-official/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -42,28 +55,18 @@ jobs: os: windows # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - steps: - - task: Powershell@2 - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} + - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} - task: OneLocBuild@2 displayName: OneLocBuild @@ -75,8 +78,8 @@ jobs: lclSource: ${{ parameters.LclSource }} lclPackageId: ${{ parameters.LclPackageId }} isCreatePrSelected: ${{ parameters.CreatePr }} + isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} ${{ if eq(parameters.CreatePr, true) }}: - isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} ${{ if eq(parameters.RepoType, 'gitHub') }}: isShouldReusePrSelected: ${{ parameters.ReusePr }} diff --git a/eng/common/templates-official/job/publish-build-assets.yml b/eng/common/templates-official/job/publish-build-assets.yml index 1d84eb301..d01739c12 100644 --- a/eng/common/templates-official/job/publish-build-assets.yml +++ b/eng/common/templates-official/job/publish-build-assets.yml @@ -23,24 +23,46 @@ parameters: # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing publishUsingPipelines: false + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishAssetsImmediately: false + + artifactsPublishingAdditionalParameters: '' + + signingValidationAdditionalParameters: '' + jobs: - job: Asset_Registry_Publish dependsOn: ${{ parameters.dependsOn }} + timeoutInMinutes: 150 - displayName: Publish to Build Asset Registry - - pool: ${{ parameters.pool }} + ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + displayName: Publish Assets + ${{ else }}: + displayName: Publish to Build Asset Registry variables: + - template: /eng/common/templates-official/variables/pool-providers.yml - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _BuildConfig - value: ${{ parameters.configuration }} - group: Publish-Build-Assets - group: AzureDevOps-Artifact-Feeds-Pats - name: runCodesignValidationInjection value: false + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates-official/post-build/common-variables.yml + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + name: AzurePipelines-EO + image: 1ESPT-Windows2022 + demands: Cmd + os: windows + # If it's not devdiv, it's dnceng + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: NetCore1ESPool-Publishing-Internal + image: windows.vs2019.amd64 + os: windows steps: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: DownloadBuildArtifacts@0 @@ -51,30 +73,25 @@ jobs: checkDownloadedFiles: true condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} + + - task: NuGetAuthenticate@1 - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: NuGetAuthenticate@1 - - - task: PowerShell@2 - displayName: Enable cross-org NuGet feed authentication - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw) - - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) - /p:MaestroApiEndpoint=https://maestro.dot.net + /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:Configuration=$(_BuildConfig) /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: powershell@2 displayName: Create ReleaseConfigs Artifact inputs: @@ -85,7 +102,7 @@ jobs: Add-Content -Path $filePath -Value $(BARBuildId) Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - + - task: 1ES.PublishBuildArtifacts@1 displayName: Publish ReleaseConfigs Artifact inputs: @@ -111,13 +128,30 @@ jobs: - task: 1ES.PublishBuildArtifacts@1 displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') + condition: eq(variables['SymbolExclusionFile'], 'true') inputs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container ArtifactName: ReleaseConfigs - + + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates-official/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion 3 + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates-official/steps/publish-logs.yml parameters: - JobLabel: 'Publish_Artifacts_Logs' + JobLabel: 'Publish_Artifacts_Logs' diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index a6f7efa77..f983033bb 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -50,14 +50,17 @@ jobs: ${{ if eq(parameters.platform.pool, '') }}: # The default VM host AzDO pool. This should be capable of running Docker containers: almost all # source-build builds run in Docker, including the default managed platform. + # /eng/common/templates-official/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] image: 1es-mariner-2 os: linux + ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index f6f0c15bf..60dfb6b2d 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -6,12 +6,9 @@ parameters: sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] binlogPath: artifacts/log/Debug/Build.binlog - pool: - name: NetCore1ESPool-Svc-Internal - image: 1es-windows-2022 - os: windows condition: '' dependsOn: '' + pool: '' jobs: - job: SourceIndexStage1 @@ -26,8 +23,20 @@ jobs: value: ${{ parameters.sourceIndexPackageSource }} - name: BinlogPath value: ${{ parameters.binlogPath }} + - template: /eng/common/templates-official/variables/pool-providers.yml + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + ${{ if eq(parameters.pool, '') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64.open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + image: windows.vs2022.amd64 + os: windows - pool: ${{ parameters.pool }} steps: - ${{ each preStep in parameters.preSteps }}: - ${{ preStep }} diff --git a/eng/common/templates-official/jobs/codeql-build.yml b/eng/common/templates-official/jobs/codeql-build.yml index 0bf7ee29f..b68d3c2f3 100644 --- a/eng/common/templates-official/jobs/codeql-build.yml +++ b/eng/common/templates-official/jobs/codeql-build.yml @@ -21,7 +21,7 @@ jobs: # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in # sync with the packages.config file. - name: DefaultGuardianVersion - value: 0.110.1 + value: 0.109.0 - name: GuardianPackagesConfigFile value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config - name: GuardianVersion diff --git a/eng/common/templates-official/jobs/jobs.yml b/eng/common/templates-official/jobs/jobs.yml index c124aa995..857a0f8ba 100644 --- a/eng/common/templates-official/jobs/jobs.yml +++ b/eng/common/templates-official/jobs/jobs.yml @@ -20,13 +20,20 @@ parameters: enabled: false # Optional: Include toolset dependencies in the generated graph files includeToolset: false - + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: Override automatically derived dependsOn value for "publish build assets" job publishBuildAssetsDependsOn: '' + # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. + publishAssetsImmediately: false + + # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) + artifactsPublishingAdditionalParameters: '' + signingValidationAdditionalParameters: '' + # Optional: should run as a public build even in the internal project # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. runAsPublic: false @@ -40,7 +47,7 @@ parameters: jobs: - ${{ each job in parameters.jobs }}: - template: ../job/job.yml - parameters: + parameters: # pass along parameters ${{ each parameter in parameters }}: ${{ if ne(parameter.key, 'jobs') }}: @@ -68,7 +75,6 @@ jobs: ${{ parameter.key }}: ${{ parameter.value }} - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - template: ../job/publish-build-assets.yml parameters: @@ -82,19 +88,10 @@ jobs: - ${{ job.job }} - ${{ if eq(parameters.enableSourceBuild, true) }}: - Source_Build_Complete - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - name: AzurePipelines-EO - image: 1ESPT-Windows2022 - demands: Cmd - os: windows - # If it's not devdiv, it's dnceng - ${{ else }}: - name: NetCore1ESPool-Svc-Internal - image: 1es-windows-2022 - os: windows runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 9f60019cb..5cf6a269c 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -14,7 +14,7 @@ parameters: # This is the default platform provided by Arcade, intended for use by a managed-only repo. defaultManagedPlatform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' # Defines the platforms on which to run build jobs. One job is created for each platform, and the # object in this array is sent to the job template as 'platform'. If no platforms are specified, diff --git a/eng/common/templates-official/post-build/common-variables.yml b/eng/common/templates-official/post-build/common-variables.yml index 5404cc7ec..c24193acf 100644 --- a/eng/common/templates-official/post-build/common-variables.yml +++ b/eng/common/templates-official/post-build/common-variables.yml @@ -1,7 +1,4 @@ variables: - - group: AzureDevOps-Artifact-Feeds-Pats - - group: DotNet-Blob-Feed - - group: DotNet-DotNetCli-Storage - group: Publish-Build-Assets # Whether the build is internal or not @@ -10,7 +7,7 @@ variables: # Default Maestro++ API Endpoint and API Version - name: MaestroApiEndPoint - value: "https://maestro.dot.net" + value: "https://maestro-prod.westus2.cloudapp.azure.com" - name: MaestroApiAccessToken value: $(MaestroAccessToken) - name: MaestroApiVersion diff --git a/eng/common/templates-official/post-build/post-build.yml b/eng/common/templates-official/post-build/post-build.yml index fce0d0bf5..0dfa387e7 100644 --- a/eng/common/templates-official/post-build/post-build.yml +++ b/eng/common/templates-official/post-build/post-build.yml @@ -39,7 +39,7 @@ parameters: displayName: Enable NuGet validation type: boolean default: true - + - name: publishInstallersAndChecksums displayName: Publish installers and checksums type: boolean @@ -49,6 +49,7 @@ parameters: type: object default: enable: false + publishGdn: false continueOnError: false params: '' artifactNames: '' @@ -82,6 +83,11 @@ parameters: default: - Validate + # Optional: Call asset publishing rather than running in a separate stage + - name: publishAssetsImmediately + type: boolean + default: false + stages: - ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - stage: Validate @@ -89,10 +95,11 @@ stages: displayName: Validate Build Assets variables: - template: common-variables.yml + - template: /eng/common/templates-official/variables/pool-providers.yml jobs: - job: displayName: NuGet Validation - condition: eq( ${{ parameters.enableNugetValidation }}, 'true') + condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, 'true')) pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: @@ -101,8 +108,8 @@ stages: demands: Cmd os: windows # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows @@ -127,8 +134,8 @@ stages: displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - job: displayName: Signing Validation @@ -141,8 +148,8 @@ stages: demands: Cmd os: windows # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows steps: @@ -171,12 +178,6 @@ stages: - task: NuGetAuthenticate@1 displayName: 'Authenticate to AzDO Feeds' - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - # Signing validation will optionally work with the buildmanifest file which is downloaded from # Azure DevOps above. - task: PowerShell@2 @@ -192,6 +193,7 @@ stages: parameters: StageLabel: 'Validation' JobLabel: 'Signing' + BinlogToolVersion: $(BinlogToolVersion) - job: displayName: SourceLink Validation @@ -204,8 +206,8 @@ stages: demands: Cmd os: windows # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) image: 1es-windows-2022 os: windows steps: @@ -229,27 +231,29 @@ stages: displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) -GHCommit $(Build.SourceVersion) -SourcelinkCliVersion $(SourceLinkCLIVersion) continueOnError: true -- stage: publish_using_darc - ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.publishDependsOn }} - ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - jobs: - - job: - displayName: Publish Using Darc - timeoutInMinutes: 120 - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) +- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: + - stage: publish_using_darc + ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.publishDependsOn }} + ${{ else }}: + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Publish using Darc + variables: + - template: common-variables.yml + - template: /eng/common/templates-official/variables/pool-providers.yml + jobs: + - job: + displayName: Publish Using Darc + timeoutInMinutes: 120 + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: AzurePipelines-EO image: 1ESPT-Windows2022 @@ -257,23 +261,27 @@ stages: os: windows # If it's not devdiv, it's dnceng ${{ else }}: - name: NetCore1ESPool-Svc-Internal - image: 1es-windows-2022 + name: NetCore1ESPool-Publishing-Internal + image: windows.vs2019.amd64 os: windows - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - task: PowerShell@2 - displayName: Publish Using Darc - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + - task: NuGetAuthenticate@1 + + - task: AzureCLI@2 + displayName: Publish Using Darc + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates-official/steps/build-reason.yml b/eng/common/templates-official/steps/build-reason.yml new file mode 100644 index 000000000..eba58109b --- /dev/null +++ b/eng/common/templates-official/steps/build-reason.yml @@ -0,0 +1,12 @@ +# build-reason.yml +# Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons +# to include steps (',' separated). +parameters: + conditions: '' + steps: [] + +steps: + - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}: + - ${{ parameters.steps }} + - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}: + - ${{ parameters.steps }} diff --git a/eng/common/templates-official/steps/component-governance.yml b/eng/common/templates-official/steps/component-governance.yml index 12527b80e..cbba05967 100644 --- a/eng/common/templates-official/steps/component-governance.yml +++ b/eng/common/templates-official/steps/component-governance.yml @@ -1,5 +1,6 @@ parameters: disableComponentGovernance: false + componentGovernanceIgnoreDirectories: '' steps: - ${{ if eq(parameters.disableComponentGovernance, 'true') }}: @@ -7,4 +8,6 @@ steps: displayName: Set skipComponentGovernanceDetection variable - ${{ if ne(parameters.disableComponentGovernance, 'true') }}: - task: ComponentGovernanceComponentDetection@0 - continueOnError: true \ No newline at end of file + continueOnError: true + inputs: + ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file diff --git a/eng/common/templates-official/steps/execute-sdl.yml b/eng/common/templates-official/steps/execute-sdl.yml new file mode 100644 index 000000000..07426fde0 --- /dev/null +++ b/eng/common/templates-official/steps/execute-sdl.yml @@ -0,0 +1,88 @@ +parameters: + overrideGuardianVersion: '' + executeAllSdlToolsScript: '' + overrideParameters: '' + additionalParameters: '' + publishGuardianDirectoryToPipeline: false + sdlContinueOnError: false + condition: '' + +steps: +- task: NuGetAuthenticate@1 + inputs: + nuGetServiceConnections: GuardianConnect + +- task: NuGetToolInstaller@1 + displayName: 'Install NuGet.exe' + +- ${{ if ne(parameters.overrideGuardianVersion, '') }}: + - pwsh: | + Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl + . .\sdl.ps1 + $guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts -Version ${{ parameters.overrideGuardianVersion }} + Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation" + displayName: Install Guardian (Overridden) + +- ${{ if eq(parameters.overrideGuardianVersion, '') }}: + - pwsh: | + Set-Location -Path $(Build.SourcesDirectory)\eng\common\sdl + . .\sdl.ps1 + $guardianCliLocation = Install-Gdn -Path $(Build.SourcesDirectory)\.artifacts + Write-Host "##vso[task.setvariable variable=GuardianCliLocation]$guardianCliLocation" + displayName: Install Guardian + +- ${{ if ne(parameters.overrideParameters, '') }}: + - powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }} + displayName: Execute SDL (Overridden) + continueOnError: ${{ parameters.sdlContinueOnError }} + condition: ${{ parameters.condition }} + +- ${{ if eq(parameters.overrideParameters, '') }}: + - powershell: ${{ parameters.executeAllSdlToolsScript }} + -GuardianCliLocation $(GuardianCliLocation) + -NugetPackageDirectory $(Build.SourcesDirectory)\.packages + -AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw) + ${{ parameters.additionalParameters }} + displayName: Execute SDL + continueOnError: ${{ parameters.sdlContinueOnError }} + condition: ${{ parameters.condition }} + +- ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}: + # We want to publish the Guardian results and configuration for easy diagnosis. However, the + # '.gdn' dir is a mix of configuration, results, extracted dependencies, and Guardian default + # tooling files. Some of these files are large and aren't useful during an investigation, so + # exclude them by simply deleting them before publishing. (As of writing, there is no documented + # way to selectively exclude a dir from the pipeline artifact publish task.) + - task: DeleteFiles@1 + displayName: Delete Guardian dependencies to avoid uploading + inputs: + SourceFolder: $(Agent.BuildDirectory)/.gdn + Contents: | + c + i + condition: succeededOrFailed() + + - publish: $(Agent.BuildDirectory)/.gdn + artifact: GuardianConfiguration + displayName: Publish GuardianConfiguration + condition: succeededOrFailed() + + # Publish the SARIF files in a container named CodeAnalysisLogs to enable integration + # with the "SARIF SAST Scans Tab" Azure DevOps extension + - task: CopyFiles@2 + displayName: Copy SARIF files + inputs: + flattenFolders: true + sourceFolder: $(Agent.BuildDirectory)/.gdn/rc/ + contents: '**/*.sarif' + targetFolder: $(Build.SourcesDirectory)/CodeAnalysisLogs + condition: succeededOrFailed() + + # Use PublishBuildArtifacts because the SARIF extension only checks this case + # see microsoft/sarif-azuredevops-extension#4 + - task: PublishBuildArtifacts@1 + displayName: Publish SARIF files to CodeAnalysisLogs container + inputs: + pathToPublish: $(Build.SourcesDirectory)/CodeAnalysisLogs + artifactName: CodeAnalysisLogs + condition: succeededOrFailed() \ No newline at end of file diff --git a/eng/common/templates-official/steps/generate-sbom.yml b/eng/common/templates-official/steps/generate-sbom.yml index 7fc4f3580..1bf43bf80 100644 --- a/eng/common/templates-official/steps/generate-sbom.yml +++ b/eng/common/templates-official/steps/generate-sbom.yml @@ -2,12 +2,14 @@ # PackageName - The name of the package this SBOM represents. # PackageVersion - The version of the package this SBOM represents. # ManifestDirPath - The path of the directory where the generated manifest files will be placed +# IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector. parameters: - PackageVersion: 6.0.0 + PackageVersion: 8.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom + IgnoreDirectories: '' sbomContinueOnError: true steps: @@ -34,6 +36,8 @@ steps: BuildDropPath: ${{ parameters.buildDropPath }} PackageVersion: ${{ parameters.packageVersion }} ManifestDirPath: ${{ parameters.manifestDirPath }} + ${{ if ne(parameters.IgnoreDirectories, '') }}: + AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' - task: 1ES.PublishPipelineArtifact@1 displayName: Publish SBOM manifest diff --git a/eng/common/templates-official/steps/send-to-helix.yml b/eng/common/templates-official/steps/send-to-helix.yml index cd02ae160..3eb7e2d5f 100644 --- a/eng/common/templates-official/steps/send-to-helix.yml +++ b/eng/common/templates-official/steps/send-to-helix.yml @@ -3,7 +3,7 @@ parameters: HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number - HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group HelixConfiguration: '' # optional -- additional property attached to a job HelixPreCommands: '' # optional -- commands to run before Helix work item execution @@ -12,7 +12,7 @@ parameters: WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload - XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true + XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner @@ -20,17 +20,16 @@ parameters: IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set - HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int) + HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) Creator: '' # optional -- if the build is external, use this to specify who is sending the job DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false steps: - - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' displayName: ${{ parameters.DisplayNamePrefix }} (Windows) env: BuildConfig: $(_BuildConfig) @@ -54,14 +53,13 @@ steps: IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} HelixBaseUri: ${{ parameters.HelixBaseUri }} Creator: ${{ parameters.Creator }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog displayName: ${{ parameters.DisplayNamePrefix }} (Unix) env: BuildConfig: $(_BuildConfig) @@ -85,7 +83,6 @@ steps: IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} HelixBaseUri: ${{ parameters.HelixBaseUri }} Creator: ${{ parameters.Creator }} diff --git a/eng/common/templates-official/steps/source-build.yml b/eng/common/templates-official/steps/source-build.yml index 9eb7e5145..829f17c34 100644 --- a/eng/common/templates-official/steps/source-build.yml +++ b/eng/common/templates-official/steps/source-build.yml @@ -23,7 +23,7 @@ steps: # In addition, add an msbuild argument to copy the WIP from the repo to the target build location. # This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those # changes. - $internalRestoreArgs= + internalRestoreArgs= if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then # Temporarily work around https://github.com/dotnet/arcade/issues/7709 chmod +x $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh @@ -68,11 +68,21 @@ steps: runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}' fi + baseOsArgs= + if [ '${{ parameters.platform.baseOS }}' != '' ]; then + baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}' + fi + publishArgs= if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then publishArgs='--publish' fi + assetManifestFileName=SourceBuild_RidSpecific.xml + if [ '${{ parameters.platform.name }}' != '' ]; then + assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml + fi + ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ --configuration $buildConfig \ --restore --build --pack $publishArgs -bl \ @@ -81,8 +91,10 @@ steps: $internalRestoreArgs \ $targetRidArgs \ $runtimeOsArgs \ + $baseOsArgs \ /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ - /p:ArcadeBuildFromSource=true + /p:ArcadeBuildFromSource=true \ + /p:AssetManifestFileName=$assetManifestFileName displayName: Build # Upload build logs for diagnosis. @@ -106,3 +118,12 @@ steps: artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) continueOnError: true condition: succeededOrFailed() + +# Manually inject component detection so that we can ignore the source build upstream cache, which contains +# a nupkg cache of input packages (a local feed). +# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' +# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets +- task: ComponentGovernanceComponentDetection@0 + displayName: Component Detection (Exclude upstream cache) + inputs: + ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache' diff --git a/eng/common/templates-official/variables/pool-providers.yml b/eng/common/templates-official/variables/pool-providers.yml new file mode 100644 index 000000000..1f308b24e --- /dev/null +++ b/eng/common/templates-official/variables/pool-providers.yml @@ -0,0 +1,45 @@ +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. + +# Motivation: +# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS +# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template +# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. + +# How to use: +# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). +# If we find alternate naming conventions in broad usage it can be added to the condition below. +# +# First, import the template in an arcade-ified repo to pick up the variables, e.g.: +# +# variables: +# - template: /eng/common/templates-official/variables/pool-providers.yml +# +# ... then anywhere specifying the pool provider use the runtime variables, +# $(DncEngInternalBuildPool) +# +# pool: +# name: $(DncEngInternalBuildPool) +# image: 1es-windows-2022 + +variables: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) + + # Any new -Svc alternative pools should have variables added here to allow for splitting work + + - name: DncEngInternalBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] \ No newline at end of file diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml index 1a860bd04..dbdd66d4a 100644 --- a/eng/common/templates-official/variables/sdl-variables.yml +++ b/eng/common/templates-official/variables/sdl-variables.yml @@ -2,6 +2,6 @@ variables: # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in # sync with the packages.config file. - name: DefaultGuardianVersion - value: 0.110.1 + value: 0.109.0 - name: GuardianPackagesConfigFile value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index aaeb83b4d..7870f93bc 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -34,7 +34,7 @@ jobs: - job: Run_SDL dependsOn: ${{ parameters.dependsOn }} displayName: Run SDL tool - condition: eq( ${{ parameters.enable }}, 'true') + condition: and(succeededOrFailed(), eq( ${{ parameters.enable }}, 'true')) variables: - group: DotNet-VSTS-Bot - name: AzDOProjectName @@ -46,6 +46,7 @@ jobs: - template: /eng/common/templates/variables/sdl-variables.yml - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} + - template: /eng/common/templates/variables/pool-providers.yml pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: @@ -53,13 +54,15 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - checkout: self clean: true - - template: /eng/common/templates/post-build/setup-maestro-vars.yml + # If the template caller didn't provide an AzDO parameter, set them all up as Maestro vars. + - ${{ if not(and(parameters.AzDOProjectName, parameters.AzDOPipelineId, parameters.AzDOBuildId)) }}: + - template: /eng/common/templates/post-build/setup-maestro-vars.yml - ${{ if ne(parameters.downloadArtifacts, 'false')}}: - ${{ if ne(parameters.artifactNames, '') }}: @@ -102,6 +105,11 @@ jobs: downloadPath: $(Build.ArtifactStagingDirectory)\artifacts checkDownloadedFiles: true + - powershell: eng/common/sdl/trim-assets-version.ps1 + -InputPath $(Build.ArtifactStagingDirectory)\artifacts + displayName: Trim the version from the NuGet packages + continueOnError: ${{ parameters.sdlContinueOnError }} + - powershell: eng/common/sdl/extract-artifact-packages.ps1 -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 01da2420d..8ec5c4f2d 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -15,6 +15,7 @@ parameters: timeoutInMinutes: '' variables: [] workspace: '' + templateContext: '' # Job base template specific parameters # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md @@ -24,7 +25,9 @@ parameters: enablePublishBuildAssets: false enablePublishTestResults: false enablePublishUsingPipelines: false + enableBuildRetry: false disableComponentGovernance: '' + componentGovernanceIgnoreDirectories: '' mergeTestResults: false testRunTitle: '' testResultsFormat: '' @@ -33,7 +36,7 @@ parameters: runAsPublic: false # Sbom related params enableSbom: true - PackageVersion: 6.0.0 + PackageVersion: 7.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' jobs: @@ -66,6 +69,9 @@ jobs: ${{ if ne(parameters.timeoutInMinutes, '') }}: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + ${{ if ne(parameters.templateContext, '') }}: + templateContext: ${{ parameters.templateContext }} + variables: - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE @@ -90,10 +96,20 @@ jobs: - ${{ if ne(variable.group, '') }}: - group: ${{ variable.group }} + # handle template variable syntax + # example: + # - template: path/to/template.yml + # parameters: + # [key]: [value] + - ${{ if ne(variable.template, '') }}: + - template: ${{ variable.template }} + ${{ if ne(variable.parameters, '') }}: + parameters: ${{ variable.parameters }} + # handle key-value variable syntax. # example: # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: + - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: - ${{ each pair in variable }}: - name: ${{ pair.key }} value: ${{ pair.value }} @@ -123,9 +139,10 @@ jobs: continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + - ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}: - task: NuGetAuthenticate@1 - - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - ${{ if and(ne(parameters.artifacts.download, 'false'), ne(parameters.artifacts.download, '')) }}: - task: DownloadPipelineArtifact@2 inputs: buildType: current @@ -143,6 +160,7 @@ jobs: languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }} richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} continueOnError: true - template: /eng/common/templates/steps/component-governance.yml @@ -154,6 +172,7 @@ jobs: disableComponentGovernance: true ${{ else }}: disableComponentGovernance: ${{ parameters.disableComponentGovernance }} + componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -165,7 +184,7 @@ jobs: TeamName: $(_TeamName) - ${{ if ne(parameters.artifacts.publish, '') }}: - - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.artifacts, 'false'), ne(parameters.artifacts.publish.artifacts, '')) }}: - task: CopyFiles@2 displayName: Gather binaries for publish to artifacts inputs: @@ -186,30 +205,12 @@ jobs: ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} continueOnError: true condition: always() - - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - ${{ if and(ne(parameters.artifacts.publish.logs, 'false'), ne(parameters.artifacts.publish.logs, '')) }}: - publish: artifacts/log artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} displayName: Publish logs continueOnError: true condition: always() - - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: CopyFiles@2 - displayName: Gather Asset Manifests - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' - TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests' - PublishLocation: Container - ArtifactName: AssetManifests - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - task: PublishBuildArtifacts@1 @@ -243,27 +244,16 @@ jobs: mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true condition: always() - - - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: CopyFiles@2 - displayName: Gather Asset Manifests - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' - TargetFolder: '$(Build.StagingDirectory)/AssetManifests' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' - PublishLocation: Container - ArtifactName: AssetManifests - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.enableSbom, 'true')) }}: - template: /eng/common/templates/steps/generate-sbom.yml parameters: PackageVersion: ${{ parameters.packageVersion}} BuildDropPath: ${{ parameters.buildDropPath }} + IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} + + - ${{ if eq(parameters.enableBuildRetry, 'true') }}: + - publish: $(Build.SourcesDirectory)\eng\common\BuildConfiguration + artifact: BuildConfiguration + displayName: Publish build retry configuration + continueOnError: true diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 5b1b77d1c..60ab00c4d 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -14,6 +14,7 @@ parameters: ReusePr: true UseLfLineEndings: true UseCheckedInLocProjectJson: false + SkipLocProjectJsonGeneration: false LanguageSet: VS_Main_Languages LclSource: lclFilesInRepo LclPackageId: '' @@ -22,13 +23,25 @@ parameters: MirrorRepo: '' MirrorBranch: main condition: '' + JobNameSuffix: '' jobs: -- job: OneLocBuild +- job: OneLocBuild${{ parameters.JobNameSuffix }} dependsOn: ${{ parameters.dependsOn }} - displayName: OneLocBuild + displayName: OneLocBuild${{ parameters.JobNameSuffix }} + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + - name: _GenerateLocProjectArguments + value: -SourcesDirectory ${{ parameters.SourcesDirectory }} + -LanguageSet "${{ parameters.LanguageSet }}" + -CreateNeutralXlfs + - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: + - name: _GenerateLocProjectArguments + value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson + - template: /eng/common/templates/variables/pool-providers.yml ${{ if ne(parameters.pool, '') }}: pool: ${{ parameters.pool }} @@ -40,27 +53,17 @@ jobs: demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 - variables: - - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat - - name: _GenerateLocProjectArguments - value: -SourcesDirectory ${{ parameters.SourcesDirectory }} - -LanguageSet "${{ parameters.LanguageSet }}" - -CreateNeutralXlfs - - ${{ if eq(parameters.UseCheckedInLocProjectJson, 'true') }}: - - name: _GenerateLocProjectArguments - value: ${{ variables._GenerateLocProjectArguments }} -UseCheckedInLocProjectJson - - steps: - - task: Powershell@2 - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 - arguments: $(_GenerateLocProjectArguments) - displayName: Generate LocProject.json - condition: ${{ parameters.condition }} + - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + arguments: $(_GenerateLocProjectArguments) + displayName: Generate LocProject.json + condition: ${{ parameters.condition }} - task: OneLocBuild@2 displayName: OneLocBuild @@ -72,8 +75,8 @@ jobs: lclSource: ${{ parameters.LclSource }} lclPackageId: ${{ parameters.LclPackageId }} isCreatePrSelected: ${{ parameters.CreatePr }} + isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} ${{ if eq(parameters.CreatePr, true) }}: - isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }} isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} ${{ if eq(parameters.RepoType, 'gitHub') }}: isShouldReusePrSelected: ${{ parameters.ReusePr }} diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index bd3d54b76..9fd69fa7c 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -23,23 +23,43 @@ parameters: # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing publishUsingPipelines: false + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishAssetsImmediately: false + + artifactsPublishingAdditionalParameters: '' + + signingValidationAdditionalParameters: '' + jobs: - job: Asset_Registry_Publish dependsOn: ${{ parameters.dependsOn }} + timeoutInMinutes: 150 - displayName: Publish to Build Asset Registry - - pool: ${{ parameters.pool }} + ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + displayName: Publish Assets + ${{ else }}: + displayName: Publish to Build Asset Registry variables: + - template: /eng/common/templates/variables/pool-providers.yml - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _BuildConfig - value: ${{ parameters.configuration }} - group: Publish-Build-Assets - group: AzureDevOps-Artifact-Feeds-Pats - name: runCodesignValidationInjection value: false + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates/post-build/common-variables.yml + + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + name: VSEngSS-MicroBuild2022-1ES + demands: Cmd + # If it's not devdiv, it's dnceng + ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: + name: NetCore1ESPool-Publishing-Internal + demands: ImageOverride -equals windows.vs2019.amd64 steps: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -52,25 +72,20 @@ jobs: condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: NuGetAuthenticate@1 + - task: NuGetAuthenticate@1 - - task: PowerShell@2 - displayName: Enable cross-org NuGet feed authentication - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw) - - - task: PowerShell@2 + - task: AzureCLI@2 displayName: Publish Build Assets inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + arguments: > + -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' - /p:BuildAssetRegistryToken=$(MaestroAccessToken) /p:MaestroApiEndpoint=https://maestro.dot.net /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} - /p:Configuration=$(_BuildConfig) /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} @@ -114,7 +129,24 @@ jobs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container ArtifactName: ReleaseConfigs - + + - ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: + - template: /eng/common/templates/post-build/setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion 3 + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates/steps/publish-logs.yml parameters: diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index 8009ccb95..c0ff472b6 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -50,13 +50,16 @@ jobs: ${{ if eq(parameters.platform.pool, '') }}: # The default VM host AzDO pool. This should be capable of running Docker containers: almost all # source-build builds run in Docker, including the default managed platform. + # /eng/common/templates/variables/pool-providers.yml can't be used here (some customers declare variables already), so duplicate its logic pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Svc-Public + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Svc-Internal + name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 47f36e98b..0b6bb89dc 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -6,10 +6,9 @@ parameters: sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] binlogPath: artifacts/log/Debug/Build.binlog - pool: - vmImage: windows-2019 condition: '' dependsOn: '' + pool: '' jobs: - job: SourceIndexStage1 @@ -24,8 +23,19 @@ jobs: value: ${{ parameters.sourceIndexPackageSource }} - name: BinlogPath value: ${{ parameters.binlogPath }} + - template: /eng/common/templates/variables/pool-providers.yml + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + ${{ if eq(parameters.pool, '') }}: + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64.open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2019.amd64 - pool: ${{ parameters.pool }} steps: - ${{ each preStep in parameters.preSteps }}: - ${{ preStep }} diff --git a/eng/common/templates/jobs/codeql-build.yml b/eng/common/templates/jobs/codeql-build.yml index 54c393af4..f7dc5ea4a 100644 --- a/eng/common/templates/jobs/codeql-build.yml +++ b/eng/common/templates/jobs/codeql-build.yml @@ -21,7 +21,7 @@ jobs: # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in # sync with the packages.config file. - name: DefaultGuardianVersion - value: 0.110.1 + value: 0.109.0 - name: GuardianPackagesConfigFile value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config - name: GuardianVersion diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index f70826518..289bb2396 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -20,13 +20,20 @@ parameters: enabled: false # Optional: Include toolset dependencies in the generated graph files includeToolset: false - + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: Override automatically derived dependsOn value for "publish build assets" job publishBuildAssetsDependsOn: '' + # Optional: Publish the assets as soon as the publish to BAR stage is complete, rather doing so in a separate stage. + publishAssetsImmediately: false + + # Optional: If using publishAssetsImmediately and additional parameters are needed, can be used to send along additional parameters (normally sent to post-build.yml) + artifactsPublishingAdditionalParameters: '' + signingValidationAdditionalParameters: '' + # Optional: should run as a public build even in the internal project # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. runAsPublic: false @@ -40,7 +47,7 @@ parameters: jobs: - ${{ each job in parameters.jobs }}: - template: ../job/job.yml - parameters: + parameters: # pass along parameters ${{ each parameter in parameters }}: ${{ if ne(parameter.key, 'jobs') }}: @@ -68,7 +75,6 @@ jobs: ${{ parameter.key }}: ${{ parameter.value }} - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - template: ../job/publish-build-assets.yml parameters: @@ -82,16 +88,10 @@ jobs: - ${{ job.job }} - ${{ if eq(parameters.enableSourceBuild, true) }}: - Source_Build_Complete - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) - ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: - name: VSEngSS-MicroBuild2022-1ES - demands: Cmd - # If it's not devdiv, it's dnceng - ${{ else }}: - name: NetCore1ESPool-Publishing-Internal - demands: ImageOverride -equals windows.vs2019.amd64 runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + publishAssetsImmediately: ${{ parameters.publishAssetsImmediately }} enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index e3fbd9f38..5f46bfa89 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -14,7 +14,7 @@ parameters: # This is the default platform provided by Arcade, intended for use by a managed-only repo. defaultManagedPlatform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' # Defines the platforms on which to run build jobs. One job is created for each platform, and the # object in this array is sent to the job template as 'platform'. If no platforms are specified, diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 5404cc7ec..173914f23 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -1,7 +1,4 @@ variables: - - group: AzureDevOps-Artifact-Feeds-Pats - - group: DotNet-Blob-Feed - - group: DotNet-DotNetCli-Storage - group: Publish-Build-Assets # Whether the build is internal or not diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 5a0bb8d96..2db493346 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -49,6 +49,7 @@ parameters: type: object default: enable: false + publishGdn: false continueOnError: false params: '' artifactNames: '' @@ -82,6 +83,11 @@ parameters: default: - Validate + # Optional: Call asset publishing rather than running in a separate stage + - name: publishAssetsImmediately + type: boolean + default: false + stages: - ${{ if or(eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - stage: Validate @@ -89,18 +95,19 @@ stages: displayName: Validate Build Assets variables: - template: common-variables.yml + - template: /eng/common/templates/variables/pool-providers.yml jobs: - job: displayName: NuGet Validation - condition: eq( ${{ parameters.enableNugetValidation }}, 'true') + condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, 'true')) pool: # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -136,8 +143,8 @@ stages: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -165,12 +172,6 @@ stages: - task: NuGetAuthenticate@1 displayName: 'Authenticate to AzDO Feeds' - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - # Signing validation will optionally work with the buildmanifest file which is downloaded from # Azure DevOps above. - task: PowerShell@2 @@ -196,8 +197,8 @@ stages: name: VSEngSS-MicroBuild2022-1ES demands: Cmd # If it's not devdiv, it's dnceng - ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: NetCore1ESPool-Svc-Internal + ${{ else }}: + name: $(DncEngInternalBuildPool) demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -230,25 +231,28 @@ stages: - template: /eng/common/templates/job/execute-sdl.yml parameters: enable: ${{ parameters.SDLValidationParameters.enable }} + publishGuardianDirectoryToPipeline: ${{ parameters.SDLValidationParameters.publishGdn }} additionalParameters: ${{ parameters.SDLValidationParameters.params }} continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} -- stage: publish_using_darc - ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.publishDependsOn }} - ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Publish using Darc - variables: - - template: common-variables.yml - jobs: - - job: - displayName: Publish Using Darc - timeoutInMinutes: 120 - pool: - # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) +- ${{ if ne(parameters.publishAssetsImmediately, 'true') }}: + - stage: publish_using_darc + ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.publishDependsOn }} + ${{ else }}: + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Publish using Darc + variables: + - template: common-variables.yml + - template: /eng/common/templates/variables/pool-providers.yml + jobs: + - job: + displayName: Publish Using Darc + timeoutInMinutes: 120 + pool: + # We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com) ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: VSEngSS-MicroBuild2022-1ES demands: Cmd @@ -256,20 +260,24 @@ stages: ${{ else }}: name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 - steps: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + steps: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - task: PowerShell@2 - displayName: Publish Using Darc - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) - -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} - -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' - -MaestroToken '$(MaestroApiAccessToken)' - -WaitPublishingFinish true - -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' - -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' + - task: NuGetAuthenticate@1 + + - task: AzureCLI@2 + displayName: Publish Using Darc + inputs: + azureSubscription: "Darc: Maestro Production" + scriptType: ps + scriptLocation: scriptPath + scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -WaitPublishingFinish true + -ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}' + -SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml index 0c87f149a..64b9abc68 100644 --- a/eng/common/templates/post-build/setup-maestro-vars.yml +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -11,13 +11,14 @@ steps: artifactName: ReleaseConfigs checkDownloadedFiles: true - - task: PowerShell@2 + - task: AzureCLI@2 name: setReleaseVars displayName: Set Release Configs Vars inputs: - targetType: inline - pwsh: true - script: | + azureSubscription: "Darc: Maestro Production" + scriptType: pscore + scriptLocation: inlineScript + inlineScript: | try { if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt @@ -31,15 +32,16 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + . $(Build.SourcesDirectory)\eng\common\tools.ps1 + $darc = Get-Darc + $buildInfo = & $darc get-build ` + --id ${{ parameters.BARBuildId }} ` + --extended ` + --output-format json ` + --ci ` + | convertFrom-Json - $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' - $apiHeaders.Add('Accept', 'application/json') - $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") - - $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } - - $BarId = $Env:BARBuildId + $BarId = ${{ parameters.BARBuildId }} $Channels = $Env:PromoteToMaestroChannels -split "," $Channels = $Channels -join "][" $Channels = "[$Channels]" @@ -65,6 +67,4 @@ steps: exit 1 } env: - MAESTRO_API_TOKEN: $(MaestroApiAccessToken) - BARBuildId: ${{ parameters.BARBuildId }} PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/steps/component-governance.yml b/eng/common/templates/steps/component-governance.yml index 12527b80e..cbba05967 100644 --- a/eng/common/templates/steps/component-governance.yml +++ b/eng/common/templates/steps/component-governance.yml @@ -1,5 +1,6 @@ parameters: disableComponentGovernance: false + componentGovernanceIgnoreDirectories: '' steps: - ${{ if eq(parameters.disableComponentGovernance, 'true') }}: @@ -7,4 +8,6 @@ steps: displayName: Set skipComponentGovernanceDetection variable - ${{ if ne(parameters.disableComponentGovernance, 'true') }}: - task: ComponentGovernanceComponentDetection@0 - continueOnError: true \ No newline at end of file + continueOnError: true + inputs: + ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} \ No newline at end of file diff --git a/eng/common/templates/steps/execute-sdl.yml b/eng/common/templates/steps/execute-sdl.yml index 9dd5709f6..07426fde0 100644 --- a/eng/common/templates/steps/execute-sdl.yml +++ b/eng/common/templates/steps/execute-sdl.yml @@ -33,7 +33,7 @@ steps: - ${{ if ne(parameters.overrideParameters, '') }}: - powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }} - displayName: Execute SDL + displayName: Execute SDL (Overridden) continueOnError: ${{ parameters.sdlContinueOnError }} condition: ${{ parameters.condition }} diff --git a/eng/common/templates/steps/generate-sbom.yml b/eng/common/templates/steps/generate-sbom.yml index f4d7937f3..2b21eae42 100644 --- a/eng/common/templates/steps/generate-sbom.yml +++ b/eng/common/templates/steps/generate-sbom.yml @@ -2,12 +2,14 @@ # PackageName - The name of the package this SBOM represents. # PackageVersion - The version of the package this SBOM represents. # ManifestDirPath - The path of the directory where the generated manifest files will be placed +# IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector. parameters: - PackageVersion: 6.0.0 + PackageVersion: 8.0.0 BuildDropPath: '$(Build.SourcesDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom + IgnoreDirectories: '' sbomContinueOnError: true steps: @@ -34,6 +36,8 @@ steps: BuildDropPath: ${{ parameters.buildDropPath }} PackageVersion: ${{ parameters.packageVersion }} ManifestDirPath: ${{ parameters.manifestDirPath }} + ${{ if ne(parameters.IgnoreDirectories, '') }}: + AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' - task: PublishPipelineArtifact@1 displayName: Publish SBOM manifest diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index cd02ae160..3eb7e2d5f 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -3,7 +3,7 @@ parameters: HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number - HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixTargetQueues: '' # required -- semicolon-delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group HelixConfiguration: '' # optional -- additional property attached to a job HelixPreCommands: '' # optional -- commands to run before Helix work item execution @@ -12,7 +12,7 @@ parameters: WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload - XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true + XUnitProjects: '' # optional -- semicolon-delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner @@ -20,17 +20,16 @@ parameters: IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json - EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set - HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int) + HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting https://helix.int-dot.net ) Creator: '' # optional -- if the build is external, use this to specify who is sending the job DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false steps: - - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' displayName: ${{ parameters.DisplayNamePrefix }} (Windows) env: BuildConfig: $(_BuildConfig) @@ -54,14 +53,13 @@ steps: IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} HelixBaseUri: ${{ parameters.HelixBaseUri }} Creator: ${{ parameters.Creator }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /p:TreatWarningsAsErrors=false /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog displayName: ${{ parameters.DisplayNamePrefix }} (Unix) env: BuildConfig: $(_BuildConfig) @@ -85,7 +83,6 @@ steps: IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} HelixBaseUri: ${{ parameters.HelixBaseUri }} Creator: ${{ parameters.Creator }} diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml index b5b3e5aeb..41bbb9157 100644 --- a/eng/common/templates/steps/source-build.yml +++ b/eng/common/templates/steps/source-build.yml @@ -23,7 +23,7 @@ steps: # In addition, add an msbuild argument to copy the WIP from the repo to the target build location. # This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those # changes. - $internalRestoreArgs= + internalRestoreArgs= if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then # Temporarily work around https://github.com/dotnet/arcade/issues/7709 chmod +x $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh @@ -68,11 +68,21 @@ steps: runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}' fi + baseOsArgs= + if [ '${{ parameters.platform.baseOS }}' != '' ]; then + baseOsArgs='/p:BaseOS=${{ parameters.platform.baseOS }}' + fi + publishArgs= if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then publishArgs='--publish' fi + assetManifestFileName=SourceBuild_RidSpecific.xml + if [ '${{ parameters.platform.name }}' != '' ]; then + assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml + fi + ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ --configuration $buildConfig \ --restore --build --pack $publishArgs -bl \ @@ -81,8 +91,10 @@ steps: $internalRestoreArgs \ $targetRidArgs \ $runtimeOsArgs \ + $baseOsArgs \ /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ - /p:ArcadeBuildFromSource=true + /p:ArcadeBuildFromSource=true \ + /p:AssetManifestFileName=$assetManifestFileName displayName: Build # Upload build logs for diagnosis. @@ -106,3 +118,12 @@ steps: artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) continueOnError: true condition: succeededOrFailed() + +# Manually inject component detection so that we can ignore the source build upstream cache, which contains +# a nupkg cache of input packages (a local feed). +# This path must match the upstream cache path in property 'CurrentRepoSourceBuiltNupkgCacheDir' +# in src\Microsoft.DotNet.Arcade.Sdk\tools\SourceBuild\SourceBuildArcade.targets +- task: ComponentGovernanceComponentDetection@0 + displayName: Component Detection (Exclude upstream cache) + inputs: + ignoreDirectories: '$(Build.SourcesDirectory)/artifacts/source-build/self/src/artifacts/obj/source-built-upstream-cache' diff --git a/eng/common/templates/variables/pool-providers.yml b/eng/common/templates/variables/pool-providers.yml new file mode 100644 index 000000000..d236f9fdb --- /dev/null +++ b/eng/common/templates/variables/pool-providers.yml @@ -0,0 +1,57 @@ +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. + +# Motivation: +# Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS +# (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing +# (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template +# file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. + +# How to use: +# This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). +# If we find alternate naming conventions in broad usage it can be added to the condition below. +# +# First, import the template in an arcade-ified repo to pick up the variables, e.g.: +# +# variables: +# - template: /eng/common/templates/variables/pool-providers.yml +# +# ... then anywhere specifying the pool provider use the runtime variables, +# $(DncEngInternalBuildPool) and $ (DncEngPublicBuildPool), e.g.: +# +# pool: +# name: $(DncEngInternalBuildPool) +# demands: ImageOverride -equals windows.vs2019.amd64 + +variables: + # Coalesce the target and source branches so we know when a PR targets a release branch + # If these variables are somehow missing, fall back to main (tends to have more capacity) + + # Any new -Svc alternative pools should have variables added here to allow for splitting work + - name: DncEngPublicBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore-Svc-Public' + ), + False, + 'NetCore-Public' + ) + ] + + - name: DncEngInternalBuildPool + value: $[ + replace( + replace( + eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), + True, + 'NetCore1ESPool-Svc-Internal' + ), + False, + 'NetCore1ESPool-Internal' + ) + ] diff --git a/eng/common/templates/variables/sdl-variables.yml b/eng/common/templates/variables/sdl-variables.yml index 1a860bd04..dbdd66d4a 100644 --- a/eng/common/templates/variables/sdl-variables.yml +++ b/eng/common/templates/variables/sdl-variables.yml @@ -2,6 +2,6 @@ variables: # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in # sync with the packages.config file. - name: DefaultGuardianVersion - value: 0.110.1 + value: 0.109.0 - name: GuardianPackagesConfigFile value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 81d7b0355..eb188cfda 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -287,6 +287,25 @@ function InstallDotNet([string] $dotnetRoot, [string] $runtimeSourceFeedKey = '', [switch] $noPath) { + $dotnetVersionLabel = "'sdk v$version'" + + if ($runtime -ne '' -and $runtime -ne 'sdk') { + $runtimePath = $dotnetRoot + $runtimePath = $runtimePath + "\shared" + if ($runtime -eq "dotnet") { $runtimePath = $runtimePath + "\Microsoft.NETCore.App" } + if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" } + if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" } + $runtimePath = $runtimePath + "\" + $version + + $dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'" + + if (Test-Path $runtimePath) { + Write-Host " Runtime toolset '$runtime/$architecture v$version' already installed." + $installSuccess = $true + Exit + } + } + $installScript = GetDotNetInstallScript $dotnetRoot $installParameters = @{ Version = $version @@ -323,18 +342,18 @@ function InstallDotNet([string] $dotnetRoot, } else { $location = "public location"; } - Write-Host "Attempting to install dotnet from $location." + Write-Host " Attempting to install $dotnetVersionLabel from $location." try { & $installScript @variation $installSuccess = $true break } catch { - Write-Host "Failed to install dotnet from $location." + Write-Host " Failed to install $dotnetVersionLabel from $location." } } if (-not $installSuccess) { - Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations." + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 } } @@ -360,15 +379,22 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = } # Minimum VS version to require. - $vsMinVersionReqdStr = '16.8' + $vsMinVersionReqdStr = '17.7' $vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr) # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=16.10.0-preview2&view=overview - $defaultXCopyMSBuildVersion = '16.10.0-preview2' + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.8.1-2 + $defaultXCopyMSBuildVersion = '17.8.1-2' - if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + if (!$vsRequirements) { + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { + $vsRequirements = $GlobalJson.tools.vs + } + else { + $vsRequirements = New-Object PSObject -Property @{ version = $vsMinVersionReqdStr } + } + } $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr } $vsMinVersion = [Version]::new($vsMinVersionStr) @@ -392,7 +418,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # Locate Visual Studio installation or download x-copy msbuild. $vsInfo = LocateVisualStudio $vsRequirements if ($vsInfo -ne $null) { - $vsInstallDir = $vsInfo.installationPath + # Ensure vsInstallDir has a trailing slash + $vsInstallDir = Join-Path $vsInfo.installationPath "\" $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion @@ -406,6 +433,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if($vsMinVersion -lt $vsMinVersionReqd){ Write-Host "Using xcopy-msbuild version of $defaultXCopyMSBuildVersion since VS version $vsMinVersionStr provided in global.json is not compatible" $xcopyMSBuildVersion = $defaultXCopyMSBuildVersion + $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] } else{ # If the VS version IS compatible, look for an xcopy msbuild package @@ -573,7 +601,15 @@ function InitializeBuildTool() { ExitWithExitCode 1 } $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' } + + # Use override if it exists - commonly set by source-build + if ($null -eq $env:_OverrideArcadeInitializeBuildToolFramework) { + $initializeBuildToolFramework="net8.0" + } else { + $initializeBuildToolFramework=$env:_OverrideArcadeInitializeBuildToolFramework + } + + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = $initializeBuildToolFramework } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore @@ -643,6 +679,10 @@ function InitializeNativeTools() { } } +function Read-ArcadeSdkVersion() { + return $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk' +} + function InitializeToolset() { if (Test-Path variable:global:_ToolsetBuildProj) { return $global:_ToolsetBuildProj @@ -650,7 +690,7 @@ function InitializeToolset() { $nugetCache = GetNuGetPackageCachePath - $toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk' + $toolsetVersion = Read-ArcadeSdkVersion $toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt" if (Test-Path $toolsetLocationFile) { @@ -735,6 +775,8 @@ function MSBuild() { (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll')) (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')), (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll')) + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')), + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')) ) $selectedPath = $null foreach ($path in $possiblePaths) { @@ -807,7 +849,8 @@ function MSBuild-Core() { Write-Host "See log: $buildLog" -ForegroundColor DarkGray } - if ($ci) { + # When running on Azure Pipelines, override the returned exit code to avoid double logging. + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null) { Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error @@ -902,11 +945,13 @@ if (!$disableConfigureToolsetImport) { function Enable-Nuget-EnhancedRetry() { if ($ci) { Write-Host "Setting NUGET enhanced retry environment variables" - $env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true' - $env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6 - $env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000 - Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true' - Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6' - Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000' + $env:NUGET_ENABLE_ENHANCED_HTTP_RETRY = 'true' + $env:NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT = 6 + $env:NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS = 1000 + $env:NUGET_RETRY_HTTP_429 = 'true' + Write-PipelineSetVariable -Name 'NUGET_ENABLE_ENHANCED_HTTP_RETRY' -Value 'true' + Write-PipelineSetVariable -Name 'NUGET_ENHANCED_MAX_NETWORK_TRY_COUNT' -Value '6' + Write-PipelineSetVariable -Name 'NUGET_ENHANCED_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000' + Write-PipelineSetVariable -Name 'NUGET_RETRY_HTTP_429' -Value 'true' } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index e555c3426..3392e3a99 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -178,12 +178,41 @@ function InstallDotNetSdk { if [[ $# -ge 3 ]]; then architecture=$3 fi - InstallDotNet "$root" "$version" $architecture 'sdk' 'false' $runtime_source_feed $runtime_source_feed_key + InstallDotNet "$root" "$version" $architecture 'sdk' 'true' $runtime_source_feed $runtime_source_feed_key } function InstallDotNet { local root=$1 local version=$2 + local runtime=$4 + + local dotnetVersionLabel="'$runtime v$version'" + if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then + runtimePath="$root" + runtimePath="$runtimePath/shared" + case "$runtime" in + dotnet) + runtimePath="$runtimePath/Microsoft.NETCore.App" + ;; + aspnetcore) + runtimePath="$runtimePath/Microsoft.AspNetCore.App" + ;; + windowsdesktop) + runtimePath="$runtimePath/Microsoft.WindowsDesktop.App" + ;; + *) + ;; + esac + runtimePath="$runtimePath/$version" + + dotnetVersionLabel="runtime toolset '$runtime/$architecture v$version'" + + if [ -d "$runtimePath" ]; then + echo " Runtime toolset '$runtime/$architecture v$version' already installed." + local installSuccess=1 + return + fi + fi GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript @@ -228,17 +257,17 @@ function InstallDotNet { for variationName in "${variations[@]}"; do local name="$variationName[@]" local variation=("${!name}") - echo "Attempting to install dotnet from $variationName." + echo " Attempting to install $dotnetVersionLabel from $variationName." bash "$install_script" "${variation[@]}" && installSuccess=1 if [[ "$installSuccess" -eq 1 ]]; then break fi - echo "Failed to install dotnet from $variationName." + echo " Failed to install $dotnetVersionLabel from $variationName." done if [[ "$installSuccess" -eq 0 ]]; then - Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations." + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install $dotnetVersionLabel from any of the specified locations." ExitWithExitCode 1 fi } @@ -312,7 +341,12 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" - _InitializeBuildToolFramework="netcoreapp3.1" + # use override if it exists - commonly set by source-build + if [[ "${_OverrideArcadeInitializeBuildToolFramework:-x}" == "x" ]]; then + _InitializeBuildToolFramework="net8.0" + else + _InitializeBuildToolFramework="${_OverrideArcadeInitializeBuildToolFramework}" + fi } # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 @@ -416,13 +450,6 @@ function MSBuild { export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" - - export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true - export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6 - export NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS=1000 - Write-PipelineSetVariable -name "NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY" -value "true" - Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT" -value "6" - Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS" -value "1000" fi local toolset_dir="${_InitializeToolset%/*}" @@ -435,6 +462,8 @@ function MSBuild { possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" ) for path in "${possiblePaths[@]}"; do if [[ -f $path ]]; then selectedPath=$path @@ -479,7 +508,9 @@ function MSBuild-Core { # We should not Write-PipelineTaskError here because that message shows up in the build summary # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. echo "Build failed with exit code $exit_code. Check errors above." - if [[ "$ci" == "true" ]]; then + + # When running on Azure Pipelines, override the returned exit code to avoid double logging. + if [[ "$ci" == "true" && -n ${SYSTEM_TEAMPROJECT:-} ]]; then Write-PipelineSetResult -result "Failed" -message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error @@ -493,6 +524,17 @@ function MSBuild-Core { RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" } +function GetDarc { + darc_path="$temp_dir/darc" + version="$1" + + if [[ -n "$version" ]]; then + version="--darcversion $version" + fi + + "$eng_root/common/darc-init.sh" --toolpath "$darc_path" $version +} + ResolvePath "${BASH_SOURCE[0]}" _script_dir=`dirname "$_ResolvePath"` @@ -511,7 +553,7 @@ global_json_file="${repo_root}global.json" # determine if global.json contains a "runtimes" entry global_json_has_runtimes=false if command -v jq &> /dev/null; then - if jq -er '. | select(has("runtimes"))' "$global_json_file" &> /dev/null; then + if jq -e '.tools | has("runtimes")' "$global_json_file" &> /dev/null; then global_json_has_runtimes=true fi elif [[ "$(cat "$global_json_file")" =~ \"runtimes\"[[:space:]\:]*\{ ]]; then diff --git a/eng/core-sdk-build-env.sh b/eng/core-sdk-build-env.sh index 6b3974e46..522887453 100644 --- a/eng/core-sdk-build-env.sh +++ b/eng/core-sdk-build-env.sh @@ -37,5 +37,4 @@ export PATH=$REPO_ROOT/.dotnet$arcade_partition_suffix:$PATH export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet$arcade_partition_suffix export ArtifactsDir=$REPO_ROOT/artifacts$arcade_partition_suffix/ -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 \ No newline at end of file diff --git a/eng/core-sdk-test-env.bat b/eng/core-sdk-test-env.bat index 9cc0cc73d..37a7c0942 100644 --- a/eng/core-sdk-test-env.bat +++ b/eng/core-sdk-test-env.bat @@ -12,5 +12,4 @@ title Core SDK Test (%CLI_REPO_ROOT%) REM Add Stage 2 CLI to path set PATH=%CLI_REPO_ROOT%artifacts\bin\redist\Debug\dotnet;%PATH% -set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 set DOTNET_MULTILEVEL_LOOKUP=0 diff --git a/eng/core-sdk-test-env.sh b/eng/core-sdk-test-env.sh index 494a5e71f..e99e3729c 100644 --- a/eng/core-sdk-test-env.sh +++ b/eng/core-sdk-test-env.sh @@ -17,5 +17,4 @@ STAGE2_DIR=$REPO_ROOT/artifacts/bin/redist/Debug/dotnet export PATH=$STAGE2_DIR:$PATH -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export DOTNET_MULTILEVEL_LOOKUP=0 \ No newline at end of file diff --git a/eng/docker/alpine.3.15/Dockerfile b/eng/docker/alpine.3.15/Dockerfile deleted file mode 100644 index 2d7e65698..000000000 --- a/eng/docker/alpine.3.15/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-20220610131707-f0ea7ba - -RUN apk update && apk upgrade && apk add --no-cache curl ncurses - -# This Dockerfile doesn't use the USER_ID, but the parameter needs to be declared to prevent docker -# from issuing a warning -ARG USER_ID=0 -RUN adduser code_executor -u ${USER_ID} -G root -D -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} - -# Set up Azure Artifacts credential provider -# We download the installer and execute it using ${USER_ID} so that the installer -# put the NuGet plugins in the correct $HOME/.nuget folder. -RUN curl -O https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh -RUN chmod +x ./installcredprovider.sh - -# Set user to the one we just created -USER ${USER_ID} - -RUN ./installcredprovider.sh diff --git a/eng/docker/centos/Dockerfile b/eng/docker/centos/Dockerfile deleted file mode 100644 index 0627f84d8..000000000 --- a/eng/docker/centos/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-b46d863-20180719033416 - -RUN yum -q -y install sudo - -# Setup User to match Host User, and give superuser permissions -ARG USER_ID=0 -RUN useradd -m code_executor -u ${USER_ID} -g root -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home -RUN chmod -R 755 /usr/bin/sudo - -# Set user to the one we just created -USER ${USER_ID} - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} diff --git a/eng/docker/debian/Dockerfile b/eng/docker/debian/Dockerfile deleted file mode 100644 index e448844a4..000000000 --- a/eng/docker/debian/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64 - -# Install the deb packaging toolchain we need to build debs -RUN apt-get update \ - && apt-get -y install \ - debhelper \ - build-essential \ - devscripts \ - locales \ - && rm -rf /var/lib/apt/lists/* - -# liblldb is needed so deb package build does not throw missing library info errors -RUN apt-get update \ - && apt-get -y install liblldb-9 \ - && rm -rf /var/lib/apt/lists/* - -# Misc Dependencies for build -RUN rm -rf /var/lib/apt/lists/* && \ - apt-get update && \ - apt-get -qqy install \ - sudo && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -RUN apt-get update \ - && apt-get -y install python-is-python2 \ - && rm -rf /var/lib/apt/lists/* - -RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8 - -# Setup User to match Host User, and give superuser permissions -ARG USER_ID=0 -RUN useradd -m code_executor -u ${USER_ID} -g sudo -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home -RUN chmod -R 755 /usr/lib/sudo - -# Set user to the one we just created -USER ${USER_ID} - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} diff --git a/eng/docker/fedora.29/Dockerfile b/eng/docker/fedora.29/Dockerfile deleted file mode 100644 index 925bd8564..000000000 --- a/eng/docker/fedora.29/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-2f0798a-20181105183801 - -RUN dnf install -y nss - -RUN dnf clean all - -# Override RID set by the dotnet-buildtools-prereqs docker image -ENV __PUBLISH_RID=fedora.29-x64 - -# Setup User to match Host User, and give superuser permissions -ARG USER_ID=0 -RUN useradd -m code_executor -u ${USER_ID} -g wheel -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home - -# Set user to the one we just created -USER ${USER_ID} - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} diff --git a/eng/docker/rhel/Dockerfile b/eng/docker/rhel/Dockerfile deleted file mode 100644 index c629cbf0a..000000000 --- a/eng/docker/rhel/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-e1b4a89-20175311035359 - -# Setup User to match Host User, and give superuser permissions -ARG USER_ID=0 -RUN useradd -m code_executor -u ${USER_ID} -g root -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home -RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo - -# Set user to the one we just created -USER ${USER_ID} - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} - -# Set up Azure Artifacts credential provider -RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash diff --git a/eng/docker/ubuntu.18.04/Dockerfile b/eng/docker/ubuntu.18.04/Dockerfile deleted file mode 100644 index 1f8175001..000000000 --- a/eng/docker/ubuntu.18.04/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-f90bc20-20180320154721 - -RUN apt-get update && \ - apt-get -qqy install \ - curl \ - libcurl4 \ - devscripts \ - debhelper \ - sudo && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Setup User to match Host User, and give superuser permissions -ARG USER_ID=0 -RUN useradd -m code_executor -u ${USER_ID} -g sudo -RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -# With the User Change, we need to change permissions on these directories -RUN chmod -R a+rwx /usr/local -RUN chmod -R a+rwx /home -RUN chmod -R 755 /usr/lib/sudo - -# Set user to the one we just created -USER ${USER_ID} - -# Set working directory -ARG WORK_DIR -WORKDIR ${WORK_DIR} diff --git a/eng/dockerrun.ps1 b/eng/dockerrun.ps1 deleted file mode 100644 index e3b117258..000000000 --- a/eng/dockerrun.ps1 +++ /dev/null @@ -1,60 +0,0 @@ -[CmdletBinding(PositionalBinding=$false)] -Param( - [bool] $noninteractive = $false, - [string] $dockerImageName, - [string] $dockerContainerTag = "dotnetcli-build", - [string] $dockerContainerName = "dotnetcli-build-container", - [Parameter(ValueFromRemainingArguments=$true)][String[]]$additionalArgs -) - -# sample command line: .\eng\dockerrun.ps1 -dockerImageName ubuntu.18.04 /p:DisableSourceLink=true --test --pack --publish - -Write-Host "Docker image name: $dockerImageName" -Write-Host "Additional args: $additionalArgs" - -. $PSScriptRoot\common\tools.ps1 - -# docker build -f old\scripts\docker\rhel\Dockerfile --build-arg USER_ID=1000 -t redhat . -# docker run -it -v c:\git\core-sdk-arcade:/opt/code redhat bash - -$dockerFile = Resolve-Path (Join-Path $RepoRoot "eng\docker\$dockerImageName") - -docker build --build-arg WORK_DIR=$RepoRoot --build-arg USER_ID=1000 -t "$dockerContainerTag" $dockerFile - -$interactiveFlag = "-i" -if ($noninteractive) -{ - $interactiveFlag = "" -} - -` # -e DOTNET_INSTALL_DIR=/opt/code/artifacts/docker/$dockerImageName/.dotnet ` - -docker run $interactiveFlag -t --rm --sig-proxy=true ` - --name "$dockerContainerName" ` - -v "${RepoRoot}:${RepoRoot}" ` - -e DOTNET_CORESDK_IGNORE_TAR_EXIT_CODE=1 ` - -e CHANNEL ` - -e DOTNET_BUILD_SKIP_CROSSGEN ` - -e PUBLISH_TO_AZURE_BLOB ` - -e NUGET_FEED_URL ` - -e NUGET_API_KEY ` - -e ARTIFACT_STORAGE_ACCOUNT ` - -e ARTIFACT_STORAGE_CONTAINER ` - -e CHECKSUM_STORAGE_ACCOUNT ` - -e CHECKSUM_STORAGE_CONTAINER ` - -e BLOBFEED_STORAGE_CONTAINER ` - -e CLIBUILD_SKIP_TESTS ` - -e COMMITCOUNT ` - -e DROPSUFFIX ` - -e RELEASESUFFIX ` - -e COREFXAZURECONTAINER ` - -e AZUREACCOUNTNAME ` - -e RELEASETOOLSGITURL ` - -e CORESETUPBLOBROOTURL ` - -e PB_ASSETROOTURL ` - -e PB_PACKAGEVERSIONPROPSURL ` - -e PB_PUBLISHBLOBFEEDURL ` - -e EXTERNALRESTORESOURCES ` - -e ARCADE_PARTITION="${dockerImageName}" ` - $dockerContainerTag ` - ${RepoRoot}/run-build.sh @additionalArgs \ No newline at end of file diff --git a/eng/dockerrun.sh b/eng/dockerrun.sh deleted file mode 100755 index 775ca367d..000000000 --- a/eng/dockerrun.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -set -e - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -cd "$DIR/.." - -INTERACTIVE="-i" - -while [[ $# > 0 ]]; do - key=$1 - - case $key in - --non-interactive) - INTERACTIVE= - ;; - -i|--image) - DOCKER_IMAGENAME=$2 - shift - ;; - -d|--dockerfile) - DOCKERFILE=$2 - shift - ;; - -h|-?|--help) - echo "Usage: $0 [-d|--dockerfile ] [-i|--image ] " - echo "" - echo "Options:" - echo " The path to the Dockerfile to use to create the build container" - echo " The name of an existing Dockerfile folder under eng/docker to use as the Dockerfile" - echo " The command to run once inside the container (repo root is mapped to DOCKER_HOST_SHARE_DIR; defaults to nothing, which runs the default shell)" - exit 0 - ;; - *) - break # the first non-switch we get ends parsing - ;; - esac - - shift -done - -if [ -z "$DOCKERFILE" ]; then - if [ -z "$DOCKER_IMAGENAME" ]; then - if [ "$(uname)" == "Darwin" ]; then - echo "Defaulting to 'ubuntu' image for Darwin" - export DOCKERFILE=eng/docker/ubuntu - elif [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then - echo "Detected current OS as Ubuntu, determining ubuntu version to use..." - if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then - echo "using 'ubuntu.16.04' image" - export DOCKERFILE=eng/docker/ubuntu.16.04 - else - echo "using 'ubuntu' image" - export DOCKERFILE=eng/docker/ubuntu - fi - elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then - echo "Detected current OS as CentOS, using 'centos' image" - export DOCKERFILE=eng/docker/centos - elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then - echo "Detected current OS as rhel, using 'rhel' image" - export DOCKERFILE=eng/docker/rhel - elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then - echo "Detected current OS as Debian, using 'debian' image" - export DOCKERFILE=eng/docker/debian - elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then - echo "Detected current OS as Fedora, determining fedora version to use..." - if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then - echo "using 'fedora.23' image" - export DOCKERFILE=eng/docker/fedora.23 - fi - else - echo "Unknown Linux Distro. Using 'ubuntu' image" - export DOCKERFILE=eng/docker/ubuntu - fi - else - echo "Using requested image: $DOCKER_IMAGENAME" - export DOCKERFILE="eng/docker/$DOCKER_IMAGENAME" - fi -fi - -[ -z "$DOTNET_BUILD_CONTAINER_TAG" ] && DOTNET_BUILD_CONTAINER_TAG="dotnetcli-build" -[ -z "$DOTNET_BUILD_CONTAINER_NAME" ] && DOTNET_BUILD_CONTAINER_NAME="dotnetcli-build-container" -[ -z "$DOCKER_HOST_SHARE_DIR" ] && DOCKER_HOST_SHARE_DIR=$(pwd) - -# Make container names CI-specific if we're running in CI -# Jenkins -[ ! -z "$BUILD_TAG" ] && DOTNET_BUILD_CONTAINER_NAME="$BUILD_TAG" -# VSO -[ ! -z "$BUILD_BUILDID" ] && DOTNET_BUILD_CONTAINER_NAME="$BUILD_BUILDID" - -function retry { - local max_count=$1 - shift - - local count=0 - until "$@"; do - exit=$? - wait=$((2 ** $count)) - count=$(($count + 1)) - if [[ ${count} -lt ${max_count} ]]; then - echo "Retry $count/$max_count returned $exit, wait $wait seconds..." - sleep ${wait} - else - echo "Retry $count/$max_count returned $exit." - return ${exit} - fi - done - return 0 -} - -# Build the docker container (will be fast if it is already built) -# with retry since docker pull has high failure rate -echo "Building Docker Container using Dockerfile: $DOCKERFILE" -retry 10 docker build --build-arg WORK_DIR=$DOCKER_HOST_SHARE_DIR --build-arg USER_ID=$(id -u) -t $DOTNET_BUILD_CONTAINER_TAG $DOCKERFILE 2>&1 - -# Run the build in the container -echo "Launching build in Docker Container" -echo "Running command: $BUILD_COMMAND" -echo "Using code from: $DOCKER_HOST_SHARE_DIR" -[ -z "$INTERACTIVE" ] || echo "Running Interactive" - -# Note: passwords/keys should not be passed in the environment -docker run $INTERACTIVE -t --rm --sig-proxy=true \ - --name $DOTNET_BUILD_CONTAINER_NAME \ - -v $DOCKER_HOST_SHARE_DIR:$DOCKER_HOST_SHARE_DIR \ - -e CHANNEL \ - -e DOTNET_BUILD_SKIP_CROSSGEN \ - -e PUBLISH_TO_AZURE_BLOB \ - -e NUGET_FEED_URL \ - -e NUGET_API_KEY \ - -e ARTIFACT_STORAGE_ACCOUNT \ - -e ARTIFACT_STORAGE_CONTAINER \ - -e CHECKSUM_STORAGE_ACCOUNT \ - -e CHECKSUM_STORAGE_CONTAINER \ - -e BLOBFEED_STORAGE_CONTAINER \ - -e CLIBUILD_SKIP_TESTS \ - -e COMMITCOUNT \ - -e DROPSUFFIX \ - -e RELEASESUFFIX \ - -e COREFXAZURECONTAINER \ - -e AZUREACCOUNTNAME \ - -e RELEASETOOLSGITURL \ - -e CORESETUPBLOBROOTURL \ - -e PB_ASSETROOTURL \ - -e PB_PACKAGEVERSIONPROPSURL \ - -e PB_PUBLISHBLOBFEEDURL \ - -e _PUBLISHBLOBFEEDURL \ - -e _ASSETROOTURL \ - -e _PACKAGEVERSIONPROPSURL \ - -e EXTERNALRESTORESOURCES \ - -e BUILD_REPOSITORY_URI \ - -e BUILD_REPOSITORY_NAME \ - -e BUILD_SOURCEBRANCH \ - -e BUILD_BUILDNUMBER \ - -e BUILD_BUILDID \ - -e BUILD_SOURCEVERSION \ - -e SYSTEM_TEAMPROJECT \ - -e POSTBUILDSIGN \ - -e SYSTEM_DEFINITIONID \ - -e SYSTEM_TEAMFOUNDATIONCOLLECTIONURI \ - -e AGENT_JOBNAME \ - -e AGENT_OS \ - -e VSS_NUGET_URI_PREFIXES \ - -e VSS_NUGET_ACCESSTOKEN \ - -e DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 \ - -e NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED=true \ - $DOTNET_BUILD_CONTAINER_TAG \ - $BUILD_COMMAND "$@" diff --git a/eng/install-scancode.sh b/eng/install-scancode.sh new file mode 100755 index 000000000..049b749c2 --- /dev/null +++ b/eng/install-scancode.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -euo pipefail + +# Install instructions: https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-as-a-library-via-pip + +# See latest release at https://github.com/nexB/scancode-toolkit/releases +SCANCODE_VERSION="32.1.0" + +pyEnvPath="/tmp/scancode-env" +python3 -m venv $pyEnvPath +source $pyEnvPath/bin/activate +pip install scancode-toolkit==$SCANCODE_VERSION +deactivate + +# Setup a script which executes scancode in the virtual environment +cat > /usr/local/bin/scancode << EOF +#!/bin/bash +set -euo pipefail +source $pyEnvPath/bin/activate +scancode "\$@" +deactivate +EOF + +chmod +x /usr/local/bin/scancode diff --git a/eng/loc/wxl_loc.lss b/eng/loc/wxl_loc.lss new file mode 100644 index 000000000..2ee0c3c76 --- /dev/null +++ b/eng/loc/wxl_loc.lss @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/localization.yml b/eng/localization.yml new file mode 100644 index 000000000..c3ee2613b --- /dev/null +++ b/eng/localization.yml @@ -0,0 +1,30 @@ +# +# See https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for details on this file. +# + +schedules: +# Cron timezone is UTC. +- cron: "0 18 * * *" + displayName: Run tests daily at 6 PM UTC (11 AM PT) + branches: + include: + - main + always: true + +# Do not run in PR builds nor support other triggers. +pr: none +trigger: none + +variables: +- name: _TeamName + value: SDK + +jobs: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.Reason'], 'Manual'))) }}: + - template: /eng/common/templates/job/onelocbuild.yml + parameters: + CreatePr: ${{ ne(variables['Build.Reason'], 'Manual') }} + LclPackageId: 'LCL-JUNO-PROD-DOTNETINSTALLER' + LclSource: lclFilesFromPackage + MirrorBranch: main + MirrorRepo: installer \ No newline at end of file diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml new file mode 100644 index 000000000..542320fd7 --- /dev/null +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -0,0 +1,293 @@ +### This job source-builds https://github.com/dotnet/dotnet with given parameters +### If run in a PR, new changes are applied to a local copy of the VMR, then it is source-built and tested + +parameters: +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet directly + type: boolean + +- name: vmrPath + type: string + default: $(Agent.BuildDirectory)/vmr + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: $(Build.SourceBranch) + +- name: buildName + type: string + +- name: architecture + type: string + +- name: container + type: string + +- name: pool + type: object + +# Allow downloading artifacts from the internet during the build +- name: runOnline + type: boolean + +# Name of a previous job (from the same template as this) whose output will be used to build this job +# The SDK from its artifacts is copied to vmr/.dotnet +- name: reuseBuildArtifactsFrom + type: string + default: '' + +- name: excludeOmniSharpTests + type: boolean + +- name: enablePoison + type: boolean + +# Instead of building the VMR directly, exports the sources into a tarball and builds from that +- name: buildFromArchive + type: boolean + +# Use the previous version's SDK to build the current one +- name: withPreviousSDK + type: boolean + default: false + +- name: useMonoRuntime + displayName: True when build output uses the mono runtime + type: boolean + default: false + +jobs: +- job: ${{ parameters.buildName }}_${{ parameters.architecture }} + timeoutInMinutes: 150 + pool: ${{ parameters.pool }} + ${{ if ne(parameters.reuseBuildArtifactsFrom, '') }}: + # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status. + # The build shortcuts when stage 1 build fails and doesn't produce the SDK. + condition: succeededOrFailed() + dependsOn: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }} + variables: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/variables/pool-providers.yml + - ${{ else }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: AzureDevOps-Artifact-Feeds-Pats + - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal'), not(startswith(parameters.vmrBranch, 'internal/release/')), not(eq(variables['Build.Reason'], 'PullRequest'))) }}: + - group: DotNetBot-GitHub + - ${{ else }}: + - name: BotAccount-dotnet-bot-repo-PAT + value: N/A + - name: additionalBuildArgs + value: '' + + # Location of the VMR sources + # We either build the repo directly, or we extract them outside (which is what partners do) + - ${{ if parameters.buildFromArchive }}: + - name: sourcesPath + value: $(Build.StagingDirectory)/dotnet-sources/ + - ${{ else }}: + - name: sourcesPath + value: ${{ parameters.vmrPath }} + + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish BuildLogs' + condition: succeededOrFailed() + targetPath: '$(Build.StagingDirectory)/BuildLogs' + artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + - output: pipelineArtifact + displayName: 'Publish Artifacts' + condition: succeededOrFailed() + targetPath: '${{ variables.sourcesPath }}/artifacts/${{ parameters.architecture }}/Release/' + artifactName: $(Agent.JobName)_Artifacts + + steps: + - template: ../steps/vmr-prepare.yml@self + parameters: + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + vmrBranch: $(System.PullRequest.TargetBranch) + ${{ else }}: + vmrBranch: ${{ parameters.vmrBranch }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + skipComponentGovernanceDetection: true + + # Synchronize new content in the VMR during PRs (we expect this to come + - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['Build.Reason'], 'PullRequest')) }}: + - template: ../steps/vmr-pull-updates.yml@self + parameters: + vmrPath: ${{ parameters.vmrPath }} + vmrBranch: ${{ parameters.vmrBranch }} + targetRef: $(Build.SourceVersion) # Synchronize the current installer commit + + - ${{ if parameters.buildFromArchive }}: + - script: | + set -ex + cp -r "${{ parameters.vmrPath }}" "$(sourcesPath)" + rm -rf "$(sourcesPath)/.git" + displayName: Export VMR sources + workingDirectory: $(Build.StagingDirectory) + + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - script: cp "$(sourcesPath)/src/installer/NuGet.config" "$(sourcesPath)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config" + displayName: Copy Test NuGet Config + + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(sourcesPath)/src/installer/eng/common/SetupNugetSources.sh + arguments: $(sourcesPath)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + + - ${{ if ne(parameters.reuseBuildArtifactsFrom, '') }}: + - download: current + artifact: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts + patterns: | + **/Private.SourceBuilt.Artifacts.*.tar.gz + **/dotnet-sdk-*.tar.gz + displayName: Download Previous Build + + - task: CopyFiles@2 + displayName: Copy Previous Build + inputs: + SourceFolder: $(Pipeline.Workspace)/${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts + Contents: '*.tar.gz' + TargetFolder: ${{ variables.sourcesPath }}/prereqs/packages/archive/ + + - ${{ if eq(parameters.withPreviousSDK, 'true') }}: + - script: | + set -euo pipefail + + packageVersionsPath="${{ variables.sourcesPath }}/eng/Versions.props" + notFoundMessage="No source-built SDK found to download..." + + echo "Looking for source-built SDK to download..." + archiveUrlLine=`grep -m 1 "" "$packageVersionsPath" || :` + urlPattern="(.*)" + + if [[ $archiveUrlLine =~ $urlPattern ]]; then + archiveUrl="${BASH_REMATCH[1]}" + downloadDir="$(sourcesPath)/prereqs/packages/archive/" + (cd $downloadDir && curl --retry 5 -O $archiveUrl) + else + echo "$notFoundMessage" + exit 1 + fi + displayName: Setup Previously Source-Built SDK + + - script: | + set -x + + customPrepArgs="" + prepSdk=true + if [[ '${{ parameters.withPreviousSDK }}' == 'True' ]]; then + # Source-built artifacts are from CentOS 8 Stream. We want to download them without + # downloading portable versions from the internet. + customPrepArgs="${customPrepArgs} --no-sdk --no-bootstrap" + prepSdk=false + elif [[ -n '${{ parameters.reuseBuildArtifactsFrom }}' ]]; then + customPrepArgs="${customPrepArgs} --no-sdk --no-artifacts" + prepSdk=false + fi + + if [[ "$prepSdk" == "false" ]]; then + mkdir $(sourcesPath)/.dotnet + previousSdkPath="$(sourcesPath)/prereqs/packages/archive/dotnet-sdk-*.tar.gz" + eval tar -ozxf "$previousSdkPath" -C "$(sourcesPath)/.dotnet" + eval rm -f "$previousSdkPath" + + echo "##vso[task.setvariable variable=additionalBuildArgs]--with-sdk /vmr/.dotnet" + fi + + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh $customPrepArgs + displayName: Prep the Build + + - script: | + set -x + df -h + + # Allows Arcade to have access to the commit for the build + customRunArgs="-e BUILD_SOURCEVERSION" + customBuildArgs= + if [[ '${{ parameters.runOnline }}' == 'True' ]]; then + customBuildArgs='--online' + else + customRunArgs="$customRunArgs --network none" + fi + + if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then + customBuildArgs="$customBuildArgs --poison" + fi + + if [[ '${{ parameters.buildFromArchive }}' == 'True' ]]; then + customBuildArgs="$customBuildArgs --source-repository https://github.com/dotnet/dotnet" + customBuildArgs="$customBuildArgs --source-version $(git -C "${{ parameters.vmrPath }}" rev-parse HEAD)" + fi + + if [[ '${{ parameters.useMonoRuntime }}' == 'True' ]]; then + customBuildArgs="$customBuildArgs --use-mono-runtime" + fi + + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs + displayName: Build + + - script: | + set -x + + dockerVolumeArgs="-v $(sourcesPath):/vmr" + dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=${{ parameters.excludeOmniSharpTests }} -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true -e SMOKE_TESTS_RUNNING_IN_CI=true" + poisonArg='' + + if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then + poisonArg='--poison' + fi + + docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed + displayName: Run Tests + + # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. + - script: | + set -x + + targetFolder=$(Build.StagingDirectory)/BuildLogs/ + mkdir -p ${targetFolder} + + cd "$(sourcesPath)" + find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; + find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; + displayName: Prepare BuildLogs staging directory + continueOnError: true + condition: succeededOrFailed() + + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - publish: '$(Build.StagingDirectory)/BuildLogs' + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + displayName: Publish BuildLogs + continueOnError: true + condition: succeededOrFailed() + + - publish: '${{ variables.sourcesPath }}/artifacts/${{ parameters.architecture }}/Release/' + artifact: $(Agent.JobName)_Artifacts + displayName: Publish Artifacts + condition: succeededOrFailed() + continueOnError: true + + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + continueOnError: true + inputs: + testRunner: vSTest + testResultsFiles: 'test/**/*.trx' + searchFolder: ${{ variables.sourcesPath }} + mergeTestResults: true + publishRunAttachments: true + testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml new file mode 100644 index 000000000..e3f20ce7b --- /dev/null +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -0,0 +1,90 @@ +### This job synchronizes code from product repositories into the VMR (https://github.com/dotnet/dotnet) +### It synchronizes the content of the VMR to this new commit and pushes the changes + +parameters: +- name: targetRef + displayName: Target revision of dotnet/installer to synchronize + type: string + default: $(Build.SourceVersion) + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: $(Build.SourceBranch) + +- name: noPush + displayName: Don't push changes to dotnet/dotnet + type: boolean + default: false + +jobs: +- job: Synchronize_VMR + displayName: Synchronize VMR's ${{ parameters.vmrBranch }} + timeoutInMinutes: 120 + variables: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/variables/pool-providers.yml + - ${{ else }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + - name: vmrPath + value: $(Agent.BuildDirectory)/vmr + - ${{ if not(parameters.noPush) }}: + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + - group: DotNetBot-GitHub + - group: DotNetBot-GitHub-No-Scopes + - name: vmrPublicUrl + value: https://github.com/dotnet/dotnet + - ${{ if and( eq(variables['System.TeamProject'], 'internal'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}: + # https://dev.azure.com/dnceng/internal/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=172&path=DotNetBot-AzDO-PAT + - group: DotNetBot-AzDO-PAT + - name: vmrInternalUrl + value: https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-dotnet + + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-ubuntu-2004-open + os: linux + ${{ else }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals 1es-ubuntu-2004 + os: linux + + steps: + - template: ../steps/vmr-prepare.yml + parameters: + vmrBranch: ${{ parameters.vmrBranch }} + isBuiltFromVmr: false + + - template: ../steps/vmr-pull-updates.yml + parameters: + vmrPath: $(vmrPath) + vmrBranch: ${{ parameters.vmrBranch }} + targetRef: ${{ parameters.targetRef }} + + - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: + # Push main and release branches to the public VMR + - ${{ if or(eq(parameters.vmrBranch, 'main'), startsWith(parameters.vmrBranch, 'release/')) }}: + - script: > + ./.dotnet/dotnet darc vmr push + --vmr '$(vmrPath)' + --commit-verification-pat '$(BotAccount-dotnet-maestro-bot-no-scopes-PAT)' + --branch '${{ parameters.vmrBranch }}' + --remote-url '$(vmrPublicUrl)' + --github-pat '$(BotAccount-dotnet-bot-repo-PAT)' + --verbose + displayName: Push changes to dotnet/dotnet (public) + workingDirectory: $(Agent.BuildDirectory)/installer + + # Push internal/release branches to the internal VMR + - ${{ if startsWith(parameters.vmrBranch, 'internal/release/') }}: + - script: > + ./.dotnet/dotnet darc vmr push + --vmr '$(vmrPath)' + --skip-commit-verification + --branch '${{ parameters.vmrBranch }}' + --remote-url '$(vmrInternalUrl)' + --azdev-pat '$(dn-bot-dnceng-build-rw-code-rw)' + --verbose + displayName: Push changes to dotnet-dotnet (internal) + workingDirectory: $(Agent.BuildDirectory)/installer diff --git a/eng/pipelines/templates/stages/vmr-build.yml b/eng/pipelines/templates/stages/vmr-build.yml new file mode 100644 index 000000000..04d06cda7 --- /dev/null +++ b/eng/pipelines/templates/stages/vmr-build.yml @@ -0,0 +1,242 @@ +### This stage source-builds https://github.com/dotnet/dotnet with varying parameters +### If run in a PR, new changes are applied to a local copy of the VMR, then it is source-built and tested + +parameters: +- name: dependsOn + type: object + default: [] +- name: condition + type: string + default: always() + + # Branch of the VMR to use (to push to for internal builds) +- name: vmrBranch + type: string + default: $(Build.SourceBranch) + + # True when build is running from dotnet/dotnet directly +- name: isBuiltFromVmr + type: boolean + default: false + +# These are not expected to be passed it but rather just object variables reused below +- name: pool_Linux + type: object + default: + name: $(defaultPoolName) + image: $(poolImage_Linux) + demands: ImageOverride -equals $(poolImage_Linux) + os: linux + +- name: pool_LinuxArm64 + type: object + default: + name: $(poolName_LinuxArm64) + image: $(poolImage_LinuxArm64) + demands: ImageOverride -equals $(poolImage_LinuxArm64) + hostArchitecture: Arm64 + os: linux + +stages: +- stage: VMR_Source_Build + displayName: VMR Source-Build + dependsOn: ${{ parameters.dependsOn }} + condition: ${{ parameters.condition }} + variables: + - template: ../variables/vmr-build.yml@self + - ${{ if ne(parameters.vmrBranch, '') }}: + - name: VmrBranch + value: ${{ parameters.vmrBranch }} + - ${{ else }}: + - name: VmrBranch + value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} + + jobs: + + # PR and CI legs ------------------------------------ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Online_MsftSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: true # ✅ + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_MsftSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: true # ✅ + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + + # CI - Stage 1 x64 legs ------------------------------------ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_MsftSdk', variables.alpineName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.alpineContainer }} + buildFromArchive: false # ✅ + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Online_PreviousSourceBuiltSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: true # ✅ + useMonoRuntime: false # 🚫 + withPreviousSDK: true # ✅ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_PreviousSourceBuiltSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: true # ✅ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Mono_Offline_MsftSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: true # ✅ + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + useMonoRuntime: true # ✅ + withPreviousSDK: false # 🚫 + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_MsftSdk', variables.fedoraName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.fedoraContainer }} + buildFromArchive: true # ✅ + enablePoison: true # ✅ + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_MsftSdk', variables.ubuntuName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.ubuntuContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + # CI - Stage 1 arm64 Legs ------------------------------------ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}Arm64_Offline_MsftSdk', variables.ubuntuName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: arm64 + pool: ${{ parameters.pool_LinuxArm64 }} + container: ${{ variables.ubuntuArmContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + + # CI - Stage 2 x64 Legs ------------------------------------ + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Online_CurrentSourceBuiltSdk', variables.centOSStreamName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.centOSStreamContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + reuseBuildArtifactsFrom: ${{ format('{0}_Online_MsftSdk', variables.centOSStreamName) }} + + - template: ../jobs/vmr-build.yml@self + parameters: + # Changing the build name requires updating the referenced name in the source-build-sdk-diff-tests.yml pipeline + buildName: ${{ format('{0}_Offline_CurrentSourceBuiltSdk', variables.fedoraName) }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: x64 + pool: ${{ parameters.pool_Linux }} + container: ${{ variables.fedoraContainer }} + buildFromArchive: false # 🚫 + enablePoison: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + useMonoRuntime: false # 🚫 + withPreviousSDK: false # 🚫 + reuseBuildArtifactsFrom: ${{ format('{0}_Offline_MsftSdk', variables.fedoraName) }} diff --git a/eng/pipelines/templates/steps/vmr-prepare.yml b/eng/pipelines/templates/steps/vmr-prepare.yml new file mode 100644 index 000000000..644891799 --- /dev/null +++ b/eng/pipelines/templates/steps/vmr-prepare.yml @@ -0,0 +1,43 @@ +### These steps clone the VMR (https://github.com/dotnet/dotnet) into $(Agent.BuildDirectory)/vmr +### Component Governance scan is also triggered over the VMR's non-repo sources + +parameters: +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet directly + type: boolean + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: $(Build.SourceBranch) + +- name: skipComponentGovernanceDetection + type: boolean + default: false + +steps: +- ${{ if parameters.isBuiltFromVmr }}: + - checkout: self + displayName: Clone dotnet/dotnet + path: vmr + clean: true + +- ${{ else }}: + - checkout: vmr + displayName: Clone dotnet/dotnet + path: vmr + clean: true + +- script: | + git checkout --track origin/${{ parameters.vmrBranch }} + echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + displayName: Check out ${{ parameters.vmrBranch }} + workingDirectory: $(Agent.BuildDirectory)/vmr + +# TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG? +# Currently, we ignore dirs of individual repos - they have been scanned before +- ${{ if and(not(parameters.skipComponentGovernanceDetection), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: + - task: ComponentGovernanceComponentDetection@0 + inputs: + sourceScanPath: $(Agent.BuildDirectory)/vmr + ignoreDirectories: $(Agent.BuildDirectory)/vmr/src diff --git a/eng/pipelines/templates/steps/vmr-pull-updates.yml b/eng/pipelines/templates/steps/vmr-pull-updates.yml new file mode 100644 index 000000000..4d68b2a03 --- /dev/null +++ b/eng/pipelines/templates/steps/vmr-pull-updates.yml @@ -0,0 +1,51 @@ +### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet). +### They initialize the darc CLI and pull the new updates. +### Changes are applied locally onto the already cloned VMR (located in $vmrPath). + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + +- name: targetRef + displayName: Target revision in dotnet/installer to synchronize + type: string + default: $(Build.SourceVersion) + +- name: vmrPath + displayName: Path where the dotnet/dotnet is checked out to + type: string + default: $(Agent.BuildDirectory)/vmr + +steps: +- checkout: self + displayName: Clone dotnet/installer + path: installer + +# This step is needed so that when we get a detached HEAD / shallow clone, +# we still pull the commit into the temporary installer clone to use it during the sync. +- script: | + git branch installer-head + displayName: Label PR commit + workingDirectory: $(Agent.BuildDirectory)/installer + +- script: | + git checkout -B ${{ parameters.vmrBranch }} + echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + displayName: Prepare branch ${{ parameters.vmrBranch }} + workingDirectory: ${{ parameters.vmrPath }} + +- script: > + ./eng/vmr-sync.sh + --vmr ${{ parameters.vmrPath }} + --tmp $(Agent.TempDirectory) + --azdev-pat '$(dn-bot-all-orgs-code-r)' + --branch ${{ parameters.vmrBranch }} + --repository "installer:${{ parameters.targetRef }}" + --recursive + --remote "installer:$(pwd)" + --component-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/Component.template.md + --tpn-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt + --debug + displayName: Synchronize dotnet/dotnet + workingDirectory: $(Agent.BuildDirectory)/installer diff --git a/eng/pipelines/templates/variables/vmr-build.yml b/eng/pipelines/templates/variables/vmr-build.yml new file mode 100644 index 000000000..2d8db1587 --- /dev/null +++ b/eng/pipelines/templates/variables/vmr-build.yml @@ -0,0 +1,54 @@ +variables: +- name: alpineContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode +- name: centOSStreamContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 +- name: fedoraContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-40 +- name: ubuntuContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04 +- name: ubuntuArmContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-arm64 + +- name: alpineName + value: Alpine319 +- name: centOSStreamName + value: CentOSStream9 +- name: fedoraName + value: Fedora40 +- name: ubuntuName + value: Ubuntu2204 + +- name: alpineX64Rid + value: alpine.3.19-x64 +- name: centOSStreamX64Rid + value: centos.9-x64 +- name: fedoraX64Rid + value: fedora.40-x64 +- name: ubuntux64Rid + value: ubuntu.22.04-x64 +- name: ubuntuArm64Rid + value: ubuntu.22.04-arm64 + +- ${{ if eq(variables['System.TeamProject'], 'public') }}: + - name: defaultPoolName + value: NetCore-Public-XL + - name: poolImage_Linux + value: 1es-ubuntu-2004-open + - name: poolImage_LinuxArm64 + value: Mariner-2-Docker-ARM64 + - name: poolName_LinuxArm64 + value: Docker-Linux-Arm-Public +- ${{ else }}: + - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: + - name: defaultPoolName + value: NetCore1ESPool-Internal-XL + - ${{ else }}: + - name: defaultPoolName + value: $(DncEngInternalBuildPool) + - name: poolImage_Linux + value: 1es-ubuntu-2204 + - name: poolImage_LinuxArm64 + value: Mariner-2-Docker-ARM64 + - name: poolName_LinuxArm64 + value: Docker-Linux-Arm-Internal diff --git a/eng/pipelines/vmr-build-internal.yml b/eng/pipelines/vmr-build-internal.yml new file mode 100644 index 000000000..a28dd253f --- /dev/null +++ b/eng/pipelines/vmr-build-internal.yml @@ -0,0 +1,53 @@ +trigger: none +pr: + branches: + include: + - main + - release/* + - internal/release/* + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: ' ' + +- name: disableVmrBuild + displayName: Skip source-building the VMR + type: boolean + default: false + +variables: +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: internal/release/8.0.1xx + +resources: + repositories: + - repository: vmr + type: git + name: dotnet-dotnet + ref: $(VmrBranch) + +stages: +# You can temporarily disable the VMR Build stage by changing the default of disableVmrBuild +- ${{ if not(parameters.disableVmrBuild) }}: + - template: templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + isBuiltFromVmr: false + +# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate +# that the PR can be merged and later synchronized into the VMR without problems. +- ${{ else }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + noPush: true diff --git a/eng/pipelines/vmr-build-pr.yml b/eng/pipelines/vmr-build-pr.yml new file mode 100644 index 000000000..3c51dfe6e --- /dev/null +++ b/eng/pipelines/vmr-build-pr.yml @@ -0,0 +1,56 @@ +# This is the non-1ES PR pipeline source-building the VMR used in installer PRs +# https://dev.azure.com/dnceng-public/public/_build?definitionId=233 + +trigger: none +pr: + branches: + include: + - main + - release/* + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: ' ' + +- name: disableVmrBuild + displayName: Skip source-building the VMR + type: boolean + default: false + +variables: +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: release/8.0.1xx + +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + ref: $(VmrBranch) + +stages: +# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable +- ${{ if not(parameters.disableVmrBuild) }}: + - template: templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + isBuiltFromVmr: false + +# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate +# that the PR can be merged and later synchronized into the VMR without problems. +- ${{ else }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + noPush: true diff --git a/eng/pipelines/vmr-build.yml b/eng/pipelines/vmr-build.yml new file mode 100644 index 000000000..3f2e1c759 --- /dev/null +++ b/eng/pipelines/vmr-build.yml @@ -0,0 +1,53 @@ +trigger: none +pr: + branches: + include: + - main + - release/* + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: ' ' + +- name: disableVmrBuild + displayName: Skip source-building the VMR + type: boolean + default: false + +variables: +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: release/8.0.1xx + +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + ref: $(VmrBranch) + +stages: +# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable +- ${{ if not(parameters.disableVmrBuild) }}: + - template: templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + isBuiltFromVmr: false + +# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate +# that the PR can be merged and later synchronized into the VMR without problems. +- ${{ else }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + noPush: true diff --git a/eng/pipelines/vmr-sync-internal.yml b/eng/pipelines/vmr-sync-internal.yml new file mode 100644 index 000000000..cb0877ea2 --- /dev/null +++ b/eng/pipelines/vmr-sync-internal.yml @@ -0,0 +1,64 @@ +pr: none + +trigger: + batch: true + branches: + include: + - internal/release/* + exclude: + - internal/release/*.0.2xx + - internal/release/*.0.3xx + - internal/release/*.0.4xx + +resources: + repositories: + - repository: vmr + type: git + name: dotnet-dotnet + ref: $(Build.SourceBranch) + + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +parameters: +- name: vmrBranch + displayName: dotnet-dotnet branch to push to + type: string + default: ' ' + +variables: +- template: /eng/common/templates-official/variables/pool-providers.yml@self + +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + sdl: + sourceAnalysisPool: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows + + sourceRepositoriesToScan: + exclude: + - repository: vmr + + componentgovernance: + sourceScanPath: $(Agent.BuildDirectory)/vmr + ignoreDirectories: $(Agent.BuildDirectory)/vmr/src + + stages: + - stage: VMRSynchronization + displayName: VMR Synchronization + jobs: + - template: /eng/pipelines/templates/jobs/vmr-synchronization.yml@self + parameters: + vmrBranch: ${{ variables.VmrBranch }} \ No newline at end of file diff --git a/eng/pipelines/vmr-sync.yml b/eng/pipelines/vmr-sync.yml new file mode 100644 index 000000000..7de3ef614 --- /dev/null +++ b/eng/pipelines/vmr-sync.yml @@ -0,0 +1,66 @@ +pr: none + +trigger: + batch: true + branches: + include: + - main + - release/* + exclude: + - release/*.0.2xx + - release/*.0.3xx + - release/*.0.4xx + +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + ref: $(Build.SourceBranch) + + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: ' ' + +variables: +- template: /eng/common/templates-official/variables/pool-providers.yml@self + +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + sdl: + sourceAnalysisPool: + name: $(DncEngInternalBuildPool) + image: 1es-windows-2022 + os: windows + + sourceRepositoriesToScan: + exclude: + - repository: vmr + + componentgovernance: + sourceScanPath: $(Agent.BuildDirectory)/vmr + ignoreDirectories: $(Agent.BuildDirectory)/vmr/src + + stages: + - stage: VMRSynchronization + displayName: VMR Synchronization + jobs: + - template: /eng/pipelines/templates/jobs/vmr-synchronization.yml@self + parameters: + vmrBranch: ${{ variables.VmrBranch }} diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index f8e541c82..893a96111 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -25,11 +25,12 @@ function CreateBuildEnvScript() $scriptContents = @" @echo off title Core SDK Build ($RepoRoot) -set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 set DOTNET_MULTILEVEL_LOOKUP=0 set PATH=$env:DOTNET_INSTALL_DIR;%PATH% set NUGET_PACKAGES=$env:NUGET_PACKAGES + +set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR "@ Out-File -FilePath $scriptPath -InputObject $scriptContents -Encoding ASCII diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index 42ee4d364..cd17755d5 100644 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -13,10 +13,6 @@ function InitializeCustomSDKToolset { #InstallDotNetSharedFramework "1.1.2" InitializeDotNetCli true - # Install 2.1 framework for dotnet-deb-tool. - # Failures on this call will be ignored, as this is expected to fail on some - # OSes. - InstallDotNetSharedFramework "2.1.0" } # Installs additional shared frameworks for testing purposes diff --git a/eng/source-build-tarball-build-official.yml b/eng/source-build-tarball-build-official.yml deleted file mode 100644 index bef9853c4..000000000 --- a/eng/source-build-tarball-build-official.yml +++ /dev/null @@ -1,42 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: installer-build-resource - source: dotnet-installer-official-ci - trigger: - branches: - include: - - main - - release/* - - internal/release/* - exclude: - - release/6.0.3xx - - internal/release/6.0.3xx - - release/6.0.4xx - - internal/release/6.0.4xx - stages: - - build - repositories: - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release - -extends: - template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates - parameters: - sdl: - sourceAnalysisPool: - name: NetCore1ESPool-Svc-Internal - image: 1es-windows-2022 - os: windows - customBuildTags: - - ES365AIMigrationTooling - stages: - - stage: build - jobs: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml@self - parameters: - installerBuildResourceId: installer-build-resource diff --git a/eng/vmr-sync.sh b/eng/vmr-sync.sh new file mode 100755 index 000000000..92f34d690 --- /dev/null +++ b/eng/vmr-sync.sh @@ -0,0 +1,281 @@ +#!/bin/bash + +### This script is used for synchronizing the dotnet/dotnet VMR locally. This means pulling new +### code from various repositories into the 'dotnet/dotnet' repository. +### +### The script is used during CI to ingest new code based on dotnet/installer but it can also help +### for reproducing potential failures during installer's PRs, namely to fix the Source-Build. +### Another usecase is to try manually synchronizing a given commit of some repo into the VMR and +### trying to Source-Build the VMR. This can help when fixing the Source-Build but using a commit +### from a not-yet merged branch (or fork) to test the fix will help. +### +### The tooling that synchronizes the VMR will need to clone the various repositories into a temporary +### folder. These clones can be re-used in future synchronizations so it is advised you dedicate a +### folder to this to speed up your re-runs. +### +### USAGE: +### Synchronize current installer and all dependencies into a local VMR: +### ./vmr-sync.sh --vmr "$HOME/repos/dotnet" --tmp "$HOME/repos/tmp" +### +### Synchronize the VMR to a specific commit of dotnet/runtime using custom fork: +### ./vmr-sync.sh \ +### --repository runtime:e7e71da303af8dc97df99b098f21f526398c3943 \ +### --remote runtime:https://github.com/yourfork/runtime \ +### --tmp "$HOME/repos/tmp" +### +### Options: +### -t, --tmp, --tmp-dir PATH +### Required. Path to the temporary folder where repositories will be cloned +### +### -b, --branch, --vmr-branch BRANCH_NAME +### Optional. Branch of the 'dotnet/dotnet' repo to synchronize. The VMR will be checked out to this branch +### +### --debug +### Optional. Turns on the most verbose logging for the VMR tooling +### +### --component-template +### Optional. Template for VMRs Component.md used for regenerating the file to list the newest versions of +### components. +### Defaults to src/VirtualMonoRepo/Component.template.md +### +### --recursive +### Optional. Recursively synchronize all the source build dependencies (declared in Version.Details.xml) +### This is used when performing the full synchronization during installer's CI and the final VMR sync. +### Defaults to false unless no repository is supplied in which case a recursive sync of installer is performed. +### +### --remote name:URI +### Optional. Additional remote to use during the synchronization +### This can be used to synchronize to a commit from a fork of the repository +### Example: 'runtime:https://github.com/yourfork/runtime' +### +### -r, --repository name:GIT_REF +### Optional. Repository + git ref separated by colon to synchronize to. +### This can be a specific commit, branch, tag. +### If not supplied, the revision of the parent installer repository of this script will be used (recursively). +### Example: 'runtime:my-branch-name' +### +### --tpn-template +### Optional. Template for the header of VMRs THIRD-PARTY-NOTICES file. +### Defaults to src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt +### +### --azdev-pat +### Optional. Azure DevOps PAT to use for cloning private repositories. +### +### -v, --vmr, --vmr-dir PATH +### Optional. Path to the dotnet/dotnet repository. When null, gets cloned to the temporary folder + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +function print_help () { + sed -n '/^### /,/^$/p' "$source" | cut -b 5- +} + +COLOR_RED=$(tput setaf 1 2>/dev/null || true) +COLOR_CYAN=$(tput setaf 6 2>/dev/null || true) +COLOR_CLEAR=$(tput sgr0 2>/dev/null || true) +COLOR_RESET=uniquesearchablestring +FAILURE_PREFIX='> ' + +function fail () { + echo "${COLOR_RED}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_RED}}${COLOR_CLEAR}" >&2 +} + +function highlight () { + echo "${COLOR_CYAN}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_CYAN}}${COLOR_CLEAR}" +} + +installer_dir=$(realpath "$scriptroot/../") + +tmp_dir='' +vmr_dir='' +vmr_branch='' +repository='' +additional_remotes='' +recursive=false +verbosity=verbose +readme_template="$installer_dir/src/VirtualMonoRepo/Component.template.md" +tpn_template="$installer_dir/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt" +azdev_pat='' + +# If installer is a repo, we're in an installer and not in the dotnet/dotnet repo +if [[ -d "$installer_dir/.git" ]]; then + additional_remotes="installer:$installer_dir" +fi + +while [[ $# -gt 0 ]]; do + opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -t|--tmp|--tmp-dir) + tmp_dir=$2 + shift + ;; + -v|--vmr|--vmr-dir) + vmr_dir=$2 + shift + ;; + -b|--branch|--vmr-branch) + vmr_branch=$2 + shift + ;; + -r|--repository) + repository=$2 + shift + ;; + --recursive) + recursive=true + ;; + --remote) + additional_remotes="$additional_remotes $2" + shift + ;; + --component-template) + component_template=$2 + shift + ;; + --tpn-template) + tpn_template=$2 + shift + ;; + --azdev-pat) + azdev_pat=$2 + shift + ;; + -d|--debug) + verbosity=debug + ;; + -h|--help) + print_help + exit 0 + ;; + *) + fail "Invalid argument: $1" + print_help + exit 1 + ;; + esac + + shift +done + +# Validation + +if [[ ! -d "$installer_dir" ]]; then + fail "Directory '$installer_dir' does not exist. Please specify the path to the dotnet/installer repo" + exit 1 +fi + +if [[ -z "$tmp_dir" ]]; then + fail "Missing --tmp-dir argument. Please specify the path to the temporary folder where the repositories will be cloned" + exit 1 +fi + +if [[ ! -f "$readme_template" ]]; then + fail "File '$readme_template' does not exist. Please specify a valid path to the README template" + exit 1 +fi + +if [[ ! -f "$tpn_template" ]]; then + fail "File '$tpn_template' does not exist. Please specify a valid path to the THIRD-PARTY-NOTICES template" + exit 1 +fi + +# Sanitize the input + +# Default when no repository is provided +if [[ -z "$repository" ]]; then + repository="installer:$(git -C "$installer_dir" rev-parse HEAD)" + recursive=true +fi + +if [[ -z "$vmr_dir" ]]; then + vmr_dir="$tmp_dir/dotnet" +fi + +if [[ ! -d "$tmp_dir" ]]; then + mkdir -p "$tmp_dir" +fi + +if [[ "$verbosity" == "debug" ]]; then + set -x +fi + +# Prepare the VMR + +if [[ ! -d "$vmr_dir" ]]; then + highlight "Cloning 'dotnet/dotnet' into $vmr_dir.." + git clone https://github.com/dotnet/dotnet "$vmr_dir" + + if [[ -n "$vmr_branch" ]]; then + git -C "$vmr_dir" switch -c "$vmr_branch" + fi +else + if ! git -C "$vmr_dir" diff --quiet; then + fail "There are changes in the working tree of $vmr_dir. Please commit or stash your changes" + exit 1 + fi + + if [[ -n "$vmr_branch" ]]; then + highlight "Preparing $vmr_dir" + git -C "$vmr_dir" checkout "$vmr_branch" + git -C "$vmr_dir" pull + fi +fi + +set -e + +# Prepare darc + +highlight 'Installing .NET, preparing the tooling..' +source "$scriptroot/common/tools.sh" +InitializeDotNetCli true +dotnet=$(realpath "$scriptroot/../.dotnet/dotnet") +"$dotnet" tool restore + +highlight "Starting the synchronization of '$repository'.." +set +e + +recursive_arg='' +if [[ "$recursive" == "true" ]]; then + recursive_arg="--recursive" +fi + +if [[ -n "$additional_remotes" ]]; then + additional_remotes="--additional-remotes $additional_remotes" +fi + +if [[ -n "$azdev_pat" ]]; then + azdev_pat="--azdev-pat $azdev_pat" +fi + +# Synchronize the VMR + +"$dotnet" darc vmr update \ + --vmr "$vmr_dir" \ + --tmp "$tmp_dir" \ + $azdev_pat \ + --$verbosity \ + $recursive_arg \ + $additional_remotes \ + --component-template "$component_template" \ + --tpn-template "$tpn_template" \ + "$repository" + +if [[ $? == 0 ]]; then + highlight "Synchronization succeeded" +else + fail "Synchronization of dotnet/dotnet to '$repository' failed!" + fail "'$vmr_dir' is left in its last state (re-run of this script will reset it)." + fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)." + fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script." + exit 1 +fi diff --git a/global.json b/global.json index 750534f91..7ce95a54a 100644 --- a/global.json +++ b/global.json @@ -1,17 +1,17 @@ { "tools": { - "dotnet": "6.0.130", + "dotnet": "8.0.101", "runtimes": { "dotnet": [ - "$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)" + "$(VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion)" ] } }, "native-tools": { - "cmake": "3.16.4" + "cmake": "3.21.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.24326.2", - "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.24326.2" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24352.1", + "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.24352.1" } } diff --git a/run-build.sh b/run-build.sh index 7b98aedc0..c380d75ce 100755 --- a/run-build.sh +++ b/run-build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. @@ -63,4 +63,8 @@ while [[ $# > 0 ]]; do shift done +source $REPOROOT/eng/common/native/init-os-and-arch.sh +source $REPOROOT/eng/common/native/init-distro-rid.sh +initDistroRidGlobal "$os" "$arch" "" + . "$REPOROOT/eng/common/build.sh" --build --restore "${args[@]}" diff --git a/src/SourceBuild/Arcade/README.md b/src/SourceBuild/Arcade/README.md deleted file mode 100644 index ad15a2f14..000000000 --- a/src/SourceBuild/Arcade/README.md +++ /dev/null @@ -1 +0,0 @@ -The source and targets in the `src/SourceBuild/Arcade` directory are intended to move into the Arcade repo at some point. They are added here for ease of development while developing the tarball generation process. See https://github.com/dotnet/source-build/issues/2295 diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml deleted file mode 100644 index f5569e26b..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml +++ /dev/null @@ -1,223 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Architecture to build - architecture: - - # Custom condition to apply to the job - condition: - - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Skip running the SDK content smoke-tests - excludeSdkContentTests: false - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: - - # Matrix to run jobs over - matrix: - - # Job name - name: - - # Agent pool to use - pool: - - # Build using the previous source-build artifacts - usePreviousArtifacts: false - -jobs: -- job: ${{ parameters.name }} - condition: ${{ parameters.condition }} - dependsOn: ${{ parameters.dependsOn }} - pool: ${{ parameters.pool }} - strategy: - matrix: ${{ parameters.matrix }} - timeoutInMinutes: 300 - variables: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - group: AzureDevOps-Artifact-Feeds-Pats - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - name: additionalBuildArgs - value: --with-sdk /tarball/.dotnet - - name: tarballDir - ${{ if eq(parameters.installerBuildResourceId, '') }}: - value: $(Build.SourcesDirectory) - ${{ else }}: - value: $(Build.StagingDirectory)/tarball - - name: installerSrcDir - ${{ if eq(parameters.installerBuildResourceId, '') }}: - value: $(Build.SourcesDirectory)/src/installer - ${{ else }}: - value: $(Build.SourcesDirectory) - workspace: - clean: all - - steps: - - checkout: self - clean: true - - - ${{ if ne(parameters.installerBuildResourceId, '') }}: - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-source*.tar.gz' - displayName: Download Source Tarball - - - script: | - set -x - - resourceIdPathSegment= - if [[ '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then - resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/' - fi - - mkdir -p "$(tarballDir)" - tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)" - eval rm -f "$tarballFilePath" - displayName: Extract Tarball - - - script: cp $(installerSrcDir)/NuGet.config $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config - displayName: Copy Test NuGet Config - - - ${{ if ne(parameters.excludeSdkContentTests, 'true') }}: - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(preview|rc|rtm)*)-linux*-${{ parameters.architecture }}.tar.gz' - displayName: Download MSFT sdk Tarball - - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - download: current - artifact: $(_PreviousSourceBuildArtifact) - patterns: '*.tar.gz' - displayName: Download Previous Source Build Artifacts - - - task: CopyFiles@2 - displayName: Copy Previous Source Build Artifacts - inputs: - SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact) - Contents: '*.tar.gz' - TargetFolder: $(tarballDir)/packages/archive/ - - - script: | - set -x - - if [[ '${{ parameters.usePreviousArtifacts }}' != 'true' ]]; then - customPrepArgs= - if [[ '$(_BootstrapPrep)' == 'true' ]]; then - customPrepArgs='--bootstrap' - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs} - else - mkdir $(tarballDir)/.dotnet - tarballFilePath="$(tarballDir)/packages/archive/dotnet-sdk-*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)/.dotnet" - eval rm -f "$tarballFilePath" - fi - displayName: Prep Tarball - - - script: | - set -x - df -h - - customRunArgs= - customBuildArgs= - if [[ '$(_RunOnline)' == 'true' ]]; then - customBuildArgs='--online' - else - customRunArgs='--network none' - fi - - # See https://github.com/dotnet/source-build/issues/3712 - if [[ '$(_OverrideDistroDisablingSha1)' == 'true' ]]; then - customRunArgs="$customRunArgs -e OPENSSL_ENABLE_SHA1_SIGNATURES=1" - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - customBuildArgs="$customBuildArgs --poison" - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball ${customRunArgs} $(_Container) ./build.sh --clean-while-building ${customBuildArgs} $(additionalBuildArgs) - displayName: Build Tarball - - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(installerSrcDir)/eng/common/SetupNugetSources.sh - arguments: $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - - script: | - set -x - - dockerVolumeArgs="-v $(tarballDir):/tarball" - dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=$(_ExcludeOmniSharpTests) -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true" - poisonArg='' - - if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' ]]; then - dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts" - platform="linux" - docker run --rm $(_Container) /bin/sh -c "cat /etc/os-release | grep -q alpine" - if [[ $? == 0 ]]; then - platform="$platform-musl" - fi - msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-$platform-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) - dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName" - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - poisonArg='--poison' - dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true" - fi - - docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs $(_Container) ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- /p:SmokeTestConsoleVerbosity=detailed - displayName: Run Tests - - # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. - - script: | - set -x - - targetFolder=$(Build.StagingDirectory)/BuildLogs/ - mkdir -p ${targetFolder} - - cd "$(tarballDir)" - find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; - displayName: Prepare BuildLogs staging directory - continueOnError: true - condition: succeededOrFailed() - - - publish: '$(Build.StagingDirectory)/BuildLogs' - artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - displayName: Publish BuildLogs - continueOnError: true - condition: succeededOrFailed() - - - task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - continueOnError: true - inputs: - testRunner: vSTest - testResultsFiles: 'test/**/*.trx' - searchFolder: $(tarballDir) - mergeTestResults: true - publishRunAttachments: true - testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) - - - publish: '$(tarballDir)/artifacts/${{ parameters.architecture}}/Release/' - artifact: $(Agent.JobName)_Artifacts - displayName: Publish Artifacts - condition: succeededOrFailed() - continueOnError: true diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml deleted file mode 100644 index f13e9193b..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ /dev/null @@ -1,227 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Architecture to build - architecture: - - # Custom condition to apply to the job - condition: - - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Skip running the SDK content smoke-tests - excludeSdkContentTests: false - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: - - # Matrix to run jobs over - matrix: - - # Job name - name: - - # Agent pool to use - pool: - - # Build using the previous source-build artifacts - usePreviousArtifacts: false - -jobs: -- job: ${{ parameters.name }} - condition: ${{ parameters.condition }} - dependsOn: ${{ parameters.dependsOn }} - pool: ${{ parameters.pool }} - strategy: - matrix: ${{ parameters.matrix }} - timeoutInMinutes: 300 - variables: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - group: AzureDevOps-Artifact-Feeds-Pats - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - name: additionalBuildArgs - value: --with-sdk /tarball/.dotnet - - name: tarballDir - ${{ if eq(parameters.installerBuildResourceId, '') }}: - value: $(Build.SourcesDirectory) - ${{ else }}: - value: $(Build.StagingDirectory)/tarball - - name: installerSrcDir - ${{ if eq(parameters.installerBuildResourceId, '') }}: - value: $(Build.SourcesDirectory)/src/installer - ${{ else }}: - value: $(Build.SourcesDirectory) - workspace: - clean: all - - steps: - - checkout: self - clean: true - - - ${{ if ne(parameters.installerBuildResourceId, '') }}: - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-source*.tar.gz' - displayName: Download Source Tarball - - - script: | - set -x - - resourceIdPathSegment= - if [[ '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then - resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/' - fi - - mkdir -p "$(tarballDir)" - tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)" - eval rm -f "$tarballFilePath" - displayName: Extract Tarball - - - script: cp $(installerSrcDir)/NuGet.config $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config - displayName: Copy Test NuGet Config - - - ${{ if ne(parameters.excludeSdkContentTests, 'true') }}: - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(preview|rc|rtm)*)-linux*-${{ parameters.architecture }}.tar.gz' - displayName: Download MSFT sdk Tarball - - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - download: current - artifact: $(_PreviousSourceBuildArtifact) - patterns: '*.tar.gz' - displayName: Download Previous Source Build Artifacts - - - task: CopyFiles@2 - displayName: Copy Previous Source Build Artifacts - inputs: - SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact) - Contents: '*.tar.gz' - TargetFolder: $(tarballDir)/packages/archive/ - - - script: | - set -x - - if [[ '${{ parameters.usePreviousArtifacts }}' != 'true' ]]; then - customPrepArgs= - if [[ '$(_BootstrapPrep)' == 'true' ]]; then - customPrepArgs='--bootstrap' - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs} - else - mkdir $(tarballDir)/.dotnet - tarballFilePath="$(tarballDir)/packages/archive/dotnet-sdk-*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)/.dotnet" - eval rm -f "$tarballFilePath" - fi - displayName: Prep Tarball - - - script: | - set -x - df -h - - customRunArgs= - customBuildArgs= - if [[ '$(_RunOnline)' == 'true' ]]; then - customBuildArgs='--online' - else - customRunArgs='--network none' - fi - - # See https://github.com/dotnet/source-build/issues/3712 - if [[ '$(_OverrideDistroDisablingSha1)' == 'true' ]]; then - customRunArgs="$customRunArgs -e OPENSSL_ENABLE_SHA1_SIGNATURES=1" - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - customBuildArgs="$customBuildArgs --poison" - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball ${customRunArgs} $(_Container) ./build.sh --clean-while-building ${customBuildArgs} $(additionalBuildArgs) - displayName: Build Tarball - - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(installerSrcDir)/eng/common/SetupNugetSources.sh - arguments: $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - - script: | - set -x - - dockerVolumeArgs="-v $(tarballDir):/tarball" - dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=$(_ExcludeOmniSharpTests) -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true" - poisonArg='' - - if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' ]]; then - dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts" - platform="linux" - docker run --rm $(_Container) /bin/sh -c "cat /etc/os-release | grep -q alpine" - if [[ $? == 0 ]]; then - platform="$platform-musl" - fi - msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-$platform-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) - dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName" - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - poisonArg='--poison' - dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true" - fi - - docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs $(_Container) ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- /p:SmokeTestConsoleVerbosity=detailed - displayName: Run Tests - - # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. - - script: | - set -x - - targetFolder=$(Build.StagingDirectory)/BuildLogs/ - mkdir -p ${targetFolder} - - cd "$(tarballDir)" - find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; - displayName: Prepare BuildLogs staging directory - continueOnError: true - condition: succeededOrFailed() - - - task: 1ES.PublishPipelineArtifact@1 - displayName: Publish BuildLogs - inputs: - targetPath: $(Build.StagingDirectory)/BuildLogs - artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - continueOnError: true - condition: succeededOrFailed() - - - task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - continueOnError: true - inputs: - testRunner: vSTest - testResultsFiles: 'test/**/*.trx' - searchFolder: $(tarballDir) - mergeTestResults: true - publishRunAttachments: true - testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) - - - task: 1ES.PublishPipelineArtifact@1 - displayName: Publish Artifacts - inputs: - targetPath: $(tarballDir)/artifacts/${{ parameters.architecture}}/Release/ - artifactName: $(Agent.JobName)_Artifacts - continueOnError: true - condition: succeededOrFailed() diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball-pr.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball-pr.yml deleted file mode 100644 index 347f61cf8..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball-pr.yml +++ /dev/null @@ -1,85 +0,0 @@ -# Creates a source-build tarball - -jobs: -- job: Source_Build_Create_Tarball - container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38 - displayName: Source-Build Create Tarball - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore-Public-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ else }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore1ESPool-Internal-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - ${{ else }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - - variables: - - name: _BuildConfig - value: Release - - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: DotNet-Source-Build-All-Orgs-Source-Access - workspace: - clean: all - - steps: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: | - set -x - df -h - - officialBuildArgs= - if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then - officialBuildArgs='/p:OfficialBuildId=$(BUILD.BUILDNUMBER)' - fi - - # If building on the internal project, the internal storage variable may be available (usually only if needed) - # In that case, add variables to allow the download of internal runtimes if the specified versions are not found - # in the default public locations. - internalRuntimeDownloadArgs= - if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' - fi - - ./build.sh \ - --ci \ - --configuration $(_BuildConfig) \ - --publish \ - -bl \ - $officialBuildArgs \ - $internalRuntimeDownloadArgs \ - /p:DotNetPublishUsingPipelines=true \ - /p:ArcadeBuildTarball=true \ - /p:AzDoPat=$(dn-bot-all-orgs-build-rw-code-rw) - displayName: Create Tarball - - - task: CopyFiles@2 - displayName: Prepare BuildLogs staging directory - inputs: - Contents: | - **/*.log - **/*.binlog - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - CleanTargetFolder: true - continueOnError: true - condition: succeededOrFailed() - - - publish: '$(Build.StagingDirectory)/BuildLogs' - artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - displayName: Publish BuildLogs - continueOnError: true - condition: succeededOrFailed() diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml deleted file mode 100644 index d9df2e4e5..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Creates a source-build tarball - -jobs: -- job: Source_Build_Create_Tarball - container: fedora39 - displayName: Source-Build Create Tarball - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore-Public-XL - image: 1es-ubuntu-2004-open - os: linux - ${{ else }}: - name: NetCore-Svc-Public - image: 1es-ubuntu-2004-open - os: linux - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore1ESPool-Internal-XL - image: 1es-ubuntu-2004 - os: linux - ${{ else }}: - name: NetCore1ESPool-Svc-Internal - image: 1es-ubuntu-2004 - os: linux - - variables: - - name: _BuildConfig - value: Release - - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: DotNet-Source-Build-All-Orgs-Source-Access - workspace: - clean: all - - steps: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: | - set -x - df -h - - officialBuildArgs= - if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then - officialBuildArgs='/p:OfficialBuildId=$(BUILD.BUILDNUMBER)' - fi - - # If building on the internal project, the internal storage variable may be available (usually only if needed) - # In that case, add variables to allow the download of internal runtimes if the specified versions are not found - # in the default public locations. - internalRuntimeDownloadArgs= - if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' - fi - - ./build.sh \ - --ci \ - --configuration $(_BuildConfig) \ - --publish \ - -bl \ - $officialBuildArgs \ - $internalRuntimeDownloadArgs \ - /p:DotNetPublishUsingPipelines=true \ - /p:ArcadeBuildTarball=true \ - /p:AzDoPat=$(dn-bot-all-orgs-build-rw-code-rw) - displayName: Create Tarball - - - task: CopyFiles@2 - displayName: Prepare BuildLogs staging directory - inputs: - Contents: | - **/*.log - **/*.binlog - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - CleanTargetFolder: true - continueOnError: true - condition: succeededOrFailed() - - - task: 1ES.PublishPipelineArtifact@1 - displayName: Publish BuildLogs - inputs: - targetPath: $(Build.StagingDirectory)/BuildLogs - artifactName: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - continueOnError: true - condition: succeededOrFailed() diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build-pr.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build-pr.yml deleted file mode 100644 index dde2f3a8e..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build-pr.yml +++ /dev/null @@ -1,124 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: current - - # The following parameters aren't expected to be passed in rather they are used for encapsulation - # ----------------------------------------------------------------------------------------------- - alpine317Container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17 - centOS7Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build - centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - fedora39Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39 - ubuntu2004Arm64Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-arm64 - poolInternalAmd64: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - poolInternalAmd64PR: - name: NetCore1ESPool-Internal-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - poolInternalArm64: - name: Docker-Linux-Arm-Internal - poolPublicAmd64: - name: NetCore-Public-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - -jobs: -- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml - parameters: - architecture: x64 - dependsOn: ${{ parameters.dependsOn }} - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Alpine317-Offline: - _BootstrapPrep: true - _Container: ${{ parameters.alpine317Container }} - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: false - CentOS7-Online: - _BootstrapPrep: false - _Container: ${{ parameters.centOS7Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: true - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - CentOS7-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOS7Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: false - CentOSStream9-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOSStream9Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: true - _RunOnline: false - Fedora39-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.fedora39Container }} - _EnablePoison: true - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_x64 - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - ${{ parameters.poolInternalAmd64PR }} - ${{ else }}: - ${{ parameters.poolInternalAmd64 }} - -- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml - parameters: - architecture: arm64 - dependsOn: ${{ parameters.dependsOn }} - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Ubuntu2004-Offline: - _BootstrapPrep: true - _Container: ${{ parameters.ubuntu2004Arm64Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_arm64 - pool: ${{ parameters.poolInternalArm64 }} - -- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball-pr.yml - parameters: - architecture: x64 - # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete assessment of the build status. - # The bootstrap build will shortcut if the stage 1 build failed. - condition: succeededOrFailed() - dependsOn: Build_Tarball_x64 - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Fedora39-Offline: - _PreviousSourceBuildArtifact: Build_Tarball_x64 Fedora39-Offline_Artifacts - _Container: ${{ parameters.fedora39Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_x64_Using_Previous - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ parameters.poolInternalAmd64 }} - usePreviousArtifacts: true diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml deleted file mode 100644 index b52bdf80c..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ /dev/null @@ -1,130 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: current - - # The following parameters aren't expected to be passed in rather they are used for encapsulation - # ----------------------------------------------------------------------------------------------- - alpine317Container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17 - centOS7Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build - centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - fedora39Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39 - ubuntu2004Arm64Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-arm64 - poolInternalAmd64: - name: NetCore1ESPool-Svc-Internal - image: 1es-ubuntu-2004 - os: linux - poolInternalAmd64PR: - name: NetCore1ESPool-Internal-XL - image: 1es-ubuntu-2004 - os: linux - poolInternalArm64: - name: Docker-Linux-Arm-Internal - image: Mariner-2-Docker-ARM64 - os: linux - hostArchitecture: Arm64 - poolPublicAmd64: - name: NetCore-Public-XL - image: 1es-ubuntu-2004-open - os: linux - -jobs: -- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: x64 - dependsOn: ${{ parameters.dependsOn }} - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Alpine317-Offline: - _BootstrapPrep: true - _Container: ${{ parameters.alpine317Container }} - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: false - CentOS7-Online: - _BootstrapPrep: false - _Container: ${{ parameters.centOS7Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: true - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - CentOS7-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOS7Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _OverrideDistroDisablingSha1: false - _RunOnline: false - CentOSStream9-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOSStream9Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: true - _RunOnline: false - Fedora39-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.fedora39Container }} - _EnablePoison: true - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_x64 - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - ${{ parameters.poolInternalAmd64PR }} - ${{ else }}: - ${{ parameters.poolInternalAmd64 }} - -- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: arm64 - dependsOn: ${{ parameters.dependsOn }} - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Ubuntu2004-Offline: - _BootstrapPrep: true - _Container: ${{ parameters.ubuntu2004Arm64Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_arm64 - pool: ${{ parameters.poolInternalArm64 }} - -- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: x64 - # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete assessment of the build status. - # The bootstrap build will shortcut if the stage 1 build failed. - condition: succeededOrFailed() - dependsOn: Build_Tarball_x64 - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Fedora39-Offline: - _PreviousSourceBuildArtifact: Build_Tarball_x64 Fedora39-Offline_Artifacts - _Container: ${{ parameters.fedora39Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _OverrideDistroDisablingSha1: false - _RunOnline: false - name: Build_Tarball_x64_Using_Previous - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ parameters.poolInternalAmd64 }} - usePreviousArtifacts: true diff --git a/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj b/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj deleted file mode 100644 index a65f4b183..000000000 --- a/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - net6.0 - false - false - disable - - - - - - - - - - - diff --git a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs b/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs deleted file mode 100644 index 9b6365dfc..000000000 --- a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; - -namespace Microsoft.DotNet.SourceBuild.Tasks -{ - /// - /// Reads entries in a Version.Details.xml file to find intermediate nupkg dependencies. For - /// each dependency with a "SourceBuild" element, adds an item to the "Dependencies" output. - /// - public class Tarball_ReadSourceBuildIntermediateNupkgDependencies : Task - { - [Required] - public string VersionDetailsXmlFile { get; set; } - - [Required] - public string SourceBuildIntermediateNupkgPrefix { get; set; } - - /// - /// Convert any internal repo references to the public GitHub repos. - /// - public bool ConvertInternalRepos { get; set; } - - /// - /// The intermediate nupkg RID to use if any RID-specific intermediate nupkgs are required. - /// If this parameter isn't specified, RID-specific intermediate nupkgs can't be used and - /// this task fails. - /// - public string SourceBuildIntermediateNupkgRid { get; set; } - - /// - /// %(Identity): NuGet package ID. - /// %(Name): The Name of the dependency from Version.Details.xml. - /// %(ExactVersion): NuGet package version. This can be used to look up the restored package - /// contents in a package cache. - /// %(Version): NuGet package version, wrapped in "[version]" syntax for exact match. - /// %(Uri): The URI for the repo. - /// %(Sha): The commit Sha for the dependency. - /// %(SourceBuildRepoName): The repo name to use in source-build. - /// - [Output] - public ITaskItem[] Dependencies { get; set; } - - public override bool Execute() - { - XElement root = XElement.Load(VersionDetailsXmlFile, LoadOptions.PreserveWhitespace); - - XName CreateQualifiedName(string plainName) - { - return root.GetDefaultNamespace().GetName(plainName); - } - - Dependencies = root - .Elements() - .Elements(CreateQualifiedName("Dependency")) - .Select(d => - { - XElement sourceBuildElement = d.Element(CreateQualifiedName("SourceBuild")); - - if (sourceBuildElement == null) - { - // Workaround for https://github.com/dotnet/source-build/issues/2481 - sourceBuildElement = d.Element(CreateQualifiedName("SourceBuildTarball")); - - if (sourceBuildElement == null) - { - // Ignore element: doesn't represent a source-build dependency. - return null; - } - } - - string repoName = sourceBuildElement.Attribute("RepoName")?.Value; - - if (string.IsNullOrEmpty(repoName)) - { - Log.LogError($"Dependency SourceBuild RepoName null or empty in '{VersionDetailsXmlFile}' element {d}"); - return null; - } - - string dependencyName = d.Attribute("Name")?.Value ?? string.Empty; - - if (string.IsNullOrEmpty(dependencyName)) - { - // Log name missing as FYI, but this is not an error case for source-build. - Log.LogMessage($"Dependency Name null or empty in '{VersionDetailsXmlFile}' element {d}"); - } - - string dependencyVersion = d.Attribute("Version")?.Value; - - string uri = d.Element(CreateQualifiedName("Uri"))?.Value; - if (ConvertInternalRepos) - { - uri = ConvertInternalRepo(uri); - } - - string sha = d.Element(CreateQualifiedName("Sha"))?.Value; - string sourceBuildRepoName = sourceBuildElement.Attribute("RepoName")?.Value; - - if (string.IsNullOrEmpty(dependencyVersion)) - { - // We need a version to bring down an intermediate nupkg. Fail. - Log.LogError($"Dependency Version null or empty in '{VersionDetailsXmlFile}' element {d}"); - return null; - } - - string identity = SourceBuildIntermediateNupkgPrefix + repoName; - - bool.TryParse( - sourceBuildElement.Attribute("ManagedOnly")?.Value, - out bool managedOnly); - - // If RID-specific, add the RID to the end of the identity. - if (!managedOnly) - { - if (string.IsNullOrEmpty(SourceBuildIntermediateNupkgRid)) - { - Log.LogError( - $"Parameter {nameof(SourceBuildIntermediateNupkgRid)} was " + - "not specified, indicating this project depends only on managed " + - "inputs. However, source-build element is not ManagedOnly: " + - sourceBuildElement); - return null; - } - - identity += "." + SourceBuildIntermediateNupkgRid; - } - - return new TaskItem( - identity, - new Dictionary - { - ["Name"] = dependencyName, - ["Version"] = $"[{dependencyVersion}]", - ["ExactVersion"] = dependencyVersion, - ["Uri"] = uri, - ["Sha"] = sha, - ["SourceBuildRepoName"] = sourceBuildRepoName - }); - }) - .Where(d => d != null) - .ToArray(); - - return !Log.HasLoggedErrors; - } - - private string ConvertInternalRepo(string uri) - { - if (uri.StartsWith("https://dev.azure.com", StringComparison.OrdinalIgnoreCase)) - { - string[] repoParts = uri.Substring(uri.LastIndexOf('/')).Split('-', 2); - - if (repoParts.Length != 2) - { - Log.LogError($"Repo '{uri}' does not end with the expected - format"); - return null; - } - - string org = repoParts[0]; - string repo = repoParts[1]; - - // The internal Nuget.Client repo has suffix which needs to be accounted for. - const string trustedSuffix = "-Trusted"; - if (uri.EndsWith(trustedSuffix, StringComparison.OrdinalIgnoreCase)) - { - repo = repo.Substring(0, repo.Length - trustedSuffix.Length); - } - - uri = $"https://github.com/{org}/{repo}"; - } - - return uri; - } - } -} diff --git a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs deleted file mode 100644 index b6b2793f3..000000000 --- a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Tasks; -using Microsoft.Build.Utilities; -using NuGet.Versioning; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Xml.Serialization; - -namespace Microsoft.DotNet.SourceBuild.Tasks -{ - /// - /// Writes a props file to the given directory for each dependency specified - /// plus adds or updates an existing props file with all dependencies. The - /// intention is for the props file to be included by a source-build build - /// to get metadata about each dependent repo. - /// - public class Tarball_WriteSourceRepoProperties : Task - { - /// - /// The directory to write the props files to. - /// - [Required] - public string SourceBuildMetadataDir { get; set; } - - /// - /// Dependencies to include in the props files. - /// - /// %(Identity): NuGet package ID. - /// %(Name): The Name of the dependency from Version.Details.xml. - /// %(ExactVersion): NuGet package version. This can be used to look up the restored package - /// contents in a package cache. - /// %(Version): NuGet package version, wrapped in "[version]" syntax for exact match. - /// %(Uri): The URI for the repo. - /// %(Sha): The commit Sha for the dependency. - /// %(SourceBuildRepoName): The repo name to use in source-build. - /// - /// - [Required] - public ITaskItem[] Dependencies { get; set; } - - public override bool Execute() - { - var allRepoProps = new Dictionary(); - - foreach (var dependency in Dependencies.Select(dep => - new { - Name = dep.GetMetadata("Name"), - SourceBuildRepoName = dep.GetMetadata("SourceBuildRepoName"), - Version = dep.GetMetadata("ExactVersion"), - Sha = dep.GetMetadata("Sha"), - Uri = dep.GetMetadata("Uri"), - GitCommitCount = dep.GetMetadata("GitCommitCount") - })) - { - string repoName = dependency.SourceBuildRepoName; - string safeRepoName = repoName.Replace("-", "").Replace(".", ""); - string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName.Replace(".", "-")}.props"); - DerivedVersion derivedVersion = GetVersionInfo(dependency.Version, "0"); - var repoProps = new Dictionary - { - ["GitCommitHash"] = dependency.Sha, - ["OfficialBuildId"] = derivedVersion.OfficialBuildId, - ["OutputPackageVersion"] = dependency.Version, - ["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel, - ["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false", - }; - if (!string.IsNullOrEmpty(dependency.GitCommitCount)) - { - repoProps.Add("GitCommitCount", dependency.GitCommitCount); - } - WritePropsFile(propsPath, repoProps); - allRepoProps[$"{safeRepoName}GitCommitHash"] = dependency.Sha; - allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dependency.Version; - } - string allRepoPropsPath = Path.Combine(SourceBuildMetadataDir, "AllRepoVersions.props"); - Log.LogMessage(MessageImportance.Normal, $"[{DateTimeOffset.Now}] Writing all repo versions to {allRepoPropsPath}"); - UpdatePropsFile(allRepoPropsPath, allRepoProps); - - return !Log.HasLoggedErrors; - } - - /// - /// Reverse a version in the Arcade style (https://github.com/dotnet/arcade/blob/fb92b14d8cd07cf44f8f7eefa8ac58d7ffd05f3f/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.BeforeCommonTargets.targets#L18) - /// back to an OfficialBuildId + ReleaseLabel which we can then supply to get the same resulting version number. - /// - /// The complete version, e.g. 1.0.0-beta1-19720.5 - /// The current commit count of the repo. This is used for some repos that do not use the standard versioning scheme. - /// - private static DerivedVersion GetVersionInfo(string version, string commitCount) - { - var nugetVersion = new NuGetVersion(version); - - if (!string.IsNullOrWhiteSpace(nugetVersion.Release)) - { - var releaseParts = nugetVersion.Release.Split('-', '.'); - if (releaseParts.Length == 2) - { - // NuGet does this - arbitrary build IDs - return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] }; - } - else if (releaseParts.Length == 3) - { - // VSTest uses full dates for the first part of their preview build numbers - if (DateTime.TryParseExact(releaseParts[1], "yyyyMMdd", new CultureInfo("en-US"), DateTimeStyles.AssumeLocal, out DateTime fullDate)) - { - return new DerivedVersion { OfficialBuildId = $"{releaseParts[1]}.{releaseParts[2]}", PreReleaseVersionLabel = releaseParts[0] }; - } - else if (int.TryParse(releaseParts[1], out int datePart) && int.TryParse(releaseParts[2], out int buildPart)) - { - if (datePart > 1 && datePart < 8 && buildPart > 1000 && buildPart < 10000) - { - return new DerivedVersion { OfficialBuildId = releaseParts[2], PreReleaseVersionLabel = $"{releaseParts[0]}.{releaseParts[1]}" }; - } - else - { - return new DerivedVersion { OfficialBuildId = $"20{((datePart / 1000))}{((datePart % 1000) / 50):D2}{(datePart % 50):D2}.{buildPart}", PreReleaseVersionLabel = releaseParts[0] }; - } - } - } - else if (releaseParts.Length == 4) - { - // new preview version style, e.g. 5.0.0-preview.7.20365.12 - if (int.TryParse(releaseParts[2], out int datePart) && int.TryParse(releaseParts[3], out int buildPart)) - { - return new DerivedVersion { OfficialBuildId = $"20{((datePart / 1000))}{((datePart % 1000) / 50):D2}{(datePart % 50):D2}.{buildPart}", PreReleaseVersionLabel = $"{releaseParts[0]}.{releaseParts[1]}" }; - } - } - } - else - { - // finalized version number (x.y.z) - probably not our code - // VSTest, Application Insights, Newtonsoft.Json do this - return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = string.Empty }; - } - - throw new FormatException($"Can't derive a build ID from version {version} (commit count {commitCount}, release {string.Join(";", nugetVersion.Release.Split('-', '.'))})"); - } - - private static void UpdatePropsFile(string filePath, Dictionary properties) - { - if (!File.Exists(filePath)) - { - WritePropsFile(filePath, properties); - } - else - { - var content = new StringBuilder(); - foreach (var line in File.ReadAllLines(filePath)) - { - content.AppendLine(line); - if (line.Contains("")) - { - foreach (var propName in properties.Keys.OrderBy(k => k)) - { - content.AppendLine($" <{propName}>{properties[propName]}"); - } - } - } - File.WriteAllText(filePath, content.ToString()); - } - } - - private static void WritePropsFile(string filePath, Dictionary properties) - { - var content = new StringBuilder(); - content.AppendLine(""); - content.AppendLine(""); - content.AppendLine(" "); - foreach (var propName in properties.Keys.OrderBy(k => k)) - { - content.AppendLine($" <{propName}>{properties[propName]}"); - } - content.AppendLine(" "); - content.AppendLine(""); - File.WriteAllText(filePath, content.ToString()); - } - - private class DerivedVersion - { - internal string OfficialBuildId { get; set; } - internal string PreReleaseVersionLabel { get; set; } - } - } -} diff --git a/src/SourceBuild/Arcade/tools/BuildTasks.props b/src/SourceBuild/Arcade/tools/BuildTasks.props deleted file mode 100644 index 57c4a4b0a..000000000 --- a/src/SourceBuild/Arcade/tools/BuildTasks.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - $(RepoRoot)\artifacts\bin\SourceBuild.Tasks\$(Configuration)\net6.0\SourceBuild.Tasks.dll - - \ No newline at end of file diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets deleted file mode 100644 index 4ee92a5e1..000000000 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - - - - - - - - - $(RepoRoot)artifacts/ - $(ArtifactsDir)tarball/ - $([MSBuild]::EnsureTrailingSlash('$(TarballDir)')) - $(TarballRootDir)src/ - $(TarballRootDir)git-info/ - quiet - true - - - - - - $([System.IO.Path]::GetDirectoryName('$(TarballFilePath)')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(GitHubRepositoryName) - $(VersionPrefix) - $(VersionPrefix) - @(RootRepoCommitSha) - @(RootRepoUri) - @(RootRepoCommitCount) - $(GitHubRepositoryName) - true - - - - - - - %(SourceBuildRepos.SourceBuildRepoName) - %(SourceBuildRepos.Uri) - %(SourceBuildRepos.Sha) - %(SourceBuildRepos.IsRootRepo) - - - - - - - - - - - - - $(SourceBuildRepoName)/ - $(TarballSourceDir)$(SourceDir) - $(TarballSourceDir)$(SourceDir)eng/ - $(TarballRepoSourceEngDir)Version.Details.xml - -q - $(RepoUri) - $(RepoUri.Replace('https://dev.azure.com', 'https://dn-bot:$(AzDoPat)@dev.azure.com')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(ArtifactsDir)text-only-packages/ - $(TarballRootDir)packages/text-only/ - - - - - - - - - - - - - - - - - - - - - $(TarballRootDir)packages/archive/ - Private.SourceBuilt.Artifacts - Private.SourceBuilt.Prebuilts - https://dotnetcli.azureedge.net/source-built-artifacts/assets/ - archiveArtifacts.txt - $(ExternalTarballsDir)$(ArchiveArtifactsTextFileName) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $([System.IO.Path]::GetFileName('$(TextOnlyDirectory)')) - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj deleted file mode 100644 index 7faf06dfb..000000000 --- a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - net6.0 - $(TargetPackagesPath) - - - - - - - - - - - - - - - - - - - - - - @(TextOnlyPackagesDirectories) - - - - - diff --git a/src/SourceBuild/README.md b/src/SourceBuild/README.md index cb90757a6..1b946e990 100644 --- a/src/SourceBuild/README.md +++ b/src/SourceBuild/README.md @@ -1,77 +1,18 @@ # Source-Build -This directory contains files necessary to generate a tarball that can be used -to build .NET from source. +This directory contains the .NET source build infrastructure. -For more information, see -[dotnet/source-build](https://github.com/dotnet/source-build). +_content_ - source build infrastructure mirrored to [dotnet/dotnet](https://github.com/dotnet/dotnet) + [VMR](https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/VMR-Design-And-Operation.md). + +_patches_ - repo patches needed for .NET source build. Typically these are ephemeral to workaround integration + issues. For more information, see the [Patch Guidelines](https://github.com/dotnet/source-build/blob/main/Documentation/patching-guidelines.md). + +For more information, see [dotnet/source-build](https://github.com/dotnet/source-build). ## Local development workflow -These are the steps used by some members of the .NET source-build team to create -a tarball and build it on a local machine as part of the development cycle: - -1. Check out this repository and open a command line in the directory. -1. `./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/repos/tarball1 /p:PreserveTarballGitFolders=true` - * The `TarballDir` can be anywhere you want outside of the repository. -1. `cd /repos/tarball1` -1. `./prep.sh` -1. `./build.sh --online` -1. Examine results and make changes to the source code in the tarball. The - `.git` folders are preserved, so you can commit changes and save them as - patches. -1. When a repo builds, source-build places a `.complete` file to prevent it from - rebuilding again. This allows you to incrementally retry a build if there's a - transient failure. But it also prevents you from rebuilding a repo after - you've modified it. - * To force a repo to rebuild with your new changes, run: - `rm -f ./artifacts/obj/semaphores//Build.complete` -1. Run `./build.sh --online` again, and continue to repeat as necessary. - -When developing a prebuilt removal change, examine the results of the build, -specifically: - -* Prebuilt report. For example: - `./src/runtime.733a3089ec6945422caf06035c18ff700c9d51be/artifacts/source-build/self/prebuilt-report` - -## Creating a patch file - -To create a repo patch file, first commit your changes to the repo as normal, -then run this command inside the repo to generate a patch file inside the repo: - -```sh -git format-patch --zero-commit --no-signature -1 -``` - -Then, move the patch file into this repo, at -`src/SourceBuild/tarball/patches/`. - -> If you define `PATCH_DIR` to point at the `patches` directory, you can use -> `-o` to place the patch file directly in the right directory: -> -> ```sh -> git format-patch --zero-commit --no-signature -1 -o "$PATCH_DIR/" -> ``` - -After generating the patch file, the numeric prefix on the filename may need to -be changed. By convention, new patches should be one number above the largest -number that already exists in the patch file directory. If there's a gap in the -number sequence, do not fix it (generally speaking), to avoid unnecessary diffs -and potential merge conflicts. - -To apply a patch, or multiple patches, use `git am` while inside the target -repo. For example, to apply *all* `sdk` patches onto a fresh clone of the `sdk` -repository that has already been checked out to the correct commit, use: - -```sh -git am "$PATCH_DIR/sdk/*" -``` - -This creates a Git commit with the patch contents, so you can easily amend a -patch or create a new commit on top that you can be sure will apply cleanly. - -There is a method to create a series of patches based on a range of Git commits, -but this is not usually useful for 6.0 main development. It is used in servicing -to "freshen up" the sequence of patches (resolve conflicts) all at once. - -Note: Tarballs have already applied patches to the source code. +When making changes to the source build infrastructure, devs would typically make and test the +changes in a local clone of [dotnet/dotnet](https://github.com/dotnet/dotnet). Once complete +you would copy the changed files here and make a PR. To validate the end to end experience, you +can synchronize the VMR with any changes made here by running [eng/vmr-sync.sh](https://github.com/dotnet/installer/blob/main/eng/vmr-sync.sh). diff --git a/src/SourceBuild/content/.config/guardian/.gdnbaselines b/src/SourceBuild/content/.config/guardian/.gdnbaselines new file mode 100644 index 000000000..ce7a029cc --- /dev/null +++ b/src/SourceBuild/content/.config/guardian/.gdnbaselines @@ -0,0 +1,1315 @@ +{ + "hydrated": false, + "properties": { + "helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines", + "hydrationStatus": "This file does not contain identifying data. It is safe to check into your repo. To hydrate this file with identifying data, run `guardian hydrate --help` and follow the guidance." + }, + "version": "1.0.0", + "baselines": { + "default": { + "name": "default", + "createdDate": "2024-04-03 14:41:43Z", + "lastUpdatedDate": "2024-04-03 14:41:43Z" + } + }, + "results": { + "5f3b52e23f96eb01bcfd73ead3cbaa2e1430de0006e5103109dd39bf9f292165": { + "signature": "5f3b52e23f96eb01bcfd73ead3cbaa2e1430de0006e5103109dd39bf9f292165", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "72b28f655eadc78b21ab36a7f572708315d8d909d1b460162511e37086288e30": { + "signature": "72b28f655eadc78b21ab36a7f572708315d8d909d1b460162511e37086288e30", + "alternativeSignatures": [ + "60efb04c6e0431e477e792a96d32b30b3a309b4ee19fad084a015e2946985459" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "08dcdf31a316917a50c97d16d8d4eca5dbd7528b8cfe8c9bd8b29fdd4dc3eb85": { + "signature": "08dcdf31a316917a50c97d16d8d4eca5dbd7528b8cfe8c9bd8b29fdd4dc3eb85", + "alternativeSignatures": [ + "c6b795bd087762188cd476b81ccdb474a25495b86b8080e1ab15c5592628b8af" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "62e5fe288e1e21307317edab5d08f047ecdd01eac5c19660bab6c9ae96f8c8b5": { + "signature": "62e5fe288e1e21307317edab5d08f047ecdd01eac5c19660bab6c9ae96f8c8b5", + "alternativeSignatures": [ + "631ff94fe085c9754b83bd9fc2a15dccccccd067392cea1f520398874266248a" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "6d4429751838adeb1f1b097b6b974a6a47d744871980ee54faeb7a4536183597": { + "signature": "6d4429751838adeb1f1b097b6b974a6a47d744871980ee54faeb7a4536183597", + "alternativeSignatures": [ + "c4538b540d00c41b9828ade572431cfd476ae40ebd4c6cfc635d06ac185972e3" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "93735e0dba704ad832d7b3fdabfcda2875dee9adb24e3cd676fce3b612d116c3": { + "signature": "93735e0dba704ad832d7b3fdabfcda2875dee9adb24e3cd676fce3b612d116c3", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "a5142e7bafbf664fdcb2d4d7071ca8427c7da0c8ba66cc7706c9c07b816f1201": { + "signature": "a5142e7bafbf664fdcb2d4d7071ca8427c7da0c8ba66cc7706c9c07b816f1201", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1ee555192f99f2751398509614249023216a98d148e57de41317ec60715374b0": { + "signature": "1ee555192f99f2751398509614249023216a98d148e57de41317ec60715374b0", + "alternativeSignatures": [ + "5d82fd3437c708ec3bfe674016099e5465194ebc53f7dd72061b98d7257a951f" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "be4c5e062093fa08fe93f0753c3090b63af74dc4af4c04d781fddf9ec41db0d4": { + "signature": "be4c5e062093fa08fe93f0753c3090b63af74dc4af4c04d781fddf9ec41db0d4", + "alternativeSignatures": [ + "bafe4e1a197b7af8b8cfda4cafd8250a4a66a0ca18b82817e12d5a4d17350589" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c704b27a3590a23b240e9c261dc93c8f3c7871e4d471b5688c3609880396f672": { + "signature": "c704b27a3590a23b240e9c261dc93c8f3c7871e4d471b5688c3609880396f672", + "alternativeSignatures": [ + "0880869d43948d2f7050955aeb76733bc12ab82839563cbabff0dd36d0880a39" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "b6aecc1d8697beab291f9925633b5ec3e37a088033efc7e93928fd9cac96cda4": { + "signature": "b6aecc1d8697beab291f9925633b5ec3e37a088033efc7e93928fd9cac96cda4", + "alternativeSignatures": [ + "985838b2d1518f507c85ae0f635951bad92dde58eb24c252d7e56fb6ccda6191" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ed7c9f876d0784c23991b9ce1abc7c0df6229e7eed8cda08e56315b5fdeb5fa0": { + "signature": "ed7c9f876d0784c23991b9ce1abc7c0df6229e7eed8cda08e56315b5fdeb5fa0", + "alternativeSignatures": [ + "d2f6b006ae6b54ff39886db273b9ffc9ba23f0a84861bbe028aa54343fb5c55b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ae448b96e62d898485a9df57a24a920740c5504d4854e85e8060a1ba94752dbb": { + "signature": "ae448b96e62d898485a9df57a24a920740c5504d4854e85e8060a1ba94752dbb", + "alternativeSignatures": [ + "6590282ea3895180725cbb97a9e565571bb27b596bb6a6d1087b62078ed1d683" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "2e86a1d345364972a25bfe0a38237afa382766115808bb86bac8ca03e4cca304": { + "signature": "2e86a1d345364972a25bfe0a38237afa382766115808bb86bac8ca03e4cca304", + "alternativeSignatures": [ + "c079fd753fcba1568d79c4bef9fd6200b494f1552bedc1e91902ec8f01081fd7" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5c349e8f183364d99cde545c6da7549c9d6227957c820fcde8e8beb2b40de39c": { + "signature": "5c349e8f183364d99cde545c6da7549c9d6227957c820fcde8e8beb2b40de39c", + "alternativeSignatures": [ + "8546393d391f4010c04ed43788c36626f870b02028937cf390014c660f657f7b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "a9e7b46f71cc21fd96e3bbb1c30a7beb36470f0a4c857794b4444856e54ffc2b": { + "signature": "a9e7b46f71cc21fd96e3bbb1c30a7beb36470f0a4c857794b4444856e54ffc2b", + "alternativeSignatures": [ + "34597b8dc5d2e482d7178a50440f3b8815c44e510906dd92a4d31d434c87053b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3df69ea15defeb820ba0823dc80513e75a79b049dee023b51dee4419cd1d2276": { + "signature": "3df69ea15defeb820ba0823dc80513e75a79b049dee023b51dee4419cd1d2276", + "alternativeSignatures": [ + "deb5cfe250ae8f9c1bbcdf230c425dc071067ee26cc7b3d41b9fc078782febfc" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c2b86ae10a9ad117f56bf792ae0a8a99bfbe1945254d156dd685e41dc74dd5ed": { + "signature": "c2b86ae10a9ad117f56bf792ae0a8a99bfbe1945254d156dd685e41dc74dd5ed", + "alternativeSignatures": [ + "7c13381c5c5bf98666c53e6497f0d6c8b2463fd2d7e0a0084edce348edb2a98b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7ec5369cb17143314826ef4e433320ab257e00485568fed9ca59d6ddf1ad166a": { + "signature": "7ec5369cb17143314826ef4e433320ab257e00485568fed9ca59d6ddf1ad166a", + "alternativeSignatures": [ + "7e1528556c5286830d73b23164ea8c99103c6344228bb91390c9943cb6090ff3" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "e71596904ef990bac717b0973b8fd3e36d52b3a45713bf8babb88f1ab0493360": { + "signature": "e71596904ef990bac717b0973b8fd3e36d52b3a45713bf8babb88f1ab0493360", + "alternativeSignatures": [ + "ff25e34637fb05921a126d3143eef03b8006f580e993ef5a7d2e27ec5178ee9a" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "32eb952e8561b331092ec83b626102388202071d192f9eb22c233b06ea90d2a1": { + "signature": "32eb952e8561b331092ec83b626102388202071d192f9eb22c233b06ea90d2a1", + "alternativeSignatures": [ + "cce04b0a7c54b775c1464a32d85804de7d1777ac2a6d21da8b080c29ac46162c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7d3c27b6bd42f58e624890a1669c188c6afee080e6330673942d364641876d52": { + "signature": "7d3c27b6bd42f58e624890a1669c188c6afee080e6330673942d364641876d52", + "alternativeSignatures": [ + "29d9fec9e2b10d721512bb68a68759baa33b6bbc0683a2d3d5cdcb74894917ee" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "42c9ee2033a50a53e2fcc83cb08b3a8c38a5c9e2230414ae0590d3c8f45a9a8d": { + "signature": "42c9ee2033a50a53e2fcc83cb08b3a8c38a5c9e2230414ae0590d3c8f45a9a8d", + "alternativeSignatures": [ + "44e2cd3b2773d63b155f2093202415744b74f8b5c47612ad92f2ffee3939cb2f" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ea00dd596b6f25ad7fb56f8433aa4889808c48a9d753eeb896438d871f1bbadf": { + "signature": "ea00dd596b6f25ad7fb56f8433aa4889808c48a9d753eeb896438d871f1bbadf", + "alternativeSignatures": [ + "e6e7be75b6234262188b18265bdef3aca61e7ad4b9e0712b34ad9af2605ff5bf" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "b4e3d369cd32329e640bc7984528cdda54a9bdea2b52a5c3ed026fc57be64afd": { + "signature": "b4e3d369cd32329e640bc7984528cdda54a9bdea2b52a5c3ed026fc57be64afd", + "alternativeSignatures": [ + "8f19b3c3b99054f4c34e62dbb042d4505190bae61f7c815659e825e1e3f6585d" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "869eabde635eff83abaf3ceae639a4dfe5b6e1fc2be56bde177999b341ee7fa7": { + "signature": "869eabde635eff83abaf3ceae639a4dfe5b6e1fc2be56bde177999b341ee7fa7", + "alternativeSignatures": [ + "879cee54b1ce34bf674d7bea56317d5e606a8a6d1909e28831a801c3c760547c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c30ea658de240cc77f43da72a2ae66a8300716df1a36e5aad2ccf0041405512b": { + "signature": "c30ea658de240cc77f43da72a2ae66a8300716df1a36e5aad2ccf0041405512b", + "alternativeSignatures": [ + "f9010fdbf887fec3fb12dc784714ae4993cfbb0c279ceb32de179be14113851c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "29a080743f4448e5fb1c2556f824a2f4950ec05ae1d5baa76157bc6425e08a1e": { + "signature": "29a080743f4448e5fb1c2556f824a2f4950ec05ae1d5baa76157bc6425e08a1e", + "alternativeSignatures": [ + "f6f78c526c85382e749badcc83d5d3e81976879e727417fef1b81b83faec67f0" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5c1de06651f26dcbfaa7256b674dc725934d1892a58ab1655fed98c7d062c84c": { + "signature": "5c1de06651f26dcbfaa7256b674dc725934d1892a58ab1655fed98c7d062c84c", + "alternativeSignatures": [ + "6435a356edc13cd3ae7609656ff1920116c1f944e1d63b2ceec921d4e3f6464d" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "dd15f0a91faa86197e2bc286d99e9b0e5e625930ad53a5fae4e0a8c2b80b91ee": { + "signature": "dd15f0a91faa86197e2bc286d99e9b0e5e625930ad53a5fae4e0a8c2b80b91ee", + "alternativeSignatures": [ + "6252f589ff1cb3d68f758c8f081fd3e59d8cc56bfaa29441b9e26b1cd5726faa" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3db9957bb879335816149b88a3fed78468210e7480dd31db37845b97d28078ad": { + "signature": "3db9957bb879335816149b88a3fed78468210e7480dd31db37845b97d28078ad", + "alternativeSignatures": [ + "4c6e2de131da98d97f9f4ab9a07fb90f6ca478f578d0bd4da7a7551683c886d7" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cda6b64f47374712a1488b1ca527f54310e135ceb7e4611e75f28aed7f4edd43": { + "signature": "cda6b64f47374712a1488b1ca527f54310e135ceb7e4611e75f28aed7f4edd43", + "alternativeSignatures": [ + "c7c9b966693a21385b7c2f4a36c5c3c6a410cda29716d1c10537f6463cb852af" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "61eab78163233a43bc21bf8a2a762496cd63758852ed1afcfe73d4ebd90532e9": { + "signature": "61eab78163233a43bc21bf8a2a762496cd63758852ed1afcfe73d4ebd90532e9", + "alternativeSignatures": [ + "2584c057a56958edc47e8f9ed26ed2e4b2fbee706d4a5fe6793d42044754f016" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "201a1737b9cd0a61c986dc37678141a290fe56e518c4d7401443d83f89635758": { + "signature": "201a1737b9cd0a61c986dc37678141a290fe56e518c4d7401443d83f89635758", + "alternativeSignatures": [ + "3b2032f4ca90c12c9b5ea35ac6e85ba10a32f7d018b39369e044ae4d039e000b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "bcb0788172282f0f5ab22907ec5070573092309654c8eb07dc92fb4e676ded80": { + "signature": "bcb0788172282f0f5ab22907ec5070573092309654c8eb07dc92fb4e676ded80", + "alternativeSignatures": [ + "8c37a63c016612477d48726a77b74eb798e45c09e6c2212fbd57ca10aa88dd59" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5dc266c64bff96e86a1a3907386531e16f0dcf38f5b1bcdba22f45e7965c6bf7": { + "signature": "5dc266c64bff96e86a1a3907386531e16f0dcf38f5b1bcdba22f45e7965c6bf7", + "alternativeSignatures": [ + "ad996650f8e2b17aeddcea222c0861f9cb257aee49f31e01a4de573d23e1b0fb" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "845ca607828540eafa4053b4f9368b97c23258b9b47ceecbcec8bd7e5aa59302": { + "signature": "845ca607828540eafa4053b4f9368b97c23258b9b47ceecbcec8bd7e5aa59302", + "alternativeSignatures": [ + "c2cb1a24bf7f267ad949c325feaf69f29f60dd019f1b3879391f85f7d5316800" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "89bed4bb6776c3155318e4ff38e5062f655834cebcdf6f65b08cbd2312ac75f8": { + "signature": "89bed4bb6776c3155318e4ff38e5062f655834cebcdf6f65b08cbd2312ac75f8", + "alternativeSignatures": [ + "c805484f8267753ac6867fe334b6ecfa42d2430b21488501a926b9d49a679bb1" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c2496232c1468a250e567517e0a7a71632e3ed60330784450511cef2a1164af0": { + "signature": "c2496232c1468a250e567517e0a7a71632e3ed60330784450511cef2a1164af0", + "alternativeSignatures": [ + "723a97522d855b779b011a0a6f84ea1ee7cf77d05f2b4808ffdbd521e655e6e3" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "e75c5f821dc59179ed407ca3da917756cd0cff7aac1755df7ef0ef6bf087f80c": { + "signature": "e75c5f821dc59179ed407ca3da917756cd0cff7aac1755df7ef0ef6bf087f80c", + "alternativeSignatures": [ + "420deccac3e08a232a59caa2178b503d310d2645f847150b564dc8e02b28fbee" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ad85fce8c033defdd63db5aa4ec2b2197bbf9310b506241e88bcd48b5a3b41da": { + "signature": "ad85fce8c033defdd63db5aa4ec2b2197bbf9310b506241e88bcd48b5a3b41da", + "alternativeSignatures": [ + "784f946934a1f42d820c8a61ac865a094d735d0cfcca4c88fe10482306abf958" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "316329783213340b7da3052b8177bd48e10a05bf242da08dc6f9785361be2389": { + "signature": "316329783213340b7da3052b8177bd48e10a05bf242da08dc6f9785361be2389", + "alternativeSignatures": [ + "2f83c91b8c20ef743240ee45997e2af37d73a0dd99d2ea345794960d775b567d" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "2db32a47c814adc0ee80e257e1cb878a9054b92e6809cd9231690856066bcb33": { + "signature": "2db32a47c814adc0ee80e257e1cb878a9054b92e6809cd9231690856066bcb33", + "alternativeSignatures": [ + "249d66492a4d48df01ea2c04aa25e302ad17daf74d130194bec5a90405111da4" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d2e9bf6a7e357eb1b1d594a06ed00bdf9fa193110f08e45f8e748427a370bfba": { + "signature": "d2e9bf6a7e357eb1b1d594a06ed00bdf9fa193110f08e45f8e748427a370bfba", + "alternativeSignatures": [ + "41a0e4c2bbd23190b2ebaf6163c0a9471f126cd6c2144e8377d9cb1bf0a391ef" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c1e109d2139e82ef8545bb12a0431f4d25f2a805c9b5f71523515dbbb0be9fc3": { + "signature": "c1e109d2139e82ef8545bb12a0431f4d25f2a805c9b5f71523515dbbb0be9fc3", + "alternativeSignatures": [ + "69b330936de5c13b57fd7f0f7590a7e66efa3dba98715b5f07d8953662df5025" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ec60cc4e84b44896c9f5a516e705340feebdaa61be024c82b07b546d3ad0c276": { + "signature": "ec60cc4e84b44896c9f5a516e705340feebdaa61be024c82b07b546d3ad0c276", + "alternativeSignatures": [ + "f9c44b75edceaeaae9611fd772b6774ce086227bb3b758dd3844c57511fb2e7a" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5184980ee9ace427259fcaa3ee796a48efb25a7141fc16426c08dbc8903dbca9": { + "signature": "5184980ee9ace427259fcaa3ee796a48efb25a7141fc16426c08dbc8903dbca9", + "alternativeSignatures": [ + "0610a76e8ba9f8fef499d2364bac7db02436cc8f89cee26eac4c6c2c6cab952c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "148a534bb099170811f8dcc0d51c1caa399488739a5ee98fb12bee51c7a9244d": { + "signature": "148a534bb099170811f8dcc0d51c1caa399488739a5ee98fb12bee51c7a9244d", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1d9de8cd0e3cf1749dc40ad234b9d84e263f241dbcd8b35320808c8381840c3a": { + "signature": "1d9de8cd0e3cf1749dc40ad234b9d84e263f241dbcd8b35320808c8381840c3a", + "alternativeSignatures": [ + "8af561a51ebf9394b93708f512784edbbaa8c13872c2f56da4c5b418f71ad34d" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d71d8881e3ad39939ff9894639cdc0012d968b48038b872ca7eba15ba93cbfe9": { + "signature": "d71d8881e3ad39939ff9894639cdc0012d968b48038b872ca7eba15ba93cbfe9", + "alternativeSignatures": [ + "bea919b0d9a2e6c38a6de6300616becf31809eaa49616e63ab90118b5ec331eb" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "4dbb69e7a5bbcaf97ee14aa268f0cc4b375111db79d91bc48b438f15e7f29859": { + "signature": "4dbb69e7a5bbcaf97ee14aa268f0cc4b375111db79d91bc48b438f15e7f29859", + "alternativeSignatures": [ + "52e95c355d30e2e33b6ad0cf11af5c31db038107a89dd120854c94857aa2298b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "2960b8fc6b1f6665b5988544f1d44a05dfe83b9b39a14efef5e042d7a78e4e19": { + "signature": "2960b8fc6b1f6665b5988544f1d44a05dfe83b9b39a14efef5e042d7a78e4e19", + "alternativeSignatures": [ + "b4177488d7a45f4a54472adf8bb97026f0799e61e10f580ea52fbbd74cf08f10" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c1c411bf7b80d684d2c444ed611f333f08f1073fbaaf4c6bd0238c16ffccbe4d": { + "signature": "c1c411bf7b80d684d2c444ed611f333f08f1073fbaaf4c6bd0238c16ffccbe4d", + "alternativeSignatures": [ + "8ca9e6612eb3802d5c1fd93ce0f1de61c2559512966fc97dcbeb017d1942c0fe" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "a0437af80b26a79fc6c7e101114a0a455bd0bc7a4e9ccea1fa3b355aaac07390": { + "signature": "a0437af80b26a79fc6c7e101114a0a455bd0bc7a4e9ccea1fa3b355aaac07390", + "alternativeSignatures": [ + "495012003aa9faede4c4ad115a12784f6a8f549e1ebe976537b021d6e5296da9" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "0df8574205ace03dd154be3c3a221b36feae675ac237c8fea3b994f48df75fb8": { + "signature": "0df8574205ace03dd154be3c3a221b36feae675ac237c8fea3b994f48df75fb8", + "alternativeSignatures": [ + "15f5632806a855b11f25dc0c899f5f3982b9f92340841b85b35f9f5666c36921" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "851935ee9fe368011d0d65b595a839000849d57904224cd947664078ba46874d": { + "signature": "851935ee9fe368011d0d65b595a839000849d57904224cd947664078ba46874d", + "alternativeSignatures": [ + "c8aefc4c57da1e828bfa02df6e1abc444cc98f2e9ba3f1b0bb4a4f0c04d1fab0" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ba2a917a447947c7e8598dc49f18f6a918548051ed56fb0f38d801f52ebdaef0": { + "signature": "ba2a917a447947c7e8598dc49f18f6a918548051ed56fb0f38d801f52ebdaef0", + "alternativeSignatures": [ + "0460e5c64d667a95521ca05da96915a79178a361764141acf4bf7c4a75c3e47e" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "91b70c20fca1cd70bc4d7a34ba446f9a79d78c3c73ed708750062fe49a55324e": { + "signature": "91b70c20fca1cd70bc4d7a34ba446f9a79d78c3c73ed708750062fe49a55324e", + "alternativeSignatures": [ + "c884dc16288b0bfa8d5e7f06638c7c61a16bc42328f5a32c43f1d39c38da31f8" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "519f950c7bea3463674233b674b3093990f25167389e2d1ea82cfdf5b0ad0abf": { + "signature": "519f950c7bea3463674233b674b3093990f25167389e2d1ea82cfdf5b0ad0abf", + "alternativeSignatures": [ + "e3af28a3737f3eda0c96f52925a36770b7ccc6f3238b4ea855ce4b1d0e6e8f4b" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "192073ddefc720c7b9af682598676a54d54492be32707bf4bef8b3233e8aa1bb": { + "signature": "192073ddefc720c7b9af682598676a54d54492be32707bf4bef8b3233e8aa1bb", + "alternativeSignatures": [ + "795fa0e8fdbd60d899b1372eb853ec5b0b9b32c2f9117364c2f63856b7b17763" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "85c9f67cf21f805e1e507792f3b78c20703a374e04a7a50a071250d75a3a34c5": { + "signature": "85c9f67cf21f805e1e507792f3b78c20703a374e04a7a50a071250d75a3a34c5", + "alternativeSignatures": [ + "e387a1c8ec270a1be5c6048f2759118f30d2f43efceec3fae2aa37c892352391" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "000bea6b6816c3cf71200ceeccd187ac5d43172eb225d70b53f27cf94e4e0091": { + "signature": "000bea6b6816c3cf71200ceeccd187ac5d43172eb225d70b53f27cf94e4e0091", + "alternativeSignatures": [ + "977df07ec18dc533ce706b09124ec76a13719ca51a7e101762a0fb49c99b6985" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cc40ef86620baaad1faea5a6f3f6b19268b9e8f2fe7169c37dd9d1b1216225b5": { + "signature": "cc40ef86620baaad1faea5a6f3f6b19268b9e8f2fe7169c37dd9d1b1216225b5", + "alternativeSignatures": [ + "154f374516f141697b001546e7871a8f6377f3da5d8a42565fc035fcacbc9d22" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "f4c4a77a4a11940d05fa6484e202593866f3cc943f0679506a6dfbf3e2e3f254": { + "signature": "f4c4a77a4a11940d05fa6484e202593866f3cc943f0679506a6dfbf3e2e3f254", + "alternativeSignatures": [ + "70e7d79088b1beda828977ecbbfd908e56848a3f7b0963dcbabb087c49ad650c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7918a138214555e83a85a32519dd6fc31971b28aa956f66583194530de8b009c": { + "signature": "7918a138214555e83a85a32519dd6fc31971b28aa956f66583194530de8b009c", + "alternativeSignatures": [ + "479b344b41e42fb75f1205d3643792af4211d89a7881dfac007fd6c7c5358e09" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "fa7347c7f64562b9d7e0be884bcc9d60232f6995b2139a052bf4b8cfcc3d424a": { + "signature": "fa7347c7f64562b9d7e0be884bcc9d60232f6995b2139a052bf4b8cfcc3d424a", + "alternativeSignatures": [ + "8926b16a96043571d926ccc99741a5844bb54b1215ccc929568d2dc528da9e40" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3c494c3cdc3d2ab897a96f5b498fbf1731ba2c6dcc73e49399083635bc084e8a": { + "signature": "3c494c3cdc3d2ab897a96f5b498fbf1731ba2c6dcc73e49399083635bc084e8a", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8bb20ad2a210dc906e39ceb48b0a6a39b240878688ad6854161240ae3a597c87": { + "signature": "8bb20ad2a210dc906e39ceb48b0a6a39b240878688ad6854161240ae3a597c87", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "486f45a6c6f00cc927a87f4b7b122829bee893d6f523fed279e7e2deda450aff": { + "signature": "486f45a6c6f00cc927a87f4b7b122829bee893d6f523fed279e7e2deda450aff", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "643ded93447723ad1faad1de45b19108d986db08e488174a5422f3f1f7f0f7a3": { + "signature": "643ded93447723ad1faad1de45b19108d986db08e488174a5422f3f1f7f0f7a3", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "51d877cdee6cab498e1a0fd4c4dd2702b3e5da9eb308e0a631d2104e2d3d2a8c": { + "signature": "51d877cdee6cab498e1a0fd4c4dd2702b3e5da9eb308e0a631d2104e2d3d2a8c", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "849b1bea0ba2f8d1c24a58896b9d230ca317e8cff7e9540f73d578dd1aba12cb": { + "signature": "849b1bea0ba2f8d1c24a58896b9d230ca317e8cff7e9540f73d578dd1aba12cb", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c535332f090c89ae22a79aac4b9d344333c5479b891b79d72d252611c9364450": { + "signature": "c535332f090c89ae22a79aac4b9d344333c5479b891b79d72d252611c9364450", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "bc8ce9f1fd92dd123db1b6f8c33d15123bc8f3c4cb4fd42c54b4a2c5210bb158": { + "signature": "bc8ce9f1fd92dd123db1b6f8c33d15123bc8f3c4cb4fd42c54b4a2c5210bb158", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "9507f913c4445bebb9bdd471960011afa198c1e42d19c45d44aea58af61a137d": { + "signature": "9507f913c4445bebb9bdd471960011afa198c1e42d19c45d44aea58af61a137d", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "9ac9e0a5efc7c0d1e6d89422ca8e70e913eaba647ef42650f0bbc50da080a556": { + "signature": "9ac9e0a5efc7c0d1e6d89422ca8e70e913eaba647ef42650f0bbc50da080a556", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5d49433b67f4a2f1b6b323c498722d16aeda2d8781dafe9fcb9faaf9db4ee3e1": { + "signature": "5d49433b67f4a2f1b6b323c498722d16aeda2d8781dafe9fcb9faaf9db4ee3e1", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "71ee57f56c77339e4a0cb3f5bdfd05d15191136fc8ad887cef26fe1488522529": { + "signature": "71ee57f56c77339e4a0cb3f5bdfd05d15191136fc8ad887cef26fe1488522529", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "74b8ab85959da39f4da6710c6375080c44c8929d6b68f59a06dede355aeffacc": { + "signature": "74b8ab85959da39f4da6710c6375080c44c8929d6b68f59a06dede355aeffacc", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ca37e6fb6eb26bdec92893b3f6b08f8f41e6241f573a1b8e14d4e4d4ff1d2c7a": { + "signature": "ca37e6fb6eb26bdec92893b3f6b08f8f41e6241f573a1b8e14d4e4d4ff1d2c7a", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d7657bb2e0603e7b353f7b1e1d884306fe44f116c7665192fd6b33003333ef7a": { + "signature": "d7657bb2e0603e7b353f7b1e1d884306fe44f116c7665192fd6b33003333ef7a", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "90b7e7a132c8df4864a9ee49670cbaec9cbc5f5c53bf009eba5a583e0934a24f": { + "signature": "90b7e7a132c8df4864a9ee49670cbaec9cbc5f5c53bf009eba5a583e0934a24f", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8a5003e2db05146eaba3a7fc7aba715f51a5506b741a6ac2662e47e39c6165aa": { + "signature": "8a5003e2db05146eaba3a7fc7aba715f51a5506b741a6ac2662e47e39c6165aa", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "02590eb0efbb241f09bae58f60907c6dee5b33507519a4be87e168a458c2b9cb": { + "signature": "02590eb0efbb241f09bae58f60907c6dee5b33507519a4be87e168a458c2b9cb", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "df250772236d85876a9d789cca90b48e5eb79ad6cb13782465c8c88366c5d845": { + "signature": "df250772236d85876a9d789cca90b48e5eb79ad6cb13782465c8c88366c5d845", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3cd8e3eb9b94b01c93591c685406ea91d9d31b16aace0f109734e4bacb3838f2": { + "signature": "3cd8e3eb9b94b01c93591c685406ea91d9d31b16aace0f109734e4bacb3838f2", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "e91e45a96bf36327f551eadf27d9598b3d058fc051b0f9f0f1da9420410dc79a": { + "signature": "e91e45a96bf36327f551eadf27d9598b3d058fc051b0f9f0f1da9420410dc79a", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1c8a3d52bb83c1fbd1208b94663769b6452e73988540113dff20bfb4df4ca010": { + "signature": "1c8a3d52bb83c1fbd1208b94663769b6452e73988540113dff20bfb4df4ca010", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8839c1c5ab6e962faf123ad7b79a584170d6491855f69555664986a425984a36": { + "signature": "8839c1c5ab6e962faf123ad7b79a584170d6491855f69555664986a425984a36", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d2df996be35f179b45a3bdc28fcd9d5254a924ab52d2ca14b068bfea35e65284": { + "signature": "d2df996be35f179b45a3bdc28fcd9d5254a924ab52d2ca14b068bfea35e65284", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7a20b01096651f581c51904be7cd1281150c40efc61352b70aabbca3c40ea177": { + "signature": "7a20b01096651f581c51904be7cd1281150c40efc61352b70aabbca3c40ea177", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ef394eaa05e6eb5af1f5e523fd01f4e970f36cb2c7eacb3d363b47c9f70b0fec": { + "signature": "ef394eaa05e6eb5af1f5e523fd01f4e970f36cb2c7eacb3d363b47c9f70b0fec", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cb83a69b59f2de3fa1d049750ddeb855030d5662c43a1c5fea6b95f01e21547f": { + "signature": "cb83a69b59f2de3fa1d049750ddeb855030d5662c43a1c5fea6b95f01e21547f", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d08376cdfec80b5c0884a8b85f18c8b34ffee19f1395d12aef1ffc2821120f03": { + "signature": "d08376cdfec80b5c0884a8b85f18c8b34ffee19f1395d12aef1ffc2821120f03", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ef471993ee9839701feba16b5b56a926545a165bf95224130d6c8a2bdafdd451": { + "signature": "ef471993ee9839701feba16b5b56a926545a165bf95224130d6c8a2bdafdd451", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "d742600df5b4b6b71f65cf0079b09ec36a5d58bb4b8b07923b13ab8458f68a15": { + "signature": "d742600df5b4b6b71f65cf0079b09ec36a5d58bb4b8b07923b13ab8458f68a15", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "fd9536ec348269dbb12b813270403b7410fc13575d1cbb7770604dcf54ee776b": { + "signature": "fd9536ec348269dbb12b813270403b7410fc13575d1cbb7770604dcf54ee776b", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1614f1f0821f8900c7c8d2cb3a784272518ef6b86fb82070bda88b4bac9dbda8": { + "signature": "1614f1f0821f8900c7c8d2cb3a784272518ef6b86fb82070bda88b4bac9dbda8", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3479973e9ab00c84264e70c5d7290a5bfda506aafdb08c3277cb1df5db688ab9": { + "signature": "3479973e9ab00c84264e70c5d7290a5bfda506aafdb08c3277cb1df5db688ab9", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "e5bd231f55be121ed2579da9651c4ec0e661a386991ef8463facf3588c306a06": { + "signature": "e5bd231f55be121ed2579da9651c4ec0e661a386991ef8463facf3588c306a06", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "19661fe89c5e1f59089cdec06cbdf6bdda2439b52731dfd630b50ff5885d6223": { + "signature": "19661fe89c5e1f59089cdec06cbdf6bdda2439b52731dfd630b50ff5885d6223", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3bf81d57b0872ef6c8ac7878513cb8f58044e07238883f71f24b09542a8d1a07": { + "signature": "3bf81d57b0872ef6c8ac7878513cb8f58044e07238883f71f24b09542a8d1a07", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "2e07fdf491a04fc8a6cc50ae299f8345a81798499bda961a118e974970bb71a8": { + "signature": "2e07fdf491a04fc8a6cc50ae299f8345a81798499bda961a118e974970bb71a8", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "560fdab2979120fa3cfd2d9865d1ce2c0ba164982cc086cdc871b7e16fd12466": { + "signature": "560fdab2979120fa3cfd2d9865d1ce2c0ba164982cc086cdc871b7e16fd12466", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "489c5d92c47b3c961db0d5c32426a4d5fb48311e46ae49791be0f6ef03ddfc6e": { + "signature": "489c5d92c47b3c961db0d5c32426a4d5fb48311e46ae49791be0f6ef03ddfc6e", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "5890ec8b0f533c8186a824f1b46b2d99c2d54e7ed09917e5fedcdaea19b34706": { + "signature": "5890ec8b0f533c8186a824f1b46b2d99c2d54e7ed09917e5fedcdaea19b34706", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "70a8cd9f176fa02a78470ae78c285f56b617060ec339f0c8dfda095a5b0fc6c9": { + "signature": "70a8cd9f176fa02a78470ae78c285f56b617060ec339f0c8dfda095a5b0fc6c9", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7afd296a74705d2e561497c0ab8c3750179c1eff425f496297d3b877ff718526": { + "signature": "7afd296a74705d2e561497c0ab8c3750179c1eff425f496297d3b877ff718526", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "6ffd69e0724ed3b57e926224932b0aeeed7a834ee5dc1ad24c3262deb49172d7": { + "signature": "6ffd69e0724ed3b57e926224932b0aeeed7a834ee5dc1ad24c3262deb49172d7", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ca298b6b96ebfae8f14e29993264310b89fd738b365c2e7ca04e7af1a5cd67b7": { + "signature": "ca298b6b96ebfae8f14e29993264310b89fd738b365c2e7ca04e7af1a5cd67b7", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8764975fced41745e1a9c844144b2aacd30d3fcd77a8c4b1067adc5f2cd8b990": { + "signature": "8764975fced41745e1a9c844144b2aacd30d3fcd77a8c4b1067adc5f2cd8b990", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7cc3b3782554547d94e0f2e8817dbf823a84de8a95b6b358bdd29067bcff64c3": { + "signature": "7cc3b3782554547d94e0f2e8817dbf823a84de8a95b6b358bdd29067bcff64c3", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "db15b8200219494e427c3943404a81e931bf17af175823bc51da9b85b63a6831": { + "signature": "db15b8200219494e427c3943404a81e931bf17af175823bc51da9b85b63a6831", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "979582e68b87ec6e4cd7d90df4e05f01a6f9150ed07a0abc205112a241f0c16f": { + "signature": "979582e68b87ec6e4cd7d90df4e05f01a6f9150ed07a0abc205112a241f0c16f", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "56b251ecea166720fac682142922d79e01699a8cc576683b6d8944dfd3158de2": { + "signature": "56b251ecea166720fac682142922d79e01699a8cc576683b6d8944dfd3158de2", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cbcd76cbd2a6b0a8028fd6c3d1d11ee2e211519af2420396399c3c111a4da667": { + "signature": "cbcd76cbd2a6b0a8028fd6c3d1d11ee2e211519af2420396399c3c111a4da667", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8060e90601237ded928ae57570ef982dd3a57e7bffbec010fcd37e0bda518f10": { + "signature": "8060e90601237ded928ae57570ef982dd3a57e7bffbec010fcd37e0bda518f10", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "bc4b0a2231b13e5472e1548250ef4d7174d130daf559bca81f5d3c2c0c169690": { + "signature": "bc4b0a2231b13e5472e1548250ef4d7174d130daf559bca81f5d3c2c0c169690", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "91f0752674a19d0db604c50e23950746ff4d231cc76e40a7fa0f53dd5e855f4d": { + "signature": "91f0752674a19d0db604c50e23950746ff4d231cc76e40a7fa0f53dd5e855f4d", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "889e33f8e52ecb1d2b98d28772c572c2a10f0dc0c22fcc03b1da03df008d5f91": { + "signature": "889e33f8e52ecb1d2b98d28772c572c2a10f0dc0c22fcc03b1da03df008d5f91", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "6969ae787ed7e1caef670545de569929814479666e60a227abcb36395c3d3f60": { + "signature": "6969ae787ed7e1caef670545de569929814479666e60a227abcb36395c3d3f60", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "81adfccafd8eb134b75b59de6d4d0d8198c4639a3972d8072b61c67c9e1a104d": { + "signature": "81adfccafd8eb134b75b59de6d4d0d8198c4639a3972d8072b61c67c9e1a104d", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cf0223227addcd8b17bc89e4e5f0ee9174bca83c9ffc5b5493ef74940b33b58c": { + "signature": "cf0223227addcd8b17bc89e4e5f0ee9174bca83c9ffc5b5493ef74940b33b58c", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "fc000248c70e613f381ee770fb96dfd28e26766fa9627d28e5b9eb5fb314a3c8": { + "signature": "fc000248c70e613f381ee770fb96dfd28e26766fa9627d28e5b9eb5fb314a3c8", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "2987ea627ea4f2effb417244c4aac8f554bf42136d6ebe0fef1df440410be09c": { + "signature": "2987ea627ea4f2effb417244c4aac8f554bf42136d6ebe0fef1df440410be09c", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "4c2880cbace8da677942b80be039a982e356c18c827ebeddab265175c9640427": { + "signature": "4c2880cbace8da677942b80be039a982e356c18c827ebeddab265175c9640427", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "849ea2c1bdff1b36df8848a7f8898f11e981c3ba8f9b033abd9d1e8b1a03c8ca": { + "signature": "849ea2c1bdff1b36df8848a7f8898f11e981c3ba8f9b033abd9d1e8b1a03c8ca", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1706aea6ec9bfbbe540cfab3713db9b1a9ebc7f475b49f2348860e3ee6d8e682": { + "signature": "1706aea6ec9bfbbe540cfab3713db9b1a9ebc7f475b49f2348860e3ee6d8e682", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "8369054f43a96d4f463976b23773b2d22f8081d95f715161f019ceb58296d64a": { + "signature": "8369054f43a96d4f463976b23773b2d22f8081d95f715161f019ceb58296d64a", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "4ab520e2ed77b36c88f9eeeb5473205fd7f8f0a761eacee4cbbff389368dad8f": { + "signature": "4ab520e2ed77b36c88f9eeeb5473205fd7f8f0a761eacee4cbbff389368dad8f", + "alternativeSignatures": [ + "7ad51ffeb7d5438f15781162de5183c58d5db2d195f96e8c3527451adeb4e02c" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "96ab8bbaf30065be77880d679174d028a151c0fc888fca38a79038d341710563": { + "signature": "96ab8bbaf30065be77880d679174d028a151c0fc888fca38a79038d341710563", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "7bda7ae4037698bbdf188b4d3fb8a82e99063a8df2dcfe5f66ef747e3bd3f1a0": { + "signature": "7bda7ae4037698bbdf188b4d3fb8a82e99063a8df2dcfe5f66ef747e3bd3f1a0", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "a2dcb4a5d7e266049f9f865b27e69af19447e94f63ec9de8290763ddf901c756": { + "signature": "a2dcb4a5d7e266049f9f865b27e69af19447e94f63ec9de8290763ddf901c756", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "3aaf66a9a1f5bfba3b78eb7964ce8bf4dcabf7132465a31e219c6961f53dec56": { + "signature": "3aaf66a9a1f5bfba3b78eb7964ce8bf4dcabf7132465a31e219c6961f53dec56", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c6ed8bf76382b72621892d895d0659eb8ed66ef400f5d38506a3b62129b0f60e": { + "signature": "c6ed8bf76382b72621892d895d0659eb8ed66ef400f5d38506a3b62129b0f60e", + "alternativeSignatures": [ + "07873a6bbdd04caf121ed279cd4c24e55fb79ae3e86083c413b839d8d5e81cba" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "c511a0f0c15b79748a62ee0198689e7a0c8c2af102730c337823f6cd52b3ec66": { + "signature": "c511a0f0c15b79748a62ee0198689e7a0c8c2af102730c337823f6cd52b3ec66", + "alternativeSignatures": [ + "7142b2e2126a0c0e5bf2ad08e9e56d405620fbb9f12dfcd3f90a9dfcc30f8bf5" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "bfe258b52e19062b9009a68549bff3b2c99a6105f493cbf14332b3366691d446": { + "signature": "bfe258b52e19062b9009a68549bff3b2c99a6105f493cbf14332b3366691d446", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "52364f6839cf4bc824f1c82a31f3c7ee1cfb228383b3bee476ef7442526c0de8": { + "signature": "52364f6839cf4bc824f1c82a31f3c7ee1cfb228383b3bee476ef7442526c0de8", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "cef12040ed2c91d3bd7eba717e6c4bff8e547cb6d2b40363f1d859b02c873276": { + "signature": "cef12040ed2c91d3bd7eba717e6c4bff8e547cb6d2b40363f1d859b02c873276", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "ab290d190fa6582f2826c9b8524a4013ea67380f65328bc39c31dbcba59ec63c": { + "signature": "ab290d190fa6582f2826c9b8524a4013ea67380f65328bc39c31dbcba59ec63c", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "710963884a4d1e73d1ff4da0db7e1c8e1eeae25fe4a9e3c1de8b5019bb5d9d74": { + "signature": "710963884a4d1e73d1ff4da0db7e1c8e1eeae25fe4a9e3c1de8b5019bb5d9d74", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "db276fb1ea2a8e74e7ab80522362b8f402d361652ca823d7cab59465d038eb82": { + "signature": "db276fb1ea2a8e74e7ab80522362b8f402d361652ca823d7cab59465d038eb82", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "807277ed6647bcdc3eab2e24d8fbcaca0a6506d2ed455248b0497ceb42831e30": { + "signature": "807277ed6647bcdc3eab2e24d8fbcaca0a6506d2ed455248b0497ceb42831e30", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "685288ad132baddbcdf7a2201960f6d48805151f1aef2e094c4dbc16841b3e54": { + "signature": "685288ad132baddbcdf7a2201960f6d48805151f1aef2e094c4dbc16841b3e54", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "e972eb97ea7ea4a9524820036a42557f13a48240b6083c7baa0d465c00adfdee": { + "signature": "e972eb97ea7ea4a9524820036a42557f13a48240b6083c7baa0d465c00adfdee", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + }, + "1b2c907630acaff5b6e62eb4895043c82e93d885331f1f46296812634fd30abe": { + "signature": "1b2c907630acaff5b6e62eb4895043c82e93d885331f1f46296812634fd30abe", + "alternativeSignatures": [], + "memberOf": [ + "default" + ], + "createdDate": "2024-04-03 14:41:43Z" + } + } +} \ No newline at end of file diff --git a/src/SourceBuild/content/.devcontainer/README.md b/src/SourceBuild/content/.devcontainer/README.md new file mode 100644 index 000000000..5b548e497 --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/README.md @@ -0,0 +1,52 @@ + + +This Codespace can help you debug the source build of .NET. This build takes about +45 minutes and, after completion, produces an archived .NET SDK located in +`/workspaces/dotnet/artifacts/x64/Release`. In case you selected the `prebuilt-sdk` +Codespace, the SDK will already be there. + +## Build the SDK + +To build the VMR, run following: +```bash +./prep.sh && ./build.sh --online +``` + +> Please note that, at this time, the build modifies some of the checked-in sources so it might +be preferential to rebuild the Codespace between attempts (or reset the working tree changes). + +For more details, see the instructions at https://github.com/dotnet/dotnet. + +## Synchronize your changes in locally + +When debugging the build, you have two options how to test your changes in this environment. + +### Making changes to the VMR directly + +You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You +can then try to build the VMR and see if the change works for you. + +### Pull changes into the Codespace from your fork + +You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the +fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this +version of the repository into the Codespace by running: + +``` +/workspaces/synchronize-vmr.sh \ + --repository : \ + --remote : +``` + +You can now proceed building the VMR in the Codespace using instructions above. You can repeat +this process and sync a new commit from your fork. Only note that, at this time, Source-Build +modifies some of the checked-in sources so you'll need to revert the working tree changes +between attempts. diff --git a/src/SourceBuild/content/.devcontainer/devcontainer.json b/src/SourceBuild/content/.devcontainer/devcontainer.json new file mode 100644 index 000000000..6061a0eff --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// Container contains checked-out source code only +{ + "name": "Default", + "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36", + "hostRequirements": { + // A completely source built .NET is >64 GB with all the repos/artifacts + "storage": "128gb" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-dotnettools.csharp" + ] + }, + "codespaces": { + "openFiles": [ + ".devcontainer/README.md" + ] + } + }, + "onCreateCommand": ".devcontainer/init.sh" +} \ No newline at end of file diff --git a/src/SourceBuild/content/.devcontainer/init.sh b/src/SourceBuild/content/.devcontainer/init.sh new file mode 100755 index 000000000..9fa9e81f7 --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/init.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -eux + +source="${BASH_SOURCE[0]}" +script_root="$( cd -P "$( dirname "$source" )" && pwd )" + +workspace_dir=$(realpath "$script_root/../../") +tmp_dir=$(realpath "$workspace_dir/tmp") +vmr_dir=$(realpath "$workspace_dir/dotnet") + +cp "$vmr_dir/.devcontainer/synchronize-vmr.sh" "$workspace_dir" + +mkdir -p "$tmp_dir" diff --git a/src/SourceBuild/content/.devcontainer/prebuilt-sdk/devcontainer.json b/src/SourceBuild/content/.devcontainer/prebuilt-sdk/devcontainer.json new file mode 100644 index 000000000..eaff85ffd --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/prebuilt-sdk/devcontainer.json @@ -0,0 +1,22 @@ +// Container contains a pre-built SDK +{ + "name": "Pre-built .NET SDK", + "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36", + "hostRequirements": { + // A completely source built .NET is >64 GB with all the repos/artifacts + "storage": "128gb" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-dotnettools.csharp" + ] + }, + "codespaces": { + "openFiles": [ + ".devcontainer/README.md" + ] + } + }, + "onCreateCommand": ".devcontainer/prebuilt-sdk/init.sh" +} \ No newline at end of file diff --git a/src/SourceBuild/content/.devcontainer/prebuilt-sdk/init.sh b/src/SourceBuild/content/.devcontainer/prebuilt-sdk/init.sh new file mode 100644 index 000000000..6ba00c46a --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/prebuilt-sdk/init.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +script_root="$( cd -P "$( dirname "$source" )" && pwd )" + +"$script_root"/../../prep.sh + +cp "$script_root/../synchronize-vmr.sh" "/workspaces/" +"$script_root"/../../build.sh --online --clean-while-building || exit 0 diff --git a/src/SourceBuild/content/.devcontainer/synchronize-vmr.sh b/src/SourceBuild/content/.devcontainer/synchronize-vmr.sh new file mode 100755 index 000000000..091ae0e26 --- /dev/null +++ b/src/SourceBuild/content/.devcontainer/synchronize-vmr.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +(cd /workspaces/dotnet/src/installer \ + && ./eng/vmr-sync.sh --vmr /workspaces/dotnet --tmp /workspaces/tmp $*) diff --git a/src/SourceBuild/content/.gitignore b/src/SourceBuild/content/.gitignore new file mode 100644 index 000000000..a5da6c81c --- /dev/null +++ b/src/SourceBuild/content/.gitignore @@ -0,0 +1,10 @@ +/.dotnet +/artifacts +/eng/tools/**/bin +/eng/tools/**/obj +/prereqs/packages +/src/linker/src/ILLink.Tasks/ILLink.Tasks.nuspec +/src/nuget-client/NuGet.config +/test/Microsoft.DotNet.SourceBuild.SmokeTests/bin +/test/Microsoft.DotNet.SourceBuild.SmokeTests/obj +/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults diff --git a/src/SourceBuild/content/.vault-config/vmr-pipeline-secrets.yaml b/src/SourceBuild/content/.vault-config/vmr-pipeline-secrets.yaml new file mode 100644 index 000000000..643a89ba8 --- /dev/null +++ b/src/SourceBuild/content/.vault-config/vmr-pipeline-secrets.yaml @@ -0,0 +1,13 @@ +# Partially copied from https://github.com/dotnet/arcade/blob/dfc6882da43decb37f12e0d9011ce82b25225578/.vault-config/product-builds-dnceng-pipeline-secrets.yaml + +secrets: + BotAccount-dotnet-sb-bot: + type: github-account + parameters: + Name: dotnet-sb-bot + + BotAccount-dotnet-sb-bot-pat: + type: github-access-token + parameters: + gitHubBotAccountSecret: BotAccount-dotnet-sb-bot + gitHubBotAccountName: dotnet-sb-bot \ No newline at end of file diff --git a/src/SourceBuild/content/CODE_OF_CONDUCT.md b/src/SourceBuild/content/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..775f221c9 --- /dev/null +++ b/src/SourceBuild/content/CODE_OF_CONDUCT.md @@ -0,0 +1,6 @@ +# Code of Conduct + +This project has adopted the code of conduct defined by the Contributor Covenant +to clarify expected behavior in our community. + +For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). diff --git a/src/SourceBuild/content/CONTRIBUTING.md b/src/SourceBuild/content/CONTRIBUTING.md new file mode 100644 index 000000000..1b23b661b --- /dev/null +++ b/src/SourceBuild/content/CONTRIBUTING.md @@ -0,0 +1,7 @@ +Contributing +============ + +See [dotnet/runtime](./src/runtime/CONTRIBUTING.md) for general contribution guidelines such as allowed licenses. + +At this time, the VMR will not accept any changes and is a read-only mirror of the development repositories only. +Please, make the changes in the respective development repositories (e.g., [dotnet/runtime](https://github.com/dotnet/runtime) or [dotnet/sdk](https://github.com/dotnet/sdk)) and they will get synchronized into the VMR automatically. \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props similarity index 74% rename from src/SourceBuild/tarball/content/Directory.Build.props rename to src/SourceBuild/content/Directory.Build.props index c4902c251..c47f4ad02 100644 --- a/src/SourceBuild/tarball/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -19,17 +19,10 @@ $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) $(BuildArchitecture) $(BuildArchitecture) + $(BuildArchitecture) x64 false - - - false - false - true - false @@ -40,13 +33,15 @@ $(MSBuildThisFileDirectory) $(ProjectDir)targets/ - $(ProjectDir)keys/ + $(ProjectDir)prereqs/ + $(PrereqsDir)/keys/ $([MSBuild]::EnsureTrailingSlash('$(CustomDotNetSdkDir)')) $([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)')) $(ProjectDir).dotnet/ $(DotNetCliToolDir)dotnet + $(ProjectDir)prereqs/packages/ $(NuGetPackageRoot) - $(ProjectDir)packages/restored/ + $(PrereqsPackagesDir)restored/ $(PackagesDir)ArcadeBootstrapPackage/ $(NETCoreSdkVersion) @@ -90,12 +85,12 @@ + $(RepositoryEngineeringDir)arcade-overrides/ $(ArtifactsDir) $(ProjectDir).git/modules/src/ - $(ProjectDir)Tools/ - $(ToolsDir)source-built/ - $(ProjectDir)tools-local/ - $(ToolsLocalDir)tasks/ + $(ArtifactsDir)source-built-sdks/ + $(RepositoryEngineeringDir)/tools/ + $(ToolsDir)tasks/ $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/$(Configuration)/ $(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll @@ -111,32 +106,28 @@ $(IntermediatePath)blob-feed/ $(SourceBuiltBlobFeedDir)packages/ $(SourceBuiltBlobFeedDir)assets/ - $(ProjectDir)packages/prebuilt/ - $(ProjectDir)packages/previouslyRestored/ - $(ProjectDir)packages/previously-source-built/ + $(PrereqsPackagesDir)prebuilt/ + $(PrereqsPackagesDir)previouslyRestored/ + $(PrereqsPackagesDir)previously-source-built/ $(CustomPrebuiltSourceBuiltPackagesPath)/ $(OutputPath) $(LocalBlobStorageRoot)Sdk/ $(LocalBlobStorageRoot)Runtime/ $(LocalBlobStorageRoot)aspnetcore/Runtime/ - $(IntermediatePath)RestoreSources.props - $(IntermediatePath)PackageVersions.props - $(IntermediatePath)CurrentSourceBuiltPackageVersions.props $(BaseOutputPath)logs/ $(BaseOutputPath)msbuild-debug/ $(BaseOutputPath)roslyn-debug/ $(BaseOutputPath)aspnet-debug $(AspNetRazorBuildServerLogDir)razor-build-server.log - - $(BaseOutputPath)git-info/ - - $(ProjectDir)git-info/ - $(GitInfoOutputDir)$(RepositoryName).props - $(GitInfoOutputDir)AllRepoVersions.props - $(GitInfoOfflineDir)$(RepositoryName).props - $(GitInfoOfflineDir)AllRepoVersions.props + $(PrereqsDir)git-info/ + $(GitInfoDir)$(RepositoryName).props + $(GitInfoDir)AllRepoVersions.props $(BaseOutputPath)prebuilt-report/ + $(ProjectDir)/repo-projects/ $(PackageReportDir)prebuilt-packages/ + $(PackageReportDir)packagelists/ + + NonShipping.Packages. $(PackageReportDir)prebuilt-usage.xml $(PackageReportDir)poison-usage.xml $(PackageReportDir)poison-catalog.xml @@ -148,29 +139,27 @@ $(PackageReportDir)poisoned.txt $(BaseOutputPath)conflict-report/ $(PackageReportDir)PrebuiltBurndownData.csv - $(ProjectDir)packages/archive/ - $(ProjectDir)packages/text-only/ - $(ProjectDir)packages/reference/ + $(PrereqsPackagesDir)archive/ + $(PrereqsPackagesDir)reference/ Private.SourceBuilt.Artifacts Private.SourceBuilt.Prebuilts https://dotnetcli.azureedge.net/source-built-artifacts/assets/ archiveArtifacts.txt $(ExternalTarballsDir)$(ArchiveArtifactsTextFileName) - $(ToolsLocalDir)prebuilt-baseline.xml + $(ToolsDir)prebuilt-baseline.xml $(ProjectDir)test/exclusions/ $(ProjectDir)test/Microsoft.DotNet.SourceBuild.SmokeTests/ - - - ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/arm ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/armel + + $(__DistroRid) $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) Windows_NT @@ -178,21 +167,17 @@ Linux FreeBSD - freebsd-$(Platform) - osx-$(Platform) - linux-$(Platform) + $(__PortableTargetOS)-$(Platform) + freebsd-$(Platform) + osx-$(Platform) + linux-$(Platform) linux-musl-$(Platform) - win-$(Platform) + win-$(Platform) $(PortableRid) - - known-good - known-good-tests + dotnet + - + - + - - - + + + @@ -244,6 +228,10 @@ + + + + diff --git a/src/SourceBuild/content/Directory.Build.targets b/src/SourceBuild/content/Directory.Build.targets new file mode 100644 index 000000000..b80cbf707 --- /dev/null +++ b/src/SourceBuild/content/Directory.Build.targets @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + @(MicrosoftSourceBuildIntermediateInstallerVersionItem) + $(installerOutputPackageVersion) + + + + + + diff --git a/src/SourceBuild/content/LICENSE.TXT b/src/SourceBuild/content/LICENSE.TXT new file mode 100644 index 000000000..a616ed188 --- /dev/null +++ b/src/SourceBuild/content/LICENSE.TXT @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/SourceBuild/content/NuGet.config b/src/SourceBuild/content/NuGet.config new file mode 100644 index 000000000..8ce541b9a --- /dev/null +++ b/src/SourceBuild/content/NuGet.config @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/SourceBuild/content/README.md b/src/SourceBuild/content/README.md new file mode 100644 index 000000000..c83ad9a6d --- /dev/null +++ b/src/SourceBuild/content/README.md @@ -0,0 +1,180 @@ +# dotnet/dotnet - Home of the .NET VMR + +This repository is a **Virtual Monolithic Repository (VMR)** which includes all the source code and infrastructure needed to build the .NET SDK. + +What this means: +- **Monolithic** - a join of multiple repositories that make up the whole product, such as [dotnet/runtime](https://github.com/dotnet/runtime) or [dotnet/sdk](https://github.com/dotnet/sdk). +- **Virtual** - a mirror (not replacement) of product repos where sources from those repositories are synchronized into. + +In the VMR, you can find: +- source files of [each product repository](#list-of-components) which are mirrored inside of their respective directories under [`src/`](https://github.com/dotnet/dotnet/tree/main/src), +- tooling that enables [building the whole .NET product from source](https://github.com/dotnet/source-build) on Linux platforms, +- small customizations, in the form of [patches](https://github.com/dotnet/dotnet/tree/main/src/installer/src/SourceBuild/patches), applied on top of the original code to make the build possible, +- *[in future]* E2E tests for the whole .NET product. + +Just like the development repositories, the VMR will have a release branch for every feature band (e.g. `release/8.0.1xx-preview1`). +Similarly, VMR's `main` branch will follow `main` branches of product repositories (see [Synchronization Based on Declared Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#synchronization-based-on-declared-dependencies)). + +More in-depth documentation about the VMR can be found in [VMR Design And Operation](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#layout). +See also [dotnet/source-build](https://github.com/dotnet/source-build) for more information about our whole-product source-build. + +## Goals + +- The main purpose of the [dotnet/dotnet](https://github.com/dotnet/dotnet) repository is to have all source code necessary to build the .NET product available in one repository and identified by a single commit. +- The VMR also aims to become the place from which we release and service future versions of .NET to reduce the complexity of the product construction process. This should allow our partners and and 3rd parties to easily build, test and modify .NET using their custom infrastructure as well as make the process available to the community. +- Lastly, we hope to solve other problems that the current multi-repo setup brings: + - Enable the standard [down-/up-stream open-source model](src/arcade/Documentation/UnifiedBuild/VMR-Upstream-Downstream.md). + - Fulfill requirements of .NET distro builders such as RedHat or Canonical to natively include .NET in their distribution repositories. + - Simplify scenarios such as client-run testing of bug fixes and improvements. The build should work in an offline environment too for certain platforms. + - Enable developers to make and test changes spanning multiple repositories. + - More efficient pipeline for security fixes during the CVE pre-disclosure process. + +## Limitations + +**This is a work-in-progress.** +There are considerable limitations to what is possible at the moment. For an extensive list of current limitations, please see [Temporary Mechanics](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#temporary-mechanics). +See the [Unified Build roadmap](src/arcade/Documentation/UnifiedBuild/Roadmap.md) for more details. + +### Supported platforms + +The VMR only supports .NET 8.0 and higher. Additionally, source-build currently supports Linux only. +It is expected that Mac and Windows will be supported in the .NET 9.0. + +For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements. + +### Online build only + +Building the product offline is not fully working at the moment. The `--online` switch is needed when building the VMR as not all dependencies are currently built from source. + +### Code flow +For the time being, the source code only flows one way - from the development repos into the VMR. +More details on this process: + +- [Source Synchronization Process](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#source-synchronization-process) +- [Synchronization Based on Declared Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#synchronization-based-on-declared-dependencies) +- [Moving Code and Dependencies between the VMR and Development Repos](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#moving-code-and-dependencies-between-the-vmr-and-development-repos) + +We expect the code flow to start working both ways in the .NET 9 timeframe. +See the [Unified Build roadmap](src/arcade/Documentation/UnifiedBuild/Roadmap.md) for more details. + +### Contribution + +At this time, the VMR will not accept any changes and is a read-only mirror of the development repositories only. +Please, make the changes in the respective development repositories (e.g., [dotnet/runtime](https://github.com/dotnet/runtime) or [dotnet/sdk](https://github.com/dotnet/sdk)) and they will get synchronized into the VMR automatically. + +## Dev instructions + +Please note that **this repository is a work-in-progress** and there are some usability issues connected to this. +These can be nuisances such as some checked-in files getting modified by the build itself and similar. +For the latest information about Source-Build support, please watch for announcements posted on our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions). + +### Prerequisites + +The dependencies for building .NET from source can be found [here](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md). +In case you don't want to / cannot prepare your environment per the requirements, consider [using Docker](#building-using-docker). + +### Building + +1. **Clone the VMR** + + ```bash + git clone https://github.com/dotnet/dotnet dotnet-dotnet + ``` + +2. **Prep the source to build on your distro** + This downloads a .NET SDK and a number of .NET packages needed to build .NET from source. + + ```bash + cd dotnet-dotnet + ./prep.sh + ``` + +3. **Build the .NET SDK** + + ```bash + ./build.sh --clean-while-building --online + ``` + + This builds the entire .NET SDK from source. + The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-8.0.100-your-RID.tar.gz`. + + Currently, the `--online` flag is required to allow NuGet restore from online sources during the build. + This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet. + + Run `./build.sh --help` to see more information about supported build options. + +4. *(Optional)* **Unpack and install the .NET SDK** + + ```bash + mkdir -p $HOME/dotnet + tar zxf artifacts/[your-arch]/Release/dotnet-sdk-8.0.100-[your-RID].tar.gz -C $HOME/dotnet + ln -s $HOME/dotnet/dotnet /usr/bin/dotnet + ``` + + To test your source-built SDK, run the following: + + ```bash + dotnet --info + ``` + +### Building using Docker + +You can also build the repository using a Docker image which has the required prerequisites inside. +The example below creates a Docker volume named `vmr` and clones and builds the VMR there. + +```sh +docker run --rm -it -v vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 +git clone https://github.com/dotnet/dotnet . +./prep.sh && ./build.sh --online +mkdir -p $HOME/.dotnet +tar -zxf artifacts/x64/Release/dotnet-sdk-8.0.100-centos.8-x64.tar.gz -C $HOME/.dotnet +ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet +``` + +### Codespaces + +You can also utilize [GitHub Codespaces](https://github.com/features/codespaces) where you can find preset containers in this repository. + +### Building from released sources + +You can also build from sources (and not from a context of a git repository), such as the ones you can acquire from a [dotnet/dotnet release](https://github.com/dotnet/dotnet/releases). +In this case, you need to provide additional information which includes the original repository and commit hash the code was built from so that the SDK can provide a better debugging experience (think the `Step into..` functionality). +Usually, this means the [dotnet/dotnet repository](https://github.com/dotnet/dotnet) together with the commit the release tag is connected to. + +In practice, this means that when calling the main build script, you need to provide additional arguments when building outside of a context of a git repository. +Alternatively, you can also provide a manifest file where this information can be read from. This file (`release.json`) can be found attached with the [dotnet/dotnet release](https://github.com/dotnet/dotnet/releases). + +### Synchronizing code into the VMR + +Sometimes you want to make a change in a repository and test that change in the VMR. You could of course make the change in the VMR directly (locally, as the VMR is read-only for now) but in case it's already available in your repository, you can synchronize it into the VMR (again locally). + +To do this, you can start a [dotnet/dotnet](https://github.com/dotnet/dotnet) Codespace. You will see instructions right when the Codespace starts. Alternatively, you can clone the repository locally and use the `[eng/vmr-sync.sh](../../eng/vmr-sync.sh)` script to do that. Please refer to the documentation in the script for more details. + +## List of components + +The full list of components synchronized into the VMR is [here (Components.md)](./Components.md). + +The repository also contains a [JSON manifest](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json) listing all components in a machine-readable format. + +## Filing Issues + +This repo does not accept issues as of now. Please file issues to the appropriate development repos. +For issues with the VMR itself, please use the [source-build repository](https://github.com/dotnet/source-build). + +## Useful Links + +- Design documentation for the VMR - a set of documents describing the high-level design and the why's and how's + - [Design and Operation](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md) + - [Upstream/Downstream Relationships](src/arcade/Documentation/UnifiedBuild/VMR-Upstream-Downstream.md) + - [Code and Build Workflow](src/arcade/Documentation/UnifiedBuild/VMR-Code-And-Build-Workflow.md) + - [Strategy for Managing External Source Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Strategy-For-External-Source.md) +- [.NET Source-Build](https://github.com/dotnet/source-build) +- [What is .NET](https://dotnet.microsoft.com) + +## .NET Foundation + +.NET Runtime is a [.NET Foundation](https://www.dotnetfoundation.org/projects) project. + +## License + +.NET is licensed under the [MIT](LICENSE.TXT) license. diff --git a/src/SourceBuild/content/SECURITY.md b/src/SourceBuild/content/SECURITY.md new file mode 100644 index 000000000..e0dfff56a --- /dev/null +++ b/src/SourceBuild/content/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + diff --git a/src/SourceBuild/tarball/content/build.proj b/src/SourceBuild/content/build.proj similarity index 60% rename from src/SourceBuild/tarball/content/build.proj rename to src/SourceBuild/content/build.proj index 523128954..7d074d880 100644 --- a/src/SourceBuild/tarball/content/build.proj +++ b/src/SourceBuild/content/build.proj @@ -4,27 +4,19 @@ - + - - - - - - - - + - @@ -36,18 +28,111 @@ - + + + + + + + + + + + + - + + + + + + + + + + + + + $([System.IO.Path]::GetFileName('%(SymbolsTarball.Identity)')) + $(Filename.Split('.')[1]) + $(ArtifactsTmpDir)Symbols + $(UnifiedSymbolsLayout)/$(RepositoryName) + + + + + + + + + + + + $(OutputPath)dotnet-symbols-all-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid).tar.gz + + + + + + + + + + + + + + + $(ArtifactsTmpDir)SdkSymbols + $(OutputPath)dotnet-symbols-sdk-$(MicrosoftSourceBuildIntermediateInstallerVersion)-$(TargetRid).tar.gz + $(ArtifactsTmpDir)Sdk + %(SdkTarballItem.Identity) + + + + + + + + + + + + + + - + + + + + + PoisonReportOutputFilePath="$(PoisonUsageReportFile)" + NonShippingPackagesListFiles="@(NonShippingPackagesList)" /> @@ -93,11 +184,13 @@ + SMOKE_TESTS_POISON_REPORT_PATH=$(PoisonUsageReportFile); %(SdkTarballItem.Identity) + %(SourceBuiltArtifactsItem.Identity) normal @@ -105,6 +198,7 @@ + CreateSmokeTestPrereqsTarballIfPrereqsExist"/> - $(SmokeTestsDir)bin/$(Configuration)/net6.0/ + $(SmokeTestsDir)bin/$(Configuration)/net8.0/ $(SmokeTestsArtifactsDir)packages/ @@ -131,10 +225,11 @@ - - $(OutputPath)dotnet-smoke-test-prereqs.$(installerOutputPackageVersion).$(TargetRid).tar.gz + $(OutputPath)dotnet-smoke-test-prereqs.$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid).tar.gz $(SmokeTestsArtifactsDir)prereq-packages/ @@ -188,9 +283,10 @@ - $(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(installerOutputPackageVersion).$(TargetRid).tar.gz + $(OutputPath)$(SourceBuiltPrebuiltsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid).tar.gz $(ResultingPrebuiltPackagesDir) diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh new file mode 100755 index 000000000..a1224e436 --- /dev/null +++ b/src/SourceBuild/content/build.sh @@ -0,0 +1,267 @@ +#!/usr/bin/env bash + +### Usage: $0 [options] +### +### Options: +### --clean-while-building Cleans each repo after building (reduces disk space usage) +### --online Build using online sources +### --poison Build with poisoning checks +### --run-smoke-test Don't build; run smoke tests +### --source-repository Source Link repository URL, required when building from tarball +### --source-version Source Link revision, required when building from tarball +### --release-manifest A JSON file, an alternative source of Source Link metadata +### --use-mono-runtime Output uses the mono runtime +### --with-packages Use the specified directory of previously-built packages +### --with-sdk Use the SDK in the specified directory for bootstrapping +### +### Use -- to send the remaining arguments to MSBuild + +set -euo pipefail +IFS=$'\n\t' + +source="${BASH_SOURCE[0]}" +SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" + +function print_help () { + sed -n '/^### /,/^$/p' "$source" | cut -b 5- +} + +MSBUILD_ARGUMENTS=("-flp:v=detailed") +CUSTOM_PACKAGES_DIR='' +alternateTarget=false +runningSmokeTests=false +packagesDir="$SCRIPT_ROOT/prereqs/packages/" +packagesArchiveDir="${packagesDir}archive/" +packagesRestoredDir="${packagesDir}restored/" +packagesPreviouslySourceBuiltDir="${packagesDir}previously-source-built/" +CUSTOM_SDK_DIR='' + +sourceRepository='' +sourceVersion='' +releaseManifest='' + +while :; do + if [ $# -le 0 ]; then + break + fi + + lowerI="$(echo "$1" | awk '{print tolower($0)}')" + case $lowerI in + --clean-while-building) + MSBUILD_ARGUMENTS+=( "-p:CleanWhileBuilding=true") + ;; + --online) + MSBUILD_ARGUMENTS+=( "-p:BuildWithOnlineSources=true") + ;; + --poison) + MSBUILD_ARGUMENTS+=( "-p:EnablePoison=true") + ;; + --run-smoke-test) + alternateTarget=true + runningSmokeTests=true + MSBUILD_ARGUMENTS+=( "-t:RunSmokeTest" ) + ;; + --source-repository) + sourceRepository="$2" + shift + ;; + --source-version) + sourceVersion="$2" + shift + ;; + --release-manifest) + releaseManifest="$2" + shift + ;; + --use-mono-runtime) + MSBUILD_ARGUMENTS+=( "/p:SourceBuildUseMonoRuntime=true" ) + ;; + --with-packages) + CUSTOM_PACKAGES_DIR="$(cd -P "$2" && pwd)" + if [ ! -d "$CUSTOM_PACKAGES_DIR" ]; then + echo "Custom prviously built packages directory '$CUSTOM_PACKAGES_DIR' does not exist" + exit 1 + fi + shift + ;; + --with-sdk) + CUSTOM_SDK_DIR="$(cd -P "$2" && pwd)" + if [ ! -d "$CUSTOM_SDK_DIR" ]; then + echo "Custom SDK directory '$CUSTOM_SDK_DIR' does not exist" + exit 1 + fi + if [ ! -x "$CUSTOM_SDK_DIR/dotnet" ]; then + echo "Custom SDK '$CUSTOM_SDK_DIR/dotnet' does not exist or is not executable" + exit 1 + fi + shift + ;; + --) + shift + echo "Detected '--': passing remaining parameters '$@' as build.sh arguments." + break + ;; + '-?'|-h|--help) + print_help + exit 0 + ;; + *) + echo "Unrecognized argument '$1'" + print_help + exit 1 + ;; + esac + shift +done + +# For build purposes, we need to make sure we have all the SourceLink information +if [ "$alternateTarget" != "true" ]; then + GIT_DIR="$SCRIPT_ROOT/.git" + if [ -f "$GIT_DIR/index" ]; then # We check for index because if outside of git, we create config and HEAD manually + if [ -n "$sourceRepository" ] || [ -n "$sourceVersion" ] || [ -n "$releaseManifest" ]; then + echo "ERROR: Source Link arguments cannot be used in a git repository" + exit 1 + fi + else + if [ -z "$releaseManifest" ]; then + if [ -z "$sourceRepository" ] || [ -z "$sourceVersion" ]; then + echo "ERROR: $SCRIPT_ROOT is not a git repository, either --release-manifest or --source-repository and --source-version must be specified" + exit 1 + fi + else + if [ -n "$sourceRepository" ] || [ -n "$sourceVersion" ]; then + echo "ERROR: --release-manifest cannot be specified together with --source-repository and --source-version" + exit 1 + fi + + get_property() { + local json_file_path="$1" + local property_name="$2" + grep -oP '(?<="'$property_name'": ")[^"]*' "$json_file_path" + } + + sourceRepository=$(get_property "$releaseManifest" sourceRepository) \ + || (echo "ERROR: Failed to find sourceRepository in $releaseManifest" && exit 1) + sourceVersion=$(get_property "$releaseManifest" sourceVersion) \ + || (echo "ERROR: Failed to find sourceVersion in $releaseManifest" && exit 1) + + if [ -z "$sourceRepository" ] || [ -z "$sourceVersion" ]; then + echo "ERROR: sourceRepository and sourceVersion must be specified in $releaseManifest" + exit 1 + fi + fi + + # We need to add "fake" .git/ files when not building from a git repository + mkdir -p "$GIT_DIR" + echo '[remote "origin"]' > "$GIT_DIR/config" + echo "url=\"$sourceRepository\"" >> "$GIT_DIR/config" + echo "$sourceVersion" > "$GIT_DIR/HEAD" + fi +fi + +if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then + if [ "$runningSmokeTests" == "true" ]; then + MSBUILD_ARGUMENTS+=( "-p:CustomSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" ) + else + MSBUILD_ARGUMENTS+=( "-p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" ) + fi +fi + +if [ -f "${packagesArchiveDir}archiveArtifacts.txt" ]; then + ARCHIVE_ERROR=0 + if [ ! -d "$SCRIPT_ROOT/.dotnet" ] && [ "$CUSTOM_SDK_DIR" == "" ]; then + echo "ERROR: SDK not found at '$SCRIPT_ROOT/.dotnet'. Either run prep.sh to acquire one or specify one via the --with-sdk parameter." + ARCHIVE_ERROR=1 + fi + if [ ! -f ${packagesArchiveDir}Private.SourceBuilt.Artifacts*.tar.gz ] && [ "$CUSTOM_PACKAGES_DIR" == "" ]; then + echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at '$packagesArchiveDir'. Either run prep.sh to acquire it or specify one via the --with-packages parameter." + ARCHIVE_ERROR=1 + fi + if [ $ARCHIVE_ERROR == 1 ]; then + exit 1 + fi +fi + +if [ ! -d "$SCRIPT_ROOT/.git" ]; then + echo "ERROR: $SCRIPT_ROOT is not a git repository. Please run prep.sh add initialize Source Link metadata." + exit 1 +fi + +if [ -d "$CUSTOM_SDK_DIR" ]; then + export SDK_VERSION=$("$CUSTOM_SDK_DIR/dotnet" --version) + export CLI_ROOT="$CUSTOM_SDK_DIR" + export _InitializeDotNetCli="$CLI_ROOT/dotnet" + export CustomDotNetSdkDir="$CLI_ROOT" + echo "Using custom bootstrap SDK from '$CLI_ROOT', version '$SDK_VERSION'" +else + sdkLine=$(grep -m 1 'dotnet' "$SCRIPT_ROOT/global.json") + sdkPattern="\"dotnet\" *: *\"(.*)\"" + if [[ $sdkLine =~ $sdkPattern ]]; then + export SDK_VERSION=${BASH_REMATCH[1]} + export CLI_ROOT="$SCRIPT_ROOT/.dotnet" + fi +fi + +packageVersionsPath='' + +if [[ "$CUSTOM_PACKAGES_DIR" != "" && -f "$CUSTOM_PACKAGES_DIR/PackageVersions.props" ]]; then + packageVersionsPath="$CUSTOM_PACKAGES_DIR/PackageVersions.props" +elif [ -d "$packagesArchiveDir" ]; then + sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz') + if [ -f "${packagesPreviouslySourceBuiltDir}}PackageVersions.props" ]; then + packageVersionsPath=${packagesPreviouslySourceBuiltDir}PackageVersions.props + elif [ -f "$sourceBuiltArchive" ]; then + tar -xzf "$sourceBuiltArchive" -C /tmp PackageVersions.props + packageVersionsPath=/tmp/PackageVersions.props + fi +fi + +if [ ! -f "$packageVersionsPath" ]; then + echo "Cannot find PackagesVersions.props. Debugging info:" + echo " Attempted archive path: $packagesArchiveDir" + echo " Attempted custom PVP path: $CUSTOM_PACKAGES_DIR/PackageVersions.props" + exit 1 +fi + +arcadeSdkLine=$(grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath") +versionPattern="(.*)" +if [[ $arcadeSdkLine =~ $versionPattern ]]; then + export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]} + + # Ensure that by default, the bootstrap version of the Arcade SDK is used. Source-build infra + # projects use bootstrap Arcade SDK, and would fail to find it in the build. The repo + # projects overwrite this so that they use the source-built Arcade SDK instad. + export SOURCE_BUILT_SDK_ID_ARCADE=Microsoft.DotNet.Arcade.Sdk + export SOURCE_BUILT_SDK_VERSION_ARCADE=$ARCADE_BOOTSTRAP_VERSION + export SOURCE_BUILT_SDK_DIR_ARCADE=$packagesRestoredDir/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/$ARCADE_BOOTSTRAP_VERSION +fi + +sourceLinkLine=$(grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath") +versionPattern="(.*)" +if [[ $sourceLinkLine =~ $versionPattern ]]; then + export SOURCE_LINK_BOOTSTRAP_VERSION=${BASH_REMATCH[1]} +fi + +echo "Found bootstrap SDK $SDK_VERSION, bootstrap Arcade $ARCADE_BOOTSTRAP_VERSION, bootstrap SourceLink $SOURCE_LINK_BOOTSTRAP_VERSION" + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export NUGET_PACKAGES=$packagesRestoredDir/ + +source $SCRIPT_ROOT/eng/common/native/init-os-and-arch.sh +source $SCRIPT_ROOT/eng/common/native/init-distro-rid.sh +initDistroRidGlobal "$os" "$arch" "" + +LogDateStamp=$(date +"%m%d%H%M%S") + +"$CLI_ROOT/dotnet" build-server shutdown + +if [ "$alternateTarget" == "true" ]; then + export NUGET_PACKAGES=$NUGET_PACKAGES/smoke-tests + "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog" -flp:"LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log" -clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@" +else + "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog" -flp:LogFile="$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log" -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@" + # kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver + "$CLI_ROOT/dotnet" build-server shutdown + + "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:"$SCRIPT_ROOT/artifacts/log/Debug/Build_$LogDateStamp.binlog" -flp:"LogFile=$SCRIPT_ROOT/artifacts/logs/Build_$LogDateStamp.log" ${MSBUILD_ARGUMENTS[@]} "$@" +fi diff --git a/src/SourceBuild/content/docs/license-scanning.md b/src/SourceBuild/content/docs/license-scanning.md new file mode 100644 index 000000000..6007776ab --- /dev/null +++ b/src/SourceBuild/content/docs/license-scanning.md @@ -0,0 +1,24 @@ +# License Scanning + +The VMR is regularly scanned for license references to ensure that only open-source license are used where relevant. + +License scanning pipline: https://dev.azure.com/dnceng/internal/_build?definitionId=1301 (internal only) + +License scanning test: https://github.com/dotnet/dotnet/blob/main/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs + +By default, running the pipeline will scan all repos within the VMR which takes several hours to run. +The pipeline can be triggered manually to target a specific repo within the VMR by setting the `specificRepoName` parameter. +This value should be the name of the repo within the VMR (i.e. a name of a directory within https://github.com/dotnet/dotnet/tree/main/src). +To test source modifications intended to resolve a license issue, apply the change in an internal branch of the VMR. +Run this pipeline, targeting your branch, and set the `specificRepoName` parameter to the name of the repo containing the change. + +The output of the pipeline is a set of test results and logs. +The logs are published as an artifact and can be found at test/Microsoft.DotNet/SourceBuild.SmokeTests/bin/Release/netX.0/logs. +It consists of the following: + * `UpdatedLicenses..json`: This is the output of that gets compared to the stored baseline. + If they're the same, the test passes; if not, it fails. By comparing this file to the baseline, one can determine which new license + references have been introduced. + If everything is deemed to be acceptable, the developer can either update the allowed licenses, update the exclusions file, update the + baseline, or any combination. + * `scancode-results.json`: This is the raw output that comes from scancode. This file is useful for diagnostic purposes because it tells you + the exact line number of where a license has been detected in a file. diff --git a/src/SourceBuild/tarball/content/eng/Build.props b/src/SourceBuild/content/eng/Build.props similarity index 100% rename from src/SourceBuild/tarball/content/eng/Build.props rename to src/SourceBuild/content/eng/Build.props diff --git a/src/SourceBuild/tarball/content/eng/No.proj b/src/SourceBuild/content/eng/No.proj similarity index 100% rename from src/SourceBuild/tarball/content/eng/No.proj rename to src/SourceBuild/content/eng/No.proj diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props new file mode 100644 index 000000000..6423c125b --- /dev/null +++ b/src/SourceBuild/content/eng/Versions.props @@ -0,0 +1,36 @@ + + + + + 0.1.0 + alpha.1 + + + + 2.2.0 + + + + + https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.106-servicing.24278.1.centos.9-x64.tar.gz + https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-8.0.106-centos.9-x64.tar.gz + + diff --git a/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props b/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props new file mode 100644 index 000000000..4da9c2172 --- /dev/null +++ b/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props @@ -0,0 +1,9 @@ + + + + 7.0.4-servicing.23107.6 + + $(NonshippingRuntimeVersionFor700) + + diff --git a/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj new file mode 100644 index 000000000..56d828d22 --- /dev/null +++ b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj @@ -0,0 +1,197 @@ + + + + + + + + net7.0 + $(MSBuildProjectDirectory)/artifacts/ + $(MSBuildProjectDirectory)/artifacts/restoredPkgs/ + $(MSBuildProjectDirectory)/artifacts/unpacked/ + $(ArchiveDir)Private.SourceBuilt.Artifacts.Bootstrap.tar.gz + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(UnixRid.Identity) + + + + + %(UnixRid.Identity) + + + + + + + %(RuntimePackWithUnixRid.Identity).%(RuntimePackWithUnixRid.UnixRid) + + + + + %(PortablePackageWithUnixRid.Identity) + + + + + runtime.%(PortablePackageWithUnixRid.UnixRid).%(PortablePackageWithUnixRid.Identity) + + + runtime.%(PortablePackageWithUnixRid.UnixRid).runtime.native.%(PortablePackageWithUnixRid.Identity) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @(SourceFileName->'%(Filename)') + $(DestinationFileName.Replace('$(PackageName.ToLower()).','')) + + + + + + $([System.String]::concat('%3C','$(PackageName)','Version','%3E').Replace('.','')) + $([System.String]::concat('%3C','$(PackageName)','PackageVersion','%3E').Replace('.','')) + $(DestinationPath)PackageVersions.props + + + + diff --git a/src/SourceBuild/tarball/content/eng/install-nuget-credprovider.sh b/src/SourceBuild/content/eng/install-nuget-credprovider.sh old mode 100644 new mode 100755 similarity index 100% rename from src/SourceBuild/tarball/content/eng/install-nuget-credprovider.sh rename to src/SourceBuild/content/eng/install-nuget-credprovider.sh diff --git a/src/SourceBuild/content/eng/pipelines/ci.yml b/src/SourceBuild/content/eng/pipelines/ci.yml new file mode 100644 index 000000000..0bf7fda81 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/ci.yml @@ -0,0 +1,45 @@ +# This is the main build definition (PR+CI) for dotnet/dotnet + +trigger: + batch: true + branches: + include: + - main + - release/* + - internal/release/* + +pr: + branches: + include: + - main + - release/* + - internal/release/* + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + sdl: + sourceAnalysisPool: + name: NetCore1ESPool-Internal + image: 1es-windows-2022 + os: windows + + baseline: + baselineFile: $(Build.SourcesDirectory)\.config\guardian\.gdnbaselines + + customBuildTags: + - ES365AIMigrationTooling + + stages: + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/pipelines/templates/stages/vmr-scan.yml@self + - template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml@self + parameters: + isBuiltFromVmr: true diff --git a/src/SourceBuild/content/eng/pipelines/pr.yml b/src/SourceBuild/content/eng/pipelines/pr.yml new file mode 100644 index 000000000..dcebbcf54 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/pr.yml @@ -0,0 +1,18 @@ +# This is the non-1ES PR pipeline for dotnet/dotnet +# https://dev.azure.com/dnceng-public/public/_build?definitionId=240 + +trigger: none +pr: + branches: + include: + - main + - release/* + - internal/release/* + +stages: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: templates/stages/vmr-scan.yml + +- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml + parameters: + isBuiltFromVmr: true diff --git a/src/SourceBuild/content/eng/pipelines/source-build-sdk-diff-tests.yml b/src/SourceBuild/content/eng/pipelines/source-build-sdk-diff-tests.yml new file mode 100644 index 000000000..6642c705b --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/source-build-sdk-diff-tests.yml @@ -0,0 +1,74 @@ +schedules: +- cron: "0 11 * * 1-5" + displayName: Run on weekdays at 11am UTC + branches: + include: + - main + +# Relies on dotnet-source-build being in the same repo as this pipeline +# https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops#branch-considerations +resources: + pipelines: + - pipeline: dotnet-source-build + source: dotnet-source-build + trigger: + branches: + include: + - release/*.0.1xx* + - internal/release/*.0.1xx* + +pr: none +trigger: none + +pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-ubuntu-2004 + +parameters: +- name: dotnetDotnetRunId + displayName: 'Specific dotnet-dotnet run ID number (e.g `2108850`)' + type: string + default: ' ' + +variables: +- template: /src/installer/eng/pipelines/templates/variables/vmr-build.yml@self + +# GH access token for SB bot - BotAccount-dotnet-sb-bot-pat +- group: DotNet-Source-Build-Bot-Secrets-MVP + +jobs: +- template: templates/jobs/sdk-diff-tests.yml + parameters: + buildName: ${{ format('{0}_Offline_MsftSdk', variables.centOSStreamName) }} + targetRid: ${{ variables.centOSStreamX64Rid }} + architecture: x64 + dotnetDotnetRunId: ${{ parameters.dotnetDotnetRunId }} + publishTestResultsPr: true + +- template: templates/jobs/sdk-diff-tests.yml + parameters: + buildName: ${{ format('{0}_Offline_MsftSdk', variables.alpineName) }} + targetRid: ${{ variables.alpineX64Rid }} + architecture: x64 + dotnetDotnetRunId: ${{ parameters.dotnetDotnetRunId }} + +- template: templates/jobs/sdk-diff-tests.yml + parameters: + buildName: ${{ format('{0}_Offline_MsftSdk', variables.fedoraName) }} + targetRid: ${{ variables.fedoraX64Rid }} + architecture: x64 + dotnetDotnetRunId: ${{ parameters.dotnetDotnetRunId }} + +- template: templates/jobs/sdk-diff-tests.yml + parameters: + buildName: ${{ format('{0}_Offline_MsftSdk', variables.ubuntuName) }} + targetRid: ${{ variables.ubuntuX64Rid }} + architecture: x64 + dotnetDotnetRunId: ${{ parameters.dotnetDotnetRunId }} + +- template: templates/jobs/sdk-diff-tests.yml + parameters: + buildName: ${{ format('{0}Arm64_Offline_MsftSdk', variables.ubuntuName) }} + targetRid: ${{ variables.ubuntuArm64Rid }} + architecture: arm64 + dotnetDotnetRunId: ${{ parameters.dotnetDotnetRunId }} diff --git a/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml b/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml new file mode 100644 index 000000000..e3ae69198 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml @@ -0,0 +1,176 @@ +parameters: +- name: buildName + type: string + +- name: targetRid + type: string + +- name: architecture + type: string + +- name: dotnetDotnetRunId + type: string + +- name: publishTestResultsPr + type: boolean + default: false + +jobs: +- job: ${{ parameters.buildName }}_${{ parameters.architecture }} + timeoutInMinutes: 150 + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-ubuntu-2004 + variables: + - template: ../variables/pipelines.yml + steps: + - script: | + dotnet_dotnet_build='${{ replace(parameters.dotnetDotnetRunId, ' ', '') }}' + + if [[ -z "$dotnet_dotnet_build" ]]; then + dotnet_dotnet_build=$(az pipelines runs list --branch '$(Build.SourceBranch)' --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(DOTNET_DOTNET_CI_PIPELINE_ID)' --status completed --top 1 --query "[].id" --output tsv) + fi + + if [[ -z "$dotnet_dotnet_build" ]]; then + echo "Could not find a completed dotnet-dotnet build for branch '$(Build.SourceBranch)'" + exit 1 + fi + + echo "Dotnet-dotnet build: https://dev.azure.com/dnceng/internal/_build/results?buildId=$dotnet_dotnet_build&view=results" + + installer_sha=$(az pipelines build tag list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --build-id $dotnet_dotnet_build --query "[?contains(@, 'installer')]" --output tsv | sed "s,installer ,,g") + installer_build=$(az pipelines runs list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(INSTALLER_OFFICIAL_CI_PIPELINE_ID)' --query "[?sourceVersion == '$installer_sha'].id" --output tsv) + if [[ -z "$installer_build" ]]; then + echo "Could not find a build of installer for commit '$installer_sha'" + exit 1 + fi + + echo "Installer build: https://dev.azure.com/dnceng/internal/_build/results?buildId=$installer_build&view=results" + + echo "##vso[build.addbuildtag]installer $installer_sha" + echo "##vso[task.setvariable variable=InstallerBuildId]$installer_build" + echo "##vso[task.setvariable variable=DotnetDotnetBuildId]$dotnet_dotnet_build" + displayName: Find associated builds + name: Get_Build_Ids + env: + AZURE_DEVOPS_EXT_PAT: $(System.AccessToken) + + - task: DownloadPipelineArtifact@2 + displayName: Download MSFT SDK + inputs: + buildType: specific + buildVersionToDownload: specific + project: internal + pipeline: $(INSTALLER_OFFICIAL_CI_PIPELINE_ID) + buildId: $(InstallerBuildId) + artifact: BlobArtifacts + patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-linux*-${{ parameters.architecture }}.tar.gz' + allowPartiallySucceededBuilds: true + allowFailedBuilds: true + downloadPath: $(Pipeline.Workspace)/Artifacts + checkDownloadedFiles: true + + - task: DownloadPipelineArtifact@2 + displayName: Download Source Build SDK + inputs: + buildType: specific + buildVersionToDownload: specific + project: internal + pipeline: $(DOTNET_DOTNET_CI_PIPELINE_ID) + buildId: $(DotnetDotnetBuildId) + artifact: ${{ parameters.buildName }}_${{ parameters.architecture }}_Artifacts + patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-${{ parameters.targetRid }}.tar.gz' + allowPartiallySucceededBuilds: true + allowFailedBuilds: true + downloadPath: $(Pipeline.Workspace)/Artifacts + checkDownloadedFiles: true + + - script: | + platform="linux" + if [[ ${{ parameters.targetRid }} =~ "alpine" ]]; then + platform="$platform-musl" + fi + msft_sdk_tarball_name=$(find "$(Pipeline.Workspace)/Artifacts" -name "dotnet-sdk-*-$platform-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) + + if [[ -z "$msft_sdk_tarball_name" ]]; then + echo "Microsoft SDK tarball does not exist in '$(Pipeline.Workspace)/Artifacts'. The associated build https://dev.azure.com/dnceng/internal/_build/results?buildId=$(InstallerBuildId) might have failed." + exit 1 + fi + + sdk_tarball_name=$(find "$(Pipeline.Workspace)/Artifacts" -name "dotnet-sdk-*-${{ parameters.targetRid }}.tar.gz" -exec basename {} \;) + + if [[ -z "$sdk_tarball_name" ]]; then + echo "Source-build SDK tarball does not exist in '$(Pipeline.Workspace)/Artifacts'. The associated build https://dev.azure.com/dnceng/internal/_build/results?buildId=$(DotnetDotnetBuildId) might have failed" + exit 1 + fi + + eng/common/build.sh -bl --projects $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj --restore + + echo "##vso[task.setvariable variable=Platform]$platform" + echo "##vso[task.setvariable variable=MsftSdkTarballPath]$(Pipeline.Workspace)/Artifacts/$msft_sdk_tarball_name" + echo "##vso[task.setvariable variable=SdkTarballPath]$(Pipeline.Workspace)/Artifacts/$sdk_tarball_name" + displayName: Prepare Tests + workingDirectory: $(Build.SourcesDirectory) + + - script: > + .dotnet/dotnet test + $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj + --filter "Category=SdkContent" + --logger:'trx;LogFileName=$(Agent.JobName)_SDKDiffTests.trx' + --logger:'console;verbosity=detailed' + -c Release + -bl:$(Build.SourcesDirectory)/artifacts/log/Debug/BuildTests_$(date +"%m%d%H%M%S").binlog + -flp:LogFile=$(Build.SourcesDirectory)/artifacts/logs/BuildTests_$(date +"%m%d%H%M%S").log + -clp:v=m + -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=$(MsftSdkTarballPath) + -e SMOKE_TESTS_SDK_TARBALL_PATH=$(SdkTarballPath) + -e SMOKE_TESTS_SOURCEBUILT_ARTIFACTS_PATH= + -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=false + -e SMOKE_TESTS_RUNNING_IN_CI=true + -e SMOKE_TESTS_TARGET_RID=${{ parameters.targetRid }} + -e SMOKE_TESTS_PORTABLE_RID=$(Platform)-${{ parameters.architecture }} + -e SMOKE_TESTS_CUSTOM_PACKAGES_PATH= + displayName: Run Tests + workingDirectory: $(Build.SourcesDirectory) + + - script: | + set -x + targetFolder=$(Build.StagingDirectory)/BuildLogs/ + mkdir -p ${targetFolder} + cd "$(Build.SourcesDirectory)" + find artifacts/ -type f -name "BuildTests*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/ -type f -name "BuildTests*.log" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/ -type f -name "Build.binlog" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; + displayName: Prepare BuildLogs staging directory + continueOnError: true + condition: succeededOrFailed() + + - publish: '$(Build.StagingDirectory)/BuildLogs' + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + displayName: Publish BuildLogs + continueOnError: true + condition: succeededOrFailed() + + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + continueOnError: true + inputs: + testRunner: vSTest + testResultsFiles: '*.trx' + searchFolder: $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults + mergeTestResults: true + publishRunAttachments: true + testRunTitle: $(Agent.JobName) + + - ${{ if and(eq(parameters.publishTestResultsPr, 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))) }}: + - template: ../steps/create-baseline-update-pr.yml + parameters: + pipeline: sdk + repo: dotnet/installer + originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines + updatedFilesDirectory: $(Build.StagingDirectory)/BuildLogs + pullRequestTitle: Update Source-Build SDK Diff Tests Baselines and Exclusions diff --git a/src/SourceBuild/content/eng/pipelines/templates/stages/vmr-scan.yml b/src/SourceBuild/content/eng/pipelines/templates/stages/vmr-scan.yml new file mode 100644 index 000000000..28541d572 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/templates/stages/vmr-scan.yml @@ -0,0 +1,57 @@ +stages: +- stage: Tag_n_Scan + displayName: Tag & Scan + dependsOn: [] + variables: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/variables/pool-providers.yml + - ${{ else }}: + - template: /eng/common/templates-official/variables/pool-providers.yml + jobs: + - job: Tag_n_Scan + displayName: Tag & Scan + pool: + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: $(DncEngPublicBuildPool) + image: 1es-ubuntu-2004-open + os: linux + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + image: 1es-ubuntu-2004 + os: linux + + steps: + - checkout: self + + - script: | + source ./eng/common/tools.sh + InitializeDotNetCli true + ./.dotnet/dotnet tool restore + displayName: Initialize tooling + workingDirectory: $(Build.SourcesDirectory)/src/installer + + - script: | + set -e + sha=`./.dotnet/dotnet darc vmr get-version --vmr "$(Build.SourcesDirectory)" installer` + echo "##vso[build.addbuildtag]$sha" + displayName: Tag the build + workingDirectory: $(Build.SourcesDirectory)/src/installer + + - script: > + ./.dotnet/dotnet darc vmr scan-binary-files + --vmr "$(Build.SourcesDirectory)" + --tmp "$(Agent.TempDirectory)" + --baseline-file "src/VirtualMonoRepo/allowed-binaries.txt" + || (echo '##[error]Found binaries in the VMR' && exit 1) + displayName: Scan for binaries + workingDirectory: $(Build.SourcesDirectory)/src/installer + continueOnError: true + + - script: > + ./.dotnet/dotnet darc vmr scan-cloaked-files + --vmr "$(Build.SourcesDirectory)" + --tmp "$(Agent.TempDirectory)" + || (echo '##[error]Found cloaked files in the VMR' && exit 1) + displayName: Scan for cloaked files + workingDirectory: $(Build.SourcesDirectory)/src/installer + continueOnError: true diff --git a/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml b/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml new file mode 100644 index 000000000..3c53c051c --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/templates/steps/create-baseline-update-pr.yml @@ -0,0 +1,48 @@ +parameters: +# The pipeline that is being run +# Used to determine the correct baseline update tool to run +# Currently only supports "sdk" and "license" +- name: pipeline + type: string + +# The GitHub repository to create the PR in. +# Should be in the form '/' +- name: repo + type: string + +# Path to the directory containing the original test files +# Should be relative to the "repo" parameter +- name: originalFilesDirectory + type: string + +# Path to the directory containing the updated test files +# Should be absolute or relative to the working directory of the tool +- name: updatedFilesDirectory + type: string + +- name: pullRequestTitle + type: string + default: Update Test Baselines + +steps: + - script: | + restoreSources="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" + restoreSources+="%3Bhttps://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" + + branchName=$(echo "$(Build.SourceBranch)" | sed 's/refs\/heads\///g') + + .dotnet/dotnet run \ + --project eng/tools/CreateBaselineUpdatePR/ \ + --property:RestoreSources="$restoreSources" \ + "${{ parameters.pipeline }}" \ + "${{ parameters.repo }}" \ + "${{ parameters.originalFilesDirectory }}" \ + "${{ parameters.updatedFilesDirectory }}" \ + "$(Build.BuildId)" \ + --title "${{ parameters.pullRequestTitle }}" \ + --branch "$branchName" + displayName: Publish Test Results PR + workingDirectory: $(Build.SourcesDirectory) + condition: succeededOrFailed() + env: + GH_TOKEN: $(BotAccount-dotnet-sb-bot-pat) diff --git a/src/SourceBuild/content/eng/pipelines/templates/variables/pipelines.yml b/src/SourceBuild/content/eng/pipelines/templates/variables/pipelines.yml new file mode 100644 index 000000000..2db47a1be --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/templates/variables/pipelines.yml @@ -0,0 +1,11 @@ +variables: +- name: AZDO_PROJECT + value: internal +- name: AZDO_ORG + value: https://dev.azure.com/dnceng/ +- name: INSTALLER_OFFICIAL_CI_PIPELINE_ID + value: 286 +- name: INSTALLER_TARBALL_BUILD_CI_PIPELINE_ID + value: 1011 +- name: DOTNET_DOTNET_CI_PIPELINE_ID + value: 1219 \ No newline at end of file diff --git a/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml b/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml new file mode 100644 index 000000000..d00e6450e --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml @@ -0,0 +1,183 @@ +# Pipeline documentation at https://github.com/dotnet/dotnet/blob/main/docs/license-scanning.md + +schedules: +- cron: "0 7 * * 1" + displayName: Run on Mondays at 7am UTC + branches: + include: + - main + - release/*.0.1xx* + - internal/release/*.0.1xx* + +pr: none +trigger: none + +parameters: +# Provides a way to scan a specific repo. If not provided, all repos of the VMR will be scanned. +- name: specificRepoName + type: string + displayName: "Specific repo name to scan (e.g. runtime, sdk). If empty, scans all repos of the VMR." + default: " " # Set it to an empty string to allow it be an optional parameter + +variables: +# GH access token for SB bot - BotAccount-dotnet-sb-bot-pat +- group: DotNet-Source-Build-Bot-Secrets-MVP +- name: installerRoot + value: '$(Build.SourcesDirectory)/src/installer' + +jobs: +- job: Setup + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-ubuntu-2004 + steps: + - script: | + vmrSrcDir="$(Build.SourcesDirectory)/src" + + # Builds an Azure DevOps matrix definition. Each entry in the matrix is a path, + # allowing a job to be run for each src repo. + matrix="" + + # Trim leading/trailing spaces from the repo name + specificRepoName=$(echo "${{ parameters.specificRepoName }}" | awk '{$1=$1};1') + + # If the repo name is provided, only scan that repo. + if [ ! -z "$specificRepoName" ]; then + matrix="\"$specificRepoName\": { \"repoPath\": \"$vmrSrcDir/$specificRepoName\" }" + else + for dir in $vmrSrcDir/*/ + do + if [ ! -z "$matrix" ]; then + matrix="$matrix," + fi + repoName=$(basename $dir) + matrix="$matrix \"$repoName\": { \"repoPath\": \"$dir\" }" + done + fi + + matrix="{ $matrix }" + + echo "##vso[task.setvariable variable=matrix;isOutput=true]$matrix" + name: GetMatrix + displayName: Get Matrix + +- job: LicenseScan + dependsOn: Setup + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-ubuntu-2004 + timeoutInMinutes: 420 + strategy: + matrix: $[ dependencies.Setup.outputs['GetMatrix.matrix'] ] + steps: + + - script: $(Build.SourcesDirectory)/prep.sh --no-artifacts --no-bootstrap --no-prebuilts + displayName: 'Install .NET SDK' + + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: public/dotnet-public-pypi + onlyAddExtraIndex: false + + - script: $(installerRoot)/eng/install-scancode.sh + displayName: Install Scancode + + - script: > + $(Build.SourcesDirectory)/.dotnet/dotnet test + $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj + --filter "FullyQualifiedName=Microsoft.DotNet.SourceBuild.SmokeTests.LicenseScanTests.ScanForLicenses" + --logger:'trx;LogFileName=$(Agent.JobName)_LicenseScan.trx' + --logger:'console;verbosity=detailed' + -c Release + -bl:$(Build.SourcesDirectory)/artifacts/log/Debug/BuildTests_$(date +"%m%d%H%M%S").binlog + -flp:LogFile=$(Build.SourcesDirectory)/artifacts/logs/BuildTests_$(date +"%m%d%H%M%S").log + -clp:v=m + -e SMOKE_TESTS_LICENSE_SCAN_PATH=$(repoPath) + -e SMOKE_TESTS_RUNNING_IN_CI=true + -e SMOKE_TESTS_WARN_LICENSE_SCAN_DIFFS=false + -e SMOKE_TESTS_TARGET_RID=linux-x64 + -e SMOKE_TESTS_PORTABLE_RID=linux-x64 + displayName: Run Tests + workingDirectory: $(Build.SourcesDirectory) + + - script: | + set -x + targetFolder=$(Build.StagingDirectory)/BuildLogs/ + mkdir -p ${targetFolder} + cd "$(Build.SourcesDirectory)" + find artifacts/ -type f -name "BuildTests*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/ -type f -name "BuildTests*.log" -exec cp {} --parents -t ${targetFolder} \; + echo "Updated:" + find test/ -type f -name "Updated*.json" + find test/ -type f -name "Updated*.json" -exec cp {} --parents -t ${targetFolder} \; + echo "Results:" + find test/ -type f -name "scancode-results*.json" + find test/ -type f -name "scancode-results*.json" -exec cp {} --parents -t ${targetFolder} \; + echo "All:" + ls -R test/ + echo "BuildLogs:" + ls -R ${targetFolder} + displayName: Prepare BuildLogs staging directory + continueOnError: true + condition: succeededOrFailed() + + - publish: '$(Build.StagingDirectory)/BuildLogs' + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + displayName: Publish BuildLogs + continueOnError: true + condition: succeededOrFailed() + + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + continueOnError: true + inputs: + testRunner: vSTest + testResultsFiles: '*.trx' + searchFolder: $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults + mergeTestResults: true + publishRunAttachments: true + testRunTitle: $(Agent.JobName) + +- job: CreateBaselineUpdatePR + dependsOn: LicenseScan + condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release')) + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-ubuntu-2004 + variables: + - template: templates/variables/pipelines.yml + steps: + + - script: | + source ./eng/common/tools.sh + InitializeDotNetCli true + displayName: Install .NET SDK + workingDirectory: $(Build.SourcesDirectory) + + - task: DownloadPipelineArtifact@2 + inputs: + buildType: specific + buildVersionToDownload: specific + project: internal + buildId: $(Build.BuildId) + artifact: '' + patterns: '**/Updated*' + allowPartiallySucceededBuilds: true + allowFailedBuilds: true + downloadPath: $(Pipeline.Workspace)/Artifacts + checkDownloadedFiles: true + displayName: Download Updated Baselines + + - script: | + find $(Pipeline.Workspace)/Artifacts -type f -exec mv {} $(Pipeline.Workspace)/Artifacts \; + displayName: Move Artifacts to root + + - template: templates/steps/create-baseline-update-pr.yml + parameters: + pipeline: license + repo: dotnet/installer + originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses + updatedFilesDirectory: $(Pipeline.Workspace)/Artifacts + pullRequestTitle: Update Source-Build License Scan Baselines and Exclusions diff --git a/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/CreateBaselineUpdatePR.csproj b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/CreateBaselineUpdatePR.csproj new file mode 100644 index 000000000..f1d4d70fa --- /dev/null +++ b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/CreateBaselineUpdatePR.csproj @@ -0,0 +1,17 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + + + + diff --git a/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Log.cs b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Log.cs new file mode 100644 index 000000000..bfca7e600 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Log.cs @@ -0,0 +1,68 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Extensions.Logging; + +namespace CreateBaselineUpdatePR; + +public static class Log +{ + public static LogLevel Level = LogLevel.Information; + + private static bool WarningLogged = false; + + private static bool ErrorLogged = false; + + private static readonly Lazy _logger = new Lazy(ConfigureLogger); + + public static void LogDebug(string message) + { + _logger.Value.LogDebug(message); + } + + public static void LogInformation(string message) + { + _logger.Value.LogInformation(message); + } + + public static void LogWarning(string message) + { + _logger.Value.LogWarning(message); + WarningLogged = true; + } + + public static void LogError(string message) + { + _logger.Value.LogError(message); + ErrorLogged = true; + } + + private static ILogger ConfigureLogger() + { + using ILoggerFactory loggerFactory = + LoggerFactory.Create(builder => + builder.AddSimpleConsole(options => + { + options.SingleLine = true; + options.TimestampFormat = "HH:mm:ss "; + options.UseUtcTimestamp = true; + }) + .SetMinimumLevel(Level)); + return loggerFactory.CreateLogger(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!); + } + + public static int GetExitCode() + { + if (ErrorLogged) + { + return 1; + } + + if (WarningLogged) + { + return 2; + } + + return 0; + } +} diff --git a/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/PRCreator.cs b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/PRCreator.cs new file mode 100644 index 000000000..8e67ca94b --- /dev/null +++ b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/PRCreator.cs @@ -0,0 +1,310 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace CreateBaselineUpdatePR; + +using Octokit; +using System.Text; +using System.Threading.Tasks; +using System.Collections.Generic; + +public class PRCreator +{ + private readonly string _repoOwner; + private readonly string _repoName; + private readonly GitHubClient _client; + private const string BuildLink = "https://dev.azure.com/dnceng/internal/_build/results?buildId="; + private const string TreeMode = "040000"; + public PRCreator(string repo, string gitHubToken) + { + // Create a new GitHub client + _client = new GitHubClient(new ProductHeaderValue(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name)); + var authToken = new Credentials(gitHubToken); + _client.Credentials = authToken; + _repoOwner = repo.Split('/')[0]; + _repoName = repo.Split('/')[1]; + } + + public async Task ExecuteAsync( + string originalFilesDirectory, + string updatedFilesDirectory, + int buildId, + string title, + string targetBranch, + Pipelines pipeline) + { + DateTime startTime = DateTime.Now.ToUniversalTime(); + + Log.LogInformation($"Starting PR creation at {startTime} UTC for pipeline {pipeline}."); + + var updatedTestsFiles = GetUpdatedFiles(updatedFilesDirectory); + + // Create a new tree for the originalFilesDirectory based on the target branch + var originalTreeResponse = await _client.Git.Tree.GetRecursive(_repoOwner, _repoName, targetBranch); + var testResultsTreeItems = originalTreeResponse.Tree + .Where(file => file.Path.Contains(originalFilesDirectory) && file.Path != originalFilesDirectory) + .Select(file => new NewTreeItem + { + Path = Path.GetRelativePath(originalFilesDirectory, file.Path), + Mode = file.Mode, + Type = file.Type.Value, + Sha = file.Sha + }) + .ToList(); + + // Update the test results tree + testResultsTreeItems = await UpdateAllFilesAsync(updatedTestsFiles, testResultsTreeItems); + var testResultsTreeResponse = await CreateTreeFromItemsAsync(testResultsTreeItems); + var parentTreeResponse = await CreateParentTreeAsync(testResultsTreeResponse, originalTreeResponse, originalFilesDirectory); + + await CreateOrUpdatePullRequestAsync(parentTreeResponse, buildId, title, targetBranch); + + return Log.GetExitCode(); + } + + // Return a dictionary using the filename without the + // "Updated" prefix and anything after the first '.' as the key + private Dictionary> GetUpdatedFiles(string updatedFilesDirectory) => + Directory + .GetFiles(updatedFilesDirectory, "Updated*", SearchOption.AllDirectories) + .GroupBy(updatedTestsFile => ParseUpdatedFileName(updatedTestsFile).Split('.')[0]) + .ToDictionary( + group => group.Key, + group => new HashSet(group) + ); + + private async Task> UpdateAllFilesAsync(Dictionary> updatedFiles, List tree) + { + foreach (var updatedFile in updatedFiles) + { + foreach (var filePath in updatedFile.Value) + { + var content = File.ReadAllText(filePath); + string originalFileName = Path.GetFileName(ParseUpdatedFileName(filePath)); + tree = await UpdateFileAsync(tree, content, originalFileName, originalFileName); + } + } + return tree; + } + + private async Task> UpdateFileAsync(List tree, string content, string searchFileName, string updatedPath) + { + var originalTreeItem = tree + .Where(item => item.Path.Contains(searchFileName)) + .FirstOrDefault(); + + if (originalTreeItem == null) + { + // Path not in the tree, add a new tree item + var blob = await CreateBlobAsync(content); + tree.Add(new NewTreeItem + { + Type = TreeType.Blob, + Mode = FileMode.File, + Path = updatedPath, + Sha = blob.Sha + }); + } + else + { + // Path in the tree, update the sha and the content + var blob = await CreateBlobAsync(content); + originalTreeItem.Sha = blob.Sha; + } + return tree; + } + + private async Task CreateBlobAsync(string content) + { + var blob = new NewBlob + { + Content = content, + Encoding = EncodingType.Utf8 + }; + return await _client.Git.Blob.Create(_repoOwner, _repoName, blob); + } + + private string ParseUpdatedFileName(string updatedFile) => updatedFile.Split("Updated")[1]; + + private async Task CreateTreeFromItemsAsync(List items, string path = "") + { + var newTreeItems = new List(); + + var groups = items.GroupBy(item => Path.GetDirectoryName(item.Path)); + foreach (var group in groups) + { + if (string.IsNullOrEmpty(group.Key) || group.Key == path) + { + // These items are in the current directory, so add them to the new tree items + foreach (var item in group) + { + if(item.Type != TreeType.Tree) + { + newTreeItems.Add(new NewTreeItem + { + Path = path == string.Empty ? item.Path : Path.GetRelativePath(path, item.Path), + Mode = item.Mode, + Type = item.Type, + Sha = item.Sha + }); + } + } + } + else + { + // These items are in a subdirectory, so recursively create a tree for them + var subtreeResponse = await CreateTreeFromItemsAsync(group.ToList(), group.Key); + newTreeItems.Add(new NewTreeItem + { + Path = group.Key, + Mode = TreeMode, + Type = TreeType.Tree, + Sha = subtreeResponse.Sha + }); + } + } + + var newTree = new NewTree(); + foreach (var item in newTreeItems) + { + newTree.Tree.Add(item); + } + return await _client.Git.Tree.Create(_repoOwner, _repoName, newTree); + } + + private async Task CreateParentTreeAsync(TreeResponse testResultsTreeResponse, TreeResponse originalTreeResponse, string originalFilesDirectory) + { + // Create a new tree for the parent directory + NewTree parentTree = new NewTree { BaseTree = originalTreeResponse.Sha }; + + // Connect the updated test results tree + parentTree.Tree.Add(new NewTreeItem + { + Path = originalFilesDirectory, + Mode = TreeMode, + Type = TreeType.Tree, + Sha = testResultsTreeResponse.Sha + }); + + return await _client.Git.Tree.Create(_repoOwner, _repoName, parentTree); + } + + private async Task CreateOrUpdatePullRequestAsync(TreeResponse parentTreeResponse, int buildId, string title, string targetBranch) + { + var existingPullRequest = await GetExistingPullRequestAsync(title, targetBranch); + + // Create the branch name and get the head reference + string newBranchName = string.Empty; + string headSha = await GetHeadShaAsync(targetBranch); + if (existingPullRequest == null) + { + string utcTime = DateTime.UtcNow.ToString("yyyyMMddHHmmss"); + newBranchName = $"pr-baseline-{utcTime}"; + } + else + { + newBranchName = existingPullRequest.Head.Ref; + + try + { + // Merge the target branch into the existing pull request + var merge = new NewMerge(newBranchName, headSha); + await _client.Repository.Merging.Create(_repoOwner, _repoName, merge); + } + catch (Exception e) + { + Log.LogWarning($"Failed to merge the target branch into the existing pull request: {e.Message}"); + Log.LogWarning("Continuing with updating the existing pull request. You may need to resolve conflicts manually in the PR."); + } + + headSha = await GetHeadShaAsync(newBranchName); + } + + var commitSha = await CreateCommitAsync(parentTreeResponse.Sha, headSha, $"Update baselines for build {BuildLink}{buildId} (internal Microsoft link)"); + if (await ShouldMakeUpdatesAsync(headSha, commitSha)) + { + string pullRequestBody = $"This PR was created by the `CreateBaselineUpdatePR` tool for build {buildId}. \n\n" + + $"The updated test results can be found at {BuildLink}{buildId} (internal Microsoft link)"; + if (existingPullRequest != null) + { + await UpdatePullRequestAsync(newBranchName, commitSha, pullRequestBody, existingPullRequest); + } + else + { + await CreatePullRequestAsync(newBranchName, commitSha, targetBranch, title, pullRequestBody); + } + } + } + + private async Task GetExistingPullRequestAsync(string title, string targetBranch) + { + var request = new PullRequestRequest + { + Base = targetBranch + }; + var existingPullRequest = await _client.PullRequest.GetAllForRepository(_repoOwner, _repoName, request); + return existingPullRequest.FirstOrDefault(pr => pr.Title == title); + } + + private async Task CreateCommitAsync(string newSha, string headSha, string commitMessage) + { + var newCommit = new NewCommit(commitMessage, newSha, headSha); + var commit = await _client.Git.Commit.Create(_repoOwner, _repoName, newCommit); + return commit.Sha; + } + + private async Task ShouldMakeUpdatesAsync(string headSha, string commitSha) + { + var comparison = await _client.Repository.Commit.Compare(_repoOwner, _repoName, headSha, commitSha); + if (!comparison.Files.Any()) + { + Log.LogInformation("No changes to commit. Skipping PR creation/updates."); + return false; + } + return true; + } + + private async Task UpdatePullRequestAsync(string branchName, string commitSha, string body, PullRequest pullRequest) + { + await UpdateReferenceAsync(branchName, commitSha); + + var pullRequestUpdate = new PullRequestUpdate + { + Body = body + }; + await _client.PullRequest.Update(_repoOwner, _repoName, pullRequest.Number, pullRequestUpdate); + + Log.LogInformation($"Updated existing pull request #{pullRequest.Number}. URL: {pullRequest.HtmlUrl}"); + } + + private async Task CreatePullRequestAsync(string newBranchName, string commitSha, string targetBranch, string title, string body) + { + await CreateReferenceAsync(newBranchName, commitSha); + + var newPullRequest = new NewPullRequest(title, newBranchName, targetBranch) + { + Body = body + }; + var pullRequest = await _client.PullRequest.Create(_repoOwner, _repoName, newPullRequest); + + Log.LogInformation($"Created pull request #{pullRequest.Number}. URL: {pullRequest.HtmlUrl}"); + } + + private async Task GetHeadShaAsync(string branchName) + { + var reference = await _client.Git.Reference.Get(_repoOwner, _repoName, $"heads/{branchName}"); + return reference.Object.Sha; + } + + private async Task UpdateReferenceAsync(string branchName, string commitSha) + { + var referenceUpdate = new ReferenceUpdate(commitSha); + await _client.Git.Reference.Update(_repoOwner, _repoName, $"heads/{branchName}", referenceUpdate); + } + + private async Task CreateReferenceAsync(string branchName, string commitSha) + { + var newReference = new NewReference($"refs/heads/{branchName}", commitSha); + await _client.Git.Reference.Create(_repoOwner, _repoName, newReference); + } +} diff --git a/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Pipelines.cs b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Pipelines.cs new file mode 100644 index 000000000..9b4a9e925 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Pipelines.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace CreateBaselineUpdatePR; + +public enum Pipelines +{ + Sdk, + License +} diff --git a/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Program.cs b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Program.cs new file mode 100644 index 000000000..274a06004 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Program.cs @@ -0,0 +1,118 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.CommandLine; +using Microsoft.Extensions.Logging; + +namespace CreateBaselineUpdatePR; + +public class Program +{ + public static readonly CliArgument Repo = new("repo") + { + Description = "The GitHub repository to create the PR in. Should be in the form '/'", + Arity = ArgumentArity.ExactlyOne + }; + + public static readonly CliArgument OriginalFilesDirectory = new("original-files-directory") + { + Description = "The directory where the original test files are located. Should be relative to the repo", + Arity = ArgumentArity.ExactlyOne + }; + + public static readonly CliArgument UpdatedFilesDirectory = new("updated-files-directory") + { + Description = "The directory containing the updated test files published by the associated test. Should be absolute or relative to the working directory of the tool.", + Arity = ArgumentArity.ExactlyOne + }; + + public static readonly CliArgument BuildId = new("build-id") + { + Description = "The id of the build that published the updated test files.", + Arity = ArgumentArity.ExactlyOne + }; + + public static readonly CliOption Title = new("--title", "-t") + { + Description = "The title of the PR.", + Arity = ArgumentArity.ZeroOrOne, + DefaultValueFactory = _ => "Update Test Baselines and Exclusions" + }; + + public static readonly CliOption Branch = new("--branch", "-b") + { + Description = "The target branch of the PR.", + Arity = ArgumentArity.ZeroOrOne, + DefaultValueFactory = _ => "main" + }; + + public static readonly CliOption GitHubToken = new("--github-token", "-g") + { + Description = "The GitHub token to use to create the PR.", + Arity = ArgumentArity.ZeroOrOne, + DefaultValueFactory = _ => Environment.GetEnvironmentVariable("GH_TOKEN") ?? throw new ArgumentException("GitHub token not provided.") + }; + + public static readonly CliOption Level = new("--log-level", "-l") + { + Description = "The log level to run the tool in.", + Arity = ArgumentArity.ZeroOrOne, + DefaultValueFactory = _ => LogLevel.Information, + Recursive = true + }; + + public static int ExitCode = 0; + + public static async Task Main(string[] args) + { + var sdkDiffTestsCommand = CreateCommand("sdk", "Creates a PR that updates baselines and exclusion files published by the sdk diff tests."); + var licenseScanTestsCommand = CreateCommand("license", "Creates a PR that updates baselines and exclusion files published by the license scan tests."); + + var rootCommand = new CliRootCommand("Tool for creating PRs that update baselines and exclusion files.") + { + Level, + sdkDiffTestsCommand, + licenseScanTestsCommand + }; + + SetCommandAction(sdkDiffTestsCommand, Pipelines.Sdk); + SetCommandAction(licenseScanTestsCommand, Pipelines.License); + + await rootCommand.Parse(args).InvokeAsync(); + + return ExitCode; + } + + private static CliCommand CreateCommand(string name, string description) + { + return new CliCommand(name, description) + { + Repo, + OriginalFilesDirectory, + UpdatedFilesDirectory, + BuildId, + Title, + Branch, + GitHubToken + }; + } + + private static void SetCommandAction(CliCommand command, Pipelines pipeline) + { + command.SetAction(async (result, CancellationToken) => + { + Log.Level = result.GetValue(Level); + + var creator = new PRCreator(result.GetValue(Repo)!, result.GetValue(GitHubToken)!); + + ExitCode = await creator.ExecuteAsync( + result.GetValue(OriginalFilesDirectory)!, + result.GetValue(UpdatedFilesDirectory)!, + result.GetValue(BuildId)!, + result.GetValue(Title)!, + result.GetValue(Branch)!, + pipeline); + }); + } +} diff --git a/src/SourceBuild/tarball/content/tools-local/Directory.Build.props b/src/SourceBuild/content/eng/tools/Directory.Build.props similarity index 81% rename from src/SourceBuild/tarball/content/tools-local/Directory.Build.props rename to src/SourceBuild/content/eng/tools/Directory.Build.props index bffd69d62..17a556ec5 100644 --- a/src/SourceBuild/tarball/content/tools-local/Directory.Build.props +++ b/src/SourceBuild/content/eng/tools/Directory.Build.props @@ -2,7 +2,7 @@ true diff --git a/src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.props b/src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.props similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.props rename to src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.props diff --git a/src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.targets b/src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.targets similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.targets rename to src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.targets diff --git a/src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj b/src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj similarity index 89% rename from src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj rename to src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj index 888cbd9c6..b49ac62e6 100644 --- a/src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj +++ b/src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj @@ -4,10 +4,8 @@ + Include="$(ProjectDir)repo-projects\*.proj" + Exclude="$(ProjectDir)repo-projects\dotnet.proj" /> - + - - @@ -23,11 +21,9 @@ @@ -40,16 +36,6 @@ - - - - - - @@ -78,37 +64,6 @@ - - - - - - - - - - - - - - - - $(IntermediatePath)PackageVersions.props - - - - - - -]]> - - - - - @@ -154,32 +109,6 @@ - - - - - - - - - - - - - - - - - - + + /// The path of the project directory to the FilesToCheck. + /// + [Required] + public string ProjectDirPath { get; set; } + /// /// The output path for an XML poison report, if desired. /// @@ -57,6 +66,11 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection /// public string OverrideTempPath { get; set; } + /// + /// Array of files containing lists of non-shipping packages + /// + public ITaskItem[] NonShippingPackagesListFiles { get; set; } + private static readonly string[] ZipFileExtensions = { ".zip", @@ -79,7 +93,6 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection "_._", "-.-", ".bowerrc", - ".editorconfig", ".gitignore", ".gitkeep", ".rels", @@ -97,9 +110,11 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection ".csproj", ".css", ".db", + ".editorconfig", ".eot", ".fs", ".fsproj", + ".h", ".html", ".ico", ".js", @@ -107,18 +122,26 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection ".map", ".md", ".nuspec", + ".otf", ".png", ".props", + ".proto", + ".proj", ".psmdcp", + ".pubxml", + ".razor", ".rtf", ".scss", + ".sln", ".svg", ".targets", + ".transform", ".ts", ".ttf", ".txt", ".vb", ".vbproj", + ".win32manifest", ".woff", ".woff2", ".xaml", @@ -127,6 +150,10 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection private const string PoisonMarker = "POISONED"; + private const string SbrpAttributeType = "System.Reflection.AssemblyMetadataAttribute"; + + private record CandidateFileEntry(string ExtractedPath, string DisplayPath); + public override bool Execute() { IEnumerable poisons = GetPoisonedFiles(FilesToCheck.Select(f => f.ItemSpec), HashCatalogFilePath, MarkerFileName); @@ -146,11 +173,6 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection { Log.LogWarning($"{poisons.Count()} marked files leaked to output. See complete report '{PoisonReportOutputFilePath}' for details."); } - else - { - Log.LogError($"No leaked files found in output. Either something is broken or it is the future and we have fixed all leaks - please verify and remove this error if so (and default {nameof(FailOnPoisonFound)} to true)."); - return false; - } return !Log.HasLoggedErrors; } @@ -164,9 +186,12 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection /// List of poisoned packages and files found and reasons for each internal IEnumerable GetPoisonedFiles(IEnumerable initialCandidates, string catalogedPackagesFilePath, string markerFileName) { + IEnumerable nonShippingPackages = GetAllNonShippingPackages(); IEnumerable catalogedPackages = ReadCatalog(catalogedPackagesFilePath); var poisons = new List(); - var candidateQueue = new Queue(initialCandidates); + var candidateQueue = new Queue(initialCandidates.Select(candidate => + new CandidateFileEntry(candidate, Utility.MakeRelativePath(candidate, ProjectDirPath)))); + if (!string.IsNullOrWhiteSpace(OverrideTempPath)) { Directory.CreateDirectory(OverrideTempPath); @@ -176,14 +201,22 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection while (candidateQueue.Any()) { - var checking = candidateQueue.Dequeue(); + var candidate = candidateQueue.Dequeue(); // if this is a zip or NuPkg, extract it, check for the poison marker, and // add its contents to the list to be checked. - if (ZipFileExtensions.Concat(TarFileExtensions).Concat(TarGzFileExtensions).Any(e => checking.ToLowerInvariant().EndsWith(e))) + if (ZipFileExtensions.Concat(TarFileExtensions).Concat(TarGzFileExtensions).Any(e => candidate.ExtractedPath.ToLowerInvariant().EndsWith(e))) { - var tempCheckingDir = Path.Combine(tempDir.FullName, Path.GetFileNameWithoutExtension(checking)); - PoisonedFileEntry result = ExtractAndCheckZipFileOnly(catalogedPackages, checking, markerFileName, tempCheckingDir, candidateQueue); + Log.LogMessage($"Zip or NuPkg file to check: {candidate.ExtractedPath}"); + + // Skip non-shipping packages + if (nonShippingPackages.Contains(Path.GetFileName(candidate.ExtractedPath), StringComparer.OrdinalIgnoreCase)) + { + continue; + } + + var tempCheckingDir = Path.Combine(tempDir.FullName, Path.GetFileNameWithoutExtension(candidate.ExtractedPath)); + PoisonedFileEntry result = ExtractAndCheckZipFileOnly(catalogedPackages, candidate, markerFileName, tempCheckingDir, candidateQueue); if (result != null) { poisons.Add(result); @@ -191,7 +224,7 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection } else { - PoisonedFileEntry result = CheckSingleFile(catalogedPackages, tempDir.FullName, checking); + PoisonedFileEntry result = CheckSingleFile(catalogedPackages, candidate); if (result != null) { poisons.Add(result); @@ -204,18 +237,36 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection return poisons; } - private static PoisonedFileEntry CheckSingleFile(IEnumerable catalogedPackages, string rootPath, string fileToCheck) + private IEnumerable GetAllNonShippingPackages() + { + if (NonShippingPackagesListFiles != null) + { + return NonShippingPackagesListFiles + .SelectMany(item => File.ReadAllLines(item.ItemSpec)) + .Distinct() + .ToList(); + } + else + { + return Enumerable.Empty(); + } + } + + private static PoisonedFileEntry CheckSingleFile(IEnumerable catalogedPackages, CandidateFileEntry candidate) { // skip some common files that get copied verbatim from nupkgs - LICENSE, _._, etc as well as // file types that we never care about - text files, .gitconfig, etc. + var fileToCheck = candidate.ExtractedPath; + if (FileNamesToSkip.Any(f => Path.GetFileName(fileToCheck).ToLowerInvariant() == f.ToLowerInvariant()) || - FileExtensionsToSkip.Any(e => Path.GetExtension(fileToCheck).ToLowerInvariant() == e.ToLowerInvariant())) + FileExtensionsToSkip.Any(e => Path.GetExtension(fileToCheck).ToLowerInvariant() == e.ToLowerInvariant()) || + (new FileInfo(fileToCheck).Length == 0)) { return null; } var poisonEntry = new PoisonedFileEntry(); - poisonEntry.Path = Utility.MakeRelativePath(fileToCheck, rootPath); + poisonEntry.Path = candidate.DisplayPath; // There seems to be some weird issues with using file streams both for hashing and assembly loading. // Copy everything into a memory stream to avoid these problems. @@ -251,22 +302,14 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection try { - memStream.Seek(0, SeekOrigin.Begin); - using (var asm = AssemblyDefinition.ReadAssembly(memStream)) + AssemblyName asm = AssemblyName.GetAssemblyName(fileToCheck); + if (!candidate.DisplayPath.Contains("SourceBuildReferencePackages") && IsAssemblyFromSbrp(fileToCheck)) { - foreach (var a in asm.CustomAttributes) - { - foreach (var ca in a.ConstructorArguments) - { - if (ca.Type.Name == asm.MainModule.TypeSystem.String.Name) - { - if (ca.Value.ToString().Contains(PoisonMarker)) - { - poisonEntry.Type |= PoisonType.AssemblyAttribute; - } - } - } - } + poisonEntry.Type |= PoisonType.SourceBuildReferenceAssembly; + } + else if (IsAssemblyPoisoned(fileToCheck)) + { + poisonEntry.Type |= PoisonType.AssemblyAttribute; } } catch @@ -277,9 +320,72 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection return poisonEntry.Type != PoisonType.None ? poisonEntry : null; } - private static PoisonedFileEntry ExtractAndCheckZipFileOnly(IEnumerable catalogedPackages, string zipToCheck, string markerFileName, string tempDir, Queue futureFilesToCheck) + private static bool IsAssemblyPoisoned(string path) + { + byte[] buffer = File.ReadAllBytes(path); + byte[] marker = Encoding.UTF8.GetBytes(PoisonMarker); + + // Start at end of file and go backwards + // Marker is likely at the end and this saves time when + // we encounter a poisoned file. + for (int j = buffer.Length - marker.Length; j >= 0; j--) + { + int i; + for (i = 0; i < marker.Length && buffer[j + i] == marker[i]; i++) ; + if (i == marker.Length) + { + return true; + } + } + + return false; + } + + private static bool IsAssemblyFromSbrp(string assemblyPath) + { + using var stream = new FileStream(assemblyPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + using var peReader = new PEReader(stream); + + MetadataReader reader = peReader.GetMetadataReader(); + return reader.CustomAttributes.Select(attrHandle => reader.GetCustomAttribute(attrHandle)) + .Any(attr => IsAttributeSbrp(reader, attr)); + } + + private static bool IsAttributeSbrp(MetadataReader reader, CustomAttribute attr) + { + string attributeType = string.Empty; + + if (attr.Constructor.Kind == HandleKind.MemberReference) + { + MemberReference mref = reader.GetMemberReference((MemberReferenceHandle)attr.Constructor); + + if (mref.Parent.Kind == HandleKind.TypeReference) + { + TypeReference tref = reader.GetTypeReference((TypeReferenceHandle)mref.Parent); + attributeType = $"{reader.GetString(tref.Namespace)}.{reader.GetString(tref.Name)}"; + } + } + + if (attributeType == SbrpAttributeType) + { + var decodedValue = attr.DecodeValue(DummyAttributeTypeProvider.Instance); + try + { + return decodedValue.FixedArguments[0].Value.ToString() == "source" && decodedValue.FixedArguments[1].Value.ToString() == "source-build-reference-packages"; + } + catch + { + throw new InvalidOperationException($"{SbrpAttributeType} is not formatted properly with a key, value pair."); + } + } + + return false; + } + + private static PoisonedFileEntry ExtractAndCheckZipFileOnly(IEnumerable catalogedPackages, CandidateFileEntry candidate, string markerFileName, string tempDir, Queue futureFilesToCheck) { var poisonEntry = new PoisonedFileEntry(); + var zipToCheck = candidate.ExtractedPath; poisonEntry.Path = zipToCheck; using (var sha = SHA256.Create()) @@ -332,8 +438,9 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection foreach (var child in Directory.EnumerateFiles(tempDir, "*", SearchOption.AllDirectories)) { - // also add anything in this zip/package for checking - futureFilesToCheck.Enqueue(child); + string displayPath = $"{candidate.DisplayPath}/{child.Replace(tempDir, string.Empty).TrimStart(Path.DirectorySeparatorChar)}"; + + futureFilesToCheck.Enqueue(new CandidateFileEntry(child, displayPath)); } return poisonEntry.Type != PoisonType.None ? poisonEntry : null; diff --git a/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/DummyAttributeTypeProvider.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/DummyAttributeTypeProvider.cs new file mode 100644 index 000000000..6f352c88b --- /dev/null +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/DummyAttributeTypeProvider.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Reflection; +using System.Reflection.Metadata; +using System.Reflection.Metadata.Ecma335; + +namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection +{ + + // An empty ICustomAttributeTypeProvider implementation is necessary to read metadata attribute values. + internal class DummyAttributeTypeProvider : ICustomAttributeTypeProvider + { + public static readonly DummyAttributeTypeProvider Instance = new(); + + public Type GetPrimitiveType(PrimitiveTypeCode typeCode) => default(Type); + + public Type GetSystemType() => default(Type); + + public Type GetSZArrayType(Type elementType) => default(Type); + + public Type GetTypeFromDefinition(MetadataReader reader, TypeDefinitionHandle handle, byte rawTypeKind) => default(Type); + + public Type GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, byte rawTypeKind) => default(Type); + + public Type GetTypeFromSerializedName(string name) => default(Type); + + public PrimitiveTypeCode GetUnderlyingEnumType(Type type) => default(PrimitiveTypeCode); + + public bool IsSystemType(Type type) => default(bool); + } +} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs similarity index 71% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs index 0ef1ed0af..32abcae71 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/MarkAndCatalogPackages.cs @@ -4,8 +4,6 @@ using Microsoft.Build.Framework; using Microsoft.Build.Utilities; -using Mono.Cecil; -using Mono.Collections.Generic; using System; using System.Collections.Generic; using System.IO; @@ -87,24 +85,23 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection var packageTempPath = Path.Combine(tempDir.FullName, Path.GetFileName(p.ItemSpec)); ZipFile.ExtractToDirectory(p.ItemSpec, packageTempPath, true); - foreach (string f in Directory.EnumerateFiles(packageTempPath, "*", SearchOption.AllDirectories)) + foreach (string file in Directory.EnumerateFiles(packageTempPath, "*", SearchOption.AllDirectories)) { // remove signatures so we don't later fail validation - if (Path.GetFileName(f) == ".signature.p7s") + if (Path.GetFileName(file) == ".signature.p7s") { - File.Delete(f); + File.Delete(file); continue; } var catalogFileEntry = new CatalogFileEntry(); packageEntry.Files.Add(catalogFileEntry); - catalogFileEntry.Path = Utility.MakeRelativePath(f, packageTempPath); - AssemblyDefinition asm = null; + catalogFileEntry.Path = Utility.MakeRelativePath(file, packageTempPath); // There seem to be some weird issues with using a file stream both for hashing and // assembly loading, even closing it in between. Use a MemoryStream to avoid issues. var memStream = new MemoryStream(); - using (var stream = File.OpenRead(f)) + using (var stream = File.OpenRead(file)) { stream.CopyTo(memStream); } @@ -113,49 +110,23 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection memStream.Seek(0, SeekOrigin.Begin); catalogFileEntry.OriginalHash = sha.ComputeHash(memStream); - // Now try to read it as an assembly - memStream.Seek(0, SeekOrigin.Begin); + // Add poison marker to assemblies try { - asm = AssemblyDefinition.ReadAssembly(memStream, new ReaderParameters(ReadingMode.Deferred)); + AssemblyName asm = AssemblyName.GetAssemblyName(file); + Poison(file); + + // then get the hash of the now-poisoned file + using (var stream = File.OpenRead(file)) + { + catalogFileEntry.PoisonedHash = sha.ComputeHash(stream); + } } catch { - // this is okay, it's not an assembly we can read + // this is okay, it's not an assembly } - // if we read it, now poison and write it back out - if (asm != null) - { - Poison(asm); - - try - { - // Cecil doesn't try to do some modifications until it writes out the file, - // and then throws after we've already truncated the file if it finds out it can't do them. - // Write to a memory stream first and then copy to the real stream if it suceeds. If it - // fails, we won't truncate the file and we will depend on hashes instead in that case. - using (var testMemStream = new MemoryStream()) - { - asm.Write(testMemStream); - testMemStream.Seek(0, SeekOrigin.Begin); - using (var stream = File.Open(f, FileMode.Create, FileAccess.ReadWrite)) - { - testMemStream.CopyTo(stream); - } - } - - // then get the hash of the now-poisoned file - using (var stream = File.OpenRead(f)) - { - catalogFileEntry.PoisonedHash = sha.ComputeHash(stream); - } - } - catch - { - // see above note in the try - this is okay. - } - } } if (!string.IsNullOrWhiteSpace(MarkerFileName)) @@ -184,6 +155,7 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection } File.Delete(p.ItemSpec); File.Move(poisonedPackagePath, p.ItemSpec); + Directory.Delete(packageTempPath, true); } } @@ -203,16 +175,6 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection return !Log.HasLoggedErrors; } - private void Poison(AssemblyDefinition asm) - { - foreach (var attr in asm.CustomAttributes) - { - if (this.AssemblyPropertiesToReplace.Any(p => p.Name == attr.AttributeType.Name)) - { - attr.ConstructorArguments.Clear(); - attr.ConstructorArguments.Add(new CustomAttributeArgument(asm.MainModule.TypeSystem.String, "POISONED by DotNetSourceBuild - Should not ship")); - } - } - } + private void Poison(string path) => File.AppendAllText(path, PoisonMarker); } } diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj similarity index 59% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj index daf090289..8598377a2 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true $(LeakDetectionTasksBinDir) @@ -13,12 +13,6 @@ 15.7.179 - - Configuration=netstandard_Debug - Configuration=netstandard_Release - {D68133BD-1E63-496E-9EDE-4FBDBF77B486} - Mono.Cecil - diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs similarity index 86% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs index de5c35961..4ac37e1cb 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs @@ -11,5 +11,6 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.LeakDetection Hash = 1, AssemblyAttribute = 2, NupkgFile = 4, + SourceBuildReferenceAssembly = 8, } } diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs diff --git a/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/CreateSdkSymbolsLayout.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/CreateSdkSymbolsLayout.cs new file mode 100644 index 000000000..7e00bbf30 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/CreateSdkSymbolsLayout.cs @@ -0,0 +1,163 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.DotNet.Build.Tasks +{ + // Creates a symbols layout that matches the SDK layout + public class CreateSdkSymbolsLayout : Task + { + /// + /// Path to SDK layout. + /// + [Required] + public string SdkLayoutPath { get; set; } + + /// + /// Path to all source-built symbols, flat or with folder hierarchy. + /// + [Required] + public string AllSymbolsPath { get; set; } + + /// + /// Path to SDK symbols layout - will be created if it doesn't exist. + /// + [Required] + public string SdkSymbolsLayoutPath { get; set; } + + /// + /// If true, fails the build if any PDBs are missing. + /// + public bool FailOnMissingPDBs { get; set; } + + public override bool Execute() + { + IList filesWithoutPDBs = GenerateSymbolsLayout(IndexAllSymbols()); + if (filesWithoutPDBs.Count > 0) + { + LogErrorOrWarning(FailOnMissingPDBs, $"Did not find PDBs for the following SDK files:"); + foreach (string file in filesWithoutPDBs) + { + LogErrorOrWarning(FailOnMissingPDBs, file); + } + } + + return !Log.HasLoggedErrors; + } + + private void LogErrorOrWarning(bool isError, string message) + { + if (isError) + { + Log.LogError(message); + } + else + { + Log.LogWarning(message); + } + } + + private IList GenerateSymbolsLayout(Hashtable allPdbGuids) + { + List filesWithoutPDBs = new List(); + + if (Directory.Exists(SdkSymbolsLayoutPath)) + { + Directory.Delete(SdkSymbolsLayoutPath, true); + } + + foreach (string file in Directory.GetFiles(SdkLayoutPath, "*", SearchOption.AllDirectories)) + { + if (file.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase) && + !file.EndsWith(".resources.dll", StringComparison.InvariantCultureIgnoreCase)) + { + string guid = string.Empty; + using var pdbStream = File.OpenRead(file); + using var peReader = new PEReader(pdbStream); + try + { + // Check if pdb is embedded + if (peReader.ReadDebugDirectory().Any(entry => entry.Type == DebugDirectoryEntryType.EmbeddedPortablePdb)) + { + continue; + } + + var debugDirectory = peReader.ReadDebugDirectory().First(entry => entry.Type == DebugDirectoryEntryType.CodeView); + var codeViewData = peReader.ReadCodeViewDebugDirectoryData(debugDirectory); + guid = $"{codeViewData.Guid.ToString("N").Replace("-", string.Empty)}"; + } + catch (Exception e) when (e is BadImageFormatException || e is InvalidOperationException) + { + // Ignore binaries without debug info + continue; + } + + if (guid != string.Empty) + { + string debugId = GetDebugId(guid, file); + if (!allPdbGuids.ContainsKey(debugId)) + { + filesWithoutPDBs.Add(file.Substring(SdkLayoutPath.Length + 1)); + } + else + { + // Copy matching pdb to symbols path, preserving sdk binary's hierarchy + string sourcePath = (string)allPdbGuids[debugId]!; + string destinationPath = + file.Replace(SdkLayoutPath, SdkSymbolsLayoutPath) + .Replace(Path.GetFileName(file), Path.GetFileName(sourcePath)); + + Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)!); + File.Copy(sourcePath, destinationPath, true); + } + } + } + } + + return filesWithoutPDBs; + } + + public Hashtable IndexAllSymbols() + { + Hashtable allPdbGuids = new Hashtable(); + + foreach (string file in Directory.GetFiles(AllSymbolsPath, "*.pdb", SearchOption.AllDirectories)) + { + using var pdbFileStream = File.OpenRead(file); + var metadataProvider = MetadataReaderProvider.FromPortablePdbStream(pdbFileStream); + var metadataReader = metadataProvider.GetMetadataReader(); + if (metadataReader.DebugMetadataHeader == null) + { + continue; + } + + var id = new BlobContentId(metadataReader.DebugMetadataHeader.Id); + string guid = $"{id.Guid:N}"; + string debugId = GetDebugId(guid, file); + if (!string.IsNullOrEmpty(guid) && !allPdbGuids.ContainsKey(debugId)) + { + allPdbGuids.Add(debugId, file); + } + } + + return allPdbGuids; + } + + /// + /// Calculates a debug Id from debug guid and filename. We use this as a key + /// in PDB hashtable. Guid is not enough due to collisions in several PDBs. + /// + private string GetDebugId(string guid, string file) => + $"{guid}.{Path.GetFileNameWithoutExtension(file)}".ToLower(); + } +} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj old mode 100755 new mode 100644 similarity index 93% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj index d4c56c0a0..d458ea6f3 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj @@ -1,7 +1,7 @@  - netcoreapp6.0 + net8.0 $(XPlatTasksBinDir) diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs similarity index 87% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs index 9172566b3..b0d9b940e 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs @@ -47,11 +47,12 @@ namespace Microsoft.DotNet.Build.Tasks } // Union all package sources to get the distinct list. These will get added to the source-build sources. - IEnumerable packagePatterns = pkgSrcMappingElement.Descendants() + string[] packagePatterns = pkgSrcMappingElement.Descendants() .Where(e => e.Name == "packageSource") .SelectMany(e => e.Descendants().Where(e => e.Name == "package")) .Select(e => e.Attribute("pattern").Value) - .Distinct(); + .Distinct() + .ToArray(); if (!BuildWithOnlineSources) { @@ -60,6 +61,11 @@ namespace Microsoft.DotNet.Build.Tasks } XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "clear"); + if (pkgSrcMappingClearElement == null) + { + pkgSrcMappingClearElement = new XElement("clear"); + pkgSrcMappingElement.AddFirst(pkgSrcMappingClearElement); + } foreach (string packageSource in SourceBuildSources) { @@ -69,15 +75,7 @@ namespace Microsoft.DotNet.Build.Tasks pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern))); } - if (pkgSrcMappingClearElement != null) - { - pkgSrcMappingClearElement.AddAfterSelf(pkgSrc); - } - else - { - pkgSrcMappingElement.AddFirst(pkgSrc); - pkgSrcMappingElement.AddFirst(new XElement("clear")); - } + pkgSrcMappingClearElement.AddAfterSelf(pkgSrc); } using (var writer = XmlWriter.Create(NuGetConfigFile, new XmlWriterSettings { NewLineChars = newLineChars, Indent = true })) diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs similarity index 70% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs index ab40fa590..2a6d00863 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs @@ -15,6 +15,7 @@ using System.IO; using System.IO.Compression; using System.Linq; using System.Net; +using System.Net.Http; using System.Threading.Tasks; using System.Xml.Linq; using Task = Microsoft.Build.Utilities.Task; @@ -43,7 +44,14 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport [Required] public string OutputFilePath { get; set; } - public override bool Execute() + /// + /// Sends HTTP requests and receives HTTP responses. + /// + private readonly HttpClient client = new(); + + public override bool Execute() => ExecuteAsync().GetAwaiter().GetResult(); + + private async Task ExecuteAsync() { string baselineRelativeFileName = PrebuiltBaselineFile.Replace(RootDirectory, ""); string gitLogCommand = $"log --first-parent --pretty=format:%H,%f,%ci -- {PrebuiltBaselineFile}"; @@ -51,22 +59,26 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport DateTime startTime = DateTime.Now; Log.LogMessage(MessageImportance.High, "Generating summary usage burndown data..."); - ParallelQuery data = ExecuteGitCommand(RootDirectory, gitLogCommand).AsParallel().Select(commitLine => - { - var splitLine = commitLine.Split(','); - var commit = new Commit() + + IEnumerable> getCommitTasks = ExecuteGitCommand(RootDirectory, gitLogCommand) + .Select(async commitLine => { - Sha = splitLine[0], - Title = splitLine[1], - CommitDate = DateTime.Parse(splitLine[2]) - }; - string fileContents = GetFileContents(baselineRelativeFileName, commit.Sha); - Usage[] usages = UsageData.Parse(XElement.Parse(fileContents)).Usages.NullAsEmpty().ToArray(); - commit.PackageVersionCount = usages.Count(); - commit.PackageCount = usages.GroupBy(i => i.PackageIdentity.Id).Select(grp => grp.First()).Count(); - return commit; - }) - .Select(c => c.ToString()); + var splitLine = commitLine.Split(','); + var commit = new Commit() + { + Sha = splitLine[0], + Title = splitLine[1], + CommitDate = DateTime.Parse(splitLine[2]) + }; + string fileContents = await GetFileContentsAsync(baselineRelativeFileName, commit.Sha); + Usage[] usages = UsageData.Parse(XElement.Parse(fileContents)).Usages.NullAsEmpty().ToArray(); + commit.PackageVersionCount = usages.Count(); + commit.PackageCount = usages.GroupBy(i => i.PackageIdentity.Id).Select(grp => grp.First()).Count(); + return commit; + }); + + Commit[] commits = await System.Threading.Tasks.Task.WhenAll(getCommitTasks); + IEnumerable data = commits.Select(c => c.ToString()); Directory.CreateDirectory(Path.GetDirectoryName(OutputFilePath)); @@ -85,12 +97,8 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport /// The relative path (from the git root) to the file. /// The commit sha for the version of the file to get. /// The contents of the specified file. - private string GetFileContents(string relativeFilePath, string commitSha) - { - WebClient client = new WebClient(); - var xmlString = client.DownloadString($"https://raw.githubusercontent.com/dotnet/source-build/{commitSha}/{relativeFilePath.Replace('\\', '/')}"); - return xmlString; - } + private Task GetFileContentsAsync(string relativeFilePath, string commitSha) => + client.GetStringAsync($"https://raw.githubusercontent.com/dotnet/source-build/{commitSha}/{relativeFilePath.Replace('\\', '/')}"); /// /// Executes a git command and returns the result. diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs similarity index 90% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs index e236d16a3..73cbdec66 100644 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs @@ -16,8 +16,8 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport { public class WriteUsageReports : Task { - private const string SnapshotPrefix = "PackageVersions.props.pre."; - private const string SnapshotSuffix = ".xml"; + private const string SnapshotPrefix = "PackageVersions."; + private const string SnapshotSuffix = ".Snapshot.props"; /// /// Source usage data JSON file. @@ -26,7 +26,7 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport public string DataFile { get; set; } /// - /// A set of "PackageVersions.props.pre.{repo}.xml" files. They are analyzed to find + /// A set of "PackageVersions.{repo}.Snapshot.props" files. They are analyzed to find /// packages built during source-build, and which repo built them. This info is added to the /// report. New packages are associated to a repo by going through each PVP in ascending /// file modification order. @@ -114,7 +114,7 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport string id = usage.PackageIdentity.Id; string version = usage.PackageIdentity.Version.OriginalVersion; - string pvpIdent = WriteBuildOutputProps.GetPropertyName(id); + string pvpIdent = WritePackageVersionsProps.GetPropertyName(id, WritePackageVersionsProps.VersionPropertySuffix); var sourceBuildCreator = new StringBuilder(); foreach (RepoOutput output in sourceBuildRepoOutputs) @@ -195,13 +195,14 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport // Get the embedded creation time if possible: the file's original metadata may // have been destroyed by copying, zipping, etc. string creationTime = snapshot.Xml - // Get the second PropertyGroup. - .Elements().Skip(1).FirstOrDefault() - // Get the creation time element. - ?.Element(snapshot.Xml - .GetDefaultNamespace() - .GetName(WriteBuildOutputProps.CreationTimePropertyName)) - ?.Value; + // Get all elements + .Elements() + // Select all the subelements + .SelectMany(e => e.Elements()) + // Find all that match the creation time property name + .Where(e => e.Name == snapshot.Xml.GetDefaultNamespace().GetName(WritePackageVersionsProps.CreationTimePropertyName)) + // There should be only one or zero + .SingleOrDefault()?.Value; if (string.IsNullOrEmpty(creationTime)) { @@ -279,7 +280,8 @@ namespace Microsoft.DotNet.SourceBuild.Tasks.UsageReport public static PackageVersionPropsElement[] Parse(XElement xml) { return xml - // Get the single PropertyGroup + // Get the first PropertyGroup. The second PropertyGroup is 'extra properties', and the third group is the creation time. + // Only select the first because the extra properties are not built packages. .Elements() .First() // Get all *PackageVersion property elements. diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs diff --git a/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WritePackageVersionProps.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WritePackageVersionProps.cs new file mode 100644 index 000000000..c3b97b2b0 --- /dev/null +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WritePackageVersionProps.cs @@ -0,0 +1,316 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using NuGet.Packaging; +using NuGet.Packaging.Core; +using NuGet.Versioning; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Xml; + +namespace Microsoft.DotNet.Build.Tasks +{ + public class VersionEntry + { + public string Name; + public string Version; + } + + /// + /// Creates a props file that is used as the input for a repo-level build. The props file + /// includes package version numbers that should be used by the repo build and additional special properties. + /// + /// There are two types of input props that can be written: + /// - Versions of union of all packages produced by the builds are added. (AllPackages) + /// - Only versions of packages that are listed as dependencies of a repo are added. (DependenciesOnly) + /// + /// The former represents the current way that source build works for most repos. The latter represents the desired + /// methodology (PVP Flow). PVP flow closely matches how the product is built in non-source-build mode. + /// + public class WritePackageVersionsProps : Microsoft.Build.Utilities.Task + { + private static readonly Regex InvalidElementNameCharRegex = new Regex(@"(^|[^A-Za-z0-9])(?.)"); + + public const string CreationTimePropertyName = "BuildOutputPropsCreationTime"; + public const string VersionPropertySuffix = "Version"; + private const string VersionPropertyAlternateSuffix = "PackageVersion"; + private const string PinnedAttributeName = "Pinned"; + private const string DependencyAttributeName = "Dependency"; + private const string NameAttributeName = "Name"; + + private const string AllPackagesVersionPropsFlowType = "AllPackages"; + private const string DependenciesOnlyVersionPropsFlowType = "DependenciesOnly"; + private const string DefaultVersionPropsFlowType = AllPackagesVersionPropsFlowType; + + /// + /// Set of input nuget package files to generate version properties for. + /// + [Required] + public ITaskItem[] NuGetPackages { get; set; } + + /// + /// File where the version properties should be written. + /// + [Required] + public string OutputPath { get; set; } + + /// + /// Properties to add to the build output props, which may not exist as nupkgs. + /// FOr example, this is used to pass the version of the CLI toolset archives. + /// + /// %(Identity): Package identity. + /// %(Version): Package version. + /// + public ITaskItem[] ExtraProperties { get; set; } + + /// + /// Additional assets to be added to the build output props. + /// i.e. /bin/obj/x64/Release/blobs/Toolset/3.0.100 + /// This parameter is the / portion only, and the asset + /// must be in a / folder. + /// + public string[] AdditionalAssetDirs { get; set; } + + /// + /// Indicates which properties will be written into the Version props file. + /// If AllPackages (Default), all packages from previously built repos will be written. + /// If DependenciesOnly, then only those packages appearing as dependencies in + /// Version.Details.xml will show up. The VersionsDetails property must be set to a + /// valid Version.Details.xml path when DependenciesOnly is used. + /// + public string VersionPropsFlowType { get; set; } = DefaultVersionPropsFlowType; + + /// + /// If VersionPropsFlowType is set to DependenciesOnly, should be the path to the Version.Detail.xml file for the repo. + /// + public string VersionDetails { get; set; } + + /// + /// Retrieve the set of the dependencies from the repo's Version.Details.Xml file. + /// + /// Hash set of dependency names. + private HashSet GetDependences() + { + XmlDocument document = new XmlDocument(); + + try + { + document.Load(VersionDetails); + } + catch (Exception e) + { + Log.LogErrorFromException(e); + return null; + } + + HashSet dependencyNames = new HashSet(StringComparer.OrdinalIgnoreCase); + + // Load the nodes, filter those that are not pinned, and + XmlNodeList dependencyNodes = document.DocumentElement.SelectNodes($"//{DependencyAttributeName}"); + + foreach (XmlNode dependency in dependencyNodes) + { + if (dependency.NodeType == XmlNodeType.Comment || dependency.NodeType == XmlNodeType.Whitespace) + { + continue; + } + + bool isPinned = false; + XmlAttribute pinnedAttribute = dependency.Attributes[PinnedAttributeName]; + if (pinnedAttribute != null && !bool.TryParse(pinnedAttribute.Value, out isPinned)) + { + Log.LogError($"The '{PinnedAttributeName}' attribute is set but the value " + + $"'{pinnedAttribute.Value}' is not a valid boolean..."); + return null; + } + + if (isPinned) + { + continue; + } + + var name = dependency.Attributes[NameAttributeName]?.Value?.Trim(); + + if (string.IsNullOrEmpty(name)) + { + Log.LogError($"The '{NameAttributeName}' attribute must be specified."); + return null; + } + + dependencyNames.Add(name); + } + + return dependencyNames; + } + + /// + /// Filter a set of input dependencies to those that appear in + /// + /// Input set of entries + /// Set of dependencies + /// Set of that appears in + private IEnumerable FilterNonDependencies(IEnumerable input, HashSet dependencies) + { + return input.Where(entry => dependencies.Contains(entry.Name)); + } + + public override bool Execute() + { + if (VersionPropsFlowType != AllPackagesVersionPropsFlowType && + VersionPropsFlowType != DependenciesOnlyVersionPropsFlowType) + { + Log.LogError($"Valid version flow types are '{DependenciesOnlyVersionPropsFlowType}' and '{AllPackagesVersionPropsFlowType}'"); + return !Log.HasLoggedErrors; + } + + if (VersionPropsFlowType == DependenciesOnlyVersionPropsFlowType && (string.IsNullOrEmpty(VersionDetails) || !File.Exists(VersionDetails))) + { + Log.LogError($"When version flow type is DependenciesOnly, the VersionDetails task parameter must point to a valid path to the Version.Details.xml file for the repo. " + + "Provided file path '{VersionDetails}' does not exist."); + return !Log.HasLoggedErrors; + } + + // First, obtain version information from the packages and additional assets that + // are provided. + var latestPackages = NuGetPackages + .Select(item => + { + using (var reader = new PackageArchiveReader(item.GetMetadata("FullPath"))) + { + return reader.GetIdentity(); + } + }) + .GroupBy(identity => identity.Id) + .Select(g => g.OrderBy(id => id.Version).Last()) + .OrderBy(id => id.Id) + .Select(identity => new VersionEntry() + { + Name = identity.Id, + Version = identity.Version.ToString() + }); + + var additionalAssets = (AdditionalAssetDirs ?? new string[0]) + .Where(Directory.Exists) + .Where(dir => Directory.GetDirectories(dir).Count() > 0) + .Select(dir => new VersionEntry() + { + Name = new DirectoryInfo(dir).Name, + Version = new DirectoryInfo(Directory.EnumerateDirectories(dir).OrderBy(s => s).Last()).Name + }); + + var packageElementsToWrite = latestPackages; + var additionalAssetElementsToWrite = additionalAssets; + + // Then, if version flow type is "DependenciesOnly", filter those + // dependencies that do not appear in the version.details.xml file. + if (VersionPropsFlowType == DependenciesOnlyVersionPropsFlowType) + { + var dependencies = GetDependences(); + + if (Log.HasLoggedErrors) + { + return false; + } + + packageElementsToWrite = FilterNonDependencies(packageElementsToWrite, dependencies); + additionalAssetElementsToWrite = FilterNonDependencies(additionalAssetElementsToWrite, dependencies); + } + + Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); + + using (var outStream = File.Open(OutputPath, FileMode.Create)) + using (var sw = new StreamWriter(outStream, new UTF8Encoding(false))) + { + sw.WriteLine(@""); + sw.WriteLine(@""); + + WriteVersionEntries(sw, packageElementsToWrite, "packages"); + WriteExtraProperties(sw); + WriteVersionEntries(sw, additionalAssetElementsToWrite, "additional assets"); + + sw.WriteLine(@" "); + sw.WriteLine($@" <{CreationTimePropertyName}>{DateTime.UtcNow.Ticks}"); + sw.WriteLine(@" "); + + sw.WriteLine(@""); + } + + return !Log.HasLoggedErrors; + } + + /// + /// Write properties specified in the "ExtraProperties task parameter + /// + /// Stream writer + private void WriteExtraProperties(StreamWriter sw) + { + if (ExtraProperties == null) + { + return; + } + + sw.WriteLine(@" "); + sw.WriteLine(@" "); + + foreach (var extraProp in ExtraProperties ?? Enumerable.Empty()) + { + string propertyName = extraProp.GetMetadata("Identity"); + bool doNotOverwrite = false; + string overwriteCondition = string.Empty; + if (bool.TryParse(extraProp.GetMetadata("DoNotOverwrite"), out doNotOverwrite) && doNotOverwrite) + { + overwriteCondition = $" Condition=\"'$({propertyName})' == ''\""; + } + sw.WriteLine($" <{propertyName}{overwriteCondition}>{extraProp.GetMetadata("Version")}"); + } + + sw.WriteLine(@" "); + } + + /// + /// Write properties for the version numbers required for this repo. + /// + /// Stream writer + /// Version entries + private void WriteVersionEntries(StreamWriter sw, IEnumerable entries, string entryType) + { + if (!entries.Any()) + { + return; + } + + sw.WriteLine($" "); + if (VersionPropsFlowType == DependenciesOnlyVersionPropsFlowType) + { + sw.WriteLine(@" "); + } + sw.WriteLine(@" "); + foreach (var package in entries) + { + string propertyName = GetPropertyName(package.Name, VersionPropertySuffix); + string alternatePropertyName = GetPropertyName(package.Name, VersionPropertyAlternateSuffix); + + sw.WriteLine($" <{propertyName}>{package.Version}"); + sw.WriteLine($" <{alternatePropertyName}>{package.Version}"); + } + sw.WriteLine(@" "); + } + + public static string GetPropertyName(string id, string suffix) + { + string formattedId = InvalidElementNameCharRegex.Replace( + id, + match => match.Groups?["FirstPartChar"].Value.ToUpperInvariant() + ?? string.Empty); + + return $"{formattedId}{suffix}"; + } + } +} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj b/src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj rename to src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs b/src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs rename to src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/content/global.json similarity index 92% rename from src/SourceBuild/tarball/content/global.json rename to src/SourceBuild/content/global.json index 5874e648b..ce17211bb 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.200" + "dotnet": "8.0.106" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", diff --git a/src/SourceBuild/content/prep.sh b/src/SourceBuild/content/prep.sh new file mode 100755 index 000000000..a842566b2 --- /dev/null +++ b/src/SourceBuild/content/prep.sh @@ -0,0 +1,173 @@ +#!/usr/bin/env bash + +### Usage: $0 +### +### Prepares the environment to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and +### installing the version of dotnet referenced in global.json +### +### Options: +### --no-artifacts Exclude the download of the previously source-built artifacts archive +### --no-bootstrap Don't replace portable packages in the download source-built artifacts +### --no-prebuilts Exclude the download of the prebuilts archive +### --no-sdk Exclude the download of the .NET SDK +### --runtime-source-feed URL of a remote server or a local directory, from which SDKs and +### runtimes can be downloaded +### --runtime-source-feed-key Key for accessing the above server, if necessary + +set -euo pipefail +IFS=$'\n\t' + +source="${BASH_SOURCE[0]}" +SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" + +function print_help () { + sed -n '/^### /,/^$/p' "$source" | cut -b 5- +} + +buildBootstrap=true +downloadArtifacts=true +downloadPrebuilts=true +installDotnet=true +runtime_source_feed='' # IBM requested these to support s390x scenarios +runtime_source_feed_key='' # IBM requested these to support s390x scenarios +positional_args=() +while :; do + if [ $# -le 0 ]; then + break + fi + lowerI="$(echo "$1" | awk '{print tolower($0)}')" + case $lowerI in + "-?"|-h|--help) + print_help + exit 0 + ;; + --no-bootstrap) + buildBootstrap=false + ;; + --no-artifacts) + downloadArtifacts=false + ;; + --no-prebuilts) + downloadPrebuilts=false + ;; + --no-sdk) + installDotnet=false + ;; + --runtime-source-feed) + runtime_source_feed=$2 + shift + ;; + --runtime-source-feed-key) + runtime_source_feed_key=$2 + shift + ;; + *) + positional_args+=("$1") + ;; + esac + + shift +done + +# Attempting to bootstrap without an SDK will fail. So either the --no-sdk flag must be passed +# or a pre-existing .dotnet SDK directory must exist. +if [ "$buildBootstrap" == true ] && [ "$installDotnet" == false ] && [ ! -d "$SCRIPT_ROOT/.dotnet" ]; then + echo " ERROR: --no-sdk requires --no-bootstrap or a pre-existing .dotnet SDK directory. Exiting..." + exit 1 +fi + +# Check to make sure curl exists to download the archive files +if ! command -v curl &> /dev/null +then + echo " ERROR: curl not found. Exiting..." + exit 1 +fi + +# Check if Private.SourceBuilt artifacts archive exists +artifactsBaseFileName="Private.SourceBuilt.Artifacts" +packagesArchiveDir="$SCRIPT_ROOT/prereqs/packages/archive/" +if [ "$downloadArtifacts" == true ] && [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then + echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded" + downloadArtifacts=false +fi + +# Check if Private.SourceBuilt prebuilts archive exists +prebuiltsBaseFileName="Private.SourceBuilt.Prebuilts" +if [ "$downloadPrebuilts" == true ] && [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then + echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded" + downloadPrebuilts=false +fi + +# Check if dotnet is installed +if [ "$installDotnet" == true ] && [ -d "$SCRIPT_ROOT/.dotnet" ]; then + echo " ./.dotnet SDK directory exists...it will not be installed" + installDotnet=false; +fi + +function DownloadArchive { + archiveType="$1" + isRequired="$2" + + packageVersionsPath="$SCRIPT_ROOT/eng/Versions.props" + notFoundMessage="No source-built $archiveType found to download..." + + echo " Looking for source-built $archiveType to download..." + archiveVersionLine=$(grep -m 1 "" "$packageVersionsPath" || :) + versionPattern="(.*)" + if [[ $archiveVersionLine =~ $versionPattern ]]; then + archiveUrl="${BASH_REMATCH[1]}" + echo " Downloading source-built $archiveType from $archiveUrl..." + (cd "$packagesArchiveDir" && curl --retry 5 -O "$archiveUrl") + elif [ "$isRequired" == true ]; then + echo " ERROR: $notFoundMessage" + exit 1 + else + echo " $notFoundMessage" + fi +} + +function BootstrapArtifacts { + DOTNET_SDK_PATH="$SCRIPT_ROOT/.dotnet" + + # Create working directory for running bootstrap project + workingDir=$(mktemp -d) + echo " Building bootstrap previously source-built in $workingDir" + + # Copy bootstrap project to working dir + cp "$SCRIPT_ROOT/eng/bootstrap/buildBootstrapPreviouslySB.csproj" "$workingDir" + + # Copy NuGet.config from the installer repo to have the right feeds + cp "$SCRIPT_ROOT/src/installer/NuGet.config" "$workingDir" + + # Get PackageVersions.props from existing prev-sb archive + echo " Retrieving PackageVersions.props from existing archive" + sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz') + if [ -f "$sourceBuiltArchive" ]; then + tar -xzf "$sourceBuiltArchive" -C "$workingDir" PackageVersions.props + fi + + # Run restore on project to initiate download of bootstrap packages + "$DOTNET_SDK_PATH/dotnet" restore "$workingDir/buildBootstrapPreviouslySB.csproj" /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props" + + # Remove working directory + rm -rf "$workingDir" +} + +# Check for the version of dotnet to install +if [ "$installDotnet" == true ]; then + echo " Installing dotnet..." + use_installed_dotnet_cli=false + (source ./eng/common/tools.sh && InitializeDotNetCli true) +fi + +# Read the eng/Versions.props to get the archives to download and download them +if [ "$downloadArtifacts" == true ]; then + DownloadArchive Artifacts true + if [ "$buildBootstrap" == true ]; then + BootstrapArtifacts + fi +fi + +if [ "$downloadPrebuilts" == true ]; then + DownloadArchive Prebuilts false +fi diff --git a/src/SourceBuild/tarball/content/keys/Newtonsoft.Json.snk b/src/SourceBuild/content/prereqs/keys/Newtonsoft.Json.snk similarity index 100% rename from src/SourceBuild/tarball/content/keys/Newtonsoft.Json.snk rename to src/SourceBuild/content/prereqs/keys/Newtonsoft.Json.snk diff --git a/src/SourceBuild/tarball/content/keys/NuGet.Client.snk b/src/SourceBuild/content/prereqs/keys/NuGet.Client.snk similarity index 100% rename from src/SourceBuild/tarball/content/keys/NuGet.Client.snk rename to src/SourceBuild/content/prereqs/keys/NuGet.Client.snk diff --git a/src/SourceBuild/tarball/content/keys/README.md b/src/SourceBuild/content/prereqs/keys/README.md similarity index 100% rename from src/SourceBuild/tarball/content/keys/README.md rename to src/SourceBuild/content/prereqs/keys/README.md diff --git a/src/SourceBuild/content/prereqs/packages/archive/_ b/src/SourceBuild/content/prereqs/packages/archive/_ new file mode 100644 index 000000000..e69de29bb diff --git a/src/SourceBuild/content/prereqs/packages/prebuilt/_ b/src/SourceBuild/content/prereqs/packages/prebuilt/_ new file mode 100644 index 000000000..e69de29bb diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.props b/src/SourceBuild/content/repo-projects/Directory.Build.props similarity index 77% rename from src/SourceBuild/tarball/content/repos/Directory.Build.props rename to src/SourceBuild/content/repo-projects/Directory.Build.props index c178de4ec..2d04469ea 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.props +++ b/src/SourceBuild/content/repo-projects/Directory.Build.props @@ -1,13 +1,12 @@ - $(MSBuildProjectName) + $(MSBuildProjectName) - - + $(RepositoryName) @@ -15,7 +14,7 @@ true $(LoggingDir)$(RepositoryName).log >> $(RepoConsoleLogFile) 2>&1 - true + net8.0 $(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/ @@ -23,6 +22,19 @@ Repo specific semaphore path for incremental build --> $(CompletedSemaphorePath)$(RepositoryName)/ + + + $(IntermediatePath)PackageVersions.$(RepositoryName).Current.props + $(IntermediatePath)PackageVersions.$(RepositoryName).Previous.props + $(IntermediatePath)PackageVersions.$(RepositoryName).Snapshot.props + $(IntermediatePath)PackageVersions.$(RepositoryName).props + DependenciesOnly + + $(ProjectDirectory)eng/common/tools.sh + $(ProjectDirectory)eng/common/build.sh + $(ProjectDirectory)global.json + $(ProjectDirectory)NuGet.config + $(ProjectDirectory)NuGet.Config @@ -40,11 +52,12 @@ - '$(RepositoryName) in tarball' + '$(RepositoryName)' + @@ -60,14 +73,13 @@ - - + + - @@ -99,8 +111,6 @@ - - @@ -145,6 +155,7 @@ $(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)" $(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)" $(StandardSourceBuildArgs) /p:PreviouslySourceBuiltNupkgCacheDir="$(PrebuiltSourceBuiltPackagesPath)" + $(StandardSourceBuildArgs) /p:SourceBuildUseMonoRuntime=$(SourceBuildUseMonoRuntime) $(ProjectDirectory)\build$(ShellExtension) @@ -153,10 +164,15 @@ - + - + + + + + + diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.targets b/src/SourceBuild/content/repo-projects/Directory.Build.targets similarity index 63% rename from src/SourceBuild/tarball/content/repos/Directory.Build.targets rename to src/SourceBuild/content/repo-projects/Directory.Build.targets index b52e87c52..e1a5734ad 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.targets +++ b/src/SourceBuild/content/repo-projects/Directory.Build.targets @@ -6,62 +6,17 @@ - - - + - - - - - - true - $(ProjectDirectory)/eng/common/tools.sh - $(ProjectDirectory)/eng/common/build.sh - - - - $(RepoApiImplemented) - $(RepoApiImplemented) - $(RepoApiImplemented) - - - - $(ProjectDirectory)NuGet.config - $(ProjectDirectory)NuGet.Config - $(ProjectDirectory)src\NuGet.config - $(ProjectDirectory)src\NuGet.Config - - - - - $(RepoApiArgs) /p:DotNetPackageVersionPropsPath=$(PackageVersionPropsPath) - - - - $(RepoApiArgs) /p:DotNetRestoreSourcePropsPath=$(RestoreSourcePropsPath) - $(RepoApiArgs) /p:DotNetBuildOffline=true - - - - $(RepoApiArgs) /p:DotNetOutputBlobFeedDir=$(SourceBuiltBlobFeedDir) - - @@ -71,25 +26,11 @@ - - - - - - + Outputs="$(RepoCompletedSemaphorePath)AddNoWarns.complete" > - - - logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.Arcade.Sdk.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net6.0.*' \) ) - - - logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.ArcadeLogging.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net6.0.*' \) ) - - - - $(ArcadeLoggingReplacementText) - if [[ ! -f $logger_path ]]; then - $(ArcadeSdkReplacementText) - fi - - - - - - - - - + + NewText="_InitializeBuildToolFramework="$(NetCurrent)"" /> + + the build process. https://github.com/dotnet/source-build/issues/2307 --> @@ -184,10 +93,8 @@ reference-packages source-built ExtraSources - dotnet5-internal-transport $(PrebuiltNuGetSourceName);$(PreviouslySourceBuiltNuGetSourceName);$(ReferencePackagesNuGetSourceName);$(SourceBuiltNuGetSourceName) $(SourceBuildSources);$(ExtraSourcesNuGetSourceName) - $(SourceBuildSources);$(DotNet5InternalTransportNuGetSourceName) @@ -224,78 +131,11 @@ SourcePath="$(ExtraRestoreSourcePath)" Condition="'$(ExtraRestoreSourcePath)' != ''" /> - - - - - - - - - - - - - - - - - - - - - - - - - @@ -317,106 +157,92 @@ - + + Outputs="$(RepoCompletedSemaphorePath)CreateBuildInputProps.complete"> + + + <_CurrentSourceBuiltPackages Include="$(SourceBuiltPackagesPath)*.nupkg" + Exclude="$(SourceBuiltPackagesPath)*.symbols.nupkg" /> + + + <_PreviouslyBuiltSourceBuiltPackages Include="$(PrebuiltSourceBuiltPackagesPath)*.nupkg" + Exclude="$(PrebuiltSourceBuiltPackagesPath)System.Drawing.Common*.nupkg" /> + + <_CurrentAdditionalAssetDirs Include="$(SourceBuiltToolsetDir)" Condition="Exists('$(SourceBuiltToolsetDir)')" /> + + + + - <_PackageVersionPropsBackupPath>$(PackageVersionPropsPath).pre.$(RepositoryName).xml + <_VersionDetailsXml Condition="'$(PackageVersionPropsFlowType)' == 'DependenciesOnly'">$(ProjectDirectory)/eng/Version.Details.xml - - - <_AdditionalAssetDirs Include="$(SourceBuiltToolsetDir)" Condition="Exists('$(SourceBuiltToolsetDir)')" /> - + + - + + - + + - - <_KnownOriginPackagePaths Include="$(PrebuiltSourceBuiltPackagesPath)*.nupkg" /> - <_KnownOriginPackagePaths Include="$(PrebuiltPackagesPath)*.nupkg" /> - <_KnownOriginPackagePaths Include="$(ReferencePackagesDir)*.nupkg" /> - - - - - - - - - - + - <_ReportDir>$(ConflictingPackageReportDir)before-$(RepositoryName)/ - <_ReportDataFile>$(_ReportDir)usage.xml - <_ProjectAssetsJsonArchiveFile>$(_ReportDir)all-project-assets-json-files.zip + + + + + + +]]> + - + - + - - - - - - - - - <_DotNetRestoreSources Include="$(ExtraRestoreSourcePath)" Condition="'$(ExtraRestoreSourcePath)' != ''"/> - <_DotNetRestoreSources Include="$(SourceBuiltPackagesPath)" /> - <_DotNetRestoreSources Include="$(ReferencePackagesDir)"/> - <_DotNetRestoreSources Include="$(PrebuiltPackagesPath)"/> - <_DotNetRestoreSources Include="$(PrebuiltSourceBuiltPackagesPath)"/> - - <_AdditionalAssetDirs Include="$(SourceBuiltToolsetDir)" Condition="Exists('$(SourceBuiltToolsetDir)')" /> - - - - + + + + - + @@ -433,8 +259,8 @@ - $(BuildCommand) /v:$(LogVerbosity) $(RepoApiArgs) $(RedirectRepoOutputToLog) - $(BuildCommand) $(RepoApiArgs) $(RedirectRepoOutputToLog) + $(BuildCommand) /v:$(LogVerbosity) $(RedirectRepoOutputToLog) + $(BuildCommand) $(RedirectRepoOutputToLog) + + + + + + + + + + @@ -555,7 +394,7 @@ + Subsequent projects will get Arcade from eng/source-built-sdks. --> @@ -600,7 +439,7 @@ AfterTargets="RemoveBuiltPackagesFromCache" Condition=" '$(CleanWhileBuilding)' == 'true' "> - + $(ProjectDirectory)artifacts/buildLogs $(ProjectDirectory)artifacts/buildObj @@ -645,34 +484,28 @@ - + - + - - + WorkingDirectory="$(SourceBuiltSdksDir)%(_ToolPackage.Id)/tools/SourceBuild/" /> - $(ToolPackageExtractDir)%(_ToolPackage.Id)/ + $(SourceBuiltSdksDir)%(_ToolPackage.Id)/ - + <_PackagesNotCreatedReason Include="^ There may have been a silent failure in the submodule build. To confirm, check the build log file for undetected errors that may have prevented package creation: $(RepoConsoleLogFile)" /> <_PackagesNotCreatedReason Include="^ This error might be a false positive if $(RepositoryName) intentionally builds no nuget packages. If so, set the SkipEnsurePackagesCreated property to true in $(MSBuildProjectFullPath)" /> - <_PackagesNotCreatedReason Include="^ The 'bin' directory might be dirty from a previous build and the package files already existed. If so, perform a clean build, or check which packages were already in 'bin' by opening $(_PackageVersionPropsBackupPath)" /> + <_PackagesNotCreatedReason Include="^ The 'bin' directory might be dirty from a previous build and the package files already existed. If so, perform a clean build, or check which packages were already in 'bin' by opening $(CurrentSourceBuiltPackageVersionPropsPath)" /> <_PackagesNotCreatedReason Include="^ The packages may have been written to an unexpected directory. For example, some repos used bin/ and changed to artifacts/ to match Arcade. Check PackagesOutput in $(MSBuildProjectFullPath) (currently '$(PackagesOutput)')" /> @@ -742,7 +575,7 @@ - + @@ -752,7 +585,7 @@ Outputs="$(RepoCompletedSemaphorePath)WritePrebuiltUsageData.complete"> - + @@ -760,7 +593,7 @@ - + @@ -772,7 +605,7 @@ - + @@ -819,7 +652,7 @@ - + @@ -838,7 +671,7 @@ - + $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - - $(ProjectDirectory)NuGet.config - - $(ProjectDirectory)global.json - - true - false - true true - - + @@ -37,9 +28,5 @@ - - - - diff --git a/src/SourceBuild/content/repo-projects/aspire.proj b/src/SourceBuild/content/repo-projects/aspire.proj new file mode 100644 index 000000000..7d41e5e5f --- /dev/null +++ b/src/SourceBuild/content/repo-projects/aspire.proj @@ -0,0 +1,13 @@ + + + + + $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) + + + + + + + + \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/content/repo-projects/aspnetcore.proj similarity index 67% rename from src/SourceBuild/tarball/content/repos/aspnetcore.proj rename to src/SourceBuild/content/repo-projects/aspnetcore.proj index 4a589ea41..e3f4b1664 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/content/repo-projects/aspnetcore.proj @@ -2,31 +2,33 @@ + $(TargetRid) + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) + <_portableRidOverridden Condition="'$(TargetRid)' != '$(OverrideTargetRid)'">true + <_portableRidOverridden Condition="'$(TargetRid)' == '$(OverrideTargetRid)'">false + $(StandardSourceBuildArgs.Replace('--publish', '')) $(BuildCommandArgs) --arch $(Platform) $(BuildCommandArgs) --no-build-repo-tasks - $(BuildCommandArgs) --os-name linux-musl - $(BuildCommandArgs) /p:BuildNodeJs=false + $(BuildCommandArgs) --no-build-nodejs $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime) + $(BuildCommandArgs) /p:PortableBuild=$(_portableRidOverridden) /p:TargetRuntimeIdentifier=$(OverrideTargetRid) $(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0 - - $(BuildCommandArgs) /p:EnablePackageValidation=false $(ProjectDirectory)\eng\build$(ShellExtension) $(BuildCommandArgs) true - - false - true - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config + + + + + - + - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/source-build.proj b/src/SourceBuild/content/repo-projects/cecil.proj similarity index 57% rename from src/SourceBuild/tarball/content/repos/source-build.proj rename to src/SourceBuild/content/repo-projects/cecil.proj index 07f094829..25ce5aa77 100644 --- a/src/SourceBuild/tarball/content/repos/source-build.proj +++ b/src/SourceBuild/content/repo-projects/cecil.proj @@ -3,13 +3,10 @@ $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) - - $(ProjectDirectory)NuGet.config - false - + diff --git a/src/SourceBuild/tarball/content/repos/command-line-api.proj b/src/SourceBuild/content/repo-projects/command-line-api.proj similarity index 68% rename from src/SourceBuild/tarball/content/repos/command-line-api.proj rename to src/SourceBuild/content/repo-projects/command-line-api.proj index 2a1fb7d09..5b5e67332 100644 --- a/src/SourceBuild/tarball/content/repos/command-line-api.proj +++ b/src/SourceBuild/content/repo-projects/command-line-api.proj @@ -8,19 +8,12 @@ $(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config true - false - - - - diff --git a/src/SourceBuild/tarball/content/repos/deployment-tools.proj b/src/SourceBuild/content/repo-projects/deployment-tools.proj similarity index 53% rename from src/SourceBuild/tarball/content/repos/deployment-tools.proj rename to src/SourceBuild/content/repo-projects/deployment-tools.proj index 7d1bf5785..d569fd48a 100644 --- a/src/SourceBuild/tarball/content/repos/deployment-tools.proj +++ b/src/SourceBuild/content/repo-projects/deployment-tools.proj @@ -3,19 +3,11 @@ $(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/repos/diagnostics.proj b/src/SourceBuild/content/repo-projects/diagnostics.proj similarity index 52% rename from src/SourceBuild/tarball/content/repos/diagnostics.proj rename to src/SourceBuild/content/repo-projects/diagnostics.proj index a46c4d1e7..98a136cb5 100644 --- a/src/SourceBuild/tarball/content/repos/diagnostics.proj +++ b/src/SourceBuild/content/repo-projects/diagnostics.proj @@ -4,15 +4,7 @@ $(StandardSourceBuildArgs) $(ProjectDirectory)eng\common\build$(ShellExtension) $(BuildCommandArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - diff --git a/src/SourceBuild/content/repo-projects/dotnet.proj b/src/SourceBuild/content/repo-projects/dotnet.proj new file mode 100644 index 000000000..26ce0941f --- /dev/null +++ b/src/SourceBuild/content/repo-projects/dotnet.proj @@ -0,0 +1,59 @@ + + + + + true + + + AllPackages + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SourceBuild/content/repo-projects/emsdk.proj b/src/SourceBuild/content/repo-projects/emsdk.proj new file mode 100644 index 000000000..4f88c9ff4 --- /dev/null +++ b/src/SourceBuild/content/repo-projects/emsdk.proj @@ -0,0 +1,23 @@ + + + + + $(TargetRid) + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) + + <_platformIndex>$(OverrideTargetRid.LastIndexOf('-')) + $(OverrideTargetRid.Substring(0, $(_platformIndex))) + $(OverrideTargetRid.Substring($(_platformIndex))) + + $(StandardSourceBuildArgs) + $(BuildCommandArgs) /p:PackageRid=$(OverrideTargetRid) + $(BuildCommandArgs) /p:AssetManifestOS=$(TargetOS) + $(BuildCommandArgs) /p:PlatformName=$(TargetArch) + $(BuildCommandArgs) /p:ForceBuildManifestOnly=true + $(StandardSourceBuildCommand) $(BuildCommandArgs) + + + + diff --git a/src/SourceBuild/tarball/content/repos/format.proj b/src/SourceBuild/content/repo-projects/format.proj similarity index 53% rename from src/SourceBuild/tarball/content/repos/format.proj rename to src/SourceBuild/content/repo-projects/format.proj index 21734d18d..8f5b3807c 100644 --- a/src/SourceBuild/tarball/content/repos/format.proj +++ b/src/SourceBuild/content/repo-projects/format.proj @@ -3,20 +3,12 @@ $(ProjectDirectory)eng\common\build$(ShellExtension) $(StandardSourceBuildArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - - + diff --git a/src/SourceBuild/tarball/content/repos/fsharp.proj b/src/SourceBuild/content/repo-projects/fsharp.proj similarity index 73% rename from src/SourceBuild/tarball/content/repos/fsharp.proj rename to src/SourceBuild/content/repo-projects/fsharp.proj index a03a69fc5..25eeb3d9e 100644 --- a/src/SourceBuild/tarball/content/repos/fsharp.proj +++ b/src/SourceBuild/content/repo-projects/fsharp.proj @@ -12,22 +12,22 @@ $(BuildCommandArgs) --sourcebuild $(StandardSourceBuildCommand) $(BuildCommandArgs) - false - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config true - + - - - + + + + + diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/content/repo-projects/installer.proj similarity index 59% rename from src/SourceBuild/tarball/content/repos/installer.proj rename to src/SourceBuild/content/repo-projects/installer.proj index 9b42de398..756a7f0a5 100644 --- a/src/SourceBuild/tarball/content/repos/installer.proj +++ b/src/SourceBuild/content/repo-projects/installer.proj @@ -7,11 +7,16 @@ $(TargetRid) - osx-x64 + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) $(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-")))) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + --runtime-id $(OverrideTargetRid) - --runtime-id $(TargetRid) $(StandardSourceBuildArgs) $(BuildCommandArgs) $(RuntimeArg) @@ -22,14 +27,14 @@ --> $(BuildCommandArgs) /p:NETCoreAppMaximumVersion=99.9 $(BuildCommandArgs) /p:OSName=$(OSNameOverride) - $(BuildCommandArgs) /p:Rid=$(TargetRid) + $(BuildCommandArgs) /p:PortableOSName=$(PortableOS) + $(BuildCommandArgs) /p:Rid=$(OverrideTargetRid) $(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir) - $(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(PortableRid) + $(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(OverrideTargetRid) - $(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true - $(BuildCommandArgs) /p:CoreSetupRid=osx-x64 - $(BuildCommandArgs) /p:CoreSetupRid=$(TargetRid) + $(BuildCommandArgs) /p:PortableBuild=true + $(BuildCommandArgs) /p:CoreSetupRid=$(OverrideTargetRid) $(BuildCommandArgs) /p:PublicBaseURL=file:%2F%2F$(SourceBuiltAssetsDir) @@ -37,33 +42,19 @@ $(BuildCommandArgs) /p:UsePortableLinuxSharedFramework=false $(StandardSourceBuildCommand) $(BuildCommandArgs) - - false - true - true - - $(ProjectDirectory)NuGet.config - - - true - - - - - + - + - @@ -86,30 +77,10 @@ Unable to find package dotnet-ef. Unable to find package dotnet-sql-cache. Unable to find package dotnet-user-secrets. + Unable to find package dotnet-user-jwts. Unable to find package dotnet-watch. --> - - - - $(SourceBuiltAssetsDir)dotnet-sdk-*$(TarBallExtension) - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/msbuild.proj b/src/SourceBuild/content/repo-projects/msbuild.proj similarity index 80% rename from src/SourceBuild/tarball/content/repos/msbuild.proj rename to src/SourceBuild/content/repo-projects/msbuild.proj index 4069d7d3d..ac9e32455 100644 --- a/src/SourceBuild/tarball/content/repos/msbuild.proj +++ b/src/SourceBuild/content/repo-projects/msbuild.proj @@ -2,7 +2,6 @@ - $(OutputVersionArgs) /p:DisableNerdbankVersioning=true true @@ -13,14 +12,6 @@ $(BuildCommandArgs) $(OutputVersionArgs) $(BuildCommandArgs) /p:DotNetCoreSdkDir=$(DotNetCliToolDir) $(StandardSourceBuildCommand) $(BuildCommandArgs) - - - $(ProjectDirectory)NuGet.config - - true - false - - $(ProjectDirectory)global.json @@ -39,11 +30,10 @@ The CentralPackageVersions SDK isn't actually source-built. We get it as a text-only prebuilt, but the NuGet resolver seems flaky so we're using our resolver instead. We only have access to - the nupkg ahead of time when building a tarball, so only enable this workaround then. + the nupkg ahead of time when building, so only enable this workaround then. --> - - $(ToolPackageExtractDir)%(_CentralVersionsToolPackage.Id)/ + $(SourceBuiltSdksDir)%(_CentralVersionsToolPackage.Id)/ diff --git a/src/SourceBuild/tarball/content/repos/nuget-client.proj b/src/SourceBuild/content/repo-projects/nuget-client.proj similarity index 79% rename from src/SourceBuild/tarball/content/repos/nuget-client.proj rename to src/SourceBuild/content/repo-projects/nuget-client.proj index 0bb80e91a..9225b9cf4 100644 --- a/src/SourceBuild/tarball/content/repos/nuget-client.proj +++ b/src/SourceBuild/content/repo-projects/nuget-client.proj @@ -3,15 +3,16 @@ $(KeysDir)NuGet.Client.snk - false - true true + + SYSLIB0051 - + + @@ -23,5 +24,4 @@ - diff --git a/src/SourceBuild/tarball/content/repos/package-source-build.proj b/src/SourceBuild/content/repo-projects/package-source-build.proj similarity index 66% rename from src/SourceBuild/tarball/content/repos/package-source-build.proj rename to src/SourceBuild/content/repo-projects/package-source-build.proj index 44c8e5cf5..89d2631d8 100644 --- a/src/SourceBuild/tarball/content/repos/package-source-build.proj +++ b/src/SourceBuild/content/repo-projects/package-source-build.proj @@ -2,10 +2,16 @@ - false $(SubmoduleDirectory)$(RepositoryName)/ true $(CurrentSourceBuiltPackageVersionPropsPath) + false + + + AllPackages @@ -14,7 +20,8 @@ - + @@ -47,10 +54,22 @@ Directories="$(SourceBuildReferencePackagesDestination)extractArtifacts/" /> - $(OutputPath)$(SourceBuiltArtifactsTarballName).$(installerOutputPackageVersion).$(TargetRid).tar.gz + $(OutputPath)$(SourceBuiltArtifactsTarballName).$(MicrosoftSourceBuildIntermediateInstallerVersion).$(TargetRid).tar.gz + .version - + + + + + + + + diff --git a/src/SourceBuild/tarball/content/repos/razor-compiler.proj b/src/SourceBuild/content/repo-projects/razor.proj similarity index 51% rename from src/SourceBuild/tarball/content/repos/razor-compiler.proj rename to src/SourceBuild/content/repo-projects/razor.proj index f47d22c98..47c3b5721 100644 --- a/src/SourceBuild/tarball/content/repos/razor-compiler.proj +++ b/src/SourceBuild/content/repo-projects/razor.proj @@ -3,18 +3,12 @@ $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - + + diff --git a/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj b/src/SourceBuild/content/repo-projects/roslyn-analyzers.proj similarity index 60% rename from src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj rename to src/SourceBuild/content/repo-projects/roslyn-analyzers.proj index 3d7882a5b..045cd59ff 100644 --- a/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj +++ b/src/SourceBuild/content/repo-projects/roslyn-analyzers.proj @@ -6,10 +6,7 @@ $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - false - false true - $(ProjectDirectory)global.json @@ -17,14 +14,9 @@ - + - - - - diff --git a/src/SourceBuild/content/repo-projects/roslyn.proj b/src/SourceBuild/content/repo-projects/roslyn.proj new file mode 100644 index 000000000..bd7a4f45b --- /dev/null +++ b/src/SourceBuild/content/repo-projects/roslyn.proj @@ -0,0 +1,33 @@ + + + + + $(StandardSourceBuildArgs) + $(BuildCommandArgs) /p:TreatWarningsAsErrors=false + $(BuildCommandArgs) /p:ApplyPartialNgenOptimization=false + $(BuildCommandArgs) /p:EnablePartialNgenOptimization=false + $(BuildCommandArgs) /p:PublishWindowsPdb=false + + + $(BuildCommandArgs) /p:UsingToolMicrosoftNetCompilers=false + $(BuildCommandArgs) /p:RepoRoot=$(ProjectDirectory) + + $(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs) + + true + + + + + + + + + + + + + + + + diff --git a/src/SourceBuild/content/repo-projects/runtime.proj b/src/SourceBuild/content/repo-projects/runtime.proj new file mode 100644 index 000000000..67959e981 --- /dev/null +++ b/src/SourceBuild/content/repo-projects/runtime.proj @@ -0,0 +1,82 @@ + + + + + + true + + + NU5129 + + $(ProjectDirectory)/clean$(ShellExtension) + + $(TargetRid) + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) + + <_platformIndex>$(NETCoreSdkRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkRuntimeIdentifier.Substring(0, $(_platformIndex))) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + + $(StandardSourceBuildArgs) + $(BuildCommandArgs) /p:TargetRid=$(OverrideTargetRid) + $(BuildCommandArgs) /p:RuntimeOS=$(RuntimeOS) + $(BuildCommandArgs) /p:BaseOS=$(BaseOS) + $(BuildCommandArgs) /p:SourceBuildNonPortable=true + $(BuildCommandArgs) /p:UsingToolMicrosoftNetCompilers=false + $(StandardSourceBuildCommand) $(BuildCommandArgs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json + + + + + + + + diff --git a/src/SourceBuild/tarball/content/repos/sdk.proj b/src/SourceBuild/content/repo-projects/sdk.proj similarity index 61% rename from src/SourceBuild/tarball/content/repos/sdk.proj rename to src/SourceBuild/content/repo-projects/sdk.proj index 613ed2e26..79b1ef060 100644 --- a/src/SourceBuild/tarball/content/repos/sdk.proj +++ b/src/SourceBuild/content/repo-projects/sdk.proj @@ -7,39 +7,34 @@ $(BuildCommandArgs) /p:PackageProjectUrl=https://github.com/dotnet/sdk $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltToolsetDir) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + <_baseOS>$(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + $(BuildCommandArgs) /p:PortableRid=$(_baseOS)-$(Platform) + $(BuildCommandArgs) /p:TargetRid=$(TargetRid) + + + $(BuildCommandArgs) /p:NativeAotSupported=false + true $(BuildCommandArgs) -v $(LogVerbosity) - - $(BuildCommandArgs) /p:PB_PackageVersionPropsUrl=file:%2F%2F$(PackageVersionPropsPath) - $(StandardSourceBuildCommand) $(BuildCommandArgs) - - - $(ProjectDirectory)NuGet.config - $(ProjectDirectory)global.json - - true - false - - - - - + - + diff --git a/src/SourceBuild/content/repo-projects/source-build-externals.proj b/src/SourceBuild/content/repo-projects/source-build-externals.proj new file mode 100644 index 000000000..6f905da54 --- /dev/null +++ b/src/SourceBuild/content/repo-projects/source-build-externals.proj @@ -0,0 +1,9 @@ + + + + + $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) + + + + diff --git a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj b/src/SourceBuild/content/repo-projects/source-build-reference-packages.proj similarity index 79% rename from src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj rename to src/SourceBuild/content/repo-projects/source-build-reference-packages.proj index c1321e716..4c535e89c 100644 --- a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj +++ b/src/SourceBuild/content/repo-projects/source-build-reference-packages.proj @@ -10,18 +10,10 @@ $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ProjectDirectory)NuGet.config - $(ProjectDirectory)global.json - false - true - - - - diff --git a/src/SourceBuild/tarball/content/repos/sourcelink.proj b/src/SourceBuild/content/repo-projects/sourcelink.proj similarity index 53% rename from src/SourceBuild/tarball/content/repos/sourcelink.proj rename to src/SourceBuild/content/repo-projects/sourcelink.proj index f034ee76c..e623cb08d 100644 --- a/src/SourceBuild/tarball/content/repos/sourcelink.proj +++ b/src/SourceBuild/content/repo-projects/sourcelink.proj @@ -4,22 +4,19 @@ $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config true - false - - true + + AllPackages - - - - + + + + diff --git a/src/SourceBuild/content/repo-projects/symreader.proj b/src/SourceBuild/content/repo-projects/symreader.proj new file mode 100644 index 000000000..6f905da54 --- /dev/null +++ b/src/SourceBuild/content/repo-projects/symreader.proj @@ -0,0 +1,9 @@ + + + + + $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) + + + + diff --git a/src/SourceBuild/tarball/content/repos/templating.proj b/src/SourceBuild/content/repo-projects/templating.proj similarity index 61% rename from src/SourceBuild/tarball/content/repos/templating.proj rename to src/SourceBuild/content/repo-projects/templating.proj index 7cc53299c..2f54e0da3 100644 --- a/src/SourceBuild/tarball/content/repos/templating.proj +++ b/src/SourceBuild/content/repo-projects/templating.proj @@ -7,20 +7,11 @@ $(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity) $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - - - + diff --git a/src/SourceBuild/tarball/content/repos/test-templates.proj b/src/SourceBuild/content/repo-projects/test-templates.proj similarity index 64% rename from src/SourceBuild/tarball/content/repos/test-templates.proj rename to src/SourceBuild/content/repo-projects/test-templates.proj index 31f889ad1..61b87a209 100644 --- a/src/SourceBuild/tarball/content/repos/test-templates.proj +++ b/src/SourceBuild/content/repo-projects/test-templates.proj @@ -6,18 +6,12 @@ $(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config true - false - - - - + diff --git a/src/SourceBuild/tarball/content/repos/vstest.proj b/src/SourceBuild/content/repo-projects/vstest.proj similarity index 78% rename from src/SourceBuild/tarball/content/repos/vstest.proj rename to src/SourceBuild/content/repo-projects/vstest.proj index fc7f0984b..65e7b2824 100644 --- a/src/SourceBuild/tarball/content/repos/vstest.proj +++ b/src/SourceBuild/content/repo-projects/vstest.proj @@ -5,16 +5,15 @@ $(StandardSourceBuildArgs) $(BuildCommandArgs) /p:SemanticVersioningV1=true $(ProjectDirectory)\eng\common\build$(ShellExtension) $(BuildCommandArgs) - - false true - $(ProjectDirectory)global.json + + IDE0090 - + diff --git a/src/SourceBuild/tarball/content/repos/xdt.proj b/src/SourceBuild/content/repo-projects/xdt.proj similarity index 64% rename from src/SourceBuild/tarball/content/repos/xdt.proj rename to src/SourceBuild/content/repo-projects/xdt.proj index 31f889ad1..43d3336f2 100644 --- a/src/SourceBuild/tarball/content/repos/xdt.proj +++ b/src/SourceBuild/content/repo-projects/xdt.proj @@ -6,19 +6,12 @@ $(BuildCommandArgs) $(FlagParameterPrefix)nodereuse $(ArcadeFalseBoolBuildArg) $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config true - false - - - - diff --git a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj b/src/SourceBuild/content/repo-projects/xliff-tasks.proj similarity index 58% rename from src/SourceBuild/tarball/content/repos/xliff-tasks.proj rename to src/SourceBuild/content/repo-projects/xliff-tasks.proj index a5881adb4..e6c43dd75 100644 --- a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj +++ b/src/SourceBuild/content/repo-projects/xliff-tasks.proj @@ -5,18 +5,10 @@ $(StandardSourceBuildArgs) $(StandardSourceBuildCommand) $(BuildCommandArgs) - false - true true true - - $(ProjectDirectory)NuGet.config - - - - diff --git a/src/SourceBuild/tarball/content/src/Directory.Build.props b/src/SourceBuild/content/src/Directory.Build.props similarity index 100% rename from src/SourceBuild/tarball/content/src/Directory.Build.props rename to src/SourceBuild/content/src/Directory.Build.props diff --git a/src/SourceBuild/tarball/content/src/Directory.Build.targets b/src/SourceBuild/content/src/Directory.Build.targets similarity index 100% rename from src/SourceBuild/tarball/content/src/Directory.Build.targets rename to src/SourceBuild/content/src/Directory.Build.targets diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.props b/src/SourceBuild/content/test/Directory.Build.props similarity index 100% rename from src/SourceBuild/tarball/content/test/Directory.Build.props rename to src/SourceBuild/content/test/Directory.Build.props diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.targets b/src/SourceBuild/content/test/Directory.Build.targets similarity index 100% rename from src/SourceBuild/tarball/content/test/Directory.Build.targets rename to src/SourceBuild/content/test/Directory.Build.targets diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs similarity index 65% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs index 0641cfd49..49ee98d73 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs @@ -8,6 +8,7 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Text.RegularExpressions; +using Microsoft.Extensions.FileSystemGlobbing; using Xunit; using Xunit.Abstractions; @@ -15,6 +16,11 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests { internal class BaselineHelper { + private const string VersionPlaceholder = "x.y.z"; + private const string VersionPlaceholderMatchingPattern = "*.*.*"; // wildcard pattern used to match on the version represented by the placeholder + private const string NetTfmPlaceholder = "netx.y"; + private const string NetTfmPlaceholderMatchingPattern = "net*.*"; // wildcard pattern used to match on the version represented by the placeholder + public static void CompareEntries(string baselineFileName, IOrderedEnumerable actualEntries) { IEnumerable baseline = File.ReadAllLines(GetBaselineFilePath(baselineFileName)); @@ -35,18 +41,17 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests Assert.Null(message); } - public static void CompareContents(string baselineFileName, string actualContents, ITestOutputHelper outputHelper, bool warnOnDiffs = false) + public static void CompareBaselineContents(string baselineFileName, string actualContents, ITestOutputHelper outputHelper, bool warnOnDiffs = false, string baselineSubDir = "") { - string actualFilePath = Path.Combine(DotNetHelper.LogsDirectory, $"Updated{baselineFileName}"); + string actualFilePath = Path.Combine(TestBase.LogsDirectory, $"Updated{baselineFileName}"); File.WriteAllText(actualFilePath, actualContents); - CompareFiles(baselineFileName, actualFilePath, outputHelper, warnOnDiffs); + CompareFiles(GetBaselineFilePath(baselineFileName, baselineSubDir), actualFilePath, outputHelper, warnOnDiffs); } - public static void CompareFiles(string baselineFileName, string actualFilePath, ITestOutputHelper outputHelper, bool warnOnDiffs = false) + public static void CompareFiles(string expectedFilePath, string actualFilePath, ITestOutputHelper outputHelper, bool warnOnDiffs = false) { - string baselineFilePath = GetBaselineFilePath(baselineFileName); - string baselineFileText = File.ReadAllText(baselineFilePath).Trim(); + string baselineFileText = File.ReadAllText(expectedFilePath).Trim(); string actualFileText = File.ReadAllText(actualFilePath).Trim(); string? message = null; @@ -54,9 +59,9 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests if (baselineFileText != actualFileText) { // Retrieve a diff in order to provide a UX which calls out the diffs. - string diff = DiffFiles(baselineFilePath, actualFilePath, outputHelper); + string diff = DiffFiles(expectedFilePath, actualFilePath, outputHelper); string prefix = warnOnDiffs ? "##vso[task.logissue type=warning;]" : string.Empty; - message = $"{Environment.NewLine}{prefix}Baseline '{baselineFilePath}' does not match actual '{actualFilePath}`. {Environment.NewLine}" + message = $"{Environment.NewLine}{prefix}Expected file '{expectedFilePath}' does not match actual file '{actualFilePath}`. {Environment.NewLine}" + $"{diff}{Environment.NewLine}"; if (warnOnDiffs) @@ -76,20 +81,20 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests { (Process Process, string StdOut, string StdErr) diffResult = ExecuteHelper.ExecuteProcess("git", $"diff --no-index {file1Path} {file2Path}", outputHelper); - Assert.Equal(1, diffResult.Process.ExitCode); return diffResult.StdOut; } public static string GetAssetsDirectory() => Path.Combine(Directory.GetCurrentDirectory(), "assets"); - private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(GetAssetsDirectory(), "baselines", baselineFileName); + public static string GetBaselineFilePath(string baselineFileName, string baselineSubDir = "") => + Path.Combine(GetAssetsDirectory(), "baselines", baselineSubDir, baselineFileName); public static string RemoveNetTfmPaths(string source) { string pathSeparator = Regex.Escape(Path.DirectorySeparatorChar.ToString()); Regex netTfmRegex = new($"{pathSeparator}net[1-9]+\\.[0-9]+{pathSeparator}"); - return netTfmRegex.Replace(source, $"{Path.DirectorySeparatorChar}netx.y{Path.DirectorySeparatorChar}"); + return netTfmRegex.Replace(source, $"{Path.DirectorySeparatorChar}{NetTfmPlaceholder}{Path.DirectorySeparatorChar}"); } public static string RemoveRids(string diff, bool isPortable = false) => @@ -103,9 +108,23 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests $"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)" + $"(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))" + $"?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"); - string result = semanticVersionRegex.Replace(source, $"x.y.z"); + string result = semanticVersionRegex.Replace(source, VersionPlaceholder); return RemoveNetTfmPaths(result); } + + /// + /// This returns a that can be used to match on a path whose versions have been removed via + /// . + /// + public static Matcher GetFileMatcherFromPath(string path) + { + path = path + .Replace(VersionPlaceholder, VersionPlaceholderMatchingPattern) + .Replace(NetTfmPlaceholder, NetTfmPlaceholderMatchingPattern); + Matcher matcher = new(); + matcher.AddInclude(path); + return matcher; + } } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs similarity index 64% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs index af435cfdc..d2280add4 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs @@ -15,7 +15,7 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests; /// for related web scenarios. /// They are encapsulated in a separate testclass so that they can be run in parallel. /// -public class BasicScenarioTests : SmokeTests +public class BasicScenarioTests : SdkTests { public BasicScenarioTests(ITestOutputHelper outputHelper) : base(outputHelper) { } @@ -23,13 +23,18 @@ public class BasicScenarioTests : SmokeTests [MemberData(nameof(GetScenarioObjects))] public void VerifyScenario(TestScenario scenario) => scenario.Execute(DotNetHelper); - private static IEnumerable GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario }); + public static IEnumerable GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario }); - private static IEnumerable GetScenarios() + public static IEnumerable GetScenarios() { + // Since this has to be a static method, we don't have access to XUnit's output helper. So we use our own version as a placeholder. + DotNetHelper helper = new(new DebugTestOutputHelper()); + foreach (DotNetLanguage language in Enum.GetValues()) { - yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.Console, DotNetActions.Build | DotNetActions.Run | DotNetActions.PublishComplex | DotNetActions.PublishR2R); + yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.Console, + // R2R is not supported on Mono (see https://github.com/dotnet/runtime/issues/88419#issuecomment-1623762676) + DotNetActions.Build | DotNetActions.Run | (DotNetHelper.ShouldPublishComplex() ? DotNetActions.None : DotNetActions.PublishComplex) | (helper.IsMonoRuntime ? DotNetActions.None : DotNetActions.PublishR2R)); yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.ClassLib, DotNetActions.Build | DotNetActions.Publish); yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.XUnit, DotNetActions.Test); yield return new(nameof(BasicScenarioTests), language, DotNetTemplate.NUnit, DotNetActions.Test); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs similarity index 68% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs index b2ed5661f..8a3c6ce73 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs @@ -17,9 +17,12 @@ internal static class Config public const string PrereqsPathEnv = "SMOKE_TESTS_PREREQS_PATH"; public const string CustomPackagesPathEnv = "SMOKE_TESTS_CUSTOM_PACKAGES_PATH"; public const string SdkTarballPathEnv = "SMOKE_TESTS_SDK_TARBALL_PATH"; + public const string SourceBuiltArtifactsPathEnv = "SMOKE_TESTS_SOURCEBUILT_ARTIFACTS_PATH"; public const string TargetRidEnv = "SMOKE_TESTS_TARGET_RID"; - public const string WarnPoisonDiffsEnv = "SMOKE_TESTS_WARN_POISON_DIFFS"; public const string WarnSdkContentDiffsEnv = "SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS"; + public const string WarnLicenseScanDiffsEnv = "SMOKE_TESTS_WARN_LICENSE_SCAN_DIFFS"; + public const string RunningInCIEnv = "SMOKE_TESTS_RUNNING_IN_CI"; + public const string LicenseScanPathEnv = "SMOKE_TESTS_LICENSE_SCAN_PATH"; public static string DotNetDirectory { get; } = Environment.GetEnvironmentVariable(DotNetDirectoryEnv) ?? Path.Combine(Directory.GetCurrentDirectory(), ".dotnet"); @@ -30,11 +33,18 @@ internal static class Config public static string? PrereqsPath { get; } = Environment.GetEnvironmentVariable(PrereqsPathEnv); public static string? CustomPackagesPath { get; } = Environment.GetEnvironmentVariable(CustomPackagesPathEnv); public static string? SdkTarballPath { get; } = Environment.GetEnvironmentVariable(SdkTarballPathEnv); + public static string? SourceBuiltArtifactsPath { get; } = Environment.GetEnvironmentVariable(SourceBuiltArtifactsPathEnv); public static string TargetRid { get; } = Environment.GetEnvironmentVariable(TargetRidEnv) ?? throw new InvalidOperationException($"'{Config.TargetRidEnv}' must be specified"); public static string TargetArchitecture { get; } = TargetRid.Split('-')[1]; - public static bool WarnOnPoisonDiffs { get; } = - bool.TryParse(Environment.GetEnvironmentVariable(WarnPoisonDiffsEnv), out bool excludeOnlineTests) && excludeOnlineTests; public static bool WarnOnSdkContentDiffs { get; } = - bool.TryParse(Environment.GetEnvironmentVariable(WarnSdkContentDiffsEnv), out bool excludeOnlineTests) && excludeOnlineTests; + bool.TryParse(Environment.GetEnvironmentVariable(WarnSdkContentDiffsEnv), out bool warnOnSdkContentDiffs) && warnOnSdkContentDiffs; + public static bool WarnOnLicenseScanDiffs { get; } = + bool.TryParse(Environment.GetEnvironmentVariable(WarnLicenseScanDiffsEnv), out bool warnOnLicenseScanDiffs) && warnOnLicenseScanDiffs; + + // Indicates whether the tests are being run in the context of a CI pipeline + public static bool RunningInCI { get; } = + bool.TryParse(Environment.GetEnvironmentVariable(RunningInCIEnv), out bool runningInCI) && runningInCI; + + public static string? LicenseScanPath { get; } = Environment.GetEnvironmentVariable(LicenseScanPathEnv); } diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTestOutputHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTestOutputHelper.cs new file mode 100644 index 000000000..503233e21 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTestOutputHelper.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +internal class DebugTestOutputHelper : ITestOutputHelper +{ + public void WriteLine(string message) + { + Debug.WriteLine(message); + } + + public void WriteLine(string format, params object[] args) + { + Debug.WriteLine(format, args); + } +} diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTests.cs new file mode 100644 index 000000000..c556b0e90 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTests.cs @@ -0,0 +1,122 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +public class DebugTests : SdkTests +{ + private record ScanResult(string FileName, bool HasDebugInfo, bool HasDebugAbbrevs, bool HasFileSymbols, bool HasGnuDebugLink); + + public DebugTests(ITestOutputHelper outputHelper) : base(outputHelper) { } + + /// + /// Verifies that all generated native files include native debug symbols. + /// + [Fact] + public void SourceBuiltSdkContainsNativeDebugSymbols() + { + + var fileNames = Directory.EnumerateFiles(Config.DotNetDirectory, "*", SearchOption.AllDirectories); + var foundIssue = false; + StringBuilder issueDetails = new(); + foreach (var fileName in fileNames) + { + if (!IsElfFile(fileName)) + { + continue; + } + + var result = ScanFile(fileName); + + string newLine = Environment.NewLine; + + if (!result.HasDebugInfo) + { + foundIssue = true; + issueDetails.Append($"missing .debug_info section in {fileName}{newLine}"); + } + if (!result.HasDebugAbbrevs) + { + foundIssue = true; + issueDetails.Append($"missing .debug_abbrev section in {fileName}{newLine}"); + } + if (!result.HasFileSymbols) + { + foundIssue = true; + issueDetails.Append($"missing FILE symbols in {fileName}{newLine}"); + } + if (result.HasGnuDebugLink) + { + foundIssue = true; + issueDetails.Append($"unexpected .gnu_debuglink section in {fileName}{newLine}"); + } + } + + Assert.False(foundIssue, issueDetails.ToString()); + } + + private bool IsElfFile(string fileName) + { + string fileStdOut = ExecuteHelper.ExecuteProcessValidateExitCode("file", $"{fileName}", OutputHelper); + return Regex.IsMatch(fileStdOut, @"ELF 64-bit [LM]SB (?:pie )?(?:executable|shared object)"); + } + + private ScanResult ScanFile(string fileName) + { + string readelfSStdOut = ExecuteHelper.ExecuteProcessValidateExitCode("eu-readelf", $"-S {fileName}", OutputHelper); + + // Test for .debug_* sections in the shared object. This is the main test. + // Stripped objects will not contain these. + + bool hasDebugInfo = readelfSStdOut + .Split("\n") + .Where(line => line.Contains("] .debug_info")) + .Any(); + + bool hasDebugAbbrev = readelfSStdOut.Split("\n") + .Where(line => line.Contains("] .debug_abbrev")) + .Any(); + + string readelfsStdOut = ExecuteHelper.ExecuteProcessValidateExitCode("eu-readelf", $"-s {fileName}", OutputHelper); + + // Test FILE symbols. These will most likely be removed by anyting that + // manipulates symbol tables because it's generally useless. So a nice test + // that nothing has messed with symbols. + bool hasFileSymbols = readelfsStdOut.Split("\n").Where(ContainsFileSymbols).Any(); + + // Test that there are no .gnu_debuglink sections pointing to another + // debuginfo file. There shouldn't be any debuginfo files, so the link makes + // no sense either. + bool hasGnuDebuglink = readelfsStdOut.Split("\n").Where(line => line.Contains("] .gnu_debuglink")).Any(); + + return new ScanResult(fileName, hasDebugInfo, hasDebugAbbrev, hasFileSymbols, hasGnuDebuglink); + } + + private bool ContainsFileSymbols(string line) + { + // Try matching against output like this: + // 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS coreclr_resolver.cpp + // 779: 0000000000000000 0 FILE LOCAL DEFAULT ABS header.cpp + + var parts = new Regex(@"[ \t\n\r]+").Split(line); + int expectedNumberOfParts = 9; + + if (parts.Length < expectedNumberOfParts) + { + return false; + } + + var fileNameRegex = new Regex(@"(.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx)"); + return (parts[3] == "0") && (parts[4] == "FILE") && (parts[5] == "LOCAL") && (parts[6] == "DEFAULT") && + (parts[7] == "ABS") && (fileNameRegex.IsMatch(parts[8])); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs similarity index 80% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs index 93ac900a9..18ae4fffb 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs @@ -14,7 +14,8 @@ public enum DotNetActions Run = 2, RunWeb = 4, Publish = 8, - PublishComplex = 16, - PublishR2R = 32, - Test = 64, + PublishSelfContained = 16, + PublishComplex = 32, + PublishR2R = 64, + Test = 128, } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs similarity index 88% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs index d6ec47734..bfd1a8766 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs @@ -8,7 +8,7 @@ using Xunit.Abstractions; namespace Microsoft.DotNet.SourceBuild.SmokeTests; -public class DotNetFormatTests : SmokeTests +public class DotNetFormatTests : SdkTests { private const string TestFileName = "FormatTest.cs"; private const string UnformattedFileName = "FormatTestUnformatted.cs"; @@ -33,6 +33,6 @@ public class DotNetFormatTests : SmokeTests DotNetHelper.ExecuteCmd($"format {projectFilePath}"); - BaselineHelper.CompareFiles(ExpectedFormattedFileName, testFilePath, OutputHelper); + BaselineHelper.CompareFiles(BaselineHelper.GetBaselineFilePath(ExpectedFormattedFileName), testFilePath, OutputHelper); } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs similarity index 57% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs index 921ab1f97..f35440d4c 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs @@ -6,6 +6,10 @@ using System; using System.Diagnostics; using System.IO; using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Sockets; +using Xunit; using Xunit.Abstractions; namespace Microsoft.DotNet.SourceBuild.SmokeTests; @@ -15,11 +19,11 @@ internal class DotNetHelper private static readonly object s_lockObj = new(); public static string DotNetPath { get; } = Path.Combine(Config.DotNetDirectory, "dotnet"); - public static string LogsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "logs"); public static string PackagesDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "packages"); public static string ProjectsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), $"projects-{DateTime.Now:yyyyMMddHHmmssffff}"); private ITestOutputHelper OutputHelper { get; } + public bool IsMonoRuntime { get; } public DotNetHelper(ITestOutputHelper outputHelper) { @@ -35,8 +39,9 @@ internal class DotNetHelper } Directory.CreateDirectory(Config.DotNetDirectory); - ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {Config.SdkTarballPath} -C {Config.DotNetDirectory}", outputHelper); + Utilities.ExtractTarball(Config.SdkTarballPath, Config.DotNetDirectory, outputHelper); } + IsMonoRuntime = DetermineIsMonoRuntime(Config.DotNetDirectory); if (!Directory.Exists(ProjectsDirectory)) { @@ -48,11 +53,6 @@ internal class DotNetHelper { Directory.CreateDirectory(PackagesDirectory); } - - if (!Directory.Exists(LogsDirectory)) - { - Directory.CreateDirectory(LogsDirectory); - } } } @@ -96,13 +96,14 @@ internal class DotNetHelper } } - public void ExecuteCmd(string args, string? workingDirectory = null, Action? additionalProcessConfigCallback = null, int? expectedExitCode = 0, int millisecondTimeout = -1) + public void ExecuteCmd(string args, string? workingDirectory = null, Action? processConfigCallback = null, + int? expectedExitCode = 0, int millisecondTimeout = -1) { (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess( DotNetPath, args, OutputHelper, - configure: (process) => configureProcess(process, workingDirectory), + configureCallback: (process) => configureProcess(process, workingDirectory), millisecondTimeout: millisecondTimeout); if (expectedExitCode != null) { @@ -113,11 +114,11 @@ internal class DotNetHelper { ConfigureProcess(process, workingDirectory); - additionalProcessConfigCallback?.Invoke(process); + processConfigCallback?.Invoke(process); } } - public static void ConfigureProcess(Process process, string? workingDirectory, bool setPath = false) + public static void ConfigureProcess(Process process, string? workingDirectory) { if (workingDirectory != null) { @@ -128,11 +129,7 @@ internal class DotNetHelper process.StartInfo.EnvironmentVariables["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; process.StartInfo.EnvironmentVariables["DOTNET_ROOT"] = Config.DotNetDirectory; process.StartInfo.EnvironmentVariables["NUGET_PACKAGES"] = PackagesDirectory; - - if (setPath) - { - process.StartInfo.EnvironmentVariables["PATH"] = $"{Config.DotNetDirectory}:{Environment.GetEnvironmentVariable("PATH")}"; - } + process.StartInfo.EnvironmentVariables["PATH"] = $"{Config.DotNetDirectory}:{Environment.GetEnvironmentVariable("PATH")}"; } public void ExecuteBuild(string projectName) => @@ -159,7 +156,7 @@ internal class DotNetHelper return projectDirectory; } - public void ExecutePublish(string projectName, bool? selfContained = null, string? rid = null, bool trimmed = false, bool readyToRun = false) + public void ExecutePublish(string projectName, DotNetTemplate template, bool? selfContained = null, string? rid = null, bool trimmed = false, bool readyToRun = false) { string options = string.Empty; string binlogDifferentiator = string.Empty; @@ -188,37 +185,66 @@ internal class DotNetHelper } } + string projDir = GetProjectDirectory(projectName); + string publishDir = Path.Combine(projDir, "bin", "publish"); + ExecuteCmd( - $"publish {options} {GetBinLogOption(projectName, "publish", binlogDifferentiator)}", - GetProjectDirectory(projectName)); + $"publish {options} {GetBinLogOption(projectName, "publish", binlogDifferentiator)} -o {publishDir}", + projDir); + + if (template == DotNetTemplate.Console) + { + ExecuteCmd($"{projectName}.dll", publishDir, expectedExitCode: 0); + } + else if (template == DotNetTemplate.ClassLib || template == DotNetTemplate.BlazorWasm) + { + // Can't run the published output of classlib (no entrypoint) or WASM (needs a server) + } + // Assume it is a web-based template + else + { + ExecuteWebDll(projectName, publishDir, template); + } } public void ExecuteRun(string projectName) => ExecuteCmd($"run {GetBinLogOption(projectName, "run")}", GetProjectDirectory(projectName)); - public void ExecuteRunWeb(string projectName) + public void ExecuteRunWeb(string projectName, DotNetTemplate template) { - ExecuteCmd( - $"run {GetBinLogOption(projectName, "run")}", - GetProjectDirectory(projectName), - additionalProcessConfigCallback: processConfigCallback, - millisecondTimeout: 30000); + // 'dotnet run' exit code differs between CoreCLR and Mono (https://github.com/dotnet/sdk/issues/30095). + int expectedExitCode = IsMonoRuntime ? 143 : 0; - void processConfigCallback(Process process) - { - process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => - { - if (e.Data?.Contains("Application started. Press Ctrl+C to shut down.") ?? false) - { - ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", OutputHelper); - } - }); - } + ExecuteWeb( + projectName, + $"run --no-launch-profile {GetBinLogOption(projectName, "run")}", + GetProjectDirectory(projectName), + template, + expectedExitCode); } + public void ExecuteWebDll(string projectName, string workingDirectory, DotNetTemplate template) => + ExecuteWeb(projectName, $"{projectName}.dll", workingDirectory, template, expectedExitCode: 0); + public void ExecuteTest(string projectName) => ExecuteCmd($"test {GetBinLogOption(projectName, "test")}", GetProjectDirectory(projectName)); + private void ExecuteWeb(string projectName, string args, string workingDirectory, DotNetTemplate template, int expectedExitCode) + { + WebAppValidator validator = new(OutputHelper, template); + ExecuteCmd( + args, + workingDirectory, + processConfigCallback: validator.Validate, + expectedExitCode: expectedExitCode, + millisecondTimeout: 30000); + Assert.True(validator.IsValidated); + if (validator.ValidationException is not null) + { + throw validator.ValidationException; + } + } + private static string GetBinLogOption(string projectName, string command, string? differentiator = null) { string fileName = $"{projectName}-{command}"; @@ -227,8 +253,89 @@ internal class DotNetHelper fileName += $"-{differentiator}"; } - return $"/bl:{Path.Combine(LogsDirectory, $"{fileName}.binlog")}"; + return $"/bl:{Path.Combine(TestBase.LogsDirectory, $"{fileName}.binlog")}"; + } + + private static bool DetermineIsMonoRuntime(string dotnetRoot) + { + string sharedFrameworkRoot = Path.Combine(dotnetRoot, "shared", "Microsoft.NETCore.App"); + if (!Directory.Exists(sharedFrameworkRoot)) + { + return false; + } + + string? version = Directory.GetDirectories(sharedFrameworkRoot).FirstOrDefault(); + if (version is null) + { + return false; + } + + string sharedFramework = Path.Combine(sharedFrameworkRoot, version); + + // Check the presence of one of the mono header files. + return File.Exists(Path.Combine(sharedFramework, "mono-gc.h")); } private static string GetProjectDirectory(string projectName) => Path.Combine(ProjectsDirectory, projectName); + + public static bool ShouldPublishComplex() => + string.Equals(Config.TargetArchitecture,"ppc64le") || string.Equals(Config.TargetArchitecture,"s390x"); + + private class WebAppValidator + { + private readonly ITestOutputHelper _outputHelper; + private readonly DotNetTemplate _template; + + public WebAppValidator(ITestOutputHelper outputHelper, DotNetTemplate template) + { + _outputHelper = outputHelper; + _template = template; + } + + public bool IsValidated { get; set; } + public Exception? ValidationException { get; set; } + + private static int GetAvailablePort() + { + TcpListener listener = new(IPAddress.Loopback, 0); + listener.Start(); + int port = ((IPEndPoint)listener.LocalEndpoint).Port; + listener.Stop(); + return port; + } + + public void Validate(Process process) + { + int port = GetAvailablePort(); + process.StartInfo.EnvironmentVariables.Add("ASPNETCORE_HTTP_PORTS", port.ToString()); + process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => + { + try + { + if (e.Data?.Contains("Application started. Press Ctrl+C to shut down.") ?? false) + { + _outputHelper.WriteLine("Detected app has started. Sending web request to validate..."); + + using HttpClient httpClient = new(); + string url = $"http://localhost:{port}"; + if (_template == DotNetTemplate.WebApi) + { + url += "/WeatherForecast"; + } + + using HttpResponseMessage resultMsg = httpClient.GetAsync(new Uri(url)).Result; + _outputHelper.WriteLine($"Status code returned: {resultMsg.StatusCode}"); + resultMsg.EnsureSuccessStatusCode(); + IsValidated = true; + + ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", _outputHelper); + } + } + catch (Exception ex) + { + ValidationException = ex; + } + }); + } + } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs similarity index 93% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs index c4570eb47..0a30c7215 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs @@ -15,9 +15,7 @@ public enum DotNetTemplate Mvc, Razor, BlazorWasm, - BlazorServer, WebApi, WebApp, Worker, - Angular, } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs similarity index 84% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs index 57c02e87d..55b050ebf 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs @@ -16,7 +16,5 @@ public static class DotNetTemplateExtensions || template == DotNetTemplate.WebApi || template == DotNetTemplate.Razor || template == DotNetTemplate.BlazorWasm - || template == DotNetTemplate.BlazorServer - || template == DotNetTemplate.Worker - || template == DotNetTemplate.Angular; + || template == DotNetTemplate.Worker; } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs similarity index 92% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs index 46013bbc7..e30909a9b 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs @@ -9,7 +9,7 @@ using Xunit.Abstractions; namespace Microsoft.DotNet.SourceBuild.SmokeTests; -public class DotNetWatchTests : SmokeTests +public class DotNetWatchTests : SdkTests { public DotNetWatchTests(ITestOutputHelper outputHelper) : base(outputHelper) { } @@ -20,11 +20,11 @@ public class DotNetWatchTests : SmokeTests bool outputChanged = false; DotNetHelper.ExecuteCmd( - "watch run", + "watch run --non-interactive", workingDirectory: projectDirectory, - additionalProcessConfigCallback: processConfigCallback, + processConfigCallback: processConfigCallback, expectedExitCode: null, // The exit code does not reflect whether or not dotnet watch is working properly - millisecondTimeout: 30000); + millisecondTimeout: 60000); Assert.True(outputChanged); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs similarity index 78% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs index 62e1eb594..129d96c24 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs @@ -17,10 +17,14 @@ internal static class ExecuteHelper string args, ITestOutputHelper outputHelper, bool logOutput = false, - Action? configure = null, + bool excludeInfo = false, + Action? configureCallback = null, int millisecondTimeout = -1) { - outputHelper.WriteLine($"Executing: {fileName} {args}"); + if (!excludeInfo) + { + outputHelper.WriteLine($"Executing: {fileName} {args}"); + } Process process = new() { @@ -41,7 +45,7 @@ internal static class ExecuteHelper process.StartInfo.Environment.Remove(key); } - configure?.Invoke(process); + configureCallback?.Invoke(process); StringBuilder stdOutput = new(); process.OutputDataReceived += new DataReceivedEventHandler( @@ -64,27 +68,42 @@ internal static class ExecuteHelper }); process.Start(); + process.BeginOutputReadLine(); process.BeginErrorReadLine(); process.WaitForExit(millisecondTimeout); if (!process.HasExited) { - outputHelper.WriteLine($"Killing: {fileName} {args}"); + outputHelper.WriteLine($"Process did not exit. Killing {fileName} {args} after waiting {millisecondTimeout} milliseconds."); process.Kill(true); process.WaitForExit(); } - string output = stdOutput.ToString().Trim(); - if (logOutput && !string.IsNullOrWhiteSpace(output)) + string output; + string error; + + lock (stdOutput) { - outputHelper.WriteLine(output); + output = stdOutput.ToString().Trim(); } - string error = stdError.ToString().Trim(); - if (logOutput && !string.IsNullOrWhiteSpace(error)) + lock (stdError) { - outputHelper.WriteLine(error); + error = stdError.ToString().Trim(); + } + + if (logOutput) + { + if (!string.IsNullOrWhiteSpace(output)) + { + outputHelper.WriteLine(output); + } + + if (string.IsNullOrWhiteSpace(error)) + { + outputHelper.WriteLine(error); + } } return (process, output, error); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs new file mode 100644 index 000000000..852507964 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs @@ -0,0 +1,295 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.RegularExpressions; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +/// +/// Scans the VMR for licenses and compares them to a baseline. This ensures that only open-source licenses are used for relevant files. +/// +/// +/// Each sub-repo of the VMR is scanned separately because of the amount of time it takes. +/// When scanning is run, the test provides a list of files for the scanner to ignore. These include binary file types. It also includes +/// .il/.ildump file types which are massive, causing the scanner to choke and don't include license references anyway. +/// Once the scanner returns the results, a filtering process occurs. First, any detected license that is in the allowed list of licenses +/// is filtered out. The test defines a list of such licenses that all represent open-source licenses. Next, a license exclusions file is +/// applied to the filtering. This file contains a set of paths for which certain detected licenses are to be ignored. Such a path can be +/// defined to ignore all detected licenses or specific ones. These exclusions are useful for ignoring false positives where the scanning +/// tool has detected something in the file that makes it think it's a license reference when that's not actually the intent. Other cases +/// that are excluded are when the license is meant as configuration or test data and not actually applying to the code. These exclusions +/// further filter down the set of the detected licenses for each file. Everything that's left at this point is reported. It gets compared +/// to a baseline file (which is defined for each sub-repo). If the filtered results differ from what's defined in the baseline, the test fails. +/// +/// Rules for determining how to resolve a detected license: +/// 1. If it's an allowed open-source license, add it to the list of allowed licenses in LicenseScanTests.cs. +/// 2. If the file shouldn't be scanned as a general rule because of its file type (e.g. image file), add it to the list of excluded file types in LicenseScanTests.cs. +/// 3. Add it to LicenseExclusions.txt if the referenced license is one of the following: +/// a. Not applicable (e.g. test data) +/// b. False positive +/// 4. If the license is not allowed for open-souce, the license needs to be fixed. Everything else should go in the baseline file. +/// +public class LicenseScanTests : TestBase +{ + private const string BaselineSubDir = "licenses"; + + private static readonly string[] s_allowedLicenseExpressions = new string[] + { + "apache-1.1", // https://opensource.org/license/apache-1-1/ + "apache-2.0", // https://opensource.org/license/apache-2-0/ + "apache-2.0 WITH apple-runtime-library-exception", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/apple-runtime-library-exception.LICENSE + "apache-2.0 WITH llvm-exception", // https://foundation.llvm.org/relicensing/LICENSE.txt + "apsl-2.0", // https://opensource.org/license/apsl-2-0-php/ + "boost-1.0", // https://opensource.org/license/bsl-1-0/ + "bsd-new", // https://opensource.org/license/BSD-3-clause/ + "bsd-original", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/bsd-original.LICENSE + "bsd-original-uc", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/bsd-original-uc.LICENSE + "bsd-simplified", // https://opensource.org/license/bsd-2-clause/ + "bytemark", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/bytemark.LICENSE + "bzip2-libbzip-2010", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/bzip2-libbzip-2010.LICENSE + "cc0-1.0", // https://creativecommons.org/publicdomain/zero/1.0/legalcode + "cc-by-3.0", // https://creativecommons.org/licenses/by/3.0/legalcode + "cc-by-sa-3.0", // https://creativecommons.org/licenses/by-sa/3.0/legalcode + "cc-by-sa-4.0", // https://creativecommons.org/licenses/by-sa/4.0/legalcode + "cc-pd", // https://creativecommons.org/publicdomain/mark/1.0/ + "cc-sa-1.0", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/cc-sa-1.0.LICENSE + "epl-1.0", // https://opensource.org/license/epl-1-0/ + "generic-cla", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/generic-cla.LICENSE + "gpl-1.0-plus", // https://opensource.org/license/gpl-1-0/ + "gpl-2.0", // https://opensource.org/license/gpl-2-0/ + "ietf", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/ietf.LICENSE + "gpl-2.0-plus WITH autoconf-simple-exception-2.0", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/rules/gpl-2.0-plus_with_autoconf-simple-exception-2.0_8.RULE + "gpl-2.0 WITH gcc-linking-exception-2.0", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/rules/gpl-2.0_with_gcc-linking-exception-2.0_6.RULE + "isc", // https://opensource.org/license/isc-license-txt/ + "iso-8879", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/iso-8879.LICENSE + "lgpl-2.0-plus", // https://opensource.org/license/lgpl-2-0/ + "lgpl-2.1", // https://opensource.org/license/lgpl-2-1/ + "lgpl-2.1-plus", // https://opensource.org/license/lgpl-2-1/ + "lzma-sdk-9.22", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/lzma-sdk-9.22.LICENSE + "mit", // https://opensource.org/license/mit/ + "mit-addition", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/mit-addition.LICENSE + "mit-testregex", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/mit-testregex.LICENSE + "ms-patent-promise", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/ms-patent-promise.LICENSE + "ms-lpl", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/ms-lpl.LICENSE + "ms-pl", // https://opensource.org/license/ms-pl-html/ + "ms-rl", // https://opensource.org/license/ms-rl-html/ + "newton-king-cla", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/newton-king-cla.LICENSE + "ngpl", // https://opensource.org/license/nethack-php/ + "object-form-exception-to-mit", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/object-form-exception-to-mit.LICENSE + "ofl-1.1", // https://opensource.org/license/ofl-1-1/ + "osf-1990", // https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#HP_Variant + "public-domain", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/public-domain.LICENSE + "public-domain-disclaimer", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/public-domain-disclaimer.LICENSE + "python", // https://opensource.org/license/python-2-0/ + "rpl-1.5", // https://opensource.org/license/rpl-1-5/ + "sax-pd", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/sax-pd.LICENSE + "unicode", // https://opensource.org/license/unicode-inc-license-agreement-data-files-and-software/ + "unicode-mappings", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/unicode-mappings.LICENSE + "uoi-ncsa", // https://opensource.org/license/uoi-ncsa-php/ + "w3c-software-19980720", // https://opensource.org/license/w3c/ + "w3c-software-doc-20150513", // https://opensource.org/license/w3c/ + "warranty-disclaimer", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/warranty-disclaimer.LICENSE + "x11", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/x11.LICENSE + "zlib" // https://opensource.org/license/zlib/ + }; + + private static readonly string[] s_ignoredFilePatterns = new string[] + { + "*.bin", + "*.bmp", + "*.bson", + "*.db", + "*.dic", + "*.eot", + "*.gif", + "*.ico", + "*.jpg", + "*.il", + "*.ildump", + "*.lss", + "*.nlp", + "*.otf", + "*.pdf", + "*.pfx", + "*.png", + "*.snk", + "*.ttf", + "*.vsd", + "*.vsdx", + "*.winmd", + "*.woff", + "*.woff2", + "*.xlsx", + }; + + private readonly string _targetRepo; + + public LicenseScanTests(ITestOutputHelper outputHelper) : base(outputHelper) + { + Assert.NotNull(Config.LicenseScanPath); + _targetRepo = new DirectoryInfo(Config.LicenseScanPath).Name; + } + + [SkippableFact(Config.LicenseScanPathEnv, skipOnNullOrWhiteSpaceEnv: true)] + public void ScanForLicenses() + { + Assert.NotNull(Config.LicenseScanPath); + + // Indicates how long until a timeout occurs for scanning a given file + const int FileScanTimeoutSeconds = 240; + + string scancodeResultsPath = Path.Combine(LogsDirectory, "scancode-results.json"); + + // Scancode Doc: https://scancode-toolkit.readthedocs.io/en/latest/index.html + string ignoreOptions = string.Join(" ", s_ignoredFilePatterns.Select(pattern => $"--ignore {pattern}")); + ExecuteHelper.ExecuteProcessValidateExitCode( + "scancode", + $"--license --processes 4 --timeout {FileScanTimeoutSeconds} --strip-root --only-findings {ignoreOptions} --json-pp {scancodeResultsPath} {Config.LicenseScanPath}", + OutputHelper); + + JsonDocument doc = JsonDocument.Parse(File.ReadAllText(scancodeResultsPath)); + ScancodeResults? scancodeResults = doc.Deserialize(); + Assert.NotNull(scancodeResults); + + FilterFiles(scancodeResults); + + JsonSerializerOptions options = new() + { + WriteIndented = true + }; + string json = JsonSerializer.Serialize(scancodeResults, options); + + string baselineName = $"Licenses.{_targetRepo}.json"; + + string baselinePath = BaselineHelper.GetBaselineFilePath(baselineName, BaselineSubDir); + if (!File.Exists(baselinePath)) + { + Assert.Fail($"No license baseline file exists for repo '{_targetRepo}'. Expected file: {baselinePath}"); + } + + BaselineHelper.CompareBaselineContents(baselineName, json, OutputHelper, Config.WarnOnLicenseScanDiffs, BaselineSubDir); + } + + private LicenseExclusion ParseLicenseExclusion(string rawExclusion) + { + string[] parts = rawExclusion.Split('|', StringSplitOptions.RemoveEmptyEntries); + + Match repoNameMatch = Regex.Match(parts[0], @"(?<=src/)[^/]+"); + + Assert.True(repoNameMatch.Success); + + // The path in the exclusion file is rooted from the VMR. But the path in the scancode results is rooted from the + // target repo within the VMR. So we need to strip off the beginning part of the path. + Match restOfPathMatch = Regex.Match(parts[0], @"(?<=src/[^/]+/).*"); + string path = restOfPathMatch.Value; + + if (parts.Length == 0 || parts.Length > 2) + { + throw new Exception($"Invalid license exclusion: '{rawExclusion}'"); + } + + if (parts.Length > 1) + { + string[] licenseExpressions = parts[1].Split(',', StringSplitOptions.RemoveEmptyEntries); + return new LicenseExclusion(repoNameMatch.Value, path, licenseExpressions); + } + else + { + return new LicenseExclusion(repoNameMatch.Value, path, Enumerable.Empty()); + } + } + + private void FilterFiles(ScancodeResults scancodeResults) + { + IEnumerable rawExclusions = Utilities.ParseExclusionsFile("LicenseExclusions.txt"); + IEnumerable exclusions = rawExclusions + .Select(exclusion => ParseLicenseExclusion(exclusion)) + .Where(exclusion => exclusion.Repo == _targetRepo) + .ToList(); + + // This will filter out files that we don't want to include in the baseline. + // Filtering can happen in two ways: + // 1. There are a set of allowed license expressions that apply to all files. If a file has a match on one of those licenses, + // that license will not be considered. + // 2. The LicenseExclusions.txt file contains a list of files and the licenses that should be excluded from those files. + // Once the license expression filtering has been applied, if a file has any licenses left, it will be included in the baseline. + // In that case, the baseline will list all of the licenses for that file, even if some were originally excluded during this processing. + // In other words, the baseline will be fully representative of the licenses that apply to the files that are listed there. + + for (int i = scancodeResults.Files.Count - 1; i >= 0; i--) + { + ScancodeFileResult file = scancodeResults.Files[i]; + + // A license expression can be a logical expression, e.g. "(MIT OR Apache-2.0)" + // For our purposes, we just care about the license involved, not the semantics of the expression. + // Parse out all the expression syntax to just get the license names. + string[] licenses = file.LicenseExpression? + .Replace("(", string.Empty) + .Replace(")", string.Empty) + .Replace(" AND ", ",") + .Replace(" OR ", ",") + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(license => license.Trim()) + .ToArray() + ?? Array.Empty(); + + // First check whether the file's licenses can all be matched with allowed expressions + IEnumerable disallowedLicenses = licenses + .Where(license => !s_allowedLicenseExpressions.Contains(license, StringComparer.OrdinalIgnoreCase)); + + if (!disallowedLicenses.Any()) + { + scancodeResults.Files.Remove(file); + } + else + { + // There are some licenses that are not allowed. Now check whether the file is excluded. + + IEnumerable matchingExclusions = + Utilities.GetMatchingFileExclusions(file.Path, exclusions, exclusion => exclusion.Path); + + IEnumerable excludedLicenses = matchingExclusions.SelectMany(exclusion => exclusion.LicenseExpressions); + // If no licenses are explicitly specified, it means they're all excluded. + if (matchingExclusions.Any() && !excludedLicenses.Any()) + { + scancodeResults.Files.Remove(file); + } + else + { + IEnumerable remainingLicenses = disallowedLicenses.Except(excludedLicenses); + + if (!remainingLicenses.Any()) + { + scancodeResults.Files.Remove(file); + } + } + } + } + } + + private record LicenseExclusion(string Repo, string Path, IEnumerable LicenseExpressions); + + private class ScancodeResults + { + [JsonPropertyName("files")] + public List Files { get; set; } = new(); + } + + private class ScancodeFileResult + { + [JsonPropertyName("path")] + public string Path { get; set; } = string.Empty; + + [JsonPropertyName("detected_license_expression")] + public string? LicenseExpression { get; set; } + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj similarity index 76% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj index be458761b..c491778a8 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable false @@ -9,12 +9,16 @@ - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all + + + diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs similarity index 71% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs index 747c739db..e140df73b 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs @@ -6,6 +6,7 @@ using System; using System.Diagnostics; using System.IO; using System.Net.Http; +using System.Security.AccessControl; using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; @@ -15,15 +16,17 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests; /// /// OmniSharp tests to ensure it works with a source-built sdk. /// -public class OmniSharpTests : SmokeTests +public class OmniSharpTests : SdkTests { - private string OmniSharpDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "omnisharp"); + // Update version as new releases become available: https://github.com/OmniSharp/omnisharp-roslyn/releases + private const string OmniSharpReleaseVersion = "1.39.11"; + + private string OmniSharpDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), nameof(OmniSharpTests)); public OmniSharpTests(ITestOutputHelper outputHelper) : base(outputHelper) { } - [SkippableTheory(Config.ExcludeOmniSharpEnv, skipOnTrue: true)] + [SkippableTheory(Config.ExcludeOmniSharpEnv, skipOnTrueEnv: true, skipArchitectures: new[] { "ppc64le", "s390x" })] [InlineData(DotNetTemplate.BlazorWasm)] - [InlineData(DotNetTemplate.BlazorServer)] [InlineData(DotNetTemplate.ClassLib)] [InlineData(DotNetTemplate.Console)] [InlineData(DotNetTemplate.MSTest)] @@ -48,7 +51,7 @@ public class OmniSharpTests : SmokeTests OutputHelper, logOutput: true, millisecondTimeout: 5000, - configure: (process) => DotNetHelper.ConfigureProcess(process, projectDirectory, setPath: true)); + configureCallback: (process) => DotNetHelper.ConfigureProcess(process, projectDirectory)); Assert.NotEqual(0, executeResult.Process.ExitCode); Assert.DoesNotContain("ERROR", executeResult.StdOut); @@ -61,12 +64,14 @@ public class OmniSharpTests : SmokeTests { using HttpClient client = new(); string omniSharpTarballFile = $"omnisharp-linux-{Config.TargetArchitecture}.tar.gz"; - Uri omniSharpTarballUrl = new($"https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/{omniSharpTarballFile}"); + Uri omniSharpTarballUrl = new($"https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v{OmniSharpReleaseVersion}/{omniSharpTarballFile}"); await client.DownloadFileAsync(omniSharpTarballUrl, omniSharpTarballFile, OutputHelper); Directory.CreateDirectory(OmniSharpDirectory); - ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {omniSharpTarballFile} -C {OmniSharpDirectory}", OutputHelper); - ExecuteHelper.ExecuteProcessValidateExitCode("chmod", $"+x {OmniSharpDirectory}/run", OutputHelper); + Utilities.ExtractTarball(omniSharpTarballFile, OmniSharpDirectory, OutputHelper); + + // Ensure the run script is executable (see https://github.com/OmniSharp/omnisharp-roslyn/issues/2547) + File.SetUnixFileMode($"{OmniSharpDirectory}/run", UnixFileMode.UserRead | UnixFileMode.UserExecute); } } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs similarity index 83% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs index 11ea0667f..cf2e1182b 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs @@ -9,11 +9,11 @@ using Xunit.Abstractions; namespace Microsoft.DotNet.SourceBuild.SmokeTests { - public class PoisonTests : SmokeTests + public class PoisonTests : SdkTests { public PoisonTests(ITestOutputHelper outputHelper) : base(outputHelper) { } - [SkippableFact(Config.PoisonReportPathEnv, skipOnNullOrWhiteSpace: true)] + [SkippableFact(Config.PoisonReportPathEnv, skipOnNullOrWhiteSpaceEnv: true)] public void VerifyUsage() { if (!File.Exists(Config.PoisonReportPath)) @@ -24,9 +24,10 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests string currentPoisonReport = File.ReadAllText(Config.PoisonReportPath); currentPoisonReport = RemoveHashes(currentPoisonReport); currentPoisonReport = BaselineHelper.RemoveRids(currentPoisonReport); + currentPoisonReport = BaselineHelper.RemoveRids(currentPoisonReport, true); currentPoisonReport = BaselineHelper.RemoveVersions(currentPoisonReport); - BaselineHelper.CompareContents("PoisonUsage.txt", currentPoisonReport, OutputHelper, Config.WarnOnPoisonDiffs); + BaselineHelper.CompareBaselineContents("PoisonUsage.txt", currentPoisonReport, OutputHelper); } private static string RemoveHashes(string source) => Regex.Replace(source, "^\\s*.*(\r\n?|\n)", string.Empty, RegexOptions.Multiline); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md similarity index 61% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md index 416492a6e..9e9586075 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md @@ -3,8 +3,17 @@ * Run these tests via `build.sh --run-smoke-test` * Various configuration settings are stored in `Config.cs` +## Dependencies + +Some tests need additional dependencies. These must be installed (manually and separately) on the system for the tests to pass. + +The following programs are used by some tests: + +- eu-readelf +- file + ## Prereq Packages Some prerelease scenarios, usually security updates, require non-source-built packages which are not publicly available. Specify the directory where these packages can be found via the `SMOKE_TESTS_PREREQS_PATH` environment variable when running tests via `build.sh --run-smoke-test` e.g. -`SMOKE_TESTS_PREREQS_PATH=packages/smoke-test-prereqs`. +`SMOKE_TESTS_PREREQS_PATH=prereqs/packages/smoke-test-prereqs`. diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs new file mode 100644 index 000000000..29bb7dbc5 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs @@ -0,0 +1,227 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.IO.Enumeration; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Microsoft.Extensions.FileSystemGlobbing; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +[Trait("Category", "SdkContent")] +public class SdkContentTests : SdkTests +{ + private const string MsftSdkType = "msft"; + private const string SourceBuildSdkType = "sb"; + + public SdkContentTests(ITestOutputHelper outputHelper) : base(outputHelper) { } + + /// + /// Verifies the file layout of the source built sdk tarball to the Microsoft build. + /// The differences are captured in baselines/MsftToSbSdkDiff.txt. + /// Version numbers that appear in paths are compared but are stripped from the baseline. + /// This makes the baseline durable between releases. This does mean however, entries + /// in the baseline may appear identical if the diff is version specific. + /// + [SkippableFact(new[] { Config.MsftSdkTarballPathEnv, Config.SdkTarballPathEnv }, skipOnNullOrWhiteSpaceEnv: true)] + public void CompareMsftToSbFileList() + { + const string msftFileListingFileName = "msftSdkFiles.txt"; + const string sbFileListingFileName = "sbSdkFiles.txt"; + WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName, isPortable: true, MsftSdkType); + WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName, isPortable: false, SourceBuildSdkType); + + string diff = BaselineHelper.DiffFiles(msftFileListingFileName, sbFileListingFileName, OutputHelper); + diff = RemoveDiffMarkers(diff); + BaselineHelper.CompareBaselineContents("MsftToSbSdkFiles.diff", diff, OutputHelper, Config.WarnOnSdkContentDiffs); + } + + [SkippableFact(new[] { Config.MsftSdkTarballPathEnv, Config.SdkTarballPathEnv }, skipOnNullOrWhiteSpaceEnv: true)] + public void CompareMsftToSbAssemblyVersions() + { + Assert.NotNull(Config.MsftSdkTarballPath); + Assert.NotNull(Config.SdkTarballPath); + + DirectoryInfo tempDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName())); + try + { + DirectoryInfo sbSdkDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, SourceBuildSdkType)); + Utilities.ExtractTarball(Config.SdkTarballPath, sbSdkDir.FullName, OutputHelper); + + DirectoryInfo msftSdkDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, MsftSdkType)); + Utilities.ExtractTarball(Config.MsftSdkTarballPath, msftSdkDir.FullName, OutputHelper); + + Dictionary sbSdkAssemblyVersions = GetSbSdkAssemblyVersions(sbSdkDir.FullName); + Dictionary msftSdkAssemblyVersions = GetMsftSdkAssemblyVersions(msftSdkDir.FullName, sbSdkAssemblyVersions); + + RemoveExcludedAssemblyVersionPaths(sbSdkAssemblyVersions, msftSdkAssemblyVersions); + + const string SbVersionsFileName = "sb_assemblyversions.txt"; + WriteAssemblyVersionsToFile(sbSdkAssemblyVersions, SbVersionsFileName); + + const string MsftVersionsFileName = "msft_assemblyversions.txt"; + WriteAssemblyVersionsToFile(msftSdkAssemblyVersions, MsftVersionsFileName); + + string diff = BaselineHelper.DiffFiles(MsftVersionsFileName, SbVersionsFileName, OutputHelper); + diff = RemoveDiffMarkers(diff); + BaselineHelper.CompareBaselineContents("MsftToSbSdkAssemblyVersions.diff", diff, OutputHelper, Config.WarnOnSdkContentDiffs); + } + finally + { + tempDir.Delete(recursive: true); + } + } + + private static void RemoveExcludedAssemblyVersionPaths(Dictionary sbSdkAssemblyVersions, Dictionary msftSdkAssemblyVersions) + { + IEnumerable assemblyVersionDiffFilters = GetSdkAssemblyVersionDiffExclusionFilters() + .Select(filter => filter.TrimStart("./".ToCharArray())); + + // Remove any excluded files as long as SB SDK's file has the same or greater assembly version compared to the corresponding + // file in the MSFT SDK. If the version is less, the file will show up in the results as this is not a scenario + // that is valid for shipping. + string[] sbSdkFileArray = sbSdkAssemblyVersions.Keys.ToArray(); + for (int i = sbSdkFileArray.Length - 1; i >= 0; i--) + { + string assemblyPath = sbSdkFileArray[i]; + Version? sbVersion = sbSdkAssemblyVersions[assemblyPath]; + Version? msftVersion = msftSdkAssemblyVersions[assemblyPath]; + + if (sbVersion is not null && + msftVersion is not null && + sbVersion >= msftVersion && + Utilities.IsFileExcluded(assemblyPath, assemblyVersionDiffFilters)) + { + sbSdkAssemblyVersions.Remove(assemblyPath); + msftSdkAssemblyVersions.Remove(assemblyPath); + } + } + } + + private static void WriteAssemblyVersionsToFile(Dictionary assemblyVersions, string outputPath) + { + string[] lines = assemblyVersions + .Select(kvp => $"{kvp.Key} - {kvp.Value}") + .Order() + .ToArray(); + File.WriteAllLines(outputPath, lines); + } + + private Dictionary GetMsftSdkAssemblyVersions( + string msftSdkPath, Dictionary sbSdkAssemblyVersions) + { + Dictionary msftSdkAssemblyVersions = new(); + foreach ((string relativePath, _) in sbSdkAssemblyVersions) + { + // Now we want to find the corresponding file that exists in the MSFT SDK. + // We've already replaced version numbers with placeholders in the path. + // So we can't directly use the relative path to find the corresponding file. Instead, + // we need to replace the version placeholders with wildcards and find the path through path matching. + string file = Path.Combine(msftSdkPath, relativePath); + Matcher matcher = BaselineHelper.GetFileMatcherFromPath(relativePath); + + file = FindMatchingFilePath(msftSdkPath, matcher, relativePath); + + if (!File.Exists(file)) + { + continue; + } + + AssemblyName assemblyName = AssemblyName.GetAssemblyName(file); + msftSdkAssemblyVersions.Add(BaselineHelper.RemoveVersions(relativePath), GetVersion(assemblyName)); + } + return msftSdkAssemblyVersions; + } + + // It's known that assembly versions can be different between builds in their revision field. Disregard that difference + // by excluding that field in the output. + private static Version? GetVersion(AssemblyName assemblyName) + { + if (assemblyName.Version is not null) + { + return new Version(assemblyName.Version.ToString(3)); + } + + return null; + } + + private string FindMatchingFilePath(string rootDir, Matcher matcher, string representativeFile) + { + foreach (string file in Directory.EnumerateFiles(rootDir, "*", SearchOption.AllDirectories)) + { + if (matcher.Match(rootDir, file).HasMatches) + { + return file; + } + } + + Assert.Fail($"Unable to find matching file for '{representativeFile}' in '{rootDir}'."); + return string.Empty; + } + + private Dictionary GetSbSdkAssemblyVersions(string sbSdkPath) + { + IEnumerable exclusionFilters = GetSdkDiffExclusionFilters(SourceBuildSdkType) + .Select(filter => filter.TrimStart("./".ToCharArray())); + Dictionary sbSdkAssemblyVersions = new(); + foreach (string file in Directory.EnumerateFiles(sbSdkPath, "*", SearchOption.AllDirectories)) + { + string fileExt = Path.GetExtension(file); + if (fileExt.Equals(".dll", StringComparison.OrdinalIgnoreCase) || + fileExt.Equals(".exe", StringComparison.OrdinalIgnoreCase)) + { + AssemblyName assemblyName = AssemblyName.GetAssemblyName(file); + string relativePath = Path.GetRelativePath(sbSdkPath, file); + string normalizedPath = BaselineHelper.RemoveVersions(relativePath); + + if (!Utilities.IsFileExcluded(normalizedPath, exclusionFilters)) + { + sbSdkAssemblyVersions.Add(normalizedPath, GetVersion(assemblyName)); + } + } + } + return sbSdkAssemblyVersions; + } + + private void WriteTarballFileList(string? tarballPath, string outputFileName, bool isPortable, string sdkType) + { + if (!File.Exists(tarballPath)) + { + throw new InvalidOperationException($"Tarball path '{tarballPath}' does not exist."); + } + + string fileListing = Utilities.GetTarballContentNames(tarballPath).Aggregate((a, b) => $"{a}{Environment.NewLine}{b}"); + fileListing = BaselineHelper.RemoveRids(fileListing, isPortable); + fileListing = BaselineHelper.RemoveVersions(fileListing); + IEnumerable files = fileListing.Split(Environment.NewLine).OrderBy(path => path); + files = RemoveExclusions(files, GetSdkDiffExclusionFilters(sdkType)); + + File.WriteAllLines(outputFileName, files); + } + + private static IEnumerable RemoveExclusions(IEnumerable files, IEnumerable exclusions) => + files.Where(item => !Utilities.IsFileExcluded(item, exclusions)); + + private static IEnumerable GetSdkDiffExclusionFilters(string sdkType) => + Utilities.ParseExclusionsFile("SdkFileDiffExclusions.txt", sdkType); + + private static IEnumerable GetSdkAssemblyVersionDiffExclusionFilters() => + Utilities.ParseExclusionsFile("SdkAssemblyVersionDiffExclusions.txt"); + + private static string RemoveDiffMarkers(string source) + { + Regex indexRegex = new("^index .*", RegexOptions.Multiline); + string result = indexRegex.Replace(source, "index ------------"); + + Regex diffSegmentRegex = new("^@@ .* @@", RegexOptions.Multiline); + return diffSegmentRegex.Replace(result, "@@ ------------ @@"); + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkTests.cs similarity index 66% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkTests.cs index 3c197262b..ba3381360 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkTests.cs @@ -7,16 +7,14 @@ using Xunit.Abstractions; namespace Microsoft.DotNet.SourceBuild.SmokeTests; /// -/// Shared base class for all smoke tests. +/// Shared base class for all SDK-based smoke tests. /// -public abstract class SmokeTests +public abstract class SdkTests : TestBase { internal DotNetHelper DotNetHelper { get; } - internal ITestOutputHelper OutputHelper { get; } - protected SmokeTests(ITestOutputHelper outputHelper) + protected SdkTests(ITestOutputHelper outputHelper) : base(outputHelper) { DotNetHelper = new DotNetHelper(outputHelper); - OutputHelper = outputHelper; } } diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs new file mode 100644 index 000000000..47b31214a --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using Xunit; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +/// +/// A Fact that will be skipped based on the specified environment variable's value. +/// +internal class SkippableFactAttribute : FactAttribute +{ + public SkippableFactAttribute(string envName, bool skipOnNullOrWhiteSpaceEnv = false, bool skipOnTrueEnv = false, string[] skipArchitectures = null) => + EvaluateSkips(skipOnNullOrWhiteSpaceEnv, skipOnTrueEnv, skipArchitectures, (skip) => Skip = skip, envName); + + public SkippableFactAttribute(string[] envNames, bool skipOnNullOrWhiteSpaceEnv = false, bool skipOnTrueEnv = false, string[] skipArchitectures = null) => + EvaluateSkips(skipOnNullOrWhiteSpaceEnv, skipOnTrueEnv, skipArchitectures, (skip) => Skip = skip, envNames); + + public static void EvaluateSkips(bool skipOnNullOrWhiteSpaceEnv, bool skipOnTrueEnv, string[] skipArchitectures, Action setSkip, params string[] envNames) + { + foreach (string envName in envNames) + { + string? envValue = Environment.GetEnvironmentVariable(envName); + + if (skipOnNullOrWhiteSpaceEnv && string.IsNullOrWhiteSpace(envValue)) + { + setSkip($"Skipping because `{envName}` is null or whitespace"); + break; + } + else if (skipOnTrueEnv && bool.TryParse(envValue, out bool boolValue) && boolValue) + { + setSkip($"Skipping because `{envName}` is set to True"); + break; + } + } + + if (skipArchitectures != null) { + string? arch = Config.TargetArchitecture; + if (skipArchitectures.Contains(arch)) + { + setSkip($"Skipping because arch is `{arch}`"); + } + } + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs similarity index 55% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs index 32a7179a1..6dd15c5e7 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs @@ -11,9 +11,9 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests; /// internal class SkippableTheoryAttribute : TheoryAttribute { - public SkippableTheoryAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) => - SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName); + public SkippableTheoryAttribute(string envName, bool skipOnNullOrWhiteSpaceEnv = false, bool skipOnTrueEnv = false, string[] skipArchitectures = null) => + SkippableFactAttribute.EvaluateSkips(skipOnNullOrWhiteSpaceEnv, skipOnTrueEnv, skipArchitectures, (skip) => Skip = skip, envName); - public SkippableTheoryAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) => - SkippableFactAttribute.CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames); + public SkippableTheoryAttribute(string[] envNames, bool skipOnNullOrWhiteSpaceEnv = false, bool skipOnTrueEnv = false, string[] skipArchitectures = null) => + SkippableFactAttribute.EvaluateSkips(skipOnNullOrWhiteSpaceEnv, skipOnTrueEnv, skipArchitectures, (skip) => Skip = skip, envNames); } diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourceBuiltArtifactsTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourceBuiltArtifactsTests.cs new file mode 100644 index 000000000..7d6278b80 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourceBuiltArtifactsTests.cs @@ -0,0 +1,68 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +public class SourceBuiltArtifactsTests : SdkTests +{ + public SourceBuiltArtifactsTests(ITestOutputHelper outputHelper) : base(outputHelper) { } + + [SkippableFact(Config.SourceBuiltArtifactsPathEnv, skipOnNullOrWhiteSpaceEnv: true)] + public void VerifyVersionFile() + { + Assert.NotNull(Config.SourceBuiltArtifactsPath); + string outputDir = Path.Combine(Directory.GetCurrentDirectory(), "sourcebuilt-artifacts"); + Directory.CreateDirectory(outputDir); + try + { + // Extract the .version file + Utilities.ExtractTarball(Config.SourceBuiltArtifactsPath, outputDir, ".version"); + + string[] versionLines = File.ReadAllLines(Path.Combine(outputDir, ".version")); + Assert.Equal(2, versionLines.Length); + + // Verify the commit SHA + + string commitSha = versionLines[0]; + OutputHelper.WriteLine($"Commit SHA: {commitSha}"); + Assert.Equal(40, commitSha.Length); + Assert.True(commitSha.All(c => char.IsLetterOrDigit(c))); + + // When running in CI, we should ensure that the commit SHA is not all zeros, which is the default + // value when no commit SHA is available. In a dev environment this will likely be all zeros but it's + // possible that it could be a valid commit SHA depending on the environment's configuration, so we + // only verify this in CI. + if (Config.RunningInCI) + { + Assert.False(commitSha.All(c => c == '0')); + } + + // Verify the SDK version + + string sdkVersion = versionLines[1]; + + // Find the expected SDK version by getting it from the SDK tarball + Utilities.ExtractTarball(Config.SdkTarballPath ?? string.Empty, outputDir, "./sdk/*/.version"); + DirectoryInfo sdkDir = new DirectoryInfo(Path.Combine(outputDir, "sdk")); + string sdkVersionPath = sdkDir.GetFiles(".version", SearchOption.AllDirectories).Single().FullName; + string[] sdkVersionLines = File.ReadAllLines(Path.Combine(outputDir, sdkVersionPath)); + string expectedSdkVersion = sdkVersionLines[3]; // Get the unique, non-stable, SDK version + + Assert.Equal(expectedSdkVersion, sdkVersion); + } + finally + { + Directory.Delete(outputDir, recursive: true); + } + } +} diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourcelinkTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourcelinkTests.cs new file mode 100644 index 000000000..0fc8735d9 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SourcelinkTests.cs @@ -0,0 +1,123 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +/// +/// Separate test collection for Sourcelink tests. This is needed due to intra-test parallelization, +/// which can cause less CPU time to be allocated to other tests. +/// This would make other tests run too long and fail due to timeouts. +/// +[CollectionDefinition(nameof(SourcelinkTestCollection), DisableParallelization = true)] +public class SourcelinkTestCollection { } + +[Collection(nameof(SourcelinkTestCollection))] +public class SourcelinkTests : SdkTests +{ + private static string SourcelinkRoot { get; } = Path.Combine(Directory.GetCurrentDirectory(), nameof(SourcelinkTests)); + + public SourcelinkTests(ITestOutputHelper outputHelper) : base(outputHelper) { } + + /// + /// Verifies that all symbols have valid sourcelinks. + /// + [SkippableFact(Config.SourceBuiltArtifactsPathEnv, skipOnNullOrWhiteSpaceEnv: true)] + public void VerifySourcelinks() + { + try + { + if (Directory.Exists(SourcelinkRoot)) + { + Directory.Delete(SourcelinkRoot, true); + } + Directory.CreateDirectory(SourcelinkRoot); + + string symbolsRoot = Directory.CreateDirectory(Path.Combine(SourcelinkRoot, "symbols")).FullName; + + // We are validating dotnet-symbols-all-*.tar.gz which contains all source-built symbols, including + // SDK-specific symbols that are also packaged in dotnet-symbols-sdk-*.tar.gz. + Utilities.ExtractTarball( + Utilities.GetFile(Path.GetDirectoryName(Config.SourceBuiltArtifactsPath), "dotnet-symbols-all-*.tar.gz"), + symbolsRoot, + OutputHelper); + + IList failedFiles = ValidateSymbols(symbolsRoot, InitializeSourcelinkTool()); + + if (failedFiles.Count > 0) + { + OutputHelper.WriteLine($"Sourcelink verification failed for the following files:"); + foreach (string file in failedFiles) + { + OutputHelper.WriteLine(file); + } + } + + Assert.True(failedFiles.Count == 0); + } + finally + { + Directory.Delete(SourcelinkRoot, true); + } + } + + /// + /// Initializes sourcelink tool. + /// Extracts the dotnet-sourcelink tool package from PSB arhive. + /// + /// Path to sourcelink tool binary. + private string InitializeSourcelinkTool() + { + Assert.NotNull(Config.SourceBuiltArtifactsPath); + + const string SourcelinkToolPackageNamePattern = "dotnet-sourcelink*nupkg"; + const string SourcelinkToolBinaryFilename = "dotnet-sourcelink.dll"; + + string toolPackageDir = Directory.CreateDirectory(Path.Combine(SourcelinkRoot, "sourcelink-tool")).FullName; + Utilities.ExtractTarball(Config.SourceBuiltArtifactsPath, toolPackageDir, SourcelinkToolPackageNamePattern); + + string extractedToolPath = Directory.CreateDirectory(Path.Combine(toolPackageDir, "extracted")).FullName; + Utilities.ExtractNupkg(Utilities.GetFile(toolPackageDir, SourcelinkToolPackageNamePattern), extractedToolPath); + + return Utilities.GetFile(extractedToolPath, SourcelinkToolBinaryFilename); + } + + private IList ValidateSymbols(string path, string sourcelinkToolPath) + { + Assert.True(Directory.Exists(path), $"Path, with symbol files to validate, does not exist: {path}"); + + var failedFiles = new ConcurrentBag(); + + IEnumerable allFiles = Directory.GetFiles(path, "*.pdb", SearchOption.AllDirectories); + Parallel.ForEach(allFiles, file => + { + (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess( + DotNetHelper.DotNetPath, + $"{sourcelinkToolPath} test --offline {file}", + OutputHelper, + logOutput: false, + excludeInfo: true, // Exclude info messages, as there can be 1,000+ processes + millisecondTimeout: 60000, + configureCallback: (process) => DotNetHelper.ConfigureProcess(process, null)); + + if (executeResult.Process.ExitCode != 0) + { + failedFiles.Add(file); + } + }); + + Assert.True(allFiles.Count() > 0, $"Did not find any symbols for sourcelink verification in {path}"); + + return failedFiles.ToList(); + } +} diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestBase.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestBase.cs new file mode 100644 index 000000000..963f07109 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestBase.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.IO; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +public abstract class TestBase +{ + public static string LogsDirectory { get; } = Path.Combine(Directory.GetCurrentDirectory(), "logs"); + + public ITestOutputHelper OutputHelper { get; } + + public TestBase(ITestOutputHelper outputHelper) + { + OutputHelper = outputHelper; + + if (!Directory.Exists(LogsDirectory)) + { + Directory.CreateDirectory(LogsDirectory); + } + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs similarity index 64% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs index 9249f53ef..eb7470f8e 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.IO; + namespace Microsoft.DotNet.SourceBuild.SmokeTests; public class TestScenario @@ -11,13 +14,15 @@ public class TestScenario public bool NoHttps { get; set; } = Config.TargetRid.Contains("osx"); public string ScenarioName { get; } public DotNetTemplate Template { get; } + public Action? Validate { get; } - public TestScenario(string scenarioName, DotNetLanguage language, DotNetTemplate template, DotNetActions commands = DotNetActions.None) + public TestScenario(string scenarioName, DotNetLanguage language, DotNetTemplate template, DotNetActions commands = DotNetActions.None, Action? validate = null) { ScenarioName = scenarioName; Template = template; Language = language; Commands = commands; + Validate = validate; } internal void Execute(DotNetHelper dotNetHelper) @@ -35,7 +40,7 @@ public class TestScenario { if (Template.IsAspNetCore()) { - dotNetHelper.ExecuteRunWeb(projectName); + dotNetHelper.ExecuteRunWeb(projectName, Template); } else { @@ -44,21 +49,28 @@ public class TestScenario } if (Commands.HasFlag(DotNetActions.Publish)) { - dotNetHelper.ExecutePublish(projectName); + dotNetHelper.ExecutePublish(projectName, Template); + } + if (Commands.HasFlag(DotNetActions.PublishSelfContained)) + { + dotNetHelper.ExecutePublish(projectName, Template, selfContained: true, rid: Config.TargetRid); } if (Commands.HasFlag(DotNetActions.PublishComplex)) { - dotNetHelper.ExecutePublish(projectName, selfContained: false); - dotNetHelper.ExecutePublish(projectName, selfContained: true, Config.TargetRid); - dotNetHelper.ExecutePublish(projectName, selfContained: true, $"linux-{Config.TargetArchitecture}"); + dotNetHelper.ExecutePublish(projectName, Template, selfContained: false); + dotNetHelper.ExecutePublish(projectName, Template, selfContained: true, rid: Config.TargetRid); + dotNetHelper.ExecutePublish(projectName, Template, selfContained: true, rid: $"linux-{Config.TargetArchitecture}"); } if (Commands.HasFlag(DotNetActions.PublishR2R)) { - dotNetHelper.ExecutePublish(projectName, selfContained: true, $"linux-{Config.TargetArchitecture}", trimmed: true, readyToRun: true); + dotNetHelper.ExecutePublish(projectName, Template, selfContained: true, rid: $"linux-{Config.TargetArchitecture}", trimmed: true, readyToRun: true); } if (Commands.HasFlag(DotNetActions.Test)) { dotNetHelper.ExecuteTest(projectName); } + + string projectPath = Path.Combine(DotNetHelper.ProjectsDirectory, projectName); + Validate?.Invoke(projectPath); } } diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs new file mode 100644 index 000000000..53efa2655 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs @@ -0,0 +1,162 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.Extensions.FileSystemGlobbing; +using System; +using System.Collections.Generic; +using System.Formats.Tar; +using System.IO; +using System.IO.Compression; +using System.IO.Enumeration; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.DotNet.SourceBuild.SmokeTests; + +public static class Utilities +{ + /// + /// Returns whether the given file path is excluded by the given exclusions using glob file matching. + /// + public static bool IsFileExcluded(string filePath, IEnumerable exclusions) => + GetMatchingFileExclusions(filePath, exclusions, exclusion => exclusion).Any(); + + public static IEnumerable GetMatchingFileExclusions(string filePath, IEnumerable exclusions, Func getExclusionExpression) => + exclusions.Where(exclusion => FileSystemName.MatchesSimpleExpression(getExclusionExpression(exclusion), filePath)); + + /// + /// Parses a common file format in the test suite for listing file exclusions. + /// + /// Name of the exclusions file. + /// When specified, filters the exclusions to those that begin with the prefix value. + public static IEnumerable ParseExclusionsFile(string exclusionsFileName, string? prefix = null) + { + string exclusionsFilePath = Path.Combine(BaselineHelper.GetAssetsDirectory(), exclusionsFileName); + int prefixSkip = prefix?.Length + 1 ?? 0; + return File.ReadAllLines(exclusionsFilePath) + // process only specific exclusions if a prefix is provided + .Where(line => prefix is null || line.StartsWith(prefix + ",")) + .Select(line => + { + // Ignore comments + var index = line.IndexOf('#'); + return index >= 0 ? line[prefixSkip..index].TrimEnd() : line[prefixSkip..]; + }) + .Where(line => !string.IsNullOrEmpty(line)) + .ToList(); + } + + public static void ExtractTarball(string tarballPath, string outputDir, ITestOutputHelper outputHelper) + { + // TarFile doesn't properly handle hard links (https://github.com/dotnet/runtime/pull/85378#discussion_r1221817490), + // use 'tar' instead. + ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"xzf {tarballPath} -C {outputDir}", outputHelper); + } + + public static void ExtractTarball(string tarballPath, string outputDir, string targetFilePath) + { + Matcher matcher = new(); + matcher.AddInclude(targetFilePath); + + using FileStream fileStream = File.OpenRead(tarballPath); + using GZipStream decompressorStream = new(fileStream, CompressionMode.Decompress); + using TarReader reader = new(decompressorStream); + + TarEntry entry; + while ((entry = reader.GetNextEntry()) is not null) + { + if (matcher.Match(entry.Name).HasMatches) + { + string outputPath = Path.Join(outputDir, entry.Name); + Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); + + using FileStream outputFileStream = File.Create(outputPath); + entry.DataStream.CopyTo(outputFileStream); + break; + } + } + } + + public static IEnumerable GetTarballContentNames(string tarballPath) + { + using FileStream fileStream = File.OpenRead(tarballPath); + using GZipStream decompressorStream = new(fileStream, CompressionMode.Decompress); + using TarReader reader = new(decompressorStream); + + TarEntry entry; + while ((entry = reader.GetNextEntry()) is not null) + { + yield return entry.Name; + } + } + + public static void ExtractNupkg(string package, string outputDir) + { + Directory.CreateDirectory(outputDir); + + using ZipArchive zip = ZipFile.OpenRead(package); + foreach (ZipArchiveEntry entry in zip.Entries) + { + string outputPath = Path.Combine(outputDir, entry.FullName); + Directory.CreateDirectory(Path.GetDirectoryName(outputPath)); + entry.ExtractToFile(outputPath); + } + } + + public static async Task RetryAsync(Func executor, ITestOutputHelper outputHelper) + { + await Utilities.RetryAsync( + async () => + { + try + { + await executor(); + return null; + } + catch (Exception e) + { + return e; + } + }, + outputHelper); + } + + private static async Task RetryAsync(Func> executor, ITestOutputHelper outputHelper) + { + const int maxRetries = 5; + const int waitFactor = 5; + + int retryCount = 0; + + Exception? exception = await executor(); + while (exception != null) + { + retryCount++; + if (retryCount >= maxRetries) + { + throw new InvalidOperationException($"Failed after {retryCount} retries.", exception); + } + + int waitTime = Convert.ToInt32(Math.Pow(waitFactor, retryCount - 1)); + if (outputHelper != null) + { + outputHelper.WriteLine($"Retry {retryCount}/{maxRetries}, retrying in {waitTime} seconds..."); + } + + Thread.Sleep(TimeSpan.FromSeconds(waitTime)); + exception = await executor(); + } + } + + public static string GetFile(string path, string pattern) + { + string[] files = Directory.GetFiles(path, pattern, SearchOption.AllDirectories); + Assert.False(files.Length > 1, $"Found multiple files matching the pattern {pattern}: {Environment.NewLine}{string.Join(Environment.NewLine, files)}"); + Assert.False(files.Length == 0, $"Did not find any files matching the pattern {pattern}"); + return files[0]; + } +} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs similarity index 61% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs index 56d0368f3..3d6e9b23c 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs @@ -3,7 +3,9 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Text.Json.Nodes; using Xunit; using Xunit.Abstractions; @@ -14,7 +16,7 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests; /// for related basic scenarios. /// They are encapsulated in a separate testclass so that they can be run in parallel. /// -public class WebScenarioTests : SmokeTests +public class WebScenarioTests : SdkTests { public WebScenarioTests(ITestOutputHelper outputHelper) : base(outputHelper) { } @@ -22,21 +24,34 @@ public class WebScenarioTests : SmokeTests [MemberData(nameof(GetScenarioObjects))] public void VerifyScenario(TestScenario scenario) => scenario.Execute(DotNetHelper); - private static IEnumerable GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario }); + public static IEnumerable GetScenarioObjects() => GetScenarios().Select(scenario => new object[] { scenario }); private static IEnumerable GetScenarios() { foreach (DotNetLanguage language in new[] { DotNetLanguage.CSharp, DotNetLanguage.FSharp }) { - yield return new(nameof(WebScenarioTests), language, DotNetTemplate.Web, DotNetActions.Build | DotNetActions.Run | DotNetActions.PublishComplex); + yield return new(nameof(WebScenarioTests), language, DotNetTemplate.Web, DotNetActions.Build | DotNetActions.Run | (DotNetHelper.ShouldPublishComplex() ? DotNetActions.None : DotNetActions.PublishComplex)); yield return new(nameof(WebScenarioTests), language, DotNetTemplate.Mvc, DotNetActions.Build | DotNetActions.Run | DotNetActions.Publish) { NoHttps = true }; yield return new(nameof(WebScenarioTests), language, DotNetTemplate.WebApi, DotNetActions.Build | DotNetActions.Run | DotNetActions.Publish); } yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.Razor, DotNetActions.Build | DotNetActions.Run | DotNetActions.Publish); yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.BlazorWasm, DotNetActions.Build | DotNetActions.Run | DotNetActions.Publish); - yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.BlazorServer, DotNetActions.Build | DotNetActions.Run | DotNetActions.Publish); + yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.WebApp, DotNetActions.PublishSelfContained, VerifyRuntimePacksForSelfContained); yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.Worker); - yield return new(nameof(WebScenarioTests), DotNetLanguage.CSharp, DotNetTemplate.Angular); + } + + private static void VerifyRuntimePacksForSelfContained(string projectPath) + { + // 'expectedPackageFiles' key in project.nuget.cache' will contain paths to restored packages + // Since we are publishing an emtpy template, the only packages that could end up there are the ref packs we are after + + string projNugetCachePath = Path.Combine(projectPath, "obj", "project.nuget.cache"); + + JsonNode? projNugetCache = JsonNode.Parse(File.ReadAllText(projNugetCachePath)); + string? restoredPackageFiles = projNugetCache?["expectedPackageFiles"]?.ToString(); + + Assert.True(restoredPackageFiles is not null, "Failed to parse project.nuget.cache"); + Assert.True("[]" == restoredPackageFiles, "Runtime packs were retrieved from NuGet instead of the SDK"); } } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt new file mode 100644 index 000000000..4c044d907 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseExclusions.txt @@ -0,0 +1,259 @@ +# Contains the list of files to be excluded from license scanning. +# +# This list is processed using FileSystemName.MatchesSimpleExpression +# +# Format: +# Exclude the file entirely from license scanning: +# +# Exclude a specific detected license expression from the scan results for the file: +# |[,...] + +# +# arcade +# + +# False positive +src/arcade/Documentation/UnifiedBuild/Foundational-Concepts.md +src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/src/BuildFPMToolPreReqs.cs|json +src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/rpm_templates/copyright|cecill-c +src/arcade/src/SignCheck/SignCheck/THIRD-PARTY-NOTICES.TXT + +# Doesn't apply to code +src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Licenses/* + +# Applies to installer, not source +src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/eula.rtf + +# +# aspnetcore +# + +# A generic statement about license applicability that is being detected as "unknown" +src/aspnetcore/src/Components/THIRD-PARTY-NOTICES.txt|unknown +src/aspnetcore/THIRD-PARTY-NOTICES.txt|unknown + +# Windows installer files that have a reference to a URL for license +src/aspnetcore/src/Installers/Windows/**/*.wxl|unknown-license-reference +src/aspnetcore/src/Installers/Windows/**/*.wxs|unknown-license-reference + +# License reference used in configuration, but not applying to code +src/aspnetcore/src/Mvc/Settings.StyleCop|unknown-license-reference +src/aspnetcore/src/submodules/MessagePack-CSharp/stylecop.json|unknown + +# +# command-line-api +# + +# False positive +src/command-line-api/System.CommandLine.sln|json + +# +# deployment-tools +# + +# False positive +src/deployment-tools/THIRD-PARTY-NOTICES.TXT|unknown-license-reference + +# +# diagnostics +# + +# False positive +src/diagnostics/THIRD-PARTY-NOTICES.TXT|codesourcery-2004 + +# +# format +# + +# False positive +src/format/THIRD-PARTY-NOTICES.TXT|unknown-license-reference + +# +# fsharp +# + +# False positive +src/fsharp/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fs|unknown-license-reference +src/fsharp/tests/service/data/TestTP/ProvidedTypes.fs|unknown-license-reference +src/fsharp/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs|unknown-license-reference + +# Applies to installer, not source +src/fsharp/setup/resources/eula/*.rtf + +# +# installer +# + +# False positive +src/installer/src/core-sdk-tasks/BuildFPMToolPreReqs.cs|json +src/installer/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html|cecill-c +src/installer/THIRD-PARTY-NOTICES|proprietary-license + +# Configuration, doesn't apply to source directly +src/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt +src/installer/src/redist/targets/packaging/**/*.json + +# +# msbuild +# + +# License reference used in build configuration, but not applying to code +src/msbuild/src/Directory.Build.props|ms-net-library-2018-11 + +# False positive +src/msbuild/src/Build/Instance/ProjectItemInstance.cs|generic-exception + +# +# nuget-client +# + +# False positive +src/nuget-client/build/NOTICES.txt|other-copyleft +src/nuget-client/README.md|unknown-license-reference +src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.UI/Resources.Designer.cs|unknown-license-reference +src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.UI/Actions/UIActionEngine.cs|unknown-license-reference +src/nuget-client/src/NuGet.Clients/NuGet.PackageManagement.VisualStudio/Services/NuGetPackageFileService.cs|proprietary-license +src/nuget-client/src/NuGet.Clients/NuGet.VisualStudio.Internal.Contracts/Formatters/LicenseMetadataFormatter.cs|proprietary-license +src/nuget-client/src/NuGet.Core/NuGet.Packaging/PackageCreation/Authoring/LicenseMetadata.cs|unknown-license-reference +src/nuget-client/src/NuGet.Core/NuGet.Packaging/Rules/DefaultManifestValuesRule.cs|unknown-license-reference +src/nuget-client/test/TestExtensions/GenerateLicenseList/Program.cs|json + +# Test data +src/nuget-client/test/**/resources/*.json +src/nuget-client/test/**/resources/*.xml +src/nuget-client/test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/PackageLicenseUtilitiesTests.cs +src/nuget-client/test/NuGet.Core.Tests/NuGet.Packaging.Test/DefaultManifestValuesRuleTests.cs +src/nuget-client/test/NuGet.Core.Tests/NuGet.Packaging.Test/LicensesTests/LicenseExpressionTokenizerTests.cs +src/nuget-client/test/NuGet.Core.Tests/NuGet.Packaging.Test/LicensesTests/NuGetLicenseExpressionParserTests.cs +src/nuget-client/test/NuGet.Core.Tests/NuGet.Packaging.Test/LicensesTests/NuGetLicenseTests.cs +src/nuget-client/test/TestUtilities/Test.Utility/JsonData.cs + +# +# roslyn-analyzers +# + +# Build asset, not applicable to source +src/roslyn-analyzers/assets/EULA.txt|ms-net-library + +# +# roslyn +# + +# Test data +src/roslyn/src/Analyzers/VisualBasic/Tests/FileHeaders/FileHeaderTests.vb|unknown-license-reference +src/roslyn/src/EditorFeatures/CSharpTest2/EmbeddedLanguages/RegularExpressions/Regex_RealWorldPatterns.json + +# False positive +src/roslyn/src/Compilers/**/Portable/Symbols/NonMissingModuleSymbol.*|proprietary-license +src/roslyn/src/NuGet/ThirdPartyNotices.rtf|json + +# Applicable to installer, not source +src/roslyn/src/Setup/Roslyn.ThirdPartyNotices/ThirdPartyNotices.rtf +src/roslyn/src/Setup/Roslyn.VsixLicense/EULA.rtf + +# +# runtime +# + +# Doc describing licenses, not applicable to source +src/runtime/docs/project/copyright.md +src/runtime/docs/project/glossary.md + +# Doc that references a license, not applicable to source +src/runtime/src/coreclr/nativeaot/docs/compiling.md|openssl-ssleay + +# Installer asset, not applicable to source +src/runtime/src/installer/pkg/LICENSE-MSFT.TXT +src/runtime/src/installer/pkg/THIRD-PARTY-NOTICES.TXT + +# False positive +src/runtime/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/LicFileLicenseProvider.cs|proprietary-license +src/runtime/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/LongValidatorTest.cs|embedthis-extension +src/runtime/src/libraries/System.Net.Sockets/tests/FunctionalTests/Connect.cs|other-permissive +src/runtime/src/libraries/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs|other-permissive +src/runtime/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs|other-permissive +src/runtime/src/libraries/System.Reflection.Metadata/tests/Resources/README.md|unknown-license-reference +src/runtime/src/libraries/System.Runtime/tests/TestModule/README.md|unknown-license-reference +src/runtime/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlLicenseTransform.cs|proprietary-license +src/runtime/src/libraries/System.ServiceModel.Syndication/tests/BasicScenarioTests.cs|unknown-license-reference +src/runtime/src/mono/mono/mini/mini-posix.c|unknown-license-reference +src/runtime/src/mono/mono/mini/mini-windows.c|unknown-license-reference +src/runtime/src/native/external/libunwind/doc/libunwind-ia64.*|generic-exception +src/runtime/src/tests/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs|unknown-license-reference + +# Test data +src/runtime/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/InputSpace.cs|other-permissive +src/runtime/src/libraries/System.Private.Xml.Linq/tests/XDocument.Common/THIRD-PARTY-NOTICE|other-permissive +src/runtime/src/libraries/System.ServiceModel.Syndication/tests/TestFeeds/AtomFeeds/*.xml +src/runtime/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/AttRegexTests.cs|other-permissive + +# Reference to a license, not applicable to source +src/runtime/src/libraries/System.Text.Json/roadmap/images/core-components.txt|unknown-license-reference +src/runtime/src/libraries/System.Text.Json/roadmap/images/higher-level-components.txt + +# Sample data +src/runtime/src/mono/sample/wasm/browser-webpack/package-lock.json + +# +# source-build-externals +# + +# False positive +src/source-build-externals/src/abstractions-xunit/README.md|free-unknown +src/source-build-externals/src/application-insights/NETCORE/ThirdPartyNotices.txt|unknown +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/benchmark/Microsoft.IdentityModel.Benchmarks/CreateTokenTests.cs|proprietary-license +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.JsonWebTokens/JsonClaimValueTypes.cs|proprietary-license +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.Tokens.Saml/Saml/ClaimProperties.cs|proprietary-license +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.Tokens.Saml/Saml/SamlTokenUtilities.cs|proprietary-license +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/src/Microsoft.IdentityModel.Tokens.Saml/Saml2/ClaimProperties.cs|proprietary-license +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/src/System.IdentityModel.Tokens.Jwt/JsonClaimValueTypes.cs|proprietary-license +src/source-build-externals/src/humanizer/readme.md|free-unknown +src/source-build-externals/src/humanizer/NuSpecs/*.nuspec* +src/source-build-externals/src/xunit/README.md|free-unknown +src/source-build-externals/src/xunit/src/xunit.assert/Asserts/README.md|free-unknown +src/source-build-externals/src/xunit/xunit.sln|json + +# A patch which removes the license usage but contains references to the removed license as part of the patch reference lines +src/source-build-externals/patches/application-insights/0002-Remove-WebGrease-from-TPN-2816.patch + +# +# source-build-reference-packages +# + +# False positive +src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.netcore.app.ref/3.*/THIRD-PARTY-NOTICES.TXT|codesourcery-2004 +src/source-build-reference-packages/src/targetPacks/ILsrc/netstandard.library/1.6.1/ThirdPartyNotices.txt|unknown-license-reference +src/source-build-reference-packages/src/targetPacks/ILsrc/netstandard.library/2.0.*/THIRD-PARTY-NOTICES.TXT|unknown-license-reference +src/source-build-reference-packages/src/targetPacks/ILsrc/netstandard.library.ref/2.1.0/THIRD-PARTY-NOTICES.TXT|codesourcery-2004 +src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.codeanalysis.collections/4.2.0-1.22102.8/ThirdPartyNotices.rtf|json +src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.netcore.*/1.*/ThirdPartyNotices.txt|unknown-license-reference +src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.private.intellisense/8.0.*/IntellisenseFiles/*/1033/System.Security.Permissions.xml|unknown-license-reference + +# Contains references to licenses which are not applicable to the source +src/source-build-reference-packages/src/packageSourceGenerator/PackageSourceGeneratorTask/RewriteNuspec.cs|unknown-license-reference,ms-net-library-2018-11 +src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.private.intellisense/8.0.*/IntellisenseFiles/windowsdesktop/1033/PresentationCore.xml|proprietary-license + +# +# sourcelink +# + +# False positive +src/sourcelink/docs/GitSpec/GitSpec.md|unknown-license-reference + +# +# test-templates +# + +# Not applicable to source +src/test-templates/Templates/**/*.vstemplate + +# +# vstest +# + +# False positive +src/vstest/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpArgsBuilder.cs|proprietary-license + +# Build asset, but not applying to code +src/vstest/src/package/Microsoft.CodeCoverage/ThirdPartyNoticesCodeCoverage.txt +src/vstest/src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/License.rtf diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkAssemblyVersionDiffExclusions.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkAssemblyVersionDiffExclusions.txt new file mode 100644 index 000000000..e5b4aa4e7 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkAssemblyVersionDiffExclusions.txt @@ -0,0 +1,42 @@ +# Contains the list of files whose assembly versions are to be excluded from comparison between the MSFT & SB SDK. +# These exclusions only take effect if the assembly version of the file in the SB SDK is equal to or greater than +# the version in the MSFT SDK. If the version is less, the file will show up in the results as this is not a scenario +# that is valid for shipping. +# +# This list is processed using FileSystemName.MatchesSimpleExpression +# +# Examples +# 'folder/*' matches 'folder/' and 'folder/abc' +# 'folder/?*' matches 'folder/abc' but not 'folder/' +# +# We do not want to filter-out folder entries, therefore, we should use: '?*' and not just '*' + +# Referenced 6.0/7.0 assemblies (https://github.com/dotnet/sdk/issues/34245) +./sdk/x.y.z/Containers/tasks/netx.y/runtimes/win/lib/netx.y/?* +./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.* +./sdk/x.y.z/Microsoft.Extensions.FileProviders.Abstractions.dll +./sdk/x.y.z/Microsoft.Extensions.FileSystemGlobbing.dll +./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/source-generators/System.Collections.Immutable.dll +./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/**/Microsoft.Extensions.ObjectPool.dll +./sdk/**/System.Configuration.ConfigurationManager.dll +./sdk/**/System.Diagnostics.EventLog*.dll +./sdk/**/System.Reflection.MetadataLoadContext.dll +./sdk/**/System.Security.Cryptography.Pkcs.dll +./sdk/**/System.Security.Cryptography.ProtectedData.dll +./sdk/x.y.z/System.Security.Cryptography.Xml.dll + +# These assemblies are lifted to a higher version naturally via SB +./sdk/x.y.z/DotnetTools/dotnet-format/dotnet-format.dll +./sdk/x.y.z/DotnetTools/dotnet-format/*/dotnet-format.resources.dll +./sdk/x.y.z/DotnetTools/dotnet-format/*/Microsoft.CodeAnalysis.* +./sdk/x.y.z/DotnetTools/dotnet-format/Humanizer.dll +./sdk/x.y.z/DotnetTools/dotnet-format/Microsoft.Build.Locator.dll +./sdk/x.y.z/DotnetTools/dotnet-format/Microsoft.CodeAnalysis.* +./sdk/x.y.z/DotnetTools/dotnet-format/Microsoft.DiaSymReader.dll +./sdk/x.y.z/DotnetTools/dotnet-format/System.Composition.* +./sdk/x.y.z/DotnetTools/dotnet-format/System.IO.Pipelines.dll +./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Humanizer.dll +./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Microsoft.Build.Locator.dll +./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Microsoft.CodeAnalysis.AnalyzerUtilities.dll +./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Microsoft.DiaSymReader.dll +./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/source-generators/Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkFileDiffExclusions.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkFileDiffExclusions.txt new file mode 100644 index 000000000..6cf694f75 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkFileDiffExclusions.txt @@ -0,0 +1,99 @@ +# This list is processed using FileSystemName.MatchesSimpleExpression +# +# Format +# {msft|sb}, [# comment] +# msft = Microsoft built SDK +# sb = source-built SDK +# +# Examples +# 'folder/*' matches 'folder/' and 'folder/abc' +# 'folder/?*' matches 'folder/abc' but not 'folder/' +# +# We do not want to filter-out folder entries, therefore, we should use: '?*' and not just '*' + +msft,./sdk/x.y.z/TestHostNetFramework/?* # Intentional - MSFT build includes test-host that targets netcoreapp3.1 +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WindowsDesktop/?* # Intentional - explicitly excluded from source-build + +# netfx tooling and tasks, not building in source-build - https://github.com/dotnet/source-build/issues/3514 +msft,./sdk/x.y.z/Sdks/Microsoft.Build.Tasks.Git/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.StaticWebAssets/tasks/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web.ProjectSystem/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.SourceLink.AzureRepos.Git/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.SourceLink.Bitbucket.Git/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.SourceLink.Common/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.SourceLink.GitHub/tools/net472/* +msft,./sdk/x.y.z/Sdks/Microsoft.SourceLink.GitLab/tools/net472/* + +# vstest localization is disabled in Linux builds - https://github.com/dotnet/source-build/issues/3517 +msft,./sdk/x.y.z/*?/Microsoft.CodeCoverage.IO.resources.dll + +# nuget localization is not available for Linux builds - https://github.com/NuGet/Home/issues/12440 +msft,./sdk/x.y.z/*?/NuGet.*?.resources.dll +msft,./sdk/x.y.z/*?/Microsoft.Build.NuGetSdkResolver.resources.dll +msft,./sdk/x.y.z/*?/Test.Utility.resources.dll + +# ILMerge is not supported in Linux builds - excluding the whole NuGet.Build.Tasks.Pack directory, to avoid a noisy diff +msft,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*? +sb,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*? + +# missing workload manifests - https://github.com/dotnet/source-build/issues/3242 +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.android/* +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.ios/* +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.maccatalyst/* +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.macos/* +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.maui/* +msft,./sdk-manifests/x.y.z/microsoft.net.sdk.tvos/* + +# linux runtimes are included in source-build for self-contained apps - https://github.com/dotnet/source-build/issues/3507 +sb,./packs/Microsoft.AspNetCore.App.Runtime.*/* +sb,./packs/Microsoft.NETCore.App.Runtime.*/* + +# netfx tooling - dumpminitool - https://github.com/dotnet/source-build/issues/3289 +msft,./sdk/x.y.z/Extensions/dump/* + +# https://github.com/dotnet/msbuild/issues/9213 +msft,./sdk/x.y.z/**/System.Windows.Extensions.dll +msft,./sdk/x.y.z/**/System.Security.Permissions.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Diagnostics.EventLog.dll + +# netfx runtimes for dotnet-watch - https://github.com/dotnet/source-build/issues/3285 +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Microsoft.CodeAnalysis.Elfie.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/Microsoft.Win32.SystemEvents.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/* +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Configuration.ConfigurationManager.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Drawing.Common.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Security.Cryptography.ProtectedData.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Security.Permissions.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Windows.Extensions.dll + +# netfx runtimes for dotnet-format - https://github.com/dotnet/source-build/issues/3509 +msft,./sdk/x.y.z/DotnetTools/dotnet-format/Microsoft.CodeAnalysis.Elfie.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/Microsoft.Win32.SystemEvents.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/* +msft,./sdk/x.y.z/DotnetTools/dotnet-format/System.Configuration.ConfigurationManager.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/System.Drawing.Common.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/System.Security.Cryptography.ProtectedData.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/System.Security.Permissions.dll +msft,./sdk/x.y.z/DotnetTools/dotnet-format/System.Windows.Extensions.dll + +# netfx runtimes for fsharp - https://github.com/dotnet/source-build/issues/3290 +msft,./sdk/x.y.z/FSharp/Microsoft.VisualStudio.Setup.Configuration.Interop.dll +msft,./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/Microsoft.Win32.SystemEvents.dll +msft,./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/System.Drawing.Common.dll +msft,./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/System.Security.Cryptography.ProtectedData.dll + +# windows components - https://github.com/dotnet/source-build/issues/3526 +msft,./sdk/x.y.z/runtimes/win/lib/netx.y/Microsoft.Win32.SystemEvents.dll +msft,./sdk/x.y.z/runtimes/win/lib/netx.y/System.Drawing.Common.dll + +# runtime components in roslyn layout - https://github.com/dotnet/source-build/issues/3286 +# Expected - build is filtering components present in target platform. +msft,./sdk/x.y.z/Roslyn/bincore/System.Collections.Immutable.dll +msft,./sdk/x.y.z/Roslyn/bincore/System.Reflection.Metadata.dll diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkAssemblyVersions.diff b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkAssemblyVersions.diff new file mode 100644 index 000000000..e69de29bb diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff new file mode 100644 index 000000000..4c2d7775b --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdkFiles.diff @@ -0,0 +1,304 @@ +diff --git a/msftSdkFiles.txt b/sbSdkFiles.txt +index ------------ +--- a/msftSdkFiles.txt ++++ b/sbSdkFiles.txt +@@ ------------ @@ + ./host/fxr/x.y.z/ + ./host/fxr/x.y.z/libhostfxr.so + ./LICENSE.txt ++./metadata/ ++./metadata/workloads/ ++./metadata/workloads/x.y.z/ ++./metadata/workloads/x.y.z/userlocal + ./packs/ + ./packs/Microsoft.AspNetCore.App.Ref/ + ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ +@@ ------------ @@ + ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.Cryptography.Xml.xml + ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Threading.RateLimiting.dll + ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Threading.RateLimiting.xml +-./packs/Microsoft.NETCore.App.Host.portable-rid/ +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/ +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/ +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/ +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/ +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/apphost +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/coreclr_delegates.h +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/hostfxr.h +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.a +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.so +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/nethost.h +-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/singlefilehost ++./packs/Microsoft.NETCore.App.Host.banana-rid/ ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/ ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/ ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/ ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/ ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/apphost ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/coreclr_delegates.h ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/hostfxr.h ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.a ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.so ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/nethost.h ++./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/singlefilehost + ./packs/Microsoft.NETCore.App.Ref/ + ./packs/Microsoft.NETCore.App.Ref/x.y.z/ + ./packs/Microsoft.NETCore.App.Ref/x.y.z/analyzers/ +@@ ------------ @@ + ./sdk/x.y.z/.version + ./sdk/x.y.z/AppHostTemplate/ + ./sdk/x.y.z/AppHostTemplate/apphost +-./sdk/x.y.z/containerize.deps.json +-./sdk/x.y.z/containerize.exe +-./sdk/x.y.z/containerize.runtimeconfig.json + ./sdk/x.y.z/Containers/ + ./sdk/x.y.z/Containers/build/ + ./sdk/x.y.z/Containers/build/Microsoft.NET.Build.Containers.props + ./sdk/x.y.z/Containers/build/Microsoft.NET.Build.Containers.targets +-./sdk/x.y.z/Containers/containerize/ +-./sdk/x.y.z/Containers/containerize/containerize.deps.json +-./sdk/x.y.z/Containers/containerize/containerize.dll +-./sdk/x.y.z/Containers/containerize/containerize.exe +-./sdk/x.y.z/Containers/containerize/containerize.runtimeconfig.json +-./sdk/x.y.z/Containers/containerize/cs/ +-./sdk/x.y.z/Containers/containerize/cs/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/cs/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/cs/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/de/ +-./sdk/x.y.z/Containers/containerize/de/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/de/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/de/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/es/ +-./sdk/x.y.z/Containers/containerize/es/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/es/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/es/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/fr/ +-./sdk/x.y.z/Containers/containerize/fr/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/fr/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/fr/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/it/ +-./sdk/x.y.z/Containers/containerize/it/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/it/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/it/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/ja/ +-./sdk/x.y.z/Containers/containerize/ja/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/ja/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/ja/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/ko/ +-./sdk/x.y.z/Containers/containerize/ko/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/ko/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/ko/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Build.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Build.Framework.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Build.Utilities.Core.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.DotNet.Cli.Utils.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Configuration.Abstractions.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Configuration.Binder.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Configuration.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.DependencyInjection.Abstractions.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.DependencyInjection.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.DependencyModel.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Logging.Abstractions.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Logging.Configuration.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Logging.Console.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Logging.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Options.ConfigurationExtensions.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Options.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.Extensions.Primitives.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.NET.Build.Containers.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.NET.StringTools.dll +-./sdk/x.y.z/Containers/containerize/Microsoft.VisualStudio.Setup.Configuration.Interop.dll +-./sdk/x.y.z/Containers/containerize/MSBuild.dll +-./sdk/x.y.z/Containers/containerize/Newtonsoft.Json.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Common.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Configuration.dll +-./sdk/x.y.z/Containers/containerize/NuGet.DependencyResolver.Core.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Frameworks.dll +-./sdk/x.y.z/Containers/containerize/NuGet.LibraryModel.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Packaging.Core.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Packaging.dll +-./sdk/x.y.z/Containers/containerize/NuGet.ProjectModel.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Protocol.dll +-./sdk/x.y.z/Containers/containerize/NuGet.Versioning.dll +-./sdk/x.y.z/Containers/containerize/pl/ +-./sdk/x.y.z/Containers/containerize/pl/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/pl/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/pl/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/pt-BR/ +-./sdk/x.y.z/Containers/containerize/pt-BR/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/pt-BR/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/pt-BR/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/ru/ +-./sdk/x.y.z/Containers/containerize/ru/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/ru/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/ru/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/runtimes/ +-./sdk/x.y.z/Containers/containerize/runtimes/win/ +-./sdk/x.y.z/Containers/containerize/runtimes/win/lib/ +-./sdk/x.y.z/Containers/containerize/runtimes/win/lib/netx.y/ +-./sdk/x.y.z/Containers/containerize/runtimes/win/lib/netx.y/System.Diagnostics.EventLog.dll +-./sdk/x.y.z/Containers/containerize/runtimes/win/lib/netx.y/System.Diagnostics.EventLog.Messages.dll +-./sdk/x.y.z/Containers/containerize/runtimes/win/lib/netx.y/System.Security.Cryptography.Pkcs.dll +-./sdk/x.y.z/Containers/containerize/System.CommandLine.dll +-./sdk/x.y.z/Containers/containerize/System.Configuration.ConfigurationManager.dll +-./sdk/x.y.z/Containers/containerize/System.Diagnostics.EventLog.dll +-./sdk/x.y.z/Containers/containerize/System.Reflection.MetadataLoadContext.dll +-./sdk/x.y.z/Containers/containerize/System.Security.Cryptography.Pkcs.dll +-./sdk/x.y.z/Containers/containerize/System.Security.Cryptography.ProtectedData.dll +-./sdk/x.y.z/Containers/containerize/tr/ +-./sdk/x.y.z/Containers/containerize/tr/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/tr/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/tr/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/Valleysoft.DockerCredsProvider.dll +-./sdk/x.y.z/Containers/containerize/zh-Hans/ +-./sdk/x.y.z/Containers/containerize/zh-Hans/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/zh-Hans/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/zh-Hans/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/containerize/zh-Hant/ +-./sdk/x.y.z/Containers/containerize/zh-Hant/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/containerize/zh-Hant/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/containerize/zh-Hant/System.CommandLine.resources.dll + ./sdk/x.y.z/Containers/tasks/ +-./sdk/x.y.z/Containers/tasks/net472/ +-./sdk/x.y.z/Containers/tasks/net472/cs/ +-./sdk/x.y.z/Containers/tasks/net472/cs/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/cs/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/cs/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/de/ +-./sdk/x.y.z/Containers/tasks/net472/de/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/de/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/de/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/es/ +-./sdk/x.y.z/Containers/tasks/net472/es/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/es/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/es/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/fr/ +-./sdk/x.y.z/Containers/tasks/net472/fr/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/fr/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/fr/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/it/ +-./sdk/x.y.z/Containers/tasks/net472/it/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/it/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/it/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ja/ +-./sdk/x.y.z/Containers/tasks/net472/ja/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ja/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ja/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ko/ +-./sdk/x.y.z/Containers/tasks/net472/ko/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ko/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ko/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Bcl.AsyncInterfaces.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Build.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Build.Framework.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.DotNet.Cli.Utils.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.DotNet.Cli.Utils.dll.config +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.DependencyInjection.Abstractions.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.DependencyInjection.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.DependencyModel.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.Logging.Abstractions.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.Logging.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.Options.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.Extensions.Primitives.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.IO.Redist.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.NET.Build.Containers.deps.json +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.NET.Build.Containers.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.NET.Build.Containers.dll.config +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.NET.StringTools.dll +-./sdk/x.y.z/Containers/tasks/net472/Microsoft.VisualStudio.Setup.Configuration.Interop.dll +-./sdk/x.y.z/Containers/tasks/net472/Newtonsoft.Json.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Common.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Configuration.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.DependencyResolver.Core.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Frameworks.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.LibraryModel.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Packaging.Core.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Packaging.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.ProjectModel.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Protocol.dll +-./sdk/x.y.z/Containers/tasks/net472/NuGet.Versioning.dll +-./sdk/x.y.z/Containers/tasks/net472/pl/ +-./sdk/x.y.z/Containers/tasks/net472/pl/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/pl/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/pl/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/pt-BR/ +-./sdk/x.y.z/Containers/tasks/net472/pt-BR/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/pt-BR/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/pt-BR/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ru/ +-./sdk/x.y.z/Containers/tasks/net472/ru/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ru/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/ru/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Buffers.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Collections.Immutable.dll +-./sdk/x.y.z/Containers/tasks/net472/System.CommandLine.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Configuration.ConfigurationManager.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Diagnostics.DiagnosticSource.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Memory.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Numerics.Vectors.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Reflection.Metadata.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Reflection.MetadataLoadContext.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Runtime.CompilerServices.Unsafe.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Security.AccessControl.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Security.Principal.Windows.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Text.Encodings.Web.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Text.Json.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Threading.Tasks.Dataflow.dll +-./sdk/x.y.z/Containers/tasks/net472/System.Threading.Tasks.Extensions.dll +-./sdk/x.y.z/Containers/tasks/net472/System.ValueTuple.dll +-./sdk/x.y.z/Containers/tasks/net472/tr/ +-./sdk/x.y.z/Containers/tasks/net472/tr/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/tr/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/tr/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/Valleysoft.DockerCredsProvider.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hans/ +-./sdk/x.y.z/Containers/tasks/net472/zh-Hans/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hans/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hans/System.CommandLine.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hant/ +-./sdk/x.y.z/Containers/tasks/net472/zh-Hant/Microsoft.DotNet.Cli.Utils.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hant/Microsoft.NET.Build.Containers.resources.dll +-./sdk/x.y.z/Containers/tasks/net472/zh-Hant/System.CommandLine.resources.dll + ./sdk/x.y.z/Containers/tasks/netx.y/ + ./sdk/x.y.z/Containers/tasks/netx.y/cs/ + ./sdk/x.y.z/Containers/tasks/netx.y/cs/Microsoft.DotNet.Cli.Utils.resources.dll +@@ ------------ @@ + ./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.NET.Build.Containers.deps.json + ./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.NET.Build.Containers.dll + ./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.NET.StringTools.dll +-./sdk/x.y.z/Containers/tasks/netx.y/Microsoft.VisualStudio.Setup.Configuration.Interop.dll + ./sdk/x.y.z/Containers/tasks/netx.y/MSBuild.dll + ./sdk/x.y.z/Containers/tasks/netx.y/Newtonsoft.Json.dll + ./sdk/x.y.z/Containers/tasks/netx.y/NuGet.Common.dll +@@ ------------ @@ + ./sdk/x.y.z/Microsoft.Build.NuGetSdkResolver.dll + ./sdk/x.y.z/Microsoft.Build.Tasks.Core.dll + ./sdk/x.y.z/Microsoft.Build.Utilities.Core.dll +-./sdk/x.y.z/Microsoft.CodeCoverage.IO.dll + ./sdk/x.y.z/Microsoft.Common.CrossTargeting.targets + ./sdk/x.y.z/Microsoft.Common.CurrentVersion.targets + ./sdk/x.y.z/Microsoft.Common.overridetasks +@@ ------------ @@ + ./sdk/x.y.z/Microsoft.VisualBasic.CrossTargeting.targets + ./sdk/x.y.z/Microsoft.VisualBasic.CurrentVersion.targets + ./sdk/x.y.z/Microsoft.VisualBasic.targets +-./sdk/x.y.z/Microsoft.VisualStudio.Setup.Configuration.Interop.dll + ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Client.dll + ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Common.dll + ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll +@@ ------------ @@ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/tools/ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/tools/netx.y/ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WebAssembly/tools/netx.y/Microsoft.NET.Sdk.WebAssembly.Tasks.dll +-./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WindowsDesktop/ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/ + ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/Sdk.props +@@ ------------ @@ + ./sdk/x.y.z/testhost-latest.runtimeconfig.json + ./sdk/x.y.z/testhost.deps.json + ./sdk/x.y.z/testhost.dll +-./sdk/x.y.z/TestHostNetFramework/ + ./sdk/x.y.z/tr/ + ./sdk/x.y.z/tr/dotnet.resources.dll + ./sdk/x.y.z/tr/Microsoft.Build.resources.dll \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt new file mode 100644 index 000000000..f1ab9ecc1 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.arcade.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.arcade.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.arcade.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspire.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspire.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspire.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspnetcore.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspnetcore.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.aspnetcore.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.cecil.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.cecil.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.cecil.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.command-line-api.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.command-line-api.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.command-line-api.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.deployment-tools.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.deployment-tools.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.deployment-tools.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.diagnostics.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.diagnostics.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.diagnostics.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.emsdk.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.emsdk.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.emsdk.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.format.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.format.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.format.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.fsharp.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.fsharp.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.fsharp.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.installer.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.installer.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.installer.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.msbuild.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.msbuild.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.msbuild.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.nuget-client.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.nuget-client.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.nuget-client.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.razor.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.razor.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.razor.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn-analyzers.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn-analyzers.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn-analyzers.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.roslyn.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.runtime.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.runtime.json new file mode 100644 index 000000000..472899b4c --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.runtime.json @@ -0,0 +1,20 @@ +{ + "files": [ + { + "path": "src/tests/GC/Scenarios/GCBench/THIRD-PARTY-NOTICES", + "detected_license_expression": "unknown-license-reference" + }, + { + "path": "src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/LLoops/THIRD-PARTY-NOTICES", + "detected_license_expression": "unknown-license-reference" + }, + { + "path": "src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDLLoops/THIRD-PARTY-NOTICES", + "detected_license_expression": "unknown-license-reference" + }, + { + "path": "src/tests/JIT/Performance/CodeQuality/V8/Richards/THIRD-PARTY-NOTICES", + "detected_license_expression": "unknown-license-reference" + } + ] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sdk.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sdk.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sdk.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-externals.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-externals.json new file mode 100644 index 000000000..42c3e6895 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-externals.json @@ -0,0 +1,12 @@ +{ + "files": [ + { + "path": "src/application-insights/LOGGING/ThirdPartyNotices.txt", + "detected_license_expression": "unknown AND apache-2.0 AND mit AND bsd-new" + }, + { + "path": "src/application-insights/WEB/ThirdPartyNotices.txt", + "detected_license_expression": "bsd-new AND mit AND ms-pl AND apache-2.0 AND (cc-by-3.0-us AND cc-by-3.0 AND mit) AND ms-net-library AND ms-rl" + } + ] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-reference-packages.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-reference-packages.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.source-build-reference-packages.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sourcelink.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sourcelink.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.sourcelink.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.symreader.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.symreader.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.symreader.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.templating.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.templating.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.templating.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.test-templates.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.test-templates.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.test-templates.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.vstest.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.vstest.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.vstest.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xdt.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xdt.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xdt.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xliff-tasks.json b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xliff-tasks.json new file mode 100644 index 000000000..6941fa698 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/licenses/Licenses.xliff-tasks.json @@ -0,0 +1,3 @@ +{ + "files": [] +} \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config new file mode 100644 index 000000000..3ad4a3902 --- /dev/null +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/SourceBuild/patches/runtime/0001-crashinfo-use-off_t-instead-of-off64_t.patch b/src/SourceBuild/patches/runtime/0001-crashinfo-use-off_t-instead-of-off64_t.patch new file mode 100644 index 000000000..6569164b8 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-crashinfo-use-off_t-instead-of-off64_t.patch @@ -0,0 +1,38 @@ +From 05ad51a9be428012328a1ee199a4edaff20b5efe Mon Sep 17 00:00:00 2001 +From: Antoine Martin +Date: Tue, 12 Sep 2023 18:55:46 -0400 +Subject: [PATCH] crashinfo.cpp/crasinfounix.cpp: use off_t instead of off64_t + +Backport: https://github.com/dotnet/runtime/pull/101272 + +--- + src/coreclr/debug/createdump/crashinfo.cpp | 2 +- + src/coreclr/debug/createdump/crashinfounix.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/coreclr/debug/createdump/crashinfo.cpp b/src/coreclr/debug/createdump/crashinfo.cpp +index 996f3a81935d..d1d1b0ea0218 100644 +--- a/src/coreclr/debug/createdump/crashinfo.cpp ++++ b/src/coreclr/debug/createdump/crashinfo.cpp +@@ -803,7 +803,7 @@ CrashInfo::PageMappedToPhysicalMemory(uint64_t start) + } + + uint64_t pagemapOffset = (start / PAGE_SIZE) * sizeof(uint64_t); +- uint64_t seekResult = lseek64(m_fdPagemap, (off64_t) pagemapOffset, SEEK_SET); ++ uint64_t seekResult = lseek(m_fdPagemap, (off_t) pagemapOffset, SEEK_SET); + if (seekResult != pagemapOffset) + { + int seekErrno = errno; +diff --git a/src/coreclr/debug/createdump/crashinfounix.cpp b/src/coreclr/debug/createdump/crashinfounix.cpp +index 24b975e3d655..2f4ea079de3b 100644 +--- a/src/coreclr/debug/createdump/crashinfounix.cpp ++++ b/src/coreclr/debug/createdump/crashinfounix.cpp +@@ -516,7 +516,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r + // performance optimization. + m_canUseProcVmReadSyscall = false; + assert(m_fdMem != -1); +- *read = pread64(m_fdMem, buffer, size, (off64_t)address); ++ *read = pread(m_fdMem, buffer, size, (off_t)address); + } + + if (*read == (size_t)-1) diff --git a/src/SourceBuild/patches/runtime/0002-Update-MSBuild-dependencies.patch b/src/SourceBuild/patches/runtime/0002-Update-MSBuild-dependencies.patch new file mode 100644 index 000000000..267e45546 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0002-Update-MSBuild-dependencies.patch @@ -0,0 +1,79 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nikola Milosavljevic +Date: Tue, 23 Apr 2024 01:55:17 +0000 +Subject: [PATCH] Update MSBuild dependencies + +Backport: https://github.com/dotnet/runtime/issues/101395 +--- + eng/Version.Details.xml | 12 ++++++++++++ + eng/Versions.props | 6 +++--- + src/tasks/AotCompilerTask/MonoAOTCompiler.csproj | 1 - + src/tasks/WasmAppBuilder/WasmAppBuilder.csproj | 3 --- + 4 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml +index fe35dc0997e..b90337395f6 100644 +--- a/eng/Version.Details.xml ++++ b/eng/Version.Details.xml +@@ -414,6 +414,18 @@ + https://github.com/dotnet/msbuild + 195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22 + ++ ++ https://github.com/dotnet/msbuild ++ 195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22 ++ ++ ++ https://github.com/dotnet/msbuild ++ 195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22 ++ ++ ++ https://github.com/dotnet/msbuild ++ 195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22 ++ + + https://github.com/dotnet/msbuild + 195e7f5a3a8e51c37d83cd9e54cb99dc3fc69c22 +diff --git a/eng/Versions.props b/eng/Versions.props +index f012e409095..bf16c6ee71f 100644 +--- a/eng/Versions.props ++++ b/eng/Versions.props +@@ -173,9 +173,9 @@ + 1.0.4-preview6.19326.1 + 2.0.5 + 17.8.3 +- $(MicrosoftBuildVersion) +- $(MicrosoftBuildVersion) +- $(MicrosoftBuildVersion) ++ 17.8.3 ++ 17.8.3 ++ 17.8.3 + 6.2.4 + 6.2.4 + 7.0.412701 +diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +index e76730b5aec..88ae0fb136c 100644 +--- a/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj ++++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.csproj +@@ -14,7 +14,6 @@ + + + +- + + + +diff --git a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj +index 34a51095986..d8c95954dd8 100644 +--- a/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj ++++ b/src/tasks/WasmAppBuilder/WasmAppBuilder.csproj +@@ -24,9 +24,6 @@ + + + +- +- +- + + + diff --git a/src/SourceBuild/tarball/BuildSourceBuildTarball.proj b/src/SourceBuild/tarball/BuildSourceBuildTarball.proj deleted file mode 100644 index 7b5becb77..000000000 --- a/src/SourceBuild/tarball/BuildSourceBuildTarball.proj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - $(ArtifactsShippingPackagesDir)dotnet-sdk-source-$(Version).tar.gz - - - - - diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj b/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj deleted file mode 100644 index 141743561..000000000 --- a/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - $(NuGetPackageRoot)microsoft.dotnet.sourcebuild.tasks\$(MicrosoftDotNetSourceBuildTasksVersion)\build\ - - - - - - - - - - - - - - - - - - - - - - $([MSBuild]::NormalizePath('$(SourceBuildSelfPrebuiltReportDir)prebuilt-usage.xml')) - - - - - - - - false - - - - - - false - true - - - - - - - - - $(MSBuildThisFileDirectory)SourceBuildIntermediate.proj - $(ArtifactsObjDir)ArcadeGeneratedProjects\SourceBuildIntermediate\SourceBuildIntermediate.proj - - - - - - - - - - - - - - - - - $(ArtifactsObjDir)ArcadeGeneratedProjects\SourceBuildIntermediate\LICENSE.txt - - - - - - - - - - - - - - - Building intermediate nupkg - $(IntermediateNupkgBuildMessage), and supplemental nupkgs for @(SupplementalIntermediateNupkgCategory, ', ') - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets b/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets deleted file mode 100644 index eeea55fcc..000000000 --- a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - $([MSBuild]::NormalizePath('$(CurrentRepoSourceBuildArtifactsDir)', 'sourcebuild.binlog')) - - $(CurrentRepoSourceBuildSourceDir) - - true - - - - - - - - - - - - - - - - - - - - - - - - $(InnerBuildArgs) /p:ArcadeInnerBuildFromSource=true - - $(InnerBuildArgs) /p:DotNetBuildFromSource=true - - $(InnerBuildArgs) /p:RepoRoot=$(InnerSourceBuildRepoRoot) - - $(InnerBuildArgs) /p:ArtifactsDir=$(CurrentRepoSourceBuildArtifactsDir) - - $(InnerBuildArgs) /bl:$(CurrentRepoSourceBuildBinlogFile) - - $(InnerBuildArgs) /p:ContinuousIntegrationBuild=true - - - $(InnerBuildArgs) /p:SourceBuildOutputDir=$(SourceBuildOutputDir) - $(InnerBuildArgs) /p:SourceBuiltBlobFeedDir=$(SourceBuiltBlobFeedDir) - - - $(InnerBuildArgs) /p:EnableSourceControlManagerQueries=false - $(InnerBuildArgs) /p:EnableSourceLink=false - $(InnerBuildArgs) /p:DeterministicSourcePaths=false - $(InnerBuildArgs) /p:DotNetBuildOffline=true - $(InnerBuildArgs) /p:DotNetPackageVersionPropsPath=$(DotNetPackageVersionPropsPath) - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - true - - <_GitCloneToDirArgs /> - <_GitCloneToDirArgs>$(_GitCloneToDirArgs) --source "$(RepoRoot)" - <_GitCloneToDirArgs>$(_GitCloneToDirArgs) --dest "$(InnerSourceBuildRepoRoot)" - <_GitCloneToDirArgs Condition="'$(CopyWipIntoInnerSourceBuildRepo)' == 'true'">$(_GitCloneToDirArgs) --copy-wip - <_GitCloneToDirArgs Condition="'$(CleanInnerSourceBuildRepoRoot)' == 'true'">$(_GitCloneToDirArgs) --clean - - <_GitCloneToDirScriptFile>$(MSBuildThisFileDirectory)git-clone-to-dir.sh - - - - - - - true - - <_GitSubmoduleCloneArgs /> - <_GitSubmoduleCloneArgs>$(_GitSubmoduleCloneArgs) --source . - <_GitSubmoduleCloneArgs>$(_GitSubmoduleCloneArgs) --dest "$(InnerSourceBuildRepoRoot)$sm_path" - <_GitSubmoduleCloneArgs Condition="'$(CopyWipIntoInnerSourceBuildRepo)' == 'true'">$(_GitSubmoduleCloneArgs) --copy-wip - <_GitSubmoduleCloneArgs Condition="'$(CleanInnerSourceBuildRepoRoot)' == 'true'">$(_GitSubmoduleCloneArgs) --clean - - - - - - - - - true - - - $(ARCADE_BUILD_TOOL_COMMAND) - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/Directory.Build.targets b/src/SourceBuild/tarball/content/Directory.Build.targets deleted file mode 100644 index 02ff624bc..000000000 --- a/src/SourceBuild/tarball/content/Directory.Build.targets +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/build.sh b/src/SourceBuild/tarball/content/build.sh deleted file mode 100755 index 02a288a00..000000000 --- a/src/SourceBuild/tarball/content/build.sh +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' - -usage() { - echo "usage: $0 [options]" - echo "options:" - echo " --clean-while-building cleans each repo after building (reduces disk space usage)" - echo " --online build using online sources" - echo " --poison build with poisoning checks" - echo " --run-smoke-test don't build; run smoke tests" - echo " --with-packages use the specified directory of previously-built packages" - echo " --with-sdk use the SDK in the specified directory for bootstrapping" - echo "use -- to send the remaining arguments to MSBuild" - echo "" -} - -SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" - -MSBUILD_ARGUMENTS=("/flp:v=detailed") -CUSTOM_REF_PACKAGES_DIR='' -CUSTOM_PACKAGES_DIR='' -alternateTarget=false -runningSmokeTests=false -CUSTOM_SDK_DIR='' - -while :; do - if [ $# -le 0 ]; then - break - fi - - lowerI="$(echo $1 | awk '{print tolower($0)}')" - case $lowerI in - --clean-while-building) - MSBUILD_ARGUMENTS+=( "/p:CleanWhileBuilding=true") - ;; - --online) - MSBUILD_ARGUMENTS+=( "/p:BuildWithOnlineSources=true") - ;; - --poison) - MSBUILD_ARGUMENTS+=( "/p:EnablePoison=true") - ;; - --run-smoke-test) - alternateTarget=true - runningSmokeTests=true - MSBUILD_ARGUMENTS+=( "/t:RunSmokeTest" ) - ;; - --with-packages) - CUSTOM_PACKAGES_DIR="$(cd -P "$2" && pwd)" - if [ ! -d "$CUSTOM_PACKAGES_DIR" ]; then - echo "Custom prviously built packages directory '$CUSTOM_PACKAGES_DIR' does not exist" - exit 1 - fi - shift - ;; - --with-sdk) - CUSTOM_SDK_DIR="$(cd -P "$2" && pwd)" - if [ ! -d "$CUSTOM_SDK_DIR" ]; then - echo "Custom SDK directory '$CUSTOM_SDK_DIR' does not exist" - exit 1 - fi - if [ ! -x "$CUSTOM_SDK_DIR/dotnet" ]; then - echo "Custom SDK '$CUSTOM_SDK_DIR/dotnet' does not exist or is not executable" - exit 1 - fi - shift - ;; - --) - shift - echo "Detected '--': passing remaining parameters '$@' as build.sh arguments." - break - ;; - -?|-h|--help) - usage - exit 0 - ;; - *) - echo "Unrecognized argument '$1'" - usage - exit 1 - ;; - esac - shift -done - -if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then - if [ "$runningSmokeTests" == "true" ]; then - MSBUILD_ARGUMENTS+=( "/p:CustomSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" ) - else - MSBUILD_ARGUMENTS+=( "/p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PACKAGES_DIR" ) - fi -fi - -if [ -f "$SCRIPT_ROOT/packages/archive/archiveArtifacts.txt" ]; then - ARCHIVE_ERROR=0 - if [ ! -d "$SCRIPT_ROOT/.dotnet" ] && [ "$CUSTOM_SDK_DIR" == "" ]; then - echo "ERROR: SDK not found at $SCRIPT_ROOT/.dotnet" - ARCHIVE_ERROR=1 - fi - if [ ! -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Artifacts*.tar.gz ] && [ "$CUSTOM_PACKAGES_DIR" == "" ]; then - echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at $SCRIPT_ROOT/packages/archive/ - Either run prep.sh or pass --with-packages parameter" - ARCHIVE_ERROR=1 - fi - if [ $ARCHIVE_ERROR == 1 ]; then - echo "" - echo " Errors detected in tarball. To prep the tarball, run prep.sh while online to install an SDK" - echo " and Private.SourceBuilt.Artifacts tarball. After prepping the tarball, the tarball can be" - echo " built offline. As an alternative to prepping the tarball, these assets can be provided using" - echo " the --with-sdk and --with-packages parameters" - exit 1 - fi -fi - -if [ -d "$CUSTOM_SDK_DIR" ]; then - export SDK_VERSION=`"$CUSTOM_SDK_DIR/dotnet" --version` - export CLI_ROOT="$CUSTOM_SDK_DIR" - export _InitializeDotNetCli="$CLI_ROOT/dotnet" - export CustomDotNetSdkDir="$CLI_ROOT" - echo "Using custom bootstrap SDK from '$CLI_ROOT', version '$SDK_VERSION'" -else - sdkLine=`grep -m 1 'dotnet' "$SCRIPT_ROOT/global.json"` - sdkPattern="\"dotnet\" *: *\"(.*)\"" - if [[ $sdkLine =~ $sdkPattern ]]; then - export SDK_VERSION=${BASH_REMATCH[1]} - export CLI_ROOT="$SCRIPT_ROOT/.dotnet" - fi -fi - -packageVersionsPath='' -restoredPackagesDir="$SCRIPT_ROOT/packages/restored" - -if [[ "$CUSTOM_PACKAGES_DIR" != "" && -f "$CUSTOM_PACKAGES_DIR/PackageVersions.props" ]]; then - packageVersionsPath="$CUSTOM_PACKAGES_DIR/PackageVersions.props" -elif [ -d "$SCRIPT_ROOT/packages/archive" ]; then - sourceBuiltArchive=`find $SCRIPT_ROOT/packages/archive -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` - if [ -f "$SCRIPT_ROOT/packages/previously-source-built/PackageVersions.props" ]; then - packageVersionsPath=$SCRIPT_ROOT/packages/previously-source-built/PackageVersions.props - elif [ -f "$sourceBuiltArchive" ]; then - tar -xzf "$sourceBuiltArchive" -C /tmp PackageVersions.props - packageVersionsPath=/tmp/PackageVersions.props - fi -fi - -if [ ! -f "$packageVersionsPath" ]; then - echo "Cannot find PackagesVersions.props. Debugging info:" - echo " Attempted archive path: $SCRIPT_ROOT/packages/archive" - echo " Attempted custom PVP path: $CUSTOM_PACKAGES_DIR/PackageVersions.props" - exit 1 -fi - -arcadeSdkLine=`grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath"` -versionPattern="(.*)" -if [[ $arcadeSdkLine =~ $versionPattern ]]; then - export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]} - - # Ensure that by default, the bootstrap version of the Arcade SDK is used. Source-build infra - # projects use bootstrap Arcade SDK, and would fail to find it in the tarball build. The repo - # projects overwrite this so that they use the source-built Arcade SDK instad. - export SOURCE_BUILT_SDK_ID_ARCADE=Microsoft.DotNet.Arcade.Sdk - export SOURCE_BUILT_SDK_VERSION_ARCADE=$ARCADE_BOOTSTRAP_VERSION - export SOURCE_BUILT_SDK_DIR_ARCADE=$restoredPackagesDir/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/$ARCADE_BOOTSTRAP_VERSION -fi - -sourceLinkLine=`grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath"` -versionPattern="(.*)" -if [[ $sourceLinkLine =~ $versionPattern ]]; then - export SOURCE_LINK_BOOTSTRAP_VERSION=${BASH_REMATCH[1]} -fi - -echo "Found bootstrap SDK $SDK_VERSION, bootstrap Arcade $ARCADE_BOOTSTRAP_VERSION, bootstrap SourceLink $SOURCE_LINK_BOOTSTRAP_VERSION" - -export DOTNET_CLI_TELEMETRY_OPTOUT=1 -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export NUGET_PACKAGES=$restoredPackagesDir/ - -LogDateStamp=$(date +"%m%d%H%M%S") - -if [ "$alternateTarget" == "true" ]; then - "$CLI_ROOT/dotnet" $CLI_ROOT/sdk/$SDK_VERSION/MSBuild.dll "$SCRIPT_ROOT/build.proj" /bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog /fileLoggerParameters:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log /clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@" -else - $CLI_ROOT/dotnet $CLI_ROOT/sdk/$SDK_VERSION/MSBuild.dll /bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog /fileLoggerParameters:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log $SCRIPT_ROOT/tools-local/init-build.proj /t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@" - - $CLI_ROOT/dotnet $CLI_ROOT/sdk/$SDK_VERSION/MSBuild.dll /bl:$SCRIPT_ROOT/artifacts/log/Debug/Build_$LogDateStamp.binlog /fileLoggerParameters:LogFile=$SCRIPT_ROOT/artifacts/logs/Build_$LogDateStamp.log $SCRIPT_ROOT/build.proj ${MSBUILD_ARGUMENTS[@]} "$@" -fi diff --git a/src/SourceBuild/tarball/content/eng/Versions.props b/src/SourceBuild/tarball/content/eng/Versions.props deleted file mode 100644 index df7b892f6..000000000 --- a/src/SourceBuild/tarball/content/eng/Versions.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - 0.1.0 - alpha.1 - - - - 2.2.0 - - diff --git a/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml b/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml deleted file mode 100644 index b6e0caaa4..000000000 --- a/src/SourceBuild/tarball/content/eng/pipelines/security-partners-dotnet.yml +++ /dev/null @@ -1,50 +0,0 @@ -# DO NOT DELETE: This is used to validate PRs in the internal security-partners-dotnet repo - -trigger: none - -variables: -- name: cfsNPMWarnLevel - value: none - -- name: cfsNugetWarnLevel - value: none - -- name: myGetWarnLevel - value: none - -- name: NuGetSecurityAnalysisWarningLevel - value: none - -resources: - repositories: - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release - -extends: - template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates - parameters: - pool: - name: NetCore1ESPool-Svc-Internal - image: 1es-windows-2022 - os: windows - stages: - - stage: stage - jobs: - - template: /src/installer/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml@self - parameters: - architecture: x64 - excludeSdkContentTests: true - matrix: - Ubuntu2004-Offline: - _BootstrapPrep: false - _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04 - _EnablePoison: false - _ExcludeOmniSharpTests: false - _RunOnline: false - name: Build_Tarball_x64 - pool: - name: NetCore1ESPool-Svc-Internal - image: 1es-ubuntu-2004 - os: linux diff --git a/src/SourceBuild/tarball/content/prep.sh b/src/SourceBuild/tarball/content/prep.sh deleted file mode 100755 index 89e00b1bb..000000000 --- a/src/SourceBuild/tarball/content/prep.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' - -SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" - -usage() { - echo "usage: $0 [options]" - echo "" - echo " Prepares a tarball to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and" - echo " installing the version of dotnet referenced in global.json" - echo "options:" - echo " --bootstrap Build a bootstrap version of previously source-built packages archive." - echo " This modifies the downloaded version, replacing portable packages" - echo " with official ms-built packages restored from package feeds." - echo "" -} - -buildBootstrap=false -positional_args=() -while :; do - if [ $# -le 0 ]; then - break - fi - lowerI="$(echo "$1" | awk '{print tolower($0)}')" - case $lowerI in - "-?"|-h|--help) - usage - exit 0 - ;; - --bootstrap) - buildBootstrap=true - ;; - *) - positional_args+=("$1") - ;; - esac - - shift -done - -# Check for the archive text file which describes the location of the archive files to download -if [ ! -f $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt ]; then - echo " ERROR: $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt does not exist. Cannot determine which archives to download. Exiting..." - exit -1 -fi - -downloadArtifacts=true -downloadPrebuilts=true -installDotnet=true - -# Check to make sure curl exists to download the archive files -if ! command -v curl &> /dev/null -then - echo " ERROR: curl not found. Exiting..." - exit -1 -fi - -# Check if Private.SourceBuilt artifacts archive exists -if [ -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz ]; then - echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded" - downloadArtifacts=false -fi - -# Check if Private.SourceBuilt prebuilts archive exists -if [ -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Prebuilts.*.tar.gz ]; then - echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded" - downloadPrebuilts=false -fi - -# Check if dotnet is installed -if [ -d $SCRIPT_ROOT/.dotnet ]; then - echo " ./.dotnet SDK directory exists...it will not be installed" - installDotnet=false; -fi - -# Read the archive text file to get the archives to download and download them -while read -r line; do - if [[ $line == *"Private.SourceBuilt.Artifacts"* ]]; then - if [ "$downloadArtifacts" == "true" ]; then - echo " Downloading source-built artifacts from $line..." - (cd $SCRIPT_ROOT/packages/archive/ && curl --fail --retry 5 -O $line) - fi - fi - if [[ $line == *"Private.SourceBuilt.Prebuilts"* ]]; then - if [ "$downloadPrebuilts" == "true" ]; then - echo " Downloading source-built prebuilts from $line..." - (cd $SCRIPT_ROOT/packages/archive/ && curl --fail --retry 5 -O $line) - fi - fi -done < $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt - -# Check for the version of dotnet to install -if [ "$installDotnet" == "true" ]; then - echo " Installing dotnet..." - (source ./eng/common/tools.sh && InitializeDotNetCli true) -fi - -# Build bootstrap, if specified -if [ "$buildBootstrap" == "true" ]; then - DOTNET_SDK_PATH="$SCRIPT_ROOT/.dotnet" - - # Create working directory for running bootstrap project - workingDir=$(mktemp -d) - echo " Building bootstrap previously source-built in $workingDir" - - # Copy bootstrap project to working dir - cp $SCRIPT_ROOT/scripts/bootstrap/buildBootstrapPreviouslySB.csproj $workingDir - - # Copy NuGet.config from the installer repo to have the right feeds - cp $SCRIPT_ROOT/src/installer/NuGet.config $workingDir - - # Get PackageVersions.props from existing prev-sb archive - echo " Retrieving PackageVersions.props from existing archive" - sourceBuiltArchive=`find $SCRIPT_ROOT/packages/archive -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` - if [ -f "$sourceBuiltArchive" ]; then - tar -xzf "$sourceBuiltArchive" -C $workingDir PackageVersions.props - fi - - # Run restore on project to initiate download of bootstrap packages - $DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$SCRIPT_ROOT/packages/archive/" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/scripts/bootstrap/OverrideBootstrapVersions.props" - - # Remove working directory - rm -rf $workingDir -fi diff --git a/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj b/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj deleted file mode 100644 index e4d90c5ec..000000000 --- a/src/SourceBuild/tarball/content/repos/clicommandlineparser.proj +++ /dev/null @@ -1,26 +0,0 @@ - - - - - true - $(StandardSourceBuildArgs) - $(BuildCommandArgs) $(FlagParameterPrefix)v $(LogVerbosity) - - $(BuildCommandArgs) /p:CheckEolTargetFramework=false - $(StandardSourceBuildCommand) $(BuildCommandArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/known-good-tests.proj b/src/SourceBuild/tarball/content/repos/known-good-tests.proj deleted file mode 100644 index e8d75dd4b..000000000 --- a/src/SourceBuild/tarball/content/repos/known-good-tests.proj +++ /dev/null @@ -1,37 +0,0 @@ - - - - - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/tarball/content/repos/known-good.proj deleted file mode 100644 index ded6743ad..000000000 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ /dev/null @@ -1,81 +0,0 @@ - - - - - false - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/linker.proj b/src/SourceBuild/tarball/content/repos/linker.proj deleted file mode 100644 index eb0fecf74..000000000 --- a/src/SourceBuild/tarball/content/repos/linker.proj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - Microsoft.NET.ILLink.Tasks - - $(StandardSourceBuildArgs) - $(BuildCommandArgs) $(FlagParameterPrefix)warnAsError $(ArcadeFalseBoolBuildArg) - $(StandardSourceBuildCommand) $(BuildCommandArgs) - - false - $(ProjectDirectory)NuGet.config - true - - - - - - - - - - $(ProjectDirectory)src/ILLink.Tasks/ILLink.Tasks.nuspec - - - - - $id$ - $version$ - $authors$ - $description$ - - - - - - - -]]> - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/roslyn.proj b/src/SourceBuild/tarball/content/repos/roslyn.proj deleted file mode 100644 index 0f43286ce..000000000 --- a/src/SourceBuild/tarball/content/repos/roslyn.proj +++ /dev/null @@ -1,52 +0,0 @@ - - - - - $(StandardSourceBuildArgs) - $(BuildCommandArgs) /p:TreatWarningsAsErrors=false - $(BuildCommandArgs) /p:ApplyPartialNgenOptimization=false - $(BuildCommandArgs) /p:EnablePartialNgenOptimization=false - $(BuildCommandArgs) /p:PublishWindowsPdb=false - - - $(BuildCommandArgs) /p:UsingToolMicrosoftNetCompilers=false - $(BuildCommandArgs) /p:RepoRoot=$(ProjectDirectory) - - $(ProjectDirectory)build$(ShellExtension) $(BuildCommandArgs) - - false - true - $(ProjectDirectory)global.json - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime-portable.proj b/src/SourceBuild/tarball/content/repos/runtime-portable.proj deleted file mode 100644 index f90a7b7d6..000000000 --- a/src/SourceBuild/tarball/content/repos/runtime-portable.proj +++ /dev/null @@ -1,47 +0,0 @@ - - - - - runtime - - - - - - - - - - - - - - - $(ProjectDirectory)artifacts/portableLog - $(ProjectDirectory)artifacts/portableObj - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.props b/src/SourceBuild/tarball/content/repos/runtime.common.props deleted file mode 100644 index 037c3d94a..000000000 --- a/src/SourceBuild/tarball/content/repos/runtime.common.props +++ /dev/null @@ -1,43 +0,0 @@ - - - runtime - - - - - - - true - - - $(StandardSourceBuildArgs.Replace('-bl', '-nobl')) - - $(StandardSourceBuildCommand) $(BuildCommandArgs) - $(ArmEnvironmentVariables) $(StandardSourceBuildCommand) $(BuildCommandArgs) - - $(ProjectDirectory)/clean$(ShellExtension) - - - - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - true - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.common.targets b/src/SourceBuild/tarball/content/repos/runtime.common.targets deleted file mode 100644 index 862b70dc8..000000000 --- a/src/SourceBuild/tarball/content/repos/runtime.common.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - $(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json - - - - - - - - - <_builtRuntimePackages Include="$(SourceBuiltAssetsDir)*.symbols.nupkg" /> - <_builtRuntimePackages> - $([System.String]::Copy('%(FileName)').Replace('symbols', 'nupkg')) - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj deleted file mode 100644 index f3ed143f8..000000000 --- a/src/SourceBuild/tarball/content/repos/runtime.proj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - $(TargetRid) - osx-x64 - freebsd-x64 - win-x64 - - $(StandardSourceBuildArgs) - $(BuildCommandArgs) /p:TargetRid=$(OverrideTargetRid) - $(BuildCommandArgs) /p:SourceBuildNonPortable=true - $(StandardSourceBuildCommand) $(BuildCommandArgs) - - - - - - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/repos/symreader.proj b/src/SourceBuild/tarball/content/repos/symreader.proj deleted file mode 100644 index 57ab7cd52..000000000 --- a/src/SourceBuild/tarball/content/repos/symreader.proj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - $(StandardSourceBuildCommand) $(StandardSourceBuildArgs) - - $(ProjectDirectory)global.json - $(ProjectDirectory)NuGet.config - false - - - - - - - - diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/OverrideBootstrapVersions.props b/src/SourceBuild/tarball/content/scripts/bootstrap/OverrideBootstrapVersions.props deleted file mode 100644 index 234abd681..000000000 --- a/src/SourceBuild/tarball/content/scripts/bootstrap/OverrideBootstrapVersions.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - 6.0.25-servicing.23520.6 - - $(NonshippingRuntimeVersionFor6_0_25) - $(NonshippingRuntimeVersionFor6_0_25) - $(NonshippingRuntimeVersionFor6_0_25) - - diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj deleted file mode 100644 index c11dfcb3e..000000000 --- a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - net6.0 - $(MSBuildProjectDirectory)/artifacts/ - $(MSBuildProjectDirectory)/artifacts/restoredPkgs/ - $(MSBuildProjectDirectory)/artifacts/unpacked/ - $(ArchiveDir)Private.SourceBuilt.Artifacts.Bootstrap.tar.gz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(SourceFileName->'%(Filename)') - $(DestinationFileName.Replace('$(PackageName.ToLower()).','')) - - - - - - $([System.String]::concat('%3C','$(PackageName)','Version','%3E').Replace('.','')) - $([System.String]::concat('%3C','$(PackageName)','PackageVersion','%3E').Replace('.','')) - $(DestinationPath)PackageVersions.props - - - - diff --git a/src/SourceBuild/tarball/content/scripts/docker/docker-run.cmd b/src/SourceBuild/tarball/content/scripts/docker/docker-run.cmd deleted file mode 100644 index e7c0d21bb..000000000 --- a/src/SourceBuild/tarball/content/scripts/docker/docker-run.cmd +++ /dev/null @@ -1,47 +0,0 @@ - -@echo off -setlocal - -set SCRIPT_ROOT=%~dp0 -set REPO_ROOT=%SCRIPT_ROOT%..\..\ - -:arg_loop -set SET_DOCKERFILE= -set SET_DOCKERIMAGE= -if /I "%1" equ "-d" (set SET_DOCKERFILE=1) -if /I "%1" equ "--dockerfile" (set SET_DOCKERFILE=1) -if "%SET_DOCKERFILE%" == "1" ( - echo "1: %1 2: %2" - set DOCKER_FILE=%2 - shift /1 - shift /1 - goto :arg_loop -) -if /I "%1" equ "-i" (set SET_DOCKERIMAGE=1) -if /I "%1" equ "--image" (set SET_DOCKERIMAGE=1) -if "%SET_DOCKERIMAGE%" == "1" ( - set DOCKER_IMAGE=%2 - shift /1 - shift /1 - goto :arg_loop -) - -if "%DOCKER_FILE%" == "" ( - echo Missing required parameter --dockerfile [docker file dir] - exit /b 1 -) -if "%DOCKER_IMAGE%" == "" ( - echo Missing required parameter --image [image name] - exit /b 1 -) - -if EXIST "%DOCKER_FILE%\Dockerfile" ( - docker build -q -f %DOCKER_FILE%\Dockerfile -t %DOCKER_IMAGE% %DOCKER_FILE% -) else ( - echo Error: %DOCKER_FILE%\Dockerfile does not exist - exit /b 1 -) - -docker run -i -t --rm --init -v %REPO_ROOT%:/code -t -w /code %DOCKER_IMAGE% /bin/sh -endlocal - diff --git a/src/SourceBuild/tarball/content/scripts/docker/docker-run.sh b/src/SourceBuild/tarball/content/scripts/docker/docker-run.sh deleted file mode 100644 index 93e0382a0..000000000 --- a/src/SourceBuild/tarball/content/scripts/docker/docker-run.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' - -DOCKER_FILE="" -DOCKER_IMAGE="" -SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)" -REPO_ROOT="$(cd -P "$SCRIPT_ROOT/../../" && pwd)" - -case $(echo $1 | awk '{print tolower($0)}') in - -d | --dockerfile) - DOCKER_FILE=$2 - ;; - -i | --image) - DOCKER_IMAGE=$2 - ;; - *) - echo "usage: $0 [[-d | --dockerfile] ] | [-i | --image] ]] cmd-to-run" - exit 1 - ;; -esac - -shift -shift - -if [ $DOCKER_FILE ]; then - if [ -d $DOCKER_FILE ]; then - DOCKER_FILE="$DOCKER_FILE/Dockerfile" - fi - - DOCKER_FILE_DIR=$(dirname $DOCKER_FILE) - DOCKER_IMAGE=$(set -x ; docker build -q -f $DOCKER_FILE $DOCKER_FILE_DIR) -fi - -DOCKER_USERADD_AND_SWITCH_CMD="" - -if [ ! $(id -u) = 0 ]; then - DOCKER_USERADD_AND_SWITCH_CMD="useradd -m -u $(id -u) $(id -n -u) && su $(id -n -u) -c " -fi - -ARGS=$(IFS=' ' ; echo $@) -(set -x ; docker run --rm --init -v $REPO_ROOT:/code -t $DOCKER_IMAGE /bin/sh -c "cd /code ; $DOCKER_USERADD_AND_SWITCH_CMD\"$ARGS\"") diff --git a/src/SourceBuild/tarball/content/scripts/generate-readme-table.sh b/src/SourceBuild/tarball/content/scripts/generate-readme-table.sh deleted file mode 100644 index 244306d7d..000000000 --- a/src/SourceBuild/tarball/content/scripts/generate-readme-table.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -script_root="$(cd -P "$( dirname "$0" )" && pwd)" - -branch=master -branch_azdo=$branch - -readme="$script_root/../README.md" - -if [ ! -f "$readme" ]; then - echo "$readme must exist." - exit 1 -fi - -print_rows() { - echo '| OS | *Azure DevOps*
Release |' - echo '| -- | :-- |' - row 'CentOS7.1' 'Production' - row 'CentOS7.1' 'Online' - row 'CentOS7.1' 'Offline' - row 'CentOS7.1' 'Offline Portable' - row 'Debian8.2' 'Production' - row 'Debian8.2' 'Online' - row 'Fedora29' 'Production' - row 'Fedora29' 'Online' - row 'Fedora29' 'Offline' - row 'Fedora29' 'Offline Portable' - row 'OSX' 'Production' - row 'Ubuntu16.04' 'Production' - row 'Windows' 'Production' -} - -raw_print() { - printf '%s' "$1" -} - -row() { - os=$1 - job_type=$2 - display_name=$os - if [ "$job_type" != "Production" ]; then - display_name="$display_name ($job_type)" - fi - printf "| $display_name | " - azdo - end -} - -end() { - printf '\n' -} - -azdo() { - job=$(raw_print $os | awk '{print tolower($0)}' | sed 's/\.//g') - - # Fix case: AzDO has "sticky" casing across build def lifetime, so these names are inconsistent. - # https://dev.azure.com/dnceng/internal/_workitems/edit/98 - case $os in - OSX|Windows) - job=$os - ;; - esac - - job_type_escaped=$(raw_print "$job_type" | sed 's/ /%20/g') - query="?branchName=$branch_azdo&jobname=$job&configuration=$job_type_escaped" - - raw_print "[![Build Status](https://dev.azure.com/dnceng/internal/_apis/build/status/dotnet/source-build/source-build-CI$query)]" - raw_print "(https://dev.azure.com/dnceng/internal/_build/latest?definitionId=114&branchName=$branch_azdo) | " -} - -none() { - raw_print '| ' -} - -cp "$readme" "$readme.old" - -phase=before -while read line; do - if [ "$phase" = before ]; then - echo "$line" - if [ "$line" = '' ]; then - print_rows - phase=skip - fi - elif [ "$phase" = skip ]; then - if [ "$line" = '' ]; then - echo "$line" - phase=after - fi - else - echo "$line" - fi -done < "$readme.old" > "$readme" - -rm "$readme.old" diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs deleted file mode 100644 index 4d02ed3ae..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.IO.Enumeration; -using System.Linq; -using System.Text.RegularExpressions; -using Xunit.Abstractions; - -namespace Microsoft.DotNet.SourceBuild.SmokeTests; - -public class SdkContentTests : SmokeTests -{ - public SdkContentTests(ITestOutputHelper outputHelper) : base(outputHelper) { } - - /// - /// Verifies the file layout of the source built sdk tarball to the Microsoft build. - /// The differences are captured in baselines/MsftToSbSdkDiff.txt. - /// Version numbers that appear in paths are compared but are stripped from the baseline. - /// This makes the baseline durable between releases. This does mean however, entries - /// in the baseline may appear identical if the diff is version specific. - /// - [SkippableFact(new[] { Config.MsftSdkTarballPathEnv, Config.SdkTarballPathEnv }, skipOnNullOrWhiteSpace: true)] - public void CompareMsftToSb() - { - const string msftFileListingFileName = "msftSdkFiles.txt"; - const string sbFileListingFileName = "sbSdkFiles.txt"; - WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName, isPortable: true, "msft"); - WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName, isPortable: false, "sb"); - - string diff = BaselineHelper.DiffFiles(msftFileListingFileName, sbFileListingFileName, OutputHelper); - diff = RemoveDiffMarkers(diff); - BaselineHelper.CompareContents("MsftToSbSdk.diff", diff, OutputHelper, Config.WarnOnSdkContentDiffs); - } - - private void WriteTarballFileList(string? tarballPath, string outputFileName, bool isPortable, string sdkType) - { - if (!File.Exists(tarballPath)) - { - throw new InvalidOperationException($"Tarball path '{tarballPath}' does not exist."); - } - - string fileListing = ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"tf {tarballPath}", OutputHelper); - fileListing = BaselineHelper.RemoveRids(fileListing, isPortable); - fileListing = BaselineHelper.RemoveVersions(fileListing); - IEnumerable files = fileListing.Split(Environment.NewLine).OrderBy(path => path); - files = RemoveExclusions( - files, - GetExclusionFilters( - Path.Combine(BaselineHelper.GetAssetsDirectory(), "SdkDiffExclusions.txt"), - sdkType)); - - File.WriteAllLines(outputFileName, files); - } - - private static IEnumerable RemoveExclusions(IEnumerable files, IEnumerable exclusions) => - files.Where(item => !exclusions.Any(p => FileSystemName.MatchesSimpleExpression(p, item))); - - private static IEnumerable GetExclusionFilters(string exclusionsFilePath, string sdkType) - { - int prefixSkip = sdkType.Length + 1; - return File.ReadAllLines(exclusionsFilePath) - .Where(line => line.StartsWith(sdkType + ",")) // process only specific sdk exclusions - .Select(line => - { - // Ignore comments - var index = line.IndexOf('#'); - return index >= 0 ? line[prefixSkip..index].TrimEnd() : line[prefixSkip..]; - }) - .ToList(); - } - - private static string RemoveDiffMarkers(string source) - { - Regex indexRegex = new("^index .*", RegexOptions.Multiline); - string result = indexRegex.Replace(source, "index ------------"); - - Regex diffSegmentRegex = new("^@@ .* @@", RegexOptions.Multiline); - return diffSegmentRegex.Replace(result, "@@ ------------ @@"); - } -} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs deleted file mode 100644 index 867bb77a5..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using Xunit; - -namespace Microsoft.DotNet.SourceBuild.SmokeTests; - -/// -/// A Fact that will be skipped based on the specified environment variable's value. -/// -internal class SkippableFactAttribute : FactAttribute -{ - public SkippableFactAttribute(string envName, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) => - CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envName); - - public SkippableFactAttribute(string[] envNames, bool skipOnNullOrWhiteSpace = false, bool skipOnTrue = false) => - CheckEnvs(skipOnNullOrWhiteSpace, skipOnTrue, (skip) => Skip = skip, envNames); - - public static void CheckEnvs(bool skipOnNullOrWhiteSpace, bool skipOnTrue, Action setSkip, params string[] envNames) - { - foreach (string envName in envNames) - { - string? envValue = Environment.GetEnvironmentVariable(envName); - - if (skipOnNullOrWhiteSpace && string.IsNullOrWhiteSpace(envValue)) - { - setSkip($"Skipping because `{envName}` is null or whitespace"); - break; - } - else if (skipOnTrue && bool.TryParse(envValue, out bool boolValue) && boolValue) - { - setSkip($"Skipping because `{envName}` is set to True"); - break; - } - } - } -} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs deleted file mode 100644 index d706d3972..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Xunit.Abstractions; - -namespace Microsoft.DotNet.SourceBuild.SmokeTests; - -public static class Utilities -{ - public static async Task RetryAsync(Func executor, ITestOutputHelper outputHelper) - { - await Utilities.RetryAsync( - async () => - { - try - { - await executor(); - return null; - } - catch (Exception e) - { - return e; - } - }, - outputHelper); - } - - private static async Task RetryAsync(Func> executor, ITestOutputHelper outputHelper) - { - const int maxRetries = 5; - const int waitFactor = 5; - - int retryCount = 0; - - Exception? exception = await executor(); - while (exception != null) - { - retryCount++; - if (retryCount >= maxRetries) - { - throw new InvalidOperationException($"Failed after {retryCount} retries.", exception); - } - - int waitTime = Convert.ToInt32(Math.Pow(waitFactor, retryCount - 1)); - if (outputHelper != null) - { - outputHelper.WriteLine($"Retry {retryCount}/{maxRetries}, retrying in {waitTime} seconds..."); - } - - Thread.Sleep(TimeSpan.FromSeconds(waitTime)); - exception = await executor(); - } - } -} diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkDiffExclusions.txt b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkDiffExclusions.txt deleted file mode 100644 index 9f98e27e9..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/SdkDiffExclusions.txt +++ /dev/null @@ -1,33 +0,0 @@ -# This list is processed using FileSystemName.MatchesSimpleExpression -# -# Format -# {msft|sb}, [# comment] -# msft = Microsoft built SDK -# sb = source-built SDK -# -# Examples -# 'folder/*' matches 'folder/' and 'folder/abc' -# 'folder/?*' matches 'folder/abc' but not 'folder/' -# -# We do not want to filter-out folder entries, therefore, we should use: '?*' and not just '*' - -msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/?* # Intentional - source-build includes SDK Publishing package that target latest .NET TFM -msft,./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WindowsDesktop/?* # Intentional - explicitly excluded from source-build - -# vstest localization is disabled in Linux builds - https://github.com/microsoft/vstest/issues/4305 -msft,./sdk/x.y.z/*?/Microsoft.CodeCoverage.IO.resources.dll -msft,./sdk/x.y.z/*?/Microsoft.TestPlatform.*?.resources.dll -msft,./sdk/x.y.z/*?/Microsoft.VisualStudio.TestPlatform.*?.resources.dll -msft,./sdk/x.y.z/*?/Test.Utility.resources.dll -msft,./sdk/x.y.z/*?/vstest.console.resources.dll -msft,./sdk/x.y.z/Extensions/*?/Microsoft.TestPlatform.*?.resources.dll -msft,./sdk/x.y.z/Extensions/*?/Microsoft.VisualStudio.TestPlatform.*?.resources.dll -msft,./sdk/x.y.z/TestHost/*?/*?.resources.dll - -# nuget localization is not available for Linux builds - https://github.com/NuGet/Home/issues/12440 -msft,./sdk/x.y.z/*?/NuGet.*?.resources.dll -msft,./sdk/x.y.z/*?/Microsoft.Build.NuGetSdkResolver.resources.dll - -# ILMerge is not supported in Linux builds - excluding the whole NuGet.Build.Tasks.Pack directory, to avoid a noisy diff -msft,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*? -sb,./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/*? diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff deleted file mode 100644 index 537b03e4f..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff +++ /dev/null @@ -1,555 +0,0 @@ -diff --git a/msftSdkFiles.txt b/sbSdkFiles.txt -index ------------ ---- a/msftSdkFiles.txt -+++ b/sbSdkFiles.txt -@@ ------------ @@ - ./host/fxr/x.y.z/ - ./host/fxr/x.y.z/libhostfxr.so - ./LICENSE.txt -+./metadata/ -+./metadata/workloads/ -+./metadata/workloads/x.y.z/ -+./metadata/workloads/x.y.z/userlocal - ./packs/ - ./packs/Microsoft.AspNetCore.App.Ref/ - ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ -@@ ------------ @@ - ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.IO.Pipelines.xml - ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.Cryptography.Xml.dll - ./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.Cryptography.Xml.xml --./packs/Microsoft.NETCore.App.Host.portable-rid/ --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/ --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/ --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/ --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/ --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/apphost --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/coreclr_delegates.h --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/hostfxr.h --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.a --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.so --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/nethost.h --./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/singlefilehost -+./packs/Microsoft.NETCore.App.Host.banana-rid/ -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/ -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/ -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/ -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/ -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/apphost -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/coreclr_delegates.h -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/hostfxr.h -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.a -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.so -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/nethost.h -+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/singlefilehost - ./packs/Microsoft.NETCore.App.Ref/ - ./packs/Microsoft.NETCore.App.Ref/x.y.z/ - ./packs/Microsoft.NETCore.App.Ref/x.y.z/analyzers/ -@@ ------------ @@ - ./sdk/x.y.z/cs/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/cs/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/cs/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/cs/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/cs/MSBuild.resources.dll - ./sdk/x.y.z/cs/System.CommandLine.resources.dll - ./sdk/x.y.z/Current/ -@@ ------------ @@ - ./sdk/x.y.z/de/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/de/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/de/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/de/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/de/MSBuild.resources.dll - ./sdk/x.y.z/de/System.CommandLine.resources.dll - ./sdk/x.y.z/dotnet-watch.deps.json -@@ ------------ @@ - ./sdk/x.y.z/DotnetTools/dotnet-format/ru/Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/ru/Microsoft.CodeAnalysis.Workspaces.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/ru/System.CommandLine.resources.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/browser/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/browser/lib/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/browser/lib/netx.y/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/browser/lib/netx.y/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/win/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/win/lib/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/win/lib/netx.y/ -+./sdk/x.y.z/DotnetTools/dotnet-format/runtimes/win/lib/netx.y/System.Text.Encoding.CodePages.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Collections.Immutable.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.CommandLine.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.CommandLine.Rendering.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.Composition.AttributedModel.dll -@@ ------------ @@ - ./sdk/x.y.z/DotnetTools/dotnet-format/System.Composition.Hosting.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.Composition.Runtime.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.Composition.TypedParts.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Diagnostics.DiagnosticSource.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/System.IO.Pipelines.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Reflection.Metadata.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Text.Encoding.CodePages.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-format/System.Text.Json.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/tr/ - ./sdk/x.y.z/DotnetTools/dotnet-format/tr/dotnet-format.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-format/tr/Microsoft.CodeAnalysis.CSharp.Features.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/Microsoft.Extensions.FileSystemGlobbing.dll - ./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/Microsoft.Extensions.Primitives.dll - ./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/Newtonsoft.Json.dll -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/runtimes/ -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/runtimes/browser/ -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/runtimes/browser/lib/ -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/runtimes/browser/lib/netx.y/ -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/runtimes/browser/lib/netx.y/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-user-secrets/x.y.z/tools/netx.y/any/System.Text.Json.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/ - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/ - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/ -@@ ------------ @@ - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/ru/Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/ru/Microsoft.CodeAnalysis.Workspaces.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/ru/System.CommandLine.resources.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/browser/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/browser/lib/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/browser/lib/netx.y/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/browser/lib/netx.y/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/win/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/win/lib/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/win/lib/netx.y/ -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/runtimes/win/lib/netx.y/System.Text.Encoding.CodePages.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Collections.Immutable.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.CommandLine.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.AttributedModel.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.Convention.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.Hosting.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.Runtime.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Composition.TypedParts.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.IO.Pipelines.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Reflection.Metadata.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Text.Encoding.CodePages.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Text.Encodings.Web.dll -+./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/System.Text.Json.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/tr/ - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/tr/dotnet-watch.resources.dll - ./sdk/x.y.z/DotnetTools/dotnet-watch/x.y.z/tools/netx.y/any/tr/Microsoft.CodeAnalysis.CSharp.Features.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/es/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/es/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/es/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/es/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/es/MSBuild.resources.dll - ./sdk/x.y.z/es/System.CommandLine.resources.dll - ./sdk/x.y.z/Extensions/ --./sdk/x.y.z/Extensions/cs/ --./sdk/x.y.z/Extensions/de/ --./sdk/x.y.z/Extensions/es/ --./sdk/x.y.z/Extensions/fr/ --./sdk/x.y.z/Extensions/it/ --./sdk/x.y.z/Extensions/ja/ --./sdk/x.y.z/Extensions/ko/ --./sdk/x.y.z/Extensions/Microsoft.Diagnostics.NETCore.Client.dll - ./sdk/x.y.z/Extensions/Microsoft.TestPlatform.Extensions.BlameDataCollector.dll - ./sdk/x.y.z/Extensions/Microsoft.TestPlatform.Extensions.EventLogCollector.dll - ./sdk/x.y.z/Extensions/Microsoft.TestPlatform.TestHostRuntimeProvider.dll - ./sdk/x.y.z/Extensions/Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll - ./sdk/x.y.z/Extensions/Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll --./sdk/x.y.z/Extensions/pl/ --./sdk/x.y.z/Extensions/pt-BR/ --./sdk/x.y.z/Extensions/ru/ --./sdk/x.y.z/Extensions/tr/ --./sdk/x.y.z/Extensions/zh-Hans/ --./sdk/x.y.z/Extensions/zh-Hant/ - ./sdk/x.y.z/fr/ - ./sdk/x.y.z/fr/dotnet.resources.dll - ./sdk/x.y.z/fr/Microsoft.Build.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/fr/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/fr/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/fr/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/fr/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/fr/MSBuild.resources.dll - ./sdk/x.y.z/fr/System.CommandLine.resources.dll - ./sdk/x.y.z/FSharp/ -@@ ------------ @@ - ./sdk/x.y.z/FSharp/Microsoft.FSharp.Targets - ./sdk/x.y.z/FSharp/Microsoft.NET.StringTools.dll - ./sdk/x.y.z/FSharp/Microsoft.Portable.FSharp.Targets --./sdk/x.y.z/FSharp/Microsoft.Win32.SystemEvents.dll - ./sdk/x.y.z/FSharp/pl/ - ./sdk/x.y.z/FSharp/pl/FSharp.Build.resources.dll - ./sdk/x.y.z/FSharp/pl/FSharp.Compiler.Interactive.Settings.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/FSharp/ru/FSharp.Core.resources.dll - ./sdk/x.y.z/FSharp/ru/FSharp.DependencyManager.Nuget.resources.dll - ./sdk/x.y.z/FSharp/runtimes/ --./sdk/x.y.z/FSharp/runtimes/unix/ --./sdk/x.y.z/FSharp/runtimes/unix/lib/ --./sdk/x.y.z/FSharp/runtimes/unix/lib/netcoreapp3.0/ --./sdk/x.y.z/FSharp/runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll - ./sdk/x.y.z/FSharp/runtimes/win/ - ./sdk/x.y.z/FSharp/runtimes/win/lib/ --./sdk/x.y.z/FSharp/runtimes/win/lib/netcoreapp3.0/ --./sdk/x.y.z/FSharp/runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll --./sdk/x.y.z/FSharp/runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll --./sdk/x.y.z/FSharp/runtimes/win/lib/netcoreapp3.0/System.Windows.Extensions.dll --./sdk/x.y.z/FSharp/runtimes/win/lib/netstandard2.0/ --./sdk/x.y.z/FSharp/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/ -+./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/System.Security.AccessControl.dll - ./sdk/x.y.z/FSharp/runtimes/win/lib/netx.y/System.Security.Cryptography.Pkcs.dll --./sdk/x.y.z/FSharp/System.CodeDom.dll --./sdk/x.y.z/FSharp/System.Configuration.ConfigurationManager.dll --./sdk/x.y.z/FSharp/System.Drawing.Common.dll -+./sdk/x.y.z/FSharp/System.Formats.Asn1.dll - ./sdk/x.y.z/FSharp/System.Resources.Extensions.dll -+./sdk/x.y.z/FSharp/System.Security.AccessControl.dll - ./sdk/x.y.z/FSharp/System.Security.Cryptography.Pkcs.dll --./sdk/x.y.z/FSharp/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/FSharp/System.Security.Cryptography.Xml.dll --./sdk/x.y.z/FSharp/System.Security.Permissions.dll --./sdk/x.y.z/FSharp/System.Windows.Extensions.dll - ./sdk/x.y.z/FSharp/tr/ - ./sdk/x.y.z/FSharp/tr/FSharp.Build.resources.dll - ./sdk/x.y.z/FSharp/tr/FSharp.Compiler.Interactive.Settings.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/it/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/it/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/it/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/it/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/it/MSBuild.resources.dll - ./sdk/x.y.z/it/System.CommandLine.resources.dll - ./sdk/x.y.z/ja/ -@@ ------------ @@ - ./sdk/x.y.z/ja/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/ja/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/ja/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/ja/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/ja/MSBuild.resources.dll - ./sdk/x.y.z/ja/System.CommandLine.resources.dll - ./sdk/x.y.z/ko/ -@@ ------------ @@ - ./sdk/x.y.z/ko/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/ko/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/ko/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/ko/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/ko/MSBuild.resources.dll - ./sdk/x.y.z/ko/System.CommandLine.resources.dll - ./sdk/x.y.z/Microsoft.ApplicationInsights.dll -@@ ------------ @@ - ./sdk/x.y.z/Microsoft.DotNet.NativeWrapper.dll - ./sdk/x.y.z/Microsoft.DotNet.SdkResolver.dll - ./sdk/x.y.z/Microsoft.DotNet.TemplateLocator.dll --./sdk/x.y.z/Microsoft.Extensions.CommandLineUtils.dll - ./sdk/x.y.z/Microsoft.Extensions.Configuration.Abstractions.dll - ./sdk/x.y.z/Microsoft.Extensions.Configuration.Binder.dll - ./sdk/x.y.z/Microsoft.Extensions.Configuration.dll -@@ ------------ @@ - ./sdk/x.y.z/Microsoft.TestPlatform.PlatformAbstractions.deps.json - ./sdk/x.y.z/Microsoft.TestPlatform.PlatformAbstractions.dll - ./sdk/x.y.z/Microsoft.TestPlatform.targets -+./sdk/x.y.z/Microsoft.TestPlatform.TestHostRuntimeProvider.dll - ./sdk/x.y.z/Microsoft.TestPlatform.Utilities.dll - ./sdk/x.y.z/Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll --./sdk/x.y.z/Microsoft.TestPlatform.VsTestConsole.TranslationLayer.xml - ./sdk/x.y.z/Microsoft.VisualBasic.CrossTargeting.targets - ./sdk/x.y.z/Microsoft.VisualBasic.CurrentVersion.targets - ./sdk/x.y.z/Microsoft.VisualBasic.targets --./sdk/x.y.z/Microsoft.VisualStudio.Coverage.IO.dll - ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Client.dll - ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Common.dll -+./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll -+./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll - ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.ObjectModel.deps.json - ./sdk/x.y.z/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll - ./sdk/x.y.z/Microsoft.VisualStudioVersion.v11.Common.props - ./sdk/x.y.z/Microsoft.VisualStudioVersion.v12.Common.props - ./sdk/x.y.z/Microsoft.VisualStudioVersion.v14.Common.props - ./sdk/x.y.z/Microsoft.Win32.Msi.dll --./sdk/x.y.z/Microsoft.Win32.SystemEvents.dll - ./sdk/x.y.z/Microsoft/ - ./sdk/x.y.z/Microsoft/Microsoft.NET.Build.Extensions/ - ./sdk/x.y.z/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.ConflictResolution.targets -@@ ------------ @@ - ./sdk/x.y.z/pl/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/pl/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/pl/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/pl/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/pl/MSBuild.resources.dll - ./sdk/x.y.z/pl/System.CommandLine.resources.dll - ./sdk/x.y.z/pt-BR/ -@@ ------------ @@ - ./sdk/x.y.z/pt-BR/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/pt-BR/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/pt-BR/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/pt-BR/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/pt-BR/MSBuild.resources.dll - ./sdk/x.y.z/pt-BR/System.CommandLine.resources.dll - ./sdk/x.y.z/ref/ -+./sdk/x.y.z/ref/Microsoft.TestPlatform.PlatformAbstractions.dll -+./sdk/x.y.z/ref/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll -+./sdk/x.y.z/ref/MSBuild.dll - ./sdk/x.y.z/ref/mscorlib.dll - ./sdk/x.y.z/ref/netstandard.dll - ./sdk/x.y.z/Roslyn/ -@@ ------------ @@ - ./sdk/x.y.z/Roslyn/bincore/ru/Microsoft.CodeAnalysis.CSharp.resources.dll - ./sdk/x.y.z/Roslyn/bincore/ru/Microsoft.CodeAnalysis.resources.dll - ./sdk/x.y.z/Roslyn/bincore/ru/Microsoft.CodeAnalysis.VisualBasic.resources.dll -+./sdk/x.y.z/Roslyn/bincore/runtimes/ -+./sdk/x.y.z/Roslyn/bincore/runtimes/win/ -+./sdk/x.y.z/Roslyn/bincore/runtimes/win/lib/ -+./sdk/x.y.z/Roslyn/bincore/runtimes/win/lib/netcoreapp3.1/ -+./sdk/x.y.z/Roslyn/bincore/runtimes/win/lib/netcoreapp3.1/System.Text.Encoding.CodePages.dll - ./sdk/x.y.z/Roslyn/bincore/System.Collections.Immutable.dll - ./sdk/x.y.z/Roslyn/bincore/System.Reflection.Metadata.dll - ./sdk/x.y.z/Roslyn/bincore/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/Roslyn/bincore/System.Text.Encoding.CodePages.dll - ./sdk/x.y.z/Roslyn/bincore/tr/ - ./sdk/x.y.z/Roslyn/bincore/tr/Microsoft.CodeAnalysis.CSharp.resources.dll - ./sdk/x.y.z/Roslyn/bincore/tr/Microsoft.CodeAnalysis.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/ru/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/ru/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/ru/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/ru/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/ru/MSBuild.resources.dll - ./sdk/x.y.z/ru/System.CommandLine.resources.dll - ./sdk/x.y.z/RuntimeIdentifierGraph.json -@@ ------------ @@ - ./sdk/x.y.z/runtimes/any/native/NuGet.props - ./sdk/x.y.z/runtimes/any/native/NuGet.RestoreEx.targets - ./sdk/x.y.z/runtimes/any/native/NuGet.targets --./sdk/x.y.z/runtimes/unix/ --./sdk/x.y.z/runtimes/unix/lib/ --./sdk/x.y.z/runtimes/unix/lib/netcoreapp3.0/ --./sdk/x.y.z/runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll -+./sdk/x.y.z/runtimes/browser/ -+./sdk/x.y.z/runtimes/browser/lib/ -+./sdk/x.y.z/runtimes/browser/lib/netx.y/ -+./sdk/x.y.z/runtimes/browser/lib/netx.y/System.Text.Encodings.Web.dll - ./sdk/x.y.z/runtimes/win/ - ./sdk/x.y.z/runtimes/win/lib/ --./sdk/x.y.z/runtimes/win/lib/netcoreapp3.0/ --./sdk/x.y.z/runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll --./sdk/x.y.z/runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll --./sdk/x.y.z/runtimes/win/lib/netcoreapp3.0/System.Windows.Extensions.dll --./sdk/x.y.z/runtimes/win/lib/netstandard2.0/ --./sdk/x.y.z/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/runtimes/win/lib/netx.y/ - ./sdk/x.y.z/runtimes/win/lib/netx.y/System.Diagnostics.EventLog.dll - ./sdk/x.y.z/runtimes/win/lib/netx.y/System.Diagnostics.EventLog.Messages.dll -+./sdk/x.y.z/runtimes/win/lib/netx.y/System.Security.AccessControl.dll - ./sdk/x.y.z/runtimes/win/lib/netx.y/System.Security.Cryptography.Pkcs.dll -+./sdk/x.y.z/runtimes/win/lib/netx.y/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/runtimes/win/lib/netx.y/System.ServiceProcess.ServiceController.dll -+./sdk/x.y.z/runtimes/win/lib/netx.y/System.Text.Encoding.CodePages.dll - ./sdk/x.y.z/SDKPrecomputedAssemblyReferences.cache - ./sdk/x.y.z/SdkResolvers/ - ./sdk/x.y.z/SdkResolvers/Microsoft.Build.NuGetSdkResolver/ -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Buffers.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Collections.Immutable.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Memory.dll --./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Numerics.Vectors.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Reflection.Metadata.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/net472/System.Runtime.CompilerServices.Unsafe.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.ILLink.Tasks/tools/netx.y/ -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/targets/TransformTargets/Transforms/EnvironmentNoLocation.transform - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/targets/TransformTargets/Transforms/EnvironmentWithLocation.transform - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/ --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/net472/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/cs/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/cs/Microsoft.NET.Sdk.Publish.Tasks.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/lib/ --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/lib/netstandard2.0/ --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/lib/netx.y/ -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/runtimes/win/lib/netx.y/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/tr/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Publish/tools/netx.y/tr/Microsoft.NET.Sdk.Publish.Tasks.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Buffers.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Collections.Immutable.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Memory.dll --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Numerics.Vectors.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Reflection.Metadata.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Runtime.CompilerServices.Unsafe.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tasks/net472/System.Text.Encodings.Web.dll -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/rzc.deps.json - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/rzc.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/rzc.runtimeconfig.json -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/System.Collections.Immutable.dll -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/System.Reflection.Metadata.dll -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Razor/tools/System.Text.Encoding.CodePages.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web.ProjectSystem/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web.ProjectSystem/Sdk/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web.ProjectSystem/Sdk/Sdk.props -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/tools/netx.y/Microsoft.NET.Sdk.Web.Tasks.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/tools/netx.y/ref/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Web/tools/netx.y/ref/Microsoft.NET.Sdk.Web.Tasks.dll --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.WindowsDesktop/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk.Worker/Sdk/Sdk.props -@@ ------------ @@ - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Buffers.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Collections.Immutable.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Memory.dll --./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Numerics.Vectors.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Reflection.Metadata.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Runtime.CompilerServices.Unsafe.dll - ./sdk/x.y.z/Sdks/Microsoft.NET.Sdk/tools/net472/System.Text.Encodings.Web.dll -@@ ------------ @@ - ./sdk/x.y.z/Sdks/NuGet.Build.Tasks.Pack/ - ./sdk/x.y.z/System.CodeDom.dll - ./sdk/x.y.z/System.CommandLine.dll --./sdk/x.y.z/System.Configuration.ConfigurationManager.dll -+./sdk/x.y.z/System.Diagnostics.DiagnosticSource.dll - ./sdk/x.y.z/System.Diagnostics.EventLog.dll --./sdk/x.y.z/System.Drawing.Common.dll -+./sdk/x.y.z/System.Formats.Asn1.dll - ./sdk/x.y.z/System.Resources.Extensions.dll -+./sdk/x.y.z/System.Runtime.CompilerServices.Unsafe.dll -+./sdk/x.y.z/System.Security.AccessControl.dll - ./sdk/x.y.z/System.Security.Cryptography.Pkcs.dll - ./sdk/x.y.z/System.Security.Cryptography.ProtectedData.dll - ./sdk/x.y.z/System.Security.Cryptography.Xml.dll --./sdk/x.y.z/System.Security.Permissions.dll - ./sdk/x.y.z/System.ServiceProcess.ServiceController.dll --./sdk/x.y.z/System.Windows.Extensions.dll -+./sdk/x.y.z/System.Text.Encoding.CodePages.dll -+./sdk/x.y.z/System.Text.Encodings.Web.dll -+./sdk/x.y.z/System.Text.Json.dll -+./sdk/x.y.z/testhost.deps.json -+./sdk/x.y.z/testhost.dll -+./sdk/x.y.z/testhost.dll.config -+./sdk/x.y.z/testhost.runtimeconfig.json -+./sdk/x.y.z/testhost.x86 -+./sdk/x.y.z/testhost.x86.deps.json -+./sdk/x.y.z/testhost.x86.dll -+./sdk/x.y.z/testhost.x86.dll.config -+./sdk/x.y.z/testhost.x86.runtimeconfig.json - ./sdk/x.y.z/TestHost/ --./sdk/x.y.z/TestHost/cs/ --./sdk/x.y.z/TestHost/datacollector.exe --./sdk/x.y.z/TestHost/datacollector.exe.config --./sdk/x.y.z/TestHost/de/ --./sdk/x.y.z/TestHost/es/ --./sdk/x.y.z/TestHost/fr/ --./sdk/x.y.z/TestHost/it/ --./sdk/x.y.z/TestHost/ja/ --./sdk/x.y.z/TestHost/ko/ - ./sdk/x.y.z/TestHost/Microsoft.TestPlatform.CommunicationUtilities.dll - ./sdk/x.y.z/TestHost/Microsoft.TestPlatform.CoreUtilities.dll - ./sdk/x.y.z/TestHost/Microsoft.TestPlatform.CrossPlatEngine.dll -@@ ------------ @@ - ./sdk/x.y.z/TestHost/Microsoft.TestPlatform.Utilities.dll - ./sdk/x.y.z/TestHost/Microsoft.VisualStudio.TestPlatform.Common.dll - ./sdk/x.y.z/TestHost/Microsoft.VisualStudio.TestPlatform.ObjectModel.dll --./sdk/x.y.z/TestHost/msdia140typelib_clr0200.dll - ./sdk/x.y.z/TestHost/Newtonsoft.Json.dll - ./sdk/x.y.z/TestHost/NuGet.Frameworks.dll --./sdk/x.y.z/TestHost/pl/ --./sdk/x.y.z/TestHost/pt-BR/ --./sdk/x.y.z/TestHost/ru/ --./sdk/x.y.z/TestHost/System.Collections.Immutable.dll --./sdk/x.y.z/TestHost/System.Reflection.Metadata.dll --./sdk/x.y.z/TestHost/testhost.exe --./sdk/x.y.z/TestHost/testhost.exe.config --./sdk/x.y.z/TestHost/testhost.net452.exe --./sdk/x.y.z/TestHost/testhost.net452.exe.config --./sdk/x.y.z/TestHost/testhost.net452.x86.exe --./sdk/x.y.z/TestHost/testhost.net452.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net46.exe --./sdk/x.y.z/TestHost/testhost.net46.exe.config --./sdk/x.y.z/TestHost/testhost.net46.x86.exe --./sdk/x.y.z/TestHost/testhost.net46.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net461.exe --./sdk/x.y.z/TestHost/testhost.net461.exe.config --./sdk/x.y.z/TestHost/testhost.net461.x86.exe --./sdk/x.y.z/TestHost/testhost.net461.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net462.exe --./sdk/x.y.z/TestHost/testhost.net462.exe.config --./sdk/x.y.z/TestHost/testhost.net462.x86.exe --./sdk/x.y.z/TestHost/testhost.net462.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net47.exe --./sdk/x.y.z/TestHost/testhost.net47.exe.config --./sdk/x.y.z/TestHost/testhost.net47.x86.exe --./sdk/x.y.z/TestHost/testhost.net47.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net471.exe --./sdk/x.y.z/TestHost/testhost.net471.exe.config --./sdk/x.y.z/TestHost/testhost.net471.x86.exe --./sdk/x.y.z/TestHost/testhost.net471.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net472.exe --./sdk/x.y.z/TestHost/testhost.net472.exe.config --./sdk/x.y.z/TestHost/testhost.net472.x86.exe --./sdk/x.y.z/TestHost/testhost.net472.x86.exe.config --./sdk/x.y.z/TestHost/testhost.net48.exe --./sdk/x.y.z/TestHost/testhost.net48.exe.config --./sdk/x.y.z/TestHost/testhost.net48.x86.exe --./sdk/x.y.z/TestHost/testhost.net48.x86.exe.config --./sdk/x.y.z/TestHost/testhost.x86.exe --./sdk/x.y.z/TestHost/testhost.x86.exe.config --./sdk/x.y.z/TestHost/tr/ --./sdk/x.y.z/TestHost/x64/ --./sdk/x.y.z/TestHost/x64/msdia140.dll --./sdk/x.y.z/TestHost/x64/msdia140.dll.manifest --./sdk/x.y.z/TestHost/x86/ --./sdk/x.y.z/TestHost/x86/msdia140.dll --./sdk/x.y.z/TestHost/x86/msdia140.dll.manifest --./sdk/x.y.z/TestHost/zh-Hans/ --./sdk/x.y.z/TestHost/zh-Hant/ -+./sdk/x.y.z/TestHost/ref/ -+./sdk/x.y.z/TestHost/ref/testhost.dll -+./sdk/x.y.z/TestHost/ref/testhost.x86.dll -+./sdk/x.y.z/TestHost/testhost.deps.json -+./sdk/x.y.z/TestHost/testhost.dll -+./sdk/x.y.z/TestHost/testhost.dll.config -+./sdk/x.y.z/TestHost/testhost.runtimeconfig.json -+./sdk/x.y.z/TestHost/testhost.x86 -+./sdk/x.y.z/TestHost/testhost.x86.deps.json -+./sdk/x.y.z/TestHost/testhost.x86.dll -+./sdk/x.y.z/TestHost/testhost.x86.dll.config -+./sdk/x.y.z/TestHost/testhost.x86.runtimeconfig.json - ./sdk/x.y.z/tr/ - ./sdk/x.y.z/tr/dotnet.resources.dll - ./sdk/x.y.z/tr/Microsoft.Build.resources.dll -@@ ------------ @@ - ./sdk/x.y.z/tr/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/tr/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/tr/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/tr/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/tr/MSBuild.resources.dll - ./sdk/x.y.z/tr/System.CommandLine.resources.dll -+./sdk/x.y.z/vstest.console - ./sdk/x.y.z/vstest.console.deps.json - ./sdk/x.y.z/vstest.console.dll - ./sdk/x.y.z/vstest.console.dll.config -@@ ------------ @@ - ./sdk/x.y.z/zh-Hans/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/zh-Hans/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/zh-Hans/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/zh-Hans/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/zh-Hans/MSBuild.resources.dll - ./sdk/x.y.z/zh-Hans/System.CommandLine.resources.dll - ./sdk/x.y.z/zh-Hant/ -@@ ------------ @@ - ./sdk/x.y.z/zh-Hant/Microsoft.TemplateEngine.Edge.resources.dll - ./sdk/x.y.z/zh-Hant/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.resources.dll - ./sdk/x.y.z/zh-Hant/Microsoft.TemplateSearch.Common.resources.dll --./sdk/x.y.z/zh-Hant/Microsoft.VisualStudio.Coverage.IO.resources.dll - ./sdk/x.y.z/zh-Hant/MSBuild.resources.dll - ./sdk/x.y.z/zh-Hant/System.CommandLine.resources.dll - ./shared/ \ No newline at end of file diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt deleted file mode 100644 index 5bf77d895..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt +++ /dev/null @@ -1,1454 +0,0 @@ - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - - AssemblyAttribute - - diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config deleted file mode 100644 index 59db1a3f1..000000000 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs deleted file mode 100644 index 680327baf..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -// This task is sourced from https://github.com/microsoft/msbuild/blob/04e508c36f9c1fe826264aef7c26ffb8f16e9bdc/src/Tasks/DownloadFile.cs -// Contains further modifications in followup commits. -// It alleviates the problem of time outs on DownloadFile Task. We are not the version of msbuild that has this fix, hence we have to locally -// build it to get rid of the issue. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.DotNet.Build.Tasks; -using System; -using System.IO; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.Build.Tasks -{ - /// - /// Represents a task that can download a file. - /// - public sealed class DownloadFileSB : BuildTask, ICancelableTask - { - private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); - - /// - /// Gets or sets an optional filename for the destination file. By default, the filename is derived from the if possible. - /// - public ITaskItem DestinationFileName { get; set; } - - /// - /// Gets or sets a that specifies the destination folder to download the file to. - /// - [Required] - public ITaskItem DestinationFolder { get; set; } - - /// - /// Gets or sets a that contains details about the downloaded file. - /// - [Output] - public ITaskItem DownloadedFile { get; set; } - - /// - /// Gets or sets an optional number of times to retry if possible. - /// - public int Retries { get; set; } - - /// - /// Gets or sets the number of milliseconds to wait before retrying. - /// - public int RetryDelayMilliseconds { get; set; } = 5 * 1000; - - /// - /// Gets or sets an optional value indicating whether or not the download should be skipped if the file is up-to-date. - /// - public bool SkipUnchangedFiles { get; set; } = true; - - /// - /// Gets or sets the URL to download. - /// - [Required] - public string SourceUrl { get; set; } - - /// - /// Gets or sets the timeout for a successful download. If exceeded, the download continues - /// for another two timeout durations before failing. This makes it sometimes possible to - /// determine whether the timeout is just a little too short, or if the download would never - /// have finished. - /// - public string TimeoutSeconds { get; set; } - - /// - /// Gets or sets a to use. This is used by unit tests to mock a connection to a remote server. - /// - internal HttpMessageHandler HttpMessageHandler { get; set; } - - /// - public void Cancel() - { - _cancellationTokenSource.Cancel(); - } - - public override bool Execute() - { - return ExecuteAsync().GetAwaiter().GetResult(); - } - - private async Task ExecuteAsync() - { - if (!Uri.TryCreate(SourceUrl, UriKind.Absolute, out Uri uri)) - { - Log.LogError($"DownloadFileSB.ErrorInvalidUrl {SourceUrl}"); - return false; - } - - int retryAttemptCount = 0; - - CancellationToken cancellationToken = _cancellationTokenSource.Token; - - var startTime = DateTime.UtcNow; - - // Use the same API for the "success timeout" and the "would it ever succeed" timeout. - var timeout = TimeSpan.Zero; - var successCancellationTokenSource = new CancellationTokenSource(); - - if (double.TryParse(TimeoutSeconds, out double timeoutSeconds)) - { - timeout = TimeSpan.FromSeconds(timeoutSeconds); - Log.LogMessage(MessageImportance.High, $"DownloadFileSB timeout set to {timeout}"); - - successCancellationTokenSource.CancelAfter(timeout); - _cancellationTokenSource.CancelAfter((int)(timeout.TotalMilliseconds * 3)); - } - - while (true) - { - try - { - await DownloadAsync(uri, cancellationToken); - break; - } - catch (OperationCanceledException e) when (e.CancellationToken == cancellationToken) - { - // This task is being cancelled. Exit the loop. - break; - } - catch (Exception e) - { - bool canRetry = IsRetriable(e, out Exception actualException) && retryAttemptCount++ < Retries; - - if (canRetry) - { - Log.LogWarning($"DownloadFileSB.Retrying {SourceUrl} {retryAttemptCount + 1} {RetryDelayMilliseconds} {actualException}"); - - try - { - await Task.Delay(RetryDelayMilliseconds, cancellationToken).ConfigureAwait(false); - } - catch (OperationCanceledException delayException) when (delayException.CancellationToken == cancellationToken) - { - // This task is being cancelled, exit the loop - break; - } - } - else - { - Log.LogError($"DownloadFileSB.ErrorDownloading {SourceUrl} {actualException}"); - break; - } - } - } - - var finishTime = DateTime.UtcNow; - - if (successCancellationTokenSource.IsCancellationRequested) - { - string error = $"{TimeoutSeconds} second timeout exceeded"; - - if (!_cancellationTokenSource.IsCancellationRequested) - { - error += - $", but download completed after {finishTime - startTime}. " + - $"Try increasing timeout from {TimeoutSeconds} if this is acceptable."; - } - else - { - error += - $", and didn't complete within leeway after {finishTime - startTime}. " + - $"The download was likely never going to terminate. Investigate logs and " + - $"add additional logging if necessary."; - } - - Log.LogError(error); - } - else - { - Log.LogMessage( - MessageImportance.High, - $"DownloadFileSB.Downloading Complete! Elapsed: {finishTime - startTime}"); - } - - return !_cancellationTokenSource.IsCancellationRequested && !Log.HasLoggedErrors; - } - - /// - /// Attempts to download the file. - /// - /// The parsed of the request. - private async Task DownloadAsync(Uri uri, CancellationToken cancellationToken) - { - // The main reason to use HttpClient vs WebClient is because we can pass a message handler for unit tests to mock - using (var client = new HttpClient(HttpMessageHandler ?? new HttpClientHandler(), disposeHandler: true)) - { - // Only get the response without downloading the file so we can determine if the file is already up-to-date - using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false)) - { - try - { - response.EnsureSuccessStatusCode(); - } - catch (HttpRequestException e) - { - // HttpRequestException does not have the status code so its wrapped and thrown here so that later on we can determine - // if a retry is possible based on the status code - throw new CustomHttpRequestException(e.Message, e.InnerException, response.StatusCode); - } - - if (!TryGetFileName(response, out string filename)) - { - Log.LogError($"DownloadFileSB.ErrorUnknownFileName {SourceUrl} {nameof(DestinationFileName)}"); - return; - } - - DirectoryInfo destinationDirectory = Directory.CreateDirectory(DestinationFolder.ItemSpec); - - var destinationFile = new FileInfo(Path.Combine(destinationDirectory.FullName, filename)); - - // The file is considered up-to-date if its the same length. This could be inaccurate, we can consider alternatives in the future - if (ShouldSkip(response, destinationFile)) - { - Log.LogMessage(MessageImportance.Normal, $"DownloadFileSB.DidNotDownloadBecauseOfFileMatch {SourceUrl}", destinationFile.FullName, nameof(SkipUnchangedFiles), "true"); - - DownloadedFile = new TaskItem(destinationFile.FullName); - - return; - } - - var progressMonitorCancellationTokenSource = new CancellationTokenSource(); - CancellationToken progressMonitorToken = progressMonitorCancellationTokenSource.Token; - - try - { - cancellationToken.ThrowIfCancellationRequested(); - - var startTime = DateTime.UtcNow; - - var progressMonitor = Task.Run( - async () => - { - while (!progressMonitorToken.IsCancellationRequested) - { - destinationFile.Refresh(); - if (destinationFile.Exists) - { - long current = destinationFile.Length; - long total = response.Content.Headers.ContentLength ?? 1; - var elapsed = DateTime.UtcNow - startTime; - double kbytesPerSecond = current / elapsed.TotalSeconds / 1000.0; - - Log.LogMessage( - MessageImportance.High, - $"Progress... {elapsed}, " + - $"current file size {current / (double)total:00.0%} " + - $"({destinationFile.Length:#,0} / {total:#,0}) " + - $"~ {kbytesPerSecond:#,0.00} kB/s"); - } - await Task.Delay(TimeSpan.FromSeconds(5), progressMonitorToken); - } - }, - progressMonitorToken) - .ConfigureAwait(false); - - using (var target = new FileStream(destinationFile.FullName, FileMode.Create, FileAccess.Write, FileShare.None)) - { - Log.LogMessage( - MessageImportance.High, - $"DownloadFileSB.Downloading {SourceUrl} to " + - $"{destinationFile.FullName}"); - - Log.LogMessage( MessageImportance.Low, $"All response headers:\n{response.Headers}"); - Log.LogMessage( MessageImportance.Low, $"All content headers:\n{response.Content.Headers}"); - - using (Stream responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - { - await responseStream.CopyToAsync(target, 1024, cancellationToken).ConfigureAwait(false); - } - - Log.LogMessage(MessageImportance.High, $"DownloadFileSB.StreamCopyComplete {SourceUrl}"); - - DownloadedFile = new TaskItem(destinationFile.FullName); - } - } - finally - { - if (DownloadedFile == null) - { - // Delete the file if anything goes wrong during download. This could be destructive but we don't want to leave - // partially downloaded files on disk either. Alternatively we could download to a temporary location and copy - // on success but we are concerned about the added I/O - destinationFile.Delete(); - } - - progressMonitorCancellationTokenSource.Cancel(); - } - } - } - } - - /// - /// Determines if the specified exception is considered retriable. - /// - /// The originally thrown exception. - /// The actual exception to be used for logging errors. - /// true if the exception is retriable, otherwise false. - private static bool IsRetriable(Exception exception, out Exception actualException) - { - actualException = exception; - - // Get aggregate inner exception - if (actualException is AggregateException aggregateException && aggregateException.InnerException != null) - { - actualException = aggregateException.InnerException; - } - - // Some HttpRequestException have an inner exception that has the real error - if (actualException is HttpRequestException httpRequestException && httpRequestException.InnerException != null) - { - actualException = httpRequestException.InnerException; - - // An IOException inside of a HttpRequestException means that something went wrong while downloading - if (actualException is IOException) - { - return true; - } - } - - if (actualException is CustomHttpRequestException customHttpRequestException) - { - // A wrapped CustomHttpRequestException has the status code from the error - switch (customHttpRequestException.StatusCode) - { - case HttpStatusCode.InternalServerError: - case HttpStatusCode.RequestTimeout: - return true; - } - } - - if (actualException is WebException webException) - { - // WebException is thrown when accessing the Content of the response - switch (webException.Status) - { - // Don't retry on anything that cannot be compensated for - case WebExceptionStatus.TrustFailure: - case WebExceptionStatus.MessageLengthLimitExceeded: - case WebExceptionStatus.RequestProhibitedByCachePolicy: - case WebExceptionStatus.RequestProhibitedByProxy: - return false; - - default: - // Retry on all other WebExceptions - return true; - } - } - - return false; - } - - /// - /// Attempts to get the file name to use when downloading the file. - /// - /// The with information about the response. - /// Receives the name of the file. - /// true if a file name could be determined, otherwise false. - private bool TryGetFileName(HttpResponseMessage response, out string filename) - { - if (response == null) - { - throw new ArgumentNullException(nameof(response)); - } - - // Not all URIs contain a file name so users will have to specify one - // Example: http://www.download.com/file/1/ - - filename = !String.IsNullOrWhiteSpace(DestinationFileName?.ItemSpec) - ? DestinationFileName.ItemSpec // Get the file name from what the user specified - : response.Content?.Headers?.ContentDisposition?.FileName // Attempt to get the file name from the content-disposition header value - ?? Path.GetFileName(response.RequestMessage.RequestUri.LocalPath); // Otherwise attempt to get a file name from the URI - - return !String.IsNullOrWhiteSpace(filename); - } - - /// - /// Represents a wrapper around the that also contains the . - /// - private sealed class CustomHttpRequestException : HttpRequestException - { - public CustomHttpRequestException(string message, Exception inner, HttpStatusCode statusCode) - : base(message, inner) - { - StatusCode = statusCode; - } - - public HttpStatusCode StatusCode { get; } - } - - private bool ShouldSkip(HttpResponseMessage response, FileInfo destinationFile) - { - return SkipUnchangedFiles - && destinationFile.Exists - && destinationFile.Length == response.Content.Headers.ContentLength - && response.Content.Headers.LastModified.HasValue - && destinationFile.LastWriteTimeUtc > response.Content.Headers.LastModified.Value.UtcDateTime; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/GetSourceBuiltNupkgCacheConflicts.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/GetSourceBuiltNupkgCacheConflicts.cs deleted file mode 100644 index 7eb24ae1a..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/GetSourceBuiltNupkgCacheConflicts.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Packaging.Core; -using NuGet.Versioning; -using System; -using System.IO; -using System.Linq; - -namespace Microsoft.DotNet.SourceBuild.Tasks -{ - /// - /// For each source-built nupkg info given, ensure that if the package cache contains a package - /// with the same id and version, the cached nupkg is the same as the source-built one. - /// - /// If the package cache contains a package with the same package id and version as a - /// source-built one, nuget restore short-circuits and doesn't look for the source-built one. - /// This usually results in prebuilt packages being used, which can either break the build or - /// end up in the outputs. - /// - public class GetSourceBuiltNupkgCacheConflicts : Task - { - /// - /// Items containing package id and version of each source-built package. - /// ReadNuGetPackageInfos is recommended to generate these. - /// - /// %(Identity): Path to the original nupkg. - /// %(PackageId): Identity of the package. - /// %(PackageVersion): Version of the package. - /// - [Required] - public ITaskItem[] SourceBuiltPackageInfos { get; set; } - - /// - /// Package cache dir containing nupkgs to compare. Path is expected to be like: - /// - /// {PackageCacheDir}/{lowercase id}/{version}/{lowercase id}.{version}.nupkg - /// - [Required] - public string PackageCacheDir { get; set; } - - /// - /// Paths to packages to compare against when conflicts are detected. Knowing where the - /// package in the cache came from can help diagnose a conflict. For example, is it from - /// prebuilt/source-built? Or does the build not have the nupkg anywhere else, and - /// therefore it most likely came from the internet? - /// - public string[] KnownOriginPackagePaths { get; set; } - - [Output] - public ITaskItem[] ConflictingPackageInfos { get; set; } - - public override bool Execute() - { - DateTime startTime = DateTime.Now; - - var knownNupkgs = new Lazy>(() => - { - Log.LogMessage( - MessageImportance.Low, - $"Reading all {nameof(KnownOriginPackagePaths)} package identities to search " + - "for conflicting package origin..."); - - return KnownOriginPackagePaths.NullAsEmpty().ToLookup( - ReadNuGetPackageInfos.ReadIdentity, - path => path); - }); - - ConflictingPackageInfos = SourceBuiltPackageInfos - .Where(item => - { - string sourceBuiltPath = item.ItemSpec; - string id = item.GetMetadata("PackageId"); - string version = item.GetMetadata("PackageVersion"); - - string packageCachePath = Path.Combine( - PackageCacheDir, - id.ToLowerInvariant(), - version, - $"{id.ToLowerInvariant()}.{version}.nupkg"); - - if (!File.Exists(packageCachePath)) - { - Log.LogMessage( - MessageImportance.Low, - $"OK: Package not found in package cache: {id} {version}"); - return false; - } - - Log.LogMessage( - MessageImportance.Low, - $"Package id/version found in package cache, verifying: {id} {version}"); - - byte[] packageCacheBytes = File.ReadAllBytes(packageCachePath); - - if (packageCacheBytes.SequenceEqual(File.ReadAllBytes(sourceBuiltPath))) - { - Log.LogMessage( - MessageImportance.Low, - $"OK: Package in cache is identical to source-built: {id} {version}"); - return false; - } - - Log.LogMessage( - MessageImportance.Low, - "BAD: Source-built nupkg is not byte-for-byte identical " + - $"to nupkg in cache: {id} {version}"); - - var ident = new PackageIdentity(id, NuGetVersion.Parse(version)); - - string message = null; - - foreach (string knownNupkg in knownNupkgs.Value[ident]) - { - if (packageCacheBytes.SequenceEqual(File.ReadAllBytes(knownNupkg))) - { - Log.LogMessage( - MessageImportance.Low, - $"Found identity match with identical contents: {knownNupkg}"); - - message = (message ?? "Nupkg found at") + $" '{knownNupkg}'"; - } - else - { - Log.LogMessage( - MessageImportance.Low, - $"Package identity match, but contents differ: {knownNupkg}"); - } - } - - item.SetMetadata( - "WarningMessage", - message ?? - "Origin nupkg not found in build directory. It may have been " + - "downloaded by NuGet restore."); - - return true; - }) - .ToArray(); - - // Tell the user about this task, in case it takes a while. - Log.LogMessage( - MessageImportance.High, - "Checked cache for conflicts with source-built nupkgs. " + - $"Took {DateTime.Now - startTime}"); - - return !Log.HasLoggedErrors; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs deleted file mode 100644 index d463f53e8..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs +++ /dev/null @@ -1,376 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using NuGet; -using NuGet.Versioning; -using NuGet.Packaging; -using System; -using System.IO; -using System.Collections.Generic; -using System.Linq; -using NuGet.Common; - -namespace Microsoft.DotNet.Build.Tasks.Packaging -{ - public class NuGetPack : PackagingTask - { - /// - /// Target file paths to exclude when building the lib package for symbol server scenario - /// Copied from https://github.com/NuGet/NuGet.Client/blob/59433c7bacaae435a2cfe343cd441ea710579304/src/NuGet.Core/NuGet.Commands/PackCommandRunner.cs#L48 - /// - private static readonly string[] _libPackageExcludes = new[] { - @"**\*.pdb".Replace('\\', Path.DirectorySeparatorChar), - @"src\**\*".Replace('\\', Path.DirectorySeparatorChar) - }; - - /// - /// Target file paths to exclude when building the symbols package for symbol server scenario - /// - private static readonly string[] _symbolPackageExcludes = new[] { - @"content\**\*".Replace('\\', Path.DirectorySeparatorChar), - @"tools\**\*.ps1".Replace('\\', Path.DirectorySeparatorChar) - }; - - private static readonly string _defaultPackedPackagePrefix = "transport"; - private static readonly string _symbolsPackageExtension = ".symbols.nupkg"; - private static readonly string _packageExtension = ".nupkg"; - - [Required] - public ITaskItem[] Nuspecs - { - get; - set; - } - - [Required] - public string OutputDirectory - { - get; - set; - } - - public string BaseDirectory - { - get; - set; - } - - public string PackageVersion - { - get; - set; - } - - public bool ExcludeEmptyDirectories - { - get; - set; - } - // Create an additional ".symbols.nupkg" package - public bool CreateSymbolPackage - { - get; - set; - } - // Include symbols in standard package - public bool IncludeSymbolsInPackage - { - get; - set; - } - // Create an additional "packed package" that includes lib and src / symbols - public bool CreatePackedPackage - { - get; - set; - } - /// - /// Nuspec files can contain properties that are substituted with values at pack time - /// This task property passes through the nuspect properties. - /// Each item is a string with the syntax = - /// String validation for and is deffered to the Nuget APIs - /// - public ITaskItem[] NuspecProperties - { - get; - set; - } - - public ITaskItem[] AdditionalLibPackageExcludes - { - get; - set; - } - - public ITaskItem[] AdditionalSymbolPackageExcludes - { - get; - set; - } - - /// - /// If set, the symbol package is placed in the given directory. Otherwise OutputDirectory is used. - /// - public string SymbolPackageOutputDirectory - { - get; - set; - } - - public string PackedPackageNamePrefix - { - get; - set; - } - - public override bool Execute() - { - if (Nuspecs == null || Nuspecs.Length == 0) - { - Log.LogError("Nuspecs argument must be specified"); - return false; - } - - if (String.IsNullOrEmpty(OutputDirectory)) - { - Log.LogError("OuputDirectory argument must be specified"); - return false; - } - - if (!Directory.Exists(OutputDirectory)) - { - Directory.CreateDirectory(OutputDirectory); - } - - Func nuspecPropertyProvider = GetNuspecPropertyProviderFunction(NuspecProperties); - - foreach (var nuspec in Nuspecs) - { - string nuspecPath = nuspec.GetMetadata("FullPath"); - - if (!File.Exists(nuspecPath)) - { - Log.LogError($"Nuspec {nuspecPath} does not exist"); - continue; - } - - Manifest manifest = GetManifest(nuspecPath, nuspecPropertyProvider, false); - string nupkgPath = GetPackageOutputPath(nuspecPath, manifest, false, false); - Pack(nuspecPath, nupkgPath, manifest, IncludeSymbolsInPackage); - - bool packSymbols = CreateSymbolPackage || CreatePackedPackage; - if (CreateSymbolPackage) - { - Manifest symbolsManifest = GetManifest(nuspecPath, nuspecPropertyProvider, false); - nupkgPath = GetPackageOutputPath(nuspecPath, symbolsManifest, true, false); - Pack(nuspecPath, nupkgPath, symbolsManifest, packSymbols); - } - - if (CreatePackedPackage) - { - Manifest packedManifest = GetManifest(nuspecPath, nuspecPropertyProvider, true); - nupkgPath = GetPackageOutputPath(nuspecPath, packedManifest, false, true); - Pack(nuspecPath, nupkgPath, packedManifest, packSymbols); - } - } - - return !Log.HasLoggedErrors; - } - - private static Func GetNuspecPropertyProviderFunction(ITaskItem[] nuspecProperties) - { - return nuspecProperties == null ? null : NuspecPropertyStringProvider.GetNuspecPropertyProviderFunction(nuspecProperties.Select(p => p.ItemSpec).ToArray()); - } - - private Manifest GetManifest(string nuspecPath, Func nuspecPropertyProvider, bool isPackedPackage) - { - using (var nuspecFile = File.Open(nuspecPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete)) - { - string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory; - Manifest manifest = Manifest.ReadFrom(nuspecFile, nuspecPropertyProvider, false); - - if (isPackedPackage) - { - manifest = TransformManifestToPackedPackageManifest(manifest); - } - return manifest; - } - } - - private string GetPackageOutputPath(string nuspecPath, Manifest manifest, bool isSymbolsPackage, bool applyPrefix) - { - string id = manifest.Metadata.Id; - - if (String.IsNullOrEmpty(id)) - { - Log.LogError($"Nuspec {nuspecPath} does not contain a valid Id"); - return string.Empty; - } - - // Overriding the Version from the Metadata if one gets passed in. - if (!string.IsNullOrEmpty(PackageVersion)) - { - NuGetVersion overrideVersion; - if (NuGetVersion.TryParse(PackageVersion, out overrideVersion)) - { - manifest.Metadata.Version = overrideVersion; - } - else - { - Log.LogError($"Failed to parse Package Version: '{PackageVersion}' is not a valid version."); - } - } - - string version = manifest.Metadata.Version.ToString(); - - if (String.IsNullOrEmpty(version)) - { - Log.LogError($"Nuspec {nuspecPath} does not contain a valid version"); - return string.Empty; - } - - string nupkgOutputDirectory = OutputDirectory; - - if (isSymbolsPackage && !string.IsNullOrEmpty(SymbolPackageOutputDirectory)) - { - nupkgOutputDirectory = SymbolPackageOutputDirectory; - } - - string nupkgExtension = isSymbolsPackage ? _symbolsPackageExtension : _packageExtension; - return Path.Combine(nupkgOutputDirectory, $"{id}.{version}{nupkgExtension}"); - } - - public void Pack(string nuspecPath, string nupkgPath, Manifest manifest, bool packSymbols) - { - bool creatingSymbolsPackage = packSymbols && (Path.GetExtension(nupkgPath) == _symbolsPackageExtension); - try - { - PackageBuilder builder = new PackageBuilder(); - - string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory; - builder.Populate(manifest.Metadata); - builder.PopulateFiles(baseDirectoryPath, manifest.Files); - - if (creatingSymbolsPackage) - { - // For symbols packages, filter out excludes - PathResolver.FilterPackageFiles( - builder.Files, - file => file.Path, - SymbolPackageExcludes); - - // Symbol packages are only valid if they contain both symbols and sources. - Dictionary pathHasMatches = LibPackageExcludes.ToDictionary( - path => path, - path => PathResolver.GetMatches(builder.Files, file => file.Path, new[] { path }).Any()); - - if (!pathHasMatches.Values.Any(i => i)) - { - Log.LogMessage(LogImportance.Low, $"Nuspec {nuspecPath} does not contain symbol or source files. Not creating symbol package."); - return; - } - foreach (var pathPair in pathHasMatches.Where(pathMatchPair => !pathMatchPair.Value)) - { - Log.LogMessage(LogImportance.Low, $"Nuspec {nuspecPath} does not contain any files matching {pathPair.Key}. Not creating symbol package."); - return; - } - } - else if(!packSymbols) - { - // for packages which do not include symbols (not symbols or packed packages), filter lib excludes - PathResolver.FilterPackageFiles( - builder.Files, - file => file.Path, - LibPackageExcludes); - } - - var directory = Path.GetDirectoryName(nupkgPath); - if (!Directory.Exists(directory)) - { - Directory.CreateDirectory(directory); - } - - using (var fileStream = File.Create(nupkgPath)) - { - builder.Save(fileStream); - } - - Log.LogMessage($"Created '{nupkgPath}'"); - } - catch (Exception e) - { - string packageType = "lib"; - if (creatingSymbolsPackage) - { - packageType = "symbol"; - } - else if (packSymbols) - { - packageType = "packed"; - } - Log.LogError($"Error when creating nuget {packageType} package from {nuspecPath}. {e}"); - } - } - - private Manifest TransformManifestToPackedPackageManifest(Manifest manifest) - { - ManifestMetadata manifestMetadata = manifest.Metadata; - - // Update Id - string _packageNamePrefix = PackedPackageNamePrefix != null ? PackedPackageNamePrefix : _defaultPackedPackagePrefix; - manifestMetadata.Id = $"{_packageNamePrefix}.{manifestMetadata.Id}"; - - // Update dependencies - List packedPackageDependencyGroups = new List(); - foreach(var dependencyGroup in manifestMetadata.DependencyGroups) - { - List packages = new List(); - foreach(var dependency in dependencyGroup.Packages) - { - NuGet.Packaging.Core.PackageDependency package = new NuGet.Packaging.Core.PackageDependency($"{_packageNamePrefix}.{dependency.Id}", dependency.VersionRange, dependency.Include, dependency.Exclude); - packages.Add(package); - } - PackageDependencyGroup packageDependencyGroup = new PackageDependencyGroup(dependencyGroup.TargetFramework, packages); - packedPackageDependencyGroups.Add(packageDependencyGroup); - } - manifestMetadata.DependencyGroups = packedPackageDependencyGroups; - - // Update runtime.json - List manifestFiles = new List(); - - foreach(ManifestFile file in manifest.Files) - { - string fileName = file.Source; - if(Path.GetFileName(fileName) == "runtime.json" && file.Target == "") - { - string packedPackageSourcePath = Path.Combine(Path.GetDirectoryName(fileName), string.Join(".", _packageNamePrefix, Path.GetFileName(fileName))); - file.Source = File.Exists(packedPackageSourcePath) ? packedPackageSourcePath : fileName; - file.Target = "runtime.json"; - } - manifestFiles.Add(file); - } - Manifest packedPackageManifest = new Manifest(manifestMetadata, manifestFiles); - return manifest; - } - - private IEnumerable LibPackageExcludes - { - get - { - return _libPackageExcludes - .Concat(AdditionalLibPackageExcludes?.Select(item => item.ItemSpec) ?? Enumerable.Empty()); - } - } - - private IEnumerable SymbolPackageExcludes - { - get - { - return _symbolPackageExcludes - .Concat(AdditionalSymbolPackageExcludes?.Select(item => item.ItemSpec) ?? Enumerable.Empty()); - } - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs deleted file mode 100644 index d10fad1b2..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Collections.Generic; - -namespace Microsoft.DotNet.Build.Tasks.Packaging -{ - public class NuspecPropertyStringProvider - { - public static Dictionary GetNuspecPropertyDictionary(string[] nuspecProperties) - { - if (nuspecProperties == null) - { - return null; - } - - var propertyDictionary = new Dictionary(); - foreach (var propertyString in nuspecProperties) - { - var property = GetKeyValuePair(propertyString); - propertyDictionary[property.Item1] = property.Item2; - } - - return propertyDictionary; - } - - public static Func GetNuspecPropertyProviderFunction(string[] nuspecPropertyStrings) - { - var propertyDictionary = GetNuspecPropertyDictionary(nuspecPropertyStrings); - - if (propertyDictionary == null) - { - return null; - } - - return k => propertyDictionary[k]; - } - - private static Tuple GetKeyValuePair(string propertyString) - { - propertyString = propertyString.Trim(); - - var indexOfEquals = propertyString.IndexOf("=", StringComparison.Ordinal); - - if (indexOfEquals == -1) - { - throw new InvalidDataException($"Nuspec property {propertyString} does not have an \'=\' character in it"); - } - - if (indexOfEquals == propertyString.Length - 1) - { - throw new InvalidDataException($"Nuspec property {propertyString} does not have a value"); - } - - if (indexOfEquals == 0) - { - throw new InvalidDataException($"Nuspec property {propertyString} does not have a key"); - } - - var key = propertyString.Substring(0, indexOfEquals); - - var valueStartIndex = indexOfEquals + 1; - var valueLength = propertyString.Length - valueStartIndex; - var value = propertyString.Substring(valueStartIndex, valueLength); - - return new Tuple(key, value); - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs deleted file mode 100644 index a4519ead5..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Build.Tasks -{ - /// - /// Replaces feeds in a NuGet.Config file given a mapping - /// of old feeds to new feeds. - /// - public class ReplaceFeedsInNuGetConfig : Task - { - /// - /// The NuGet.Config file in which to replace feeds. - /// - [Required] - public string InputFile { get; set; } - - /// - /// An item group of feeds to update. - /// %(Identity): The feed URL to find in the NuGet.Config. - /// %(NewFeed): The feed URL to replace %(Identity) with. - /// - [Required] - public ITaskItem[] FeedMapping { get; set; } - - public override bool Execute() - { - string fileContents = File.ReadAllText(InputFile); - bool updated = false; - - foreach (var feed in FeedMapping) - { - string oldFeed = feed.ItemSpec; - string newFeed = feed.GetMetadata("NewFeed"); - - if (fileContents.Contains(oldFeed)) - { - fileContents = fileContents.Replace(oldFeed, newFeed); - updated = true; - } - } - - if (updated) File.WriteAllText(InputFile, fileContents); - - return true; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs deleted file mode 100644 index 9b0d2e10c..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text.RegularExpressions; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class ReplaceRegexInFiles : Task - { - [Required] - public string[] InputFiles { get; set; } - - [Required] - public string OldTextRegex { get; set; } - - [Required] - public string NewText { get; set; } - - public override bool Execute() - { - Log.LogMessage($"Replacing '{OldTextRegex}' with '{NewText}'"); - foreach (string file in InputFiles) - { - string fileContents = File.ReadAllText(file); - - fileContents = Regex.Replace(fileContents, OldTextRegex, NewText); - - File.WriteAllText(file, fileContents); - } - - return true; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs deleted file mode 100644 index fb1d2fe4d..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Packaging; -using NuGet.Packaging.Core; -using NuGet.Versioning; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class WriteBuildOutputProps : Task - { - private static readonly Regex InvalidElementNameCharRegex = new Regex(@"(^|[^A-Za-z0-9])(?.)"); - - public const string CreationTimePropertyName = "BuildOutputPropsCreationTime"; - - [Required] - public ITaskItem[] NuGetPackages { get; set; } - - [Required] - public string OutputPath { get; set; } - - /// - /// Adds a second PropertyGroup to the output XML containing a property with the time of - /// creation in UTC DateTime Ticks. This can be used to track creation time in situations - /// where file metadata isn't reliable or preserved. - /// - public bool IncludeCreationTimeProperty { get; set; } - - /// - /// Properties to add to the build output props, which may not exist as nupkgs. - /// FOr example, this is used to pass the version of the CLI toolset archives. - /// - /// %(Identity): Package identity. - /// %(Version): Package version. - /// - public ITaskItem[] ExtraProperties { get; set; } - - /// - /// Additional assets to be added to the build output props. - /// i.e. /bin/obj/x64/Release/blobs/Toolset/3.0.100 - /// This parameter is the / portion only, and the asset - /// must be in a / folder. - /// - public string[] AdditionalAssetDirs { get; set; } - - public override bool Execute() - { - PackageIdentity[] latestPackages = NuGetPackages - .Select(item => - { - using (var reader = new PackageArchiveReader(item.GetMetadata("FullPath"))) - { - return reader.GetIdentity(); - } - }) - .GroupBy(identity => identity.Id) - .Select(g => g.OrderBy(id => id.Version).Last()) - .OrderBy(id => id.Id) - .ToArray(); - - var additionalAssets = (AdditionalAssetDirs ?? new string[0]) - .Where(Directory.Exists) - .Where(dir => Directory.GetDirectories(dir).Count() > 0) - .Select(dir => new { - Name = new DirectoryInfo(dir).Name + "Version", - Version = new DirectoryInfo(Directory.EnumerateDirectories(dir).OrderBy(s => s).Last()).Name - }).ToArray(); - - Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); - - using (var outStream = File.Open(OutputPath, FileMode.Create)) - using (var sw = new StreamWriter(outStream, new UTF8Encoding(false))) - { - sw.WriteLine(@""); - sw.WriteLine(@""); - sw.WriteLine(@" "); - foreach (PackageIdentity packageIdentity in latestPackages) - { - string propertyName = GetPropertyName(packageIdentity.Id); - sw.WriteLine($" <{propertyName}>{packageIdentity.Version}"); - - propertyName = GetAlternatePropertyName(packageIdentity.Id); - sw.WriteLine($" <{propertyName}>{packageIdentity.Version}"); - } - foreach (var extraProp in ExtraProperties ?? Enumerable.Empty()) - { - string propertyName = extraProp.GetMetadata("Identity"); - bool doNotOverwrite = false; - string overwriteCondition = string.Empty; - if (bool.TryParse(extraProp.GetMetadata("DoNotOverwrite"), out doNotOverwrite) && doNotOverwrite) - { - overwriteCondition = $" Condition=\"'$({propertyName})' == ''\""; - } - sw.WriteLine($" <{propertyName}{overwriteCondition}>{extraProp.GetMetadata("Version")}"); - } - foreach (var additionalAsset in additionalAssets) - { - sw.WriteLine($" <{additionalAsset.Name}>{additionalAsset.Version}"); - } - sw.WriteLine(@" "); - if (IncludeCreationTimeProperty) - { - sw.WriteLine(@" "); - sw.WriteLine($@" <{CreationTimePropertyName}>{DateTime.UtcNow.Ticks}"); - sw.WriteLine(@" "); - } - sw.WriteLine(@""); - } - - return true; - } - - public static string GetPropertyName(string id) - { - string formattedId = InvalidElementNameCharRegex.Replace( - id, - match => match.Groups?["FirstPartChar"].Value.ToUpperInvariant() - ?? string.Empty); - - return $"{formattedId}PackageVersion"; - } - - public static string GetAlternatePropertyName(string id) - { - string formattedId = InvalidElementNameCharRegex.Replace( - id, - match => match.Groups?["FirstPartChar"].Value.ToUpperInvariant() - ?? string.Empty); - - return $"{formattedId}Version"; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs deleted file mode 100644 index ee8a9ba7d..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Packaging; -using NuGet.Packaging.Core; -using NuGet.Versioning; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class WriteRestoreSourceAndVersionProps : Task - { - private static readonly Regex InvalidElementNameCharRegex = new Regex(@"(^|[^A-Za-z0-9])(?.)"); - - public const string CreationTimePropertyName = "BuildOutputPropsCreationTime"; - - [Required] - public ITaskItem[] RestoreSources { get; set; } - - [Required] - public ITaskItem[] NuGetPackages { get; set; } - - [Required] - public string OutputPath { get; set; } - - /// - /// Adds a second PropertyGroup to the output XML containing a property with the time of - /// creation in UTC DateTime Ticks. This can be used to track creation time in situations - /// where file metadata isn't reliable or preserved. - /// - public bool IncludeCreationTimeProperty { get; set; } - - /// - /// Properties to add to the build output props, which may not exist as nupkgs. - /// FOr example, this is used to pass the version of the CLI toolset archives. - /// - /// %(Identity): Package identity. - /// %(Version): Package version. - /// - public ITaskItem[] ExtraProperties { get; set; } - - /// - /// Additional assets to be added to the build output props. - /// i.e. /bin/obj/x64/Release/blobs/Toolset/3.0.100 - /// This parameter is the / portion only, and the asset - /// must be in a / folder. - /// - public string[] AdditionalAssetDirs { get; set; } - - public override bool Execute() - { - PackageIdentity[] latestPackages = NuGetPackages - .Select(item => - { - using (var reader = new PackageArchiveReader(item.GetMetadata("FullPath"))) - { - return reader.GetIdentity(); - } - }) - .GroupBy(identity => identity.Id) - .Select(g => g.OrderBy(id => id.Version).Last()) - .OrderBy(id => id.Id) - .ToArray(); - - var additionalAssets = (AdditionalAssetDirs ?? new string[0]) - .Where(Directory.Exists) - .Where(dir => Directory.GetDirectories(dir).Count() > 0) - .Select(dir => new { - Name = new DirectoryInfo(dir).Name + "Version", - Version = new DirectoryInfo(Directory.EnumerateDirectories(dir).OrderBy(s => s).Last()).Name - }).ToArray(); - - Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); - - using (var outStream = File.Open(OutputPath, FileMode.Create)) - using (var sw = new StreamWriter(outStream, new UTF8Encoding(false))) - { - sw.WriteLine(@""); - sw.WriteLine(@""); - sw.WriteLine(@" "); - sw.WriteLine(@" "); - foreach (ITaskItem restoreSourceItem in RestoreSources) - { - sw.WriteLine($" {restoreSourceItem.ItemSpec};"); - } - sw.WriteLine(@" "); - sw.WriteLine(@" "); - - sw.WriteLine(@" "); - foreach (PackageIdentity packageIdentity in latestPackages) - { - string propertyName = GetPropertyName(packageIdentity.Id); - string shortPropertyName = GetShortPropertyName(packageIdentity.Id); - - sw.WriteLine($" <{propertyName}>{packageIdentity.Version}"); - sw.WriteLine($" <{shortPropertyName}>{packageIdentity.Version}"); - } - foreach (var extraProp in ExtraProperties ?? Enumerable.Empty()) - { - string propertyName = extraProp.GetMetadata("Identity"); - bool doNotOverwrite = false; - string overwriteCondition = string.Empty; - if (bool.TryParse(extraProp.GetMetadata("DoNotOverwrite"), out doNotOverwrite) && doNotOverwrite) - { - overwriteCondition = $" Condition=\"'$({propertyName})' == ''\""; - } - sw.WriteLine($" <{propertyName}{overwriteCondition}>{extraProp.GetMetadata("Version")}"); - } - foreach (var additionalAsset in additionalAssets) - { - sw.WriteLine($" <{additionalAsset.Name}>{additionalAsset.Version}"); - } - sw.WriteLine(@" "); - - if (IncludeCreationTimeProperty) - { - sw.WriteLine(@" "); - sw.WriteLine($@" <{CreationTimePropertyName}>{DateTime.UtcNow.Ticks}"); - sw.WriteLine(@" "); - } - - sw.WriteLine(@""); - } - - return true; - } - - public static string GetPropertyName(string id) - { - string formattedId = InvalidElementNameCharRegex.Replace( - id, - match => match.Groups?["FirstPartChar"].Value.ToUpperInvariant() - ?? string.Empty); - - return $"{formattedId}PackageVersion"; - } - - public static string GetShortPropertyName(string id) - { - string formattedId = InvalidElementNameCharRegex.Replace( - id, - match => match.Groups?["FirstPartChar"].Value.ToUpperInvariant() - ?? string.Empty); - - return $"{formattedId}Version"; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs deleted file mode 100644 index 8e983531b..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System.IO; -using System.Text; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class WriteRestoreSourceProps : Task - { - [Required] - public ITaskItem[] RestoreSources { get; set; } - - [Required] - public string OutputPath { get; set; } - - public override bool Execute() - { - Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); - - using (var outStream = File.Open(OutputPath, FileMode.Create)) - using (var sw = new StreamWriter(outStream, new UTF8Encoding(false))) - { - sw.WriteLine(@""); - sw.WriteLine(@""); - sw.WriteLine(@" "); - sw.WriteLine(@" "); - foreach (ITaskItem restoreSourceItem in RestoreSources) - { - sw.WriteLine($" {restoreSourceItem.ItemSpec};"); - } - sw.WriteLine(@" "); - sw.WriteLine(@" "); - sw.WriteLine(@""); - } - - return true; - } - } -} diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs b/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs deleted file mode 100755 index e4ba279f7..000000000 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using NuGet.Packaging; -using NuGet.Packaging.Core; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class WriteVersionsFile : Task - { - [Required] - public ITaskItem[] NugetPackages { get; set; } - - [Required] - public string OutputPath { get; set; } - - public override bool Execute() - { - Directory.CreateDirectory(Path.GetDirectoryName(OutputPath)); - - using (Stream outStream = File.Open(OutputPath, FileMode.Create)) - { - using (StreamWriter sw = new StreamWriter(outStream, new UTF8Encoding(false))) - { - foreach (ITaskItem nugetPackage in NugetPackages) - { - using (PackageArchiveReader par = new PackageArchiveReader(nugetPackage.GetMetadata("FullPath"))) - { - PackageIdentity packageIdentity = par.GetIdentity(); - sw.WriteLine($"{packageIdentity.Id} {packageIdentity.Version}"); - } - } - } - } - - return true; - } - } -} diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0004-Revert-sourcelink-submodule-workaround.patch b/src/SourceBuild/tarball/patches/aspnetcore/0004-Revert-sourcelink-submodule-workaround.patch deleted file mode 100644 index d2e2622ff..000000000 --- a/src/SourceBuild/tarball/patches/aspnetcore/0004-Revert-sourcelink-submodule-workaround.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9b529c2f911e9a7ad25586d0d4a8db8bc5a7b2e5 Mon Sep 17 00:00:00 2001 -From: Michael Simons -Date: Thu, 5 Aug 2021 22:44:48 +0000 -Subject: [PATCH] Revert sourcelink submodule workaround - -aspnetcore will fail the offline tarball build because of the sourcelink workaround being removed here. -To fix this, a sourcelink patch was added to address the issue. ---- - eng/SourceBuild.props | 14 -------------- - 1 file changed, 14 deletions(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index 3dbfe2ce7e..403b91f976 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -2,7 +2,6 @@ - - aspnetcore - true -- false - - - - - -- -- -- -- -- -- - - true - false -+ true - - diff --git a/src/SourceBuild/tarball/patches/razor-compiler/0002-retarget-Razor-Syntax-Genreator-to-net6.0.patch b/src/SourceBuild/tarball/patches/razor-compiler/0002-retarget-Razor-Syntax-Genreator-to-net6.0.patch deleted file mode 100644 index e101f8041..000000000 --- a/src/SourceBuild/tarball/patches/razor-compiler/0002-retarget-Razor-Syntax-Genreator-to-net6.0.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Logan Bussell -Date: Thu, 14 Apr 2022 16:27:26 -0700 -Subject: [PATCH] retarget Razor Syntax Genreator to net6.0 - -Backport PR: https://github.com/dotnet/razor-compiler/pull/226 ---- - src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj b/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj -index 924379ac..362f0e3b 100644 ---- a/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj -+++ b/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj -@@ -3,6 +3,7 @@ - - Generates Razor syntax nodes from xml. For internal use only. - netcoreapp3.1 -+ net6.0 - dotnet-razorsyntaxgenerator - RazorSyntaxGenerator - Exe diff --git a/src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch b/src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch deleted file mode 100644 index 953624bfd..000000000 --- a/src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Eric Erhardt -Date: Tue, 19 Oct 2021 11:12:25 -0500 -Subject: [PATCH] Eliminate pre-built assets during source-build for - roslyn-analyzers - -This is taking the approach used in previous versions of source-build: update the dependency versions of Microsoft.CodeAnalysis to the version currently being built by source-build. This is a short-term solution to get unblocked in the 6.0.0 timeframe. In the future, the previous Microsoft.CodeAnalysis versions will be available in SBRP. - -* Remove SourceBuildPackageVersionPropsPath at the top of Versions.props. The PVP from source-build will be imported after the repo's Versions.props -* Workaround a naming collison with DocumentBasedFixAllProvider. The latest Roslyn has a class with the same name. -* Remove hard-coded versions to Microsoft.CodeAnalysis in ResxSourceGenerator, Roslyn.Diagnostics.Analyzers, and GenerateDocumentationAndConfigFiles, so the latest gets picked up. -* Exclude ReleaseNotesUtil from source-build since it brings in the 3.1 app host. This tool shouldn't be needed during source-build. -* Disable BannedApiAnalyzers when in source-build. Other previously built code analysis packages are disabled already. - -Contributes to https://github.com/dotnet/source-build/issues/2420 -Contributes to https://github.com/dotnet/source-build/issues/2527 ---- - eng/Versions.props | 14 -------------- - src/Directory.Build.targets | 5 +++-- - .../Core/MetaAnalyzers/Fixers/PreferIsKindFix.cs | 2 +- - ....CodeAnalysis.ResxSourceGenerator.CSharp.csproj | 1 - - ...Analysis.ResxSourceGenerator.VisualBasic.csproj | 1 - - ...crosoft.CodeAnalysis.ResxSourceGenerator.csproj | 1 - - .../DoNotDirectlyAwaitATask.Fixer.cs | 2 +- - .../Roslyn.Diagnostics.CSharp.Analyzers.csproj | 2 +- - .../Core/Roslyn.Diagnostics.Analyzers.csproj | 1 - - ...Roslyn.Diagnostics.VisualBasic.Analyzers.vbproj | 2 +- - .../GenerateDocumentationAndConfigFiles.csproj | 1 - - ...umentationAndConfigFilesForBrokenRuntime.csproj | 4 +--- - src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj | 1 + - 13 files changed, 9 insertions(+), 28 deletions(-) - -diff --git a/eng/Versions.props b/eng/Versions.props -index 46d30b3bd..635f8bb5c 100644 ---- a/eng/Versions.props -+++ b/eng/Versions.props -@@ -1,18 +1,4 @@ - -- -- -- -- $(SystemCollectionsImmutableVersion) -- 5.0.0 -- $(SystemReflectionMetadataVersion) -- 5.0.0 -- $(MicrosoftCodeAnalysisVersion) -- 3.8.0 -- - - 3.3.3 - beta1 -diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets -index c7c28fd9f..e5be9e028 100644 ---- a/src/Directory.Build.targets -+++ b/src/Directory.Build.targets -@@ -35,8 +35,9 @@ - AnalyzerReleases\$(AssemblyName)\AnalyzerReleases.Shipped.md - - -- -- -+ -+ -+ - - - -diff --git a/src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/Fixers/PreferIsKindFix.cs b/src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/Fixers/PreferIsKindFix.cs -index 7a6877e0e..a0cbd06e7 100644 ---- a/src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/Fixers/PreferIsKindFix.cs -+++ b/src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/Fixers/PreferIsKindFix.cs -@@ -48,7 +48,7 @@ private async Task ConvertKindToIsKindAsync(Document document, TextSpa - - protected abstract void FixDiagnostic(DocumentEditor editor, SyntaxNode nodeToFix); - -- private sealed class CustomFixAllProvider : DocumentBasedFixAllProvider -+ private sealed class CustomFixAllProvider : Analyzer.Utilities.DocumentBasedFixAllProvider - { - private readonly PreferIsKindFix _fixer; - -diff --git a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.csproj b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.csproj -index 114e30a43..e38f8549f 100644 ---- a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.csproj -+++ b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp/Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.csproj -@@ -7,7 +7,6 @@ - - - *$(MSBuildProjectFile)* -- 3.9.0 - - - -diff --git a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.csproj b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.csproj -index a44df8a50..cba084cd5 100644 ---- a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.csproj -+++ b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic/Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.csproj -@@ -7,7 +7,6 @@ - - - *$(MSBuildProjectFile)* -- 3.9.0 - - - -diff --git a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.csproj b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.csproj -index 46a4fca6b..c9fa15584 100644 ---- a/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.csproj -+++ b/src/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator/Microsoft.CodeAnalysis.ResxSourceGenerator.csproj -@@ -7,7 +7,6 @@ - - - *$(MSBuildProjectFile)* -- 3.9.0 - - - -diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDirectlyAwaitATask.Fixer.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDirectlyAwaitATask.Fixer.cs -index 738fdebf2..6d13947ce 100644 ---- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDirectlyAwaitATask.Fixer.cs -+++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotDirectlyAwaitATask.Fixer.cs -@@ -82,7 +82,7 @@ private class MyCodeAction : DocumentChangeAction - } - } - -- private sealed class CustomFixAllProvider : DocumentBasedFixAllProvider -+ private sealed class CustomFixAllProvider : Analyzer.Utilities.DocumentBasedFixAllProvider - { - public static readonly CustomFixAllProvider Instance = new(); - -diff --git a/src/Roslyn.Diagnostics.Analyzers/CSharp/Roslyn.Diagnostics.CSharp.Analyzers.csproj b/src/Roslyn.Diagnostics.Analyzers/CSharp/Roslyn.Diagnostics.CSharp.Analyzers.csproj -index e62266894..b858d7097 100644 ---- a/src/Roslyn.Diagnostics.Analyzers/CSharp/Roslyn.Diagnostics.CSharp.Analyzers.csproj -+++ b/src/Roslyn.Diagnostics.Analyzers/CSharp/Roslyn.Diagnostics.CSharp.Analyzers.csproj -@@ -10,7 +10,7 @@ - - - -- -+ - - - -\ No newline at end of file -diff --git a/src/Roslyn.Diagnostics.Analyzers/Core/Roslyn.Diagnostics.Analyzers.csproj b/src/Roslyn.Diagnostics.Analyzers/Core/Roslyn.Diagnostics.Analyzers.csproj -index 60450aee0..3489028d4 100644 ---- a/src/Roslyn.Diagnostics.Analyzers/Core/Roslyn.Diagnostics.Analyzers.csproj -+++ b/src/Roslyn.Diagnostics.Analyzers/Core/Roslyn.Diagnostics.Analyzers.csproj -@@ -7,7 +7,6 @@ - Restore would conclude that there is a cyclic dependency between us and the Roslyn.Diagnostics.Analyzers package. - --> - *$(MSBuildProjectFile)* -- $(MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion) - - - -diff --git a/src/Roslyn.Diagnostics.Analyzers/VisualBasic/Roslyn.Diagnostics.VisualBasic.Analyzers.vbproj b/src/Roslyn.Diagnostics.Analyzers/VisualBasic/Roslyn.Diagnostics.VisualBasic.Analyzers.vbproj -index 509a3c069..737a2cf24 100644 ---- a/src/Roslyn.Diagnostics.Analyzers/VisualBasic/Roslyn.Diagnostics.VisualBasic.Analyzers.vbproj -+++ b/src/Roslyn.Diagnostics.Analyzers/VisualBasic/Roslyn.Diagnostics.VisualBasic.Analyzers.vbproj -@@ -7,7 +7,7 @@ - - - -- -+ - - - -\ No newline at end of file -diff --git a/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj b/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj -index c00a9ab5d..74f5f4d5a 100644 ---- a/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj -+++ b/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj -@@ -5,7 +5,6 @@ - true - false - true -- $(MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion) - - - -diff --git a/src/Tools/GenerateDocumentationAndConfigFilesForBrokenRuntime/GenerateDocumentationAndConfigFilesForBrokenRuntime.csproj b/src/Tools/GenerateDocumentationAndConfigFilesForBrokenRuntime/GenerateDocumentationAndConfigFilesForBrokenRuntime.csproj -index fa2233feb..f19ae8d4d 100644 ---- a/src/Tools/GenerateDocumentationAndConfigFilesForBrokenRuntime/GenerateDocumentationAndConfigFilesForBrokenRuntime.csproj -+++ b/src/Tools/GenerateDocumentationAndConfigFilesForBrokenRuntime/GenerateDocumentationAndConfigFilesForBrokenRuntime.csproj -@@ -12,8 +12,6 @@ - - - -- -- -- -+ - - -diff --git a/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj b/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj -index fe90e93ca..01b64e055 100644 ---- a/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj -+++ b/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj -@@ -3,6 +3,7 @@ - Exe - netcoreapp3.1 - true -+ true - - - diff --git a/src/SourceBuild/tarball/patches/roslyn/0001-lift-version-of-Microsoft.CodeAnalysis.Common-depend.patch b/src/SourceBuild/tarball/patches/roslyn/0001-lift-version-of-Microsoft.CodeAnalysis.Common-depend.patch deleted file mode 100644 index 2f0a10ecd..000000000 --- a/src/SourceBuild/tarball/patches/roslyn/0001-lift-version-of-Microsoft.CodeAnalysis.Common-depend.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Logan Bussell <36081148+lbussell@users.noreply.github.com> -Date: Thu, 21 Oct 2021 23:15:23 +0000 -Subject: [PATCH] lift version of Microsoft.CodeAnalysis.Common dependencies to - previously source built versions - ---- - .../Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj -index 7eae8afa275..a50822a6aeb 100644 ---- a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj -+++ b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj -@@ -27,5 +27,9 @@ - - - -+ -+ -+ -+ - - -\ No newline at end of file diff --git a/src/SourceBuild/tarball/patches/runtime/0003-Enable-source-link-in-source-build-for-.version-file.patch b/src/SourceBuild/tarball/patches/runtime/0003-Enable-source-link-in-source-build-for-.version-file.patch deleted file mode 100644 index bec3c2a3f..000000000 --- a/src/SourceBuild/tarball/patches/runtime/0003-Enable-source-link-in-source-build-for-.version-file.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Davis Goodin -Date: Tue, 26 Oct 2021 15:41:57 -0500 -Subject: [PATCH] Enable source-link in source-build for '.version' file - -See https://github.com/dotnet/source-build/issues/2569 ---- - eng/SourceBuild.props | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index bba40f534e5..b70f668a15b 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -23,14 +23,6 @@ - minimal - - -- -- -- -- -- -- -- -- - - diff --git a/src/SourceBuild/tarball/patches/xdt/0001-Also-build-for-netstandard2.0-to-support-NuGet.patch b/src/SourceBuild/tarball/patches/xdt/0001-Also-build-for-netstandard2.0-to-support-NuGet.patch deleted file mode 100644 index 1194e09a5..000000000 --- a/src/SourceBuild/tarball/patches/xdt/0001-Also-build-for-netstandard2.0-to-support-NuGet.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e5fa6b10f5e4bcb14e3930e4eeae7181765529ee Mon Sep 17 00:00:00 2001 -From: Chris Rummel -Date: Thu, 21 Oct 2021 16:29:32 -0500 -Subject: [PATCH] Also build for netstandard2.0 to support NuGet. - -Patch removal is tracked by https://github.com/dotnet/source-build/issues/2557. - ---- - .../Microsoft.Web.XmlTransform.csproj | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.csproj b/src/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.csproj -index 7cb81d1..f272d7f 100644 ---- a/src/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.csproj -+++ b/src/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.csproj -@@ -3,7 +3,7 @@ - - - -- netstandard2.1 -+ netstandard2.0;netstandard2.1 - AnyCPU - true - false --- -2.31.1 - diff --git a/src/SourceBuild/tarball/patches/xliff-tasks/0001-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch b/src/SourceBuild/tarball/patches/xliff-tasks/0001-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch deleted file mode 100644 index d462910c6..000000000 --- a/src/SourceBuild/tarball/patches/xliff-tasks/0001-Enable-work-tree-and-unsafe-paths-to-be-able-to-appl.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Chris Rummel -Date: Wed, 22 Jun 2022 05:59:17 -0500 -Subject: [PATCH] Enable work-tree and unsafe-paths to be able to apply in the - checked-in tarball. - ---- - eng/SourceBuild.props | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props -index 82243ab..147de20 100644 ---- a/eng/SourceBuild.props -+++ b/eng/SourceBuild.props -@@ -15,7 +15,7 @@ - - - - diff --git a/src/VSTemplateLocator/VSTemplateLocator.csproj b/src/VSTemplateLocator/VSTemplateLocator.csproj index aa6472a77..2b71df4f6 100644 --- a/src/VSTemplateLocator/VSTemplateLocator.csproj +++ b/src/VSTemplateLocator/VSTemplateLocator.csproj @@ -15,6 +15,7 @@ + <_VSTemplateLocatorSrc Include="$(Pkgruntime_win-arm64_Microsoft_NETCore_DotNetHostResolver)\runtimes\win-arm64\native\hostfxr.dll" Arch="arm64\" /> <_VSTemplateLocatorSrc Include="$(Pkgmicrosoft_dotnet_templateLocator)\lib\net472\**\*.dll" Arch="" /> + <_VSTemplateLocatorSrc Include="$(PkgMicrosoft_Deployment_DotNet_Releases)\lib\net452\**\*.dll" Arch="" /> <_VSTemplateLocatorDst Include="@(_VSTemplateLocatorSrc->'$(OutputPath)VSTemplateLocator\%(Arch)%(RecursiveDir)%(Filename)%(Extension)')" /> diff --git a/src/VirtualMonoRepo/Component.template.md b/src/VirtualMonoRepo/Component.template.md new file mode 100644 index 000000000..27b0f7893 --- /dev/null +++ b/src/VirtualMonoRepo/Component.template.md @@ -0,0 +1,15 @@ +# List of components + +To enable full offline source-building of the VMR, we have no other choice than to synchronize all the necessary code into the VMR. This also includes any code referenced via git submodules. More details on why and how this is done can be found here: +- [Strategy for managing external source dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Strategy-For-External-Source.md) +- [Source Synchronization Process](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#source-synchronization-process) + +## Detailed list + + + +> Auto-generated list of components will go here + + + +The repository also contains a [JSON manifest](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json) listing all components in a machine-readable format. diff --git a/src/VirtualMonoRepo/InitializeVMR.proj b/src/VirtualMonoRepo/InitializeVMR.proj new file mode 100644 index 000000000..e3d98fc3c --- /dev/null +++ b/src/VirtualMonoRepo/InitializeVMR.proj @@ -0,0 +1,68 @@ + + + + $(RepoRoot)artifacts/ + $(ArtifactsDir)bin/VirtualMonoRepo.Tasks/$(Configuration)/net7.0/VirtualMonoRepo.Tasks.dll + + $([MSBuild]::EnsureTrailingSlash('$(VmrDir)')) + $(ArtifactsDir)tmp/ + main + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $([System.IO.Path]::GetFileName("$(RepoRoot.TrimEnd('/').TrimEnd('\\'))")) + @(RootRepoCommitSha) + + + + + + + + + + + diff --git a/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt b/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt new file mode 100644 index 000000000..ede8d240b --- /dev/null +++ b/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt @@ -0,0 +1,13 @@ +.NET Core uses third-party libraries or other resources that may be +distributed under licenses different than the .NET Core software. + +Attributions and licence notices for test cases originally authored by +third parties can be found in the respective test directories. + +In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + dotnet@microsoft.com + +The attached notices are provided for information only. + diff --git a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo.Tasks.csproj b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo.Tasks.csproj new file mode 100644 index 000000000..2d59069db --- /dev/null +++ b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo.Tasks.csproj @@ -0,0 +1,20 @@ + + + net7.0 + preview + disable + false + false + false + false + true + + + + + + + + + + diff --git a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs new file mode 100644 index 000000000..5ab294231 --- /dev/null +++ b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs @@ -0,0 +1,89 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Build.Framework; +using Microsoft.DotNet.DarcLib.Helpers; +using Microsoft.DotNet.DarcLib.VirtualMonoRepo; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace Microsoft.DotNet.VirtualMonoRepo.Tasks; + +/// +/// This tasks equals calling the "darc vmr initialize" command. +/// This command pulls an individual repository into the VMR for the first time. +/// It can also recursively pull all of its dependencies based on Version.Details.xml. +/// +public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask +{ + private readonly Lazy _serviceProvider; + private readonly CancellationTokenSource _cancellationToken = new(); + + [Required] + public string Repository { get; set; } + + [Required] + public string SourceMappingsPath { get; set; } + + [Required] + public string VmrPath { get; set; } + + [Required] + public string TmpPath { get; set; } + + public string Revision { get; set; } + + public string PackageVersion { get; set; } + + public string InstallerPath { get; set; } + + public string ComponentTemplatePath { get; set; } + + public string TpnTemplatePath { get; set; } + + public bool Recursive { get; set; } + + public VirtualMonoRepo_Initialize() + { + _serviceProvider = new(CreateServiceProvider); + } + + public override bool Execute() => ExecuteAsync().GetAwaiter().GetResult(); + + private async Task ExecuteAsync() + { + VmrPath = Path.GetFullPath(VmrPath); + TmpPath = Path.GetFullPath(TmpPath); + + var additionalRemotes = InstallerPath == null + ? Array.Empty() + : new[] { new AdditionalRemote("installer", InstallerPath) }; + + var vmrInitializer = _serviceProvider.Value.GetRequiredService(); + await vmrInitializer.InitializeRepository( + Repository, + Revision, + PackageVersion, + Recursive, + new NativePath(SourceMappingsPath), + additionalRemotes, + ComponentTemplatePath, + TpnTemplatePath, + generateCodeowners: false, + discardPatches: true, + _cancellationToken.Token); + return true; + } + + public void Cancel() => _cancellationToken.Cancel(); + + private IServiceProvider CreateServiceProvider() => new ServiceCollection() + .AddLogging(b => b.AddConsole().AddFilter(l => l >= LogLevel.Information)) + .AddVmrManagers("git", VmrPath, TmpPath, null, null) + .BuildServiceProvider(); +} diff --git a/src/VirtualMonoRepo/allowed-binaries.txt b/src/VirtualMonoRepo/allowed-binaries.txt new file mode 100644 index 000000000..a1f63d6e1 --- /dev/null +++ b/src/VirtualMonoRepo/allowed-binaries.txt @@ -0,0 +1,58 @@ +*.bmp +*.docx +*.gif +*.ico +*.jpg +*.JPG +*.pdf +*.png +*.PNG +*.rtf +*.snk +*.vsd +*.vsdx +*.xlsx + +**/test/* +**/Test/* +**/Test/* +**/testCert*.pfx +**/TestCert*.pfx +**/tests/* + +eng/common/loc/*.lss # UTF16-LE text files +**/eng/common/loc/*.lss # UTF16-LE text files + +src/aspnetcore/**/samples/* +src/aspnetcore/**/TestCertificates/* +src/aspnetcore/src/*.eot +src/aspnetcore/src/*.otf +src/aspnetcore/src/*.ttf +src/aspnetcore/src/*.woff +src/aspnetcore/src/*.woff2 +src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.*.js # JavaScript files with a null bytes +src/aspnetcore/src/ProjectTemplates/Web.ProjectTemplates/**/app.db +src/aspnetcore/src/submodules/spa-templates/**/app.db + +src/fsharp/**/signedtests/* +src/fsharp/src/fsi/fsi.res # Icon + +src/msbuild/src/Tasks.UnitTests/* + +src/razor/**/SampleApp/**/fonts/* + +src/roslyn/**/CodeAnalysisTest/* +src/roslyn/src/ExpressionEvaluator/Core/Source/ExpressionCompiler/Resources/WindowsProxy.winmd # https://github.com/dotnet/roslyn/issues/66718 + +src/runtime/src/libraries/System.Diagnostics.EventLog/src/Messages/EventLogMessages.res # Icon +src/runtime/src/libraries/System.Speech/src/*.upsmap # https://github.com/dotnet/runtime/issues/81692 +src/runtime/src/libraries/System.Text.Encoding.CodePages/src/Data/codepages.nlp # https://github.com/dotnet/runtime/issues/81693 +src/runtime/src/mono/wasm/testassets/* +src/runtime/src/native/external/brotli/common/dictionary.bin.br + +src/sdk/src/Assets/TestProjects/* + +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/build/strongNameBypass.reg # UTF16-LE text file +src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet/build/strongNameBypass2.reg # UTF16-LE text file +src/source-build-externals/src/humanizer/src/Humanizer.Tests* +src/source-build-externals/src/newtonsoft-json/Src/Newtonsoft.Json.Tests/SpaceShipV2.bson diff --git a/src/VirtualMonoRepo/source-mappings.json b/src/VirtualMonoRepo/source-mappings.json new file mode 100644 index 000000000..2afa3189d --- /dev/null +++ b/src/VirtualMonoRepo/source-mappings.json @@ -0,0 +1,199 @@ +// This file configures where the VMR synchronizes the sources from. +// Each development repository has a mapping record which says where the remote repo is, +// what files are in/excluded from the sync, etc. +// +// This file does not contain information about what version of sources is synchronized. +// Please check the source-manifest.json file for that purpose. +// +// More details on this file's mechanics: +// https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#repository-source-mappings +{ + // Location within the VMR where the source-build patches are stored + // These patches are applied on top of the code synchronized into the VMR + "patchesPath": "src/installer/src/SourceBuild/patches", + + "sourceMappingsPath": "src/installer/src/VirtualMonoRepo/source-mappings.json", + + // Some files are copied outside of the src/ directory into other locations + // When files in the source paths are changed, they are automatically synchronized too + "additionalMappings": [ + { + "source": "src/installer/src/SourceBuild/content", + "destination": "" + }, + { + "source": "src/installer/eng/common", + "destination": "eng/common" + }, + { + "source": "src/installer/src/VirtualMonoRepo/source-mappings.json", + "destination": "src" + } + ], + + // These defaults are added to all mappings unless `ignoreDefaults: true` is specified + // When no "include" filter is specified, "**/*" is used + // The default filters do not apply to submodules + // Only filters which start with submodule's path are applied when syncing submodules + "defaults": { + "defaultRef": "main", + "exclude": [ + "**/*.dll", + "**/*.Dll", + "**/*.exe", + "**/*.mdb", + "**/*.nupkg", + "**/*.pdb", + "**/*.tgz", + "**/*.zip" + ] + }, + + // Each of these mappings has a corresponding folder in the src/ directory + "mappings": [ + { + "name": "arcade", + "defaultRemote": "https://github.com/dotnet/arcade", + "exclude": [ + "src/Microsoft.DotNet.SignTool.Tests/*.mpack", + "src/Microsoft.DotNet.SignTool.Tests/*.msi", + "src/Microsoft.DotNet.SignTool.Tests/*.vsix" + ] + }, + { + "name": "aspire", + "defaultRemote": "https://github.com/dotnet/aspire", + "exclude": [ + "src/Aspire.Dashboard/**/*", + "samples/**/*" + ] + }, + { + "name": "aspnetcore", + "defaultRemote": "https://github.com/dotnet/aspnetcore", + "exclude": [ + "src/submodules/MessagePack-CSharp/**/*.dll", + "**/samples/**/jquery-validation-unobtrusive/.bower.json", + "**/samples/**/jquery-validation-unobtrusive/*.js", + "src/Installers/Windows/AspNetCoreModule-Setup/*", + "src/SignalR/clients/java/signalr/gradle/wrapper/gradle-wrapper.jar" + ] + }, + { + "name": "cecil", + "defaultRemote": "https://github.com/dotnet/cecil" + }, + { + "name": "command-line-api", + "defaultRemote": "https://github.com/dotnet/command-line-api" + }, + { + "name": "deployment-tools", + "defaultRemote": "https://github.com/dotnet/deployment-tools" + }, + { + "name": "diagnostics", + "defaultRemote": "https://github.com/dotnet/diagnostics" + }, + { + "name": "emsdk", + "defaultRemote": "https://github.com/dotnet/emsdk" + }, + { + "name": "format", + "defaultRemote": "https://github.com/dotnet/format" + }, + { + "name": "fsharp", + "defaultRemote": "https://github.com/dotnet/fsharp" + }, + { + "name": "installer", + "defaultRemote": "https://github.com/dotnet/installer", + "exclude": [ + // We don't need the tarball content in the VMR again, it's already copied in the root + "src/SourceBuild/content/**/*" + ] + }, + { + "name": "msbuild", + "defaultRemote": "https://github.com/dotnet/msbuild" + }, + { + "name": "nuget-client", + "defaultRemote": "https://github.com/NuGet/NuGet.Client", + "defaultRef": "dev", + "exclude":[ + "src/NuGet.Clients/NuGet.VisualStudio.Client" + ] + }, + { + "name": "razor", + "defaultRemote": "https://github.com/dotnet/razor" + }, + { + "name": "roslyn", + "defaultRemote": "https://github.com/dotnet/roslyn" + }, + { + "name": "roslyn-analyzers", + "defaultRemote": "https://github.com/dotnet/roslyn-analyzers" + }, + { + "name": "runtime", + "defaultRemote": "https://github.com/dotnet/runtime" + }, + { + "name": "sdk", + "defaultRemote": "https://github.com/dotnet/sdk" + }, + { + "name": "source-build-externals", + "defaultRemote": "https://github.com/dotnet/source-build-externals", + "exclude": [ + "src/humanizer/samples/**/*.js", + "src/application-insights/**/*.exe", + "src/application-insights/**/*.dll", + "src/application-insights/**/*.zip", + "src/application-insights/**/NuGet.config", + "src/newtonsoft-json/**/NuGet.Config" + ] + }, + { + "name": "source-build-reference-packages", + "defaultRemote": "https://github.com/dotnet/source-build-reference-packages" + }, + { + "name": "sourcelink", + "defaultRemote": "https://github.com/dotnet/sourcelink" + }, + { + "name": "symreader", + "defaultRemote": "https://github.com/dotnet/symreader" + }, + { + "name": "templating", + "defaultRemote": "https://github.com/dotnet/templating" + }, + { + "name": "test-templates", + "defaultRemote": "https://github.com/dotnet/test-templates" + }, + { + "name": "vstest", + "defaultRemote": "https://github.com/microsoft/vstest", + "exclude": [ + // Non-OSS license used in VS specific build configurations. + "src/package/licenses/LICENSE_VS.txt" + ] + }, + { + "name": "xdt", + "defaultRemote": "https://github.com/dotnet/xdt" + }, + { + "name": "xliff-tasks", + "defaultRemote": "https://github.com/dotnet/xliff-tasks" + } + ] +} diff --git a/src/core-sdk-tasks/EnvironmentVariableFilter.cs b/src/core-sdk-tasks/EnvironmentVariableFilter.cs index 6071d0765..069c2cd37 100644 --- a/src/core-sdk-tasks/EnvironmentVariableFilter.cs +++ b/src/core-sdk-tasks/EnvironmentVariableFilter.cs @@ -31,7 +31,6 @@ namespace Microsoft.DotNet.Cli.Build "DOTNET_CLI_UI_LANGUAGE", "DOTNET_MULTILEVEL_LOOKUP", "DOTNET_RUNTIME_ID", - "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "NUGET_PACKAGES" }; diff --git a/src/core-sdk-tasks/ExtractArchiveToDirectory.cs b/src/core-sdk-tasks/ExtractArchiveToDirectory.cs index 4a1c42ac9..e61f21e53 100644 --- a/src/core-sdk-tasks/ExtractArchiveToDirectory.cs +++ b/src/core-sdk-tasks/ExtractArchiveToDirectory.cs @@ -5,8 +5,12 @@ using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using System; +#if !NETFRAMEWORK +using System.Formats.Tar; +#endif using System.IO; using System.IO.Compression; +using System.Linq; namespace Microsoft.DotNet.Build.Tasks { @@ -32,6 +36,11 @@ namespace Microsoft.DotNet.Build.Tasks /// public bool CleanDestination { get; set; } + /// + /// A list of directories, relative to the root of the archive to include. If empty all directories will be copied. + /// + public ITaskItem[] DirectoriesToCopy { get; set; } + protected override bool ValidateParameters() { base.ValidateParameters(); @@ -66,20 +75,89 @@ namespace Microsoft.DotNet.Build.Tasks public override bool Execute() { bool retVal = true; + bool isZipArchive = Path.GetExtension(SourceArchive).Equals(".zip", StringComparison.OrdinalIgnoreCase); + bool isTarballArchive = SourceArchive.EndsWith(".tar.gz", StringComparison.OrdinalIgnoreCase); - // Inherits from ToolTask in order to shell out to tar. + // Inherits from ToolTask in order to shell out to tar for complete extraction // If the file is a .zip, then don't call the base Execute method, just run as a normal task - if (Path.GetExtension(SourceArchive).Equals(".zip", StringComparison.OrdinalIgnoreCase)) + // If the file is a .tar.gz, and DirectoriesToCopy isn't empty, also run a normal task. + if (isZipArchive || isTarballArchive) { if (ValidateParameters()) { -#if NETFRAMEWORK - // .NET Framework doesn't have overload to overwrite files - ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory); -#else - ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory, overwriteFiles: true); -#endif + if (DirectoriesToCopy != null && DirectoriesToCopy.Length != 0) + { + // Partial archive extraction + if (isZipArchive) + { + var zip = new ZipArchive(File.OpenRead(SourceArchive)); + string loc = DestinationDirectory; + foreach (var entry in zip.Entries) + { + if (ShouldExtractItem(entry.FullName)) + { + if (!Directory.Exists(Path.Combine(DestinationDirectory, Path.GetDirectoryName(entry.FullName)))) + { + Directory.CreateDirectory(Path.Combine(DestinationDirectory, Path.GetDirectoryName(entry.FullName))); + } + Log.LogMessage(Path.GetDirectoryName(entry.FullName)); + entry.ExtractToFile(Path.Combine(loc, entry.FullName)); + } + } + } + else + { +#if NETFRAMEWORK + // Run the base tool, which uses external 'tar' command + retVal = base.Execute(); +#else + // Decompress GZip content + using FileStream compressedFileStream = File.Open(SourceArchive, FileMode.Open); + using var decompressor = new GZipStream(compressedFileStream, CompressionMode.Decompress); + using var decompressedStream = new MemoryStream(); + decompressor.CopyTo(decompressedStream); + decompressedStream.Seek(0, SeekOrigin.Begin); + + // Extract Tar content + using TarReader tr = new TarReader(decompressedStream); + while (tr.GetNextEntry() is TarEntry tarEntry) + { + if (tarEntry.EntryType != TarEntryType.Directory) + { + string entryName = tarEntry.Name; + entryName = entryName.StartsWith("./") ? entryName[2..] : entryName; + if (ShouldExtractItem(entryName)) + { + Log.LogMessage(entryName); + string destinationPath = Path.Combine(DestinationDirectory, entryName); + Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)); + tarEntry.ExtractToFile(destinationPath, overwrite: true); + } + } + } +#endif + } + } + else + { + // Complete archive extraction + if (isZipArchive) + { +#if NETFRAMEWORK + // .NET Framework doesn't have overload to overwrite files + ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory); +#else + + ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory, overwriteFiles: true); +#endif + } + else + { + // Run the base tool, which uses external 'tar' command + retVal = base.Execute(); + } + } } else { @@ -100,6 +178,17 @@ namespace Microsoft.DotNet.Build.Tasks return retVal; } + private bool ShouldExtractItem(string path) + { + if (DirectoriesToCopy != null) + { + return DirectoriesToCopy.Any(p => path.StartsWith(p.ItemSpec)); + + } + + return false; + } + protected override string ToolName { get { return "tar"; } diff --git a/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs b/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs index 03e407b2e..eab79f2b7 100644 --- a/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs +++ b/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs @@ -43,7 +43,7 @@ namespace Microsoft.DotNet.Cli.Build { string sourceFolder = Path.Combine(MSBuildExtensionsLayoutDirectory, relativeSourcePath); var files = Directory.GetFiles(sourceFolder) - .Where(f => !Path.GetExtension(f).Equals(".pdb", StringComparison.OrdinalIgnoreCase)) + .Where(f => !Path.GetExtension(f).Equals(".pdb", StringComparison.OrdinalIgnoreCase) && !Path.GetExtension(f).Equals(".swr", StringComparison.OrdinalIgnoreCase)) .ToList(); if (files.Any(f => !Path.GetFileName(f).Equals("_._"))) { @@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Cli.Build foreach (var file in files) { - sb.Append(@" file source=""!(bindpath.sources)\Redist\Common\NetCoreSDK\MSBuildExtensions\"); + sb.Append(@" file source=""$(PkgVS_Redist_Common_Net_Core_SDK_MSBuildExtensions)\"); sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file))); sb.AppendLine("\""); } diff --git a/src/core-sdk-tasks/GetDependencyInfo.cs b/src/core-sdk-tasks/GetDependencyInfo.cs new file mode 100644 index 000000000..909140113 --- /dev/null +++ b/src/core-sdk-tasks/GetDependencyInfo.cs @@ -0,0 +1,55 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; +using System.Linq; +using System.Xml.Linq; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.DotNet.Cli.Build +{ + /// + /// Gets version and commit of a dependency by its name + /// from eng/Version.Details.xml + /// + public class GetDependencyInfo : Task + { + [Required] + public string VersionDetailsXmlFile { get; set; } + + [Required] + public string DependencyName { get; set; } + + [Output] + public string DependencyVersion { get; set; } + + [Output] + public string DependencyCommit { get; set; } + + public override bool Execute() + { + try + { + XDocument document = XDocument.Load(VersionDetailsXmlFile); + XElement dependency = document + .Element("Dependencies")? + .Element("ProductDependencies")? + .Elements("Dependency") + .FirstOrDefault(d => DependencyName.Equals(d.Attribute("Name")?.Value)); + + if (dependency != null) + { + DependencyVersion = dependency.Attribute("Version")?.Value; + DependencyCommit = dependency.Element("Sha")?.Value; + } + } + catch (Exception ex) + { + Log.LogWarning($"GetComponentCommit failed for VersionDetailsXmlFile={VersionDetailsXmlFile}, DependencyName={DependencyName}: {ex}"); + } + return true; + } + } +} diff --git a/src/core-sdk-tasks/ReplaceFilesWithSymbolicLinks.cs b/src/core-sdk-tasks/ReplaceFilesWithSymbolicLinks.cs new file mode 100644 index 000000000..44c6ca31b --- /dev/null +++ b/src/core-sdk-tasks/ReplaceFilesWithSymbolicLinks.cs @@ -0,0 +1,157 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#if !NETFRAMEWORK +#nullable enable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.IO.Enumeration; +using System.IO.MemoryMappedFiles; +using System.Linq; +using System.Runtime.InteropServices; +#endif +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.DotNet.Build.Tasks +{ + /// + /// Replaces files that have the same content with hard links. + /// + public sealed class ReplaceFilesWithSymbolicLinks : Task + { + /// + /// The path to the directory to recursively search for files to replace with symbolic links. + /// + [Required] + public string Directory { get; set; } = ""; + + /// + /// The path to the directory with files to link to. + /// + [Required] + public string LinkToFilesFrom { get; set; } = ""; + +#if NETFRAMEWORK + public override bool Execute() + { + Log.LogError($"{nameof(ReplaceFilesWithSymbolicLinks)} is not supported on .NET Framework."); + return false; + } +#else + public override bool Execute() + { + if (OperatingSystem.IsWindows()) + { + Log.LogError($"{nameof(ReplaceFilesWithSymbolicLinks)} is not supported on Windows."); + return false; + } + + if (!System.IO.Directory.Exists(Directory)) + { + Log.LogError($"'{Directory}' does not exist."); + return false; + } + + if (!System.IO.Directory.Exists(LinkToFilesFrom)) + { + Log.LogError($"'{LinkToFilesFrom}' does not exist."); + return false; + } + + // Find all non-empty, non-symbolic link files. + string[] files = new FileSystemEnumerable( + Directory, + (ref FileSystemEntry entry) => entry.ToFullPath(), + new EnumerationOptions() + { + AttributesToSkip = FileAttributes.ReparsePoint, + RecurseSubdirectories = true + }) + { + ShouldIncludePredicate = (ref FileSystemEntry entry) => !entry.IsDirectory + && entry.Length > 0 + }.ToArray(); + + foreach (var file in files) + { + string fileName = Path.GetFileName(file); + + // Look for a file with the same name in LinkToFilesFrom + // and replace it with a symbolic link if it has the same content. + string targetFile = Path.Combine(LinkToFilesFrom, fileName); + if (File.Exists(targetFile) && FilesHaveSameContent(file, targetFile)) + { + ReplaceByLinkTo(file, targetFile); + } + } + + return true; + } + + private unsafe bool FilesHaveSameContent(string path1, string path2) + { + using var mappedFile1 = MemoryMappedFile.CreateFromFile(path1, FileMode.Open); + using var accessor1 = mappedFile1.CreateViewAccessor(); + byte* ptr1 = null; + + using var mappedFile2 = MemoryMappedFile.CreateFromFile(path2, FileMode.Open); + using var accessor2 = mappedFile2.CreateViewAccessor(); + byte* ptr2 = null; + + try + { + accessor1.SafeMemoryMappedViewHandle.AcquirePointer(ref ptr1); + Span span1 = new Span(ptr1, checked((int)accessor1.SafeMemoryMappedViewHandle.ByteLength)); + + accessor2.SafeMemoryMappedViewHandle.AcquirePointer(ref ptr2); + Span span2 = new Span(ptr2, checked((int)accessor2.SafeMemoryMappedViewHandle.ByteLength)); + + return span1.SequenceEqual(span2); + } + finally + { + if (ptr1 != null) + { + accessor1.SafeMemoryMappedViewHandle.ReleasePointer(); + ptr1 = null; + } + if (ptr2 != null) + { + accessor2.SafeMemoryMappedViewHandle.ReleasePointer(); + ptr2 = null; + } + } + } + + void ReplaceByLinkTo(string path, string pathToTarget) + { + // To link, the target mustn't exist. Make a backup, so we can restore it when linking fails. + string backupFile = $"{path}.pre_link_backup"; + File.Move(path, backupFile); + + try + { + string relativePath = Path.GetRelativePath(Path.GetDirectoryName(path)!, pathToTarget); + File.CreateSymbolicLink(path, relativePath); + + File.Delete(backupFile); + + Log.LogMessage(MessageImportance.Normal, $"Linked '{path}' to '{relativePath}'."); + } + catch (Exception ex) + { + Log.LogError($"Unable to link '{path}' to '{pathToTarget}.': {ex}"); + + File.Move(backupFile, path); + + throw; + } + } +#endif + } +} diff --git a/src/core-sdk-tasks/core-sdk-tasks.csproj b/src/core-sdk-tasks/core-sdk-tasks.csproj index 5fc33672a..13f485425 100644 --- a/src/core-sdk-tasks/core-sdk-tasks.csproj +++ b/src/core-sdk-tasks/core-sdk-tasks.csproj @@ -6,15 +6,16 @@ Microsoft.DotNet.Cli.Build $(DefineConstants);SOURCE_BUILD true + true - - - - + + + + diff --git a/src/finalizer/CMakeLists.txt b/src/finalizer/CMakeLists.txt index fe1b531ea..80c5be98d 100644 --- a/src/finalizer/CMakeLists.txt +++ b/src/finalizer/CMakeLists.txt @@ -19,6 +19,30 @@ link_directories(../../artifacts/WixSdk/lib/${Platform}) add_compile_options(/MT) +# Microsoft.Security.SystemsADM.10086 +add_compile_options($<$:/W3>) +add_compile_options($<$:/WX>) +add_compile_options($<$:/we4018>) # 'expression' : signed/unsigned mismatch +add_compile_options($<$:/we4055>) # 'conversion' : from data pointer 'type1' to function pointer 'type2' +add_compile_options($<$:/we4146>) # unary minus operator applied to unsigned type, result still unsigned +add_compile_options($<$:/we4242>) # 'identifier' : conversion from 'type1' to 'type2', possible loss of data +add_compile_options($<$:/we4244>) # 'conversion' conversion from 'type1' to 'type2', possible loss of data +add_compile_options($<$:/we4267>) # 'var' : conversion from 'size_t' to 'type', possible loss of data +add_compile_options($<$:/we4302>) # 'conversion' : truncation from 'type 1' to 'type 2' +add_compile_options($<$:/we4308>) # negative integral constant converted to unsigned type +add_compile_options($<$:/we4509>) # nonstandard extension used: 'function' uses SEH and 'object' has destructor +add_compile_options($<$:/we4510>) # 'class' : default constructor could not be generated +add_compile_options($<$:/we4532>) # 'continue' : jump out of __finally/finally block has undefined behavior during termination handling +add_compile_options($<$:/we4533>) # initialization of 'variable' is skipped by 'instruction' +add_compile_options($<$:/we4610>) # object 'class' can never be instantiated - user-defined constructor required +add_compile_options($<$:/we4611>) # interaction between 'function' and C++ object destruction is non-portable +add_compile_options($<$:/we4700>) # uninitialized local variable 'name' used +add_compile_options($<$:/we4701>) # Potentially uninitialized local variable 'name' used +add_compile_options($<$:/we4703>) # Potentially uninitialized local pointer variable 'name' used +add_compile_options($<$:/we4789>) # destination of memory copy is too small +add_compile_options($<$:/we4995>) # 'function': name was marked as #pragma deprecated +add_compile_options($<$:/we4996>) # 'function': was declared deprecated also 'std::' + add_executable(Finalizer finalizer.cpp native.rc @@ -31,6 +55,7 @@ target_link_libraries(Finalizer shell32.lib) target_link_libraries(Finalizer advapi32.lib) target_link_libraries(Finalizer version.lib) target_link_libraries(Finalizer msi.lib) +target_link_libraries(Finalizer shlwapi.lib) # Add WiX libraries target_link_libraries(Finalizer wcautil.lib) diff --git a/src/finalizer/finalizer.cpp b/src/finalizer/finalizer.cpp index 58bf9e1bd..03a1213ba 100644 --- a/src/finalizer/finalizer.cpp +++ b/src/finalizer/finalizer.cpp @@ -10,7 +10,7 @@ extern "C" HRESULT Initialize(int argc, wchar_t* argv[]) // We're not going to do any clever parsing. This is intended to be called from // the standalone bundle only and there will only be a fixed set of parameters: // 1. The path of the log file, created by the bundle. - // 2. The full SDK version, e.g. 6.0.105 or 6.0.398-preview19 + // 2. The full SDK version, e.g. 6.0.105 or 6.0.398-preview.19 // 3. Target platform to search under the registry key to locate installed SDKs. if (4 != argc) { @@ -86,7 +86,7 @@ extern "C" HRESULT DeleteWorkloadRecords(LPWSTR sczSdkFeatureBandVersion, LPWSTR DWORD cbValues = 0; BOOL bDeleteKey = FALSE; - hr = StrAllocConcatFormatted(&sczKeyName, L"SOFTWARE\\Microsoft\\dotnet\\InstalledWorkloads\\Standalone\\%ls", sczArchitecture); + hr = StrAllocFormatted(&sczKeyName, L"SOFTWARE\\Microsoft\\dotnet\\InstalledWorkloads\\Standalone\\%ls", sczArchitecture); ExitOnFailure(hr, "Failed to allocate string for workload records registry path."); hr = RegOpen(HKEY_LOCAL_MACHINE, sczKeyName, KEY_READ | KEY_WRITE, &hkWorkloadRecordsKey); @@ -328,14 +328,56 @@ LExit: return hr; } -extern "C" HRESULT ParseSdkVersion(LPWSTR sczSdkVersion, INT * piMajor, INT * piMinor, INT * piFeatureBand) +extern "C" HRESULT ParseSdkVersion(LPWSTR sczSdkVersion, LPWSTR * ppwzSdkFeatureBandVersion) { HRESULT hr = S_OK; UINT cVersionParts = 0; + UINT cSemanticParts = 0; + UINT cPrereleaseParts = 0; + DWORD cchPatch = 0; LPWSTR* rgsczVersionParts = NULL; + LPWSTR* rgsczSemanticParts = NULL; + LPWSTR* rgsczPrereleaseParts = NULL; + LPWSTR sczPrereleaseLabel = NULL; + int iMajor = 0; + int iMinor = 0; + int iFeatureBand = 0; int iPatch = 0; - hr = StrSplitAllocArray(&rgsczVersionParts, &cVersionParts, sczSdkVersion, L"."); + LogStringLine(REPORT_STANDARD, "Parsing SDK version: %ls", sczSdkVersion); + + // Split the version to separate potential prerelease labels from the core version + hr = StrSplitAllocArray(&rgsczSemanticParts, &cSemanticParts, sczSdkVersion, L"-"); + ExitOnFailure(hr, "Failed to split version."); + + if (2 == cSemanticParts) + { + LogStringLine(REPORT_STANDARD, "Semantic version component: %ls", rgsczSemanticParts[1]); + + hr = StrSplitAllocArray(&rgsczPrereleaseParts, &cPrereleaseParts, rgsczSemanticParts[1], L"."); + ExitOnFailure(hr, "Failed to split prerelease labels."); + + // SDK versions for CI/DEV builds map to pure feature band versions, e.g. 6.0.108-ci maps to 6.0.100. + if ((CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, rgsczPrereleaseParts[0], -1, L"dev", -1)) && + (CSTR_EQUAL != ::CompareStringW(LOCALE_INVARIANT, 0, rgsczPrereleaseParts[0], -1, L"ci", -1))) + { + if (1 <= cPrereleaseParts) + { + hr = StrAllocFormatted(&sczPrereleaseLabel, L"%ls.%ls", rgsczPrereleaseParts[0], rgsczPrereleaseParts[1]); + ExitOnFailure(hr, "Failed to allocate string for prerelease label."); + } + else + { + hr = StrAllocFormatted(&sczPrereleaseLabel, L"%ls", rgsczPrereleaseParts[0]); + ExitOnFailure(hr, "Failed to allocate string for prerelease label."); + } + + LogStringLine(REPORT_STANDARD, "Prerelease label: %ls", sczPrereleaseLabel); + } + } + + // Split the core version + hr = StrSplitAllocArray(&rgsczVersionParts, &cVersionParts, rgsczSemanticParts[0], L"."); ExitOnFailure(hr, "Failed to split version."); // We only care about the major.minor.patch values @@ -346,15 +388,15 @@ extern "C" HRESULT ParseSdkVersion(LPWSTR sczSdkVersion, INT * piMajor, INT * pi ExitOnFailure(E_INVALIDARG, "Invalid SDK version: %ls %li", sczSdkVersion, cVersionParts); } - hr = StrStringToInt32(rgsczVersionParts[0], 0, piMajor); + hr = StrStringToInt32(rgsczVersionParts[0], 0, &iMajor); ExitOnFailure(hr, "Invalid major version."); - hr = StrStringToInt32(rgsczVersionParts[1], 0, piMinor); + hr = StrStringToInt32(rgsczVersionParts[1], 0, &iMinor); ExitOnFailure(hr, "Invalid minor version."); // If this is a valid SDK version the 'patch' should be a 3 digit field // containing the feature band and patch level, e.g. 100 or 207. We // can discard any prerelease labels from the semantic version. - hr = StrStringToInt32(rgsczVersionParts[2], 3, &iPatch); + hr = StrStringToInt32(rgsczVersionParts[2], 0, &iPatch); ExitOnFailure(hr, "Invalid patch version."); if (100 > iPatch) @@ -363,10 +405,26 @@ extern "C" HRESULT ParseSdkVersion(LPWSTR sczSdkVersion, INT * piMajor, INT * pi ExitOnFailure(hr, "Invalid SDK feature band and patch level."); } - *piFeatureBand = iPatch - (iPatch % 100); + iFeatureBand = iPatch - (iPatch % 100); + + if (NULL == sczPrereleaseLabel) + { + hr = StrAllocFormatted(ppwzSdkFeatureBandVersion, L"%li.%li.%li", iMajor, iMinor, iFeatureBand); + ExitOnFailure(hr, "Failed to allocate string for SDK feature band version."); + } + else + { + hr = StrAllocFormatted(ppwzSdkFeatureBandVersion, L"%li.%li.%li-%ls", iMajor, iMinor, iFeatureBand, sczPrereleaseLabel); + ExitOnFailure(hr, "Failed to allocate string for SDK feature band version."); + } + + LogStringLine(REPORT_STANDARD, "SDK feature band version: %ls", *ppwzSdkFeatureBandVersion); LExit: ReleaseStrArray(rgsczVersionParts, cVersionParts); + ReleaseStrArray(rgsczSemanticParts, cSemanticParts); + ReleaseStrArray(rgsczPrereleaseParts, cPrereleaseParts); + ReleaseStr(sczPrereleaseLabel); return hr; } @@ -376,22 +434,15 @@ extern "C" HRESULT DetectSdk(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitec HKEY hkInstalledSdkVersionsKey = NULL; LPWSTR sczInstalledSdkVersionsKeyName = NULL; LPWSTR sczSdkVersion = NULL; + LPWSTR sczInstalledFeatureBand = NULL; DWORD dwSdkVersionValueType = 0; - int iInstalledMajor = 0; - int iInstalledMinor = 0; - int iInstalledFeatureBand = 0; - int iExpectedMajor = 0; - int iExpectedMinor = 0; - int iExpectedFeatureBand = 0; - - hr = ParseSdkVersion(sczSdkFeatureBandVersion, &iExpectedMajor, &iExpectedMinor, &iExpectedFeatureBand); LogStringLine(REPORT_STANDARD, "Detecting installed SDK versions for %ls", sczSdkFeatureBandVersion); // Scan the registry to see if any SDK matching the feature band we're trying to // clean up is still installed. All the installation keys reside in the 32-bit hive. - hr = StrAllocConcatFormatted(&sczInstalledSdkVersionsKeyName, L"SOFTWARE\\WOW6432Node\\dotnet\\Setup\\InstalledVersions\\%ls\\sdk", sczArchitecture); - ExitOnFailure(hr, "Failed to allocate string for installed SDK versions."); + hr = StrAllocFormatted(&sczInstalledSdkVersionsKeyName, L"SOFTWARE\\WOW6432Node\\dotnet\\Setup\\InstalledVersions\\%ls\\sdk", sczArchitecture); + ExitOnFailure(hr, "Failed to allocate string for installed SDK versions key name."); LogStringLine(REPORT_STANDARD, "Scanning %ls", sczInstalledSdkVersionsKeyName); @@ -420,13 +471,13 @@ extern "C" HRESULT DetectSdk(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitec ExitOnFailure(hr, "Failed to read SDK version values from registry."); - hr = ParseSdkVersion(sczSdkVersion, &iInstalledMajor, &iInstalledMinor, &iInstalledFeatureBand); + hr = ParseSdkVersion(sczSdkVersion, &sczInstalledFeatureBand); ExitOnFailure(hr, "Failed to parse %ls", sczSdkVersion); - LogStringLine(REPORT_STANDARD, "SDK version detected: %ls, mapping to %li.%li.%li.", sczSdkVersion, iInstalledMajor, iInstalledMinor, iInstalledFeatureBand); + LogStringLine(REPORT_STANDARD, "SDK version detected: %ls, mapping to %ls.", sczSdkVersion, sczInstalledFeatureBand); // Bail out on the first match. - if ((iInstalledMajor == iExpectedMajor) && (iInstalledMinor == iExpectedMinor) && (iInstalledFeatureBand == iExpectedFeatureBand)) + if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczInstalledFeatureBand, -1, sczSdkFeatureBandVersion, -1)) { *pbInstalled = TRUE; break; @@ -437,15 +488,68 @@ LExit: ReleaseRegKey(hkInstalledSdkVersionsKey); ReleaseStr(sczInstalledSdkVersionsKeyName); ReleaseStr(sczSdkVersion); + ReleaseStr(sczInstalledFeatureBand); return hr; } +void RemoveInstallStateFile(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczPlatform) +{ + HRESULT hr = S_OK; + LPWSTR sczProgramData = NULL; + LPWSTR sczInstallStatePath = NULL; + LPWSTR sczPath = NULL; + + hr = ShelGetFolder(&sczProgramData, CSIDL_COMMON_APPDATA); + ExitOnFailure(hr, "Failed to get shell folder."); + + hr = PathConcat(sczProgramData, L"dotnet", &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat dotnet to install state path."); + + hr = PathConcat(sczInstallStatePath, L"workloads", &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat workloads to install state path."); + + hr = PathConcat(sczInstallStatePath, sczPlatform, &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat platform (%ls) to install state path.", sczPlatform); + + hr = PathConcat(sczInstallStatePath, sczSdkFeatureBandVersion, &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat feature band (%ls) to install state path.", sczSdkFeatureBandVersion); + + hr = PathConcat(sczInstallStatePath, L"installstate", &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat installstate to install state path."); + + hr = PathConcat(sczInstallStatePath, L"default.json", &sczInstallStatePath); + ExitOnFailure(hr, "Failed to concat default.json to install state path."); + + if (FileExistsEx(sczInstallStatePath, NULL)) + { + LogStringLine(REPORT_STANDARD, "Deleting install state file: %ls", sczInstallStatePath); + hr = FileEnsureDelete(sczInstallStatePath); + ExitOnFailure(hr, "Failed to delete install state file: %ls", sczInstallStatePath); + + hr = PathGetParentPath(sczInstallStatePath, &sczPath); + ExitOnFailure(hr, "Failed to get parent path of install state file."); + + LogStringLine(REPORT_STANDARD, "Cleaning up empty workload folders."); + DirDeleteEmptyDirectoriesToRoot(sczPath, 0); + } + else + { + LogStringLine(REPORT_STANDARD, "Install state file does not exist: %ls", sczInstallStatePath); + } + +LExit: + ReleaseStr(sczPath); + ReleaseStr(sczInstallStatePath) + ReleaseStr(sczProgramData); +} + int wmain(int argc, wchar_t* argv[]) { HRESULT hr = S_OK; DWORD dwExitCode = 0; LPWSTR sczDependent = NULL; LPWSTR sczFeatureBandVersion = NULL; + LPWSTR sczPlatform = NULL; BOOL bRestartRequired = FALSE; BOOL bSdkFeatureBandInstalled = FALSE; int iMajor = 0; @@ -455,19 +559,19 @@ int wmain(int argc, wchar_t* argv[]) hr = ::Initialize(argc, argv); ExitOnFailure(hr, "Failed to initialize."); + hr = StrAllocString(&sczPlatform, argv[3], 0); + ExitOnFailure(hr, "Failed to copy platform argument."); + // Convert the full SDK version to a feature band version - hr = ParseSdkVersion(argv[2], &iMajor, &iMinor, &iFeatureBand); + hr = ParseSdkVersion(argv[2], &sczFeatureBandVersion); ExitOnFailure(hr, "Failed to parse version, %ls.", argv[2]); - hr = StrAllocConcatFormatted(&sczFeatureBandVersion, L"%li.%li.%li", iMajor, iMinor, iFeatureBand); - ExitOnFailure(hr, "Failed to create feature band version."); - // Create the dependent value, e.g., Microsoft.NET.Sdk,6.0.300,arm64 - hr = StrAllocConcatFormatted(&sczDependent, L"Microsoft.NET.Sdk,%ls,%ls", sczFeatureBandVersion, argv[3]); + hr = StrAllocFormatted(&sczDependent, L"Microsoft.NET.Sdk,%ls,%ls", sczFeatureBandVersion, sczPlatform); ExitOnFailure(hr, "Failed to create dependent."); LogStringLine(REPORT_STANDARD, "Setting target dependent to %ls.", sczDependent); - hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled); + hr = ::DetectSdk(sczFeatureBandVersion, sczPlatform, &bSdkFeatureBandInstalled); ExitOnFailure(hr, "Failed to detect installed SDKs."); // If the feature band is still present, do not remove workloads. @@ -480,7 +584,7 @@ int wmain(int argc, wchar_t* argv[]) hr = ::RemoveDependent(sczDependent, &bRestartRequired); ExitOnFailure(hr, "Failed to remove dependent \"%ls\".", sczDependent); - hr = ::DeleteWorkloadRecords(sczFeatureBandVersion, argv[3]); + hr = ::DeleteWorkloadRecords(sczFeatureBandVersion, sczPlatform); ExitOnFailure(hr, "Failed to remove workload records."); if (bRestartRequired) @@ -488,9 +592,12 @@ int wmain(int argc, wchar_t* argv[]) dwExitCode = ERROR_SUCCESS_REBOOT_REQUIRED; } + RemoveInstallStateFile(sczFeatureBandVersion, sczPlatform); + LExit: ReleaseStr(sczDependent); ReleaseStr(sczFeatureBandVersion); + ReleaseStr(sczPlatform); LogUninitialize(TRUE); RegUninitialize(); WiuUninitialize(); diff --git a/src/finalizer/precomp.h b/src/finalizer/precomp.h index 1a6cd5df0..97bc60b13 100644 --- a/src/finalizer/precomp.h +++ b/src/finalizer/precomp.h @@ -12,6 +12,8 @@ #include #include #include +#include +#include // Configure some logging parameters for WiX #define ExitTrace LogErrorString @@ -26,3 +28,7 @@ #include "pathutil.h" #include "strutil.h" #include "wiutil.h" +#include "dirutil.h" +#include "fileutil.h" +#include "shelutil.h" + diff --git a/src/finalizer_shim/finalizer_shim.csproj b/src/finalizer_shim/finalizer_shim.csproj index ad9af2548..e6cd301f7 100644 --- a/src/finalizer_shim/finalizer_shim.csproj +++ b/src/finalizer_shim/finalizer_shim.csproj @@ -12,7 +12,8 @@ - + + diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c735a1fb8..9a6e21871 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -4,6 +4,9 @@ true false false + true + none + true @@ -17,7 +20,7 @@ - + @@ -47,7 +50,4 @@ - - - diff --git a/src/redist/targets/BuildCoreSdkTasks.targets b/src/redist/targets/BuildCoreSdkTasks.targets index f89f2297f..d28d0aee1 100644 --- a/src/redist/targets/BuildCoreSdkTasks.targets +++ b/src/redist/targets/BuildCoreSdkTasks.targets @@ -39,5 +39,7 @@ + + diff --git a/src/redist/targets/BundledDotnetTools.targets b/src/redist/targets/BundledDotnetTools.targets index 2c816393d..ab3b5e34a 100644 --- a/src/redist/targets/BundledDotnetTools.targets +++ b/src/redist/targets/BundledDotnetTools.targets @@ -1,6 +1,7 @@ + diff --git a/src/redist/targets/BundledManifests.targets b/src/redist/targets/BundledManifests.targets index 63bfd724e..73402bced 100644 --- a/src/redist/targets/BundledManifests.targets +++ b/src/redist/targets/BundledManifests.targets @@ -1,13 +1,22 @@ + + 8.0.100 + - - - - - - - - + + + + + + + + + + + + + + @@ -19,10 +28,9 @@ %(Identity).Manifest-%(FeatureBand) - %(Identity).Manifest-%(FeatureBand).Msi.$(MsiArchitectureForWorkloadManifests) $(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(NupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower()) + %(Identity).Manifest-%(FeatureBand).Msi.$(MsiArchitectureForWorkloadManifests) $(NuGetPackageRoot)$([MSBuild]::ValueOrDefault('%(MsiNupkgId)', '').ToLower())/$([MSBuild]::ValueOrDefault('%(Version)', '').ToLower()) - $([MSBuild]::NormalizePath('%(RestoredMsiNupkgContentPath)/data/%(NupkgId).%(Version)-$(MsiArchitectureForWorkloadManifests).msi')) @@ -51,9 +59,11 @@ + + Exclude="Microsoft.NET.Workload.Mono.ToolChain.Current;Microsoft.NET.Workload.Mono.ToolChain.net6;Microsoft.NET.Workload.Mono.ToolChain.net7;Microsoft.NET.Workload.Emscripten.Current;Microsoft.NET.Workload.Emscripten.net6;Microsoft.NET.Workload.Emscripten.net7"> + $([MSBuild]::NormalizePath($([System.IO.Directory]::GetFiles('%(RestoredMsiNupkgContentPath)/data/', '*$(MsiArchitectureForWorkloadManifests).msi')))) + @@ -82,13 +92,13 @@ + DestinationPath="%(BundledManifests.FeatureBand)/$([MSBuild]::ValueOrDefault('%(Identity)', '').ToLower())/%(BundledManifests.Version)/localize"/> diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index f0a94502e..d6e428bb3 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -20,28 +20,37 @@ + + + + + + + + + + + + - - - + + - - - - + + + + + @@ -103,7 +112,7 @@ + Condition="'%(BundledTemplatesWithInstallPaths.TemplateFrameworkVersion)' == '8.0'"/> + diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets index 645c4681b..d9f961933 100644 --- a/src/redist/targets/Crossgen.targets +++ b/src/redist/targets/Crossgen.targets @@ -1,7 +1,7 @@ - + @@ -11,7 +11,7 @@ $(RedistLayoutPath)shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppRuntimePackageVersion) - $(RedistLayoutPath)shared/$(SharedFrameworkName)/$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion) + $(RedistLayoutPath)shared/$(SharedFrameworkName)/$(VSRedistCommonNetCoreTargetingPackx6480PackageVersion) @@ -29,7 +29,27 @@ BuildInParallel="False" Projects="@(CrossGenDownloadPackageProject)"> - + + + + net8.0 + + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Worker\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Containers\tasks\$(DefaultToolTfm)\ + + @@ -48,17 +68,21 @@ + + + + - - - - - - - - - - + + + + + + + + + + @@ -121,6 +145,20 @@ false + + + + + + + + + + + + + + Library false true + true diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index db2c5feb2..299a76d5e 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -16,20 +16,75 @@ Overwrite="true" Encoding="ASCII" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {%0A@(Line->' "%(Identity)": { "commit": "%(Commit)", "version": "%(Version)" }', ',%0A')%0A} + + - - 30 - 32 - 17 - - Microsoft.NETCoreSdk.BundledVersions.props @@ -40,6 +95,21 @@ <_NETStandardLibraryPackageVersion>$(NETStandardLibraryRefPackageVersion) <_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion) + <_NET70RuntimePackVersion>7.0.$(VersionFeature70) + <_NET70TargetingPackVersion>7.0.$(VersionFeature70) + <_NET70WebAssemblyPackVersion>$(MicrosoftNETCoreAppRuntimePackageVersion) + <_WindowsDesktop70RuntimePackVersion>7.0.$(VersionFeature70) + <_WindowsDesktop70TargetingPackVersion>7.0.$(VersionFeature70) + <_AspNet70RuntimePackVersion>7.0.$(VersionFeature70) + <_AspNet70TargetingPackVersion>7.0.$(VersionFeature70) + + <_NET60RuntimePackVersion>6.0.$(VersionFeature60) + <_NET60TargetingPackVersion>6.0.$(VersionFeature60) + <_WindowsDesktop60RuntimePackVersion>6.0.$(VersionFeature60) + <_WindowsDesktop60TargetingPackVersion>6.0.$(VersionFeature60) + <_AspNet60RuntimePackVersion>6.0.$(VersionFeature60) + <_AspNet60TargetingPackVersion>6.0.$(VersionFeature60) + <_NET50RuntimePackVersion>5.0.$(VersionFeature50) <_NET50TargetingPackVersion>5.0.0 <_WindowsDesktop50RuntimePackVersion>5.0.$(VersionFeature50) @@ -111,33 +181,64 @@ - - + + + + + + + + + + + - + + + + - + + + + + + + - + + + + + + + + + + + + - + + + + + + + <_KnownRuntimeIdentiferPlatforms Include="any;aot;freebsd;illumos;solaris;unix" /> + <_ExcludedKnownRuntimeIdentiferPlatforms Include="rhel.6;tizen.4.0.0;tizen.5.0.0" Condition="'$(DotNetBuildFromSource)' != 'true'" /> + <_ExcludedKnownRuntimeIdentiferPlatforms Include="rhel.6" Condition="'$(DotNetBuildFromSource)' == 'true' and !$(ProductMonikerRid.StartsWith('rhel.6-'))" /> + <_ExcludedKnownRuntimeIdentiferPlatforms Include="tizen.4.0.0" Condition="'$(DotNetBuildFromSource)' == 'true' and !$(ProductMonikerRid.StartsWith('tizen.4.0.0-'))" /> + <_ExcludedKnownRuntimeIdentiferPlatforms Include="tizen.5.0.0" Condition="'$(DotNetBuildFromSource)' == 'true' and !$(ProductMonikerRid.StartsWith('tizen.5.0.0-'))" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_KnownRuntimeIdentiferPlatforms Include="@(_KnownRuntimeIdentiferPlatforms, '%3B')" /> + <_ExcludedKnownRuntimeIdentiferPlatforms Include="@(_ExcludedKnownRuntimeIdentiferPlatforms, '%3B')" /> ]]> diff --git a/src/redist/targets/GenerateLayout.targets b/src/redist/targets/GenerateLayout.targets index 412ca545c..9ce749629 100644 --- a/src/redist/targets/GenerateLayout.targets +++ b/src/redist/targets/GenerateLayout.targets @@ -8,22 +8,22 @@ - $(VSRedistCommonAspNetCoreSharedFrameworkx6460PackageVersion) - $(MicrosoftAspNetCoreAppRuntimePackageVersion) + $(VSRedistCommonAspNetCoreSharedFrameworkx6480PackageVersion) + $(MicrosoftAspNetCoreAppRuntimePackageVersion) - $(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion) - $(MicrosoftNETCoreAppRuntimePackageVersion) + $(VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion) + $(MicrosoftNETCoreAppRuntimePackageVersion) - $(VSRedistCommonWindowsDesktopSharedFrameworkx6460PackageVersion) + $(VSRedistCommonWindowsDesktopSharedFrameworkx6480PackageVersion) - $(VSRedistCommonNetCoreTargetingPackx6460PackageVersion) + $(VSRedistCommonNetCoreTargetingPackx6480PackageVersion) $(MicrosoftAspNetCoreAppRefInternalPackageVersion) - $(VSRedistCommonWindowsDesktopTargetingPackx6460PackageVersion) + $(VSRedistCommonWindowsDesktopTargetingPackx6480PackageVersion) 3.0.0 @@ -38,6 +38,7 @@ $(HostRid) $(OSName)-$(Architecture) + $(HostRid.Replace('mariner.2.0', 'cm.2')) -internal @@ -59,13 +60,12 @@ dotnet-host$(InstallerStartSuffix)-$(SharedHostVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-hostfxr$(InstallerStartSuffix)-$(HostFxrVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-runtime$(InstallerStartSuffix)-$(MicrosoftNETCoreAppRuntimePackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) - dotnet-runtime$(InstallerStartSuffix)$(PgoTerm)-$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) + dotnet-runtime$(InstallerStartSuffix)$(PgoTerm)-$(VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-runtime-deps-$(SharedHostVersion)-$(RuntimeDepsInstallerFileRid)$(InstallerExtension) windowsdesktop-runtime-$(MicrosoftWindowsDesktopAppRuntimePackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-targeting-pack-$(MicrosoftNETCoreAppRefPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-apphost-pack-$(MicrosoftNETCoreAppHostPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) dotnet-apphost-pack-$(MicrosoftNETCoreAppHostPackageVersion)-$(SharedFrameworkInstallerFileRid)_$(AlternateArchitecture)$(InstallerExtension) - dotnet-apphost-pack-$(MicrosoftNETCoreAppHostPackageVersion)-$(SharedFrameworkInstallerFileRid)_arm$(InstallerExtension) dotnet-apphost-pack-$(MicrosoftNETCoreAppHostPackageVersion)-$(SharedFrameworkInstallerFileRid)_arm64$(InstallerExtension) windowsdesktop-targeting-pack-$(MicrosoftWindowsDesktopAppRefPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) netstandard-targeting-pack-$(NETStandardLibraryRefPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) @@ -81,7 +81,7 @@ $(ProductMonikerRid) linux-$(Architecture) dotnet-runtime-$(MicrosoftNETCoreAppRuntimePackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) - dotnet-runtime$(PgoTerm)-$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) + dotnet-runtime$(PgoTerm)-$(VSRedistCommonNetCoreSharedFrameworkx6480PackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) windowsdesktop-runtime-$(MicrosoftWindowsDesktopAppRuntimePackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) $(HostOSName)-$(BuildArchitecture) @@ -94,14 +94,13 @@ aarch64 aspnetcore-runtime-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreInstallerRid)$(InstallerExtension) - aspnetcore-runtime-$(VSRedistCommonAspNetCoreSharedFrameworkx6460PackageVersion)-$(AspNetCoreInstallerRid)$(InstallerExtension) - + aspnetcore-runtime-$(VSRedistCommonAspNetCoreSharedFrameworkx6480PackageVersion)-$(AspNetCoreInstallerRid)$(InstallerExtension) aspnetcore-runtime-internal-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreInstallerRid).wixlib aspnetcore-targeting-pack-$(MicrosoftAspNetCoreAppRefPackageVersion)-$(AspNetCoreInstallerRid)$(InstallerExtension) aspnetcore-targeting-pack-$(MicrosoftAspNetCoreAppRefInternalPackageVersion)-$(AspNetCoreInstallerRid)$(InstallerExtension) aspnetcoremodule_$(Architecture)_en_v2_$(MicrosoftAspNetCoreAppRuntimePackageVersion)$(InstallerExtension) aspnetcore-targeting-pack-$(MicrosoftAspNetCoreAppRefPackageVersion)-$(AspNetCoreArchiveRid)$(ArchiveExtension) - aspnetcore-runtime-internal-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreArchiveRid)$(ArchiveExtension) + aspnetcore-runtime-$(MicrosoftAspNetCoreAppRuntimePackageVersion)-$(AspNetCoreArchiveRid)$(ArchiveExtension) aspnetcore_base_runtime.version @@ -109,9 +108,9 @@ $(PublicBaseURL)Runtime/ - $(PublicBaseURL) + $(PublicBaseURL) $(PublicBaseURL)aspnetcore/Runtime/ - $(PublicBaseURL) + $(PublicBaseURL) $(PublicBaseURL)WindowsDesktop/ $(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppRuntimePackageVersion) $(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) @@ -119,20 +118,18 @@ win-$(AlternateArchitecture) - win-arm win-arm64 win-x86 win-x64 - win-arm $(CoreSetupRootUrl)$(CoreSetupBlobVersion) - $(CoreSetupRootUrl) + $(CoreSetupRootUrl) $(CombinedFrameworkHostArchiveFileName) @@ -172,13 +169,6 @@ packs/%(PackageName)/%(PackageVersion) - - Microsoft.NETCore.App.Host.$(ArmAppHostRid) - $(MicrosoftNETCoreAppHostPackageVersion) - $(TargetFramework) - packs/%(PackageName)/%(PackageVersion) - - Microsoft.NETCore.App.Host.$(Arm64AppHostRid) $(MicrosoftNETCoreAppHostPackageVersion) @@ -193,6 +183,20 @@ packs/%(PackageName)/%(PackageVersion) + + Microsoft.NETCore.App.Runtime.$(SharedFrameworkRid) + $(MicrosoftNETCoreAppRuntimePackageVersion) + $(TargetFramework) + packs/%(PackageName)/%(PackageVersion) + + + + Microsoft.AspNetCore.App.Runtime.$(SharedFrameworkRid) + $(MicrosoftAspNetCoreAppRuntimePackageVersion) + $(TargetFramework) + packs/%(PackageName)/%(PackageVersion) + + $(CoreSetupRootUrl)$(CoreSetupBlobVersion) @@ -243,12 +247,6 @@ $(DownloadedAlternateNetCoreAppHostPackInstallerFileName) - - $(CoreSetupRootUrl)$(CoreSetupBlobVersion) - $(DownloadedArmNetCoreAppHostPackInstallerFileName) - - $(CoreSetupRootUrl)$(CoreSetupBlobVersion) @@ -256,14 +254,14 @@ + Condition="'$(InstallerExtension)' == '.msi' And '$(SkipBuildingInstallers)' != 'true'"> $(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopTargetingPackBlobVersion) $(DownloadedWindowsDesktopTargetingPackInstallerFileName) $(PublicBaseURL)Sdk/$(MicrosoftDotnetToolsetInternalPackageVersion) - $(PublicBaseURL) + $(PublicBaseURL) dotnet-toolset-internal-$(MicrosoftDotnetToolsetInternalPackageVersion).zip sdk/$(Version) @@ -272,9 +270,10 @@ $(AspNetCoreSharedFxRootUrl)$(AspNetCoreBlobVersion) - $(AspNetCoreSharedFxRootUrl) + $(AspNetCoreSharedFxRootUrl) $(AspNetCoreSharedFxArchiveFileName) + shared/Microsoft.AspNetCore.App - + %(ComponentToDownload.ShouldDownload) %(ComponentToDownload.DownloadDestination) - + + + + + %(ComponentToDownload.ShouldDownload) %(ComponentToDownload.DownloadDestination) - + %(ComponentToDownload.ShouldDownload) %(ComponentToDownload.DownloadDestination) $(DotNetRuntimeSourceFeedKey) - - %(ComponentToDownload.ShouldDownload) - %(ComponentToDownload.DownloadDestination) - $(dotnetbuilds-internal-container-read-token-base64) - - + @@ -448,7 +453,8 @@ + DestinationDirectory="$(RedistLayoutPath)/%(BundledLayoutComponent.RelativeLayoutPath)" + DirectoriesToCopy="%(BundledLayoutComponent.DirectoriesToCopy)"/> - - - - - - - "Newtonsoft.Json": "13.0.1.0" - - - Newtonsoft.Json/13.0.1.0 - - - - - - - - - - + @@ -512,7 +495,11 @@ - + + + + @@ -579,7 +566,15 @@ - + + + + + + + + diff --git a/src/redist/targets/GenerateMSBuildExtensions.targets b/src/redist/targets/GenerateMSBuildExtensions.targets index 38bf5c09c..5392ff556 100644 --- a/src/redist/targets/GenerateMSBuildExtensions.targets +++ b/src/redist/targets/GenerateMSBuildExtensions.targets @@ -7,11 +7,15 @@ NETStandard.Library.NETFramework $(NuGetPackageRoot)$(NETStandardLibraryNETFrameworkPackageName.ToLower())/$(CLI_NETStandardLibraryNETFrameworkVersion.ToLower()) + + Microsoft.Deployment.DotNet.Releases + $(NuGetPackageRoot)$(DotNetDeploymentReleasesPackageName.ToLower())/$(MicrosoftDeploymentDotNetReleasesVersion.ToLower()) + @@ -41,6 +45,9 @@ Exclude="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.props;$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.targets" DeploymentSubpath="msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/" /> + + @@ -51,4 +58,4 @@ - \ No newline at end of file + diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index 47aac67a4..41d2c7820 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -1,15 +1,5 @@ - - netcoreapp3.1 - net6.0 - net6.0 - net472 - $(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll - - - - @@ -71,15 +61,15 @@ $(LayoutDirectory)MSBuildExtensions--> + + + Condition=" '$(GitCommitCount)' == '' AND '$(_PatchNumber)' == '' "> - - $(GitCommitCount.PadLeft(6,'0')) @@ -167,6 +157,8 @@ '$(MsiVersion)' ^ '$(SDKBundleVersion)' ^ '$(Version)' ^ + '$(VersionMajor)' ^ + '$(VersionMinor)' ^ '$(SdkInstallerUpgradeCode)' ^ '$(SdkDependencyKeyName)' ^ '$(Architecture)' ^ @@ -205,6 +197,8 @@ '$(MsiVersion)' ^ '$(SDKBundleVersion)' ^ '$(Version)' ^ + '$(VersionMajor)' ^ + '$(VersionMinor)' ^ '$(SdkPlaceholderInstallerUpgradeCode)' ^ '$(SdkPlaceholderDependencyKeyName)' ^ '$(Architecture)' ^ @@ -240,6 +234,8 @@ '%(TemplatesMsiComponent.MsiVersion)' ^ '%(TemplatesMsiComponent.MsiVersion)' ^ '$(FullNugetVersion)' ^ + '$(VersionMajor)' ^ + '$(VersionMinor)' ^ '%(TemplatesMsiComponent.UpgradeCode)' ^ '%(TemplatesMsiComponent.DependencyKeyName)' ^ '$(Architecture)' ^ @@ -281,6 +277,11 @@ + + <_Manifests Include="@(BundledManifests)"> + $([MSBuild]::NormalizePath($([System.IO.Directory]::GetFiles('%(RestoredMsiNupkgContentPath)/data/', '*$(MsiArchitectureForWorkloadManifests).msi')))) + + $(IntermediateOutputPath)WorkloadManifests.wxs @@ -290,7 +291,7 @@ - @(BundledManifests->' + @(_Manifests->' ', ' ') @@ -307,8 +308,27 @@ Overwrite="true" /> + + + + %(SDKInternalFiles.Identity) + + + + + + + + $(MinimumVSVersion.Substring(0,$(MinimumVSVersion.LastIndexOf('.')))) + $([MSBuild]::Add($(MinimumVSVersion), .1)) + + + @@ -377,7 +399,7 @@ + + + + + - - @@ -519,13 +544,9 @@ MsiTargetsSetupInputOutputs; AcquireWix; GenerateSdkMsi; - SignSdkMsi; GenerateTemplatesMsis; - SignTemplatesMsis; GenerateSdkBundle; - SignSdkBundle; GenerateSdkPlaceholderMsi; - SignSdkPlaceholderMsi; GenerateToolsetNupkg; GenerateTemplatesNupkgs; GenerateSdkPlaceholderNupkg; diff --git a/src/redist/targets/GeneratePKG.targets b/src/redist/targets/GeneratePKG.targets index 39a79152d..9cab8a0a9 100644 --- a/src/redist/targets/GeneratePKG.targets +++ b/src/redist/targets/GeneratePKG.targets @@ -95,7 +95,8 @@ x86_64 - 10.13 + + 10.15 11.0 @@ -156,7 +157,8 @@ + DestinationDirectory="$(SdkInternalLayoutPath)" + DirectoriesToCopy="shared/Microsoft.AspNetCore.App" /> diff --git a/src/redist/targets/GenerateRPMs.targets b/src/redist/targets/GenerateRPMs.targets index a82f068fc..b5d03d5a9 100644 --- a/src/redist/targets/GenerateRPMs.targets +++ b/src/redist/targets/GenerateRPMs.targets @@ -12,8 +12,10 @@ DependsOnTargets="GetCurrentRuntimeInformation; GenerateRpmsInner" /> + diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets index a99a7e9da..39f89415f 100644 --- a/src/redist/targets/GetRuntimeInformation.targets +++ b/src/redist/targets/GetRuntimeInformation.targets @@ -1,6 +1,8 @@ + + $(__DistroRid) $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant) @@ -9,26 +11,29 @@ osx freebsd linux - + + $(Rid.Substring(0, $(Rid.LastIndexOf('-')))) $(HostOSName) - $(OSName)-$(Architecture) + $(OSName) + + $(OSName)-$(Architecture) + + $(PortableOSName)-$(Architecture) true true + true true true - $(Rid) - $(OSName)-$(Architecture) + $(Rid) - $(HostOSName)-$(Architecture) + $(PortableRid) dotnet-sdk-internal$(PgoTerm) dotnet-sdk$(PgoTerm) diff --git a/src/redist/targets/SetBuildDefaults.targets b/src/redist/targets/SetBuildDefaults.targets index eac457403..f01c618b1 100644 --- a/src/redist/targets/SetBuildDefaults.targets +++ b/src/redist/targets/SetBuildDefaults.targets @@ -20,9 +20,6 @@ AND '$(Rid)' != 'ubuntu.18.04-x64'">true--> true - - false - diff --git a/src/redist/targets/Signing.targets b/src/redist/targets/Signing.targets deleted file mode 100644 index a4a2e29bb..000000000 --- a/src/redist/targets/Signing.targets +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - <_DryRun>true - <_DryRun Condition="'$(OfficialBuild)' == 'true'">false - - <_TestSign>false - <_TestSign Condition="'$(DotNetSignType)' == 'test'">true - - <_DesktopMSBuildRequired>false - <_DesktopMSBuildRequired Condition="'$(_DryRun)' != 'true' and '$(MSBuildRuntimeType)' == 'Core'">true - - - - - - - - - <_DesktopMSBuildPath Condition="$(_DesktopMSBuildRequired)">$(_VSInstallDir)\MSBuild\15.0\Bin\msbuild.exe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/redist/targets/packaging/deb/postinst b/src/redist/targets/packaging/deb/postinst index ff22bcbc1..696ec8acc 100644 --- a/src/redist/targets/packaging/deb/postinst +++ b/src/redist/targets/packaging/deb/postinst @@ -1,22 +1,4 @@ #!/usr/bin/env sh -echo "This software may collect information about you and your use of the software, and send that to Microsoft." -echo "Please visit http://aka.ms/dotnet-cli-eula for more information." - -# Run 'dotnet new' to trigger the first time experience to initialize the cache -echo "Welcome to .NET! ---------------------- -Learn more about .NET: https://aka.ms/dotnet-docs -Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs - -Telemetry ---------- -The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell. - -Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry - -Configuring... --------------- -A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once." first_run() { /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true diff --git a/src/redist/targets/packaging/osx/clisdk/resources/conclusion.html.lci b/src/redist/targets/packaging/osx/clisdk/resources/conclusion.html.lci new file mode 100644 index 000000000..c52eb575a --- /dev/null +++ b/src/redist/targets/packaging/osx/clisdk/resources/conclusion.html.lci @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/conclusion.html index 7159a3518..79216d0de 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Nainstalovaly se následující položky:

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Tento produkt shromažďuje data o využití


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/welcome.html index d870f0949..478ab71c1 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/cs.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET je vývojová platforma, kterou můžete použít k vytváření aplikací příkazového řádku, mikroslužeb a moderních webů. Je open source, multiplatformní a podporuje ho Microsoft. Doufáme, že se vám bude líbit!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Poznámka k instalaci

+

Během procesu instalace se spustí příkaz, který zlepší rychlost obnovení projektu a povolí offline přístup. Dokončení bude trvat až minutu.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/conclusion.html index 7159a3518..88d0fcbfe 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Folgendes wurde installiert

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Dieses Produkt sammelt Verbrauchsdaten


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/welcome.html index d870f0949..f2244ce01 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/de.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET ist eine Entwicklungsplattform, die Sie zum Erstellen von Befehlszeilenanwendungen, Microservices und modernen Websites verwenden können. Sie ist Open Source und plattformübergreifend und wird von Microsoft unterstützt. Wir wünschen Ihnen viel Spaß damit!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Installationshinweis

+

Während des Installationsvorgangs wird ein Befehl ausgeführt, durch den die Geschwindigkeit der Projektwiederherstellung verbessert und der Offlinezugriff aktiviert wird. Der Vorgang dauert bis zu einer Minute.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/conclusion.html index 7159a3518..b95c78cfb 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

The following was installed

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,19 +14,19 @@

-

This product collects usage data +

This product collects usage data


diff --git a/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html index d870f0949..477a68ebe 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/en.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Installation note

+

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

diff --git a/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/conclusion.html index 7159a3518..08e4bc6f6 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Se ha instalado lo siguiente

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Este producto recopila datos de uso


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/welcome.html index d870f0949..5d29bf216 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/es.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET es una plataforma de desarrollo que puede utilizar para crear aplicaciones de línea de comandos, microservicios y sitios web modernos. Es de código abierto, multiplataforma y cuenta con el respaldo de Microsoft. ¡Esperamos que lo disfrute!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Nota de instalación

+

Durante el proceso de instalación se ejecutará un comando que mejorará la velocidad de restauración del proyecto y permitirá el acceso sin conexión. Tardará hasta un minuto en completarse.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/conclusion.html index 7159a3518..52a3457c9 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

L’élément suivant a été installé

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Ce produit collecte des données d’utilisation


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/welcome.html index d870f0949..d09490c7c 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/fr.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET est une plateforme de développement qui vous permet de générer des applications en ligne de commande, des microservices et des sites web modernes. Il s’agit d’un framework open source, multiplateforme et pris en charge par Microsoft. Nous espérons que vous l’apprécierez !


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Note d’installation

+

Une commande va être exécutée pendant le processus d’installation, ce qui va améliorer la vitesse de restauration du projet et permettre l’accès hors connexion. L’opération va prendre environ une minute.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/conclusion.html index 7159a3518..729ff5702 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

È stato installato quanto segue

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Questo prodotto raccoglie i dati di utilizzo


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/welcome.html index d870f0949..b846ed27d 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/it.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET è una piattaforma di sviluppo che è possibile usare per creare microservizi, siti Web moderni e applicazioni dalla riga di comando. È open source, multipiattaforma e supportata da Microsoft.


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Nota sull'installazione

+

Durante il processo di installazione verrà eseguito un comando che migliorerà la velocità di ripristino del progetto e abiliterà l'accesso offline. Il completamento del comando richiederà un minuto.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/conclusion.html index 7159a3518..1ab4a4027 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

以下がインストールされました

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

この製品は利用状況データを収集します


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/welcome.html index d870f0949..d7b6d158c 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ja.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.Net は、コマンドライン アプリケーション、マイクロサービス、および最新の Web サイトをビルドするために使用できる開発プラットフォームです。オープンソースのクロス プラットフォームで、Microsoft によってサポートされています。お楽しみいただければ幸いです。


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

インストール メモ

+

コマンドはインストール処理中に実行されるので、プロジェクトの復元速度が向上し、オフラインでアクセスできます。完了するまでに最大 1 分かかります。

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/conclusion.html index 7159a3518..af7f152f0 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

다음이 설치되었습니다.

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

이 제품은 사용량 현황 데이터를 수집합니다.


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/welcome.html index d870f0949..6fb40c480 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ko.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET은 명령줄 애플리케이션, 마이크로 서비스 및 최신 웹 사이트를 빌드하는 데 사용할 수 있는 개발 플랫폼입니다. Microsoft가 지원하는 플랫폼 간 오픈 소스입니다. 즐기시기 바랍니다!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

설치 정보

+

프로젝트 복원 속도를 향상하고 오프라인 액세스를 사용할 수 있도록 하는 설치 프로세스 중 명령이 실행됩니다. 완료하는 데 최대 1분이 걸립니다.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/conclusion.html index 7159a3518..41d3e4bd3 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Zainstalowano następujące elementy

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Ten produkt zbiera dane użycia


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/welcome.html index d870f0949..a97d4e8dc 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/pl.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET to platforma programistyczna, za pomocą której można kompilować aplikacje poziomu wiersza polecenia, mikrousługi i nowoczesne witryny internetowe. Jest to rozwiązanie typu open source, międzyplatformowe i obsługiwane przez firmę Microsoft. Mamy nadzieję, że Ci się spodoba!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Uwaga dotycząca instalacji

+

W trakcie procesu instalacji zostanie uruchomione polecenie, które zwiększy szybkość przywracania projektu i umożliwi dostęp do trybu offline. Ukończenie tego procesu zajmie maksymalnie minutę.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html index 7159a3518..bf8eef457 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

O seguinte foi instalado

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Esse produto coleta dados de uso


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/welcome.html index 3aa06fcd9..457fb3a5f 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/pt-br.lproj/welcome.html @@ -1,4 +1,4 @@ - + @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

O .NET é uma plataforma de desenvolvimento que você pode usar para criar aplicativos de linha de comando, microsserviços e sites modernos. É um software livre, multi-plataforma e suportado pela Microsoft. Esperamos que você goste!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Nota de instalação

+

Um comando será executado durante o processo de instalação que melhorará a velocidade da restauração do projeto e permitirá o acesso offline. A conclusão levará até um minuto.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/conclusion.html index 7159a3518..8aab312fb 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Следующее было установлено

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Этот продукт собирает данные об использовании.


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/welcome.html index d870f0949..a72cdaf65 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/ru.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET — это платформа разработки, которую можно использовать для создания приложений командной строки, микрослужб и современных веб-сайтов. Это кроссплатформенная система с открытым кодом, которая поддерживается корпорацией Майкрософт. Надеемся, что она вам понравится!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Примечание по установке

+

В процессе установки будет выполнена команда, которая увеличит скорость восстановления проекта и обеспечит автономный доступ. Выполнение займет до минуты.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/conclusion.html index 7159a3518..a15637eb2 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

Aşağıdakiler yüklendi:

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

Bu ürün, kullanım verilerini toplar


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/welcome.html index d870f0949..c29d4c7e6 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/tr.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET, komut satırı uygulamaları, mikro hizmetler ve modern web siteleri oluşturmak için kullanabileceğiniz bir geliştirme platformudur. Açık kaynaktır, platformlar arası kullanılabilir ve Microsoft tarafından desteklenmektedir. Keyfini çıkarmanızı umuyoruz!

-

Learn more about .NET

+

.NET hakkında daha fazla bilgi edinin


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

Yükleme notu

+

Yükleme işlemi sırasında proje geri yükleme hızını artıran ve çevrimdışı erişimi etkinleştiren bir komut çalıştırılır. Tamamlanması bir dakikanızı alır.

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/welcome.html.lci b/src/redist/targets/packaging/osx/clisdk/resources/welcome.html.lci new file mode 100644 index 000000000..c287bd4e0 --- /dev/null +++ b/src/redist/targets/packaging/osx/clisdk/resources/welcome.html.lci @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html index 7159a3518..0dde9c060 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

已安装以下项

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

此产品会收集使用情况数据


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/welcome.html index d870f0949..8093c0a6d 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/zh-hans.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET 是一款开发平台,可用于生成命令行应用程序、微服务和新式网站。它是开放源代码、跨平台的,且受 Microsoft 支持。希望你喜欢它!

-

Learn more about .NET

+

了解有关 .NET 的详细信息


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

安装说明

+

将在要提升项目还原速度并实现脱机访问的安装进程期间运行命令。此操作最多 1 分钟即可完成。

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html b/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html index 7159a3518..ff397625b 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html @@ -5,7 +5,7 @@
-

The following was installed +

已安裝下列項目

  • .NET SDK {DOTNETSDKVERSION}
  • .NET Runtime {DOTNETRUNTIMEVERSION}
  • @@ -14,20 +14,20 @@

-

This product collects usage data +

此產品會收集使用方式資料


- + \ No newline at end of file diff --git a/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/welcome.html b/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/welcome.html index d870f0949..08b5f92f5 100644 --- a/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/welcome.html +++ b/src/redist/targets/packaging/osx/clisdk/resources/zh-hant.lproj/welcome.html @@ -7,21 +7,21 @@

.NET SDK

-

.NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform, and supported by Microsoft. We hope you enjoy it!

+

.NET 是開發平台,可用來建置命令列應用程式、微服務和新式網站。其為開放原始碼、跨平台且由 Microsoft 支援。希望您喜歡!


-

Installation note

-

A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.

+

安裝附註

+

安裝程序期間將會執行命令,加快專案還原速度並啟用離線存取。最多需要一分鐘的時間完成。

- + \ No newline at end of file diff --git a/src/redist/targets/packaging/rpm/scripts/after_install_host.sh b/src/redist/targets/packaging/rpm/scripts/after_install_host.sh index b3560eabc..31b3f346e 100644 --- a/src/redist/targets/packaging/rpm/scripts/after_install_host.sh +++ b/src/redist/targets/packaging/rpm/scripts/after_install_host.sh @@ -3,24 +3,6 @@ # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # -echo "This software may collect information about you and your use of the software, and send that to Microsoft." -echo "Please visit http://aka.ms/dotnet-cli-eula for more information." - -# Run 'dotnet new' as the user to trigger the first time experience to initialize the cache -echo "Welcome to .NET! ---------------------- -Learn more about .NET: https://aka.ms/dotnet-docs -Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs - -Telemetry ---------- -The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell. - -Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry - -Configuring... --------------- -A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once." first_run() { /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true diff --git a/src/redist/targets/packaging/windows/clisdk/Init.cmd b/src/redist/targets/packaging/windows/clisdk/Init.cmd index 57b10e6a7..cee1e8f1a 100644 --- a/src/redist/targets/packaging/windows/clisdk/Init.cmd +++ b/src/redist/targets/packaging/windows/clisdk/Init.cmd @@ -1,6 +1,5 @@ @echo off -set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 set DOTNET_MULTILEVEL_LOOKUP=0 set PATH=%~dp0;%PATH% diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1028/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1028/bundle.wxl index dd1b836f6..7a7a1c3fb 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1028/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1028/bundle.wxl @@ -1,17 +1,17 @@ - + [WixBundleName] 安裝程式 [BUNDLEMONIKER] - 您確定要取消嗎? + 確定要取消嗎? 前一版 - 安裝程式說明 - /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 在目錄中安裝、修復、解除安裝或 - 建立套件組合的完整本機複本。預設為 '/install'。 + 安裝說明 + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 在目錄中安裝、修復、解除安裝 + 或建立搭售方案的完整本機複本。預設為 '/install'。 -/passive | /quiet - 顯示最少 UI 且不顯示提示,或不顯示 UI,也 +/passive | /quiet - 顯示最少 UI 且不含提示,或者不顯示 UI,也 不顯示提示。預設會顯示 UI 和所有提示。 -/norestart - 隱藏任何重新啟動嘗試。根據預設,UI 會在重新啟動之前提示。 +/norestart - 隱藏任何重新啟動嘗試。根據預設,UI 會在重新啟動之前提示。 /log [\[]"log.txt"[\]] - 記錄至特定檔案。預設會在 %TEMP% 建立記錄檔。 關閉(&C) 我同意授權條款及條件(&A) @@ -19,7 +19,7 @@ 安裝(&I) 關閉(&C) 安裝進度 - 正在處理: + 處理中: 正在初始化... 取消(&C) 修改安裝 @@ -34,11 +34,11 @@ 重新啟動(&R) 關閉(&C) 設定失敗 - 安裝程式失敗 + 設定失敗 解除安裝失敗 修復失敗 有一個或多個問題導致安裝程式失敗。請解決問題,然後重試一次安裝。如需詳細資訊,請參閱<a href="#">記錄檔</a>。 - 必須重新啟動電腦才可完成軟體復原。 + 必須重新啟動電腦,才能完成軟體的復原。 重新啟動(&R) 關閉(&C) 使用中的檔案 @@ -49,20 +49,20 @@ 取消(&C) 安裝成功。 -下列項目已安裝在: '[DOTNETHOME]' - • .NET SDK [DOTNETSDKVERSION] - • .NET Runtime [DOTNETRUNTIMEVERSION] - • ASP.NET Core Runtime [ASPNETCOREVERSION] - • .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] +已安裝下列產品: + * .NET SDK [DOTNETSDKVERSION] + * .NET Runtime [DOTNETRUNTIMEVERSION] + * ASP.NET Core Runtime [ASPNETCOREVERSION] + * .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] 此產品會收集使用方式資料 - • 如需詳細資訊並退出,請前往 https://aka.ms/dotnet-cli-telemetry + * 如需詳細資訊並退出,請前往 https://aka.ms/dotnet-cli-telemetry 資源 - • 如需 .NET 文件,請前往 https://aka.ms/dotnet-docs - • 如需 SDK 文件,請前往 https://aka.ms/dotnet-sdk-docs - • 如需版本資訊,請前往 https://aka.ms/dotnet6-release-notes - • 如需教學課程,請前往 https://aka.ms/dotnet-tutorials + * 如需 .NET 文件,請前往 https://aka.ms/dotnet-docs + * 如需 SDK 文件,請前往 https://aka.ms/dotnet-sdk-docs + * 如需版本資訊,請前往 https://aka.ms/dotnet[VERSIONMAJOR]-release-notes + * 如需教學課程,請前往 https://aka.ms/dotnet-tutorials .NET SDK .NET SDK 可用於建置、執行及測試 .NET 應用程式。您可以選擇多種語言、編輯器以及開發人員工具,並可利用程式庫的大型生態系統,來建置 Web、行動裝置、桌面、遊戲及 IoT 的應用程式。希望您會喜歡! @@ -76,7 +76,10 @@ 安裝附註 安裝程序期間將會執行命令,加快專案還原速度並啟用離線存取。最多需要一分鐘的時間完成。 - 若預計要搭配 Visual Studio 使用 .NET 6.0,需要 Visual Studio 2022 17.0 或更新版本。<A HREF="https://aka.ms/dotnet6-release-notes">深入了解</A>. + 若計劃要搭配 Visual Studio 使用 .NET [VERSIONMAJOR].[VERSIONMINOR],需要 Visual Studio 2022 [MINIMUMVSVERSION] 或更新版本。<A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">深入了解</A>. - 按一下 [\[]安裝[\[] 即表示您同意下列條款。 - + 按一下 “安裝” 即表示您同意下列條款: + x64 SDK 安裝的安裝路徑: "[DOTNETHOME_X64]" 不能與 x86 SDK 安裝的路徑相同: "[DOTNETHOME_X86]" + ARM64 SDK 安裝的安裝路徑: "[DOTNETHOME_ARM64]" 不能與 x86 SDK 安裝的路徑相同: "[DOTNETHOME_X86]" + ARM64 SDK 安裝的安裝路徑: "[DOTNETHOME_ARM64]" 不能與 x64 SDK 安裝的路徑相同: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1029/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1029/bundle.wxl index 893412976..f823144e4 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1029/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1029/bundle.wxl @@ -1,71 +1,71 @@ - + Instalační program pro [WixBundleName] [BUNDLEMONIKER] Opravdu chcete akci zrušit? Předchozí verze - Nápověda k instalaci - /install | /repair | /uninstall | /layout [\[]"adresář"[\]] – Nainstaluje, opraví, odinstaluje nebo - vytvoří úplnou místní kopii svazku v adresáři. Výchozí možností je /install. + Nápověda nastavení + /install | /repair | /uninstall | /layout [\[]"directory"[\]] – nainstaluje, opraví, odinstaluje + nebo vytvoří úplnou místní kopii sady prostředků v adresáři. /install je výchozí hodnota. -/passive | /quiet – Zobrazí minimální uživatelské rozhraní bez výzev nebo nezobrazí žádné uživatelské rozhraní a - žádné výzvy. Výchozí možností je zobrazení uživatelského rozhraní a všech výzev. +/passive | /quiet – zobrazí minimální uživatelské rozhraní bez výzev nebo nezobrazí žádné uživatelské rozhraní a + žádné výzvy. Ve výchozím nastavení se zobrazí uživatelské rozhraní a všechny výzvy. -/norestart – Potlačí všechny pokusy o restartování. Ve výchozím nastavení uživatelské rozhraní před restartováním zobrazí výzvu. -/log [\[]"log.txt"[\]] – Uloží protokol do konkrétního souboru. Ve výchozím nastavení se soubor protokolu vytvoří v adresáři %TEMP%. +/norestart – potlačí všechny pokusy o restartování. Ve výchozím nastavení uživatelské rozhraní zobrazí před restartováním výzvu. +/log [\[]"log.txt"[\]] – zaznamená do konkrétního souboru. Ve výchozím nastavení se v %TEMP% vytvoří soubor protokolu. &Zavřít - Souhl&asím s licenčními podmínkami. - &Možnosti - &Nainstalovat + Souhl&asím s licenčními podmínkami + M&ožnosti + &Instalovat &Zavřít Průběh instalace - Zpracování: - Inicializuje se... - &Zrušit + Probíhá zpracování: + Inicializace... + &Storno Změnit instalaci Op&ravit - Odi&nstalovat + O&dinstalovat &Zavřít - Oprava se úspěšně dokončila. - Odinstalace se úspěšně dokončila. - Nastavení proběhlo úspěšně. + Oprava byla úspěšně dokončena + Odinstalace se úspěšně dokončila + Instalace byla úspěšná. &Spustit Aby bylo možné dokončit instalaci softwaru, je nutné restartovat počítač. &Restartovat &Zavřít - Instalace se nepovedla. - Instalace se nepovedla. - Odinstalace se nepovedla. - Oprava se nepovedla. - Instalace se nepovedla kvůli jednomu nebo víc problémům. Opravte tyto problémy a zkuste software znovu nainstalovat. Další informace najdete v <a href="#">souboru protokolu</a>. + Instalace se nepovedla + Instalace se nepovedla + Odinstalace se nepovedla + Oprava se nepovedla + Nejméně jeden problém způsobil selhání instalace. Opravte prosím tyto problémy a zkuste instalaci zopakovat. Další informace najdete v <a href="#">log file</a>. Pro dokončení vrácení změn tohoto softwaru je potřeba restartovat počítač. &Restartovat &Zavřít - Používané soubory + Soubory jsou používány Následující aplikace používají soubory, které je potřeba aktualizovat: Zavřete &aplikace a zkuste je restartovat. A&plikace nezavírejte. Bude potřeba provést restart. &OK &Zrušit - Instalace proběhla úspěšně. + Instalace byla úspěšná. -Do [DOTNETHOME] byly nainstalovány tyto součásti: - • Sada .NET SDK [DOTNETSDKVERSION] - • Modul runtime .NET [DOTNETRUNTIMEVERSION] - • Modul runtime ASP.NET Core [ASPNETCOREVERSION] - • Modul runtime .NET Windows Desktop [WINFORMSANDWPFVERSION] +Byly nainstalovány následující produkty: + • .NET SDK [DOTNETSDKVERSION] + • .NET Runtime [DOTNETRUNTIMEVERSION] + • ASP.NET Core Runtime [ASPNETCOREVERSION] + • .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] -Tento produkt shromažďuje data o využití. - • Další informace a vyjádření výslovného nesouhlasu: https://aka.ms/dotnet-cli-telemetry +Tento produkt shromažďuje data o využití + • Další informace a odhlášení https://aka.ms/dotnet-cli-telemetry -Zdroje informací - • Dokumentace k .NET : https://aka.ms/dotnet-docs - • Dokumentace k sadě SDK: https://aka.ms/dotnet-sdk-docs - • Zpráva k vydání verze: https://aka.ms/dotnet6-release-notes - • Kurzy: https://aka.ms/dotnet-tutorials +Prostředky + • Dokumentace .NET https://aka.ms/dotnet-docs + • Dokumentace SDK https://aka.ms/dotnet-sdk-docs + • Poznámky k verzi https://aka.ms/dotnet[VERSIONMAJOR]-release-notes + • Kurzy https://aka.ms/dotnet-tutorials Sada .NET SDK - Sada .NET SDK se používá k vytváření, spouštění a testování aplikací .NET. Můžete si vybrat z několika jazyků, editorů a vývojářských nástrojů. K dispozici jsou výhody rozsáhlého ekosystému knihoven, se kterými můžete vytvářet aplikace pro web, mobilní zařízení, desktop, herní zařízení a IoT. Doufáme, že se vám bude líbit! + Sada .NET SDK slouží k sestavování, spouštění a testování aplikací .NET. Můžete si vybrat z několika jazyků, editorů a vývojářských nástrojů a využít rozsáhlého ekosystému knihoven k vytváření aplikací pro web, mobilní zařízení, stolní počítače, hry a IoT. Doufáme, že se vám bude líbit!
Další informace o .NET Prostředky <A HREF="https://aka.ms/dotnet-docs">Dokumentace k architektuře .NET</A> @@ -76,7 +76,10 @@ Zdroje informací Poznámka k instalaci Během procesu instalace se spustí příkaz, který zlepší rychlost obnovení projektu a povolí offline přístup. Akce se dokončí přibližně za minutu. - Pokud se chystáte používat .NET 6.0 se sadou Visual Studio, potřebujete Visual Studio 2022 17.0 nebo novější. <A HREF="https://aka.ms/dotnet6-release-notes">Další informace</A>. + Pokud plánujete používat .NET [VERSIONMAJOR].[VERSIONMINOR] s Visual Studio, vyžaduje se Visual Studio 2022 [MINIMUMVSVERSION] nebo novější. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Další informace</A>. - Kliknutím na Nainstalovat vyjadřujete souhlas s následujícími podmínkami. - + Kliknutím na Nainstalovat vyjadřujete souhlas s následujícími podmínkami: + Instalační cesta pro instalace sady x64 SDK[ DOTNETHOME_X64] nemůže být stejná jako u instalací sady x86 SDK: [DOTNETHOME_X86]. + Instalační cesta pro instalace sady ARM64 SDK[ DOTNETHOME_ARM64] nemůže být stejná jako u instalací sady x86 SDK: [DOTNETHOME_X86] + Instalační cesta pro instalace sady ARM64 SDK[ DOTNETHOME_ARM64] nemůže být stejná jako u instalací sady x64 SDK: [DOTNETHOME_X64] + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1031/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1031/bundle.wxl index 1524c80c0..31aec6fde 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1031/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1031/bundle.wxl @@ -1,47 +1,47 @@ - + - [WixBundleName]-Installer + [WixBundleName]-Installationsprogramm [BUNDLEMONIKER] Möchten Sie den Vorgang wirklich abbrechen? Vorherige Version - Hilfe zum Setup - /install | /repair | /uninstall | /layout [\[]"Verzeichnis"[\]]: Installiert, repariert, deinstalliert oder - erstellt eine vollständige lokale Kopie des Bundles im Verzeichnis. "/install" ist die Standardeinstellung. + Setup-Hilfe + /install | /repair | /uninstall | /layout [\[]"directory"[\]] – installiert, repariert, deinstalliert + oder erstellt eine vollständige lokale Kopie des Bundles im Verzeichnis. „/install“ ist die Standardeinstellung. -/passive | /quiet: Zeigt eine minimale Benutzeroberfläche ohne Eingabeaufforderungen bzw. keine - Benutzeroberfläche und keine Eingabeaufforderungen an. Standardmäßig werden die Benutzeroberfläche und alle Eingabeaufforderungen angezeigt. +/passive | /quiet – zeigt eine minimale Benutzeroberfläche ohne Eingabeaufforderungen oder keine Benutzeroberfläche und + keine Eingabeaufforderungen an. Standardmäßig werden die Benutzeroberfläche und alle Eingabeaufforderungen angezeigt. -/norestart: Unterdrückt alle Neustartversuche. Standardmäßig fordert die Benutzeroberfläche zum Bestätigen eines Neustarts auf. -/log [\[]"log.txt"[\]]: Erstellt das Protokoll in einer bestimmten Datei. Standardmäßig wird die Protokolldatei in %TEMP% erstellt. - &Schließen - Ich &stimme den Lizenzbedingungen zu. +/norestart – unterdrückt alle Neustartversuche. Standardmäßig fordert die Benutzeroberfläche zum Bestätigen eines Neustarts auf. +/log [\[]"log.txt"[\]] – protokolliert in eine bestimmte Datei. Standardmäßig wird die Protokolldatei in %TEMP% erstellt. + S&chließen + Ich &stimme den Bedingungen des Lizenzvertrags zu &Optionen &Installieren - &Schließen + S&chließen Setupstatus - Verarbeitung: - Initialisierung... + Wird verarbeitet: + Wird initialisiert... &Abbrechen Setup ändern &Reparieren &Deinstallieren - &Schließen - Die Reparatur wurde erfolgreich abgeschlossen. - Die Deinstallation wurde erfolgreich abgeschlossen. + S&chließen + Reparatur erfolgreich abgeschlossen + Deinstallation erfolgreich abgeschlossen Setup wurde erfolgreich abgeschlossen &Starten Sie müssen den Computer neu starten, um die Installation der Software abzuschließen. - &Neu starten - &Schließen + &Neustart + S&chließen Setupfehler - Setupfehler - Deinstallationsfehler - Reparaturfehler - Setup ist aufgrund eines oder mehrerer Probleme fehlgeschlagen. Beheben Sie die Probleme, und führen Sie das Setup erneut aus. Weitere Informationen finden Sie in der <a href="#">Protokolldatei</a>. - Sie müssen Ihren Computer neu starten, um den Rollback der Software abzuschließen. - &Neu starten - &Schließen - Verwendete Dateien + Fehler beim Setup + Fehler bei der Deinstallation + Fehler bei der Reparatur + Setup ist aufgrund eines oder mehrerer Probleme fehlgeschlagen. Beheben Sie die Probleme, und führen Sie Setup erneut aus. Weitere Informationen finden Sie in der <a href="#">Protokolldatei</a>. + Sie müssen den Computer neu starten, um das Zurücksetzen der Software abzuschließen. + &Neustart + S&chließen + Dateien in Verwendung Die folgenden Anwendungen verwenden Dateien, die aktualisiert werden müssen: Schließen Sie die &Anwendungen, und versuchen Sie sie erneut zu starten. &Anwendungen nicht schließen. Ein Neustart ist erforderlich. @@ -49,23 +49,23 @@ &Abbrechen Die Installation war erfolgreich. -Folgende Komponenten wurden unter [DOTNETHOME] installiert: - • .NET SDK [DOTNETSDKVERSION] - • .NET Runtime [DOTNETRUNTIMEVERSION] - • ASP.NET Core Runtime [ASPNETCOREVERSION] - • .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] +Die folgenden Produkte wurden unter installiert: + • .NET-SDK [DOTNETSDKVERSION] + • .NET-Runtime [DOTNETRUNTIMEVERSION] + • ASP.NET Core-Runtime [ASPNETCOREVERSION] + • .NET Windows Desktop-Runtime [WINFORMSANDWPFVERSION] -Dieses Produkt erfasst Nutzungsdaten. - • Weitere Informationen und Deaktivieren der Erfassung: https://aka.ms/dotnet-cli-telemetry +Dieses Produkt sammelt Verbrauchsdaten. + • Weitere Informationen und Deaktivieren https://aka.ms/dotnet-cli-telemetry Ressourcen • .NET-Dokumentation: https://aka.ms/dotnet-docs • SDK-Dokumentation: https://aka.ms/dotnet-sdk-docs - • Versionshinweise: https://aka.ms/dotnet6-release-notes + • Versionshinweise: https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Tutorials: https://aka.ms/dotnet-tutorials - .NET SDK + .NET-SDK - Das .NET SDK wird zum Erstellen, Ausführen und Testen von .NET-Anwendungen verwendet. Sie können aus mehreren Sprachen, Editoren und Entwicklertools auswählen und ein großes Bibliotheksnetzwerk nutzen, um Apps für das Web, mobile Geräte, Desktops, Gaming und IoT zu entwickeln. Wir wünschen Ihnen viel Spaß damit! + Das .NET-SDK wird zum Erstellen, Ausführen und Testen von .NET-Anwendungen verwendet. Sie können aus mehreren Sprachen, Editoren und Entwicklertools auswählen und ein großes Ökosystem von Bibliotheken nutzen, um Apps für das Web, mobile Geräte, Desktops, Gaming und IoT zu entwickeln. Wir wünschen Ihnen viel Spaß damit! Weitere Informationen zu .NET Ressourcen <A HREF="https://aka.ms/dotnet-docs">.NET-Dokumentation</A> @@ -76,7 +76,10 @@ Ressourcen Installationshinweis Während des Installationsvorgangs wird ein Befehl ausgeführt, durch den die Geschwindigkeit der Projektwiederherstellung verbessert und der Offlinezugriff aktiviert wird. Der Vorgang dauert bis zu einer Minute. - Wenn Sie .NET 6.0 mit Visual Studio verwenden möchten, ist Visual Studio 2022 17.0 oder höher erforderlich. <A HREF="https://aka.ms/dotnet6-release-notes">Weitere Informationen</A> + Wenn Sie beabsichtigen, .NET [VERSIONMAJOR].[VERSIONMINOR] mit Visual Studio zu verwenden, ist Visual Studio 2022 [MINIMUMVSVERSION] oder höher erforderlich. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Weitere Informationen</A>. - Durch Klicken auf "Installieren" stimmen Sie den nachstehenden Bedingungen zu. - + Durch Klicken auf „Installieren2 stimmen Sie den nachstehenden Bedingungen zu: + Der Installationspfad „[DOTNETHOME_X64]“ für x64 SDK-Installationen kann nicht derselbe sein wie für x86 SDK-Installationen: „[DOTNETHOME_X86]“ + Der Installationspfad „[DOTNETHOME_ARM64]“ für ARM64 SDK-Installationen kann nicht derselbe sein wie für x86 SDK-Installationen: „[DOTNETHOME_X86]“ + Der Installationspfad „[DOTNETHOME_ARM64]“ für ARM64 SDK-Installationen kann nicht derselbe sein wie für x64 SDK-Installationen: „[DOTNETHOME_X64]“ + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1033/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1033/bundle.wxl index 436c5ef0a..3ae19e78e 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1033/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1033/bundle.wxl @@ -1,4 +1,4 @@ - + [WixBundleName] Installer [BUNDLEMONIKER] @@ -47,9 +47,9 @@ &Do not close applications. A reboot will be required. &OK &Cancel - The installation was successful. + The installation was successful. -The following products were installed at: '[DOTNETHOME]' +The following products were installed: • .NET SDK [DOTNETSDKVERSION] • .NET Runtime [DOTNETRUNTIMEVERSION] • ASP.NET Core Runtime [ASPNETCOREVERSION] @@ -61,10 +61,10 @@ This product collects usage data Resources • .NET Documentation https://aka.ms/dotnet-docs • SDK Documentation https://aka.ms/dotnet-sdk-docs - • Release Notes https://aka.ms/dotnet6-release-notes + • Release Notes https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Tutorials https://aka.ms/dotnet-tutorials - .NET SDK - + .NET SDK + The .NET SDK is used to build, run, and test .NET applications. You can choose from multiple languages, editors, and developer tools, and take advantage of a large ecosystem of libraries to build apps for web, mobile, desktop, gaming, and IoT. We hope you enjoy it! Learn more about .NET Resources @@ -76,7 +76,10 @@ Resources Installation note A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete. - If you plan to use .NET 6.0 with Visual Studio, Visual Studio 2022 17.0 or newer is required. <A HREF="https://aka.ms/dotnet6-release-notes">Learn more</A>. + If you plan to use .NET [VERSIONMAJOR].[VERSIONMINOR] with Visual Studio, Visual Studio 2022 [MINIMUMVSVERSION] or newer is required. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Learn more</A>. By clicking Install, you agree to the following terms: - + The installation path for x64 SDK installations: "[DOTNETHOME_X64]" cannot be the same as for x86 SDK installations: "[DOTNETHOME_X86]" + The installation path for ARM64 SDK installations: "[DOTNETHOME_ARM64]" cannot be the same as for x86 SDK installations: "[DOTNETHOME_X86]" + The installation path for ARM64 SDK installations: "[DOTNETHOME_ARM64]" cannot be the same as for x64 SDK installations: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1036/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1036/bundle.wxl index daee64a00..6243737a1 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1036/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1036/bundle.wxl @@ -1,25 +1,25 @@ - + - Programme d'installation de [WixBundleName] + Programme d’installation de [WixBundleName] [BUNDLEMONIKER] Voulez-vous vraiment annuler ? Version précédente - Aide à l'installation - /install | /repair | /uninstall | /layout [\[]"directory"[\]] - installe, répare, désinstalle - ou crée une copie locale complète du bundle dans le répertoire. '/install' est la valeur par défaut. + Aide du programme d'installation + /install | /repair | /uninstall | /layout [\[]"répertoire"[\]] - installe, répare, désinstalle + ou crée une copie locale complète de l’offre groupée dans le répertoire. "/install" est l’option par défaut. -/passive | /quiet - affiche une IU (interface utilisateur) minimale, sans invite, ou n'affiche - aucune IU, ni aucune invite. Par défaut, l'IU et toutes les invites sont affichées. +/passive | /quiet - affiche une interface utilisateur minimale, sans invite, ou n’affiche + ni interface utilisateur, ni invite. Par défaut, l’interface utilisateur et toutes les invites sont affichées. -/norestart - supprime toutes les tentatives de redémarrage. Par défaut, l'IU affiche une invite avant le redémarrage. -/log [\[]"log.txt"[\]] - enregistre les informations dans un fichier spécifique. Par défaut, un fichier journal est créé dans %TEMP%. +/norestart - supprime toutes les tentatives de redémarrage. Par défaut, l’interface utilisateur affiche une invite avant le redémarrage. +/log [\[]"log.txt"[\]] - journalise dans un fichier spécifique. Par défaut, un fichier journal est créé dans %TEMP%. &Fermer J'&accepte les conditions générales de la licence &Options &Installer &Fermer Avancement de l'installation - En cours : + En cours : Initialisation... &Annuler Modifier l'installation @@ -28,8 +28,8 @@ &Fermer Réparation terminée avec succès Désinstallation terminée avec succès - Installation/désinstallation réussie - &Lancer + Opération réussie + &Démarrer Vous devez redémarrer l'ordinateur pour achever l'installation du logiciel. &Redémarrer &Fermer @@ -37,35 +37,35 @@ Échec de l'installation Échec de la désinstallation Échec de la réparation - Un ou plusieurs problèmes sont à l'origine de l'échec de l'installation. Corrigez ces problèmes, puis recommencez l'installation. Pour plus d'informations, voir le <a href="#">fichier journal</a>. - Vous devez redémarrer votre ordinateur afin de terminer la restauration du logiciel. + Le programme d’installation a échoué en raison d’un ou de plusieurs problèmes. Veuillez corriger ces problèmes, puis relancez le programme d’installation. Pour en savoir plus, consultez le <a href="#">fichier journal</a>. + Vous devez redémarrer votre ordinateur pour terminer l'opération de restauration du logiciel. &Redémarrer &Fermer Fichiers en cours d'utilisation - Les applications suivantes utilisent des fichiers nécessitant une mise à jour : - &Fermer les applications essayez de les ouvrir de nouveau. + Les applications suivantes utilisent des fichiers nécessitant une mise à jour : + &Fermer les applications essayer de les ouvrir de nouveau. &Ne pas fermer les applications. Un redémarrage sera nécessaire. &OK &Annuler - L'installation a réussi. + L’installation a réussi. -Les éléments suivants ont été installés sur : '[DOTNETHOME]' +Les éléments suivants ont été installés : • Kit SDK .NET [DOTNETSDKVERSION] • Runtime .NET [DOTNETRUNTIMEVERSION] • Runtime ASP.NET Core [ASPNETCOREVERSION] • Runtime .NET Windows Desktop [WINFORMSANDWPFVERSION] -Ce produit collecte des données d'utilisation - • Plus informations et refus d'adhésion sur https://aka.ms/dotnet-cli-telemetry +Ce produit collecte des données d’utilisation + • Plus informations et refus d’adhésion sur https://aka.ms/dotnet-cli-telemetry Ressources • Documentation .NET sur https://aka.ms/dotnet-docs • Documentation de kit SDK sur https://aka.ms/dotnet-sdk-docs - • Notes de publication sur https://aka.ms/dotnet6-release-notes + • Notes de publication sur https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Tutoriels sur https://aka.ms/dotnet-tutorials - SDK .NET + Kit de développement logiciel (SDK) .NET - Le kit SDK .NET permet de générer, d'exécuter et de tester des applications .NET. Vous pouvez choisir parmi plusieurs langages, éditeurs et outils de développement. De plus, vous pouvez bénéficier d'un vaste écosystème de bibliothèques afin de générer des applications pour le web, les appareils mobiles, les ordinateurs de bureau, les jeux et l'IoT. Nous espérons que vous l'apprécierez ! + Le Kit de développement logiciel (SDK) .NET permet de générer, d’exécuter et de tester des applications .NET. Vous pouvez choisir parmi plusieurs langages, éditeurs et outils de développement. De plus, vous pouvez bénéficier d’un vaste écosystème de bibliothèques afin de générer des applications pour le web, les appareils mobiles, les ordinateurs de bureau, les jeux et l’IoT. Nous espérons que vous l’apprécierez ! En savoir plus sur .NET Ressources <A HREF="https://aka.ms/dotnet-docs">Documentation .NET</A> @@ -73,10 +73,13 @@ Ressources <A HREF="https://aka.ms/dev-privacy">Déclaration de confidentialité</A> <A HREF="https://aka.ms/dotnet-license-windows">Informations de licence pour .NET</A> <A HREF="https://aka.ms/dotnet-cli-telemetry">Collecte et désactivation de la télémétrie</A> - Note d'installation + Note d’installation Une commande va être exécutée pendant le processus d'installation, ce qui va améliorer la vitesse de restauration du projet et permettre l'accès hors connexion. L'opération va prendre environ une minute. - Si vous comptez utiliser .NET 6.0 avec Visual Studio, Visual Studio 2022 17.0 ou une version ultérieure est nécessaire. <A HREF="https://aka.ms/dotnet6-release-notes">En savoir plus</A>. + Si vous envisagez d’utiliser .NET [VERSIONMAJOR].[VERSIONMINOR] avec Visual Studio, Visual Studio 2022 [MINIMUMVSVERSION] ou une version ultérieure est nécessaire. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">En savoir plus</A>. - En cliquant sur Installer, vous acceptez les conditions suivantes. - + En cliquant sur Installer, vous acceptez les conditions suivantes : + Le chemin d’installation des installations du Kit de développement logiciel (SDK) x64 : « [DOTNETHOME_X64] » ne peut pas être identique à celui des installations du Kit de développement logiciel (SDK) x86 : « [DOTNETHOME_X86] » + Le chemin d’installation des installations du Kit de développement logiciel (SDK) ARM64 : "[DOTNETHOME_ARM64]" ne peut pas être identique à celui des installations du Kit de développement logiciel (SDK) x86 : "[DOTNETHOME_X86]" + Le chemin d’installation des installations du Kit de développement logiciel (SDK) ARM64 : « [DOTNETHOME_ARM64] » ne peut pas être identique à celui des installations du Kit de développement logiciel (SDK) x64 : « [DOTNETHOME_X64] » + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1040/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1040/bundle.wxl index c8322a175..14ff0f114 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1040/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1040/bundle.wxl @@ -1,14 +1,14 @@ - + Programma di installazione di [WixBundleName] [BUNDLEMONIKER] Annullare? Versione precedente - Guida alla configurazione + Guida all'installazione /install | /repair | /uninstall | /layout [\[]"directory"[\]] - installa, ripara, disinstalla o crea una copia locale completa del bundle nella directory. L'opzione predefinita è '/install'. -/passive | /quiet - visualizza un'interfaccia utente minima senza prompt oppure non visualizza alcuna interfaccia utente +/passive | /quiet - visualizza un'interfaccia utente minima senza prompt oppure non visualizza alcuna interfaccia utente né prompt. Per impostazione predefinita, viene visualizzata l'intera interfaccia utente e tutti i prompt. /norestart - annulla qualsiasi tentativo di riavvio. Per impostazione predefinita, l'interfaccia utente visualizza una richiesta prima del riavvio. @@ -35,10 +35,10 @@ &Chiudi Installazione non riuscita L'installazione non è riuscita - La disinstallazione non è riuscita + Disinstallazione non riuscita La riparazione non è riuscita - L'installazione non è riuscita a causa di uno o più problemi. Risolvere i problemi e ripetere l'installazione. Per altre informazioni, vedere il <a href="#">file di log</a>. - Per completare il rollback del software, è necessario riavviare il computer. + Installazione non riuscita a causa di uno o più problemi. Risolvere i problemi e ritentare l'installazione. Per ulteriori informazioni, vedere <a href="#">log file</a>. + È necessario riavviare il computer per completare il rollback del software. &Riavvia &Chiudi File in uso @@ -46,26 +46,26 @@ Chiudere le &applicazioni e provare a riavviarle. &Non chiudere le applicazioni; sarà necessario riavviare il sistema &OK - Ann&ulla - L'installazione è riuscita. + &Annulla + Installazione completata. -I componenti seguenti sono stati installati in '[DOTNETHOME]' +Sono stati installati i prodotti seguenti: • .NET SDK [DOTNETSDKVERSION] • Runtime di .NET [DOTNETRUNTIMEVERSION] • Runtime di ASP.NET Core [ASPNETCOREVERSION] - • Runtime di .NET Windows Desktop [WINFORMSANDWPFVERSION] + • Runtime di Windows Desktop .NET [WINFORMSANDWPFVERSION] -Questo prodotto consente di raccogliere i dati sull'utilizzo - • Altre informazioni e annullamento sottoscrizione https://aka.ms/dotnet-cli-telemetry +Questo prodotto raccoglie i dati di utilizzo + • Altre informazioni e rifiuto esplicito https://aka.ms/dotnet-cli-telemetry Risorse - • Documentazione di .NET https://aka.ms/dotnet-docs - • Documentazione dell'SDK https://aka.ms/dotnet-sdk-docs - • Note sulla versione https://aka.ms/dotnet6-release-notes - • Esercitazioni https://aka.ms/dotnet-tutorials + • Documentazione .NET https://aka.ms/dotnet-docs + • Documentazione SDK https://aka.ms/dotnet-sdk-docs + • Note sulla versione https://aka.ms/dotnet[VERSIONMAJOR]-release-notes + • Tutorial https://aka.ms/dotnet-tutorials .NET SDK - .NET SDK consente di creare, eseguire e testare applicazioni NET. È possibile scegliere tra più linguaggi, editor e strumenti di sviluppo e sfruttare un vasto ecosistema di librerie per creare app per Web, dispositivi mobili, desktop, giochi e IoT. + .NET SDK consente di creare, eseguire e testare applicazioni .NET. È possibile scegliere tra più linguaggi, editor e strumenti di sviluppo e sfruttare un vasto ecosistema di librerie per creare app per Web, dispositivi mobili, desktop, giochi e IoT. Altre informazioni su .NET Risorse <A HREF="https://aka.ms/dotnet-docs">Documentazione di .NET</A> @@ -76,7 +76,10 @@ Risorse Nota sull'installazione Durante il processo di installazione verrà eseguito un comando che migliorerà la velocità di ripristino del progetto e abiliterà l'accesso offline. Il completamento del comando richiederà un minuto. - Se si intende usare .NET 6.0 con Visual Studio, è richiesto Visual Studio 2022 17.0 o versione successiva. <A HREF="https://aka.ms/dotnet6-release-notes">Altre informazioni</A>. + Se si prevede di usare .NET [VERSIONMAJOR]. [VERSIONMINOR] con Visual Studio, è necessario Visual Studio 2022 [MINIMUMVSVERSION] o versione successiva. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Altre informazioni</A>. - Facendo clic su Installa, si accettano le condizioni seguenti. - + Facendo clic su Installa, si accettano le condizioni seguenti: + Percorso di installazione per le installazioni x64 SDK: "[DOTNETHOME_X64]" non può essere uguale a quello delle installazioni di x86 SDK: "[DOTNETHOME_X86]" + Percorso di installazione per le installazioni di ARM64 SDK: "[DOTNETHOME_ARM64]" non può essere uguale a quello delle installazioni di x86 SDK: "[DOTNETHOME_X86]" + Percorso di installazione per le installazioni di ARM64 SDK: "[DOTNETHOME_ARM64]" non può essere uguale a quello delle installazioni x64 SDK: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1041/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1041/bundle.wxl index 036f91f7d..84c2023b9 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1041/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1041/bundle.wxl @@ -1,18 +1,18 @@ - + [WixBundleName] インストーラー [BUNDLEMONIKER] 取り消しますか? 以前のバージョン セットアップのヘルプ - /install | /repair | /uninstall | /layout [\[]"directory"[\]] - ディレクトリ内のバンドル -の完全なローカル コピーをインストール、修復、アンインストール、または作成します。既定は '/install' です。 + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - バンドルの完全なローカル コピーに対する + ディレクトリへのインストール、修復、ディレクトリからのアンインストール、または作成を行います。既定は '/install' です。 -/passive | /quiet - 最低限の UI を表示して確認メッセージ -を表示しないか、UI も確認メッセージも表示しません。既定では、UI およびすべての確認メッセージが表示されます。 +/passive | /quiet - 最小限の UI だけを表示しプロンプトは表示しない、または UI もプロンプトも + 表示しません。既定では UI とすべてのプロンプトが表示されます。 -/norestart - 再起動の試みをすべて抑制します。既定では、再起動前に UI に確認メッセージが表示されます。 -/log [\[]"log.txt"[\]] - 特定のファイルにログを記録します。既定では、ログ ファイルは %TEMP% に作成されます。 +/norestart - 再起動を抑制します。既定では再起動前に UI が確認ダイアログを表示します。 +/log [\[]"log.txt"[\]] - 特定のファイルにログを記録します。既定ではログ ファイルは %TEMP% に作成されます。 閉じる(&C) ライセンス条項および使用条件に同意する(&A) オプション(&O) @@ -49,7 +49,7 @@ キャンセル(&C) インストールが成功しました。 -'[DOTNETHOME]' に以下がインストールされました +以下の製品がインストールされました • .NET SDK [DOTNETSDKVERSION] • .NET Runtime [DOTNETRUNTIMEVERSION] • ASP.NET Core Runtime [ASPNETCOREVERSION] @@ -61,11 +61,11 @@ リソース • .NET ドキュメント https://aka.ms/dotnet-docs • SDK ドキュメント https://aka.ms/dotnet-sdk-docs - • リリース ノート https://aka.ms/dotnet6-release-notes + • リリース ノート https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • チュートリアル https://aka.ms/dotnet-tutorials .NET SDK - .Net SDK は、.NET アプリケーションをビルド、実行、テストするために使用されます。複数の言語、エディター、開発者ツールから選択し、ライブラリの大規模なエコシステムを利用して、Web、モバイル、デスクトップ、ゲーム、IoT 用のアプリを作成できます。ぜひご利用ください。 + .Net SDK は、.NET アプリケーションをビルド、実行、テストするために使用されます。複数の言語、エディター、開発者ツールから選択し、ライブラリの大規模なエコシステムを利用して、Web、モバイル、デスクトップ、ゲーム、IoT 用のアプリを作成できます。お楽しみいただければ幸いです。 .Net の詳細情報 リソース <A HREF="https://aka.ms/dotnet-docs">.NET ドキュメント</A> @@ -76,7 +76,10 @@ インストール メモ コマンドはインストール処理中に実行されるので、プロジェクトの復元速度が向上し、オフラインでアクセスできます。完了するまでに最大 1 分かかります。 - .NET 6.0 を Visual Studio で使用する場合は、Visual Studio 2022 17.0 以降が必要です。<A HREF="https://aka.ms/dotnet6-release-notes">詳細情報</A>。 + .NET [VERSIONMAJOR] を使用する予定の場合。Visual Studio、Visual Studio 2022 [MINIMUMVSVERSION] 以降の [VERSIONMINOR] が必要です。<A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">詳細情報</A>. - [インストール] をクリックすると、次の条項に同意したものと見なされます。 - + インストール をクリックすると、次の条項に同意したものと見なされます: + x64 SDK インストールのインストール パス: "[DOTNETHOME_X64]" を x86 SDK インストールの場合と同じにすることはできません: "[DOTNETHOME_X86]" + ARM64 SDK インストールのインストール パス: "[DOTNETHOME_ARM64]" を x86 SDK インストールの場合と同じにすることはできません: "[DOTNETHOME_X86]" + ARM64 SDK インストールのインストール パス: "[DOTNETHOME_ARM64]" を x64 SDK インストールの場合と同じにすることはできません: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1042/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1042/bundle.wxl index d0c8351c0..d02f2754b 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1042/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1042/bundle.wxl @@ -1,17 +1,17 @@ - + [WixBundleName] 설치 관리자 [BUNDLEMONIKER] 취소하시겠습니까? 이전 버전 설치 도움말 - /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 디렉터리에 번들의 전체 로컬 복사본을 설치, 복구, 제거 또는 - 작성합니다. '/install'이 기본값입니다. + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 디렉터리에 번들의 전체 로컬 복사본을 설치, 복구, 제거 + 또는 작성합니다. '/install'이 기본값입니다. /passive | /quiet - 프롬프트 없이 최소 UI를 표시하거나 UI 및 프롬프트를 표시하지 않습니다. 기본적으로 UI와 모든 프롬프트가 표시됩니다. -/norestart - 다시 시작하지 않게 합니다. 기본적으로 UI에서는 다시 시작하기 전에 묻는 메시지를 표시합니다. +/norestart - 다시 시작하지 않게 합니다. 기본적으로 UI에서는 다시 시작하기 전에 묻는 메시지를 표시합니다. /log [\[]"log.txt"[\]] - 특정 파일에 기록합니다. 기본적으로 로그 파일은 %TEMP%에 만들어집니다. 닫기(&C) 동의함(&A) @@ -19,8 +19,8 @@ 설치(&I) 닫기(&C) 설치 진행률 - 진행 중: - 초기화 중... + 처리 중: + 초기화하는 중... 취소(&C) 설치 수정 복구(&R) @@ -37,19 +37,19 @@ 설치 실패 제거 실패 복구 실패 - 하나 이상의 문제가 발생하여 설치하지 못했습니다. 문제를 해결한 다음 설치를 다시 시도하십시오. 자세한 내용은 <a href="#">로그 파일</a>을 참조하십시오. - 소프트웨어 롤백을 완료하려면 먼저 컴퓨터를 다시 시작해야 합니다. + 하나 이상의 문제가 발생하여 설치하지 못했습니다. 문제를 해결한 다음 설치를 다시 시도하세요. 자세한 내용은 <a href="#">로그 파일</a>을 참조하세요 + 소프트웨어 롤백을 완료하려면 컴퓨터를 다시 시작해야 합니다. 다시 시작(&R) 닫기(&C) 사용 중인 파일 다음의 응용 프로그램이 업데이트해야 할 파일을 사용 중입니다. 응용 프로그램을 닫고 다시 시작합니다(&A). - 애플리케이션을 닫지 않습니다(&D). 다시 부팅해야 합니다. + 응용 프로그램을 닫지 않습니다(&D). 다시 부팅해야 합니다. 확인(&O) 취소(&C) 설치가 완료되었습니다. -다음이 '[DOTNETHOME]'에 설치되었습니다. +다음 제품이 설치되었습니다. • .NET SDK [DOTNETSDKVERSION] • .NET 런타임 [DOTNETRUNTIMEVERSION] • ASP.NET Core 런타임 [ASPNETCOREVERSION] @@ -61,7 +61,7 @@ 리소스 • .NET 설명서 https://aka.ms/dotnet-docs • SDK 설명서 https://aka.ms/dotnet-sdk-docs - • 릴리스 정보 https://aka.ms/dotnet6-release-notes + • 릴리스 정보 https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • 자습서 https://aka.ms/dotnet-tutorials .NET SDK @@ -76,7 +76,10 @@ 설치 정보 프로젝트 복원 속도를 향상하고 오프라인 액세스를 사용할 수 있도록 하는 설치 프로세스 중 명령이 실행됩니다. 완료하는 데 최대 1분이 걸립니다. - Visual Studio와 함께 .NET 6.0을 사용하려면 Visual Studio 2022 17.0 이상이 필요합니다. <A HREF="https://aka.ms/dotnet6-release-notes">자세한 정보</A>. + Visual Studio에서 .NET [VERSIONMAJOR].[VERSIONMINOR]를 사용하려는 경우 Visual Studio 2022 [MINIMUMVSVERSION] 이상이 필요합니다. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Learn more</A>. - [설치]를 클릭하면 다음 사용 약관에 동의하는 것입니다. - + 설치를 클릭하면 다음 사용 약관에 동의하는 것입니다. + x64 SDK 설치의 설치 경로: " [DOTNETHOME_x64]" x86 SDK 설치의 경우와 같을 수 없습니다. " [DOTNETHOME_X86]" + ARM64 SDK 설치의 설치 경로: " [DOTNETHOME_ARM64]" x86 SDK 설치의 경우와 같을 수 없습니다. " [DOTNETHOME_X86]" + ARM64 SDK 설치의 설치 경로: " [DOTNETHOME_ARM64]" x64 SDK 설치의 경우와 같을 수 없습니다. " [DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1045/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1045/bundle.wxl index 95954a100..9c2b43ab9 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1045/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1045/bundle.wxl @@ -1,44 +1,44 @@ - + Instalator pakietu [WixBundleName] [BUNDLEMONIKER] Czy na pewno chcesz anulować? Poprzednia wersja - Pomoc dotycząca instalacji - /install | /repair | /uninstall | /layout [\[]"katalog"[\]] — Instaluje, naprawia, odinstalowuje - lub tworzy pełną lokalną kopię pakietu w katalogu. Domyślnie jest używany przełącznik install. + Instalator — Pomoc + /install | /repair | /uninstall | /layout [\[]"directory"[\]] — instaluje, naprawia, odinstalowuje + lub tworzy pełną lokalną kopię pakietu w katalogu. Domyślnie jest używany element „/install”. -/passive | /quiet — Wyświetla ograniczony interfejs użytkownika bez monitów albo nie wyświetla ani interfejsu użytkownika, - ani monitów. Domyślnie jest wyświetlany interfejs użytkownika oraz wszystkie monity. +/passive | /quiet — wyświetla ograniczony interfejs użytkownika bez monitów albo nie wyświetla interfejsu użytkownika i + żadnych monitów. Domyślnie jest wyświetlany interfejs użytkownika oraz wszystkie monity. -/norestart — Pomija próby ponownego uruchomienia. Domyślnie interfejs użytkownika wyświetla monit przed ponownym uruchomieniem. -/log [\[]"log.txt"[\]] — Tworzy dziennik w określonym pliku. Domyślnie plik dziennika jest tworzony w katalogu %TEMP%. +/norestart — pomija próby ponownego uruchomienia. Domyślnie interfejs użytkownika wyświetla monit przed ponownym uruchomieniem. +/log [\[]"log.txt"[\]] — tworzy dzienniki w określonym pliku. Domyślnie plik dziennika jest tworzony w katalogu %TEMP%. &Zamknij - &Zgadzam się z postanowieniami licencyjnymi + Zg&adzam się na warunki licencji &Opcje - &Zainstaluj + Za&instaluj &Zamknij Postęp instalacji Przetwarzanie: Trwa inicjowanie... &Anuluj - Modyfikuj instalację - &Napraw - &Odinstaluj + Zmodyfikuj instalatora + Nap&raw + O&dinstaluj &Zamknij Pomyślnie ukończono naprawę - Pomyślnie ukończono dezinstalację - Instalacja powiodła się. + Pomyślnie ukończono operację odinstalowania + Instalacja przebiegła pomyślnie &Uruchom Aby zakończyć instalację oprogramowania, należy ponownie uruchomić komputer. &Uruchom ponownie &Zamknij Instalacja nie powiodła się - Instalacja nie powiodła się - Dezinstalacja nie powiodła się + Konfiguracja nie powiodła się + Operacja odinstalowania nie powiodła się Naprawa nie powiodła się - Co najmniej jeden problem spowodował niepowodzenie instalacji. Rozwiąż problemy, a następnie ponów próbę instalacji. Aby uzyskać więcej informacji, zobacz <a href="#">plik dziennika</a>. - Aby zakończyć wycofywanie oprogramowania, musisz uruchomić ponownie komputer. + Jeden lub więcej problemów spowodowało niepowodzenie instalacji. Napraw błędy, a następnie ponownie uruchom instalację. Aby uzyskać więcej informacji zobacz <a href="#">plik dziennika</a>. + Należy ponownie uruchomić komputer, aby dokończyć wycofywanie oprogramowania. &Uruchom ponownie &Zamknij Pliki w użyciu @@ -49,23 +49,23 @@ &Anuluj Instalacja zakończyła się pomyślnie. -Następujące elementy zostały zainstalowane w: „[DOTNETHOME]” - • Zestaw .NET SDK [DOTNETSDKVERSION] +Następujące produkty zostały zainstalowane: + • Zestaw SDK .NET [DOTNETSDKVERSION] • Środowisko uruchomieniowe platformy .NET [DOTNETRUNTIMEVERSION] • Środowisko uruchomieniowe platformy ASP.NET Core [ASPNETCOREVERSION] • Środowisko uruchomieniowe platformy .NET dla komputerów z systemem Windows [WINFORMSANDWPFVERSION] -Ten produkt gromadzi dane dotyczące użycia +Ten produkt zbiera dane użycia • Więcej informacji i rezygnacja: https://aka.ms/dotnet-cli-telemetry Zasoby - • Dokumentacja platformy .NET: https://aka.ms/dotnet-docs - • Dokumentacja zestawu SDK: https://aka.ms/dotnet-sdk-docs - • Informacje o wersji: https://aka.ms/dotnet6-release-notes - • Samouczki: https://aka.ms/dotnet-tutorials + • Dokumentacja dotycząca platformy .NET https://aka.ms/dotnet-docs + • Dokumentacja dotycząca zestawu SDK https://aka.ms/dotnet-sdk-docs + • Informacje o wersji https://aka.ms/dotnet[VERSIONMAJOR]-release-notes + • Samouczki https://aka.ms/dotnet-tutorials .NET SDK - Zestaw SDK platformy .NET służy do tworzenia, uruchamiania i testowania aplikacji platformy .NET. Możesz wybierać spośród wielu języków, edytorów i narzędzi deweloperskich oraz korzystać z dużego ekosystemu bibliotek do tworzenia aplikacji dla sieci Web, urządzeń przenośnych, komputerów, środowisk gier i technologii IoT. Mamy nadzieję, że Ci się podoba! + Zestaw SDK platformy .NET służy do tworzenia, uruchamiania i testowania aplikacji platformy .NET. Możesz wybierać spośród wielu języków, edytorów i narzędzi deweloperskich oraz korzystać z dużego ekosystemu bibliotek do tworzenia aplikacji internetowych, mobilnych, na komputer, gry i Internet rzeczy. Mamy nadzieję, że Ci się to spodoba!
Dowiedz się więcej o platformie .NET Zasoby <A HREF="https://aka.ms/dotnet-docs">Dokumentacja platformy .NET</A> @@ -76,7 +76,10 @@ Zasoby Uwaga dotycząca instalacji W trakcie procesu instalacji zostanie uruchomione polecenie, które zwiększy szybkość przywracania projektu i umożliwi dostęp do trybu offline. Zajmie to maksymalnie minutę. - Jeśli planujesz używać platformy .NET 6.0 z programem Visual Studio, wymagany jest program Visual Studio 2022 17.0 lub nowszy. <A HREF="https://aka.ms/dotnet6-release-notes">Dowiedz się więcej</A>. + Jeśli planujesz używać platformy .NET [VERSIONMAJOR].[VERSIONMINOR] z programem Visual Studio, wymagany jest program Visual Studio 2022 [MINIMUMVSVERSION] lub nowszy. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Learn more</A>. - Klikając pozycję Zainstaluj, wyrażasz zgodę na następujące warunki. - + Klikając pozycję Zainstaluj, wyrażasz zgodę na następujące warunki: + Ścieżka instalacji w przypadku instalacji zestawu SDK x64: „[DOTNETHOME_X64]” nie może być taka sama jak w przypadku instalacji zestawu SDK x86: „[DOTNETHOME_X86]” + Ścieżka instalacji w przypadku instalacji zestawu SDK ARM64: „[DOTNETHOME_ARM64]” nie może być taka sama jak w przypadku instalacji zestawu SDK X86: „[DOTNETHOME_X86]” + Ścieżka instalacji w przypadku instalacji zestawu SDK ARM64: „[DOTNETHOME_ARM64]” nie może być taka sama jak w przypadku instalacji zestawu SDK x64: „[DOTNETHOME_X64]” + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1046/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1046/bundle.wxl index f8c3da0a5..16431f6a1 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1046/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1046/bundle.wxl @@ -1,18 +1,18 @@ - + Instalador do [WixBundleName] [BUNDLEMONIKER] Tem certeza de que deseja cancelar? Versão anterior - Ajuda de Instalação - /install | /repair | /uninstall | /layout [\[]"directory"[\]] – instala, repara, desinstala - ou cria uma cópia local completa do pacote no diretório. '/install' é o padrão + Ajuda da Instalação + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - instala, repara, desinstala + ou cria uma cópia local completa do pacote no diretório. '/install' é o padrão. -/passive | /quiet – exibe a interface do usuário mínima sem nenhum prompt ou não exibe nenhuma interface do usuário e +/passive | /quiet - exibe a interface do usuário mínima sem prompts ou não exibe a interface do usuário e nenhum prompt. Por padrão, a interface do usuário e todos os prompts são exibidos. -/norestart – suprime qualquer tentativa de reiniciar. Por padrão, a interface do usuário perguntará antes de reiniciar. -/log [\[]"log.txt"[\]] – registra em um arquivo específico. Por padrão, um arquivo de log é criado em %TEMP%. +/norestart - suprimi qualquer tentativa de reiniciar. Por padrão, a interface do usuário será solicitada antes de reiniciar. +/log [\[]"log.txt"[\]] - logs para um arquivo específico. Por padrão, um arquivo de log é criado em %TEMP%. &Fechar Eu &concordo com os termos e condições da licença &Opções @@ -36,36 +36,36 @@ Falha na Instalação Falha na Instalação Falha na Desinstalação - Falha na Reparação - Um ou mais problemas causaram falha na instalação. Corrija-os e tente instalar novamente. Para obter mais informações, consulte o <a href="#">arquivo de log</a>. - Você deve reiniciar o computador para concluir a reversão do software. + Falha ao Reparar + Um ou mais problemas fizeram com que a configuração falhasse. Corrija os problemas e tente novamente a configuração. Para obter mais informações, consulte o <a href="#">arquivo de log</a>. + Reinicie o computador para concluir a reversão do software. &Reiniciar &Fechar Arquivos em Uso Os aplicativos a seguir estão usando arquivos que precisam ser atualizados: Feche os &aplicativos e tente reiniciá-los. - &Não feche os aplicativos. Será necessária uma reinicialização. + &Não feche os aplicativos. Uma reinicialização será necessária. &OK &Cancelar - A instalação foi bem-sucedida. + A instalação foi bem sucedida. -O seguinte foi instalado em: '[DOTNETHOME]' - • SDK do .NET [DOTNETSDKVERSION] - • Runtime do .NET [DOTNETRUNTIMEVERSION] - • Runtime do ASP.NET Core [ASPNETCOREVERSION] - • Runtime da Área de Trabalho do Windows do .NET [WINFORMSANDWPFVERSION] +Os seguintes produtos foram instalados: + • .NET SDK [DOTNETSDKVERSION] + • .NET Runtime [DOTNETRUNTIMEVERSION] + • ASP.NET Core Runtime [ASPNETCOREVERSION] + • .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] -Este produto coleta dados de uso - • Para obter mais informações ou recusá-lo, acesse https://aka.ms/dotnet-cli-telemetry +Esse produto coleta dados de uso + • Mais informações e recusa https://aka.ms/dotnet-cli-telemetry Recursos - • Documentação do .NET: https://aka.ms/dotnet-docs - • Documentação do SDK: https://aka.ms/dotnet-sdk-docs - • Notas sobre a Versão: https://aka.ms/dotnet6-release-notes - • Tutoriais: https://aka.ms/dotnet-tutorials + • Documentação do .NET https://aka.ms/dotnet-docs + • Documentação do SDK https://aka.ms/dotnet-sdk-docs + • Notas de Versão https://aka.ms/dotnet[VERSIONMAJOR]-release-notes + • Tutoriais https://aka.ms/dotnet-tutorials SDK do .NET - O SDK do .NET é usado para compilar, executar e testar aplicativos .NET. Você pode escolher entre vários idiomas, editores e ferramentas de desenvolvedor e aproveitar um grande ecossistema de bibliotecas para criar aplicativos para Web, móveis, área de trabalho, jogos e IoT. Esperamos que você goste! + O SDK do .NET é usado para criar, executar e testar aplicativos .NET. Você pode escolher entre vários idiomas, editores e ferramentas de desenvolvedor e aproveitar um grande ecossistema de bibliotecas para criar aplicativos para Web, dispositivos móveis, desktop, jogos e IoT. Esperamos que você goste! Saiba mais sobre o .NET Recursos <A HREF="https://aka.ms/dotnet-docs">Documentação do .NET</A> @@ -76,7 +76,10 @@ Recursos Nota de instalação Um comando será executado durante o processo de instalação que melhorará a velocidade de restauração do projeto e habilitará o acesso offline. Isso levará até um minuto para ser concluído. - Se você planeja usar o .NET 6.0 com o Visual Studio, é necessário usar o Visual Studio 2022 17.0 ou mais recente. <A HREF="https://aka.ms/dotnet6-release-notes">Saiba mais</A>. + Se você planeja usar .NET [VERSIONMAJOR].[VERSIONMINOR] com o Visual Studio, é necessário o Visual Studio 2022 [MINIMUMVSVERSION] ou mais recente. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Saiba mais</A>. - Ao clicar em instalar, você concorda com os termos a seguir. - + Ao clicar em Instalar, você concorda com os termos a seguir: + O caminho da instalação para instalações do SDK x64: "[DOTNETHOME_X64]" não pode ser o mesmo que para instalações do SDK x86: "[DOTNETHOME_X86]" + O caminho da instalação para instalações do SDK ARM64: "[DOTNETHOME_ARM64]" não pode ser o mesmo que para instalações do SDK x86: "[DOTNETHOME_X86]" + O caminho da instalação para instalações do SDK ARM64: "[DOTNETHOME_ARM64]" não pode ser o mesmo que para instalações do SDK x64: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1049/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1049/bundle.wxl index afd31da3f..eaa2c86c9 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1049/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1049/bundle.wxl @@ -1,59 +1,59 @@ - + Установщик [WixBundleName] [BUNDLEMONIKER] - Вы действительно хотите отменить? + Отменить? Предыдущая версия Справка по установке - /install | /repair | /uninstall | /layout [\[]"каталог"[\]] — установка, восстановление, удаление или - создание полной локальной копии пакета в каталоге. По умолчанию — "/install". + /install | /repair | /uninstall | /layout [\[]"directory"[\]] — установка, восстановление, удаление + или создание полной локальной копии пакета в каталоге. По умолчанию — "/install". -/passive | /quiet — отображение минимального пользовательского интерфейса без запросов или работа без пользовательского интерфейса и - без запросов. По умолчанию отображаются пользовательский интерфейс и все запросы. +/passive | /quiet — отображение минимального пользовательского интерфейса без запросов или работы без пользовательского интерфейса и + без запросов. По умолчанию отображаются пользовательский интерфейс и все запросы. -/norestart — подавление всех попыток перезагрузки. По умолчанию в пользовательском интерфейсе перед перезагрузкой отображается запрос. -/log [\[]"log.txt"[\]] — запись журнала в указанный файл. По умолчанию файл журнала создается в папке %TEMP%. - З&акрыть +/norestart — отключение всех попыток перезагрузки. По умолчанию в пользовательском интерфейсе перед перезагрузкой отображается запрос. +/log [\[]"log.txt"[\]] — запись журнала в указанный файл. По умолчанию файл журнала создается в папке %TEMP%. + &Закрыть Я &принимаю условия лицензии &Параметры &Установить - З&акрыть + &Закрыть Ход установки Обработка: - Идет инициализация... - От&мена - Изменить установку - &Восстановить - Уда&лить - З&акрыть - Восстановление успешно завершено + Инициализация... + Отм&ена + Изменение установки + &Исправить + &Удалить + &Закрыть + Исправление успешно завершено Удаление успешно завершено Установка успешно завершена &Запустить Для завершения установки программного обеспечения нужно перезагрузить компьютер. - Переза&грузить - З&акрыть + &Перезапустить + &Закрыть Сбой установки Сбой установки Сбой удаления Сбой восстановления Одна или несколько проблем вызывали сбой программы установки. Исправьте эти проблемы и попробуйте повторить установку. Дополнительные сведения см. в <a href="#">файле журнала</a>. - Необходимо перезагрузить компьютер перед тем, как выполнять откат программного обеспечения. - Переза&грузить - З&акрыть + Необходимо перезагрузить компьютер, чтобы завершить откат программного обеспечения. + &Перезапустить + &Закрыть Используемые файлы Следующие приложения используют файлы, которые следует обновить: - Закрыть &приложения и попытаться перезапустить их. - &Не закрывать приложения. Потребуется перезагрузка. - О&К - От&мена + Закройте &приложения и попробуйте перезапустить их. + &Не закрывайте приложения. Потребуется перезагрузка компьютера. + &ОК + &Отменить Установка выполнена. -В "[DOTNETHOME]" установлены следующие компоненты: - • Пакет SDK для .NET [DOTNETSDKVERSION] - • Среда выполнения .NET [DOTNETRUNTIMEVERSION] - • Среда выполнения ASP.NET Core [ASPNETCOREVERSION] - • Среда выполнения .NET для Windows Desktop [WINFORMSANDWPFVERSION] +Установлены следующие компоненты: + • Пакет SDK для .NET [DOTNETSDKVERSION] + • Среда выполнения .NET [DOTNETRUNTIMEVERSION] + • Среда выполнения ASP.NET Core [ASPNETCOREVERSION] + • Среда выполнения .NET для Windows Desktop [WINFORMSANDWPFVERSION] Этот продукт собирает данные об использовании. • Чтобы получить дополнительные сведения или отказаться от использования продукта, перейдите на страницу https://aka.ms/dotnet-cli-telemetry @@ -61,9 +61,9 @@ Ресурсы • Документация по .NET: https://aka.ms/dotnet-docs • Документация по SDK: https://aka.ms/dotnet-sdk-docs - • Заметки о выпуске: https://aka.ms/dotnet6-release-notes + • Заметки о выпуске: https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Учебники: https://aka.ms/dotnet-tutorials - Пакет SDK для .NET + Пакет SDK для .NET Пакет SDK для .NET используется для сборки, запуска и тестирования приложений .NET. Вы можете выбрать один из нескольких языков, использовать различные редакторы и инструменты для разработчиков, а также воспользоваться преимуществами большой экосистемы библиотек для создания веб-приложений, мобильных и классических приложений, игр и приложений Интернета вещей. Надеемся, вам понравится! Дополнительные сведения о .NET @@ -76,7 +76,10 @@ Примечание по установке В процессе установки будет выполнена команда, которая увеличит скорость восстановления проекта и обеспечит автономный доступ. Выполнение займет до минуты. - Если вы планируете использовать .NET 6.0 с Visual Studio, требуется Visual Studio 2022 версии 17.0 или более поздней. <A HREF="https://aka.ms/dotnet6-release-notes">Дополнительные сведения</A>. + Если вы планируете использовать .NET [VERSIONMAJOR].[VERSIONMINOR] с Visual Studio, требуется Visual Studio 2022 версии [MINIMUMVSVERSION] или более поздней. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Дополнительные сведения</A>. Нажимая кнопку "Установить", вы принимаете следующие условия. - + Совпадение пути установки недопустимо для установок пакетов SDK x64: "[DOTNETHOME_X64]" и SDK x86: "[DOTNETHOME_X86]". + Совпадение пути установки недопустимо для установок пакетов SDK ARM64: "[DOTNETHOME_ARM64]" и SDK x86: "[DOTNETHOME_X86]". + Совпадение пути установки недопустимо для установок пакетов SDK ARM64: "[DOTNETHOME_ARM64]" и SDK x64: "[DOTNETHOME_X64]". + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/1055/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/1055/bundle.wxl index 359ac186f..d38b7dbb3 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/1055/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/1055/bundle.wxl @@ -1,28 +1,28 @@ - + [WixBundleName] Yükleyicisi [BUNDLEMONIKER] İptal etmek istediğinizden emin misiniz? Önceki sürüm Kurulum Yardımı - /install | /repair | /uninstall | /layout [\[]"dizin"[\]] - dizinde bir paketi yükler, onarır, kaldırır ya da - paketin tam bir yerel kopyasını oluşturur. Varsayılan '/install' değeridir. + /install | /repair | /uninstall | /layout [\[]"dizin"[\]] - yükler, onarır, kaldırır + ya da dizindeki paketin tam bir yerel kopyasını oluşturur. Varsayılan '/install' değeridir. -/passive | /quiet - istem olmadan en az düzeyde UI gösterir ya da hiç UI ve - istem göstermez. Varsayılan olarak UI ve tüm istemler görüntülenir. +/passive | /quiet - en az düzeyde istemsiz UI gösterir ya da hiç UI göstermez ve + istem yoktur. Varsayılan olarak, UI ve tüm istemler görüntülenir. -/norestart - yeniden başlama denemelerini engeller. Varsayılan olarak UI yeniden başlatılmadan önce sorar. -/log [\[]"günlük.txt"[\]] - belirli bir günlük dosyası tutar. Varsayılan olarak %TEMP% içinde bir günlük dosyası oluşturulur. +/norestart - yeniden başlama denemelerini durdurur. Varsayılan olarak UI yeniden başlatılmadan önce sorar. +/log [\[]"log.txt"[\]] - belirli bir günlük dosyası tutar. Varsayılan olarak, %TEMP% içinde bir günlük dosyası oluşturulur. &Kapat - &Lisans hüküm ve koşullarını kabul ediyorum + Lisans hüküm ve koşullarını &kabul ediyorum &Seçenekler Yü&kle &Kapat Kurulum İlerleme Durumu İşleniyor: Başlatılıyor... - &İptal - Kurulumu Değiştir + İ&ptal + Kurulumu değiştir &Onar &Kaldır &Kapat @@ -35,9 +35,9 @@ &Kapat Kurulum Başarısız Kurulum Başarısız - Yükleme Başarısız + Kaldırma Başarısız Onarım Başarısız - En az bir sorun nedeniyle kurulum başarısız oldu. Lütfen bu sorunları düzeltin ve kurulumu yeniden deneyin. Daha fazla bilgi için <a href="#">günlük dosyasına</a> bakın. + Bir ya da daha fazla sorun nedeniyle kurulum başarısız oldu. Lütfen bu sorunları düzeltin ve kurulumu yeniden deneyin. Daha fazla bilgi için <a href="#">günlük dosyasına</a> bakın. Yazılımın geri alınmasını tamamlamak için bilgisayarınızı yeniden başlatmanız gerekiyor. &Yeniden Başlat &Kapat @@ -46,10 +46,10 @@ &Uygulamaları kapatın ve yeniden başlatmayı deneyin. &Uygulamaları kapatmayın. Sistemi yeniden başlatmanız gerekir. &Tamam - &İptal + İ&ptal Yükleme başarılı oldu. -Aşağıdakiler şu konumda yüklü: '[DOTNETHOME]' +Aşağıdakiler ürünler yüklendi: • .NET SDK [DOTNETSDKVERSION] • .NET Çalışma Zamanı [DOTNETRUNTIMEVERSION] • ASP.NET Core Çalışma Zamanı [ASPNETCOREVERSION] @@ -61,9 +61,9 @@ Bu ürün, kullanım verilerini toplar Kaynaklar • .NET Belgeleri https://aka.ms/dotnet-docs • SDK Belgeleri https://aka.ms/dotnet-sdk-docs - • Sürüm Notları https://aka.ms/dotnet6-release-notes + • Sürüm Notları https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Öğreticiler https://aka.ms/dotnet-tutorials - .NET SDK'sı + .NET SDK .NET SDK, .NET uygulamalarını derlemek, çalıştırmak ve test etmek için kullanılır. Birden çok dil, düzenleyici ve geliştirici aracı arasından seçim yapabilirsiniz ve web, mobil, masaüstü, oyun ve IoT uygulamaları oluşturmak için büyük bir kitaplık ekosisteminden yararlanabilirsiniz. Beğeneceğinizi umuyoruz! .NET hakkında daha fazla bilgi edinin @@ -76,7 +76,10 @@ Kaynaklar Yükleme notu Yükleme işlemi sırasında, proje geri yükleme hızını artıran ve çevrimdışı erişimi etkinleştiren bir komut çalıştırılır. Tamamlanması bir dakikanızı alır. - Visual Studio ile .NET 6.0 kullanmayı planlıyorsanız Visual Studio 2022 17.0 veya üzeri bir sürüm gerekir. <A HREF="https://aka.ms/dotnet6-release-notes">Daha Fazla Bilgi</A>. + Visual Studio ile .NET [VERSIONMAJOR].[VERSIONMINOR] kullanmayı planlıyorsanız Visual Studio 2022 [MINIMUMVSVERSION] veya üzeri bir sürüm gerekir. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Daha fazla bilgi edinin</A>. - Yükle'ye tıklayarak aşağıdaki koşulları kabul etmiş olursunuz. - + Yükle'ye tıklayarak aşağıdaki koşulları kabul etmiş olursunuz: + x64 SDK yüklemelerinin yükleme yolu ("[DOTNETHOME_X64]"), x86 SDK yüklemelerinin yükleme yolu ("[DOTNETHOME_X86]") ile aynı olamaz + ARM64 SDK yüklemeleri için yükleme yolu ("[DOTNETHOME_ARM64]"), x86 SDK yüklemelerinin yükleme yolu ("[DOTNETHOME_X86]") ile aynı olamaz + ARM64 SDK yüklemelerinin yükleme yolu ("[DOTNETHOME_ARM64]"), x64 SDK yüklemelerinin yükleme yolu ("[DOTNETHOME_X64]") ile aynı olamaz + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/2052/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/2052/bundle.wxl index bf2209ebd..f1251f271 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/2052/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/2052/bundle.wxl @@ -1,17 +1,17 @@ - + [WixBundleName] 安装程序 [BUNDLEMONIKER] 是否确实要取消? 上一版本 安装程序帮助 - /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 安装、修复、卸载 - 目录中的安装包或创建其完整本地副本。Install 为默认选择。 + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - 在目录中安装、修复、卸载 + 或创建安装包的完整本地副本。'/Install' 为默认选择。 /passive | /quiet - 显示最少的 UI 且无提示,或不显示 UI 且 无提示。默认显示 UI 及全部提示。 -/norestart - 禁止任何重新启动。默认在重启前显示提示 UI。 +/norestart - 禁止任何重新启动。默认在重新启动前显示提示 UI。 /log [\[]"log.txt"[\]] - 向特定文件写入日志。默认在 %TEMP% 中创建日志文件。 关闭(&C) 我同意许可条款和条件(&A) @@ -20,7 +20,7 @@ 关闭(&C) 安装进度 正在处理: - 正在初始化… + 正在初始化... 取消(&C) 修改安装程序 修复(&R) @@ -49,7 +49,7 @@ 取消(&C) 已成功安装。 -下列项安装于: "[DOTNETHOME]" +下列产品已安装: • .NET SDK [DOTNETSDKVERSION] • .NET Runtime [DOTNETRUNTIMEVERSION] • ASP.NET Core Runtime [ASPNETCOREVERSION] @@ -61,7 +61,7 @@ 资源 • .NET 文档: https://aka.ms/dotnet-docs • SDK 文档: https://aka.ms/dotnet-sdk-docs - • 发行说明: https://aka.ms/dotnet6-release-notes + • 发行说明: https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • 教程: https://aka.ms/dotnet-tutorials .NET SDK @@ -76,7 +76,10 @@ 安装说明 将在要提升项目还原速度并实现脱机访问的安装进程期间运行命令。此操作最多 1 分钟即可完成。 - 如果打算结合使用 .NET 6.0 和 Visual Studio,需要 Visual Studio 2022 17.0 或更高版本。<A HREF="https://aka.ms/dotnet6-release-notes">了解详细信息</A>。 + 如果你计划使用 .NET [VERSIONMAJOR].[VERSIONMINOR] 与 Visual Studio、Visual Studio 2022 [MINIMUMVSVERSION] 或更高版本是必需的。<A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">了解详细信息</A>。 - 单击“安装”即表示你同意以下条款。 - + 单击“安装”即表示你同意以下条款: + x64 SDK 安装的安装路径: "[DOTNETHOME_X64]" 不能与 x86 SDK 安装的路径相同: "[DOTNETHOME_X86]" + ARM64 SDK 安装的安装路径: "[DOTNETHOME_ARM64]" 不能与 x86 SDK 安装的路径相同: "[DOTNETHOME_X86]" + ARM64 SDK 安装的安装路径: "[DOTNETHOME_ARM64]" 不能与 x64 SDK 安装的路径相同: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/LCID/3082/bundle.wxl b/src/redist/targets/packaging/windows/clisdk/LCID/3082/bundle.wxl index b65e2646c..d3fe30d21 100644 --- a/src/redist/targets/packaging/windows/clisdk/LCID/3082/bundle.wxl +++ b/src/redist/targets/packaging/windows/clisdk/LCID/3082/bundle.wxl @@ -1,18 +1,19 @@ - + Instalador de [WixBundleName] [BUNDLEMONIKER] - ¿Está seguro de que desea cancelar? + ¿Está seguro de que desea cancelar la operación? Versión anterior - Ayuda de configuración - /install | /repair | /uninstall | /layout [\[]"directory"[\]]: instala, repara, desinstala - o crea una copia local completa del paquete en el directorio. "/install" es el valor predeterminado. + Ayuda del programa de instalación + /install | /repair | /uninstall | /layout [\[]"directory"[\]] - instala, repara, desinstala + + o crea una copia local completa del bundle en directorio. '/install' es la opción por defecto. -/passive | /quiet muestra la interfaz de usuario mínima sin mensajes o no muestra ninguna interfaz de usuario - ni mensajes. De forma predeterminada, se muestra la interfaz de usuario y todos los mensajes. +/passive | /quiet - muestra una interfaz de usuario mínima sin avisos o no muestra interfaz de usuario ni + ni indicaciones. La interfaz de usuario y todos los avisos son mostrados de forma predeterminada. -/norestart suprime los intentos de reinicio. De forma predeterminada, la interfaz de usuario avisará antes de un reinicio. -/log [\[]"log.txt"[\]]: registra en un archivo específico. De forma predeterminada, se crea un archivo de registro en %TEMP%. +/norestart - suprime cualquier intento de reinicio. La interfaz de usuario preguntará antes de reiniciar por defecto. +/log [\[]"log.txt"[\]] - registra en un archivo específico. Un archivo de registro es creado de forma predeterminada en %TEMP%. &Cerrar &Acepto los términos y condiciones de licencia &Opciones @@ -22,7 +23,7 @@ Procesando: Inicializando... &Cancelar - Modificar la instalación + Modificar instalación &Reparar &Desinstalar &Cerrar @@ -33,11 +34,11 @@ Debe reiniciar el equipo para finalizar la instalación del software. &Reiniciar &Cerrar - No se pudo instalar - No se pudo instalar + Error de instalación + Error de instalación No se pudo desinstalar No se pudo reparar - Error de instalación debido a uno o varios problemas. Corrija los problemas e intente de nuevo la instalación. Para obtener más información, consulte el <a href="#">archivo de registro</a>. + Uno o varios problemas han provocado un error en la instalación. Solucione los problemas e intente de nuevo la instalación. Para obtener más información, consulte e <a href="#">log file</a>. Debe reiniciar el equipo para completar la reversión del software. &Reiniciar &Cerrar @@ -47,25 +48,25 @@ &No cerrar las aplicaciones. Será necesario un reinicio. &Aceptar &Cancelar - La instalación se realizó correctamente. + La instalación se ha realizado correctamente. -Se instaló lo siguiente en: "[DOTNETHOME]" - • SDK de .NET [DOTNETSDKVERSION] +Se han instalado los siguientes productos: + • .NET SDK [DOTNETSDKVERSION] • .NET Runtime [DOTNETRUNTIMEVERSION] - • ASP.NET Core Runtime [ASPNETCOREVERSION] - • .NET Windows Desktop Runtime [WINFORMSANDWPFVERSION] + • Tiempo de ejecución de ASP.NET Core [ASPNETCOREVERSION] + • Tiempo de ejecución de .NET Windows Desktop [WINFORMSANDWPFVERSION] Este producto recopila datos de uso - • Para obtener más información y declinar la participación, visite https://aka.ms/dotnet-cli-telemetry + •Más información y exclusión voluntaria https://aka.ms/dotnet-cli-telemetry -Recursos +Recursos • Documentación de .NET https://aka.ms/dotnet-docs • Documentación del SDK https://aka.ms/dotnet-sdk-docs - • Notas de la versión https://aka.ms/dotnet6-release-notes + • Notas de la versión https://aka.ms/dotnet[VERSIONMAJOR]-release-notes • Tutoriales https://aka.ms/dotnet-tutorials SDK de .NET - El SDK de .NET se usa para compilar, ejecutar y probar las aplicaciones .NET. Puede elegir entre varios lenguajes, editores y herramientas de desarrollo y aprovechar las ventajas de un amplio ecosistema de bibliotecas para compilar aplicaciones web, móviles, de escritorio, juegos e IoT. Esperamos que lo disfrute. + El SDK de .NET se utiliza para crear, ejecutar y probar aplicaciones .NET. Puede elegir entre varios lenguajes, editores y herramientas de desarrollo, y aprovechar un amplio ecosistema de bibliotecas para crear aplicaciones para web, móvil, escritorio, juegos e IoT. Esperamos que lo disfrutes. Más información sobre .NET Recursos <A HREF="https://aka.ms/dotnet-docs">Documentación de .NET</A> @@ -76,7 +77,10 @@ Recursos Nota de instalación Se ejecutará un comando durante el proceso de instalación que mejorará la velocidad de restauración del proyecto y permitirá el acceso sin conexión. La operación tardará hasta un minuto en completarse. - Si tiene previsto usar .NET 6.0 con Visual Studio, se requiere Visual Studio 2022 17.0 o una versión más reciente. <A HREF="https://aka.ms/dotnet6-release-notes">Obtenga más información</A>. + Si tiene previsto utilizar .NET [VERSIONMAJOR].[VERSIONMINOR] con Visual Studio, necesitará Visual Studio 2022 [MINIMUMVSVERSION] o una versión más reciente. <A HREF="https://aka.ms/dotnet[VERSIONMAJOR]-release-notes">Learn more</A>. - Al hacer clic en Instalar, acepta los términos siguientes. - + Al hacer clic en Instalar, acepta los siguientes términos: + La ruta de instalación para las instalaciones del SDK x64: "[DOTNETHOME_X64]" no puede ser la misma que para las instalaciones del SDK x86: "[DOTNETHOME_X86]" + La ruta de instalación para las instalaciones del SDK ARM64: "[DOTNETHOME_ARM64]" no puede ser la misma que para las instalaciones del SDK x86: "[DOTNETHOME_X86]" + La ruta de instalación para instalaciones del SDK ARM64: "[DOTNETHOME_ARM64]" no puede ser la misma que para las instalaciones del SDK x64: "[DOTNETHOME_X64]" + \ No newline at end of file diff --git a/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.SdkPlaceholder.nuspec b/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.SdkPlaceholder.nuspec index 1ebf09719..0c6c67101 100644 --- a/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.SdkPlaceholder.nuspec +++ b/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.SdkPlaceholder.nuspec @@ -1,9 +1,9 @@  - VS.Redist.Common.NetCore.SdkPlaceholder.$ARCH$ + VS.Redist.Common.NetCore.SdkPlaceholder.$ARCH$.$MAJOR_MINOR$ 1.0.0 - VS.Redist.Common.NetCore.SdkPlaceholder.$ARCH$ + VS.Redist.Common.NetCore.SdkPlaceholder.$ARCH$.$MAJOR_MINOR$ Microsoft Microsoft https://www.microsoft.com/net/dotnet_library_license.htm diff --git a/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec b/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec index 0291b8034..2a6ce36a6 100644 --- a/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec +++ b/src/redist/targets/packaging/windows/clisdk/VS.Redist.Common.NetCore.Toolset.nuspec @@ -1,9 +1,9 @@  - VS.Redist.Common.NetCore.Toolset.$ARCH$ + VS.Redist.Common.NetCore.Toolset.$ARCH$.$MAJOR_MINOR$ 1.0.0 - VS.Redist.Common.NetCore.Toolset.$ARCH$ + VS.Redist.Common.NetCore.Toolset.$ARCH$.$MAJOR_MINOR$ Microsoft Microsoft https://www.microsoft.com/net/dotnet_library_license.htm diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.thm b/src/redist/targets/packaging/windows/clisdk/bundle.thm index ebe591ccc..fefe8e704 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.thm +++ b/src/redist/targets/packaging/windows/clisdk/bundle.thm @@ -24,7 +24,7 @@ #(loc.WelcomeHeaderMessage) - #(loc.WelcomeDescription) + #(loc.WelcomeDescription) #(loc.VisualStudioWarning) #(loc.LicenseAssent) #(loc.PrivacyStatementLink) @@ -75,7 +75,7 @@ #(loc.SuccessRepairHeader) #(loc.SuccessUninstallHeader) - #(loc.SuccessRestartText) + #(loc.SuccessRestartText) diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index 148487bde..f49737a1c 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -10,22 +10,23 @@ AboutUrl="https://aka.ms/netcorehelp/" Compressed="yes"> - + WixBundleInstalled OR (NOT DOTNETHOME_X64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE - + WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X86) OR DOTNETHOMESIMILARITYCHECKOVERRIDE - + WixBundleInstalled OR (NOT DOTNETHOME_ARM64 ~= DOTNETHOME_X64) OR (NOT NativeMachine="$(var.NativeMachine_arm64)") OR DOTNETHOMESIMILARITYCHECKOVERRIDE @@ -150,6 +151,9 @@ + + + @@ -195,9 +199,6 @@ - - - diff --git a/src/redist/targets/packaging/windows/clisdk/generatebundle.ps1 b/src/redist/targets/packaging/windows/clisdk/generatebundle.ps1 index 4cf3d5697..d86377167 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatebundle.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatebundle.ps1 @@ -13,7 +13,6 @@ param( [Parameter(Mandatory=$true)][string]$NetStandardTargetingPackMSIFile, [Parameter(Mandatory=$true)][string]$NetCoreAppHostPackMSIFile, [Parameter(Mandatory=$true)][string]$AlternateNetCoreAppHostPackMSIFile, - [Parameter(Mandatory=$true)][string]$ArmNetCoreAppHostPackMSIFile, [Parameter(Mandatory=$true)][string]$Arm64NetCoreAppHostPackMSIFile, [Parameter(Mandatory=$true)][string]$AspNetTargetingPackMSIFile, [Parameter(Mandatory=$true)][string]$WindowsDesktopTargetingPackMSIFile, @@ -24,7 +23,10 @@ param( [Parameter(Mandatory=$true)][string]$ProductMoniker, [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion, + [Parameter(Mandatory=$true)][string]$MinimumVSVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$VersionMajor, + [Parameter(Mandatory=$true)][string]$VersionMinor, [Parameter(Mandatory=$true)][string]$WindowsDesktopVersion, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$DependencyKeyName, @@ -47,8 +49,11 @@ function RunCandleForBundle -dProductMoniker="$ProductMoniker" ` -dBuildVersion="$DotnetMSIVersion" ` -dSDKBundleVersion="$SDKBundleVersion" ` + -dMinimumVSVersion="$MinimumVSVersion" ` -dSDKProductBandVersion="$SDKProductBandVersion" ` -dNugetVersion="$DotnetCLINugetVersion" ` + -dVersionMajor="$VersionMajor" ` + -dVersionMinor="$VersionMinor" ` -dCLISDKMsiSourcePath="$CLISDKMSIFile" ` -dDependencyKeyName="$DependencyKeyName" ` -dUpgradeCode="$UpgradeCode" ` @@ -59,7 +64,6 @@ function RunCandleForBundle -dNetCoreAppTargetingPackMsiSourcePath="$NetCoreAppTargetingPackMSIFile" ` -dNetCoreAppHostPackMsiSourcePath="$NetCoreAppHostPackMSIFile" ` -dAlternateNetCoreAppHostPackMsiSourcePath="$AlternateNetCoreAppHostPackMSIFile" ` - -dArmNetCoreAppHostPackMsiSourcePath="$ArmNetCoreAppHostPackMSIFile" ` -dArm64NetCoreAppHostPackMsiSourcePath="$Arm64NetCoreAppHostPackMSIFile" ` -dNetStandardTargetingPackMsiSourcePath="$NetStandardTargetingPackMSIFile" ` -dAspNetTargetingPackMsiSourcePath="$AspNetTargetingPackMSIFile" ` diff --git a/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 index 13b4e9636..126f42804 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatemsi.ps1 @@ -10,6 +10,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$VersionMajor, + [Parameter(Mandatory=$true)][string]$VersionMinor, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$DependencyKeyName, [Parameter(Mandatory=$true)][string]$Architecture, @@ -68,6 +70,8 @@ function RunCandle -dSdkFeatureBandVersion="$SdkFeatureBandVersion" ` -dSDKBundleVersion="$SDKBundleVersion" ` -dNugetVersion="$DotnetCLINugetVersion" ` + -dVersionMajor="$VersionMajor" ` + -dVersionMinor="$VersionMinor" ` -dUpgradeCode="$UpgradeCode" ` -dDependencyKeyName="$DependencyKeyName" ` -arch "$Architecture" ` diff --git a/src/redist/targets/packaging/windows/clisdk/generatesdkplaceholdermsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatesdkplaceholdermsi.ps1 index 4461b0cc9..a4f167458 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatesdkplaceholdermsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatesdkplaceholdermsi.ps1 @@ -8,6 +8,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$VersionMajor, + [Parameter(Mandatory=$true)][string]$VersionMinor, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$DependencyKeyName, [Parameter(Mandatory=$true)][string]$Architecture @@ -27,6 +29,8 @@ function RunCandle -dBuildVersion="$DotnetMSIVersion" ` -dSDKBundleVersion="$SDKBundleVersion" ` -dNugetVersion="$DotnetCLINugetVersion" ` + -dVersionMajor="$VersionMajor" ` + -dVersionMinor="$VersionMinor" ` -dUpgradeCode="$UpgradeCode" ` -dDependencyKeyName="$DependencyKeyName" ` -arch "$Architecture" ` diff --git a/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 b/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 index ecbb68ba6..2858c5913 100644 --- a/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 +++ b/src/redist/targets/packaging/windows/clisdk/generatetemplatesmsi.ps1 @@ -9,6 +9,8 @@ param( [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, [Parameter(Mandatory=$true)][string]$SDKBundleVersion, [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, + [Parameter(Mandatory=$true)][string]$VersionMajor, + [Parameter(Mandatory=$true)][string]$VersionMinor, [Parameter(Mandatory=$true)][string]$UpgradeCode, [Parameter(Mandatory=$true)][string]$DependencyKeyName, [Parameter(Mandatory=$true)][string]$Architecture @@ -59,6 +61,8 @@ function RunCandle -dBuildVersion="$DotnetMSIVersion" ` -dSDKBundleVersion="$SDKBundleVersion" ` -dNugetVersion="$DotnetCLINugetVersion" ` + -dVersionMajor="$VersionMajor" ` + -dVersionMinor="$VersionMinor" ` -dUpgradeCode="$UpgradeCode" ` -dDependencyKeyName="$DependencyKeyName" ` -arch "$Architecture" ` diff --git a/src/snaps/dotnet-sdk-6.0/snap/snapcraft.yaml b/src/snaps/dotnet-sdk-6.0/snap/snapcraft.yaml index bfbe2c9a4..b3693eddc 100755 --- a/src/snaps/dotnet-sdk-6.0/snap/snapcraft.yaml +++ b/src/snaps/dotnet-sdk-6.0/snap/snapcraft.yaml @@ -1,36 +1,41 @@ name: dotnet-sdk -version: 6.0.100-preview.2.21155.3 +version: 6.0.410 summary: Cross-Platform .NET Core SDK description: | .NET Core SDK. https://dot.net/core. +architectures: + - build-on: amd64 + run-on: amd64 + grade: stable confinement: classic - -apps: - dotnet: - command: dotnet - -base: core18 +base: core20 parts: dotnet-sdk: plugin: dump - source: https://download.visualstudio.microsoft.com/download/pr/25c7e38e-0a6a-4d66-ac4e-b550a44b8a98/49128be84b903799259e7bebe8e9d969/dotnet-sdk-6.0.100-preview.2.21155.3-linux-x64.tar.gz - source-checksum: sha512/90d9b6070f7732dcf75f5a09a4f10f9b23c835a3bb144e0c3f1fa451cadd3d49c9781973b180f70a4d2798358a7c00f3c0b9b3bf35326fe4c94e470e84ac8c35 - stage-packages: - - libicu60 - - libssl1.0.0 - - libcurl3 - - libgssapi-krb5-2 - - libstdc++6 - - zlib1g - - libgcc1 - - libtinfo5 - - liblttng-ust0 - - liburcu6 + source: https://download.visualstudio.microsoft.com/download/pr/ac5809b0-7930-4ae9-9005-58f2fd7912f3/4cf0cb18d22a162b33149b1f28a8e045/dotnet-sdk-6.0.410-linux-x64.tar.gz + source-checksum: sha512/8c85f5b10eb786c8cf31bf268131a2345a295d88d318310dc8457d831f0a587ec1600e43beb7f55aec2248483b9a95e905a468b592f0c910443b4aaa9baeb2e3 + stage-packages: + - libicu66 + - libgcc1 + - libstdc++6 + - libssl1.1 + - libcurl4 + - libgssapi-krb5-2 + - zlib1g + - lldb + - libunwind8 + - libtinfo5 + - liblttng-ust0 + - liburcu6 runtime-wrapper: plugin: dump source: . +apps: + dotnet: + command: dotnet + diff --git a/src/snaps/dotnet-sdk-7.0/snap/snapcraft.yaml b/src/snaps/dotnet-sdk-7.0/snap/snapcraft.yaml new file mode 100644 index 000000000..387796bd6 --- /dev/null +++ b/src/snaps/dotnet-sdk-7.0/snap/snapcraft.yaml @@ -0,0 +1,42 @@ +name: dotnet-sdk +version: 7.0.304 +summary: Cross-Platform .NET Core SDK +description: | + .NET Core SDK. https://dot.net/core. + +architectures: + - build-on: amd64 + run-on: amd64 + +grade: stable +confinement: classic +base: core20 + +parts: + dotnet-sdk: + plugin: dump + source: https://download.visualstudio.microsoft.com/download/pr/9c86d7b4-acb2-4be4-8a89-d13bc3c3f28f/1d044c7c29df018e8f2837bb343e8a84/dotnet-sdk-7.0.304-linux-x64.tar.gz + source-checksum: sha512/f4b7d0cde432bd37f445363b3937ad483e5006794886941e43124de051475925b3cd11313b73d2cae481ee9b8f131394df0873451f6088ffdbe73f150b1ed727 + stage-packages: + - libicu66 + - libgcc1 + - libstdc++6 + - libssl1.1 + - libcurl4 + - libgssapi-krb5-2 + - zlib1g + - lldb + - libunwind8 + - libtinfo5 + - liblttng-ust0 + - liburcu6 + + runtime-wrapper: + plugin: dump + source: . + +apps: + dotnet: + command: dotnet + + diff --git a/src/snaps/dotnet-sdk-8.0/snap/snapcraft.yaml b/src/snaps/dotnet-sdk-8.0/snap/snapcraft.yaml new file mode 100644 index 000000000..97ad53f2c --- /dev/null +++ b/src/snaps/dotnet-sdk-8.0/snap/snapcraft.yaml @@ -0,0 +1,40 @@ +name: dotnet-sdk +version: 8.0.100-preview.5.23303.2 +summary: Cross-Platform .NET Core SDK +description: | + .NET Core SDK. https://dot.net/core. + +architectures: + - build-on: amd64 + run-on: amd64 + +grade: stable +confinement: classic +base: core20 + +parts: + dotnet-sdk: + plugin: dump + source: https://download.visualstudio.microsoft.com/download/pr/07b027f8-4ef8-48cb-becc-132652c625bb/441ef662adfe931013745df24d53b26d/dotnet-sdk-8.0.100-preview.5.23303.2-linux-x64.tar.gz + source-checksum: sha512/dfe2085a92854a5cee84cb7be9344368f5dcb6333c4ca215375a34b862f3a3ee66c953b9957f7b46f6cd710992ee038f6b4c2bd16464b4a216a1785868e86f7c + stage-packages: + - libicu66 + - libgcc1 + - libstdc++6 + - libssl1.1 + - libcurl4 + - libgssapi-krb5-2 + - zlib1g + - lldb + - libunwind8 + - libtinfo5 + - liblttng-ust0 + - liburcu6 + + runtime-wrapper: + plugin: dump + source: . + +apps: + dotnet: + command: dotnet diff --git a/src/snaps/dotnet-sdk/snap/snapcraft.yaml b/src/snaps/dotnet-sdk/snap/snapcraft.yaml index 8f9c7cc3f..758d3f4b0 100755 --- a/src/snaps/dotnet-sdk/snap/snapcraft.yaml +++ b/src/snaps/dotnet-sdk/snap/snapcraft.yaml @@ -4,7 +4,7 @@ summary: Cross-Platform .NET Core SDK description: | .NET Core SDK. https://dot.net/core. -grade: devel +grade: stable confinement: classic apps: @@ -20,12 +20,13 @@ parts: source-checksum: sha512/$(SOURCE_TARGZ_SHA) stage-packages: - libicu60 + - libc6 + - libgcc1 + - libstdc++6 - libssl1.0.0 - libcurl3 - libgssapi-krb5-2 - - libstdc++6 - zlib1g - - libgcc1 - lldb - libunwind8 - libtinfo5 diff --git a/test/EndToEnd/GivenFrameworkDependentApps.cs b/test/EndToEnd/GivenFrameworkDependentApps.cs index 80a955657..0d30abdac 100644 --- a/test/EndToEnd/GivenFrameworkDependentApps.cs +++ b/test/EndToEnd/GivenFrameworkDependentApps.cs @@ -18,7 +18,7 @@ namespace EndToEnd [ClassData(typeof(SupportedNetCoreAppVersions))] public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion) { - if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0") + if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0") { // https://github.com/dotnet/core-sdk/issues/621 return; @@ -30,7 +30,7 @@ namespace EndToEnd [ClassData(typeof(SupportedAspNetCoreVersions))] public void ItDoesNotRollForwardToTheLatestVersionOfAspNetCoreApp(string minorVersion) { - if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0") + if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0" || minorVersion == "6.0" || minorVersion == "7.0" || minorVersion == "8.0") { // https://github.com/dotnet/core-sdk/issues/621 return; diff --git a/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs b/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs index 6088040e3..a1b74eaa5 100644 --- a/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs +++ b/test/EndToEnd/GivenWeWantToRequireWindowsForDesktopApps.cs @@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd { var testProjectCreator = new TestProjectCreator() { - MinorVersion = "6.0" + MinorVersion = "8.0" }; testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages"; diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index e3377ef9e..fa7350c16 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -21,7 +22,7 @@ namespace EndToEnd.Tests var directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; - string newArgs = "console --debug:ephemeral-hive --no-restore"; + string newArgs = "console --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) @@ -59,7 +60,7 @@ namespace EndToEnd.Tests var directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; - string newArgs = "console --debug:ephemeral-hive --no-restore"; + string newArgs = "console --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) @@ -71,7 +72,6 @@ namespace EndToEnd.Tests var ns = project.Root.Name.Namespace; project.Root.Attribute("Sdk").Value = "Microsoft.NET.Sdk.Web"; - project.Save(projectPath); new BuildCommand() @@ -85,56 +85,83 @@ namespace EndToEnd.Tests .Should().Pass().And.HaveStdOutContaining("Hello, World!"); } - [WindowsOnlyFact] - public void ItCanPublishArm64Winforms() + [WindowsOnlyTheory] + // [InlineData("net6.0", true)] + // [InlineData("net6.0", false)] + [InlineData("current", true)] + [InlineData("current", false)] + public void ItCanPublishArm64Winforms(string TargetFramework, bool selfContained) { DirectoryInfo directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; + string TargetFrameworkParameter = ""; - string newArgs = "winforms --no-restore"; + if (TargetFramework != "current") + { + TargetFrameworkParameter = $"-f {TargetFramework}"; + } + string newArgs = $"winforms {TargetFrameworkParameter} --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string selfContainedArgs = selfContained ? " --self-contained" : ""; + string publishArgs = "-r win-arm64" + selfContainedArgs; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) .Should().Pass(); var selfContainedPublishDir = new DirectoryInfo(projectDirectory) - .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() + .Sub("bin").Sub(TargetFramework != "current" ? "Debug" : "Release").GetDirectories().FirstOrDefault() .Sub("win-arm64").Sub("publish"); - selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly); + if (selfContained) + { + selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly); + } selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); } - [WindowsOnlyFact] - public void ItCanPublishArm64Wpf() + [WindowsOnlyTheory] + // [InlineData("net6.0", true)] + // [InlineData("net6.0", false)] + [InlineData("current", true)] + [InlineData("current", false)] + public void ItCanPublishArm64Wpf(string TargetFramework, bool selfContained) { DirectoryInfo directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; + string TargetFrameworkParameter = ""; - string newArgs = "wpf --no-restore"; + if (TargetFramework != "current") + { + TargetFrameworkParameter = $"-f {TargetFramework}"; + } + + string newArgs = $"wpf {TargetFrameworkParameter} --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string selfContainedArgs = selfContained ? " --self-contained" : ""; + string publishArgs = "-r win-arm64" + selfContainedArgs; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) .Should().Pass(); var selfContainedPublishDir = new DirectoryInfo(projectDirectory) - .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() + .Sub("bin").Sub(TargetFramework != "current" ? "Debug" : "Release").GetDirectories().FirstOrDefault() .Sub("win-arm64").Sub("publish"); - selfContainedPublishDir.Should().HaveFilesMatching("PresentationCore.dll", SearchOption.TopDirectoryOnly); - selfContainedPublishDir.Should().HaveFilesMatching("PresentationNative_*.dll", SearchOption.TopDirectoryOnly); + if (selfContained) + { + selfContainedPublishDir.Should().HaveFilesMatching("PresentationCore.dll", SearchOption.TopDirectoryOnly); + selfContainedPublishDir.Should().HaveFilesMatching("PresentationNative_*.dll", SearchOption.TopDirectoryOnly); + } selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); } @@ -175,17 +202,16 @@ namespace EndToEnd.Tests string expectedOutput = @"[\-\s]+ -[\w \.]+webapp,razor\s+\[C#\][\w\ \/]+ -[\w \.]+blazorserver\s+\[C#\][\w\ \/]+ -[\w \.]+classlib\s+\[C#\],F#,VB[\w\ \/]+ -[\w \.]+console\s+\[C#\],F#,VB[\w\ \/]+ +[\w \.\(\)]+blazor\s+\[C#\][\w\ \/]+ +[\w \.\(\)]+classlib\s+\[C#\],F#,VB[\w\ \/]+ +[\w \.\(\)]+console\s+\[C#\],F#,VB[\w\ \/]+ "; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { expectedOutput += -@"[\w \.]+winforms\s+\[C#\],VB[\w\ \/]+ -[\w \.]+\wpf\s+\[C#\],VB[\w\ \/]+ +@"[\w \.\(\)]+winforms\s+\[C#\],VB[\w\ \/]+ +[\w \.\(\)]+\wpf\s+\[C#\],VB[\w\ \/]+ "; } //list should end with new line @@ -210,7 +236,7 @@ namespace EndToEnd.Tests DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: templateName); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive"; + string newArgs = $"{templateName}"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) @@ -220,21 +246,68 @@ namespace EndToEnd.Tests //check if the template created files Assert.True(directory.Exists); Assert.True(directory.EnumerateFileSystemInfos().Any()); + + // delete test directory for some tests so we aren't leaving behind non-compliant nuget files + if (templateName.Equals("nugetconfig")) + { + directory.Delete(true); + } + } + + [Theory] + // microsoft.dotnet.common.itemtemplates templates + [InlineData("class")] + [InlineData("struct")] + [InlineData("enum")] + [InlineData("record")] + [InlineData("interface")] + [InlineData("class", "C#")] + [InlineData("class", "VB")] + [InlineData("struct", "VB")] + [InlineData("enum", "VB")] + [InlineData("interface", "VB")] + public void ItCanCreateItemTemplateWithProjectRestriction(string templateName, string language = "") + { + var languageExtensionMap = new Dictionary() + { + { "", ".cs" }, + { "C#", ".cs" }, + { "VB", ".vb" } + }; + + DirectoryInfo directory = InstantiateProjectTemplate("classlib", language, withNoRestore: false); + string projectDirectory = directory.FullName; + string expectedItemName = $"TestItem_{templateName}"; + string newArgs = $"{templateName} --name {expectedItemName} --debug:ephemeral-hive"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + //check if the template created files + Assert.True(directory.Exists); + Assert.True(directory.EnumerateFileSystemInfos().Any()); + Assert.True(directory.GetFile($"{expectedItemName}.{languageExtensionMap[language]}") != null); } [WindowsOnlyTheory] - [InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")] - [InlineData("winforms", Skip = "https://github.com/dotnet/wpf/issues/2363")] + [InlineData("wpf")] + [InlineData("winforms")] public void ItCanBuildDesktopTemplates(string templateName) { TestTemplateCreateAndBuild(templateName); } [WindowsOnlyTheory] - [InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")] + [InlineData("wpf")] public void ItCanBuildDesktopTemplatesSelfContained(string templateName) { - TestTemplateCreateAndBuild(templateName); + TestTemplateCreateAndBuild(templateName, selfContained: true); } [Theory] @@ -273,7 +346,6 @@ namespace EndToEnd.Tests [InlineData("xunit", "C#")] [InlineData("xunit", "VB")] [InlineData("xunit", "F#")] - [InlineData("blazorserver")] [InlineData("blazorwasm")] [InlineData("web")] [InlineData("web", "C#")] @@ -288,22 +360,8 @@ namespace EndToEnd.Tests [InlineData("razorclasslib")] public void ItCanCreateAndBuildTemplatesWithDefaultFramework(string templateName, string language = "") { - string framework = DetectExpectedDefaultFramework(); - TestTemplateCreateAndBuild(templateName, selfContained: true, language: language, framework: framework); - } - - /// - /// The test checks if the template creates the template for correct framework by default. - /// For .NET 6 the templates should create the projects targeting net6.0. - /// These templates require node.js to be built, so we just check if TargetFramework is present in csproj files - /// - [Theory] - [InlineData("angular")] - [InlineData("react")] - public void ItCanCreateTemplateWithDefaultFramework(string templateName) - { - string framework = DetectExpectedDefaultFramework(); - TestTemplateCreateAndBuild(templateName, build: false, framework: framework); + string framework = DetectExpectedDefaultFramework(templateName); + TestTemplateCreateAndBuild(templateName, selfContained: false, language: language, framework: framework); } /// @@ -335,8 +393,8 @@ namespace EndToEnd.Tests [InlineData("winformscontrollib", "VB")] public void ItCanCreateAndBuildTemplatesWithDefaultFramework_Windows(string templateName, string language = "") { - string framework = DetectExpectedDefaultFramework(); - TestTemplateCreateAndBuild(templateName, selfContained: true, language: language, framework: $"{framework}-windows"); + string framework = DetectExpectedDefaultFramework(templateName); + TestTemplateCreateAndBuild(templateName, selfContained: false, language: language, framework: $"{framework}-windows"); } /// @@ -348,9 +406,9 @@ namespace EndToEnd.Tests [InlineData("grpc")] public void ItCanCreateAndBuildTemplatesWithDefaultFramework_DisableBuildOnLinuxMusl(string templateName) { - string framework = DetectExpectedDefaultFramework(); + string framework = DetectExpectedDefaultFramework(templateName); - if (RuntimeInformation.RuntimeIdentifier.StartsWith("alpine")) //linux musl + if (RuntimeInformation.RuntimeIdentifier.StartsWith("linux-musl")) { TestTemplateCreateAndBuild(templateName, build: false, framework: framework); } @@ -360,35 +418,25 @@ namespace EndToEnd.Tests } } - private static string DetectExpectedDefaultFramework() + private static string DetectExpectedDefaultFramework(string template = "") { string dotnetFolder = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); string[] runtimeFolders = Directory.GetDirectories(Path.Combine(dotnetFolder, "shared", "Microsoft.NETCore.App")); int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max(); - if (latestMajorVersion == 6) + if (latestMajorVersion == 8) { - return "net6.0"; + return $"net{latestMajorVersion}.0"; } + throw new Exception("Unsupported version of SDK"); } - private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "") + private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "", bool deleteTestDirectory = false) { - DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: string.IsNullOrWhiteSpace(language) ? templateName : $"{templateName}[{language}]"); + DirectoryInfo directory = InstantiateProjectTemplate(templateName, language); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive --no-restore"; - if (!string.IsNullOrWhiteSpace(language)) - { - newArgs += $" --language {language}"; - } - - new NewCommandShim() - .WithWorkingDirectory(projectDirectory) - .Execute(newArgs) - .Should().Pass(); - if (!string.IsNullOrWhiteSpace(framework)) { //check if MSBuild TargetFramework property for *proj is set to expected framework @@ -407,18 +455,18 @@ namespace EndToEnd.Tests if (build) { - string buildArgs = selfContained ? "" : $"-r {RuntimeInformation.RuntimeIdentifier}"; + string buildArgs = selfContained ? $"-r {RuntimeInformation.RuntimeIdentifier} --self-contained" : ""; if (!string.IsNullOrWhiteSpace(framework)) { buildArgs += $" --framework {framework}"; } - + // Remove this (or formalize it) after https://github.com/dotnet/installer/issues/12479 is resolved. if (language == "F#") { buildArgs += $" /p:_NETCoreSdkIsPreview=true"; } - + string dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); new BuildCommand() .WithEnvironmentVariable("PATH", dotnetRoot) // override PATH since razor rely on PATH to find dotnet @@ -426,6 +474,34 @@ namespace EndToEnd.Tests .Execute(buildArgs) .Should().Pass(); } + + // delete test directory for some tests so we aren't leaving behind non-compliant package files + if (deleteTestDirectory) + { + directory.Delete(true); + } + } + + private static DirectoryInfo InstantiateProjectTemplate(string templateName, string language = "", bool withNoRestore = true) + { + DirectoryInfo directory = TestAssets.CreateTestDirectory( + identifier: string.IsNullOrWhiteSpace(language) + ? templateName + : $"{templateName}[{language}]"); + string projectDirectory = directory.FullName; + + string newArgs = $"{templateName} --debug:ephemeral-hive {(withNoRestore ? "--no-restore" : "")}"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + return directory; } } } diff --git a/test/EndToEnd/SupportedNetCoreAppVersions.cs b/test/EndToEnd/SupportedNetCoreAppVersions.cs index 75862eed3..f926e2004 100644 --- a/test/EndToEnd/SupportedNetCoreAppVersions.cs +++ b/test/EndToEnd/SupportedNetCoreAppVersions.cs @@ -29,7 +29,9 @@ namespace EndToEnd "3.0", "3.1", "5.0", - "6.0" + "6.0", + "7.0", + "8.0" }; public static IEnumerable TargetFrameworkShortFolderVersion diff --git a/test/EndToEnd/TelemetryOptOutDefaultTests.cs b/test/EndToEnd/TelemetryOptOutDefaultTests.cs new file mode 100644 index 000000000..1e2d2ecef --- /dev/null +++ b/test/EndToEnd/TelemetryOptOutDefaultTests.cs @@ -0,0 +1,24 @@ +using System.IO; +using FluentAssertions; +using Microsoft.DotNet.Tools.Test.Utilities; +using Xunit; + +namespace EndToEnd.Tests +{ + public class TelemetryOptOutDefault : TestBase + { + [Fact] + public void TelemetryOptOutDefaultAttribute() + { + var versionCommand = new DotnetCommand() + .ExecuteWithCapturedOutput("--version"); + + var sdkVersion = versionCommand.StdOut.Trim(); + + var dotnetdir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk", sdkVersion); + + var result = AssemblyInfo.Get(Path.Combine(dotnetdir, "dotnet.dll"), "AssemblyMetadataAttribute"); + result.Should().Contain("TelemetryOptOutDefault:False"); + } + } +} diff --git a/test/EndToEnd/ValidateInsertedManifests.cs b/test/EndToEnd/ValidateInsertedManifests.cs index 5d9b44df0..cdede126c 100644 --- a/test/EndToEnd/ValidateInsertedManifests.cs +++ b/test/EndToEnd/ValidateInsertedManifests.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; using FluentAssertions; using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.NET.Sdk.WorkloadManifestReader; @@ -26,16 +23,19 @@ namespace EndToEnd.Tests { var sdkManifestDir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk-manifests"); var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().First(); - foreach (var manifestDir in sdkversionDir.EnumerateDirectories()) + foreach (var manifestVersionDir in sdkversionDir.EnumerateDirectories()) { - var manifestId = manifestDir.Name; + foreach (var manifestDir in manifestVersionDir.EnumerateDirectories()) + { + var manifestId = manifestDir.Name; - string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; + string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName; - File.Exists(manifestFile).Should().BeTrue(); - using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); - Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); - readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); + File.Exists(manifestFile).Should().BeTrue(); + using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read); + Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile); + readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid"); + } } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs new file mode 100644 index 000000000..f02cfbeb3 --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using System.Text; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public static class AssemblyInfo + { + public static IList Get(string assemblyPath, string assemblyInfoName) + { + var list = new List(); + + using (var stream = File.OpenRead(assemblyPath)) + using (var peReader = new PEReader(stream)) + { + var metadataReader = peReader.GetMetadataReader(); + var assemblyDefinition = metadataReader.GetAssemblyDefinition(); + + foreach (var handle in assemblyDefinition.GetCustomAttributes()) + { + var attribute = metadataReader.GetCustomAttribute(handle); + var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor); + var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent); + var name = metadataReader.GetString(type.Name); + + if (name.Equals(assemblyInfoName)) + { + var signature = metadataReader.GetBlobReader(constructor.Signature); + var value = metadataReader.GetBlobReader(attribute.Value); + var header = signature.ReadSignatureHeader(); + + const ushort prolog = 1; // two-byte "prolog" defined by ECMA-335 (II.23.3) to be at the beginning of attribute value blobs + if (value.ReadUInt16() != prolog || header.Kind != SignatureKind.Method || header.IsGeneric) + { + throw new BadImageFormatException(); + } + + var paramCount = signature.ReadCompressedInteger(); + if (paramCount <= 0 || // must have at least 1 parameter + signature.ReadSignatureTypeCode() != SignatureTypeCode.Void) // return type must be void + { + continue; + } + + var sb = new StringBuilder(); + while (paramCount > 0 && sb != null) + { + switch (signature.ReadSignatureTypeCode()) + { + case SignatureTypeCode.String: + sb.Append(value.ReadSerializedString()); + break; + default: + sb = null; + break; + } + + paramCount--; + if (paramCount != 0) + { + sb?.Append(':'); + } + } + + if (sb != null) + { + list.Add(sb.ToString()); + } + } + } + } + return list; + } + } +} diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/BufferedReporter.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/BufferedReporter.cs index d4c865b08..e657e324c 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/BufferedReporter.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/BufferedReporter.cs @@ -1,3 +1,5 @@ +#nullable enable + using System; using System.Collections.Generic; using Microsoft.DotNet.Cli.Utils; @@ -8,6 +10,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities { public List Lines { get; private set; } = new List(); + public void WriteLine(string format, params object?[] args) => WriteLine(string.Format(format, args)); + public void WriteLine(string message) { Lines.Add(message); diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs index c25fcd533..0ac0ce5cf 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs @@ -143,7 +143,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities RemoveCliGeneratedEnvironmentVariablesFrom(psi); psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0"; - psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; // Set DOTNET_ROOT to ensure sub process find the same host fxr string dotnetDirectoryPath = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj index 04fed4562..27da1cfb8 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj @@ -5,7 +5,7 @@ - + diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 32f254a89..8902bb1a6 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -1,4 +1,4 @@ - + false @@ -46,10 +46,6 @@ - - true - - @@ -60,41 +56,14 @@ Windows - - false - - - - false - - - - false - - - - false - - - - false - - - - - false - - - - - - + + @@ -208,19 +177,18 @@ $(ToolRunPrefix)set DOTNET_INSTALLDIR=&& - $(ToolRunPrefix)unset MSBuildSDKsPath && - $(ToolRunPrefix)unset DOTNET_HOST_PATH && - $(ToolRunPrefix)unset DOTNET_INSTALLDIR && + $(ToolRunPrefix)unset MSBuildSDKsPath DOTNET_HOST_PATH DOTNET_INSTALLDIR && - + EnvironmentVariables="DOTNET_CLI_HOME=$(DOTNET_CLI_HOME)" + IgnoreStandardErrorWarningFormat="true" /> $(MicrosoftNETSdkPackageVersion) - dotnet tool install --local $(ToolCommandName) + $(RedistLayoutPath)dotnet tool install --local $(ToolCommandName) $(InstallToolCommand) --version $(SdkTestPackageVersion) @@ -258,11 +226,16 @@ $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestsToSkipPortableLinux.xml" - - + + $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestsToSkipLinux.xml" + + + $(TestArgs) -testConfigFile "$(MSBuildThisFileDirectory)TestsToSkipOSX.xml" + + diff --git a/test/SdkTests/TestConfig.xml b/test/SdkTests/TestConfig.xml index 30ef0caae..ed432ea13 100644 --- a/test/SdkTests/TestConfig.xml +++ b/test/SdkTests/TestConfig.xml @@ -45,107 +45,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Reason="Test doesn't work with newer RIDs"/> + - - - - - - + + + + @@ -290,29 +217,45 @@ Skip="true" Issue="" Reason="Cannot run with non-existent LastRuntimeFrameworkVersion"/> - - - - - + + + + + diff --git a/test/SdkTests/TestsToSkipOSX.xml b/test/SdkTests/TestsToSkipOSX.xml new file mode 100644 index 000000000..09330bb1f --- /dev/null +++ b/test/SdkTests/TestsToSkipOSX.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/tools/sdk-readme-table-generator/TableGenerator.Tests/DomainTests.fs b/tools/sdk-readme-table-generator/TableGenerator.Tests/DomainTests.fs index 06f6574fa..70953cad0 100644 --- a/tools/sdk-readme-table-generator/TableGenerator.Tests/DomainTests.fs +++ b/tools/sdk-readme-table-generator/TableGenerator.Tests/DomainTests.fs @@ -244,7 +244,7 @@ let ``pinning tests for readme in main 11/02/2020``() = Reference notes: > **1**: Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first: -> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime#daily-builds) +> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table) > * [ASP.NET Core Shared Framework](https://github.com/aspnet/AspNetCore/blob/main/docs/DailyBuilds.md) .NET Core SDK 2.x downloads can be found here: [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) diff --git a/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj b/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj index f33878f9b..2234374c1 100644 --- a/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj +++ b/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj @@ -1,6 +1,6 @@  - netcoreapp3.1 + net6.0 @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/tools/sdk-readme-table-generator/TableGenerator/Program.fs b/tools/sdk-readme-table-generator/TableGenerator/Program.fs index 6be71c933..ce367d47b 100644 --- a/tools/sdk-readme-table-generator/TableGenerator/Program.fs +++ b/tools/sdk-readme-table-generator/TableGenerator/Program.fs @@ -6,32 +6,23 @@ open TableGenerator.Reference open TableGenerator.Table let inputBranches = - [ { GitBranchName = "release/6.0.1xx" - DisplayName = "Release/6.0.1XX
(6.0.x Runtime)" - AkaMsChannel = Some("6.0/daily") } - { GitBranchName = "release/6.0.1xx-rc1" - DisplayName = "Release/6.0.1XX-rc1
(6.0 Runtime)" - AkaMsChannel = Some("6.0.1XX-rc1/daily") } - { GitBranchName = "release/5.0.4xx" - DisplayName = "Release/5.0.4XX
(5.0 Runtime)" - AkaMsChannel = Some("5.0.4xx/daily") } - { GitBranchName = "release/5.0.2xx" - DisplayName = "Release/5.0.2XX
(5.0 Runtime)" - AkaMsChannel = Some("5.0.2xx/daily") } - { GitBranchName = "release/3.1.4xx" - DisplayName = "Release/3.1.4XX
(3.1.x Runtime)" - AkaMsChannel = None } - { GitBranchName = "release/3.1.1xx" - DisplayName = "Release/3.1.1XX
(3.1.x Runtime)" - AkaMsChannel = None }] + [ { GitBranchName = "main" + DisplayName = "main
(8.0.x Runtime)" + AkaMsChannel = Some("8.0.1xx/daily") } + { GitBranchName = "release/8.0.1xx-preview7" + DisplayName = "8.0.1xx-preview7
(8.0-preview7 Runtime)" + AkaMsChannel = Some("8.0.1xx-preview7/daily") } + { GitBranchName = "release/7.0.4xx" + DisplayName = "Release/7.0.4xx
(7.0.x Runtime)" + AkaMsChannel = Some("7.0.4xx/daily") }] let referentNotes = """Reference notes: > **1**: Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first: -> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime#daily-builds) +> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table) > * [ASP.NET Core Shared Framework](https://github.com/aspnet/AspNetCore/blob/main/docs/DailyBuilds.md) -.NET Core SDK 2.x downloads can be found here: [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md)""" +.NET Core SDK 2.x downloads can be found at [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) but they are [out of support](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).""" let sdksha2 = "[sdk-shas-2.2.1XX]: https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release/2.2#built-repositories" diff --git a/tools/sdk-readme-table-generator/TableGenerator/Reference.fs b/tools/sdk-readme-table-generator/TableGenerator/Reference.fs index f286a4f82..c6e8cabeb 100644 --- a/tools/sdk-readme-table-generator/TableGenerator/Reference.fs +++ b/tools/sdk-readme-table-generator/TableGenerator/Reference.fs @@ -4,21 +4,21 @@ open System open TableGenerator.Shared let referenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-installer-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.exe [{0}-installer-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.exe.sha [{0}-zip-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.zip [{0}-zip-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.zip.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-installer-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.exe [{0}-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.exe.sha [{0}-zip-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.zip [{0}-zip-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.zip.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-installer-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.exe [{0}-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.exe.sha @@ -27,53 +27,53 @@ let referenceTemplate: ReferenceTemplate = { } let targzReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [{0}-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz.sha""" } let linuxArmNoArchitectureReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [{0}-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz.sha""" } let osxReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-installer-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.pkg [{0}-installer-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.pkg.sha [{0}-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [{0}-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-installer-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.pkg [{0}-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.pkg.sha [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.pkg.tar.gz.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-installer-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.pkg [{0}-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.pkg.sha @@ -82,7 +82,7 @@ let osxReferenceTemplate: ReferenceTemplate = { } let linuxReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[linux-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[linux-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [linux-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [linux-DEB-installer-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-x64.deb [linux-DEB-installer-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-x64.deb.sha @@ -91,7 +91,7 @@ let linuxReferenceTemplate: ReferenceTemplate = { [linux-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [linux-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[linux-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[linux-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [linux-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [linux-DEB-installer-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-x64.deb [linux-DEB-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-x64.deb.sha @@ -100,7 +100,7 @@ let linuxReferenceTemplate: ReferenceTemplate = { [linux-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [linux-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz.sha""" - AkaMSTemplate = """[linux-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[linux-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [linux-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [linux-DEB-installer-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-x64.deb [linux-DEB-installer-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-x64.deb.sha @@ -111,51 +111,51 @@ let linuxReferenceTemplate: ReferenceTemplate = { } let rhel6ReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[rhel-6-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[rhel-6-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [rhel-6-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [rhel-6-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [rhel-6-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[rhel-6-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[rhel-6-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [rhel-6-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [rhel-6-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [rhel-6-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz.sha""" - AkaMSTemplate = """[rhel-6-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[rhel-6-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [rhel-6-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [rhel-6-targz-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz [rhel-6-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz.sha""" } let linuxMuslReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-targz-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz [{0}-targz-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.tar.gz.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.tar.gz.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-targz-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz [{0}-targz-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.tar.gz.sha""" } let winMuslReferenceTemplate: ReferenceTemplate = { - LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg + LegacyTemplate = """[{0}-badge-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/latest.version [{0}-zip-{1}]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.zip [{0}-zip-checksum-{1}]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/{2}/dotnet-sdk-latest-{0}.zip.sha""" - AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg + AkaMSLegacyTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/Sdk/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/Sdk/productCommit-{0}.txt [{0}-zip-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.zip [{0}-zip-checksum-{1}]: https://aka.ms/dotnet/{4}/Sdk/dotnet-sdk-{0}.zip.sha""" - AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg + AkaMSTemplate = """[{0}-badge-{1}]: https://aka.ms/dotnet/{4}/{3}_Release_version_badge.svg?no-cache [{0}-version-{1}]: https://aka.ms/dotnet/{4}/productCommit-{0}.txt [{0}-zip-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.zip [{0}-zip-checksum-{1}]: https://aka.ms/dotnet/{4}/dotnet-sdk-{0}.zip.sha""" diff --git a/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj b/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj index 875b6cfcb..6564d2f11 100644 --- a/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj +++ b/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0