From 2d6d1bf1c4c6469207e10cfe397e7a5d6ce58de8 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Thu, 30 Oct 2025 07:56:23 +0000 Subject: [PATCH] Revert to soft static allocation of MariaDB and MySQL sysusers.d files Resolves: RHEL-119789 Related PR for `setup` RPM: https://src.fedoraproject.org/rpms/setup/pull-request/30 Partially reverts commit: 646e37c The MariaDB and MySQL sysusers.d files has to use soft static allocation in order to correctly handle the MariaDB PAM v2 plugin which utilizes setuid-to-root binary "/usr/lib64/mariadb/plugin/auth_pam_tool_dir/auth_pam_tool". --- mysql8.4.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mysql8.4.spec b/mysql8.4.spec index 8b28c55..bf1d932 100644 --- a/mysql8.4.spec +++ b/mysql8.4.spec @@ -104,7 +104,7 @@ ExcludeArch: %{ix86} Name: %{majorname}%{majorversion} Version: %{package_version} -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -674,6 +674,13 @@ install -D -p -m 644 %{_vpath_builddir}/scripts/mysql@.service %{buildroot}%{_un install -D -p -m 0644 %{_vpath_builddir}/scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{daemon_name}.conf rm -r %{buildroot}%{_tmpfilesdir}/mysql.conf +# Create a sysusers.d config file +# We no longer enforce the hardcoded UID/GID 27 +mkdir -p %{buildroot}%{_sysusersdir} +cat > %{buildroot}%{_sysusersdir}/%{name}.conf << EOF +u mysql 27 'MariaDB and MySQL Server' %{dbdatadir} - +EOF + # helper scripts for service starting install -D -p -m 755 %{_vpath_builddir}/scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir install -p -m 755 %{_vpath_builddir}/scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop @@ -1133,6 +1140,9 @@ popd %endif %changelog +* Tue Feb 24 2026 Lukas Javorsky - 8.4.8-2 +- Revert to soft static allocation of MariaDB and MySQL sysusers.d files + * Fri Jan 23 2026 Michal Schorm - 8.4.8-1 - Rebase to 8.4.8