From 6d11f06eb57b6fbc66c240cd2a00fbbedfb4b8d4 Mon Sep 17 00:00:00 2001 From: lookshe Date: Tue, 7 Jan 2025 20:23:31 +0100 Subject: [PATCH] add mariadb 10.3 for debian bookworm --- .gitignore | 1 + mariadb-10.3-bookworm/Dockerfile | 37 ++++++++++++++++++++++++++++++ mariadb-10.3-bookworm/README.md | 25 ++++++++++++++++++++ mariadb-10.3-bookworm/out/.gitkeep | 0 4 files changed, 63 insertions(+) create mode 100644 .gitignore create mode 100644 mariadb-10.3-bookworm/Dockerfile create mode 100644 mariadb-10.3-bookworm/README.md create mode 100644 mariadb-10.3-bookworm/out/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..022928c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +mariadb-10.3-bookworm/out/* diff --git a/mariadb-10.3-bookworm/Dockerfile b/mariadb-10.3-bookworm/Dockerfile new file mode 100644 index 0000000..dc37fda --- /dev/null +++ b/mariadb-10.3-bookworm/Dockerfile @@ -0,0 +1,37 @@ +FROM docker.io/debian:bookworm as build-stage + +RUN sed -i 's/Types: deb$/Types: deb deb-src/g' /etc/apt/sources.list.d/debian.sources +RUN apt-get update \ + && apt-get build-dep -y mariadb-server +RUN apt-get update \ + && apt-get install -y \ + software-properties-common \ + devscripts \ + chrpath \ + dh-apparmor \ + libaio-dev \ + libpcre3-dev \ + wget +RUN wget http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline5_5.2+dfsg-3+b13_amd64.deb +RUN dpkg -i libreadline5_5.2+dfsg-3+b13_amd64.deb +RUN wget http://ftp.de.debian.org/debian/pool/main/r/readline5/libreadline-gplv2-dev_5.2+dfsg-3+b13_amd64.deb +RUN apt-get update \ + && apt-get install -y \ + libreadline5 +RUN dpkg -i libreadline-gplv2-dev_5.2+dfsg-3+b13_amd64.deb +RUN git clone https://github.com/MariaDB/server.git +RUN cd server \ + && echo checkout 10.3.39 \ + && git fetch \ + && git checkout mariadb-10.3.39 +RUN cd server \ + && sed -i '118s/system/bundled/' cmake/build_configurations/mysql_release.cmake +RUN cd server \ + && sed -i '15s/GNUTLS/OPENSSL/' cmake/mariadb_connector_c.cmake +RUN cd server \ + && ./debian/autobake-deb.sh + +FROM scratch + +COPY --from=build-stage /*.deb . + diff --git a/mariadb-10.3-bookworm/README.md b/mariadb-10.3-bookworm/README.md new file mode 100644 index 0000000..983d145 --- /dev/null +++ b/mariadb-10.3-bookworm/README.md @@ -0,0 +1,25 @@ +## MariaDB 10.3 for Debian Bookworm + +Build latest tag of MariaDB 10.3 for Debian Bookworm. + +### Build + +Build is done inside Debian Bookworm docker with +``` +DOCKER_BUILDKIT=1 podman build --output out . +``` + +### Upload installation files in repository + +Upload the .deb files to repository with +``` +export REPO_TOKEN=xyz +export USERNAME=lookshe +for DEB in $(ls out/*.deb) +do + curl -H "Authorization: token $REPO_TOKEN" \ + --upload-file "$DEB" \ + "https://git.fucktheforce.de/api/packages/$USERNAME/debian/pool/bookworm/main/upload" +done +``` + diff --git a/mariadb-10.3-bookworm/out/.gitkeep b/mariadb-10.3-bookworm/out/.gitkeep new file mode 100644 index 0000000..e69de29