Skip to content

Commit

Permalink
Update MySQL to 8.4.0 and OpenSSL to 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Jun 6, 2024
1 parent 58d929f commit 21d281e
Show file tree
Hide file tree
Showing 30 changed files with 536 additions and 237 deletions.
Binary file modified Shared/data/MTA San Andreas/server/arm64/libcrypto-3-arm64.dll
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/arm64/libmysql.dll
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/arm64/libssl-3-arm64.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/mods/deathmatch/libssl-3.dll
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/x64/libcrypto-3-x64.dll
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/x64/libmysql.dll
Binary file not shown.
Binary file modified Shared/data/MTA San Andreas/server/x64/libssl-3-x64.dll
Binary file not shown.
140 changes: 101 additions & 39 deletions vendor/mysql/LICENSE
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
Licensing Information User Manual

MySQL 8.3.0 Community
MySQL 8.4.0 Community
__________________________________________________________________

Introduction

This License Information User Manual contains Oracle's product license
and other licensing information, including licensing information for
third-party software which may be included in this distribution of
MySQL 8.3.0 Community.
MySQL 8.4.0 Community.

Last updated: November 2023
Last updated: March 2024

Licensing Information

This release of MySQL 8.3.0 Community is brought to you by the MySQL
This release of MySQL 8.4.0 Community is brought to you by the MySQL
team at Oracle. This software is released under version 2 of the GNU
General Public License (GPLv2), as set forth below, with the following
additional permissions:

This distribution of MySQL 8.3.0 Community is distributed with certain
software (including but not limited to OpenSSL) that is licensed under
separate terms, as designated in a particular file or component or in
the license documentation. Without limiting your rights under the
GPLv2, the authors of MySQL hereby grant you an additional permission
to link the program and your derivative works with the separately
licensed software that they have included with the program.
This distribution of MySQL 8.4.0 Community is designed to work with
certain software (including but not limited to OpenSSL) that is
licensed under separate terms, as designated in a particular file or
component or in the license documentation. Without limiting your rights
under the GPLv2, the authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with the
program or referenced in the documentation.

This distribution includes the MySQL C API client library
(libmysqlclient) otherwise known as MySQL Connector/C. Without limiting
Expand All @@ -35,7 +36,7 @@ Licensing Information
reproduced below and can also be found along with its FAQ at
http://oss.oracle.com/licenses/universal-foss-exception.

Copyright (c) 1997, 2023, Oracle and/or its affiliates.
Copyright (c) 1997, 2024, Oracle and/or its affiliates.

Election of GPLv2

Expand Down Expand Up @@ -1551,6 +1552,35 @@ of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.

4th party - abseil-cpp
----------------------

=== Header in source files:
// Copyright 2017 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This header file contains C++11 versions of standard <utility> header
// abstractions available within C++14 and C++17, and are designed to be
// drop-in replacement for code compliant with C++14 and C++17.

Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/

A copy of the Apache License v2.0, January 2004 license can be found
in the 'Standard Licenses' section.

======================================================================
======================================================================

Expand Down Expand Up @@ -1626,6 +1656,40 @@ POSSIBILITY OF SUCH DAMAGE.
======================================================================
======================================================================

gperftools

Copyright (c) 2005, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

======================================================================
======================================================================

ICU4C Unicode Libraries

COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
Expand Down Expand Up @@ -4060,33 +4124,6 @@ the suitability of this software for any purpose. It is provided
======================================================================
======================================================================

Robin Hood Hash

MIT License

Copyright (c) 2018-2021 Martin Ankerl

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

======================================================================
======================================================================

Time Zone Information

Unless specified below, all files in the tz code and data (including this
Expand Down Expand Up @@ -4373,6 +4410,31 @@ their respective owners.
======================================================================
======================================================================

unordered_dense

Copyright (c) 2022 Martin Leitner-Ankerl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

======================================================================
======================================================================

zlib

Oracle gratefully acknowledges the contributions of Jean-loup Gailly
Expand Down
10 changes: 0 additions & 10 deletions vendor/mysql/README

This file was deleted.

102 changes: 102 additions & 0 deletions vendor/mysql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
DLL files can be found in "Shared/data/MTA San Andreas/server".
That directory gets copied to the "Bin" directory when you run "win-install-data.bat".

The source code for MySQL and OpenSSL used to produce the binaries can be found here:
https://github.com/mysql/mysql-server/releases/tag/mysql-8.4.0
https://github.com/openssl/openssl/releases/tag/openssl-3.3.1

## How to compile OpenSSL

1. Install [Perl](https://strawberryperl.com/)
2. Install [NASM](https://www.nasm.us/)
3. Ensure both Perl and NASM are available on your `%PATH%`
4. Clone the repository
```bat
git clone --recurse-submodules https://github.com/openssl/openssl.git
cd openssl
```
5. Switch to the release tag
```bat
git switch --detach --force --recurse-submodules openssl-3.3.1
```
6. Run `VsDevCmd.cmd` to open three Developer Command Prompts
> [!IMPORTANT]
> The next steps assume the OpenSSL checkout directory is `C:\GitHub\openssl`
7. Switch to the `VsDevCmd: x64` console window and run these commands there:
```bat
cd C:\GitHub\openssl
perl Configure --release --prefix="%cd%\VC-WIN64A\OpenSSL" --openssldir="%cd%\VC-WIN64A\SSL" /MT VC-WIN64A
nmake
nmake install
```
8. Switch to the `VsDevCmd: x86` console window and run these commands there:
```bat
cd C:\GitHub\openssl
git clean -f -x
perl Configure --release --prefix="%cd%\VC-WIN32\OpenSSL" --openssldir="%cd%\VC-WIN32\SSL" /MT VC-WIN32
nmake
nmake install
```
9. Switch to the `VsDevCmd: arm64` console window and run these commands there:
```bat
cd C:\GitHub\openssl
git clean -f -x
perl Configure --release --prefix="%cd%\VC-WIN64-ARM\OpenSSL" --openssldir="%cd%\VC-WIN64-ARM\SSL" /MT VC-WIN64-ARM
nmake
nmake install
```
10.
> [!IMPORTANT]
> Copy `VC-WIN64A\OpenSSL\include\openssl\applink.c` to `VC-WIN64-ARM\OpenSSL\include\openssl\`

## How to compile MySQL

1. Compile OpenSSL with the steps above
2. Install [CMake](https://cmake.org/download/)
3. Clone the repository
```bat
git clone --recurse-submodules https://github.com/mysql/mysql-server.git
cd mysql-server
```
4. Switch to the release tag
```bat
git switch --detach --force --recurse-submodules mysql-8.4.0
```
5. Apply the patch file
```bat
git apply path\to\vendor\mysql\mysql-server.diff
```
6. Run `VsDevCmd.cmd` to open three Developer Command Prompts
> [!IMPORTANT]
> The next steps assume the OpenSSL checkout directory is `C:\GitHub\openssl` and the MySQL checkout directory is `C:\GitHub\mysql-server`.
> You must always compile x64 before cross-compiling arm64.
7. Switch to the `VsDevCmd: x64` console window and run these commands there:
```bat
cmake -G "Visual Studio 17 2022" -A x64 -B build-x64 -DCMAKE_INSTALL_PREFIX="%cd%\install-x64" -DWITH_SSL="C:\GitHub\openssl\VC-WIN64A\OpenSSL"
cmake --build build-x64 --target INSTALL --config RelWithDebInfo
```
8. Switch to the `VsDevCmd: x86` console window and run these commands there:
```bat
cmake -G "Visual Studio 17 2022" -A Win32 -B build-x86 -DCMAKE_INSTALL_PREFIX="%cd%\install-x86" -DWITH_SSL="C:\GitHub\openssl\VC-WIN32\OpenSSL"
cmake --build build-x86 --target INSTALL --config RelWithDebInfo
```
9. Switch to the `VsDevCmd: arm64` console window and run these commands there:
```bat
cmake -G "Visual Studio 17 2022" -A ARM64 -B build-arm64 -DCMAKE_INSTALL_PREFIX="%cd%\install-arm64" -DWITH_SSL="C:\GitHub\openssl\VC-WIN64-ARM\OpenSSL"
cmake --build build-arm64 --target INSTALL --config RelWithDebInfo
```

## How to update MySQL

1. Compile MySQL with the steps above
2. Copy each folder `C:\GitHub\mysql-server\install-{x86,x64,arm64}\` to a temporary directory.
3. Copy `install-x64\LICENSE` to `vendor\mysql`
4. Copy `install-x64\include` to `vendor\mysql\include`
5. For each `install-{arch}` folder:
1. Delete all folders, but keep `bin` and `lib`.
2. In `lib` folder delete everything, but keep `libmysql.{dll,lib,pdb}`.
3. In `bin` folder delete everything, but keep `libcrypto-*` and `libssql-*` files.
4. Sign all `*.dll` files.
5. Copy signed `*.dll` files to their designed subfolder in `Shared\data\MTA San Andreas\server`.
6. Copy `lib\libmysql.lib` to `vendor\mysql\lib\{arch}\`.
6. Commit the update.
27 changes: 27 additions & 0 deletions vendor/mysql/VsDevCmd.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@echo off

set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist "%VSWHERE%" goto :FindVisualStudio

echo Unable to locate Visual Studio: vswhere not found
echo ^>^> %VSWHERE%
pause
exit /b 1

:FindVisualStudio
for /f "usebackq tokens=*" %%i in (`call "%VSWHERE%" -latest -requires Microsoft.Component.MSBuild -find "**\VsDevCmd.bat"`) do (
set VSDEVCMD=%%i
)

if defined VSDEVCMD goto :SetupEnv
echo Visual Studio not found
echo Make sure you've installed the 'Desktop development with C++' workload
pause
exit /b 1

:SetupEnv
echo Found Visual Studio environment setup batch file:
echo ^>^> %VSDEVCMD%
start "VsDevCmd: arm64" "%comspec%" /k "%VSDEVCMD%" -arch=arm64 -host_arch=amd64
start "VsDevCmd: x64" "%comspec%" /k "%VSDEVCMD%" -arch=amd64 -host_arch=amd64
start "VsDevCmd: x86" "%comspec%" /k "%VSDEVCMD%" -arch=x86 -host_arch=amd64
7 changes: 4 additions & 3 deletions vendor/mysql/include/errmsg.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#ifndef ERRMSG_INCLUDED
#define ERRMSG_INCLUDED

/* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
/* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand Down
7 changes: 4 additions & 3 deletions vendor/mysql/include/field_types.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* Copyright (c) 2014, 2023, Oracle and/or its affiliates.
/* Copyright (c) 2014, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have included with MySQL.
separately licensed software that they have either included with
the program or referenced in the documentation.
Without limiting anything contained in the foregoing, this file,
which is part of C Driver for MySQL (Connector/C), is also subject to the
Expand Down
Loading

0 comments on commit 21d281e

Please sign in to comment.