[arch-commits] Commit in mariadb/trunk (7 files)

Christian Hesse eworm at archlinux.org
Fri Jun 21 10:06:42 UTC 2019


    Date: Friday, June 21, 2019 @ 10:06:42
  Author: eworm
Revision: 356677

upgpkg: mariadb 10.4.6-1

new upstream release

Added:
  mariadb/trunk/0007-systemd-service-add-instance-name-in-description.patch
Modified:
  mariadb/trunk/0001-arch-specific.patch
  mariadb/trunk/0002-systemd-sysusers-tmpfiles.patch
  mariadb/trunk/0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
  mariadb/trunk/PKGBUILD
  mariadb/trunk/mariadb.install
Deleted:
  mariadb/trunk/0004-do-not-break-main-configuration-with-instantiated-one.patch

------------------------------------------------------------------+
 0001-arch-specific.patch                                         |   44 -------
 0002-systemd-sysusers-tmpfiles.patch                             |   19 ++-
 0004-do-not-break-main-configuration-with-instantiated-one.patch |   56 ----------
 0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch |    8 -
 0007-systemd-service-add-instance-name-in-description.patch      |   32 +++++
 PKGBUILD                                                         |   49 ++++----
 mariadb.install                                                  |   14 ++
 7 files changed, 86 insertions(+), 136 deletions(-)

Modified: 0001-arch-specific.patch
===================================================================
--- 0001-arch-specific.patch	2019-06-21 09:24:05 UTC (rev 356676)
+++ 0001-arch-specific.patch	2019-06-21 10:06:42 UTC (rev 356677)
@@ -66,37 +66,6 @@
  
  # Flush caches. previously [mysqld_safe] flush-caches=1
  # ExecStartPre=sync
-From 72b42fb1a344bfc3f3c3c905fe85c93ac4a752e3 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Tue, 29 Jan 2019 23:14:23 +0100
-Subject: fix path to our config
----
- support-files/rpm/enable_encryption.preset | 2 +-
- support-files/rpm/my.cnf                   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/support-files/rpm/enable_encryption.preset b/support-files/rpm/enable_encryption.preset
-index 722db7e5fa1..978a7494c6b 100644
---- a/support-files/rpm/enable_encryption.preset
-+++ b/support-files/rpm/enable_encryption.preset
-@@ -1,5 +1,5 @@
- #
--# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d)
-+# !include this file into your my.cnf (or any of *.cnf files in /etc/mysql/my.cnf.d)
- # and it will enable data at rest encryption. This is a simple way to
- # ensure that everything that can be encrypted will be and your
- # data will not leak unencrypted.
-diff --git a/support-files/rpm/my.cnf b/support-files/rpm/my.cnf
-index 913b88f8328..17d25361178 100644
---- a/support-files/rpm/my.cnf
-+++ b/support-files/rpm/my.cnf
-@@ -7,5 +7,5 @@
- #
- # include all files from the config directory
- #
--!includedir /etc/my.cnf.d
-+!includedir /etc/mysql/my.cnf.d
- 
 From 820b47c1e70d36f1272cca3ddbdf4bbd2dd62bde Mon Sep 17 00:00:00 2001
 From: Christian Hesse <mail at eworm.de>
 Date: Wed, 30 Jan 2019 00:46:47 +0100
@@ -119,16 +88,3 @@
  
  
  [Service]
-diff --git a/support-files/mariadb at .service.in b/support-files/mariadb at .service.in
-index a2f5cff0828..3fc41358e14 100644
---- a/support-files/mariadb at .service.in
-+++ b/support-files/mariadb at .service.in
-@@ -27,8 +27,6 @@ ConditionPathExists=@sysconf2dir@/my%I.cnf
- 
- [Install]
- WantedBy=multi-user.target
--Alias=mysql.service
--Alias=mysqld.service
- 
- 
- [Service]

Modified: 0002-systemd-sysusers-tmpfiles.patch
===================================================================
--- 0002-systemd-sysusers-tmpfiles.patch	2019-06-21 09:24:05 UTC (rev 356676)
+++ 0002-systemd-sysusers-tmpfiles.patch	2019-06-21 10:06:42 UTC (rev 356677)
@@ -1,7 +1,8 @@
-From dc7aff5e5331820205282576f6ade015f672969b Mon Sep 17 00:00:00 2001
+From aef4f58adf90e9fee4348c1cf6484faeae159255 Mon Sep 17 00:00:00 2001
 From: Christian Hesse <mail at eworm.de>
 Date: Tue, 2 Jan 2018 14:32:21 +0100
-Subject: Use descriptive file names for sysusers and tmpfiles configuration
+Subject: [PATCH 1/2] Use descriptive file names for sysusers and tmpfiles
+ configuration
 
 These files were installed to:
 
@@ -9,15 +10,17 @@
 ${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
 
 Instead rename the files to more descriptive file names 'mariadb.conf'.
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
 ---
  support-files/CMakeLists.txt | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
-index 4ad3810e082..8363922d468 100644
+index 3655c87b94e..63443245e6e 100644
 --- a/support-files/CMakeLists.txt
 +++ b/support-files/CMakeLists.txt
-@@ -117,7 +117,8 @@ IF(UNIX)
+@@ -118,7 +118,8 @@ IF(UNIX)
        CONFIGURE_FILE(sysusers.conf.in
                ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
        INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
@@ -27,7 +30,7 @@
      ENDIF()
  
      IF(INSTALL_SYSTEMD_TMPFILESDIR)
-@@ -125,7 +126,8 @@ IF(UNIX)
+@@ -126,7 +127,8 @@ IF(UNIX)
        CONFIGURE_FILE(tmpfiles.conf.in
                ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
        INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
@@ -37,10 +40,10 @@
      ENDIF()
  
      # @ in directory name broken between CMake version 2.8.12.2 and 3.3
-From c86912c8896b65c1dd9226c1bc2987189d4840c2 Mon Sep 17 00:00:00 2001
+From 974bd397ff3492c57799e11a02cc3c07081bb1fc Mon Sep 17 00:00:00 2001
 From: Christian Hesse <mail at eworm.de>
 Date: Tue, 2 Jan 2018 14:36:49 +0100
-Subject: Make systemd-tmpfiles create MYSQL_DATADIR
+Subject: [PATCH 2/2] Make systemd-tmpfiles create MYSQL_DATADIR
 
 This is a no-op if the directory exists, but makes sure it is created by
 systemd-tmpfiles with proper permissions otherwise.
@@ -47,6 +50,8 @@
 
 This solves packaging issues when the user MYSQLD_USER is created by
 systemd-sysusers and uid is not known in advance.
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
 ---
  support-files/tmpfiles.conf.in | 1 +
  1 file changed, 1 insertion(+)

Deleted: 0004-do-not-break-main-configuration-with-instantiated-one.patch
===================================================================
--- 0004-do-not-break-main-configuration-with-instantiated-one.patch	2019-06-21 09:24:05 UTC (rev 356676)
+++ 0004-do-not-break-main-configuration-with-instantiated-one.patch	2019-06-21 10:06:42 UTC (rev 356677)
@@ -1,56 +0,0 @@
-From 8fe9b2658664d0ece15fe57442706446fed66d6e Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Tue, 15 Jan 2019 17:22:56 +0100
-Subject: do not break main configuration with instantiated one
-
-The main configuration file /etc/my.cnf includes all configuration files in
-/etc/my.cnf.d/. However an instantiated service mariadb at example.service
-reads its configuration from /etc/my.cnf.d/myexample.cnf. This breaks
-the main configuration as that includes a snippet intended for an instance.
-
-This can be fixed by changing the path: Let the instantiated service
-read its configuration from /etc/myexample.cnf.
----
- support-files/mariadb at .service.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/support-files/mariadb at .service.in b/support-files/mariadb at .service.in
-index a2f5cff0828..1207e690f47 100644
---- a/support-files/mariadb at .service.in
-+++ b/support-files/mariadb at .service.in
-@@ -1,7 +1,7 @@
- # Multi instance version of mariadb. For if you run multiple versions at once.
- # Also used for mariadb at bootstrap to bootstrap Galera.
- #
--# create config file @sysconf2dir@/my{instancename}.cnf
-+# create config file @sysconfdir@/my{instancename}.cnf
- #
- # start as systemctl start mariadb@{instancename}.server
- 
-@@ -23,7 +23,7 @@ Documentation=man:mysqld(8)
- Documentation=https://mariadb.com/kb/en/library/systemd/
- After=network.target
- 
--ConditionPathExists=@sysconf2dir@/my%I.cnf
-+ConditionPathExists=@sysconfdir@/my%I.cnf
- 
- [Install]
- WantedBy=multi-user.target
-@@ -75,7 +75,7 @@ PermissionsStartOnly=true
- ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
- 
- ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
-- VAR=`@bindir@/galera_recovery --defaults-file=@sysconf2dir@/my%I.cnf`; [ $? -eq 0 ] \
-+ VAR=`@bindir@/galera_recovery --defaults-file=@sysconfdir@/my%I.cnf`; [ $? -eq 0 ] \
-  && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
- 
- # Alternate: (remove ConditionPathExists above)
-@@ -96,7 +96,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
- 
- # Note: Place $MYSQLD_OPTS at the very end for its options to take precedence.
- 
--ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf \
-+ExecStart=@sbindir@/mysqld --defaults-file=@sysconfdir@/my%I.cnf \
-   $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
- # Alternate: (remove ConditionPathExists above)
- # use [mysqld.INSTANCENAME] as sections in my.cnf

Modified: 0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
===================================================================
--- 0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch	2019-06-21 09:24:05 UTC (rev 356676)
+++ 0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch	2019-06-21 10:06:42 UTC (rev 356677)
@@ -1,7 +1,7 @@
-From 5936f0be4a49eda7b05ea1591bbbba3d72e4d7b9 Mon Sep 17 00:00:00 2001
+From 471952a37f2523a00d2b4fd617128b3fa9d0cf03 Mon Sep 17 00:00:00 2001
 From: Christian Hesse <mail at eworm.de>
 Date: Fri, 25 Jan 2019 14:50:53 +0100
-Subject: fix galera_recovery with fs.protected_regular enabled
+Subject: [PATCH 1/1] fix galera_recovery with fs.protected_regular enabled
 
 The fs.protected_regular sysctls was added in Linux 4.19 to make some
 data spoofing attacks harder. With systemd v241 these will be enabled
@@ -12,12 +12,14 @@
 The script changes ownership of $log_file to $user, though $user never
 touches it. The shell redirection writes output to the file, not mysqld.
 So just drop chown to fix this.
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
 ---
  scripts/galera_recovery.sh | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/scripts/galera_recovery.sh b/scripts/galera_recovery.sh
-index c58f3d8f6b9..c70decc0005 100644
+index 709c4b0eed5..8df2abc3fd5 100644
 --- a/scripts/galera_recovery.sh
 +++ b/scripts/galera_recovery.sh
 @@ -101,8 +101,7 @@ wsrep_recover_position() {

Added: 0007-systemd-service-add-instance-name-in-description.patch
===================================================================
--- 0007-systemd-service-add-instance-name-in-description.patch	                        (rev 0)
+++ 0007-systemd-service-add-instance-name-in-description.patch	2019-06-21 10:06:42 UTC (rev 356677)
@@ -0,0 +1,32 @@
+From 34ac8a4f31f490db5cec7b6291dc98479c45c78f Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Fri, 1 Mar 2019 10:00:27 +0100
+Subject: [PATCH 1/1] systemd service: add instance name in description
+
+The unit files made systemd print:
+
+systemd[1]: Started MariaDB 10.3.13 database server (multi-instance).
+
+Let's add the instance name, so starting mariadb at foo.service
+makes it print:
+
+systemd[1]: Started MariaDB 10.3.13 database server (multi-instance foo).
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ support-files/mariadb at .service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/support-files/mariadb at .service.in b/support-files/mariadb at .service.in
+index 727c1b85301..fd997b2ce3d 100644
+--- a/support-files/mariadb at .service.in
++++ b/support-files/mariadb at .service.in
+@@ -131,7 +131,7 @@
+ # systemd.service(5)
+ 
+ [Unit]
+-Description=MariaDB @VERSION@ database server (multi-instance)
++Description=MariaDB @VERSION@ database server (multi-instance %I)
+ Documentation=man:mysqld(8)
+ Documentation=https://mariadb.com/kb/en/library/systemd/
+ After=network.target

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-21 09:24:05 UTC (rev 356676)
+++ PKGBUILD	2019-06-21 10:06:42 UTC (rev 356677)
@@ -4,7 +4,7 @@
 pkgbase=mariadb
 pkgname=('mariadb-libs' 'mariadb-clients' 'mariadb' 'mytop')
 pkgdesc='Fast SQL database server, derived from MySQL'
-pkgver=10.3.16
+pkgver=10.4.6
 pkgrel=1
 arch=('x86_64')
 license=('GPL')
@@ -15,14 +15,14 @@
 source=("https://mirrors.n-ix.net/mariadb/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz"{,.asc}
         '0001-arch-specific.patch'
         '0002-systemd-sysusers-tmpfiles.patch'
-        '0004-do-not-break-main-configuration-with-instantiated-one.patch'
-        '0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch')
-sha256sums=('39e9723eaf620afd99b0925b2c2a5a50a89110ba50040adf14cce7cf89e5e21b'
+        '0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch'
+        '0007-systemd-service-add-instance-name-in-description.patch')
+sha256sums=('a270fe6169a1aaf6f2cbbc945de2c954d818c48e1a0fc02fbed92ecb94678e70'
             'SKIP'
-            '5b74e328e75369dfb68491a06dd53bd736e34f87281103ae0dd2f50401dc70d3'
-            '1cd009b473d5965c7cbe6d48fff272030a2ccdd9c7e67b4f837d03252786a09a'
-            'd12806e4f90cc0fc081205dd4c0a5e0e7c455844f04276811b61b57fd24f5545'
-            '66e0acac7436fd8925710ef5cc66ba1a8f63a385ce374f01ae83096cc33d97a0')
+            'ce72ea1563ad773e00e8b1c299babea176abae1102827c2f743921e9de615041'
+            '3e83467af80fbd53400a201a34fc858b88509ea8e88b10709947eb66545f9457'
+            'c8c801f80924ccb97b499552fe1c532b3ebf8f86cdfc0d23715d4adb1a8810f0'
+            'd4575c349fdc6268135cd3483e70e04b149ec8004583bac7f79f190a084cbfc8')
 
 prepare() {
   cd $pkgbase-$pkgver/
@@ -30,7 +30,7 @@
   # Arch Linux specific patches:
   #  * enable PrivateTmp for a little bit more security
   #  * force preloading jemalloc for memory management
-  #  * fix path to our config
+  #  * remove aliases in systemd unit files
   patch -Np1 < ../0001-arch-specific.patch
 
   # MDEV-17028 Fix glitches with systemd sysusers and tmpfiles:
@@ -39,13 +39,13 @@
   # https://github.com/MariaDB/server/pull/530
   patch -Np1 < ../0002-systemd-sysusers-tmpfiles.patch
 
-  # do not break main configuration with instantiated one
-  # https://github.com/MariaDB/server/pull/1095
-  patch -Np1 < ../0004-do-not-break-main-configuration-with-instantiated-one.patch
-
   # fix galera_recovery with fs.protected_regular enabled
   # https://github.com/MariaDB/server/pull/1137
   patch -Np1 < ../0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
+
+  # systemd service: add instance name in description
+  # https://github.com/MariaDB/server/pull/1216
+  patch -Np1 < ../0007-systemd-service-add-instance-name-in-description.patch
 }
 
 build() {
@@ -56,8 +56,8 @@
 
     # file paths
     # /etc
-    -DINSTALL_SYSCONFDIR=/etc/mysql
-    -DINSTALL_SYSCONF2DIR=/etc/mysql/my.cnf.d
+    -DINSTALL_SYSCONFDIR=/etc
+    -DINSTALL_SYSCONF2DIR=/etc/my.cnf.d
     # /run
     -DINSTALL_UNIX_ADDRDIR=/run/mysqld/mysqld.sock
     # /usr
@@ -159,11 +159,11 @@
 
 package_mariadb() {
   pkgdesc='Fast SQL database server, derived from MySQL'
-  backup=('etc/mysql/my.cnf'
-          'etc/mysql/my.cnf.d/client.cnf'
-          'etc/mysql/my.cnf.d/enable_encryption.preset'
-          'etc/mysql/my.cnf.d/mysql-clients.cnf'
-          'etc/mysql/my.cnf.d/server.cnf')
+  backup=('etc/my.cnf'
+          'etc/my.cnf.d/client.cnf'
+          'etc/my.cnf.d/enable_encryption.preset'
+          'etc/my.cnf.d/mysql-clients.cnf'
+          'etc/my.cnf.d/server.cnf')
   install=mariadb.install
   depends=("mariadb-clients=${pkgver}" 'inetutils' 'systemd-libs' 'libxml2' 'zstd')
   optdepends=('galera: for MariaDB cluster with Galera WSREP'
@@ -179,7 +179,7 @@
   cd "$pkgdir"
 
   # no SysV init, please!
-  rm -r etc/mysql/{init.d,logrotate.d}
+  rm -r etc/logrotate.d
   rm usr/bin/rcmysql
   rm usr/share/mysql/{binary-configure,mysql{,d_multi}.server}
 
@@ -205,12 +205,13 @@
   rm usr/share/man/man1/mysql_config.1
   rm -r usr/share/{aclocal,pkgconfig}
   rm usr/lib/lib*
-  rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,dialog,mysql_clear_password,sha256_password}.so
+  rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,client_ed25519,dialog,mysql_clear_password,sha256_password}.so
   rm -r usr/lib/pkgconfig/
 
   # provided by mariadb-clients
-  rm usr/bin/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}
-  rm usr/share/man/man1/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}.1
+  rm usr/bin/mysql{,_plugin,_upgrade,admin,binlog,check,dump,import,show,slap,test}
+  rm usr/bin/mariadb{,-{admin,binlog,check,dump,import,plugin,show,slap,test,upgrade}}
+  rm usr/share/man/man1/mysql{,_plugin,_upgrade,admin,binlog,check,dump,import,show,slap,test}.1
 
   # provided by mytop
   rm usr/bin/mytop

Modified: mariadb.install
===================================================================
--- mariadb.install	2019-06-21 09:24:05 UTC (rev 356676)
+++ mariadb.install	2019-06-21 10:06:42 UTC (rev 356677)
@@ -3,7 +3,7 @@
 post_install() {
   echo ":: You need to initialize the MariaDB data directory prior to starting"
   echo "   the service. This can be done with mysql_install_db command, e.g.:"
-  echo "   mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
+  echo "   mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
 }
 
 post_upgrade() {
@@ -10,6 +10,16 @@
   # show for feature release: 10.1 -> 10.2 -> 10.3 -> ...
   if [ $(vercmp "${1%.*-*}" "${2%.*-*}") -ne 0 ]; then 
     echo ":: MariaDB was updated to a new feature release. To update the data run:"
-    echo "   systemctl restart mariadb.service && mysql_upgrade -u root -p"
+    echo "   systemctl restart mariadb.service && mariadb-upgrade -u root -p"
   fi
+
+  # return if old package version greater 10.4...
+  (( $(vercmp $2 '10.4') > 0 )) && return
+
+  # upgrade from pre-10.4...
+  echo ":: MariaDB configuration layout changed."
+  echo "   -> The main configuration file now is: /etc/my.cnf"
+  echo "   -> Instantiated services (mariadb at foo.service) do not longer read their"
+  echo "      own configuration file but use group suffix (configuration block"
+  echo "      '[mysqld.foo]') in main configuration file."
 }



More information about the arch-commits mailing list