Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/mysql/mirror.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
# Mirrors Oracle's MySQL Community Server archive unchanged on macOS (tar.gz) and Windows (zip).
# On Linux Oracle's generic build (glibc 2.28+, .tar.xz) is checked, then made fit for a desktop:
# without the debug server, debug symbols and test suite (1 GB → ~100 MB), and with libaio and
# libnuma bundled in lib/private (packages/mysql/linux/libs.sh), repacked as .tar.gz.
# without the debug server, debug symbols, test suite and the plugins that need more system
# libraries (FIDO/WebAuthn, telemetry), 1 GB → ~100 MB; with libaio and libnuma bundled in
# lib/private (packages/mysql/linux/libs.sh), repacked as .tar.gz.
# Usage: packages/mysql/mirror.sh <version> <platform> <out-file>
set -euo pipefail
. "$(dirname "$0")/../../scripts/lib.sh"
Expand All @@ -27,6 +28,10 @@ mysql_fetch "$V" "${names[0]}" "$tmp/mysql.tar.xz"
mkdir "$tmp/pkg" && tar -C "$tmp/pkg" -xJf "$tmp/mysql.tar.xz"
D="$(echo "$tmp"/pkg/*)"
rm -rf "$D/bin/mysqld-debug" "$D/lib/plugin/debug" "$D/mysql-test" "$D/docs" "$D/man" "$D/include"
# The FIDO/WebAuthn and telemetry plugins need libudev and libcurl from the system: left out, so
# the package only links what it ships (scripts/verify-linux.sh).
rm -f "$D"/lib/plugin/authentication_fido*.so "$D"/lib/plugin/authentication_webauthn*.so \
"$D"/lib/plugin/*telemetry*.so "$D"/lib/private/libfido2.so*
find "$D" -name '*.a' -delete
find "$D/bin" "$D/lib" -type f -exec sh -c 'file -b "$1" | grep -q ^ELF && strip --strip-debug "$1"' _ {} \;
bash "$(dirname "$0")/linux/libs.sh" "$D/lib/private" "$D/LICENSES"
Expand Down