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: distributable:
url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz - url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz
strip-components: 1 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: versions:
github: mysql/mysql-server/tags github: mysql/mysql-server/tags
@ -28,21 +31,32 @@ build:
freedesktop.org/pkg-config: ^0.29 freedesktop.org/pkg-config: ^0.29
gnu.org/bison: '>=3.0.4' gnu.org/bison: '>=3.0.4'
working-directory: build working-directory: build
script: | script:
# https://www.mail-archive.com/ports@freebsd.org/msg00418.html # https://www.mail-archive.com/ports@freebsd.org/msg00418.html
# And they *force* it on # And they *force* it on
sed -i.bak -e 's/\(STRING_APPEND.*moutline-atomics.*\)/# \1/' ../CMakeLists.txt - sed -i -e 's/\(STRING_APPEND.*moutline-atomics.*\)/# \1/' ../CMakeLists.txt
rm ../CMakeLists.txt.bak
cmake .. $ARGS # FIXME: starting with 8.0.33, mysql reports:
make --jobs {{ hw.concurrency }} install # -- 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: env:
ARGS: ARGS:
- -DCMAKE_INSTALL_PREFIX={{prefix}} - -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
- -DFORCE_INSOURCE_BUILD=1 - -DFORCE_INSOURCE_BUILD=1
- -DCOMPILATION_COMMENT=tea.xyz - -DCOMPILATION_COMMENT=pkgx
- -DINSTALL_DOCDIR=share/doc - -DINSTALL_DOCDIR=share/doc
- -DINSTALL_INCLUDEDIR=include - -DINSTALL_INCLUDEDIR=include
- -DINSTALL_INFODIR=share/info - -DINSTALL_INFODIR=share/info
@ -57,14 +71,7 @@ build:
- -DWITH_LZ4=system - -DWITH_LZ4=system
- -DWITH_PROTOBUF=system - -DWITH_PROTOBUF=system
- -DWITH_SSL=system - -DWITH_SSL=system
# FIXME: starting with 8.0.33, mysql reports: - -DWITH_ZLIB=system
# -- 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_ZSTD=system - -DWITH_ZSTD=system
- -DWITH_UNIT_TESTS=OFF - -DWITH_UNIT_TESTS=OFF
- -DENABLED_LOCAL_INFILE=1 - -DENABLED_LOCAL_INFILE=1
@ -101,9 +108,7 @@ provides:
- bin/mysql_keyring_encryption_test - bin/mysql_keyring_encryption_test
- bin/mysql_migrate_keyring - bin/mysql_migrate_keyring
- bin/mysql_secure_installation - bin/mysql_secure_installation
- bin/mysql_ssl_rsa_setup
- bin/mysql_tzinfo_to_sql - bin/mysql_tzinfo_to_sql
- bin/mysql_upgrade
- bin/mysqladmin - bin/mysqladmin
- bin/mysqlbinlog - bin/mysqlbinlog
- bin/mysqlcheck - bin/mysqlcheck
@ -113,7 +118,6 @@ provides:
- bin/mysqldump - bin/mysqldump
- bin/mysqldumpslow - bin/mysqldumpslow
- bin/mysqlimport - bin/mysqlimport
- bin/mysqlpump
- bin/mysqlrouter - bin/mysqlrouter
- bin/mysqlrouter_keyring - bin/mysqlrouter_keyring
- bin/mysqlrouter_passwd - bin/mysqlrouter_passwd
@ -127,12 +131,12 @@ provides:
test: test:
dependencies: dependencies:
gnu.org/coreutils: ^9 gnu.org/coreutils: ^9
script: | pkgx.sh: ^1
mkdir -p mysql script:
mkdir -p tmp - mkdir -p mysql tmp
mysqld --no-defaults --initialize-insecure --user=$USER --datadir=$PWD/mysql --tmpdir=$PWD/tmp - mysqld --no-defaults --initialize-insecure --user=$USER --datadir=$PWD/mysql --tmpdir=$PWD/tmp
PORT=$(shuf -i 2000-65000 -n 1) - PORT=$(pkgx get-port | tail -n1)
mysqld --no-defaults --user=$USER --datadir=$PWD/mysql --port=$PORT --tmpdir=$PWD/tmp & - mysqld --no-defaults --user=$USER --datadir=$PWD/mysql --port=$PORT --tmpdir=$PWD/tmp &
sleep 5 - sleep 5
mysql --port=$PORT --user=root --password= --execute='show databases;' - mysql --port=$PORT --user=root --password= --execute='show databases;'
mysqladmin --port=$PORT --user=root --password= shutdown - mysqladmin --port=$PORT --user=root --password= shutdown