From 3c9e69edf679a3ef3dd94508745350cda7b1362b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matigot?= Date: Tue, 24 Oct 2023 11:53:40 +0200 Subject: [PATCH] fix: fix mssql install scripts by forcing debian/11 deb repo (#1248) --- CHANGELOG.md | 4 ++++ toucan_connectors/install_scripts/mssql.sh | 11 +++++++++-- toucan_connectors/install_scripts/mssql_TLSv1_0.sh | 10 ++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5fac61dc..72202a2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,10 @@ - S3: Add a new AWS S3 connector using the Security Token Service (STS) API Assume Role. +### Fixed + +- Install scripts: fix mssql install scripts by forcing debian/11 deb repo + ### [4.7.3] 2023-08-22 ### Fixed diff --git a/toucan_connectors/install_scripts/mssql.sh b/toucan_connectors/install_scripts/mssql.sh index 08855b011..5add2fb78 100755 --- a/toucan_connectors/install_scripts/mssql.sh +++ b/toucan_connectors/install_scripts/mssql.sh @@ -9,9 +9,16 @@ fi apt-get update apt-get install -fyq gnupg curl curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - -source /etc/os-release &&\ + +source /etc/os-release +if [ "$ID" == "debian" ]; then + # debian/12 fails - fixing to debian/11 works: + curl "https://packages.microsoft.com/config/debian/11/prod.list" \ + | tee /etc/apt/sources.list.d/mssql-release.list +else curl "https://packages.microsoft.com/config/${ID}/${VERSION_ID}/prod.list" \ - | tee /etc/apt/sources.list.d/mssql-release.list + | tee /etc/apt/sources.list.d/mssql-release.list +fi apt-get update ACCEPT_EULA=Y apt-get -y install msodbcsql17 unixodbc-dev diff --git a/toucan_connectors/install_scripts/mssql_TLSv1_0.sh b/toucan_connectors/install_scripts/mssql_TLSv1_0.sh index 216790464..f33c36faa 100755 --- a/toucan_connectors/install_scripts/mssql_TLSv1_0.sh +++ b/toucan_connectors/install_scripts/mssql_TLSv1_0.sh @@ -21,9 +21,15 @@ fi apt-get update apt-get install -fyq gnupg curl curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - -source /etc/os-release &&\ +source /etc/os-release +if [ "$ID" == "debian" ]; then + # debian/12 fails - fixing to debian/11 works: + curl "https://packages.microsoft.com/config/debian/11/prod.list" \ + | tee /etc/apt/sources.list.d/mssql-release.list +else curl "https://packages.microsoft.com/config/${ID}/${VERSION_ID}/prod.list" \ - | tee /etc/apt/sources.list.d/mssql-release.list + | tee /etc/apt/sources.list.d/mssql-release.list +fi apt-get update ACCEPT_EULA=Y apt-get -y install msodbcsql17 unixodbc-dev