Browse Source

Update dependencies from https://github.com/dotnet/arcade build 20230223.2 (#46903)

[main] Update dependencies from dotnet/arcade
dotnet-maestro[bot] 3 years ago
parent
commit
2f1885afe0
5 changed files with 138 additions and 50 deletions
  1. 10 10
      eng/Version.Details.xml
  2. 3 3
      eng/Versions.props
  3. 122 34
      eng/common/cross/build-rootfs.sh
  4. 1 1
      eng/common/templates/job/job.yml
  5. 2 2
      global.json

+ 10 - 10
eng/Version.Details.xml

@@ -302,26 +302,26 @@
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Sha>bee217ffbdd6b3ad60b0e1e17c6370f4bb618779</Sha>
       <Sha>bee217ffbdd6b3ad60b0e1e17c6370f4bb618779</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23118.1">
+    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23123.2">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>38d3196e1596eb525367ec8d65fcc1f30a58261c</Sha>
+      <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha>
       <SourceBuild RepoName="arcade" ManagedOnly="true" />
       <SourceBuild RepoName="arcade" ManagedOnly="true" />
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23118.1">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="8.0.0-beta.23123.2">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>38d3196e1596eb525367ec8d65fcc1f30a58261c</Sha>
+      <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23118.1">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="8.0.0-beta.23123.2">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>38d3196e1596eb525367ec8d65fcc1f30a58261c</Sha>
+      <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23118.1">
+    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23123.2">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>38d3196e1596eb525367ec8d65fcc1f30a58261c</Sha>
+      <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.23118.1">
+    <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="8.0.0-beta.23123.2">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>38d3196e1596eb525367ec8d65fcc1f30a58261c</Sha>
+      <Sha>39952f0f2dbd76699158d5f84fc3644602ad08c9</Sha>
     </Dependency>
     </Dependency>
   </ToolsetDependencies>
   </ToolsetDependencies>
 </Dependencies>
 </Dependencies>

+ 3 - 3
eng/Versions.props

@@ -135,9 +135,9 @@
     <MicrosoftEntityFrameworkCoreVersion>8.0.0-preview.3.23125.2</MicrosoftEntityFrameworkCoreVersion>
     <MicrosoftEntityFrameworkCoreVersion>8.0.0-preview.3.23125.2</MicrosoftEntityFrameworkCoreVersion>
     <MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-preview.3.23125.2</MicrosoftEntityFrameworkCoreDesignVersion>
     <MicrosoftEntityFrameworkCoreDesignVersion>8.0.0-preview.3.23125.2</MicrosoftEntityFrameworkCoreDesignVersion>
     <!-- Packages from dotnet/arcade -->
     <!-- Packages from dotnet/arcade -->
-    <MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.23118.1</MicrosoftDotNetBuildTasksInstallersVersion>
-    <MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23118.1</MicrosoftDotNetBuildTasksTemplatingVersion>
-    <MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23118.1</MicrosoftDotNetRemoteExecutorVersion>
+    <MicrosoftDotNetBuildTasksInstallersVersion>8.0.0-beta.23123.2</MicrosoftDotNetBuildTasksInstallersVersion>
+    <MicrosoftDotNetBuildTasksTemplatingVersion>8.0.0-beta.23123.2</MicrosoftDotNetBuildTasksTemplatingVersion>
+    <MicrosoftDotNetRemoteExecutorVersion>8.0.0-beta.23123.2</MicrosoftDotNetRemoteExecutorVersion>
     <!-- Packages from dotnet/source-build-externals -->
     <!-- Packages from dotnet/source-build-externals -->
     <MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23116.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
     <MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>8.0.0-alpha.1.23116.1</MicrosoftSourceBuildIntermediatesourcebuildexternalsVersion>
     <!-- Packages from dotnet/xdt -->
     <!-- Packages from dotnet/xdt -->

+ 122 - 34
eng/common/cross/build-rootfs.sh

@@ -6,10 +6,11 @@ usage()
 {
 {
     echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]"
     echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir <directory>]"
     echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86"
     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, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
-    echo "                              for FreeBSD can be: freebsd12, freebsd13"
-    echo "                              for illumos can be: illumos"
-    echo "                                for Haiku can be: haiku."
+    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 "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 "llvmx[.y] - optional, LLVM version for LLVM related packages."
     echo "--skipunmount - optional, will skip the unmount of rootfs folder."
     echo "--skipunmount - optional, will skip the unmount of rootfs folder."
@@ -145,35 +146,54 @@ while :; do
                 __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg"
                 __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg"
             fi
             fi
             ;;
             ;;
-        ppc64le)
-            __BuildArch=ppc64le
-            __UbuntuArch=ppc64el
-            __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
-            __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
-            __UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
-            __UbuntuPackages="${__UbuntuPackages// libomp5/}"
-            unset __LLDB_Package
-            ;;
         riscv64)
         riscv64)
             __BuildArch=riscv64
             __BuildArch=riscv64
+            __AlpineArch=riscv64
+            __AlpinePackages="${__AlpinePackages// lldb-dev/}"
+            __AlpinePackages="${__AlpinePackages// compiler-rt-static/}"
+            __QEMUArch=riscv64
             __UbuntuArch=riscv64
             __UbuntuArch=riscv64
             __UbuntuRepo="http://deb.debian.org/debian-ports"
             __UbuntuRepo="http://deb.debian.org/debian-ports"
-            __CodeName=sid
             __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
             __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
             unset __LLDB_Package
             unset __LLDB_Package
 
 
             if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then
             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"
                 __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring"
             fi
             fi
+
+            if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then
+                __AlpineVersion=edge # minimum version with APKINDEX.tar.gz (packages archive)
+            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
+
+            if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then
+                __AlpineVersion=3.15 # minimum version that supports compiler-rt
+            fi
             ;;
             ;;
         s390x)
         s390x)
             __BuildArch=s390x
             __BuildArch=s390x
+            __AlpineArch=s390x
+            __QEMUArch=s390x
             __UbuntuArch=s390x
             __UbuntuArch=s390x
             __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
             __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
             __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
             __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}"
             __UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
             __UbuntuPackages="${__UbuntuPackages// libomp-dev/}"
             __UbuntuPackages="${__UbuntuPackages// libomp5/}"
             __UbuntuPackages="${__UbuntuPackages// libomp5/}"
             unset __LLDB_Package
             unset __LLDB_Package
+
+            if [[ "$version" != "edge" && ( -z "$__AlpineVersion" || -z "$__AlpineMajorVersion" )]]; then
+                __AlpineVersion=3.15 # minimum version that supports compiler-rt
+            fi
             ;;
             ;;
         x64)
         x64)
             __BuildArch=x64
             __BuildArch=x64
@@ -240,34 +260,80 @@ while :; do
             ;;
             ;;
         jessie) # Debian 8
         jessie) # Debian 8
             __CodeName=jessie
             __CodeName=jessie
-            __UbuntuRepo="http://ftp.debian.org/debian/"
+
+            if [[ -z "$__UbuntuRepo" ]]; then
+                __UbuntuRepo="http://ftp.debian.org/debian/"
+            fi
             ;;
             ;;
         stretch) # Debian 9
         stretch) # Debian 9
             __CodeName=stretch
             __CodeName=stretch
-            __UbuntuRepo="http://ftp.debian.org/debian/"
             __LLDB_Package="liblldb-6.0-dev"
             __LLDB_Package="liblldb-6.0-dev"
+
+            if [[ -z "$__UbuntuRepo" ]]; then
+                __UbuntuRepo="http://ftp.debian.org/debian/"
+            fi
             ;;
             ;;
         buster) # Debian 10
         buster) # Debian 10
             __CodeName=buster
             __CodeName=buster
-            __UbuntuRepo="http://ftp.debian.org/debian/"
             __LLDB_Package="liblldb-6.0-dev"
             __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)
         tizen)
             __CodeName=
             __CodeName=
             __UbuntuRepo=
             __UbuntuRepo=
             __Tizen=tizen
             __Tizen=tizen
             ;;
             ;;
-        alpine|alpine3.13)
-            __CodeName=alpine
-            __UbuntuRepo=
-            __AlpineVersion=3.13
-            __AlpinePackages+=" llvm10-libs"
-            ;;
-        alpine3.14)
+        alpine*)
             __CodeName=alpine
             __CodeName=alpine
             __UbuntuRepo=
             __UbuntuRepo=
-            __AlpineVersion=3.14
-            __AlpinePackages+=" llvm11-libs"
+            version="${lowerI/alpine/}"
+
+            if [[ "$version" == "edge" ]]; then
+                __AlpineVersion=edge
+            else
+                parts=(${version//./ })
+                __AlpineMajorVersion="${parts[0]}"
+                __AlpineMinoVersion="${parts[1]}"
+
+                if [[ -z "$__AlpineVersion" ]]; then
+                    __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinoVersion"
+                fi
+            fi
+
+            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 compiler-rt
+                        __AlpinePackages+=" llvm12-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
+                    fi
+            esac
             ;;
             ;;
         freebsd12)
         freebsd12)
             __CodeName=freebsd
             __CodeName=freebsd
@@ -341,18 +407,40 @@ mkdir -p "$__RootfsDir"
 __RootfsDir="$( cd "$__RootfsDir" && pwd )"
 __RootfsDir="$( cd "$__RootfsDir" && pwd )"
 
 
 if [[ "$__CodeName" == "alpine" ]]; then
 if [[ "$__CodeName" == "alpine" ]]; then
-    __ApkToolsVersion=2.9.1
+    __ApkToolsVersion=2.12.11
     __ApkToolsDir="$(mktemp -d)"
     __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"
+
+    wget "https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//v$__ApkToolsVersion/x86_64/apk.static" -P "$__ApkToolsDir"
+    chmod +x "$__ApkToolsDir/apk.static"
+
     mkdir -p "$__RootfsDir"/usr/bin
     mkdir -p "$__RootfsDir"/usr/bin
     cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin"
     cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin"
 
 
-    "$__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
+    if [[ "$__AlpineVersion" == "edge" ]]; then
+        version=edge
+    else
+        version="v$__AlpineVersion"
+    fi
+
+    "$__ApkToolsDir/apk.static" \
+        -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
+        -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
+        -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" --initdb \
+        add $__AlpinePackages
+
+    if [[ "$__AlpineLlvmLibsLookup" == 1 ]]; then
+        "$__ApkToolsDir/apk.static" \
+            -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
+            -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
+            -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" \
+            search 'llvm*-libs' | sort | tail -1 | while IFS=- read name rest; do
+                "$__ApkToolsDir/apk.static" \
+                    -X "http://dl-cdn.alpinelinux.org/alpine/$version/main" \
+                    -X "http://dl-cdn.alpinelinux.org/alpine/$version/community" \
+                    -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" \
+                    add "$name-libs"
+            done
+    fi
 
 
     rm -r "$__ApkToolsDir"
     rm -r "$__ApkToolsDir"
 elif [[ "$__CodeName" == "freebsd" ]]; then
 elif [[ "$__CodeName" == "freebsd" ]]; then

+ 1 - 1
eng/common/templates/job/job.yml

@@ -101,7 +101,7 @@ jobs:
     # handle key-value variable syntax.
     # handle key-value variable syntax.
     # example:
     # example:
     # - [key]: [value]
     # - [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 }}:
       - ${{ each pair in variable }}:
         - name: ${{ pair.key }}
         - name: ${{ pair.key }}
           value: ${{ pair.value }}
           value: ${{ pair.value }}

+ 2 - 2
global.json

@@ -27,7 +27,7 @@
   },
   },
   "msbuild-sdks": {
   "msbuild-sdks": {
     "Yarn.MSBuild": "1.22.10",
     "Yarn.MSBuild": "1.22.10",
-    "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23118.1",
-    "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23118.1"
+    "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23123.2",
+    "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23123.2"
   }
   }
 }
 }