Merge pull request #71 from microsoft/17.9.1.1

17.9.1.1
This commit is contained in:
v-chojas 2022-02-17 10:36:49 -08:00 коммит произвёл GitHub
Родитель c9600beb72 b4aefece66
Коммит 408ed25dff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 157 добавлений и 12 удалений

Просмотреть файл

@ -1 +1 @@
../Formula/msodbcsql17.rb
../Formula/msodbcsql17@17.8.1.1.rb

1
Aliases/msodbcsql17@17.9 Symbolic link
Просмотреть файл

@ -0,0 +1 @@
../Formula/msodbcsql17.rb

Просмотреть файл

@ -1 +1 @@
../Formula/mssql-tools.rb
../Formula/mssql-tools@17.8.1.1.rb

1
Aliases/mssql-tools@17.9 Symbolic link
Просмотреть файл

@ -0,0 +1 @@
../Formula/mssql-tools.rb

Просмотреть файл

@ -1,11 +1,11 @@
class Msodbcsql17 < Formula
desc "ODBC Driver for Microsoft(R) SQL Server(R)"
homepage "https://msdn.microsoft.com/en-us/library/mt654048(v=sql.1).aspx"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.8.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.8.1.1-amd64.tar.gz"
version "17.8.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "1ba42450b8776b6da24bf24f64e7f5da46185d7533052c683500ec1a45c153d9" :
"ec3d672a0acf0d9a7f11aae83c4ad3f371fc786d07c99cf6bda713ff9ed4807f"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.9.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.9.1.1-amd64.tar.gz"
version "17.9.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "a7933fbeef266036ae7d768bb0e8ae0faba47de1673477ead770e75fc4f6beae" :
"62a9d75a187fbeec8607ed964aa896c325cf6e6beb7e0eb1810a4140e8630d93"
option "without-registration", "Don't register the driver in odbcinst.ini"

79
Formula/msodbcsql17@17.9.1.1.rb Executable file
Просмотреть файл

@ -0,0 +1,79 @@
class Msodbcsql17AT17911 < Formula
desc "ODBC Driver for Microsoft(R) SQL Server(R)"
homepage "https://msdn.microsoft.com/en-us/library/mt654048(v=sql.1).aspx"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.9.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/1/9/A/19AF548A-6DD3-4B48-88DC-724E9ABCEB9A/msodbcsql17-17.9.1.1-amd64.tar.gz"
version "17.9.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "a7933fbeef266036ae7d768bb0e8ae0faba47de1673477ead770e75fc4f6beae" :
"62a9d75a187fbeec8607ed964aa896c325cf6e6beb7e0eb1810a4140e8630d93"
option "without-registration", "Don't register the driver in odbcinst.ini"
keg_only :versioned_formula
depends_on "unixodbc"
depends_on "openssl"
def check_eula_acceptance?
if ENV["ACCEPT_EULA"] != "y" && ENV["ACCEPT_EULA"] != "Y"
puts "The license terms for this product can be downloaded from"
puts "https://aka.ms/odbc17eula and found in"
puts "#{prefix}/share/doc/msodbcsql17/LICENSE.txt . By entering 'YES',"
puts "you indicate that you accept the license terms."
puts ""
loop do
puts "Do you accept the license terms? (Enter YES or NO)"
accept_eula = STDIN.gets.chomp
if accept_eula
if accept_eula.casecmp("YES").zero?
break
elsif accept_eula.casecmp("NO").zero?
puts "Installation terminated: License terms not accepted."
return false
else
puts "Please enter YES or NO"
end
else
puts "Installation terminated: Could not prompt for license acceptance."
puts "If you are performing an unattended installation, you may set"
puts "ACCEPT_EULA to Y to indicate your acceptance of the license terms."
return false
end
end
end
true
end
def install
return false unless check_eula_acceptance?
chmod 0444, "lib/libmsodbcsql.17.dylib"
chmod 0444, "share/msodbcsql17/resources/en_US/msodbcsqlr17.rll"
chmod 0644, "include/msodbcsql17/msodbcsql.h"
chmod 0644, "odbcinst.ini"
chmod 0644, "share/doc/msodbcsql17/LICENSE.txt"
chmod 0644, "share/doc/msodbcsql17/RELEASE_NOTES"
cp_r ".", prefix.to_s
if build.with? "registration"
system "odbcinst", "-u", "-d", "-n", "\"ODBC Driver 17 for SQL Server\""
system "odbcinst", "-i", "-d", "-f", "./odbcinst.ini"
end
end
def caveats; <<~EOS
If you installed this formula with the registration option (default), you'll
need to manually remove [ODBC Driver 17 for SQL Server] section from
odbcinst.ini after the formula is uninstalled. This can be done by executing
the following command:
odbcinst -u -d -n "ODBC Driver 17 for SQL Server"
EOS
end
test do
if build.with? "registration"
out = shell_output("#{Formula["unixodbc"].opt_bin}/odbcinst -q -d")
assert_match "ODBC Driver 17 for SQL Server", out
end
end
end

Просмотреть файл

@ -1,11 +1,11 @@
class MssqlTools < Formula
desc "Sqlcmd and Bcp for Microsoft(R) SQL Server(R)"
homepage "https://msdn.microsoft.com/en-us/library/ms162773.aspx"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.8.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.8.1.1-amd64.tar.gz"
version "17.8.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "22a8339ac4f47ecadd225a659fcdd14bec191483d79a28847c3eb6e2c9a3f1c0" :
"25b13b1c325be3b3deeec5c3a47c4297521823871535cdd41ef9d04e54ffd199"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.9.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.9.1.1-amd64.tar.gz"
version "17.9.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "9fed846693f92d3407f9785bf0dd66774c85103100336874c93b08d49359ce1a" :
"18c56852b0d3f5739b6b4f7b55951e26020f0d7c685d1bb9a57b4b2c7fc95a08"
depends_on "unixodbc"
depends_on "openssl"

Просмотреть файл

@ -0,0 +1,64 @@
class MssqlToolsAT17911 < Formula
desc "Sqlcmd and Bcp for Microsoft(R) SQL Server(R)"
homepage "https://msdn.microsoft.com/en-us/library/ms162773.aspx"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.9.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/F/D/1/FD16AA69-F27D-440E-A15A-6C521A1972E6/mssql-tools-17.9.1.1-amd64.tar.gz"
version "17.9.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "9fed846693f92d3407f9785bf0dd66774c85103100336874c93b08d49359ce1a" :
"18c56852b0d3f5739b6b4f7b55951e26020f0d7c685d1bb9a57b4b2c7fc95a08"
depends_on "unixodbc"
depends_on "openssl"
depends_on "msodbcsql17"
def check_eula_acceptance?
if ENV["ACCEPT_EULA"] != "y" && ENV["ACCEPT_EULA"] != "Y"
puts "The license terms for this product can be downloaded from"
puts "http://go.microsoft.com/fwlink/?LinkId=746949 and found in"
puts "/usr/local/share/doc/mssql-tools/LICENSE.txt . By entering 'YES',"
puts "you indicate that you accept the license terms."
puts ""
loop do
puts "Do you accept the license terms? (Enter YES or NO)"
accept_eula = STDIN.gets.chomp
if accept_eula
break if accept_eula.casecmp("YES").zero?
if accept_eula.casecmp("NO").zero?
puts "Installation terminated: License terms not accepted."
return false
else
puts "Please enter YES or NO"
end
else
puts "Installation terminated: Could not prompt for license acceptance."
puts "If you are performing an unattended installation, you may set"
puts "ACCEPT_EULA to Y to indicate your acceptance of the license terms."
return false
end
end
end
true
end
def install
return false unless check_eula_acceptance?
chmod 0444, "bin/sqlcmd"
chmod 0444, "bin/bcp"
chmod 0444, "share/resources/en_US/BatchParserGrammar.dfa"
chmod 0444, "share/resources/en_US/BatchParserGrammar.llr"
chmod 0444, "share/resources/en_US/bcp.rll"
chmod 0444, "share/resources/en_US/SQLCMD.rll"
chmod 0644, "usr/share/doc/mssql-tools/LICENSE.txt"
chmod 0644, "usr/share/doc/mssql-tools/THIRDPARTYNOTICES.txt"
cp_r ".", prefix.to_s
end
test do
out = shell_output("#{bin}/sqlcmd -?")
assert_match "Microsoft (R) SQL Server Command Line Tool", out
out = shell_output("#{bin}/bcp -v")
assert_match "BCP - Bulk Copy Program for Microsoft SQL Server", out
end
end