Add patch for mysqld_safe --dry-run

This commit is contained in:
Michal Schorm 2019-03-21 11:38:58 +01:00
parent 943502fb6d
commit fe4891c5b8
2 changed files with 24 additions and 1 deletions

17
mariadb-mysqld_safe.patch Normal file
View File

@ -0,0 +1,17 @@
Fix for:
/usr/bin/mysqld_safe: line 933: return: can only `return' from a function or sourced script
Upstream PR:
https://github.com/MariaDB/server/pull/1238
--- mariadb-10.3.12/scripts/mysqld_safe.sh 2019-01-04 16:28:49.000000000 +0100
+++ mariadb-10.3.12/scripts/mysqld_safe.sh_patched 2019-03-21 11:34:59.499309336 +0100
@@ -929,7 +929,7 @@ do
cmd="$cmd "`shell_quote_string "$i"`
done
cmd="$cmd $args"
-[ $dry_run -eq 1 ] && return
+[ $dry_run -eq 1 ] && exit
# Avoid 'nohup: ignoring input' warning
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"

View File

@ -160,7 +160,7 @@
Name: mariadb
Version: 10.3.12
Release: 12%{?with_debug:.debug}%{?dist}
Release: 13%{?with_debug:.debug}%{?dist}
Epoch: 3
Summary: A very fast and robust SQL database server
@ -208,6 +208,8 @@ Patch9: %{pkgnamepatch}-ownsetup.patch
Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch
# Patch11: Use PCDIR CMake option, if configured
Patch11: %{pkgnamepatch}-pcdir.patch
# Patch12: Fix mysqld_safe --dry-run
Patch12: %{pkgnamepatch}-mysqld_safe.patch
BuildRequires: cmake gcc-c++
BuildRequires: multilib-rpm-config
@ -716,6 +718,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \;
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
# workaround for upstream bug #56342
#rm mysql-test/t/ssl_8k_key-master.opt
@ -1602,6 +1605,9 @@ fi
%endif
%changelog
* Thu Mar 21 2019 Michal Schorm <mschorm@redhat.com> - 10.3.12-13
- Add patch for mysqld_safe --dry-run
* Wed Mar 20 2019 Michal Schorm <mschorm@redhat.com> - 10.3.12-12
- Add patch for server pkgconfig file location