Compare commits

...

15 Commits
c10 ... c10s

Author SHA1 Message Date
Satish Mane
28256feff8 Update to .NET SDK 9.0.119 and Runtime 9.0.18
Resolves: RHEL-192471
2026-07-23 17:05:54 +05:30
Tom Deseyn
15fd5c9268 Reduce time to detect hanging builds by using standard output-based detection.
Resolves: RHEL-191642
2026-07-02 20:28:24 +02:00
Tom Deseyn
eee3fd8a0a Update to .NET SDK 9.0.118 and Runtime 9.0.17
Resolves: RHEL-181552
2026-06-10 14:14:33 +02:00
Omair Majid
f1abad5973 Update to .NET SDK 9.0.117 and Runtime 9.0.16
Resolves: RHEL-173917
2026-06-02 12:27:25 -04:00
Omair Majid
f70a5ff70b Update to .NET SDK 9.0.116 and Runtime 9.0.15
Resolves: RHEL-163400
2026-04-17 12:33:06 -04:00
Dominik Rehák
ca842089d1 Update to .NET SDK 9.0.115 and Runtime 9.0.14
Resolves: RHEL-152947
2026-03-26 15:23:38 +01:00
Omair Majid
20aedce3ac Update to .NET SDK 9.0.114 and Runtime 9.0.13
Resolves: RHEL-144971
2026-02-11 09:26:15 -05:00
Omair Majid
7d9492eb68 Update to .NET SDK 9.0.113 and Runtime 9.0.12
Resolves: RHEL-138646
2026-01-14 22:20:46 -05:00
Omair Majid
43ef3042e8 Update to .NET SDK 9.0.112 and Runtime 9.0.11
Resolves: RHEL-125744
2025-11-12 13:44:23 -05:00
Omair Majid
9619cdd5bb Update to .NET SDK 9.0.111 and Runtime 9.0.10
Resolves: RHEL-116861
2025-10-15 12:37:13 -04:00
Omair Majid
349c50eeb6 Update to .NET SDK 9.0.110 and Runtime 9.0.9
Resolves: RHEL-112268
2025-09-10 09:26:33 -04:00
Omair Majid
f27f81233c Update to .NET SDK 9.0.109 and Runtime 9.0.8
Resolves: RHEL-106727
2025-08-11 18:16:36 -04:00
Omair Majid
9427ca06ce Update to .NET SDK 9.0.108 and Runtime 9.0.7
Resolves: RHEL-100597
2025-07-08 18:12:39 -04:00
Omair Majid
d1315de9d8 Update to .NET SDK 9.0.107 and Runtime 9.0.6
Resolves: RHEL-94423
2025-06-11 23:26:31 -04:00
Omair Majid
b6fef3b3f4 Update to .NET SDK 9.0.106 and Runtime 9.0.5
Resolves: RHEL-89452
2025-05-13 20:39:38 -04:00
8 changed files with 201 additions and 182 deletions

28
.gitignore vendored
View File

@ -24,3 +24,31 @@
/dotnet-9.0.3.tar.gz.sig /dotnet-9.0.3.tar.gz.sig
/dotnet-9.0.4.tar.gz /dotnet-9.0.4.tar.gz
/dotnet-9.0.4.tar.gz.sig /dotnet-9.0.4.tar.gz.sig
/dotnet-9.0.5.tar.gz
/dotnet-9.0.5.tar.gz.sig
/dotnet-9.0.6.tar.gz
/dotnet-9.0.6.tar.gz.sig
/dotnet-9.0.7.tar.gz
/dotnet-9.0.7.tar.gz.sig
/dotnet-9.0.109.tar.gz
/dotnet-9.0.109.tar.gz.sig
/dotnet-9.0.110.tar.gz
/dotnet-9.0.110.tar.gz.sig
/dotnet-9.0.111.tar.gz
/dotnet-9.0.111.tar.gz.sig
/dotnet-9.0.112.tar.gz
/dotnet-9.0.112.tar.gz.sig
/dotnet-9.0.113.tar.gz
/dotnet-9.0.113.tar.gz.sig
/dotnet-9.0.114.tar.gz
/dotnet-9.0.114.tar.gz.sig
/dotnet-9.0.115.tar.gz
/dotnet-9.0.115.tar.gz.sig
/dotnet-9.0.116.tar.gz
/dotnet-9.0.116.tar.gz.sig
/dotnet-9.0.117.tar.gz
/dotnet-9.0.117.tar.gz.sig
/dotnet-9.0.118.tar.gz
/dotnet-9.0.118.tar.gz.sig
/dotnet-9.0.119.tar.gz
/dotnet-9.0.119.tar.gz.sig

View File

@ -8,15 +8,19 @@
%global dotnetver 9.0 %global dotnetver 9.0
# Only the package for the latest dotnet version should provide RPMs like
# dotnet-host
%global is_latest_dotnet 0
# upstream can produce releases with a different tag than the SDK version # upstream can produce releases with a different tag than the SDK version
#%%global upstream_tag v%%{runtime_version} #%%global upstream_tag v%%{runtime_version}
%global upstream_tag v9.0.4 %global upstream_tag v9.0.119
%global upstream_tag_without_v %(echo %{upstream_tag} | sed -e 's|^v||') %global upstream_tag_without_v %(echo %{upstream_tag} | sed -e 's|^v||')
%global hostfxr_version %{runtime_version} %global hostfxr_version %{runtime_version}
%global runtime_version 9.0.4 %global runtime_version 9.0.18
%global aspnetcore_runtime_version 9.0.4 %global aspnetcore_runtime_version 9.0.18
%global sdk_version 9.0.105 %global sdk_version 9.0.119
%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 %{aspnetcore_runtime_version} %global templates_version %{aspnetcore_runtime_version}
#%%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 }')
@ -162,6 +166,7 @@ BuildRequires: llvm-libunwind-devel
BuildRequires: lttng-ust-devel BuildRequires: lttng-ust-devel
BuildRequires: make BuildRequires: make
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: procps-ng
BuildRequires: python3 BuildRequires: python3
%if ! %{use_bundled_rapidjson} %if ! %{use_bundled_rapidjson}
BuildRequires: rapidjson-devel BuildRequires: rapidjson-devel
@ -571,6 +576,8 @@ lscpu
%build %build
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/os-release cat /etc/os-release
%if %{without bootstrap} %if %{without bootstrap}
@ -665,6 +672,8 @@ function retry_until_success {
set +e set +e
while [[ $exit_code != 0 ]] && [[ $tries != 0 ]]; do while [[ $exit_code != 0 ]] && [[ $tries != 0 ]]; do
(( tries = tries - 1 )) (( tries = tries - 1 ))
# Clean stale build state so retries start fresh.
rm -rf .packages $(find . -name artifacts -type d)
"$@" "$@"
exit_code=$? exit_code=$?
done done
@ -672,6 +681,66 @@ function retry_until_success {
return $exit_code return $exit_code
} }
# Runs a command and kills it if it produces no output.
# Use a longer timeout on machines with fewer cores since builds are slower.
function output_timeout {
# 30m on machines with more than 4 cores, 60m on smaller machines where builds are slower.
# The aarch64 Neoverse N1 CI machines have 4 cores and need the longer timeout.
local nprocs=$(nproc)
local idle_timeout=1800
if (( nprocs <= 4 )); then
idle_timeout=3600
fi
# Create a pipe we'll read the output from for timeout detection.
local fifo=$(mktemp -u)
mkfifo "$fifo"
# Create a process group so we can kill every process including children.
# And use a long timeout (5h) in (the unlikely) case output timeout detection continues to be triggered.
setsid timeout --foreground 5h "$@" &> "$fifo" &
local cmd_pid=$!
# Read lines from the output with a timeout.
# Disable tracing to avoid 'set -x' noise from the read loop appearing in the output.
local timed_out=false
local traceflags=$-
set +x
while true; do
local rc=0
IFS= read -t $idle_timeout -r line || rc=$?
if (( rc == 0 )); then
printf '%s\n' "$line"
elif (( rc > 128 )); then
echo "output_timeout: no output for ${idle_timeout}s" >&2
timed_out=true
break
else
[[ -z $line ]] || printf '%s\n' "$line"
break
fi
done < "$fifo"
[[ $traceflags != *x* ]] || set -x
if $timed_out; then
# Hang detected: kill the process group, then collect the exit code.
kill -9 -- -$cmd_pid 2>/dev/null || true
wait $cmd_pid 2>/dev/null
local exit_code=$?
else
# Normal exit: collect the real exit code, then clean up any orphaned processes.
wait $cmd_pid 2>/dev/null
local exit_code=$?
kill -9 -- -$cmd_pid 2>/dev/null || true
fi
# Cleanup.
rm -f "$fifo"
return $exit_code
}
cat >dotnet-rpm-build.sh <<EOF cat >dotnet-rpm-build.sh <<EOF
#!/bin/bash #!/bin/bash
@ -693,21 +762,25 @@ find -depth -name 'artifacts' -type d -print -exec rm -rf {} \;
/p:UseSystemLibs=${system_libs} \ /p:UseSystemLibs=${system_libs} \
/p:TargetRid=%{runtime_id} \ /p:TargetRid=%{runtime_id} \
/p:OfficialBuilder="$vendor" \ /p:OfficialBuilder="$vendor" \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \ /p:ContinueOnPrebuiltBaselineError=true \
/v:n \ #/p:MinimalConsoleLogOutput=false \
/p:LogVerbosity=n #/v:n \
#/p:LogVerbosity=n
EOF EOF
chmod +x dotnet-rpm-build.sh chmod +x dotnet-rpm-build.sh
VERBOSE=1 retry_until_success $max_attempts \ VERBOSE=1 retry_until_success $max_attempts \
timeout 5h \ output_timeout \
./dotnet-rpm-build.sh ./dotnet-rpm-build.sh || { cat /proc/cpuinfo; cat /proc/meminfo; env; exit 1; }
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE21} > dotnet.sh sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE21} > dotnet.sh
env
ps aux
%install %install
@ -750,6 +823,7 @@ find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {}
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \; find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.txt' -exec chmod -x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \; find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.xml' -exec chmod -x {} \;
%if %{is_latest_dotnet}
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/ install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/ install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
@ -773,6 +847,7 @@ echo "%{_libdir}/dotnet" >> install_location
install install_location %{buildroot}%{_sysconfdir}/dotnet/ install install_location %{buildroot}%{_sysconfdir}/dotnet/
echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch} echo "%{_libdir}/dotnet" >> install_location_%{runtime_arch}
install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/ install install_location_%{runtime_arch} %{buildroot}%{_sysconfdir}/dotnet/
%endif
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
install -m 0644 artifacts/assets/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/ install -m 0644 artifacts/assets/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
@ -796,6 +871,18 @@ find %{buildroot}%{_libdir}/dotnet/sdk -type d | tail -n +2 | sed -E 's|%{buildr
find %{buildroot}%{_libdir}/dotnet/sdk -type f -and -not -name '*.pdb' | sed -E 's|%{buildroot}||' >> dotnet-sdk-non-dbg-files find %{buildroot}%{_libdir}/dotnet/sdk -type f -and -not -name '*.pdb' | sed -E 's|%{buildroot}||' >> dotnet-sdk-non-dbg-files
find %{buildroot}%{_libdir}/dotnet/sdk -type f -name '*.pdb' | sed -E 's|%{buildroot}||' > dotnet-sdk-dbg-files find %{buildroot}%{_libdir}/dotnet/sdk -type f -name '*.pdb' | sed -E 's|%{buildroot}||' > dotnet-sdk-dbg-files
%if %{is_latest_dotnet} == 0
# If this is an older version, self-test now, before we delete files. After we
# delete files, we will not have everything we need to self-test in %%check.
%{buildroot}%{_libdir}/dotnet/dotnet --info
%{buildroot}%{_libdir}/dotnet/dotnet --version
# Provided by dotnet-host from another SRPM
rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt
rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt
rm %{buildroot}%{_libdir}/dotnet/dotnet
%endif
%check %check
@ -804,8 +891,10 @@ find %{buildroot}%{_libdir}/dotnet/sdk -type f -name '*.pdb' | sed -E 's|%{buil
export COMPlus_LTTng=0 export COMPlus_LTTng=0
%endif %endif
%if %{is_latest_dotnet}
%{buildroot}%{_libdir}/dotnet/dotnet --info %{buildroot}%{_libdir}/dotnet/dotnet --info
%{buildroot}%{_libdir}/dotnet/dotnet --version %{buildroot}%{_libdir}/dotnet/dotnet --version
%endif
@ -814,6 +903,7 @@ export COMPlus_LTTng=0
# empty package useful for dependencies # empty package useful for dependencies
%endif %endif
%if %{is_latest_dotnet}
%files -n dotnet-host %files -n dotnet-host
%dir %{_libdir}/dotnet %dir %{_libdir}/dotnet
%{_libdir}/dotnet/dotnet %{_libdir}/dotnet/dotnet
@ -832,6 +922,7 @@ export COMPlus_LTTng=0
%dir %{_datadir}/zsh %dir %{_datadir}/zsh
%dir %{zsh_completions_dir} %dir %{zsh_completions_dir}
%{_datadir}/zsh/site-functions/_dotnet %{_datadir}/zsh/site-functions/_dotnet
%endif
%files -n dotnet-hostfxr-%{dotnetver} %files -n dotnet-hostfxr-%{dotnetver}
%dir %{_libdir}/dotnet/host/fxr %dir %{_libdir}/dotnet/host/fxr
@ -886,6 +977,66 @@ export COMPlus_LTTng=0
%changelog %changelog
* Thu Jul 23 2026 Satish Mane <satmane@redhat.com> - 9.0.119-2
- Update to .NET SDK 9.0.119 and Runtime 9.0.18
- Resolves: RHEL-192471
* Thu Jul 02 2026 Tom Deseyn <tdeseyn@redhat.com> - 9.0.118-3
- Reduce time to detect hanging builds
- Resolves: RHEL-191642
* Wed Jun 10 2026 Tom Deseyn <tdeseyn@redhat.com> - 9.0.118-2
- Update to .NET SDK 9.0.118 and Runtime 9.0.17
- Resolves: RHEL-181552
* Thu May 28 2026 Omair Majid <omajid@redhat.com> - 9.0.117-2
- Update to .NET SDK 9.0.117 and Runtime 9.0.16
- Resolves: RHEL-173917
* Fri Apr 17 2026 Omair Majid <omajid@redhat.com> - 9.0.116-2
- Update to .NET SDK 9.0.116 and Runtime 9.0.15
- Resolves: RHEL-163400
* Thu Mar 26 2026 Dominik Rehák <drehak@redhat.com> - 9.0.115-2
- Update to .NET SDK 9.0.115 and Runtime 9.0.14
- Resolves: RHEL-152947
* Wed Feb 11 2026 Omair Majid <omajid@redhat.com> - 9.0.114-2
- Update to .NET SDK 9.0.114 and Runtime 9.0.13
- Resolves: RHEL-144971
* Wed Jan 14 2026 Omair Majid <omajid@redhat.com> - 9.0.113-2
- Update to .NET SDK 9.0.113 and Runtime 9.0.12
- Resolves: RHEL-138646
* Wed Nov 12 2025 Omair Majid <omajid@redhat.com> - 9.0.112-2
- Update to .NET SDK 9.0.112 and Runtime 9.0.11
- Resolves: RHEL-125744
* Tue Oct 14 2025 Omair Majid <omajid@redhat.com> - 9.0.111-2
- Update to .NET SDK 9.0.111 and Runtime 9.0.10
- Resolves: RHEL-116861
* Wed Sep 10 2025 Omair Majid <omajid@redhat.com> - 9.0.110-2
- Update to .NET SDK 9.0.110 and Runtime 9.0.9
- Resolves: RHEL-112268
* Mon Aug 11 2025 Omair Majid <omajid@redhat.com> - 9.0.109-2
- Update to .NET SDK 9.0.109 and Runtime 9.0.8
- Resolves: RHEL-106727
* Tue Jul 08 2025 Omair Majid <omajid@redhat.com> - 9.0.108-2
- Update to .NET SDK 9.0.108 and Runtime 9.0.7
- Resolves: RHEL-100597
* Wed Jun 11 2025 Omair Majid <omajid@redhat.com> - 9.0.107-2
- Update to .NET SDK 9.0.107 and Runtime 9.0.6
- Resolves: RHEL-94423
* Tue May 13 2025 Omair Majid <omajid@redhat.com> - 9.0.106-2
- Update to .NET SDK 9.0.106 and Runtime 9.0.5
- Resolves: RHEL-89452
* Wed Apr 09 2025 Omair Majid <omajid@redhat.com> - 9.0.105-2 * Wed Apr 09 2025 Omair Majid <omajid@redhat.com> - 9.0.105-2
- Update to .NET SDK 9.0.105 and Runtime 9.0.4 - Update to .NET SDK 9.0.105 and Runtime 9.0.4
- Resolves: RHEL-85281 - Resolves: RHEL-85281

View File

@ -20,4 +20,3 @@ product_versions:
decision_context: osci_compose_gate decision_context: osci_compose_gate
rules: rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.other-archs.functional}

View File

@ -1,10 +1,10 @@
{ {
"release": "9.0.4", "release": "9.0.18",
"channel": "9.0", "channel": "9.0",
"tag": "v9.0.4", "tag": "v9.0.119",
"sdkVersion": "9.0.105", "sdkVersion": "9.0.119",
"runtimeVersion": "9.0.4", "runtimeVersion": "9.0.18",
"aspNetCoreVersion": "9.0.4", "aspNetCoreVersion": "9.0.18",
"sourceRepository": "https://github.com/dotnet/dotnet", "sourceRepository": "https://github.com/dotnet/dotnet",
"sourceVersion": "b7deac6d4239cd0d3375d55c2618054bb2f9df64" "sourceVersion": "d088fc83496a99a5785ecdf74c012f61a335c338"
} }

View File

@ -3,9 +3,9 @@ index 044a2aba4..b3f8f2611 100644
--- a/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj --- a/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
+++ b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj +++ b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
<LangVersion>preview</LangVersion>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
+ <UseAppHost>false</UseAppHost> + <UseAppHost>false</UseAppHost>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@ -1,2 +1,2 @@
SHA512 (dotnet-9.0.4.tar.gz) = 5061b1fa37c04c84ceddd544af8f4d917aaaa56b8c6b97a68282654055f7cce8f109d9c36f4c4bbca1c1a8f6251659f906e2915ebb9644bc508ea831e5eeca77 SHA512 (dotnet-9.0.119.tar.gz) = bdb5e0bd73b7edf0cc7bf72d9ef07a31691c442bf436e1e25c7d3ac5ee02768bf405a28c004df62db1bb3f0553cb47d6dbd894106667186c7187a13138e23a09
SHA512 (dotnet-9.0.4.tar.gz.sig) = 106acd8793def24dc462472b92e76babc2d92d1e2d3c6e9340f8248faa900cbbc7800f76d3ed73cd0f6058c30b07f0675a4d0a50b4e747834da57a0dbf5111c2 SHA512 (dotnet-9.0.119.tar.gz.sig) = c7529e07348ec4506bf930c70dede49ac16ef6cfe5d0d66a767c26275387de98c153f1adcbc8d921fccad8786cee42f8004d67dbc914a26e1dbd83df6a76f386

View File

@ -1,7 +1,9 @@
summary: Basic smoke test summary: Basic smoke test
provision: provision:
disk: 20 hardware:
memory: 5120 disk:
- size: ">= 20 GiB"
memory: ">= 5120 MiB"
prepare: prepare:
how: install how: install
package: package:

View File

@ -1,161 +0,0 @@
#!/bin/bash
# Usage:
# ./update-release [--bug bug-id] [--tarball tarball-name] [--release-json release-json] [--larger-rpm-release]
set -euo pipefail
IFS=$'\n\t'
print_usage() {
echo " Usage:"
echo " ./update-release [runtime-version] [--bug bug-id] [--tarball tarball-name] [--release-json release-json] [--larger-rpm-release]"
}
user_provided_tarball_name=""
rpm_release=1
positional_args=()
bug_ids=()
while [[ "$#" -gt 0 ]]; do
arg="$1"
case "${arg}" in
--bug)
bug_ids+=("$2")
shift;
shift;
;;
-h|--help)
print_usage
exit 0
;;
--release-json)
release_json="$2"
shift;
shift;
;;
--tarball)
user_provided_tarball_name="$2"
shift;
shift;
;;
--larger-rpm-release)
rpm_release="2"
shift;
;;
*)
positional_args+=("$1")
shift
;;
esac
done
spec_files=( ./*.spec )
spec_file="${spec_files[0]}"
dotnet_major_minor_version=$spec_file
dotnet_major_minor_version=${dotnet_major_minor_version#./dotnet}
dotnet_major_minor_version=${dotnet_major_minor_version%.spec}
echo "Updating .NET $dotnet_major_minor_version"
runtime_version=${positional_args[1]:-}
sdk_version=""
tag=v${runtime_version}
if [[ -z ${runtime_version} ]]; then
if [[ -n "${release_json:-}" ]]; then
cp -a "${release_json}" release.json
else
cat > query <<EOF
[ .[] | select(.name | contains(".NET 9.0")) ]
| first
| { tag_name: .tag_name,
tarball: .tarball_url,
signature: .assets[].browser_download_url | select(. | endswith("tar.gz.sig")),
release_manifest: .assets[] | select(.name == "release.json") | .browser_download_url }
EOF
curl https://api.github.com/repos/dotnet/dotnet/releases \
| jq --from-file query > release.metadata.github
tag=$(jq -r .tag_name release.metadata.github)
curl -L "$(jq -r .release_manifest release.metadata.github)" -o release.json
fi
fi
aspnetcore_runtime_version=$(jq -r .aspNetCoreVersion release.json)
runtime_version=$(jq -r .runtimeVersion release.json)
sdk_version=$(jq -r .sdkVersion release.json)
tag=$(jq -r .tag release.json)
tag_without_v=$(echo ${tag} | sed -e 's|^v||')
echo "Updating .NET $dotnet_major_minor_version to SDK ${sdk_version} and Runtime ${runtime_version}"
sed -i -E "s|^%global upstream_tag .*$|%global upstream_tag ${tag}|" "$spec_file"
sed -i -E "s|^%global runtime_version .*$|%global runtime_version ${runtime_version}|" "$spec_file"
sed -i -E "s|^%global aspnetcore_runtime_version .*$|%global aspnetcore_runtime_version ${aspnetcore_runtime_version}|" "$spec_file"
sed -i -E "s|^%global sdk_version .*$|%global sdk_version ${sdk_version}|" "$spec_file"
if [[ $runtime_version = *preview* ]] || [[ $runtime_version = *rc* ]]; then
# For Preview/RC releases, convert x.y.z-preview.a.b to x.y.z~preview.a.b (replace - with ~)
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_handling_non_sorting_versions_with_tilde_dot_and_caret
runtime_rpm_version=${runtime_version/-/\~}
aspnetcore_runtime_rpm_version=${aspnetcore_runtime_version/-/\~}
sdk_rpm_version=${sdk_version/-/\~}
sed -i -E "s|^(%global runtime_rpm_version) .*$|\1 ${runtime_rpm_version}|" "$spec_file"
sed -i -E "s|^(%global aspnetcore_runtime_rpm_version) .*$|\1 ${aspnetcore_runtime_rpm_version}|" "$spec_file"
sed -i -E "s|^(%global sdk_rpm_version) .*$|\1 ${sdk_rpm_version}|" "$spec_file"
else
# For GA releases replace rpm versions with rpm macros for the actual version
sed -i -E "s|^(%global runtime_rpm_version) .*$|\1 %{runtime_version}|" "$spec_file"
sed -i -E "s|^(%global aspnetcore_runtime_rpm_version) .*$|\1 %{aspnetcore_runtime_version}|" "$spec_file"
sed -i -E "s|^(%global sdk_rpm_version) .*$|\1 %{sdk_version}|" "$spec_file"
fi
if [[ -f "dotnet-${tag_without_v}.tar.gz" ]]; then
echo "dotnet-${tag_without_v}.tar.gz already exists, not rebuilding tarball"
elif [[ -n ${user_provided_tarball_name} ]]; then
cp -a "${user_provided_tarball_name}" "dotnet-${tag_without_v}.tar.gz"
cp -a "${user_provided_tarball_name}.sig" "dotnet-${tag_without_v}.tar.gz.sig"
else
rm -f release.json
spectool -g "$spec_file"
if spectool -l "$spec_file" | grep 'bootstrap.tar.gz' ; then
./build-dotnet-bootstrap-tarball "$tag"
tar xf dotnet-"$tag"-x64-bootstrap.tar.gz "dotnet-$tag-x64-bootstrap/global.json"
bootstrap_sdk_version=$(jq -r .tools.dotnet "dotnet-$tag-x64-bootstrap/global.json")
sed -i -E "s|^(%global bootstrap_sdk_version) .*$|\1 ${bootstrap_sdk_version}|" "$spec_file"
spectool -g "$spec_file"
if [ -f re-build-all-bootstrap ]; then
./re-build-all-bootstrap "${tag}"
fi
fi
fi
set -x
comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
commit_message="$comment
"
for bug_id in "${bug_ids[@]}"; do
if [[ "$bug_id" =~ ^[[:digit:]]+$ ]]; then
comment="$comment
- Resolves: RHBZ#$bug_id"
commit_message="$commit_message
Resolves: RHBZ#$bug_id"
else
comment="$comment
- Resolves: $bug_id"
commit_message="$commit_message
Resolves: $bug_id"
fi
done
echo "$commit_message" > git-commit-message
rpmdev-bumpspec --comment="$comment" "$spec_file"
# Reset release in 'Release' tag
sed -i -E 's|^Release: [[:digit:]]+%|Release: '"$rpm_release"'%|' "$spec_file"
# Reset Release in changelog comment
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line
sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-'"$rpm_release"'/' "$spec_file"