summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO83
-rw-r--r--0001-arch-specific.patch128
-rw-r--r--0002-systemd-sysusers-tmpfiles.patch60
-rw-r--r--0004-do-not-break-main-configuration-with-instantiated-one.patch56
-rw-r--r--0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch32
-rw-r--r--PKGBUILD158
-rw-r--r--mariadb.install8
7 files changed, 170 insertions, 355 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19a1915da15..cf959d8bf8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
-# Generated by mksrcinfo v8
-# Thu Feb 21 21:09:30 UTC 2019
pkgbase = mariadb-git
- pkgdesc = Fast SQL database server, derived from MySQL (GIT version)
- pkgver = 10.4.2.r212.g4932aba9217
- pkgrel = 2
+ pkgdesc = Fast SQL database server, derived from MySQL
+ pkgver = 10.7_r193391.gb857fde69ab
+ pkgrel = 1
url = https://mariadb.org/
arch = x86_64
license = GPL
+ makedepends = git
makedepends = boost
makedepends = bzip2
makedepends = cmake
makedepends = jemalloc
makedepends = libaio
+ makedepends = libxcrypt
makedepends = libxml2
makedepends = lz4
makedepends = lzo
@@ -19,73 +19,80 @@ pkgbase = mariadb-git
makedepends = systemd
makedepends = zlib
makedepends = zstd
- makedepends = git
- source = mariadb::git://github.com/MariaDB/server.git
+ makedepends = curl
+ makedepends = krb5
+ makedepends = cracklib
+ provides = mariadb
+ conflicts = mariadb
+ source = git+https://github.com/MariaDB/server.git
source = 0001-arch-specific.patch
- source = 0002-systemd-sysusers-tmpfiles.patch
- source = 0004-do-not-break-main-configuration-with-instantiated-one.patch
- source = 0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
sha256sums = SKIP
- sha256sums = 5a443a403821931ce35759e9583d23cd809b3b5a5df5b8293ac8e33b9c0cbc0f
- sha256sums = 1cd009b473d5965c7cbe6d48fff272030a2ccdd9c7e67b4f837d03252786a09a
- sha256sums = d12806e4f90cc0fc081205dd4c0a5e0e7c455844f04276811b61b57fd24f5545
- sha256sums = 66e0acac7436fd8925710ef5cc66ba1a8f63a385ce374f01ae83096cc33d97a0
+ sha256sums = 3289efb3452d199aec872115f35da3f1d6fd4ce774615076690e9bc8afae1460
pkgname = mariadb-libs-git
- pkgdesc = MariaDB libraries (GIT version)
+ pkgdesc = MariaDB libraries
depends = bzip2
depends = libaio
+ depends = libxcrypt
+ depends = libcrypt.so
depends = lz4
depends = lzo
depends = openssl
depends = xz
depends = zlib
- depends = krb5
+ optdepends = krb5: for gssapi authentication
+ provides = mariadb-libs
provides = libmariadbclient
+ provides = libmariadbclient-git
provides = mariadb-connector-c
- provides = mariadb-libs
+ provides = mariadb-connector-c-git
+ provides = libmariadb.so
+ provides = libmariadbd.so
+ conflicts = mariadb-libs
conflicts = libmysqlclient
+ conflicts = libmysqlclient-git
conflicts = libmariadbclient
+ conflicts = libmariadbclient-git
conflicts = mariadb-connector-c
- conflicts = mariadb-libs
+ conflicts = mariadb-connector-c-git
replaces = libmariadbclient
+ replaces = libmariadbclient-git
pkgname = mariadb-clients-git
pkgdesc = MariaDB client tools
- depends = mariadb-libs-git
+ depends = mariadb-libs=10.7_r193391.gb857fde69ab
depends = jemalloc
- provides = mysql-clients=10.4.2.r212.g4932aba9217
- provides = mariadb-clients
+ provides = mysql-clients=10.7_r193391.gb857fde69ab
conflicts = mysql-clients
- conflicts = mariadb-clients
+ conflicts = mysql-clients-git
pkgname = mariadb-git
pkgdesc = Fast SQL database server, derived from MySQL
install = mariadb.install
- depends = mariadb-clients-git
- depends = inetutils
+ depends = mariadb-clients=10.7_r193391.gb857fde69ab
depends = systemd-libs
depends = libxml2
depends = zstd
- depends = python
+ optdepends = cracklib: for cracklib plugin
+ optdepends = curl: for ha_s3 plugin
optdepends = galera: for MariaDB cluster with Galera WSREP
- optdepends = perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission
- provides = mysql=10.4.2.r212.g4932aba9217
- provides = mariadb
+ optdepends = python-mysqlclient: for myrocks_hotbackup
+ optdepends = perl-dbd-mariadb: for mariadb-hotcopy, mariadb-convert-table-format and mariadb-setpermission
+ provides = mysql=10.7_r193391.gb857fde69ab
conflicts = mysql
- conflicts = mariadb
+ conflicts = mysql-git
options = emptydirs
- backup = etc/mysql/my.cnf
- backup = etc/mysql/my.cnf.d/client.cnf
- backup = etc/mysql/my.cnf.d/enable_encryption.preset
- backup = etc/mysql/my.cnf.d/mysql-clients.cnf
- backup = etc/mysql/my.cnf.d/server.cnf
+ backup = etc/my.cnf
+ backup = etc/my.cnf.d/client.cnf
+ backup = etc/my.cnf.d/enable_encryption.preset
+ backup = etc/my.cnf.d/mysql-clients.cnf
+ backup = etc/my.cnf.d/server.cnf
+ backup = etc/my.cnf.d/s3.cnf
+ backup = etc/my.cnf.d/spider.cnf
+ backup = etc/security/user_map.conf
pkgname = mytop-git
pkgdesc = Top clone for MariaDB
depends = perl
- depends = perl-dbd-mysql
+ depends = perl-dbd-mariadb
depends = perl-term-readkey
- provides = mytop
- conflicts = mytop
-
diff --git a/0001-arch-specific.patch b/0001-arch-specific.patch
index 26c307bd938..d194e7d42ca 100644
--- a/0001-arch-specific.patch
+++ b/0001-arch-specific.patch
@@ -1,52 +1,53 @@
-From 07abbcbbe129a4c44c58fa2496b0921e52a759c2 Mon Sep 17 00:00:00 2001
+From bf66e7d610de0d7d3651742342c01ed9ff93f363 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
-Date: Tue, 29 Jan 2019 23:12:01 +0100
-Subject: enable PrivateTmp for a little bit more security
+Date: Wed, 19 Feb 2020 13:10:17 +0100
+Subject: [PATCH 1/3] enable PrivateTmp for a little bit more security
---
support-files/mariadb.service.in | 2 +-
support-files/mariadb@.service.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
-index 8d43b6db428..a96fbcc9d2c 100644
+index e7665ed1219..a1fe69d61c4 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
-@@ -117,7 +117,7 @@ UMask=007
+@@ -129,7 +129,7 @@ UMask=007
# If you don't use the /tmp directory for SELECT ... OUTFILE and
# LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
-PrivateTmp=false
+PrivateTmp=true
- ##
- ## Options previously available to be set via [mysqld_safe]
+ # Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
+ # this is the same value as used in SysV init scripts in the past
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
-index a2f5cff0828..83d75f80b87 100644
+index ffefc2f22d8..f8b0b8aad8d 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
-@@ -41,7 +41,7 @@ Type=notify
+@@ -241,7 +241,7 @@ UMask=007
- # Setting this to true can break replication and the Type=notify settings
- # See also bind-address mysqld option.
--PrivateNetwork=false
-+PrivateNetwork=true
+ # If you don't use the /tmp directory for SELECT ... OUTFILE and
+ # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
+-PrivateTmp=false
++PrivateTmp=true
- ##############################################################################
- ## Package maintainers
-From 0e4a158086b765aa3a12b84646aefb9b192443f7 Mon Sep 17 00:00:00 2001
+ # Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
+ # this is the same value as used in SysV init scripts in the past
+
+From 00aab78891a19a14a92039fcc6a73e391a3bb471 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
-Date: Tue, 29 Jan 2019 23:12:54 +0100
-Subject: force preloading jemalloc for memory management
+Date: Wed, 19 Feb 2020 13:10:46 +0100
+Subject: [PATCH 2/3] force preloading jemalloc for memory management
---
support-files/mariadb.service.in | 1 +
support-files/mariadb@.service.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
-index a96fbcc9d2c..6bb5d4227b9 100644
+index a1fe69d61c4..9a2941ae917 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
-@@ -140,6 +140,7 @@ LimitNOFILE=16364
+@@ -159,6 +159,7 @@ LimitNOFILE=16364
# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=
@@ -55,10 +56,10 @@ index a96fbcc9d2c..6bb5d4227b9 100644
# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
-index 83d75f80b87..d1d24d685f9 100644
+index f8b0b8aad8d..3309127330c 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
-@@ -161,6 +161,7 @@ LimitNOFILE=16364
+@@ -282,6 +282,7 @@ LimitNOFILE=16364
# Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
# (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
# Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=
@@ -66,69 +67,28 @@ index 83d75f80b87..d1d24d685f9 100644
# Flush caches. previously [mysqld_safe] flush-caches=1
# ExecStartPre=sync
-From 72b42fb1a344bfc3f3c3c905fe85c93ac4a752e3 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@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 a78ff18c83a5eb2556d4f3716f13786dcd8395d2 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
-Date: Wed, 30 Jan 2019 00:46:47 +0100
-Subject: remove aliases from systemd unit files
+Date: Wed, 19 Feb 2020 13:11:31 +0100
+Subject: [PATCH 3/3] 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.
+
+This solves packaging issues when the user MYSQLD_USER is created by
+systemd-sysusers and uid is not known in advance.
+
+Also this now sets the No_COW attribute.
---
- support-files/mariadb.service.in | 2 --
- support-files/mariadb@.service.in | 2 --
- 2 files changed, 4 deletions(-)
+ support-files/tmpfiles.conf.in | 2 +
+ 1 file changed, 2 insertion(+)
-diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
-index 8d43b6db428..d7fa6bf5b14 100644
---- a/support-files/mariadb.service.in
-+++ b/support-files/mariadb.service.in
-@@ -20,8 +20,6 @@ After=network.target
-
- [Install]
- WantedBy=multi-user.target
--Alias=mysql.service
--Alias=mysqld.service
-
-
- [Service]
-diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
-index a2f5cff0828..3fc41358e14 100644
---- a/support-files/mariadb@.service.in
-+++ b/support-files/mariadb@.service.in
-@@ -27,8 +27,6 @@ ConditionPathExists=@sysconf2dir@/my%I.cnf
-
- [Install]
- WantedBy=multi-user.target
--Alias=mysql.service
--Alias=mysqld.service
-
-
- [Service]
+diff --git a/support-files/tmpfiles.conf.in b/support-files/tmpfiles.conf.in
+index 03d66abc0c7..3c89cb258c9 100644
+--- a/support-files/tmpfiles.conf.in
++++ b/support-files/tmpfiles.conf.in
+@@ -1 +1,3 @@
+ d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -
++d @MYSQL_DATADIR@ 0700 @MYSQLD_USER@ @MYSQLD_USER@ -
++h @MYSQL_DATADIR@ - - - - +C
diff --git a/0002-systemd-sysusers-tmpfiles.patch b/0002-systemd-sysusers-tmpfiles.patch
deleted file mode 100644
index c18cff67ffa..00000000000
--- a/0002-systemd-sysusers-tmpfiles.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From dc7aff5e5331820205282576f6ade015f672969b Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Tue, 2 Jan 2018 14:32:21 +0100
-Subject: Use descriptive file names for sysusers and tmpfiles configuration
-
-These files were installed to:
-
-${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf
-${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
-
-Instead rename the files to more descriptive file names 'mariadb.conf'.
----
- 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
---- a/support-files/CMakeLists.txt
-+++ b/support-files/CMakeLists.txt
-@@ -117,7 +117,8 @@ IF(UNIX)
- CONFIGURE_FILE(sysusers.conf.in
- ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
-- DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} COMPONENT Server)
-+ DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR}
-+ RENAME mariadb.conf COMPONENT Server)
- ENDIF()
-
- IF(INSTALL_SYSTEMD_TMPFILESDIR)
-@@ -125,7 +126,8 @@ IF(UNIX)
- CONFIGURE_FILE(tmpfiles.conf.in
- ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
-- DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} COMPONENT Server)
-+ DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR}
-+ RENAME mariadb.conf COMPONENT Server)
- 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: Christian Hesse <mail@eworm.de>
-Date: Tue, 2 Jan 2018 14:36:49 +0100
-Subject: 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.
-
-This solves packaging issues when the user MYSQLD_USER is created by
-systemd-sysusers and uid is not known in advance.
----
- support-files/tmpfiles.conf.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/support-files/tmpfiles.conf.in b/support-files/tmpfiles.conf.in
-index 03d66abc0c7..3c89cb258c9 100644
---- a/support-files/tmpfiles.conf.in
-+++ b/support-files/tmpfiles.conf.in
-@@ -1 +1,2 @@
- d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -
-+d @MYSQL_DATADIR@ 0700 @MYSQLD_USER@ @MYSQLD_USER@ -
diff --git a/0004-do-not-break-main-configuration-with-instantiated-one.patch b/0004-do-not-break-main-configuration-with-instantiated-one.patch
deleted file mode 100644
index 00da448e889..00000000000
--- a/0004-do-not-break-main-configuration-with-instantiated-one.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8fe9b2658664d0ece15fe57442706446fed66d6e Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@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@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@.service.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
-index a2f5cff0828..1207e690f47 100644
---- a/support-files/mariadb@.service.in
-+++ b/support-files/mariadb@.service.in
-@@ -1,7 +1,7 @@
- # Multi instance version of mariadb. For if you run multiple versions at once.
- # Also used for mariadb@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
diff --git a/0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch b/0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
deleted file mode 100644
index f3de571d86a..00000000000
--- a/0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 5936f0be4a49eda7b05ea1591bbbba3d72e4d7b9 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail@eworm.de>
-Date: Fri, 25 Jan 2019 14:50:53 +0100
-Subject: 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
-by default.
-
-With this protection enabled galera_recovery fails with EPERM
-(permission denied). This is caused by a wrong security measure:
-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.
----
- 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
---- a/scripts/galera_recovery.sh
-+++ b/scripts/galera_recovery.sh
-@@ -101,8 +101,7 @@ wsrep_recover_position() {
-
- # Safety checks
- if [ -n "$log_file" -a -f "$log_file" ]; then
-- [ "$euid" = "0" ] && chown $user $log_file
-- chmod 600 $log_file
-+ chmod 600 $log_file
- else
- log "WSREP: mktemp failed"
- fi
diff --git a/PKGBUILD b/PKGBUILD
index 578ee4dc037..4e5e1e9da62 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,62 +1,51 @@
-# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
-# Maintainer: Christian Hesse <mail@eworm.de>
+# Merged with official ABS mariadb PKGBUILD by João, 2021/07/22 (all respective contributors apply herein)
+# Maintainer: João Figueiredo & chaotic-aur <islandc0der@chaotic.cx>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Christian Hesse <mail@eworm.de>
pkgbase=mariadb-git
-_pkgbase=mariadb
-pkgname=('mariadb-libs-git' 'mariadb-clients-git' 'mariadb-git' 'mytop-git')
-pkgdesc='Fast SQL database server, derived from MySQL (GIT version)'
-pkgver=10.4.2.r212.g4932aba9217
-pkgrel=2
-arch=('x86_64')
-license=('GPL')
+pkgname=(mariadb-libs-git mariadb-clients-git mariadb-git mytop-git)
+pkgdesc='Fast SQL database server, derived from MySQL'
+pkgver=10.7_r193391.gb857fde69ab
+pkgrel=1
+arch=($CARCH)
+license=(GPL)
url='https://mariadb.org/'
-makedepends=('boost' 'bzip2' 'cmake' 'jemalloc' 'libaio' 'libxml2' 'lz4' 'lzo'
- 'openssl' 'systemd' 'zlib' 'zstd' 'git')
-source=("$_pkgbase::git://github.com/MariaDB/server.git"
- '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')
+makedepends=(git boost bzip2 cmake jemalloc libaio libxcrypt libxml2 lz4 lzo openssl systemd zlib zstd curl krb5 cracklib)
+conflicts=(${pkgbase%-git})
+provides=(${pkgbase%-git})
+source=("git+https://github.com/MariaDB/server.git"
+ 0001-arch-specific.patch)
sha256sums=('SKIP'
- '5a443a403821931ce35759e9583d23cd809b3b5a5df5b8293ac8e33b9c0cbc0f'
- '1cd009b473d5965c7cbe6d48fff272030a2ccdd9c7e67b4f837d03252786a09a'
- 'd12806e4f90cc0fc081205dd4c0a5e0e7c455844f04276811b61b57fd24f5545'
- '66e0acac7436fd8925710ef5cc66ba1a8f63a385ce374f01ae83096cc33d97a0')
+ '3289efb3452d199aec872115f35da3f1d6fd4ce774615076690e9bc8afae1460')
+
+pkgver() {
+ cd server
+ _ver="$(grep -m1 '^Source:' debian/control | cut -d '-' -f2 | tr - .)"
+ echo "${_ver}_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
+}
prepare() {
- cd $_pkgbase/
+ cd server/
# Arch Linux specific patches:
# * enable PrivateTmp for a little bit more security
# * force preloading jemalloc for memory management
- # * fix path to our config
+ # * make systemd-tmpfiles create MYSQL_DATADIR
patch -Np1 < ../0001-arch-specific.patch
-
- # MDEV-17028 Fix glitches with systemd sysusers and tmpfiles:
- # * Use descriptive file names for sysusers and tmpfiles configuration
- # * Make systemd-tmpfiles create MYSQL_DATADIR
- # 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
}
build() {
local _cmake_options=(
# build options
+ -DCOMPILATION_COMMENT="Arch Linux"
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-Wno-dev
# 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
@@ -103,7 +92,7 @@ build() {
mkdir build
cd build
- cmake ../"$_pkgbase" "${_cmake_options[@]}"
+ cmake ../server "${_cmake_options[@]}"
make
}
@@ -116,11 +105,12 @@ check() {
}
package_mariadb-libs-git() {
- pkgdesc='MariaDB libraries (GIT version)'
- depends=('bzip2' 'libaio' 'lz4' 'lzo' 'openssl' 'xz' 'zlib' 'krb5')
- conflicts=('libmysqlclient' 'libmariadbclient' 'mariadb-connector-c' 'mariadb-libs')
- provides=('libmariadbclient' 'mariadb-connector-c' 'mariadb-libs')
- replaces=('libmariadbclient')
+ pkgdesc='MariaDB libraries'
+ depends=(bzip2 libaio libxcrypt libcrypt.so lz4 lzo openssl xz zlib)
+ optdepends=('krb5: for gssapi authentication')
+ conflicts=(mariadb-libs libmysqlclient{,-git} libmariadbclient{,-git} mariadb-connector-c{,-git})
+ provides=(mariadb-libs libmariadbclient{,-git} mariadb-connector-c{,-git} libmariadb.so libmariadbd.so)
+ replaces=(libmariadbclient{,-git})
cd build
@@ -128,24 +118,27 @@ package_mariadb-libs-git() {
make -C "$dir" DESTDIR="$pkgdir" install
done
+ ln -s mariadb_config "$pkgdir"/usr/bin/mariadb-config
ln -s mariadb_config "$pkgdir"/usr/bin/mysql_config
- install -D -m0644 "$srcdir"/"$_pkgbase"/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/mysql_config.1
+ install -D -m0644 "$srcdir"/server/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/mysql_config.1
install -D -m0644 support-files/mariadb.pc "$pkgdir"/usr/share/pkgconfig/mariadb.pc
- install -D -m0644 "$srcdir"/"$_pkgbase"/support-files/mysql.m4 "$pkgdir"/usr/share/aclocal/mysql.m4
+ install -D -m0644 "$srcdir"/server/support-files/mysql.m4 "$pkgdir"/usr/share/aclocal/mysql.m4
cd "$pkgdir"
# remove static libraries
rm usr/lib/*.a
- rm usr/lib/mysql/plugin/client_ed25519.so
+
+ # remove man pages
+ rm -r usr/share/man
}
package_mariadb-clients-git() {
pkgdesc='MariaDB client tools'
- depends=('mariadb-libs-git' 'jemalloc')
- conflicts=('mysql-clients' 'mariadb-clients')
- provides=("mysql-clients=${pkgver}" 'mariadb-clients')
+ depends=(mariadb-libs=${pkgver} jemalloc)
+ conflicts=(mysql-clients{,-git})
+ provides=(mysql-clients=$pkgver)
cd build
@@ -153,24 +146,30 @@ package_mariadb-clients-git() {
# install man pages
for man in mysql mysql_plugin mysql_upgrade mysqladmin mysqlbinlog mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqltest; do
- install -D -m0644 "$srcdir"/"$_pkgbase"/man/"$man.1" "$pkgdir"/usr/share/man/man1/"$man.1"
+ install -D -m0644 "$srcdir"/server/man/"$man.1" "$pkgdir"/usr/share/man/man1/"$man.1"
done
}
package_mariadb-git() {
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'
+ 'etc/my.cnf.d/s3.cnf'
+ 'etc/my.cnf.d/spider.cnf'
+ 'etc/security/user_map.conf')
install=mariadb.install
- depends=("mariadb-clients-git" 'inetutils' 'systemd-libs' 'libxml2' 'zstd' 'python')
- optdepends=('galera: for MariaDB cluster with Galera WSREP'
- 'perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission')
- conflicts=('mysql' 'mariadb')
- provides=("mysql=$pkgver" 'mariadb')
- options=('emptydirs')
+ depends=(mariadb-clients=${pkgver} systemd-libs libxml2 zstd)
+ optdepends=('cracklib: for cracklib plugin'
+ 'curl: for ha_s3 plugin'
+ 'galera: for MariaDB cluster with Galera WSREP'
+ 'python-mysqlclient: for myrocks_hotbackup'
+ 'perl-dbd-mariadb: for mariadb-hotcopy, mariadb-convert-table-format and mariadb-setpermission')
+ conflicts=(mysql{,-git})
+ provides=(mysql=$pkgver)
+ options=(emptydirs)
cd build
@@ -179,14 +178,10 @@ package_mariadb-git() {
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}
- # link service files with old name for compatibility
- ln -s mariadb.service usr/lib/systemd/system/mysqld.service
- ln -s mariadb@.service usr/lib/systemd/system/mysqld@.service
-
# move to proper licenses directories
install -d usr/share/licenses/mariadb
mv usr/share/doc/mariadb/COPYING* usr/share/licenses/mariadb/
@@ -194,39 +189,40 @@ package_mariadb-git() {
# move it where one might look for it
mv usr/share/{groonga{,-normalizer-mysql},doc/mariadb/}
+ # move to pam directories
+ install -d {etc,usr/lib}/security
+ mv usr/share/user_map.conf etc/security/
+ mv usr/share/pam_user_map.so usr/lib/security/
+
# already installed to real systemd unit directory or useless
rm -r usr/share/mysql/systemd/
rm -r usr/lib/systemd/system/mariadb@bootstrap.service.d
# provided by mariadb-libs
- rm usr/bin/mariadb_config
- rm usr/bin/mysql_config
+ rm usr/bin/{mariadb{_,-},mysql_}config
rm -r usr/include/
rm usr/share/man/man1/mysql_config.1
- rm -r usr/share/{aclocal,pkgconfig}
+ rm -r usr/share/aclocal
rm usr/lib/lib*
- rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,dialog,mysql_clear_password,sha256_password}.so
- rm -r usr/lib/pkgconfig/
+ rm -r usr/lib/pkgconfig
+ rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,client_ed25519,dialog,mysql_clear_password,sha256_password}.so
# 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,conv,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
# not needed
- rm -r usr/{data,mysql-test,sql-bench}
+ rm -r usr/{mysql-test,sql-bench}
rm usr/share/man/man1/mysql-test-run.pl.1
}
package_mytop-git() {
pkgdesc='Top clone for MariaDB'
- depends=('perl' 'perl-dbd-mysql' 'perl-term-readkey')
- provides=('mytop')
- conflicts=('mytop')
-
- cd build
+ depends=(perl perl-dbd-mariadb perl-term-readkey)
- install -D -m0755 scripts/mytop "$pkgdir"/usr/bin/mytop
+ install -D -m0755 build/scripts/mytop "$pkgdir"/usr/bin/mytop
}
diff --git a/mariadb.install b/mariadb.install
index 58dd55bf596..c67092b697e 100644
--- a/mariadb.install
+++ b/mariadb.install
@@ -2,14 +2,14 @@
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 " the service. This can be done with mariadb-install-db command, e.g.:"
+ echo " mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
}
post_upgrade() {
# show for feature release: 10.1 -> 10.2 -> 10.3 -> ...
- if [ $(vercmp "${1%.*}" "${2%.*}") -ne 0 ]; then
+ 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
}