Skip to content

feat: mirror MySQL and MongoDB for Linux - #27

Closed
sineld wants to merge 4 commits into
flock-php:mainfrom
sineld:feat/linux-mysql-mongodb
Closed

sineld wants to merge 4 commits into
flock-php:mainfrom
sineld:feat/linux-mysql-mongodb

Conversation

@sineld

@sineld sineld commented Oct 19, 2026

Copy link
Copy Markdown

Builds on #24. The first three commits are that PR's; only the last one, feat: mirror MySQL and MongoDB for Linux, is new here. I'll rebase once #24 is in.

This adds MySQL (8.0, 8.4, 9.7) and MongoDB (7.0, 8.0, 9.0) for linux-x64 and linux-arm64, mirrored from the vendors like on macOS and Windows. Flock on Linux (flock-php/flock#12) installs them with no further change.

MongoDB

  • Which build: the Ubuntu 22.04 build, unchanged and checked against MongoDB's SHA-256. MongoDB only publishes per-distribution builds on Linux.
  • What it needs: glibc 2.35, OpenSSL 3 and libcurl, which current distributions have: Ubuntu 22.04+, Debian 12+, Fedora, RHEL 9+ and Arch.
  • Why not RHEL 8: the RHEL 8 build would reach older systems, but it needs OpenSSL 1.1, which reached its end of life.

MySQL

Oracle's generic glibc build, checked against Oracle's MD5 as the macOS mirror is, then repacked as tar.gz.

  • libaio and libnuma are added to lib/private/.
    • Oracle's binaries already look there first (RUNPATH $ORIGIN/../lib/private, where OpenSSL, protobuf and abseil are), so no binary is modified.
    • mysqld needs libaio.so.1 and libnuma.so.1 from the system, and Ubuntu 24.04 renamed libaio's library (libaio.so.1t64). Without this, mysqld doesn't start there.
    • The libraries come from AlmaLinux 8, the glibc 2.28 system Oracle builds against. dnf checks their package signatures.
  • ncurses is added the same way for the client. Only the sonames the binaries actually need are copied: ncurses 6, or ncurses 5 for 8.0's glibc 2.17 build.
  • Licenses: libaio and numactl are LGPL, so their source RPMs are published next to the archive, through sources/ as for Valkey's MSYS2 runtime. Their license texts go to lib/private/LICENSES/, together with ncurses'.
    • numactl: its RPMs carry no license text, so that one comes from numactl's repository at the installed version's tag.
  • arm64: Oracle publishes no minimal build, only an 820 MB archive. That archive holds a second debug server (mysqld-debug), debug plugins, and unstripped binaries. Those are dropped and the debug info stripped, which is what Oracle's minimal x86-64 build is. MySQL 8.4.11 for arm64 comes to 125 MB.
  • Docker: the repack needs it, so mirror.yml fetches linux-arm64 packages on an arm64 runner (AlmaLinux's arm64 packages, native strip).

Testing

All of this ran on my fork with publish off (https://github.com/sineld/binaries/actions/workflows/mirror.yml). The smoke test (smoke-service.sh) ran directly on ubuntu-24.04 and ubuntu-24.04-arm, which have no libaio.so.1.

Package Versions linux-x64 linux-arm64
mysql 8.0.46, 8.4.11, 9.7.2 ✓ initialize, query (InnoDB + JSON), shutdown ✓
mongodb 7.0.45, 8.0.34, 9.0.4 ✓ start, accept connections, stop ✓

MongoDB 8.0.34 for arm64 was also mirrored and smoke-tested on my Ubuntu 24.04 arm64 machine.

@sineld

sineld commented Oct 27, 2026

Copy link
Copy Markdown
Author

Closing: superseded by #34, see #24 (comment).

@sineld sineld closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant