Merge pull request #102 from microsoft/18.4.1.1

18.4.1.1
This commit is contained in:
v-chojas 2024-07-31 17:36:49 +00:00 коммит произвёл GitHub
Родитель b1277c3789 e605947f36
Коммит d401f146a4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
8 изменённых файлов: 155 добавлений и 12 удалений

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

@ -1 +1 @@
../Formula/msodbcsql18.rb
../Formula/msodbcsql18@18.3.3.1.rb

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

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

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

@ -1 +1 @@
../Formula/mssql-tools18.rb
../Formula/mssql-tools18@18.2.1.1.rb

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

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

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

@ -1,11 +1,11 @@
class Msodbcsql18 < 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/d/4/7/d47963dd-a254-4d67-a92a-d3d5466df7e4/msodbcsql18-18.3.3.1-arm64.tar.gz" :
"https://download.microsoft.com/download/d/4/7/d47963dd-a254-4d67-a92a-d3d5466df7e4/msodbcsql18-18.3.3.1-amd64.tar.gz"
version "18.3.3.1"
sha256 Hardware::CPU.arch == :arm64 ? "e783549054d814d99f0772448f5fca113adb7fbe096e7f23f25122d1b578feef" :
"e69621db34589ecfbb4a870a23e2babb2b65fe76ce44279bac5347227f8efb6c"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/msodbcsql18-18.4.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/msodbcsql18-18.4.1.1-amd64.tar.gz"
version "18.4.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "ca5ae21c3a3c749ca1cdf44b445a09a2e6ef119c3dd49b4c0ad435ddebe0c9ab" :
"5af54cdb74827e6ffe78be8c35909febfce9f0e29773a492d054570327a74345"
option "without-registration", "Don't register the driver in odbcinst.ini"

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

@ -0,0 +1,79 @@
class Msodbcsql18AT18411 < 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/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/msodbcsql18-18.4.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/msodbcsql18-18.4.1.1-amd64.tar.gz"
version "18.4.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "ca5ae21c3a3c749ca1cdf44b445a09a2e6ef119c3dd49b4c0ad435ddebe0c9ab" :
"5af54cdb74827e6ffe78be8c35909febfce9f0e29773a492d054570327a74345"
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["HOMEBREW_ACCEPT_EULA"] != "y" && ENV["HOMEBREW_ACCEPT_EULA"] != "Y"
puts "The license terms for this product can be downloaded from"
puts "https://aka.ms/odbc18eula and found in"
puts "#{prefix}/share/doc/msodbcsql18/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 "HOMEBREW_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.18.dylib"
chmod 0444, "share/msodbcsql18/resources/en_US/msodbcsqlr18.rll"
chmod 0644, "include/msodbcsql18/msodbcsql.h"
chmod 0644, "odbcinst.ini"
chmod 0644, "share/doc/msodbcsql18/LICENSE.txt"
chmod 0644, "share/doc/msodbcsql18/RELEASE_NOTES"
cp_r ".", prefix.to_s
if build.with? "registration"
system "odbcinst", "-u", "-d", "-n", "\"ODBC Driver 18 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 18 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 18 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 18 for SQL Server", out
end
end
end

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

@ -1,11 +1,11 @@
class MssqlTools18 < 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/0/9/7/0976a30f-1710-4754-9445-bead058dd0c8/mssql-tools18-18.2.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/0/9/7/0976a30f-1710-4754-9445-bead058dd0c8/mssql-tools18-18.2.1.1-amd64.tar.gz"
version "18.2.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "964113d5fab28bd13bdc658be9c8a6fcbcde04882a1f09c0e8f135ec70dc8f5c" :
"1a2917ae45366e028eb4f5ca7d2a2396cfc06d659ae7b1ddc1d0bbee45a0d5fb"
url Hardware::CPU.arch == :arm64 ? "https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/mssql-tools18-18.4.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/mssql-tools18-18.4.1.1-amd64.tar.gz"
version "18.4.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "26eff3ea30c8dd9e003916263f1bbef6d8cb06554d437b04029a2dccfd87028a" :
"a2d5a454a5f9eb1503f3a33205d13e99587113acfb5a1f48f13d9fa44ad2f909"
depends_on "msodbcsql18"

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

@ -0,0 +1,62 @@
class MssqlTools18AT18411 < 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/0/e/f0e1f86e-1647-480f-b649-27741eea9642/mssql-tools18-18.4.1.1-arm64.tar.gz" :
"https://download.microsoft.com/download/f/0/e/f0e1f86e-1647-480f-b649-27741eea9642/mssql-tools18-18.4.1.1-amd64.tar.gz"
version "18.4.1.1"
sha256 Hardware::CPU.arch == :arm64 ? "26eff3ea30c8dd9e003916263f1bbef6d8cb06554d437b04029a2dccfd87028a" :
"a2d5a454a5f9eb1503f3a33205d13e99587113acfb5a1f48f13d9fa44ad2f909"
depends_on "msodbcsql18"
def check_eula_acceptance?
if ENV["HOMEBREW_ACCEPT_EULA"] != "y" && ENV["HOMEBREW_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 "#{prefix}/share/doc/mssql-tools18/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 "HOMEBREW_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-tools18/LICENSE.txt"
chmod 0644, "usr/share/doc/mssql-tools18/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