diff --git a/component/mariadb/buildout.cfg b/component/mariadb/buildout.cfg index 8e0c57e1ebe6cb3686a9589a06143f01e7fb5656..63207ce8d51d2d92a3d4f2cbadad54a9b51f0220 100644 --- a/component/mariadb/buildout.cfg +++ b/component/mariadb/buildout.cfg @@ -22,13 +22,13 @@ parts = [mariadb] recipe = slapos.recipe.cmmi -version = 10.1.20 -url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http:/ftp.osuosl.org/pub/mariadb/?serve -md5sum = 623226918fd711e414ad240287284b5b +version = 10.1.21 +url = http://ftp.osuosl.org/pub/mariadb/mariadb-10.1.21/source/mariadb-10.1.21.tar.gz +md5sum = ff8b96edeeb22425117309a249055310 location = ${buildout:parts-directory}/${:_buildout_section_name_} patch-options = -p0 patches = - ${:_profile_base_location_}/mariadb_10.1.8_create_system_tables__no_test.patch#d2f337e76b290071daf8985a79bda82a + ${:_profile_base_location_}/mariadb_10.1.21_create_system_tables__no_test.patch#3c76aa9564a162f13aced7c0a3f783b3 configure-command = ${cmake:location}/bin/cmake configure-options = -DCMAKE_INSTALL_PREFIX=${:location} diff --git a/component/mariadb/mariadb_10.1.21_create_system_tables__no_test.patch b/component/mariadb/mariadb_10.1.21_create_system_tables__no_test.patch new file mode 100644 index 0000000000000000000000000000000000000000..4cdc130bf745820f16b725eaa547693c33b8dcbf --- /dev/null +++ b/component/mariadb/mariadb_10.1.21_create_system_tables__no_test.patch @@ -0,0 +1,28 @@ +# 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org> + +A user with no password prevents a normal user from login under certain +circumstances as it is checked first. +See http://bugs.debian.org/301741 +and http://bugs.mysql.com/bug.php?id=6901 + +--- scripts/mysql_system_tables_data.sql.orig 2017-01-17 20:38:26.000000000 +0100 ++++ scripts/mysql_system_tables_data.sql 2017-01-18 17:03:23.795082252 +0100 +@@ -30,8 +30,6 @@ + -- Fill "db" table with default grants for anyone to + -- access database 'test' and 'test_%' if "db" table didn't exist + CREATE TEMPORARY TABLE tmp_db LIKE db; +-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); +-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); + INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; + DROP TABLE tmp_db; + +@@ -48,9 +46,6 @@ + REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0); + -- More secure root account using unix sucket auth. + INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0); +--- Anonymous user with no privileges. +-INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost',''); +-INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; + + INSERT INTO user SELECT * FROM tmp_user_nopasswd WHERE @had_user_table=0 AND @skip_auth_root_nopasswd IS NULL; + INSERT INTO user SELECT * FROM tmp_user_socket WHERE @had_user_table=0 AND @auth_root_socket IS NOT NULL; diff --git a/component/mariadb/mariadb_10.1.8_create_system_tables__no_test.patch b/component/mariadb/mariadb_10.1.8_create_system_tables__no_test.patch deleted file mode 100644 index 0d6d3009ef3c9f92147e3aa437242b1612cf4111..0000000000000000000000000000000000000000 --- a/component/mariadb/mariadb_10.1.8_create_system_tables__no_test.patch +++ /dev/null @@ -1,27 +0,0 @@ -# 33_scripts__mysql_create_system_tables__no_test.dpatch by <ch@debian.org> - -A user with no password prevents a normal user from login under certain -circumstances as it is checked first. -See http://bugs.debian.org/301741 -and http://bugs.mysql.com/bug.php?id=6901 - ---- scripts/mysql_system_tables_data.sql.orig 2015-10-15 17:43:45.000000000 +0200 -+++ scripts/mysql_system_tables_data.sql 2015-10-19 16:44:16.121393390 +0200 -@@ -30,8 +30,6 @@ - -- Fill "db" table with default grants for anyone to - -- access database 'test' and 'test_%' if "db" table didn't exist - CREATE TEMPORARY TABLE tmp_db LIKE db; --INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); --INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); - INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; - DROP TABLE tmp_db; - -@@ -43,8 +41,6 @@ - REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0 FROM dual WHERE @current_hostname != 'localhost'; - REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N','',0); - REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0); --INSERT INTO tmp_user (host,user) VALUES ('localhost',''); --INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; - INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; - DROP TABLE tmp_user; -