Skip to content

Commit

Permalink
Update to 8.0.33 and 5.7.42 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay authored Jul 14, 2023
1 parent 289ee41 commit 80905f5
Show file tree
Hide file tree
Showing 94 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 5.7/base_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7.41
5.7.42
2 changes: 1 addition & 1 deletion 8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY /files/percona-xtrabackup80 /etc/apt/preferences.d
RUN apt-get -qq update >/dev/null && apt-get -qq install -y -o Dpkg::Options::="--force-confold" curl libcurl4-openssl-dev >/dev/null

RUN apt install -y mysql-server >/dev/null || apt-get install -y mysql-server --fix-missing --fix-broken >/dev/null
ADD /mysql-8.0.31 /tmp
ADD /mysql-8.0.33 /tmp
RUN ls -lR /tmp

RUN apt-get install -y --allow-downgrades -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests /tmp/archives-${TARGETPLATFORM#linux/}/*.deb >/dev/null
Expand Down
14 changes: 14 additions & 0 deletions 8.0/capture-mysql8-debs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -eu -o pipefail
set -x

V=mysql-8.0.33

rm -rf ${V} && mkdir -p $V/archives-{amd64,arm64}/partial && chmod -R ugo+rw $V/archives-{amd64,arm64} && sudo chown -R root $V/archives-{amd64,arm64}

for PLATFORM in arm64 amd64; do
docker run --rm --platform linux/$PLATFORM -v $PWD/$V/archives-$PLATFORM:/var/cache/apt/archives --name mysql-$PLATFORM --rm ubuntu:20.04 bash -c "apt-get update && apt-get upgrade -y && apt-get install -y --download-only mysql-server"
done

rm -rf ${V}/archives*/{lock,partial}
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion 8.0/mysql_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.31
8.0.33
2 changes: 1 addition & 1 deletion 8.0/xtrabackup_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.31-24-1
8.0.33-27-1
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# mysql-arm64-images
Build tools for mysql arm64 images

Oracle does not publish any arm64 images for mysql, but people on mac M1 ([ddev](github.com/ddev/ddev)) certainly need native images.
Oracle does not publish any arm64 images for mysql, but people on Apple Silicon ([ddev](github.com/ddev/ddev)) certainly need native images.

This repo is used for publishing those images.

## Preparation

Because mysql-server-8.0 is usually ahead of the released xtrabackup version, it's important to capture the mysql-server and mysql-client deb files ahead of time, when we're expecting a new xtrabackup version.

To do this, for both PLATFORM=linux/amd64 and PLATFORM=linux/arm64, `docker run -it --platform=$PLATFORM --rm ubuntu:20.04 bash` and `apt update && apt upgrade -y && apt install -y mysql-server` and then remove all that with `apt remove mysql-server mysql-client && apt autoremove`. This should put the system in position where the exact needed items will be downloaded with `apt install -y --download-only mysql-server-8.0`, after which all the need .deb files will be in /var/cache/apt/archives and they can be updated into the replacement of mysql-8.0.31
The script `8.0/capture-mysql8-debs.sh` will download the named version's Debian packages. `cd 8.0 && ./capture-mysql8-debs.sh` and then update the Dockerfile to use the new packages. This only works on systems like Apple Silicon that can run both linux/amd64 and linux/arm64 containers.

This does the things below.

> To do this, for both PLATFORM=linux/amd64 and PLATFORM=linux/arm64, `docker run -it --platform=$PLATFORM --rm ubuntu:20.04 bash` and `apt update && apt upgrade -y && apt install -y mysql-server` and then remove all that with `apt remove mysql-server mysql-client && apt autoremove`. This should put the system in position where the exact needed items will be downloaded with `apt install -y --download-only mysql-server-8.0`, after which all the need .deb files will be in /var/cache/apt/archives and they can be updated into the replacement of mysql-8.0.33.
## Building and pushing

Expand Down

0 comments on commit 80905f5

Please sign in to comment.