Update to .NET 7 RC 1
Enable s390x builds Resolves: RHBZ#2123884
This commit is contained in:
parent
0851ccffd3
commit
a3e3de73c6
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
/dotnet-arm64-prebuilts-2022-08-17.tar.gz
|
/dotnet-arm64-prebuilts-2022-08-17.tar.gz
|
||||||
/dotnet-fd587269d0a1fa669d547f3a2e74f5d9353b6dcf-x64-bootstrap.tar.xz
|
/dotnet-fd587269d0a1fa669d547f3a2e74f5d9353b6dcf-x64-bootstrap.tar.xz
|
||||||
/dotnet-s390x-prebuilts-2021-10-29.tar.gz
|
/dotnet-s390x-prebuilts-2021-10-29.tar.gz
|
||||||
|
/dotnet-v7.0.100-rc.1.22431.12-x64-bootstrap.tar.xz
|
||||||
|
/dotnet-arm64-prebuilts-2022-09-17.tar.gz
|
||||||
|
/dotnet-s390x-prebuilts-2022-08-24.tar.gz
|
||||||
|
@ -17,7 +17,7 @@ function parse-nuget-name-version-from-file() {
|
|||||||
|
|
||||||
bootstrap_dir=$(readlink -f "$1")
|
bootstrap_dir=$(readlink -f "$1")
|
||||||
|
|
||||||
version=$(jq -r '.tools.dotnet' "$bootstrap_dir"/global.json)
|
version=${2:-$(jq -r '.tools.dotnet' "$bootstrap_dir"/global.json)}
|
||||||
|
|
||||||
date=$(date +%F)
|
date=$(date +%F)
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ mkdir -p "dotnet-arm64-prebuilts-$date"
|
|||||||
pushd "dotnet-arm64-prebuilts-$date"
|
pushd "dotnet-arm64-prebuilts-$date"
|
||||||
|
|
||||||
# Binaries can be at one of several different URLs:
|
# Binaries can be at one of several different URLs:
|
||||||
# wget https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-linux-arm64.tar.gz
|
wget https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-linux-arm64.tar.gz
|
||||||
wget https://dotnetbuilds.azureedge.net/public/Sdk/$version/dotnet-sdk-$version-linux-arm64.tar.gz
|
#wget https://dotnetbuilds.azureedge.net/public/Sdk/$version/dotnet-sdk-$version-linux-arm64.tar.gz
|
||||||
|
|
||||||
for archive in "$bootstrap_dir"/packages/archive/*.tar.gz; do
|
for archive in "$bootstrap_dir"/packages/archive/*.tar.gz; do
|
||||||
mapfile -t linux_x64_packages < <(tar tf "$archive" | grep linux-x64)
|
mapfile -t linux_x64_packages < <(tar tf "$archive" | grep linux-x64)
|
||||||
@ -47,6 +47,22 @@ for archive in "$bootstrap_dir"/packages/archive/*.tar.gz; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# For arm64, we have forced a newer 7.0 SDK, which needs newer bits
|
||||||
|
nappo download microsoft.windowsdesktop.app.ref 6.0.9
|
||||||
|
nappo download microsoft.netcore.app.host.linux-arm64 6.0.9
|
||||||
|
nappo download microsoft.netcore.app.ref 6.0.9
|
||||||
|
nappo download microsoft.aspnetcore.app.ref 6.0.9
|
||||||
|
|
||||||
|
nappo download Microsoft.AspNetCore.App.Runtime.linux-arm64 7.0.0-rc.1.22427.2
|
||||||
|
nappo download Microsoft.NETCore.App.Host.linux-arm64 7.0.0-rc.1.22426.10
|
||||||
|
nappo download Microsoft.NETCore.App.Runtime.linux-arm64 7.0.0-rc.1.22426.10
|
||||||
|
nappo download runtime.linux-arm64.Microsoft.NETCore.DotNetHost 7.0.0-rc.1.22426.10
|
||||||
|
nappo download runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy 7.0.0-rc.1.22426.10
|
||||||
|
nappo download runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver 7.0.0-rc.1.22426.10
|
||||||
|
nappo download runtime.linux-arm64.Microsoft.NETCore.ILAsm 7.0.0-rc.1.22426.10
|
||||||
|
nappo download runtime.linux-arm64.Microsoft.NETCore.ILDAsm 7.0.0-rc.1.22426.10
|
||||||
|
nappo download Microsoft.NETCore.App.Crossgen2.linux-arm64 7.0.0-rc.1.22426.10
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
tar czf "dotnet-arm64-prebuilts-$date.tar.gz" "dotnet-arm64-prebuilts-$date"
|
tar czf "dotnet-arm64-prebuilts-$date.tar.gz" "dotnet-arm64-prebuilts-$date"
|
||||||
|
@ -181,8 +181,11 @@ rm -r src/nuget-client/test/EndToEnd
|
|||||||
# https://github.com/Humanizr/sample-aspnetmvc/issues/1
|
# https://github.com/Humanizr/sample-aspnetmvc/issues/1
|
||||||
rm -r src/source-build-externals/src/humanizer/samples/
|
rm -r src/source-build-externals/src/humanizer/samples/
|
||||||
|
|
||||||
# https://github.com/dotnet/roslyn/issues/63257
|
# https://github.com/dotnet/source-build/issues/3018
|
||||||
rm -r src/roslyn/scripts/GenerateSdkPackages
|
rm -r src/source-build-externals/src/application-insights/WEB/Test/Web/FunctionalTests/TestApps
|
||||||
|
|
||||||
|
# https://github.com/microsoft/ApplicationInsights-dotnet/issues/2670
|
||||||
|
rm -r src/source-build-externals/src/application-insights/LOGGING/test/Shared/CustomTelemetryChannel.cs
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
# until that's done, disable LTO. This has to happen before setting the flags below.
|
# until that's done, disable LTO. This has to happen before setting the flags below.
|
||||||
%define _lto_cflags %{nil}
|
%define _lto_cflags %{nil}
|
||||||
|
|
||||||
%global host_version 7.0.0-rc.1.22411.12
|
%global host_version 7.0.0-rc.1.22426.10
|
||||||
%global runtime_version 7.0.0-rc.1.22411.12
|
%global runtime_version 7.0.0-rc.1.22426.10
|
||||||
%global aspnetcore_runtime_version 7.0.0-rc.1.22412.2
|
%global aspnetcore_runtime_version 7.0.0-rc.1.22427.2
|
||||||
%global sdk_version 7.0.100-rc.1.22413.1
|
%global sdk_version 7.0.100-rc.1.22464.1
|
||||||
%global sdk_feature_band_version %(echo %{sdk_version} | cut -d '-' -f 1 | sed -e 's|[[:digit:]][[:digit:]]$|00|')
|
%global sdk_feature_band_version %(echo %{sdk_version} | cut -d '-' -f 1 | sed -e 's|[[:digit:]][[:digit:]]$|00|')
|
||||||
%global templates_version 7.0.0-rc.1.22412.2
|
%global templates_version 7.0.0-rc.1.22427.2
|
||||||
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
|
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
|
||||||
|
|
||||||
%global host_rpm_version 7.0.0
|
%global host_rpm_version 7.0.0
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# upstream can update releases without revving the SDK version so these don't always match
|
# upstream can update releases without revving the SDK version so these don't always match
|
||||||
#%%global upstream_tag v%%{sdk_version}
|
#%%global upstream_tag v%%{sdk_version}
|
||||||
%global upstream_tag fd587269d0a1fa669d547f3a2e74f5d9353b6dcf
|
%global upstream_tag v7.0.100-rc.1.22431.12
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} < 8
|
%if 0%{?fedora} || 0%{?rhel} < 8
|
||||||
%global use_bundled_libunwind 0
|
%global use_bundled_libunwind 0
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
Name: dotnet7.0
|
Name: dotnet7.0
|
||||||
Version: %{sdk_rpm_version}
|
Version: %{sdk_rpm_version}
|
||||||
Release: 0.1%{?dist}
|
Release: 0.2.rc1%{?dist}
|
||||||
Summary: .NET Runtime and SDK
|
Summary: .NET Runtime and SDK
|
||||||
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
|
License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
|
||||||
URL: https://github.com/dotnet/
|
URL: https://github.com/dotnet/
|
||||||
@ -57,9 +57,9 @@ URL: https://github.com/dotnet/
|
|||||||
# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
|
# ./build-dotnet-tarball --bootstrap %%{upstream_tag}
|
||||||
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.xz
|
Source0: dotnet-%{upstream_tag}-x64-bootstrap.tar.xz
|
||||||
# Generated via ./build-arm64-bootstrap-tarball
|
# Generated via ./build-arm64-bootstrap-tarball
|
||||||
Source1: dotnet-arm64-prebuilts-2022-08-17.tar.gz
|
Source1: dotnet-arm64-prebuilts-2022-09-17.tar.gz
|
||||||
# Generated manually, same pattern as the arm64 tarball
|
# Generated manually, same pattern as the arm64 tarball
|
||||||
Source2: dotnet-s390x-prebuilts-2021-10-29.tar.gz
|
Source2: dotnet-s390x-prebuilts-2022-08-24.tar.gz
|
||||||
%else
|
%else
|
||||||
# The source is generated on a Fedora box via:
|
# The source is generated on a Fedora box via:
|
||||||
# ./build-dotnet-tarball %%{upstream_tag}
|
# ./build-dotnet-tarball %%{upstream_tag}
|
||||||
@ -69,11 +69,13 @@ Source0: dotnet-%{upstream_tag}.tar.gz
|
|||||||
Source10: check-debug-symbols.py
|
Source10: check-debug-symbols.py
|
||||||
Source11: dotnet.sh.in
|
Source11: dotnet.sh.in
|
||||||
|
|
||||||
|
Patch1: razor-compiler-apphost.patch
|
||||||
|
# https://github.com/dotnet/runtime/pull/74147
|
||||||
|
Patch2: runtime-74147-no-pgo-with-mono.patch
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
# FIXME
|
ExclusiveArch: aarch64 x86_64 s390x
|
||||||
# ExclusiveArch: aarch64 x86_64 s390x
|
|
||||||
ExclusiveArch: aarch64 x86_64
|
|
||||||
%else
|
%else
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
%endif
|
%endif
|
||||||
@ -364,6 +366,9 @@ rm -rf .dotnet/
|
|||||||
rm -rf packages/source-built
|
rm -rf packages/source-built
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
# Fix bad hardcoded path in build
|
# Fix bad hardcoded path in build
|
||||||
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/hostmisc/pal.unix.cpp
|
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/hostmisc/pal.unix.cpp
|
||||||
|
|
||||||
@ -576,8 +581,8 @@ export COMPlus_LTTng=0
|
|||||||
%dir %{_libdir}/dotnet/sdk
|
%dir %{_libdir}/dotnet/sdk
|
||||||
%{_libdir}/dotnet/sdk/%{sdk_version}
|
%{_libdir}/dotnet/sdk/%{sdk_version}
|
||||||
%dir %{_libdir}/dotnet/sdk-manifests
|
%dir %{_libdir}/dotnet/sdk-manifests
|
||||||
%{_libdir}/dotnet/sdk-manifests/6.0.300
|
|
||||||
%{_libdir}/dotnet/sdk-manifests/%{sdk_feature_band_version}
|
%{_libdir}/dotnet/sdk-manifests/%{sdk_feature_band_version}
|
||||||
|
%{_libdir}/dotnet/sdk-manifests/%{sdk_feature_band_version}-rc.1
|
||||||
%{_libdir}/dotnet/metadata
|
%{_libdir}/dotnet/metadata
|
||||||
%dir %{_libdir}/dotnet/packs
|
%dir %{_libdir}/dotnet/packs
|
||||||
|
|
||||||
@ -587,7 +592,12 @@ export COMPlus_LTTng=0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Aug 25 2022 Omair Majid <omajid@redhat.com> - 7.0.100
|
* Sat Sep 17 2022 Omair Majid <omajid@redhat.com> - 7.0.100-0.2.rc1
|
||||||
|
- Update to .NET 7 RC 1
|
||||||
|
- Enable s390x builds
|
||||||
|
- Resolves: RHBZ#2123884
|
||||||
|
|
||||||
|
* Thu Aug 25 2022 Omair Majid <omajid@redhat.com> - 7.0.100-0.1
|
||||||
- Initial .NET 7 package
|
- Initial .NET 7 package
|
||||||
- Resolves: RHBZ#2112027
|
- Resolves: RHBZ#2112027
|
||||||
|
|
||||||
|
26
razor-compiler-apphost.patch
Normal file
26
razor-compiler-apphost.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Don't use an apphost for RazorSyntaxGenerator
|
||||||
|
|
||||||
|
The RazorSyntaxGenerator tool is excluded from source-build, but the build
|
||||||
|
system tries to find the apphost matching the TFM anyway. This project targets
|
||||||
|
netcoreapp3.1, so the build fails on s390x because the no apphost exists for
|
||||||
|
that on s390x.
|
||||||
|
--- a/src/razor-compiler/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj
|
||||||
|
+++ a/src/razor-compiler/src/tools/RazorSyntaxGenerator/RazorSyntaxGenerator.csproj
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
<!-- No need to track public APIs of this tool. -->
|
||||||
|
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
|
||||||
|
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||||
|
+ <UseAppHost>false</UseAppHost>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
--- a/src/razor-compiler/src/perf/Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj
|
||||||
|
+++ a/src/razor-compiler/src/perf/Microbenchmarks/Microsoft.AspNetCore.Razor.Microbenchmarks.csproj
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
+ <UseAppHost>false</UseAppHost>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./rename-tarball original-name.tar.gz new-name.tar.gz
|
# ./rename-tarball original-name.tar.gz new-name.tar.gz
|
||||||
|
#
|
||||||
|
# The generated new-name.tar.gz will always have a single main
|
||||||
|
# directory (named new-name to match the tarball name) in the archive.
|
||||||
|
# If the original tarball had multiple files in the main directory of
|
||||||
|
# the archive, all those files will be moved to under the new main
|
||||||
|
# directory.
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
@ -42,10 +48,19 @@ echo "Original: ${original_name}.tar.gz"
|
|||||||
echo "New name: ${new_name}.tar.gz"
|
echo "New name: ${new_name}.tar.gz"
|
||||||
|
|
||||||
mkdir "temp-${new_name}"
|
mkdir "temp-${new_name}"
|
||||||
pushd "temp-${new_name}"
|
pushd "temp-${new_name}" > /dev/null
|
||||||
tar xf "${original_path}"
|
tar xf "${original_path}"
|
||||||
mv -- * "${new_name}"
|
# `find` always shows the current directory as one of the entries in
|
||||||
tar czf ../"${new_name}.tar.gz" "${new_name}"
|
# the output. A total of 2 entries means there is only one main
|
||||||
|
# directory in the extracted archive, and we can just move it to the
|
||||||
|
# expected location.
|
||||||
|
if [[ $(find . -maxdepth 1 | wc -l) == 2 ]]; then
|
||||||
|
mv -- ./* ../"${new_name}"
|
||||||
|
else
|
||||||
|
mkdir -p ../"${new_name}"
|
||||||
|
mv -- ./* ../"${new_name}"
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
tar czf "${new_name}.tar.gz" "${new_name}"
|
||||||
rm -rf "${new_name}"
|
rm -rf "${new_name}"
|
||||||
popd
|
|
||||||
rmdir "temp-${new_name}"
|
rmdir "temp-${new_name}"
|
||||||
|
27
runtime-74147-no-pgo-with-mono.patch
Normal file
27
runtime-74147-no-pgo-with-mono.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 98c1b3a803cb01232ee40bb4192679fcab3232e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jo Shields <directhex@apebox.org>
|
||||||
|
Date: Thu, 18 Aug 2022 09:08:36 -0400
|
||||||
|
Subject: [PATCH] Don't try to build PGO tools on platforms with no CoreCLR
|
||||||
|
port.
|
||||||
|
|
||||||
|
Closes: #74102
|
||||||
|
---
|
||||||
|
eng/Subsets.props | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/runtime/eng/Subsets.props b/src/runtime/eng/Subsets.props
|
||||||
|
index 911c24dbde6..1e8e5801e57 100644
|
||||||
|
--- a/src/runtime/eng/Subsets.props
|
||||||
|
+++ b/src/runtime/eng/Subsets.props
|
||||||
|
@@ -62,7 +62,8 @@
|
||||||
|
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
|
||||||
|
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
|
||||||
|
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
|
||||||
|
- <DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+mono.tools+</DefaultMonoSubsets>
|
||||||
|
+ <DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+</DefaultMonoSubsets>
|
||||||
|
+ <DefaultMonoSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'Mono'">$(DefaultMonoSubsets)mono.tools+</DefaultMonoSubsets>
|
||||||
|
<DefaultMonoSubsets Condition="'$(TargetsMobile)' != 'true'">$(DefaultMonoSubsets)host.native+</DefaultMonoSubsets>
|
||||||
|
|
||||||
|
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
|
||||||
|
--
|
||||||
|
2.37.2
|
6
sources
6
sources
@ -1,3 +1,3 @@
|
|||||||
SHA512 (dotnet-arm64-prebuilts-2022-08-17.tar.gz) = 6f8d7ba9cb94fdf3f87ec916bdc1b49f2828014584cc924dbf16e9eeab6d61d49df6977cc15b22c65862c1a5772e42312514e5a2f3f7ea1562cc8747ff7800a8
|
SHA512 (dotnet-v7.0.100-rc.1.22431.12-x64-bootstrap.tar.xz) = 5614a934759254899fdebada43aa01c6873fd8f44878cd0c8620253f40595ddc60da510e7f13e22374d4f54a25eb0139bc7844d63307a8e8516fff32cb8de6c2
|
||||||
SHA512 (dotnet-fd587269d0a1fa669d547f3a2e74f5d9353b6dcf-x64-bootstrap.tar.xz) = 04853c2b21e48b8fb43d7c9e1fce622582177c798b658f8e0b1b9c7c46e5fa86d122c7ef0fe4232f3fee523840f48bbdba1b5857d2e7bae069aad1819a57cc46
|
SHA512 (dotnet-arm64-prebuilts-2022-09-17.tar.gz) = 2cb96760450428f952259ed40fb4cee080e4ce7f0c6ce38c3d653a943b43106e598c8ea7c46fd8d269b34f955e1d452757dbc2ebe4b28e38572960ac346c89aa
|
||||||
SHA512 (dotnet-s390x-prebuilts-2021-10-29.tar.gz) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
|
SHA512 (dotnet-s390x-prebuilts-2022-08-24.tar.gz) = b0312750701fdcf450e32c71155abbbb77d74d6709335e9b043b0acd3284c4d15e23ec74aa751f920966ed2d6f9e1144611e18b6a23c6a3cb5413766ca0d1a5f
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]
|
# ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name] [--larger-rpm-release]
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo " Usage:"
|
echo " Usage:"
|
||||||
echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name]"
|
echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name] [--larger-rpm-release]"
|
||||||
}
|
}
|
||||||
|
|
||||||
user_provided_tarball_name=""
|
user_provided_tarball_name=""
|
||||||
|
|
||||||
|
rpm_release=1
|
||||||
positional_args=()
|
positional_args=()
|
||||||
bug_ids=()
|
bug_ids=()
|
||||||
while [[ "$#" -gt 0 ]]; do
|
while [[ "$#" -gt 0 ]]; do
|
||||||
@ -32,6 +33,10 @@ while [[ "$#" -gt 0 ]]; do
|
|||||||
shift;
|
shift;
|
||||||
shift;
|
shift;
|
||||||
;;
|
;;
|
||||||
|
--larger-rpm-release)
|
||||||
|
rpm_release="2"
|
||||||
|
shift;
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
positional_args+=("$1")
|
positional_args+=("$1")
|
||||||
shift
|
shift
|
||||||
@ -56,13 +61,19 @@ fi
|
|||||||
|
|
||||||
host_version="$runtime_version"
|
host_version="$runtime_version"
|
||||||
|
|
||||||
tag=v${sdk_version}
|
if [[ "$runtime_version" == "3.1"* ]]; then
|
||||||
|
tag=v${sdk_version}-SDK
|
||||||
|
else
|
||||||
|
tag=v${sdk_version}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then
|
if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then
|
||||||
echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball"
|
echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball"
|
||||||
else
|
else
|
||||||
if [[ -n "${user_provided_tarball_name}" ]]; then
|
if [[ -n "${user_provided_tarball_name}" ]]; then
|
||||||
./rename-tarball "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz"
|
./rename-tarball "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz"
|
||||||
|
elif [[ -f "dotnet-${sdk_version}-SDK.tar.gz" ]]; then
|
||||||
|
./rename-tarball "dotnet-${sdk_version}-SDK.tar.gz" "dotnet-${tag}-original.tar.gz"
|
||||||
elif [[ -f "dotnet-${sdk_version}.tar.gz" ]]; then
|
elif [[ -f "dotnet-${sdk_version}.tar.gz" ]]; then
|
||||||
./rename-tarball "dotnet-${sdk_version}.tar.gz" "dotnet-${tag}-original.tar.gz"
|
./rename-tarball "dotnet-${sdk_version}.tar.gz" "dotnet-${tag}-original.tar.gz"
|
||||||
elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then
|
elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then
|
||||||
@ -94,10 +105,8 @@ echo "$commit_message" > git-commit-message
|
|||||||
|
|
||||||
rpmdev-bumpspec --comment="$comment" "$spec_file"
|
rpmdev-bumpspec --comment="$comment" "$spec_file"
|
||||||
|
|
||||||
# Reset release to 1 in 'Release' tag
|
# Reset release in 'Release' tag
|
||||||
sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' "$spec_file"
|
sed -i -E 's|^Release: [[:digit:]]+%|Release: '"$rpm_release"'%|' "$spec_file"
|
||||||
# Reset Release in changelog comment
|
# Reset Release in changelog comment
|
||||||
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line
|
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line
|
||||||
sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' "$spec_file"
|
sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-'"$rpm_release"'/' "$spec_file"
|
||||||
|
|
||||||
echo "To commit, use: git commit -a -l git-commit-message"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user