From acce92446f471fd4b8d5cc513dcc6e948f74188e Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 28 May 2024 21:41:54 +1000 Subject: [PATCH] ubi: align galera comments, sticky bit for /run/mariadb /run/mariadb should be able to be written by any user in an unpriv mode, but that socket written there shouldn't be deletable by anyone, so sticky bit restricts this to the creating user. Align comments around galera and clarify that its the deb/rpm packaging differences that result in different locations. --- 10.11-ubi/Dockerfile | 9 +++++---- 10.6-ubi/Dockerfile | 9 +++++---- Dockerfile-ubi.template | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/10.11-ubi/Dockerfile b/10.11-ubi/Dockerfile index 086728f6..51c28c28 100644 --- a/10.11-ubi/Dockerfile +++ b/10.11-ubi/Dockerfile @@ -36,11 +36,12 @@ RUN curl https://pagure.io/fedora-web/websites/raw/master/f/sites/getfedora.org/ microdnf reinstall -y tzdata && \ microdnf install -y procps-ng zstd xz jemalloc pwgen pv && \ mkdir -p /etc/mysql/conf.d /etc/mysql/mariadb.conf.d/ /var/lib/mysql/mysql /run/mariadb /usr/lib64/galera && \ + chmod ugo+rwx,o+t /run/mariadb && \ microdnf install -y MariaDB-backup-10.11.8 MariaDB-server-10.11.8 && \ - # compatibility with Ubuntu images - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ - # compatibility with UBI 8 - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ + # compatibility with DEB Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ + # compatibility with RPM Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ microdnf clean all && \ rmdir /var/lib/mysql/mysql && \ chown -R mysql:mysql /var/lib/mysql /run/mariadb && \ diff --git a/10.6-ubi/Dockerfile b/10.6-ubi/Dockerfile index 8279d837..4f8a2483 100644 --- a/10.6-ubi/Dockerfile +++ b/10.6-ubi/Dockerfile @@ -36,11 +36,12 @@ RUN curl https://pagure.io/fedora-web/websites/raw/master/f/sites/getfedora.org/ microdnf reinstall -y tzdata && \ microdnf install -y procps-ng zstd xz jemalloc pwgen pv && \ mkdir -p /etc/mysql/conf.d /etc/mysql/mariadb.conf.d/ /var/lib/mysql/mysql /run/mariadb /usr/lib64/galera && \ + chmod ugo+rwx,o+t /run/mariadb && \ microdnf install -y MariaDB-backup-10.6.18 MariaDB-server-10.6.18 && \ - # compatibility with Ubuntu images - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ - # compatibility with UBI 8 - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ + # compatibility with DEB Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ + # compatibility with RPM Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ microdnf clean all && \ rmdir /var/lib/mysql/mysql && \ chown -R mysql:mysql /var/lib/mysql /run/mariadb && \ diff --git a/Dockerfile-ubi.template b/Dockerfile-ubi.template index 8ab21acb..4a1d29e1 100644 --- a/Dockerfile-ubi.template +++ b/Dockerfile-ubi.template @@ -36,11 +36,12 @@ RUN curl https://pagure.io/fedora-web/websites/raw/master/f/sites/getfedora.org/ microdnf reinstall -y tzdata && \ microdnf install -y procps-ng zstd xz jemalloc pwgen pv && \ mkdir -p /etc/mysql/conf.d /etc/mysql/mariadb.conf.d/ /var/lib/mysql/mysql /run/mariadb /usr/lib64/galera && \ + chmod ugo+rwx,o+t /run/mariadb && \ microdnf install -y MariaDB-backup-%%MARIADB_VERSION_BASIC%% MariaDB-server-%%MARIADB_VERSION_BASIC%% && \ - # compatibility with Ubuntu images - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ - # compatibility with UBI 8 - ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ + # compatibility with DEB Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib/libgalera_smm.so && \ + # compatibility with RPM Galera packaging + ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so && \ microdnf clean all && \ rmdir /var/lib/mysql/mysql && \ chown -R mysql:mysql /var/lib/mysql /run/mariadb && \