[packages/mysql/MYSQL_5_7] Start mysqld at an absolute nice level
arekm
arekm at pld-linux.org
Fri Oct 30 21:54:24 CET 2026
commit f9fbda432bd77e996a885bf401e01f9803174b84
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Oct 30 14:52:16 2026 +0100
Start mysqld at an absolute nice level
mysql.init | 3 ++-
mysql.spec | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/mysql.spec b/mysql.spec
index 83649f4..ad839d6 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -40,12 +40,12 @@ Release: 3
License: GPL v2 + MySQL FOSS License Exception
Group: Applications/Databases
#Source0Download: https://dev.mysql.com/downloads/mysql/5.7.html#downloads
-Source0: http://cdn.mysql.com/Downloads/MySQL-5.7/%{name}-%{version}.tar.gz
+Source0: https://cdn.mysql.com/Downloads/MySQL-5.7/%{name}-%{version}.tar.gz
# Source0-md5: ae41273621d44307ab6f3f7fd77baa44
-Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
+Source100: https://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
# Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666
%if %{without system_boost}
-Source101: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
+Source101: https://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
# Source101-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
%endif
Source1: %{name}.init
@@ -628,7 +628,7 @@ sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
# we don't package those (we have no -test or -testsuite pkg) and some of them just segfault
%{__rm} $RPM_BUILD_ROOT%{_bindir}/{mysql_client_test,mysqlxtest}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/test_udf_services.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/{test_udf_services,udf_example}.so
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-test
# libmysqld examples
%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql{_client_test_embedded,_embedded,test_embedded}
@@ -642,6 +642,9 @@ sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/rewrite_example.so
%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/test_security_context.so
+# not an .info file
+%{__rm} $RPM_BUILD_ROOT%{_infodir}/mysql.info
+
%clean
rm -rf $RPM_BUILD_ROOT
diff --git a/mysql.init b/mysql.init
index 4ba8995..c366501 100755
--- a/mysql.init
+++ b/mysql.init
@@ -290,7 +290,8 @@ mysqlstart() {
# SERVICE_LIMITS isn't applied automatically: mysqld is started directly, not via daemon()
_daemon_set_ulimits
- TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} \
+ # absolute nice level, as daemon() sets it; nice -n alone adds to the caller's level
+ TMPDIR=/tmp nice -n $((${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} - $(nice))) \
/usr/bin/setsid /usr/sbin/mysqld \
--defaults-file=$MYSQL_CONFIG \
--datadir=$MYSQL_DATA_DIR \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mysql.git/commitdiff/f9fbda432bd77e996a885bf401e01f9803174b84
More information about the pld-cvs-commit
mailing list