From 995c669219ba222466ca9a78c2d173c1bbf40433 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Wed, 10 Nov 2021 23:28:24 +0000
Subject: [PATCH] [main] Update dependencies from dotnet/arcade (#1141)
[main] Update dependencies from dotnet/arcade
- Move build tooling to .NET 6 GA to avoid RC1 static web asset build issue.
---
eng/Version.Details.xml | 20 +--
eng/common/build.sh | 4 +
eng/common/cross/build-rootfs.sh | 74 ++++------
eng/common/cross/toolchain.cmake | 9 +-
eng/common/init-tools-native.sh | 2 +-
eng/common/internal/Tools.csproj | 1 -
eng/common/msbuild.ps1 | 1 +
eng/common/native/common-library.sh | 8 +-
...nd-native-compiler.sh => init-compiler.sh} | 102 +++++++-------
.../post-build/sourcelink-validation.ps1 | 30 +++-
eng/common/post-build/symbols-validation.ps1 | 95 ++++++++-----
eng/common/sdk-task.ps1 | 3 +
eng/common/sdl/configure-sdl-tool.ps1 | 6 +-
eng/common/templates/job/execute-sdl.yml | 6 +-
eng/common/templates/job/job.yml | 2 +-
eng/common/templates/job/onelocbuild.yml | 5 +-
.../templates/job/publish-build-assets.yml | 26 +++-
eng/common/templates/job/source-build.yml | 15 +-
.../templates/job/source-index-stage1.yml | 31 ++---
eng/common/templates/jobs/jobs.yml | 4 +-
eng/common/templates/phases/base.yml | 130 ------------------
.../templates/phases/publish-build-assets.yml | 52 -------
eng/common/templates/steps/send-to-helix.yml | 3 -
eng/common/templates/steps/source-build.yml | 35 ++++-
eng/common/tools.ps1 | 42 ++++++
eng/common/tools.sh | 16 +++
global.json | 4 +-
27 files changed, 342 insertions(+), 384 deletions(-)
rename eng/common/native/{find-native-compiler.sh => init-compiler.sh} (52%)
delete mode 100644 eng/common/templates/phases/base.yml
delete mode 100644 eng/common/templates/phases/publish-build-assets.yml
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ea3a21c8..f9c77318 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -3,25 +3,25 @@
-
+
https://github.com/dotnet/arcade
- 62a8aafffd4c68ef887680f6837abdff906a662c
+ fecf65bedcee9036b8ba9d8d7feef5413f294914
-
+
https://github.com/dotnet/arcade
- 62a8aafffd4c68ef887680f6837abdff906a662c
+ fecf65bedcee9036b8ba9d8d7feef5413f294914
-
+
https://github.com/dotnet/arcade
- 62a8aafffd4c68ef887680f6837abdff906a662c
+ fecf65bedcee9036b8ba9d8d7feef5413f294914
-
+
https://github.com/dotnet/arcade
- 62a8aafffd4c68ef887680f6837abdff906a662c
+ fecf65bedcee9036b8ba9d8d7feef5413f294914
-
+
https://github.com/dotnet/arcade
- 62a8aafffd4c68ef887680f6837abdff906a662c
+ fecf65bedcee9036b8ba9d8d7feef5413f294914
https://github.com/dotnet/arcade-services
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 55b298f1..bc07a1c6 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -187,6 +187,10 @@ function InitializeCustomToolset {
}
function Build {
+
+ if [[ "$ci" == true ]]; then
+ TryLogClientIpAddress
+ fi
InitializeToolset
InitializeCustomToolset
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index 735a4c82..6fa2c8aa 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -6,10 +6,10 @@ 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: trusty, 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 or freebsd12."
+ echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. 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 "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD"
+ 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 "--skipunmount - optional, will skip the unmount of rootfs folder."
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
exit 1
@@ -32,9 +32,9 @@ __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"
@@ -60,13 +60,15 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
-__FreeBSDBase="12.1-RELEASE"
+__FreeBSDBase="12.2-RELEASE"
__FreeBSDPkg="1.12.0"
+__FreeBSDABI="12"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
__FreeBSDPackages+=" lttng-ust"
__FreeBSDPackages+=" krb5"
+__FreeBSDPackages+=" terminfo-db"
__IllumosPackages="icu-64.2nb2"
__IllumosPackages+=" mit-krb5-1.16.2nb4"
@@ -144,11 +146,6 @@ while :; do
no-lldb)
unset __LLDB_Package
;;
- trusty) # Ubuntu 14.04
- if [ "$__CodeName" != "jessie" ]; then
- __CodeName=trusty
- fi
- ;;
xenial) # Ubuntu 16.04
if [ "$__CodeName" != "jessie" ]; then
__CodeName=xenial
@@ -188,32 +185,34 @@ while :; do
__UbuntuRepo=
__Tizen=tizen
;;
- alpine|alpine3.9)
+ alpine|alpine3.13)
__CodeName=alpine
__UbuntuRepo=
- __AlpineVersion=3.9
- __AlpinePackagesEdgeMain+=" llvm11-libs"
- __AlpinePackagesEdgeMain+=" clang-libs"
+ __AlpineVersion=3.13
+ __AlpinePackages+=" llvm10-libs"
;;
- alpine3.13)
+ alpine3.14)
__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"
+ __AlpineVersion=3.14
+ __AlpinePackages+=" llvm11-libs"
;;
freebsd11)
__FreeBSDBase="11.3-RELEASE"
+ __FreeBSDABI="11"
;&
freebsd12)
__CodeName=freebsd
__BuildArch=x64
__SkipUnmount=1
;;
+ freebsd13)
+ __CodeName=freebsd
+ __FreeBSDBase="13.0-RELEASE"
+ __FreeBSDABI="13"
+ __BuildArch=x64
+ __SkipUnmount=1
+ ;;
illumos)
__CodeName=illumos
__BuildArch=x64
@@ -274,26 +273,12 @@ if [[ "$__CodeName" == "alpine" ]]; then
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackages
- 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
- 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
- fi
-
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
- # For now, ask for 11 ABI even on 12. This can be revisited later.
- echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
+ 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
# get and build package manager
@@ -301,7 +286,7 @@ elif [[ "$__CodeName" == "freebsd" ]]; then
cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
# needed for install to succeed
mkdir -p $__RootfsDir/host/etc
- ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install
+ ./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
@@ -364,13 +349,6 @@ elif [[ -n $__CodeName ]]; then
umount $__RootfsDir/* || true
fi
- if [[ "$__BuildArch" == "arm" && "$__CodeName" == "trusty" ]]; then
- pushd $__RootfsDir
- patch -p1 < $__CrossDir/$__BuildArch/trusty.patch
- patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch
- popd
- fi
-
if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then
pushd $__RootfsDir
patch -p1 < $__CrossDir/$__BuildArch/armel.jessie.patch
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index fc11001a..6501c3a9 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -44,7 +44,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(TOOLCHAIN "i686-linux-gnu")
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
- set(triple "x86_64-unknown-freebsd11")
+ set(triple "x86_64-unknown-freebsd12")
elseif (ILLUMOS)
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(TOOLCHAIN "x86_64-illumos")
@@ -91,6 +91,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
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}")
@@ -138,8 +141,8 @@ function(add_toolchain_linker_flag Flag)
if (NOT Config STREQUAL "")
set(CONFIG_SUFFIX "_${Config}")
endif()
- set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
- set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
+ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
+ 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")
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 5bd205b5..3e6a8d6a 100755
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -10,7 +10,7 @@ force=false
download_retries=5
retry_wait_time_seconds=30
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
-declare -A native_assets
+declare -a native_assets
. $scriptroot/pipeline-logging-functions.sh
. $scriptroot/native/common-library.sh
diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj
index 2067b8df..beb9c464 100644
--- a/eng/common/internal/Tools.csproj
+++ b/eng/common/internal/Tools.csproj
@@ -1,5 +1,4 @@
-
net472
diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1
index eea19cd8..f041e5dd 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/common-library.sh b/eng/common/native/common-library.sh
index bf272dcf..080c2c28 100755
--- a/eng/common/native/common-library.sh
+++ b/eng/common/native/common-library.sh
@@ -148,8 +148,12 @@ function NewScriptShim {
fi
if [[ ! -f $tool_file_path ]]; then
- Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
- return 1
+ # try to see if the path is lower cased
+ tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")"
+ if [[ ! -f $tool_file_path ]]; then
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
+ return 1
+ fi
fi
local shim_contents=$'#!/usr/bin/env bash\n'
diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/init-compiler.sh
similarity index 52%
rename from eng/common/native/find-native-compiler.sh
rename to eng/common/native/init-compiler.sh
index aed19d07..8c944f30 100644
--- a/eng/common/native/find-native-compiler.sh
+++ b/eng/common/native/init-compiler.sh
@@ -1,39 +1,34 @@
#!/usr/bin/env bash
#
-# This file locates the native compiler with the given name and version and sets the environment variables to locate it.
+# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
#
-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
+if [[ "$#" -lt 3 ]]; then
echo "Usage..."
- echo "find-native-compiler.sh "
+ echo "init-compiler.sh