Repository navigation
fix(dbserver): drop xtrabackup's libcurl4-openssl-dev dependency for MySQL 8.0/8.4/9.7, fixes #8925 - #9023
Merged
Conversation
…MySQL 8.0/8.4/9.7, fixes #8925 [skip buildkite] The MySQL 8.0, 8.4 and 9.7 dbserver images now install a repacked `percona-xtrabackup` package without its `libcurl4-openssl-dev` dependency. This stops the builds from breaking whenever DHI's apt repository changes package versions. - Fixes #8925 Percona's xtrabackup packages declare `Depends: libcurl4-openssl-dev`. That pulls in a chain of `-dev` packages, and each one must exactly match its runtime library in the `dhi.io/mysql:*-dev` base image. DHI sometimes republishes packages with version strings that sort lower than the ones in the image, so apt refuses the install. MySQL 9.7 has failed three times this way. On amd64, MySQL 8.4 fails the same way today. Stas's suggestion in the issue: the Dockerfile downloads the package and removes `libcurl4-openssl-dev` from `Depends` with `sed`. It rebuilds the `.deb` and installs it with apt. The package already depends on the runtime `libcurl4t64`, so nothing is lost. When Percona drops the dependency, the `sed` matches nothing. dpkg doesn't record the `-dev` package as installed, so a `.ddev/db-build/Dockerfile` can still install it. The images also lose about 23 `-dev` packages. The `pxb24` branch for older MySQL and MariaDB does not change. ```bash cd containers/ddev-dbserver make mysql_8.4 docker run --rm --entrypoint bash ddev/ddev-dbserver-mysql-8.4:<tag> -c 'xtrabackup --version; apt-get check; dpkg -l | grep -c -- "-dev "' ``` Repeat for `mysql_8.0` and `mysql_9.7`. To confirm the snapshot path, run `ddev snapshot` and `ddev snapshot restore --latest` on a project with `database: mysql:8.4`. The existing dbserver container tests cover these images. Claude Code built all three on arm64 and checked the four xtrabackup binaries with `ldd`. It also ran the repack on the amd64 8.4 and 9.7 base images, where the plain install fails today. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Pushed updated container image(s) for this PR:
|
|
Download this PR's build for your OS and architecture with: ddev utility download-ddev --pr 9023Or download the artifact for your OS and architecture directly:
See Testing a PR. |
rfay
commented
Oct 27, 2026
rfay
left a comment
Member
Author
There was a problem hiding this comment.
Looks like a pretty simple fix that should help us avoid this problem.
stasadev
approved these changes
Oct 27, 2026
stasadev
left a comment
Member
There was a problem hiding this comment.
Looks good to me.
The images also lose about 23
-devpackages.
I like that the MySQL images also get smaller:
| amd64 | compressed | unpacked |
|---|---|---|
| mysql-8.0 | 318 → 282 MiB | 1889 → 1738 MB |
| mysql-8.4 | 230 → 205 MiB | 1407 → 1299 MB |
| mysql-9.7 | 241 → 216 MiB | 1450 → 1343 MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Summary (TL;DR)
The MySQL 8.0, 8.4 and 9.7 dbserver images now install a repacked
percona-xtrabackuppackage without itslibcurl4-openssl-devdependency. This stops the builds from breaking whenever DHI's apt repository changes package versions.The Issue
Percona's xtrabackup packages declare
Depends: libcurl4-openssl-dev. That pulls in a chain of-devpackages, and each one must exactly match its runtime library in thedhi.io/mysql:*-devbase image. DHI sometimes republishes packages with version strings that sort lower than the ones in the image, so apt refuses the install. MySQL 9.7 has failed three times this way. On amd64, MySQL 8.4 fails the same way today.How This PR Solves The Issue
Stas's suggestion in the issue: the Dockerfile downloads the package and removes
libcurl4-openssl-devfromDependswithsed. It rebuilds the.deband installs it with apt. The package already depends on the runtimelibcurl4t64, so nothing is lost. When Percona drops the dependency, thesedmatches nothing. dpkg doesn't record the-devpackage as installed, so a.ddev/db-build/Dockerfilecan still install it. The images also lose about 23-devpackages.The
pxb24branch for older MySQL and MariaDB does not change.Manual Testing Instructions
Repeat for
mysql_8.0andmysql_9.7. To confirm the snapshot path, runddev snapshotandddev snapshot restore --lateston a project withdatabase: mysql:8.4.Automated Testing Overview
The existing dbserver container tests cover these images. Claude Code built all three on arm64 and checked the four xtrabackup binaries with
ldd. It also ran the repack on the amd64 8.4 and 9.7 base images, where the plain install fails today.🤖 Developed with assistance from Claude Code