diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index 5b8083ae..9c2cad12 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -8,6 +8,7 @@ trigger: jobs: - job: PytestOnWindows + displayName: 'Windows x64' pool: vmImage: 'windows-latest' @@ -78,6 +79,7 @@ jobs: displayName: 'Publish code coverage results' - job: PytestOnMacOS + displayName: 'macOS x86_64' pool: vmImage: 'macos-latest' @@ -156,13 +158,8 @@ jobs: testResultsFiles: '**/test-results.xml' testRunTitle: 'Publish pytest results on macOS' - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: 'coverage.xml' - displayName: 'Publish code coverage results' - - job: PytestOnLinux + displayName: 'Linux x86_64' pool: vmImage: 'ubuntu-latest' @@ -355,13 +352,8 @@ jobs: testResultsFiles: '**/test-results-$(distroName).xml' testRunTitle: 'Publish pytest results on $(distroName)' - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: 'coverage-$(distroName).xml' - displayName: 'Publish code coverage results for $(distroName)' - - job: PytestOnLinux_ARM64 + displayName: 'Linux ARM64' pool: vmImage: 'ubuntu-latest' @@ -573,13 +565,8 @@ jobs: testResultsFiles: '**/test-results-$(distroName)-$(archName).xml' testRunTitle: 'Publish pytest results on $(distroName) ARM64' - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: 'coverage-$(distroName)-$(archName).xml' - displayName: 'Publish code coverage results for $(distroName) ARM64' - - job: PytestOnLinux_RHEL9 + displayName: 'Linux RedHat x86_64' pool: vmImage: 'ubuntu-latest' @@ -785,13 +772,8 @@ jobs: testResultsFiles: '**/test-results-rhel9.xml' testRunTitle: 'Publish pytest results on RHEL 9' - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: 'coverage-rhel9.xml' - displayName: 'Publish code coverage results for RHEL 9' - - job: PytestOnLinux_RHEL9_ARM64 + displayName: 'Linux RedHat ARM64' pool: vmImage: 'ubuntu-latest' @@ -1009,8 +991,486 @@ jobs: testResultsFiles: '**/test-results-rhel9-arm64.xml' testRunTitle: 'Publish pytest results on RHEL 9 ARM64' - - task: PublishCodeCoverageResults@1 +- job: PytestOnLinux_Alpine + displayName: 'Linux Alpine x86_64' + pool: + vmImage: 'ubuntu-latest' + + steps: + - script: | + # Set up Docker buildx for multi-architecture support + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx create --name multiarch --driver docker-container --use + docker buildx inspect --bootstrap + displayName: 'Setup Docker buildx for multi-architecture support' + + - script: | + # Create a Docker container for testing on x86_64 + docker run -d --name test-container-alpine \ + --platform linux/amd64 \ + -v $(Build.SourcesDirectory):/workspace \ + -w /workspace \ + --network bridge \ + alpine:latest \ + tail -f /dev/null + displayName: 'Create Alpine x86_64 container' + + - script: | + # Start SQL Server container (x86_64) + docker run -d --name sqlserver-alpine \ + --platform linux/amd64 \ + -e ACCEPT_EULA=Y \ + -e MSSQL_SA_PASSWORD="$(DB_PASSWORD)" \ + -p 1433:1433 \ + mcr.microsoft.com/mssql/server:2022-latest + + # Wait for SQL Server to be ready + echo "Waiting for SQL Server to start..." + for i in {1..60}; do + if docker exec sqlserver-alpine \ + /opt/mssql-tools18/bin/sqlcmd \ + -S localhost \ + -U SA \ + -P "$(DB_PASSWORD)" \ + -C -Q "SELECT 1" >/dev/null 2>&1; then + echo "SQL Server is ready!" + break + fi + echo "Waiting... ($i/60)" + sleep 2 + done + + # Create test database + docker exec sqlserver-alpine \ + /opt/mssql-tools18/bin/sqlcmd \ + -S localhost \ + -U SA \ + -P "$(DB_PASSWORD)" \ + -C -Q "CREATE DATABASE TestDB" + displayName: 'Start SQL Server container for Alpine x86_64' + env: + DB_PASSWORD: $(DB_PASSWORD) + + - script: | + # Install dependencies in the Alpine x86_64 container + docker exec test-container-alpine sh -c " + # Update package index + apk update + + # Install build tools and system dependencies + apk add --no-cache \ + build-base \ + cmake \ + clang \ + git \ + bash \ + wget \ + curl \ + gnupg \ + unixodbc \ + unixodbc-dev \ + libffi-dev \ + openssl-dev \ + zlib-dev \ + py3-pip \ + python3-dev \ + patchelf + + # Create symlinks for Python compatibility + ln -sf python3 /usr/bin/python || true + ln -sf pip3 /usr/bin/pip || true + + # Verify installation and architecture + uname -m + python --version + which cmake + " + displayName: 'Install basic dependencies in Alpine x86_64 container' + + - script: | + # Install ODBC driver in the Alpine x86_64 container + docker exec test-container-alpine bash -c " + # Detect architecture for ODBC driver download + case \$(uname -m) in + x86_64) architecture='amd64' ;; + arm64|aarch64) architecture='arm64' ;; + *) architecture='unsupported' ;; + esac + + if [[ 'unsupported' == '\$architecture' ]]; then + echo 'Alpine architecture \$(uname -m) is not currently supported.' + exit 1 + fi + + echo 'Detected architecture: '\$architecture + + # Download the packages + curl -O https://download.microsoft.com/download/fae28b9a-d880-42fd-9b98-d779f0fdd77f/msodbcsql18_18.5.1.1-1_\$architecture.apk + curl -O https://download.microsoft.com/download/7/6d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Download signatures for verification + curl -O https://download.microsoft.com/download/fae28b9a-d880-42fd-9b98-d779f0fdd77f/msodbcsql18_18.5.1.1-1_\$architecture.sig + curl -O https://download.microsoft.com/download/7/6d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_18.4.1.1-1_\$architecture.sig + + # Import Microsoft GPG key and verify packages + curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - + gpg --verify msodbcsql18_18.5.1.1-1_\$architecture.sig msodbcsql18_18.5.1.1-1_\$architecture.apk + gpg --verify mssql-tools18_18.4.1.1-1_\$architecture.sig mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Install the packages + apk add --allow-untrusted msodbcsql18_18.5.1.1-1_\$architecture.apk + apk add --allow-untrusted mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Cleanup + rm -f msodbcsql18_18.5.1.1-1_\$architecture.* mssql-tools18_18.4.1.1-1_\$architecture.* + + # Add mssql-tools to PATH + export PATH=\"\$PATH:/opt/mssql-tools18/bin\" + echo 'export PATH=\"\$PATH:/opt/mssql-tools18/bin\"' >> ~/.bashrc + " + displayName: 'Install ODBC Driver in Alpine x86_64 container' + + - script: | + # Install Python dependencies in the Alpine x86_64 container using virtual environment + docker exec test-container-alpine bash -c " + # Create virtual environment + python -m venv /workspace/venv + + # Activate virtual environment and install dependencies + source /workspace/venv/bin/activate + + # Upgrade pip and install dependencies + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + + # Verify virtual environment is active + which python + which pip + " + displayName: 'Install Python dependencies in Alpine x86_64 container' + + - script: | + # Build pybind bindings in the Alpine x86_64 container + docker exec test-container-alpine bash -c " + # Activate virtual environment + source /workspace/venv/bin/activate + + cd mssql_python/pybind + chmod +x build.sh + ./build.sh + " + displayName: 'Build pybind bindings (.so) in Alpine x86_64 container' + + - script: | + # Uninstall ODBC Driver before running tests to use bundled libraries + docker exec test-container-alpine bash -c " + # Remove system ODBC installation + apk del msodbcsql18 mssql-tools18 unixodbc-dev || echo 'ODBC packages not installed via apk' + rm -f /usr/bin/sqlcmd + rm -f /usr/bin/bcp + rm -rf /opt/microsoft/msodbcsql18 + rm -f /usr/lib/libodbcinst.so.2 + odbcinst -u -d -n 'ODBC Driver 18 for SQL Server' || true + echo 'Uninstalled system ODBC Driver and cleaned up libraries' + echo 'Verifying x86_64 alpine driver library signatures:' + ldd mssql_python/libs/linux/alpine/x86_64/lib/libmsodbcsql-18.5.so.1.1 || echo 'Driver library not found' + " + displayName: 'Uninstall system ODBC Driver before running tests in Alpine x86_64 container' + + - script: | + # Run tests in the Alpine x86_64 container + # Get SQL Server container IP + SQLSERVER_IP=$(docker inspect sqlserver-alpine --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}') + echo "SQL Server IP: $SQLSERVER_IP" + + docker exec \ + -e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \ + -e DB_PASSWORD="$(DB_PASSWORD)" \ + test-container-alpine bash -c " + echo 'Build successful, running tests now on Alpine x86_64' + echo 'Architecture:' \$(uname -m) + echo 'Alpine version:' \$(cat /etc/alpine-release) + echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes' + + # Activate virtual environment + source /workspace/venv/bin/activate + + # Test basic Python import first + python -c 'import mssql_python; print(\"mssql_python imported successfully\")' + + # Run main.py if it exists + if [ -f main.py ]; then + echo 'Running main.py...' + python main.py + fi + + # Run pytest + python -m pytest -v --junitxml=test-results-alpine.xml --cov=. --cov-report=xml:coverage-alpine.xml --capture=tee-sys --cache-clear + " + displayName: 'Run pytest with coverage in Alpine x86_64 container' + env: + DB_PASSWORD: $(DB_PASSWORD) + + - script: | + # Copy test results from container to host + docker cp test-container-alpine:/workspace/test-results-alpine.xml $(Build.SourcesDirectory)/ || echo 'Failed to copy test results' + docker cp test-container-alpine:/workspace/coverage-alpine.xml $(Build.SourcesDirectory)/ || echo 'Failed to copy coverage results' + displayName: 'Copy test results from Alpine x86_64 container' + condition: always() + + - script: | + # Clean up containers + docker stop test-container-alpine || true + docker rm test-container-alpine || true + docker stop sqlserver-alpine || true + docker rm sqlserver-alpine || true + displayName: 'Clean up Alpine x86_64 containers' + condition: always() + + - task: PublishTestResults@2 + condition: succeededOrFailed() inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: 'coverage-rhel9-arm64.xml' - displayName: 'Publish code coverage results for RHEL 9 ARM64' \ No newline at end of file + testResultsFiles: '**/test-results-alpine.xml' + testRunTitle: 'Publish pytest results on Alpine x86_64' + +- job: PytestOnLinux_Alpine_ARM64 + displayName: 'Linux Alpine ARM64' + pool: + vmImage: 'ubuntu-latest' + + steps: + - script: | + # Set up Docker buildx for multi-architecture support + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx create --name multiarch --driver docker-container --use + docker buildx inspect --bootstrap + displayName: 'Setup Docker buildx for ARM64 emulation' + + - script: | + # Create a Docker container for testing on ARM64 + docker run -d --name test-container-alpine-arm64 \ + --platform linux/arm64 \ + -v $(Build.SourcesDirectory):/workspace \ + -w /workspace \ + --network bridge \ + alpine:latest \ + tail -f /dev/null + displayName: 'Create Alpine ARM64 container' + + - script: | + # Start SQL Server container (x86_64 - SQL Server doesn't support ARM64) + docker run -d --name sqlserver-alpine-arm64 \ + --platform linux/amd64 \ + -e ACCEPT_EULA=Y \ + -e MSSQL_SA_PASSWORD="$(DB_PASSWORD)" \ + -p 1433:1433 \ + mcr.microsoft.com/mssql/server:2022-latest + + # Wait for SQL Server to be ready + echo "Waiting for SQL Server to start..." + for i in {1..60}; do + if docker exec sqlserver-alpine-arm64 \ + /opt/mssql-tools18/bin/sqlcmd \ + -S localhost \ + -U SA \ + -P "$(DB_PASSWORD)" \ + -C -Q "SELECT 1" >/dev/null 2>&1; then + echo "SQL Server is ready!" + break + fi + echo "Waiting... ($i/60)" + sleep 2 + done + + # Create test database + docker exec sqlserver-alpine-arm64 \ + /opt/mssql-tools18/bin/sqlcmd \ + -S localhost \ + -U SA \ + -P "$(DB_PASSWORD)" \ + -C -Q "CREATE DATABASE TestDB" + displayName: 'Start SQL Server container for Alpine ARM64' + env: + DB_PASSWORD: $(DB_PASSWORD) + + - script: | + # Install dependencies in the Alpine ARM64 container + docker exec test-container-alpine-arm64 sh -c " + # Update package index + apk update + + # Install build tools and system dependencies + apk add --no-cache \ + build-base \ + cmake \ + clang \ + git \ + bash \ + wget \ + curl \ + gnupg \ + unixodbc \ + unixodbc-dev \ + libffi-dev \ + openssl-dev \ + zlib-dev \ + py3-pip \ + python3-dev \ + patchelf + + # Create symlinks for Python compatibility + ln -sf python3 /usr/bin/python || true + ln -sf pip3 /usr/bin/pip || true + + # Verify installation and architecture + uname -m + python --version + which cmake + " + displayName: 'Install basic dependencies in Alpine ARM64 container' + + - script: | + # Install ODBC driver in the Alpine ARM64 container + docker exec test-container-alpine-arm64 bash -c " + # Detect architecture for ODBC driver download + case \$(uname -m) in + x86_64) architecture='amd64' ;; + arm64|aarch64) architecture='arm64' ;; + *) architecture='unsupported' ;; + esac + + if [[ 'unsupported' == '\$architecture' ]]; then + echo 'Alpine architecture \$(uname -m) is not currently supported.' + exit 1 + fi + + echo 'Detected architecture: '\$architecture + + # Download the packages + curl -O https://download.microsoft.com/download/fae28b9a-d880-42fd-9b98-d779f0fdd77f/msodbcsql18_18.5.1.1-1_\$architecture.apk + curl -O https://download.microsoft.com/download/7/6d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Download signatures for verification + curl -O https://download.microsoft.com/download/fae28b9a-d880-42fd-9b98-d779f0fdd77f/msodbcsql18_18.5.1.1-1_\$architecture.sig + curl -O https://download.microsoft.com/download/7/6d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_18.4.1.1-1_\$architecture.sig + + # Import Microsoft GPG key and verify packages + curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - + gpg --verify msodbcsql18_18.5.1.1-1_\$architecture.sig msodbcsql18_18.5.1.1-1_\$architecture.apk + gpg --verify mssql-tools18_18.4.1.1-1_\$architecture.sig mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Install the packages + apk add --allow-untrusted msodbcsql18_18.5.1.1-1_\$architecture.apk + apk add --allow-untrusted mssql-tools18_18.4.1.1-1_\$architecture.apk + + # Cleanup + rm -f msodbcsql18_18.5.1.1-1_\$architecture.* mssql-tools18_18.4.1.1-1_\$architecture.* + + # Add mssql-tools to PATH + export PATH=\"\$PATH:/opt/mssql-tools18/bin\" + echo 'export PATH=\"\$PATH:/opt/mssql-tools18/bin\"' >> ~/.bashrc + " + displayName: 'Install ODBC Driver in Alpine ARM64 container' + + - script: | + # Install Python dependencies in the Alpine ARM64 container using virtual environment + docker exec test-container-alpine-arm64 bash -c " + # Create virtual environment + python -m venv /workspace/venv + + # Activate virtual environment and install dependencies + source /workspace/venv/bin/activate + + # Upgrade pip and install dependencies + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + + # Verify virtual environment is active + which python + which pip + " + displayName: 'Install Python dependencies in Alpine ARM64 container' + + - script: | + # Build pybind bindings in the Alpine ARM64 container + docker exec test-container-alpine-arm64 bash -c " + # Activate virtual environment + source /workspace/venv/bin/activate + + cd mssql_python/pybind + chmod +x build.sh + ./build.sh + " + displayName: 'Build pybind bindings (.so) in Alpine ARM64 container' + + - script: | + # Uninstall ODBC Driver before running tests to use bundled libraries + docker exec test-container-alpine-arm64 bash -c " + # Remove system ODBC installation + apk del msodbcsql18 mssql-tools18 unixodbc-dev || echo 'ODBC packages not installed via apk' + rm -f /usr/bin/sqlcmd + rm -f /usr/bin/bcp + rm -rf /opt/microsoft/msodbcsql18 + rm -f /usr/lib/libodbcinst.so.2 + odbcinst -u -d -n 'ODBC Driver 18 for SQL Server' || true + echo 'Uninstalled system ODBC Driver and cleaned up libraries' + echo 'Verifying arm64 alpine driver library signatures:' + ldd mssql_python/libs/linux/alpine/arm64/lib/libmsodbcsql-18.5.so.1.1 || echo 'Driver library not found' + " + displayName: 'Uninstall system ODBC Driver before running tests in Alpine ARM64 container' + + - script: | + # Run tests in the Alpine ARM64 container + # Get SQL Server container IP + SQLSERVER_IP=$(docker inspect sqlserver-alpine-arm64 --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}') + echo "SQL Server IP: $SQLSERVER_IP" + + docker exec \ + -e DB_CONNECTION_STRING="Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes" \ + -e DB_PASSWORD="$(DB_PASSWORD)" \ + test-container-alpine-arm64 bash -c " + echo 'Build successful, running tests now on Alpine ARM64' + echo 'Architecture:' \$(uname -m) + echo 'Alpine version:' \$(cat /etc/alpine-release) + echo 'Using connection string: Driver=ODBC Driver 18 for SQL Server;Server=$SQLSERVER_IP;Database=TestDB;Uid=SA;Pwd=***;TrustServerCertificate=yes' + + # Activate virtual environment + source /workspace/venv/bin/activate + + # Test basic Python import first + python -c 'import mssql_python; print(\"mssql_python imported successfully\")' + + # Run main.py if it exists + if [ -f main.py ]; then + echo 'Running main.py...' + python main.py + fi + + # Run pytest + python -m pytest -v --junitxml=test-results-alpine-arm64.xml --cov=. --cov-report=xml:coverage-alpine-arm64.xml --capture=tee-sys --cache-clear + " + displayName: 'Run pytest with coverage in Alpine ARM64 container' + env: + DB_PASSWORD: $(DB_PASSWORD) + + - script: | + # Copy test results from container to host + docker cp test-container-alpine-arm64:/workspace/test-results-alpine-arm64.xml $(Build.SourcesDirectory)/ || echo 'Failed to copy test results' + docker cp test-container-alpine-arm64:/workspace/coverage-alpine-arm64.xml $(Build.SourcesDirectory)/ || echo 'Failed to copy coverage results' + displayName: 'Copy test results from Alpine ARM64 container' + condition: always() + + - script: | + # Clean up containers + docker stop test-container-alpine-arm64 || true + docker rm test-container-alpine-arm64 || true + docker stop sqlserver-alpine-arm64 || true + docker rm sqlserver-alpine-arm64 || true + displayName: 'Clean up Alpine ARM64 containers' + condition: always() + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/test-results-alpine-arm64.xml' + testRunTitle: 'Publish pytest results on Alpine ARM64' diff --git a/mssql_python/libs/linux/alpine/arm64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt b/mssql_python/libs/linux/alpine/arm64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt new file mode 100644 index 00000000..ebd7b315 --- /dev/null +++ b/mssql_python/libs/linux/alpine/arm64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt @@ -0,0 +1,76 @@ +MICROSOFT SOFTWARE LICENSE TERMS +MICROSOFT ODBC DRIVER 18 FOR SQL SERVER + +These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. + +1. INSTALLATION AND USE RIGHTS. + + a) General. You may install and use any number of copies of the software to develop and test your applications. + b) Third Party Software. The software may include third party applications that Microsoft, not the third party, licenses to you under this agreement. Any included notices for third party applications are for your information only. + +2. DISTRIBUTABLE CODE. The software may contain code you are permitted to distribute (i.e. make available for third parties) in applications you develop, as described in this Section. + + a) Distribution Rights. The code and test files described below are distributable if included with the software. + + i. REDIST.TXT Files. You may copy and distribute the object code form of code listed on the REDIST list in the software, if any, or listed at REDIST (https://aka.ms/odbc18eularedist); + ii. Image Library. You may copy and distribute images, graphics, and animations in the Image Library as described in the software documentation; + iii. Sample Code, Templates, and Styles. You may copy, modify, and distribute the source and object code form of code marked as “sample”, “template”, “simple styles”, and “sketch styles”; and + iv. Third Party Distribution. You may permit distributors of your applications to copy and distribute any of this distributable code you elect to distribute with your applications. + + b) Distribution Requirements. For any code you distribute, you must: + + i. add significant primary functionality to it in your applications; + ii. require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and + iii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code. + + c) Distribution Restrictions. You may not: + + i. use Microsoft’s trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or + ii. modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft’s other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it. + +3. DATA COLLECTION. Some features in the software may enable collection of data from users of your applications that access or use the software. If you use these features to enable data collection in your applications, you must comply with applicable law, including getting any required user consent, and maintain a prominent privacy policy that accurately informs users about how you use, collect, and share their data. You agree to comply with all applicable provisions of the Microsoft Privacy Statement at [https://go.microsoft.com/fwlink/?LinkId=521839]. + +4. SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to): + + d) use the software in any way that is against the law or to create or propagate malware; or + e) share, publish, distribute, or lend the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone hosted solution for others to use, or transfer the software or this agreement to any third party. + +5. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit http://aka.ms/exporting. + +6. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is “as is”, “with all faults”, and without warranty of any kind. + +7. UPDATES. The software may periodically check for updates, and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices. + +8. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software. + +9. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired the software in any other country, its laws apply. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court. If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court. + +10. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you: + + a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights. + b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software. + c) Germany and Austria. + + i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software. + ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law. + + Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence. + +11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + +12. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES. + + This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law. + It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages. + Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French. + Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français. + + EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues. + LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices. + + Cette limitation concerne: + • tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et + • les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur. + + Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard. + EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas. diff --git a/mssql_python/libs/linux/alpine/arm64/lib/libmsodbcsql-18.5.so.1.1 b/mssql_python/libs/linux/alpine/arm64/lib/libmsodbcsql-18.5.so.1.1 new file mode 100755 index 00000000..d8849831 Binary files /dev/null and b/mssql_python/libs/linux/alpine/arm64/lib/libmsodbcsql-18.5.so.1.1 differ diff --git a/mssql_python/libs/linux/alpine/arm64/lib/libodbcinst.so.2 b/mssql_python/libs/linux/alpine/arm64/lib/libodbcinst.so.2 new file mode 100755 index 00000000..62a79a36 Binary files /dev/null and b/mssql_python/libs/linux/alpine/arm64/lib/libodbcinst.so.2 differ diff --git a/mssql_python/libs/linux/alpine/arm64/share/resources/en_US/msodbcsqlr18.rll b/mssql_python/libs/linux/alpine/arm64/share/resources/en_US/msodbcsqlr18.rll new file mode 100644 index 00000000..0f69236e Binary files /dev/null and b/mssql_python/libs/linux/alpine/arm64/share/resources/en_US/msodbcsqlr18.rll differ diff --git a/mssql_python/libs/linux/alpine/x86_64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt b/mssql_python/libs/linux/alpine/x86_64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt new file mode 100644 index 00000000..ebd7b315 --- /dev/null +++ b/mssql_python/libs/linux/alpine/x86_64/lib/MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt @@ -0,0 +1,76 @@ +MICROSOFT SOFTWARE LICENSE TERMS +MICROSOFT ODBC DRIVER 18 FOR SQL SERVER + +These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. + +1. INSTALLATION AND USE RIGHTS. + + a) General. You may install and use any number of copies of the software to develop and test your applications. + b) Third Party Software. The software may include third party applications that Microsoft, not the third party, licenses to you under this agreement. Any included notices for third party applications are for your information only. + +2. DISTRIBUTABLE CODE. The software may contain code you are permitted to distribute (i.e. make available for third parties) in applications you develop, as described in this Section. + + a) Distribution Rights. The code and test files described below are distributable if included with the software. + + i. REDIST.TXT Files. You may copy and distribute the object code form of code listed on the REDIST list in the software, if any, or listed at REDIST (https://aka.ms/odbc18eularedist); + ii. Image Library. You may copy and distribute images, graphics, and animations in the Image Library as described in the software documentation; + iii. Sample Code, Templates, and Styles. You may copy, modify, and distribute the source and object code form of code marked as “sample”, “template”, “simple styles”, and “sketch styles”; and + iv. Third Party Distribution. You may permit distributors of your applications to copy and distribute any of this distributable code you elect to distribute with your applications. + + b) Distribution Requirements. For any code you distribute, you must: + + i. add significant primary functionality to it in your applications; + ii. require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and + iii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code. + + c) Distribution Restrictions. You may not: + + i. use Microsoft’s trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or + ii. modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft’s other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it. + +3. DATA COLLECTION. Some features in the software may enable collection of data from users of your applications that access or use the software. If you use these features to enable data collection in your applications, you must comply with applicable law, including getting any required user consent, and maintain a prominent privacy policy that accurately informs users about how you use, collect, and share their data. You agree to comply with all applicable provisions of the Microsoft Privacy Statement at [https://go.microsoft.com/fwlink/?LinkId=521839]. + +4. SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to): + + d) use the software in any way that is against the law or to create or propagate malware; or + e) share, publish, distribute, or lend the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone hosted solution for others to use, or transfer the software or this agreement to any third party. + +5. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit http://aka.ms/exporting. + +6. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is “as is”, “with all faults”, and without warranty of any kind. + +7. UPDATES. The software may periodically check for updates, and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices. + +8. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software. + +9. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired the software in any other country, its laws apply. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court. If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court. + +10. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you: + + a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights. + b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software. + c) Germany and Austria. + + i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software. + ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law. + + Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence. + +11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + +12. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES. + + This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law. + It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages. + Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French. + Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français. + + EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues. + LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices. + + Cette limitation concerne: + • tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et + • les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur. + + Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard. + EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas. diff --git a/mssql_python/libs/linux/alpine/x86_64/lib/libmsodbcsql-18.5.so.1.1 b/mssql_python/libs/linux/alpine/x86_64/lib/libmsodbcsql-18.5.so.1.1 new file mode 100755 index 00000000..9ec7372c Binary files /dev/null and b/mssql_python/libs/linux/alpine/x86_64/lib/libmsodbcsql-18.5.so.1.1 differ diff --git a/mssql_python/libs/linux/alpine/x86_64/lib/libodbcinst.so.2 b/mssql_python/libs/linux/alpine/x86_64/lib/libodbcinst.so.2 new file mode 100755 index 00000000..ceecc8c8 Binary files /dev/null and b/mssql_python/libs/linux/alpine/x86_64/lib/libodbcinst.so.2 differ diff --git a/mssql_python/libs/linux/alpine/x86_64/share/resources/en_US/msodbcsqlr18.rll b/mssql_python/libs/linux/alpine/x86_64/share/resources/en_US/msodbcsqlr18.rll new file mode 100644 index 00000000..0f69236e Binary files /dev/null and b/mssql_python/libs/linux/alpine/x86_64/share/resources/en_US/msodbcsqlr18.rll differ