fix(mysql) (#6058)

* fix(mysql)

closes #6023

* audit fix
This commit is contained in:
Jacob Heider 2024-05-03 20:47:55 -04:00 committed by GitHub
parent 6d7d374a78
commit 747c59e1a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,9 @@
distributable:
url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz
strip-components: 1
- url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz
strip-components: 1
# 8.4.0 doesn't provide a boost option
- url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-{{version}}.tar.gz
strip-components: 1
versions:
github: mysql/mysql-server/tags
@ -28,21 +31,32 @@ build:
freedesktop.org/pkg-config: ^0.29
gnu.org/bison: '>=3.0.4'
working-directory: build
script: |
script:
# https://www.mail-archive.com/ports@freebsd.org/msg00418.html
# And they *force* it on
sed -i.bak -e 's/\(STRING_APPEND.*moutline-atomics.*\)/# \1/' ../CMakeLists.txt
rm ../CMakeLists.txt.bak
- sed -i -e 's/\(STRING_APPEND.*moutline-atomics.*\)/# \1/' ../CMakeLists.txt
cmake .. $ARGS
make --jobs {{ hw.concurrency }} install
# FIXME: starting with 8.0.33, mysql reports:
# -- Found ZLIB: /Users/jacob/.pkgx/zlib.net/v1.2.13/lib/libz.dylib (found version "1.2.13")
# CMake Error at cmake/zlib.cmake:118 (MESSAGE):
# Cannot find system zlib libraries.
# Call Stack (most recent call first):
# CMakeLists.txt:1742 (MYSQL_CHECK_ZLIB)
- run: export ARGS="$(echo $ARGS | sed 's/WITH_ZLIB=system/WITH_ZLIB=bundled/g')"
if: '>=8.0.33<8.1'
- run: export ARGS="$ARGS -DCMAKE_C_STANDARD=17"
if: ^8.4
- cmake .. $ARGS
- make --jobs {{ hw.concurrency }} install
env:
ARGS:
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release
- -DFORCE_INSOURCE_BUILD=1
- -DCOMPILATION_COMMENT=tea.xyz
- -DCOMPILATION_COMMENT=pkgx
- -DINSTALL_DOCDIR=share/doc
- -DINSTALL_INCLUDEDIR=include
- -DINSTALL_INFODIR=share/info
@ -57,14 +71,7 @@ build:
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_SSL=system
# FIXME: starting with 8.0.33, mysql reports:
# -- Found ZLIB: /Users/jacob/.tea/zlib.net/v1.2.13/lib/libz.dylib (found version "1.2.13")
# CMake Error at cmake/zlib.cmake:118 (MESSAGE):
# Cannot find system zlib libraries.
# Call Stack (most recent call first):
# CMakeLists.txt:1742 (MYSQL_CHECK_ZLIB)
# - -DWITH_ZLIB=system
- -DWITH_ZLIB=bundled
- -DWITH_ZLIB=system
- -DWITH_ZSTD=system
- -DWITH_UNIT_TESTS=OFF
- -DENABLED_LOCAL_INFILE=1
@ -101,9 +108,7 @@ provides:
- bin/mysql_keyring_encryption_test
- bin/mysql_migrate_keyring
- bin/mysql_secure_installation
- bin/mysql_ssl_rsa_setup
- bin/mysql_tzinfo_to_sql
- bin/mysql_upgrade
- bin/mysqladmin
- bin/mysqlbinlog
- bin/mysqlcheck
@ -113,7 +118,6 @@ provides:
- bin/mysqldump
- bin/mysqldumpslow
- bin/mysqlimport
- bin/mysqlpump
- bin/mysqlrouter
- bin/mysqlrouter_keyring
- bin/mysqlrouter_passwd
@ -127,12 +131,12 @@ provides:
test:
dependencies:
gnu.org/coreutils: ^9
script: |
mkdir -p mysql
mkdir -p tmp
mysqld --no-defaults --initialize-insecure --user=$USER --datadir=$PWD/mysql --tmpdir=$PWD/tmp
PORT=$(shuf -i 2000-65000 -n 1)
mysqld --no-defaults --user=$USER --datadir=$PWD/mysql --port=$PORT --tmpdir=$PWD/tmp &
sleep 5
mysql --port=$PORT --user=root --password= --execute='show databases;'
mysqladmin --port=$PORT --user=root --password= shutdown
pkgx.sh: ^1
script:
- mkdir -p mysql tmp
- mysqld --no-defaults --initialize-insecure --user=$USER --datadir=$PWD/mysql --tmpdir=$PWD/tmp
- PORT=$(pkgx get-port | tail -n1)
- mysqld --no-defaults --user=$USER --datadir=$PWD/mysql --port=$PORT --tmpdir=$PWD/tmp &
- sleep 5
- mysql --port=$PORT --user=root --password= --execute='show databases;'
- mysqladmin --port=$PORT --user=root --password= shutdown