Skip to content

fix(dbserver): drop xtrabackup's libcurl4-openssl-dev dependency for MySQL 8.0/8.4/9.7, fixes #8925 - #9023

Merged
rfay merged 1 commit into
mainfrom
20261027_rfay_xtrabackup_repack_curl_dev
Oct 27, 2026
Merged

rfay merged 1 commit into
mainfrom
20261027_rfay_xtrabackup_repack_curl_dev

Conversation

@rfay

@rfay rfay commented Oct 27, 2026

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

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.

The Issue

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.

How This PR Solves The Issue

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.

Manual Testing Instructions

cd containers/ddev-dbserver
make mysql_8.4
docker run --rm --entrypoint bash "$(docker images --format "{{.Repository}}:{{.Tag}}" ddev/ddev-dbserver-mysql-8.4 | head -1)" -c 'xtrabackup --version; apt-get check; dpkg -l | grep -c -- "-dev "'
# Expect the xtrabackup version, a clean apt-get check, and 0 -dev packages

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.

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

…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]>
@rfay
rfay requested a review from a team as a code owner October 27, 2026 14:50
@github-actions github-actions Bot added bugfix dependencies Pull requests that update a dependency file labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown

Pushed updated container image(s) for this PR:

  • ddev/ddev-dbserver-mariadb-10.0:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.11:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.1:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.2:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.3:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.4:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.5:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.6:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.7:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-10.8:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-11.4:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-11.8:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-12.3:c36ccfc0cb
  • ddev/ddev-dbserver-mariadb-5.5:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-5.5:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-5.6:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-5.7:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-8.0:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-8.4:c36ccfc0cb
  • ddev/ddev-dbserver-mysql-9.7:c36ccfc0cb

@github-actions

Copy link
Copy Markdown

Download this PR's build for your OS and architecture with:

ddev utility download-ddev --pr 9023

Or download the artifact for your OS and architecture directly:

See Testing a PR.

Open in GitHub Codespaces

@rfay

rfay commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Yay, https://github.com/ddev/ddev/actions/runs/40525079497

@rfay
rfay requested a review from stasadev October 27, 2026 16:02

@rfay rfay left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a pretty simple fix that should help us avoid this problem.

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

The images also lose about 23 -dev packages.

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

@rfay
rfay merged commit ba72716 into main Oct 27, 2026
114 of 115 checks passed
@rfay
rfay deleted the 20261027_rfay_xtrabackup_repack_curl_dev branch October 27, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MySQL 9.7 dbserver image build breaks when DHI's repo changes package versions

2 participants