From 603b7643098601306598f5da6211e96b8226d31f Mon Sep 17 00:00:00 2001 From: He Rengui Date: Tue, 3 Aug 2021 14:21:55 +0800 Subject: [PATCH] =?UTF-8?q?mysql=20=E5=AE=89=E8=A3=85=E6=97=B6=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=20mysql=20=E7=94=A8=E6=88=B7=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E4=BF=9D=E6=8C=81=E5=9B=BA=E5=AE=9A=20gid=20=E5=92=8C?= =?UTF-8?q?=20uid=EF=BC=8C=E4=B8=94=E4=B8=8D=E5=BA=94=E8=AF=A5=E5=9C=A8?= =?UTF-8?q?=E5=8D=B8=E8=BD=BD=20mysql=20=E6=97=B6=E5=88=A0=E9=99=A4=20mysq?= =?UTF-8?q?l=20=E7=94=A8=E6=88=B7=EF=BC=8C=E4=BF=AE=E6=94=B9=20spec=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E5=A4=84=E7=90=86=20mysql=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84=E9=80=BB=E8=BE=91=E4=B8=8E=20master?= =?UTF-8?q?=20=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: He Rengui --- mysql.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mysql.spec b/mysql.spec index 7d555aa..21a245d 100644 --- a/mysql.spec +++ b/mysql.spec @@ -7,7 +7,7 @@ %global boost_bundled_version 1.73.0 Name: mysql Version: 8.0.24 -Release: 1 +Release: 2 License: GPLv2 with exceptions and LGPLv2 and BSD Summary: The world's most popular open source database URL: http://www.mysql.com/ @@ -82,9 +82,9 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data rm -rf %{buildroot} %pre -if ! id %{name} > /dev/null 2>&1;then - useradd -M -s /sbin/nologin %{name} -fi +/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : +/usr/sbin/useradd -M -N -g mysql -o -r -d %{_sharedstatedir}/mysql -s /sbin/nologin \ + -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : %post if [ -f %{_prefix}/local/%{name}/support-files/mysql.server > /dev/null 2>&1 ] && [ ! -f %{_initddir}/mysql > /dev/null 2>&1 ];then @@ -113,9 +113,6 @@ if [ "$1" = 0 ];then fi %postun -if [ "$1" = 0 ];then - userdel -r %{name} &>/dev/null -fi %files %dir %{_prefix}/local/%{name} @@ -124,6 +121,10 @@ fi %exclude /usr/lib/debug %changelog +* Tue Aug 03 2021 herengui - 8.0.24-2 +- The user mysql should not be deleted when mysql is uninstalled + Set the mysql user/group to use a fixed uid/gid 27 + * Thu May 6 2021 wangxiao 8.0.24-1 - Upgrade mysql to 8.0.24, fix CVES: CVE-2021-2166 CVE-2021-2146 CVE-2021-2162 CVE-2021-2212 CVE-2021-2299 CVE-2021-2293 CVE-2021-2215 -- Gitee