diff --git a/.gitignore b/.gitignore index 0ebd61e..4e62426 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /dotnet-v6.0.106.tar.gz /dotnet-v6.0.107.tar.gz /dotnet-v6.0.108.tar.gz +/dotnet-v6.0.109.tar.gz diff --git a/dotnet6.0.spec b/dotnet6.0.spec index 6785258..d0d13bf 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -20,10 +20,10 @@ # until that's done, disable LTO. This has to happen before setting the flags below. %define _lto_cflags %{nil} -%global host_version 6.0.8 -%global runtime_version 6.0.8 +%global host_version 6.0.9 +%global runtime_version 6.0.9 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 6.0.108 +%global sdk_version 6.0.109 %global sdk_feature_band_version %(echo %{sdk_version} | sed -e 's|[[:digit:]][[:digit:]]$|00|') %global templates_version %{runtime_version} #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -60,7 +60,7 @@ Name: dotnet6.0 Version: %{sdk_rpm_version} -Release: 1%{?dist} +Release: 2%{?dist} 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 URL: https://github.com/dotnet/ @@ -622,6 +622,10 @@ export COMPlus_LTTng=0 %changelog +* Wed Sep 14 2022 Omair Majid - 6.0.109-2 +- Update to .NET SDK 6.0.109 and Runtime 6.0.9 +- Resolves: RHBZ#2123788 + * Tue Aug 09 2022 Omair Majid - 6.0.108-1 - Update to .NET SDK 6.0.108 and Runtime 6.0.8 - Resolves: RHBZ#2112409 diff --git a/rename-tarball b/rename-tarball index fbceaa6..5bc1109 100755 --- a/rename-tarball +++ b/rename-tarball @@ -2,6 +2,12 @@ # Usage: # ./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 IFS=$'\n\t' @@ -44,8 +50,16 @@ echo "New name: ${new_name}.tar.gz" mkdir "temp-${new_name}" pushd "temp-${new_name}" > /dev/null tar xf "${original_path}" -mkdir -p ../"${new_name}" -mv -- * ../"${new_name}" +# `find` always shows the current directory as one of the entries in +# 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}" diff --git a/sources b/sources index 8cc6d9d..f445c96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dotnet-v6.0.108.tar.gz) = e5e5bda2c22812714a91511d9b478fb7519d30220241dcefe651410cba3bbb1c903505e93dae1a1493fff0ca6efd395f35536c09e3c1c7ded71e3611c516a800 +SHA512 (dotnet-v6.0.109.tar.gz) = 2ba76328ed039b1b85cc1e91f1cf69f3d2504a832219551e13d9864fc9e8ae00dc1e0b6683443d787739611c26209feca288c62c207f302627c9af36048ed4e3 diff --git a/update-release b/update-release index d722cb6..54c7307 100755 --- a/update-release +++ b/update-release @@ -1,18 +1,19 @@ #!/bin/bash # 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 IFS=$'\n\t' print_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="" +rpm_release=1 positional_args=() bug_ids=() while [[ "$#" -gt 0 ]]; do @@ -32,6 +33,10 @@ while [[ "$#" -gt 0 ]]; do shift; shift; ;; + --larger-rpm-release) + rpm_release="2" + shift; + ;; *) positional_args+=("$1") shift @@ -56,7 +61,11 @@ fi 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 echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball" @@ -65,6 +74,8 @@ else ./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 + ./rename-tarball "dotnet-${sdk_version}.tar.gz" "dotnet-${tag}-original.tar.gz" elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then ./rename-tarball "dotnet-${runtime_version}.tar.gz" "dotnet-${tag}-original.tar.gz" fi @@ -81,15 +92,21 @@ sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%gl sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file" comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}" +commit_message="$comment +" for bug_id in "${bug_ids[@]}"; do comment="$comment - Resolves: RHBZ#$bug_id" + commit_message="$commit_message +Resolves: RHBZ#$bug_id" done +echo "$commit_message" > git-commit-message + rpmdev-bumpspec --comment="$comment" "$spec_file" -# Reset release to 1 in 'Release' tag -sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' "$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:]]+$/-1/' "$spec_file" +sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-'"$rpm_release"'/' "$spec_file"