From 6eb4de5f7902f410bd6d70e60516308c26d0dd72 Mon Sep 17 00:00:00 2001 From: leecow Date: Thu, 23 Oct 2025 11:09:18 -0700 Subject: [PATCH 1/2] update preview script with deprecation messaging --- src/install-dotnet-preview.sh | 71 ++++------------------------------- 1 file changed, 7 insertions(+), 64 deletions(-) diff --git a/src/install-dotnet-preview.sh b/src/install-dotnet-preview.sh index 19a8338ab1..d4519301b6 100644 --- a/src/install-dotnet-preview.sh +++ b/src/install-dotnet-preview.sh @@ -2,7 +2,7 @@ # System must first have curl installed. # The following command will download the installation script and run it. -# curl -L https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/install-dotnet-$PRERELEASETYPE.sh -o install-dotnet-$PRERELEASETYPE.sh && bash install-dotnet-$PRERELEASETYPE.sh +# curl -L https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/install-dotnet-$PRERELEASETYPE.sh -o install-dotnet-$PRERELEASETYPE.sh && bash install-dotnet-$PRERELEASETYPE.sh # The script will # - install any additional dependences needed for the script to continue # - download a tar.gz containing the .NET preview installer packages to the current directory @@ -29,72 +29,15 @@ DOWNLOAD_DIR=$PWD DOTNET_PACKAGE_DIR="dotnet_packages" SUPPORTED_DISTRO=1 -DEPS_BUILD="25163.2" -PREVIEW_NUMBER="2" -PRERELEASETYPE="preview" # rc, preview +DEPS_BUILD="25451.107" +PREVIEW_NUMBER="1" +PRERELEASETYPE="rc" # rc, preview declare -a ADDITIONAL_DEPS function distro_check() { case $DISTRO_NAME in - *"Debian"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 18.04"* | *"Mint 19"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 20.04"* | *"Focal"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 22.04"* | *"Jammy"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 23.04"* | *"Lunar"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 23.10"* | *"Mantic"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 24.04"* | *"Jammy"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Ubuntu 24.10"* | *"Oracular"*) - PACKAGE_TYPE="deb" - ADDITIONAL_DEPS=("tar" "gzip" "curl") - ;; - *"Fedora"* | *"Red Hat"*) - PACKAGE_TYPE="rpm" - DEPS_PACKAGE="https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/dotnet-runtime-deps-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER.$DEPS_BUILD-fedora.34-x64.rpm" - ADDITIONAL_DEPS=("tar" "gzip" "compat-openssl10" "libicu") - ;; - *"openSUSE"*) - PACKAGE_TYPE="rpm" - DEPS_PACKAGE="https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/dotnet-runtime-deps-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER.$DEPS_BUILD-opensuse.42-x64.rpm" - ADDITIONAL_DEPS=("tar" "gzip" "libopenssl1_0_0" "libicu") - ;; - *"sles"**) - PACKAGE_TYPE="rpm" - DEPS_PACKAGE="https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/dotnet-runtime-deps-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER.$DEPS_BUILD-sles.12-x64.rpm" - ADDITIONAL_DEPS=("tar" "gzip" "libopenssl1_0_0" "libicu") - ;; - *"Oracle"*) - PACKAGE_TYPE="rpm" - DEPS_PACKAGE="https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/dotnet-runtime-deps-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER.$DEPS_BUILD-oraclelinux.8-x64.rpm" - ADDITIONAL_DEPS=("tar" "gzip" "libicu") - ;; - *"CentOS"*) - PACKAGE_TYPE="rpm" - DEPS_PACKAGE="https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/dotnet-runtime-deps-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER.$DEPS_BUILD-centos.8-x64.rpm" - ADDITIONAL_DEPS=("tar" "gzip" "libicu") - ;; *) SUPPORTED_DISTRO=0 ;; esac } @@ -115,9 +58,9 @@ function download_preview() echo "*** Download source: ${DOTNET_SRC}" echo - echo "*** Downloading https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/$DOTNET_SRC to $DOWNLOAD_DIR ..." + echo "*** Downloading https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/$DOTNET_SRC to $DOWNLOAD_DIR ..." - curl "https://builds.dotnet.microsoft.com/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/"$DOTNET_SRC -o $DOWNLOAD_DIR/$DOTNET_SRC + curl "https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/"$DOTNET_SRC -o $DOWNLOAD_DIR/$DOTNET_SRC echo echo "*** Unpacking ${DOTNET_SRC} ..." @@ -198,5 +141,5 @@ then echo install else - echo "${DISTRO_NAME} is not supported by the .NET 9 Preview installer. Please use the dotnet-install script - https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script." + echo "The install-dotnet-preview script has been deprecated. Please use the dotnet-install script - https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script." fi From 246c9d6571f2ce021e1cc16fd806e385800fa84c Mon Sep 17 00:00:00 2001 From: leecow Date: Thu, 23 Oct 2025 13:27:33 -0700 Subject: [PATCH 2/2] delete deprecated preview install script --- src/install-dotnet-preview.sh | 145 ---------------------------------- 1 file changed, 145 deletions(-) delete mode 100644 src/install-dotnet-preview.sh diff --git a/src/install-dotnet-preview.sh b/src/install-dotnet-preview.sh deleted file mode 100644 index d4519301b6..0000000000 --- a/src/install-dotnet-preview.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env bash - -# System must first have curl installed. -# The following command will download the installation script and run it. -# curl -L https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/install-dotnet-$PRERELEASETYPE.sh -o install-dotnet-$PRERELEASETYPE.sh && bash install-dotnet-$PRERELEASETYPE.sh -# The script will -# - install any additional dependences needed for the script to continue -# - download a tar.gz containing the .NET preview installer packages to the current directory -# - expand the tar.gz into ./dotnet_packages -# - download the appropriate runtime dependency installer package into ./dotnet_packages -# - install the contents of ./dotnet_packages using rpm or dpkg as appropriate - - -if [ -n "$(command -v lsb_release)" ]; then - DISTRO_NAME=$(lsb_release -s -d) -elif [ -f "/etc/os-release" ]; then - DISTRO_NAME=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="') -elif [ -f "/etc/debian_version" ]; then - DISTRO_NAME="Debian $(cat /etc/debian_version)" -elif [ -f "/etc/redhat-release" ]; then - DISTRO_NAME=$(cat /etc/redhat-release) -else - DISTRO_NAME="$(uname -s) $(uname -r)" -fi - -PACKAGE_TYPE="" -DEPS_PACKAGE="" -DOWNLOAD_DIR=$PWD -DOTNET_PACKAGE_DIR="dotnet_packages" -SUPPORTED_DISTRO=1 - -DEPS_BUILD="25451.107" -PREVIEW_NUMBER="1" -PRERELEASETYPE="rc" # rc, preview - -declare -a ADDITIONAL_DEPS - -function distro_check() -{ - case $DISTRO_NAME in - *) SUPPORTED_DISTRO=0 ;; - esac -} - -function download_preview() -{ - case $PACKAGE_TYPE in - "rpm") - echo "*** Setting package type to rpm." - DOTNET_SRC="dotnet-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER-rpm.tar.gz" - ;; - "deb") - echo "*** Setting package type to deb." - DOTNET_SRC="dotnet-10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER-deb.tar.gz" - ;; - *) - esac - - echo "*** Download source: ${DOTNET_SRC}" - echo - echo "*** Downloading https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/$DOTNET_SRC to $DOWNLOAD_DIR ..." - - curl "https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/10.0.0-$PRERELEASETYPE.$PREVIEW_NUMBER/"$DOTNET_SRC -o $DOWNLOAD_DIR/$DOTNET_SRC - - echo - echo "*** Unpacking ${DOTNET_SRC} ..." - echo - tar xvf $DOTNET_SRC -C $DOWNLOAD_DIR - echo - - if [ $PACKAGE_TYPE == "rpm" ] - then - echo "*** Downloading $DEPS_PACKAGE" - curl $DEPS_PACKAGE -o $DOWNLOAD_DIR/$DOTNET_PACKAGE_DIR/dotnet-runtime-deps.rpm - fi -} - - -function check_dependencies() -{ - for dependency in "${ADDITIONAL_DEPS[@]}" - do - - if [ $PACKAGE_TYPE == "rpm" ] - then - dep_found=$(rpm -qa | grep ${dependency} | wc -c ) - elif [ $PACKAGE_TYPE == "deb" ] - then - dep_found=$(dpkg --get-selections | grep "^${dependency}" | wc -c ) - fi - - if [ $dep_found == 0 ] - then - echo - echo "*** Installing ${dependency} ..." - echo - case "$1" in - *"openSUSE"* | *"SLES"* ) - zypper install -y ${dependency} - ;; - *"Fedora"*) - dnf install -y ${dependency} - ;; - *"CentOS"* | *"Oracle"*) - yum install -y ${dependency} - ;; - *"Debian"* | *"Ubuntu"* | *"Mint"*) - apt install -y ${dependency} - ;; - *) - esac - echo - else - echo "*** ${dependency} is already installed." - fi - done -} - -function install() -{ - if [ $PACKAGE_TYPE == "rpm" ] - then - rpm -ivh --replacepkgs $DOWNLOAD_DIR/$DOTNET_PACKAGE_DIR/* - elif [ $PACKAGE_TYPE == "deb" ] - then - apt install -y --allow-downgrades $DOWNLOAD_DIR/$DOTNET_PACKAGE_DIR/* - fi -} - -#-----------------------------------# - -distro_check -echo ${SUPPORTED_DISTRO} -if [ ${SUPPORTED_DISTRO} == 1 ] -then - echo - echo "*** Checking required system dependencies for detected OS: ${DISTRO_NAME} ..." - check_dependencies $DISTRO_NAME - echo - download_preview - echo - install -else - echo "The install-dotnet-preview script has been deprecated. Please use the dotnet-install script - https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script." -fi