package/mariadb: fix permissions of data dir when using systemd
PATCH v3 1/8 package/mariadb: fix permissions of data dir when using systemd
mysql_install_db is currently called in the systemd unit without --user=mysql that the sysv script uses. This will generate the initial database files with root permissions. However, mysqld runs as user mysql so this will cause problems. We fix this by calling chown instead of passing the user parameter because an upcoming version bump will fail when ran this way.
---
Changes v2 -> v3:
- separate changes into separate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/mysqld.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/mariadb/mysqld.service +1 -1
@@ -2,7 +2,7 @@ Description=MySQL database server [Service] -ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql' +ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql && chown -R mysql:mysql /var/lib/mysql' ExecStart=/usr/bin/mysqld_safe Restart=always User=mysql
Signature · 1 line
2.25.0
PATCH v3 2/8 package/mariadb: remove mariadb_config from target
We already remove mysql_config from the target since it's only useful in staging. The same is true for mariadb_config. Thus, we remove it from the target as well.
---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/mariadb.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
package/mariadb/mariadb.mk +3 -2
@@ -123,11 +123,12 @@ define MARIADB_INSTALL_INIT_SYSTEMD endef endif -# We don't need mysql_config on the target as it's only useful in staging -# We also don't need the test suite on the target +# We don't need mysql_config or mariadb_config on the target as it's +# only useful in staging. We also don't need the test suite on the target. define MARIADB_POST_INSTALL mkdir -p $(TARGET_DIR)/var/lib/mysql $(RM) $(TARGET_DIR)/usr/bin/mysql_config + $(RM) $(TARGET_DIR)/usr/bin/mariadb_config $(RM) -r $(TARGET_DIR)/usr/share/mysql/test endef
Signature · 1 line
2.25.0
PATCH v3 2/8 package/mariadb: remove mariadb_config from target
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
We already remove
mysql_configfrom the target since it's only useful in staging. The same is true formariadb_config. Thus, we remove it from the target as well.
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 2/8 package/mariadb: remove mariadb_config from target
In reply to Ryan CoeQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
We already remove
mysql_configfrom the target since it's only useful in staging. The same is true formariadb_config. Thus, we remove it from the target as well.
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 3/8 package/mariadb: add sysroot path to mariadb_config
In reply to Ryan CoeThis patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it, mariadb_config incorrectly returns host paths for include paths and library paths.
---
Changes v2 -> v3:
- remove extra slash between CMAKE_SYSROOT and CMAKE_INSTALL_PREFIX
Changes v1 -> v2:
- no change
--- ...3-add-sysroot-path-to-mariadb_config.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch
package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 7e1b6aafeb9fe6558da7506b304c0efb5ea82281 Mon Sep 17 00:00:00 2001 +From: Ryan Coe <[email protected]> +Date: Fri, 13 Dec 2019 17:13:26 -0800 +Subject: [PATCH 1/1] add sysroot path to mariadb_config + +Signed-off-by: Ryan Coe <[email protected]> +--- + libmariadb/mariadb_config/mariadb_config.c.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libmariadb/mariadb_config/mariadb_config.c.in b/libmariadb/mariadb_config/mariadb_config.c.in +index 703c9466a1d9214a85f3638d2e3b4ecfef0c7bd6..f5513333e670373f060a3c2574d1d42facfd0337 100644 +--- a/libmariadb/mariadb_config/mariadb_config.c.in ++++ b/libmariadb/mariadb_config/mariadb_config.c.in +@@ -5,8 +5,8 @@ + + static char *mariadb_progname; + +-#define INCLUDE "-I at CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I at CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql" +-#define LIBS "-L at CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb" ++#define INCLUDE "-I at CMAKE_SYSROOT@/@CMAKE_INSTALL_PREFIX@@INSTALL_INCLUDEDIR@ -I at CMAKE_SYSROOT@/@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql" ++#define LIBS "-L at CMAKE_SYSROOT@/@CMAKE_INSTALL_PREFIX@@INSTALL_LIBDIR@/ -lmariadb" + #define LIBS_SYS "@extra_dynamic_LDFLAGS@" + #define CFLAGS INCLUDE + #define VERSION "@MARIADB_CLIENT_VERSION@" +-- +2.24.1 +
Signature · 1 line
2.25.0
PATCH v3 3/8 package/mariadb: add sysroot path to mariadb_config
Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
This patch adds @CMAKE_SYSROOT@ to mariadb_config.c.in. Without it,
mariadb_configincorrectly returns host paths for include paths and library paths.Reported-by Alexey Lukyanchuk <[email protected]>Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- remove extra slash betweenCMAKE_SYSROOTandCMAKE_INSTALL_PREFIX
Changes v1 -> v2:
- no change--- ...3-add-sysroot-path-to-mariadb_config.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/mariadb/0003-add-sysroot-path-to-mariadb_config.patchpackage/mariadb/0003-add-sysroot-path-to-mariadb_config.patch new file +0
-0
package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch line 4
Quoted 4 lines
package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch new file +4
-0@@ -0,0 +1,28 @@ +From 7e1b6aafeb9fe6558da7506b304c0efb5ea82281 Mon Sep 17 00:00:00 2001 +From: Ryan Coe <[email protected]> +Date: Fri, 13 Dec 2019 17:13:26 -0800 +Subject: [PATCH 1/1] add sysroot path to mariadb_config
Please use git format-patch -N when creating patches as pointed out by check-package:
package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch:4: generate your patches with 'git format-patch -N'
It would be good with more sensible commit message (E.G. the toplevel description).
What is the upstream status of this patch? Has it been submitted upsteam?
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 4/8 package/mariadb: fix potential error message in sysv startup script
In reply to Ryan CoeIn order to check if the initial database needs created, the startup script calls ls -1 $MYSQL_LIB | wc -l to check the number of files in the directory. If the directory does not exist, an error is printed. We fix this by redirecting stderr to /dev/null for the ls call.
---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/S97mysqld | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/mariadb/S97mysqld +3 -1
@@ -21,7 +21,9 @@ wait_for_ready() { } start() { - if [ `ls -1 $MYSQL_LIB | wc -l` = 0 ] ; then + # stderr is redirected to prevent a warning + # if mysql lib directory doesn't exist + if [ `ls -1 $MYSQL_LIB 2> /dev/null | wc -l` = 0 ] ; then printf "Creating mysql system tables ... " $MYSQL_BIN/mysql_install_db --basedir=/usr --user=mysql \ --datadir=$MYSQL_LIB > /dev/null 2>&1
Signature · 1 line
2.25.0
PATCH v3 4/8 package/mariadb: fix potential error message in sysv startup script
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
In order to check if the initial database needs created, the startup script calls ls -1 $MYSQL_LIB | wc -l to check the number of files in the directory. If the directory does not exist, an error is printed. We fix this by redirecting stderr to
/dev/nullfor the ls call.
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 4/8 package/mariadb: fix potential error message in sysv startup script
In reply to Ryan CoeQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
In order to check if the initial database needs created, the startup script calls ls -1 $MYSQL_LIB | wc -l to check the number of files in the directory. If the directory does not exist, an error is printed. We fix this by redirecting stderr to
/dev/nullfor the ls call.Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 5/8 package/mariadb: rename variable in sysv startup script
In reply to Ryan CoeThis patch renames MYSQL_PID to MYSQL_PIDFILE in the startup script. This is in anticipation for some upcoming changes.
---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/S97mysqld | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
package/mariadb/S97mysqld +4 -4
@@ -5,7 +5,7 @@ MYSQL_LIB="/var/lib/mysql" MYSQL_RUN="/run/mysql" -MYSQL_PID="$MYSQL_RUN/mysqld.pid" +MYSQL_PIDFILE="$MYSQL_RUN/mysqld.pid" MYSQL_BIN="/usr/bin" wait_for_ready() {
@@ -41,7 +41,7 @@ start() { # We don't use start-stop-daemon because mysqld has its own # wrapper script. printf "Starting mysql ... " - $MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PID --user=mysql \ + $MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PIDFILE --user=mysql \ > /dev/null 2>&1 & wait_for_ready [ $? = 0 ] && echo "OK" || echo "FAIL"
@@ -49,8 +49,8 @@ start() { stop() { printf "Stopping mysql ... " - if [ -f $MYSQL_PID ]; then - kill `cat $MYSQL_PID` > /dev/null 2>&1 + if [ -f $MYSQL_PIDFILE ]; then + kill `cat $MYSQL_PIDFILE` > /dev/null 2>&1 [ $? = 0 ] && echo "OK" || echo "FAIL" else echo "FAIL"
Signature · 1 line
2.25.0
PATCH v3 5/8 package/mariadb: rename variable in sysv startup script
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
This patch renames
MYSQL_PIDtoMYSQL_PIDFILEin the startup script. This is in anticipation for some upcoming changes.Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Reworded slightly and applied, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 6/8 package/mariadb: explicitly define logging directory to mysqld
In reply to Ryan CoeBy default, mariadb creates logging files under the data directory. This patch updates the startup scripts to log under /var/log/mysql.
---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/S97mysqld | 7 ++++++- package/mariadb/mysqld.service | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-)
package/mariadb/S97mysqld +6 -1
@@ -6,6 +6,8 @@ MYSQL_LIB="/var/lib/mysql" MYSQL_RUN="/run/mysql" MYSQL_PIDFILE="$MYSQL_RUN/mysqld.pid" +MYSQL_LOG="/var/log/mysql" +MYSQL_LOGFILE="$MYSQL_LOG/mysqld.log" MYSQL_BIN="/usr/bin" wait_for_ready() {
@@ -38,11 +40,14 @@ start() { # so create a subdirectory for mysql. install -d -o mysql -g root -m 0755 $MYSQL_RUN + # Also create logging directory as user mysql. + install -d -o mysql -g root -m 0755 $MYSQL_LOG + # We don't use start-stop-daemon because mysqld has its own # wrapper script. printf "Starting mysql ... " $MYSQL_BIN/mysqld_safe --pid-file=$MYSQL_PIDFILE --user=mysql \ - > /dev/null 2>&1 & + --log-error=$MYSQL_LOGFILE > /dev/null 2>&1 & wait_for_ready [ $? = 0 ] && echo "OK" || echo "FAIL" }
package/mariadb/mysqld.service +2 -1
@@ -3,7 +3,8 @@ Description=MySQL database server [Service] ExecStartPre=/bin/sh -c 'test "`ls -1 /var/lib/mysql | wc -l`" != "0" || mysql_install_db --basedir=/usr --datadir=/var/lib/mysql && chown -R mysql:mysql /var/lib/mysql' -ExecStart=/usr/bin/mysqld_safe +ExecStartPre=install -d -o mysql -g root -m 0755 /var/log/mysql +ExecStart=/usr/bin/mysqld_safe --log-error=/var/log/mysql/mysqld.log Restart=always User=mysql RuntimeDirectory=mysql
Signature · 1 line
2.25.0
PATCH v3 6/8 package/mariadb: explicitly define logging directory to mysqld
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
By default, mariadb creates logging files under the data directory. This patch updates the startup scripts to log under
/var/log/mysql.Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 7/8 package/mariadb: do not pass --user=mysql to mysql_install_db
In reply to Ryan CoeWe currently install the default database by passing --user=mysql to the install script. With the upcoming bump to the 10.4 series, this does not work as intended. An error occurs because of missing PAM modules. We work around this now by creating the default db as root and calling chown to change the files to user mysql.
---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
--- package/mariadb/S97mysqld | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/mariadb/S97mysqld +2 -1
@@ -27,12 +27,13 @@ start() { # if mysql lib directory doesn't exist if [ `ls -1 $MYSQL_LIB 2> /dev/null | wc -l` = 0 ] ; then printf "Creating mysql system tables ... " - $MYSQL_BIN/mysql_install_db --basedir=/usr --user=mysql \ + $MYSQL_BIN/mysql_install_db --basedir=/usr \ --datadir=$MYSQL_LIB > /dev/null 2>&1 if [ $? != 0 ]; then echo "FAIL" exit 1 fi + chown -R mysql:mysql $MYSQL_LIB echo "OK" fi
Signature · 1 line
2.25.0
PATCH v3 7/8 package/mariadb: do not pass --user=mysql to mysql_install_db
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
We currently install the default database by passing --user=mysql to the install script. With the upcoming bump to the 10.4 series, this does not work as intended. An error occurs because of missing PAM modules. We work around this now by creating the default db as root and calling chown to change the files to user mysql.
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into seperate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 8/8 package/mariadb: security bump version to 10.4.12
In reply to Ryan CoeRelease notes:
https://mariadb.com/kb/en/library/mariadb-10412-release-notes/
Changelog:
https://mariadb.com/kb/en/library/mariadb-10412-changelog/
Fixes the following security vulnerability:
CVE-2020-2574: Vulnerability in the MySQL Client product of Oracle MySQL (component: C API). Supported versions that are affected are 5.6.46 and prior, 5.7.28 and prior and 8.0.18 and prior. Difficult to exploit vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise MySQL Client. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Client.
Upgrading from 10.3 to 10.4:
https://mariadb.com/kb/en/library/upgrading-from-mariadb-103-to-mariadb-104/
The hash for README.md has been updated due to minor changes throughout the document. The text in licensing section is unchanged.
Patch 0002-fix-build-error-with-newer-cmake.patch has been removed as it has been applied upstream. The remaining patches have been renamed to correct the order.
---
Changes v2 -> v3:
- bump version to 10.4.12 instead of 10.4.11
Changes v1 -> v2:
- bump version to 10.4.11 instead of 10.4.10
- replace patch for mysql_install_db (suggested by Thomas)
- split other changes to startup scripts into separate patches (suggested by Thomas)
---
...-add-sysroot-path-to-mariadb_config.patch} | 0
...002-fix-build-error-with-newer-cmake.patch | 44 -------------------
package/mariadb/mariadb.hash | 12 ++---
package/mariadb/mariadb.mk | 5 ++-
4 files changed, 10 insertions(+), 51 deletions(-)
rename package/mariadb/{0003-add-sysroot-path-to-mariadb_config.patch => 0002-add-sysroot-path-to-mariadb_config.patch} (100%)
delete mode 100644 package/mariadb/0002-fix-build-error-with-newer-cmake.patchpackage/mariadb/0002-add-sysroot-path-to-mariadb_config.patch renamed from package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch +0 -0
package/mariadb/0002-fix-build-error-with-newer-cmake.patch deleted +0 -44
44 lines not on this page · raw message
package/mariadb/mariadb.hash +6 -6
@@ -1,9 +1,9 @@ -# From https://downloads.mariadb.org/mariadb/10.3.18 -md5 b3524c0825c3a1c255496daea38304a0 mariadb-10.3.18.tar.gz -sha1 922a317edd6f44baacc49831ca278e7a9878a363 mariadb-10.3.18.tar.gz -sha256 69456ca85bf9d96c6d28b4ade2a9f6787d79a602e27ef941f9ba4e0b55dddedc mariadb-10.3.18.tar.gz -sha512 817253d18f20c74f9ec8030678fd50a28b1726fd59153023a3a5e9b3f79e1f44d79feb24ae9ed72d8c1c04017110c932aba7be0610fb06245590c7f5610db242 mariadb-10.3.18.tar.gz +# From https://downloads.mariadb.org/mariadb/10.4.12 +md5 97d7c0f508c04a31c138fdb24e95dbc4 mariadb-10.4.12.tar.gz +sha1 8a07057e1249c66c7cb11a92936d45ef242581b1 mariadb-10.4.12.tar.gz +sha256 fef1e1d38aa253dd8a51006bd15aad184912fce31c446bb69434fcde735aa208 mariadb-10.4.12.tar.gz +sha512 518dae18c04a1f7fcc6fd4d2dfbfbfbdf5e83e72ca41e66e1074328df8d92ab41b458e6a9973771419ac09a7348f264f158916cd198c335085d6e823e707bbc6 mariadb-10.4.12.tar.gz # Hash for license files -sha256 a4665c1189fe31e0bbc27e9b55439df7dad6e99805407fe58d78da7aabe678f8 README.md +sha256 fbcc1db54ebdc4af733aeaea9a00ec140f5f5fc43683f3966645450734c05747 README.md sha256 240a15a1d0f34d3abca462cdb7e5fb89470967563f16b0e71169e51c1e74cf2b COPYING
package/mariadb/mariadb.mk +4 -1
@@ -4,7 +4,7 @@ # ################################################################################ -MARIADB_VERSION = 10.3.18 +MARIADB_VERSION = 10.4.12 MARIADB_SITE = https://downloads.mariadb.org/interstitial/mariadb-$(MARIADB_VERSION)/source MARIADB_LICENSE = GPL-2.0 (server), GPL-2.0 with FLOSS exception (GPL client library), LGPL-2.0 (LGPL client library) # Tarball no longer contains LGPL license text
@@ -57,6 +57,9 @@ MARIADB_CONF_OPTS += -DCMAKE_CROSSCOMPILING=1 # Explicitly disable dtrace to avoid detection of a host version MARIADB_CONF_OPTS += -DENABLE_DTRACE=0 +# Disable support for REST and JDBC +MARIADB_CONF_OPTS += -DCONNECT_WITH_REST=OFF -DCONNECT_WITH_JDBC=OFF + ifeq ($(BR2_PACKAGE_MARIADB_SERVER),y) ifeq ($(BR2_PACKAGE_MARIADB_SERVER_EMBEDDED),y) MARIADB_CONF_OPTS += -DWITH_EMBEDDED_SERVER=ON
Signature · 1 line
2.25.0
PATCH v3 8/8 package/mariadb: security bump version to 10.4.12
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
Release notes:
https://mariadb.com/kb/en/library/mariadb-10412-release-notes/Changelog:
https://mariadb.com/kb/en/library/mariadb-10412-changelog/
Quoted 8 lines
Fixes the following security vulnerability:
CVE-2020-2574: Vulnerability in the MySQL Client product of Oracle MySQL (component: C API). Supported versions that are affected are 5.6.46 and prior, 5.7.28 and prior and 8.0.18 and prior. Difficult to exploit vulnerability allows unauthenticated attacker with network access via multiple protocols to compromise MySQL Client. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of MySQL Client.
But this issue is also fixed in 10.3.22?
Can you please first send a security bump to 10.3.22, so this can be backported to 2019.02.x / 2019.11.x.
If there is a desire to move to the 10.4 series, then this can be done as a followup patch.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 1/8 package/mariadb: fix permissions of data dir when using systemd
In reply to Ryan CoeQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
mysql_install_dbis currently called in the systemd unit without --user=mysql that the sysv script uses. This will generate the initial database files with root permissions. However, mysqld runs as user mysql so this will cause problems. We fix this by calling chown instead of passing the user parameter because an upcoming version bump will fail when ran this way.
It would be good to explain what that failure is, but OK.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 1/8 package/mariadb: fix permissions of data dir when using systemd
In reply to Ryan CoeQuoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
mysql_install_dbis currently called in the systemd unit without --user=mysql that the sysv script uses. This will generate the initial database files with root permissions. However, mysqld runs as user mysql so this will cause problems. We fix this by calling chown instead of passing the user parameter because an upcoming version bump will fail when ran this way.
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into separate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 1/8 package/mariadb: fix permissions of data dir when using systemd
Hi Peter,
Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
mysql_install_dbis currently called in the systemd unit without --user=mysql that the sysv script uses. This will generate the initial database files with root permissions. However, mysqld runs as user mysql so this will cause problems. We fix this by calling chown instead of passing the user parameter because an upcoming version bump will fail when ran this way.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into separate patches (suggested by Thomas)
Changes v1 -> v2:
- no changeCommitted to 2019.02.x and 2019.11.x, thanks.
Not in 2019.02.x as of 06d3d2602, or 2019.11.x as of 51f9a97831e.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -PATCH v3 1/8 package/mariadb: fix permissions of data dir when using systemd
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
Hi Peter,
Quoted 16 lines · Peter Korsgaard
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ryan" == Ryan Coe <[email protected]> writes:
mysql_install_dbis currently called in the systemd unit without --user=mysql that the sysv script uses. This will generate the initial database files with root permissions. However, mysqld runs as user mysql so this will cause problems. We fix this by calling chown instead of passing the user parameter because an upcoming version bump will fail when ran this way.Signed-off-by Ryan Coe <[email protected]>---
Changes v2 -> v3:
- separate changes into separate patches (suggested by Thomas)
Changes v1 -> v2:
- no change
Quoted 3 lines
Quoted 1 line
Committed to 2019.02.x and 2019.11.x, thanks.
Not in 2019.02.x as of
06d3d2602, or 2019.11.x as of51f9a97831e.
Ups, forgot to push. Will do so now. Thanks!
Signature · 1 line
Bye, Peter Korsgaard