Compare commits

...
Sign in to create a new pull request.

1 commit

View file

@ -104,7 +104,7 @@ ExcludeArch: %{ix86}
Name: %{majorname}%{majorversion}
Version: %{package_version}
Release: 2%{?with_debug:.debug}%{?dist}
Release: 1%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries
URL: http://www.mysql.com
@ -393,6 +393,7 @@ Requires: %{_sysconfdir}/my.cnf.d
Requires: %{pkgname}-errmsg = %{sameevr}
%{?mecab:Requires: mecab-ipadic}
Requires: coreutils
Requires(pre): /usr/sbin/useradd
# We require this to be present for %%{_tmpfilesdir}
Requires: systemd
# Make sure it's there when scriptlets run, too
@ -654,13 +655,6 @@ 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 - '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
@ -798,6 +792,11 @@ popd
%pre -n %{pkgname}-server
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g mysql -o -r -d %{dbdatadir} -s /sbin/nologin \
-c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
%post -n %{pkgname}-server
%systemd_post %{daemon_name}.service
if [ ! -e "%{logfile}" -a ! -h "%{logfile}" ] ; then
@ -978,7 +977,6 @@ fi
%{_libexecdir}/mysql-scripts-common
%{_tmpfilesdir}/%{daemon_name}.conf
%{_sysusersdir}/%{name}.conf
%attr(0755,mysql,mysql) %dir %{dbdatadir}
%attr(0750,mysql,mysql) %dir %{_localstatedir}/lib/mysql-files
%attr(0700,mysql,mysql) %dir %{_localstatedir}/lib/mysql-keyring