@@ -138,29 +138,6 @@ if [ ! -e "$__DOTNET_PATH" ]; then
138
138
__DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION} -$__PKG_RID -$__PKG_ARCH
139
139
__DOTNET3_PKG=dotnet-sdk-${__DOTNET3_TOOLS_VERSION} -$__PKG_RID -$__PKG_ARCH
140
140
fi
141
- mkdir -p " $__DOTNET_PATH "
142
-
143
- echo " Installing dotnet cli..."
144
- __DOTNET_LOCATION=" https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION} /${__DOTNET_PKG} .tar.gz"
145
-
146
- install_dotnet_cli () {
147
- if [[ -z " ${DotNetBootstrapCliTarPath-} " ]]; then
148
- echo " Installing '${__DOTNET_LOCATION} ' to '$__DOTNET_PATH /dotnet.tar'"
149
- rm -rf -- " $__DOTNET_PATH /*"
150
- # curl has HTTPS CA trust-issues less often than wget, so lets try that first.
151
- if command -v curl > /dev/null; then
152
- curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
153
- else
154
- wget -q -O $__DOTNET_PATH /dotnet.tar ${__DOTNET_LOCATION}
155
- fi
156
- else
157
- echo " Copying '$DotNetBootstrapCliTarPath ' to '$__DOTNET_PATH /dotnet.tar'"
158
- cp $DotNetBootstrapCliTarPath $__DOTNET_PATH /dotnet.tar
159
- fi
160
- cd " $__DOTNET_PATH "
161
- tar -xf " $__DOTNET_PATH /dotnet.tar"
162
- }
163
- execute_with_retry install_dotnet_cli >> " $__init_tools_log " 2>&1
164
141
165
142
mkdir -p " $__DOTNET3_PATH "
166
143
@@ -186,6 +163,13 @@ if [ ! -e "$__DOTNET_PATH" ]; then
186
163
}
187
164
execute_with_retry install_dotnet3_cli >> " $__init_tools_log " 2>&1
188
165
166
+ echo " Using dotnet 3.0 cli as dotnet cli..."
167
+ # Use dotnet3 sdk
168
+ ln -s " $__DOTNET3_PATH " " $__DOTNET_PATH "
169
+ # Roll forward 2.x to 3.x
170
+ __DOTNET_RUNTIME_VERSION=$( basename $( ls -d $__DOTNET_PATH /shared/Microsoft.NETCore.App/3.* ) )
171
+ ln -s " $__DOTNET_PATH /shared/Microsoft.NETCore.App/$__DOTNET_RUNTIME_VERSION " " $__DOTNET_PATH /shared/Microsoft.NETCore.App/2.2.0"
172
+
189
173
cd " $__scriptpath "
190
174
fi
191
175
@@ -214,6 +198,9 @@ if [ -n "${DotNetBootstrapCliTarPath-}" ]; then
214
198
fi
215
199
216
200
echo " Initializing BuildTools..."
201
+ echo " Updating crossgen location"
202
+ # note: this codegen is broken ('Jit Compiler has wrong version identifier'), but so far that doesn't stop the build.
203
+ sed -i ' s@__crossgen=$__packagesDir/.*/crossgen@__crossgen=$__packagesDir/runtime.$__packageRid.microsoft.netcore.runtime.coreclr/3.0.0*/tools/crossgen@g' " $__PACKAGES_DIR /microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION /lib/crossgen.sh"
217
204
echo " Running: $__BUILD_TOOLS_PATH /init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR " >> " $__init_tools_log "
218
205
219
206
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424
@@ -239,6 +226,16 @@ BUILDTOOLS_CROSSGEN_FEED=https://api.nuget.org/v3/index.json "$__scriptpath/Tool
239
226
# CoreCLR expects this and has no way to pass in the dotnetcli directory
240
227
ln -s $__DOTNET_PATH $__TOOLRUNTIME_DIR /.dotnet
241
228
229
+ echo " Adding libgit2sharp arm64 support"
230
+ # Take debian-arm64 (OpenSSL 1.1 compatible) .so file from NuGet.org package and put in in the runtime folder (where no-one will remove it).
231
+ __LIBGIT2SHARP_BINARIES_SOURCE_BUILD_SO_FILENAME=libgit2-572e4d8.so
232
+ __LIBGIT2SHARP_BINARIES_NUGET_VERSION=2.0.289
233
+ __LIBGIT2SHARP_BINARIES_URL=https://www.nuget.org/api/v2/package/LibGit2Sharp.NativeBinaries/$__LIBGIT2SHARP_BINARIES_NUGET_VERSION
234
+ curl --retry 10 -sSL --create-dirs -o $__PACKAGES_DIR /libgit2sharp.nativebinaries.$__LIBGIT2SHARP_BINARIES_NUGET_VERSION .zip ${__LIBGIT2SHARP_BINARIES_URL}
235
+ mkdir -p $__PACKAGES_DIR /libgit2sharp.nativebinaries/$__LIBGIT2SHARP_BINARIES_NUGET_VERSION
236
+ unzip $__PACKAGES_DIR /libgit2sharp.nativebinaries.$__LIBGIT2SHARP_BINARIES_NUGET_VERSION .zip -d $__PACKAGES_DIR /libgit2sharp.nativebinaries/$__LIBGIT2SHARP_BINARIES_NUGET_VERSION
237
+ cp $__PACKAGES_DIR /libgit2sharp.nativebinaries/$__LIBGIT2SHARP_BINARIES_NUGET_VERSION /runtimes/debian-arm64/native/* .so $__DOTNET_PATH /shared/Microsoft.NETCore.App/$__DOTNET_RUNTIME_VERSION /$__LIBGIT2SHARP_BINARIES_SOURCE_BUILD_SO_FILENAME
238
+
242
239
mkdir -p " $( dirname " $__BUILD_TOOLS_SEMAPHORE " ) " && touch " $__BUILD_TOOLS_SEMAPHORE "
243
240
mkdir -p " $( dirname " $__BUILD_TOOLS_ARCADE_SEMAPHORE " ) " && touch " $__BUILD_TOOLS_ARCADE_SEMAPHORE "
244
241
0 commit comments