diff options
Diffstat (limited to 'main/mariadb')
-rw-r--r-- | main/mariadb/APKBUILD | 89 | ||||
-rw-r--r-- | main/mariadb/fix-mysql-install-db-path.patch | 18 | ||||
-rw-r--r-- | main/mariadb/mariadb-common.post-upgrade | 7 | ||||
-rw-r--r-- | main/mariadb/ppc-remove-glibc-dep.patch | 120 |
4 files changed, 139 insertions, 95 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD index a0cc2275cf..f4feb3de25 100644 --- a/main/mariadb/APKBUILD +++ b/main/mariadb/APKBUILD @@ -5,7 +5,7 @@ # Contributor: TBK <alpine@jjtc.eu> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mariadb -pkgver=10.2.15 +pkgver=10.3.9 pkgrel=0 pkgdesc="A fast SQL database server" url="http://www.mariadb.org" @@ -20,7 +20,7 @@ depends_dev="libressl-dev zlib-dev mariadb-connector-c-dev" makedepends="$depends_dev bison cmake curl-dev libaio-dev libarchive-dev libevent-dev libxml2-dev ncurses-dev pcre-dev readline-dev xz-dev linux-headers $_mytopdeps" -install="$pkgname.pre-install" +install="$pkgname.pre-install $pkgname-common.post-upgrade" subpackages="$pkgname-static $pkgname-test:mytest $pkgname-embedded-dev:_embedded_dev $pkgname-doc $pkgname-dev $pkgname-common $pkgname-openrc $pkgname-client $pkgname-bench $pkgname-backup $pkgname-embedded $pkgname-mytop @@ -77,7 +77,8 @@ build() { cd "$builddir" cmake . -DBUILD_CONFIG=mysql_release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DSYSCONFDIR=/etc/mysql \ + -DSYSCONFDIR=/etc \ + -DSYSCONF2DIR=/etc/my.cnf.d \ -DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \ -DDEFAULT_CHARSET=utf8 \ @@ -148,7 +149,8 @@ build() { check() { cd "$builddir" - make test + # exclude test-connect which seems to be buggy. testsuite does not set port env var + ctest -E test-connect } package() { @@ -157,10 +159,7 @@ package() { install -Dm 755 "$startdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname - - # use small example config as default, which has tcp disabled - install -Dm 640 -o mysql "$pkgdir"/usr/share/mariadb/my-medium.cnf \ - "$pkgdir"/etc/mysql/my.cnf + mkdir -p "$pkgdir"/etc/my.cnf.d # mysql-test includes one executable that doesn't belong under # /usr/share, so move it and provide a symlink @@ -196,6 +195,66 @@ package() { "$pkgdir"/usr/lib/libmysqlclient.so \ "$pkgdir"/usr/lib/libmysqlclient_r.so \ "$pkgdir"/usr/lib/libmariadb.so* + + cat >"$pkgdir"/etc/my.cnf<<-EOF + # This group is read both both by the client and the server + # use it for options that affect everything + [client-server] + + # This group is read by the server + [mysqld] + + # Disabling symbolic-links is recommended to prevent assorted security risks + symbolic-links=0 + + # include all files from the config directory + !includedir /etc/my.cnf.d + EOF + + cat >"$pkgdir"/etc/my.cnf.d/mariadb-server.cnf<<-EOF + # + # These groups are read by MariaDB server. + # Use it for options that only the server (but not clients) should see + + # this is read by the standalone daemon and embedded servers + [server] + + # this is only for the mysqld standalone daemon + [mysqld] + skip-networking + + # Galera-related settings + [galera] + # Mandatory settings + #wsrep_on=ON + #wsrep_provider= + #wsrep_cluster_address= + #binlog_format=row + #default_storage_engine=InnoDB + #innodb_autoinc_lock_mode=2 + # + # Allow server to accept connections on all interfaces. + # + #bind-address=0.0.0.0 + # + # Optional setting + #wsrep_slave_threads=1 + #innodb_flush_log_at_trx_commit=0 + + # this is only for embedded server + [embedded] + + # This group is only read by MariaDB servers, not by MySQL. + # If you use the same .cnf file for MySQL and MariaDB, + # you can put MariaDB-only options here + [mariadb] + + # This group is only read by MariaDB-10.3 servers. + # If you use the same .cnf file for MariaDB of different versions, + # use this group for options that older servers don't understand + [mariadb-10.3] + + EOF } dev() { @@ -210,9 +269,9 @@ common() { replaces="mysql-common" depends= mkdir -p "$subpkgdir"/usr/share/$pkgname \ - "$subpkgdir"/etc \ + "$subpkgdir"/etc/mysql \ "$subpkgdir"/usr/lib/$pkgname/plugin - mv "$pkgdir"/etc/mysql "$subpkgdir"/etc/ + mv "$pkgdir"/etc/my.* "$subpkgdir"/etc/ local lang="charsets danish english french greek italian korean norwegian-ny portuguese russian slovak swedish czech dutch estonian german hungarian japanese norwegian polish romanian serbian spanish @@ -266,7 +325,7 @@ _compat_client() { _compat mysql-client mariadb-client; } _compat_bench() { _compat mysql-bench mariadb-client; } static() { - pkgdesc="Static libraries for mariadb" + pkgdesc="Static libraries for MariaDB" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ } @@ -283,7 +342,7 @@ embedded() { pkgdesc="MariaDB as an embeddable library" depends="$pkgname-common=$pkgver-r$pkgrel" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libmysqld.so.* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/libmariadbd.so.* "$subpkgdir"/usr/lib/ } @@ -330,9 +389,9 @@ _plugin_rocksdb() { "$subpkgdir"/usr/lib/mariadb/plugin/ha_rocksdb.so } -sha512sums="7702af8787973b15784dc8a89f9d56765725a420e2e68f1924b67c88c134c7d83d3249dddd16707fa9e5f05ed747f813f16feefbb477e999a6698b1dcfb5a88f mariadb-10.2.15.tar.gz +sha512sums="7c7a678fb0c85da64b6df3df17b8cf7f2ccf862e27dcf8535f7403f8693c76b3b1a912f4b6ca876a591ada60a99577a947bfe7a63c602f754332e1e4f689e6e7 mariadb-10.3.9.tar.gz 06751768cb00d2e433655635c38d267ef25084a5830ff40e719ac579223c7192dc34b43f919ab6faf480094632327511cbd22456064dde2d04dc15648b9e3b9f mariadb.initd -88d9084c8ca3a94e6e1a7fa91091f577ee063f4b13046cc805f61f3be37993b98c79665e5995d8b6b7fa10efbe00fcbde638db5b0b59f0d5e0e951b24b5108e9 fix-mysql-install-db-path.patch +0c08198b907dad18c5a7ab89f37ff53da7cb102b0848fb58912900bd92468a0d4f853bc5c0116f655c500d5ed20dcbf20d3884dcd0040634e23c911dfeaf7001 fix-mysql-install-db-path.patch 2d42a3e4051aaeee49da52947dbc354d44d975ca50571777a0aba8bed032ccd6a07c29e0cbb9f74c396dce9937b5d16af19ab310638c285e418e0281361024f3 fix-ucontext-check.patch -81d2a95bfbce35fab6e1780f4201320e5621f470591020d707801dcf31f5fad3cb5d7b781a186b2914c6559a8fdc8f13e31e7cdde0af360ad56cedf80e491bc0 ppc-remove-glibc-dep.patch +e9ae4613f1d8c5f0a59b39a3548c46e50674ae78e7457d0e64c49f7e1573125c13634bbce7e29179bb8865a423171f852f43b96f7ef95619a95f02edcfc71efd ppc-remove-glibc-dep.patch 70da971aa78815495098205bcbd28428430aa83c3f1050fec0231ca86af9d9def2d2108a48ee08d86812c8dc5ad8ab1ef4e17a49b4936ed5187ae0f6a7ef8f63 pcre.cmake.patch" diff --git a/main/mariadb/fix-mysql-install-db-path.patch b/main/mariadb/fix-mysql-install-db-path.patch index 3f4866188b..cabb28711b 100644 --- a/main/mariadb/fix-mysql-install-db-path.patch +++ b/main/mariadb/fix-mysql-install-db-path.patch @@ -1,9 +1,15 @@ +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index 464c00d..d75874e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt -@@ -167,23 +167,13 @@ - # i.e. makes access relative the current directory. This matches - # the documentation, so better not change this. +@@ -166,29 +166,13 @@ SET(HOSTNAME "hostname") + SET(MYSQLD_USER "mysql") + ENDIF(UNIX) +-# Really ugly, one script, "mysql_install_db", needs prefix set to ".", +-# i.e. makes access relative the current directory. This matches +-# the documentation, so better not change this. +- -IF(INSTALL_LAYOUT MATCHES "STANDALONE") - SET(prefix ".") - SET(bindir ${prefix}/${INSTALL_BINDIR}) @@ -11,6 +17,7 @@ - SET(scriptdir ${prefix}/${INSTALL_BINDIR}) - SET(libexecdir ${prefix}/${INSTALL_SBINDIR}) - SET(pkgdatadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) +- SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR}) - SET(localstatedir ${prefix}/data) -ELSE() - SET(prefix "${CMAKE_INSTALL_PREFIX}") @@ -19,6 +26,7 @@ - SET(scriptdir ${INSTALL_BINDIRABS}) - SET(libexecdir ${INSTALL_SBINDIRABS}) - SET(pkgdatadir ${INSTALL_MYSQLSHAREDIRABS}) +- SET(pkgplugindir ${INSTALL_PLUGINDIRABS}) - SET(localstatedir ${MYSQL_DATADIR}) -ENDIF() +SET(prefix "${CMAKE_INSTALL_PREFIX}") @@ -29,5 +37,5 @@ +SET(pkgdatadir ${prefix}/${INSTALL_MYSQLSHAREDIR}) +SET(localstatedir ${MYSQL_DATADIR}) - IF(UNIX) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh + SET(resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin") + SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin") diff --git a/main/mariadb/mariadb-common.post-upgrade b/main/mariadb/mariadb-common.post-upgrade new file mode 100644 index 0000000000..2809398355 --- /dev/null +++ b/main/mariadb/mariadb-common.post-upgrade @@ -0,0 +1,7 @@ +#!/bin/sh + +# do not disable networking if we have a pre-existing, old config +if [ -e /etc/mysql/my.cnf ] && [ -e /etc/my.cnf.d/mariadb-server.cnf ]; then + sed -i -e 's/^skip-networking/#skip-networking/' /etc/my.cnf.d/mariadb-server.cnf +fi + diff --git a/main/mariadb/ppc-remove-glibc-dep.patch b/main/mariadb/ppc-remove-glibc-dep.patch index 3e9580ee02..57f5008b86 100644 --- a/main/mariadb/ppc-remove-glibc-dep.patch +++ b/main/mariadb/ppc-remove-glibc-dep.patch @@ -1,79 +1,49 @@ -From f5cf70d9d1dc7f4cbeffb7fb75cbbe08720e3873 Mon Sep 17 00:00:00 2001 -From: Gustavo Romero <gromero@br.ibm.com> -Date: Sun, 26 Mar 2017 15:08:15 +0000 -Subject: [PATCH] Remove dependency on glibc on PPC - -Remove dependency on glibc by using gcc builtin function and no glibc -wrappers. - -Currently there are no surrogates in musl for: - - __ppc_get_timebase() - __ppc_set_ppr_low() - __ppc_set_ppr_med() - -however glibc __ppc_get_timebase() is just a wrapper for GCC builtin -__builtin_get_timebase() available since GCC 4.8 [1], so assuming that -aports on ppc64le will never be built using GCC < 4.8 we can just -switch directly to the GCC builtin function. - -Also __ppc_set_ppr_{low,med}() are not available on musl but both -are simple glibc wrappers on a single asm instruction, hence there -is no harm in using asm directly instead. Actually, using asm -directly was the first solution adopted in MariaDB [2]. - -[1] https://goo.gl/jxLV6O -[2] https://goo.gl/9bjuVC - ---- a/storage/xtradb/include/ut0ut.h -+++ b/storage/xtradb/include/ut0ut.h -@@ -85,9 +85,8 @@ - the YieldProcessor macro defined in WinNT.h. It is a CPU architecture- - independent way by using YieldProcessor. */ - # define UT_RELAX_CPU() YieldProcessor() --# elif defined(__powerpc__) && defined __GLIBC__ --#include <sys/platform/ppc.h> --# define UT_RELAX_CPU() __ppc_get_timebase() -+# elif defined(__powerpc__) -+# define UT_RELAX_CPU() __builtin_ppc_get_timebase() - # else - # define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */ - # endif -@@ -101,9 +100,8 @@ - #endif +diff --git a/include/my_cpu.h b/include/my_cpu.h +index f2e26fca..94599b74 100644 +--- a/include/my_cpu.h ++++ b/include/my_cpu.h +@@ -24,17 +24,16 @@ + */ - # if defined(HAVE_HMT_PRIORITY_INSTRUCTION) + #ifdef _ARCH_PWR8 -#include <sys/platform/ppc.h> --# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low() --# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med() -+# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1") -+# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2") - # else - # define UT_LOW_PRIORITY_CPU() ((void)0) - # define UT_RESUME_PRIORITY_CPU() ((void)0) ---- a/storage/innobase/include/ut0ut.h -+++ b/storage/innobase/include/ut0ut.h -@@ -70,9 +70,8 @@ - the YieldProcessor macro defined in WinNT.h. It is a CPU architecture- - independent way by using YieldProcessor. */ - # define UT_RELAX_CPU() YieldProcessor() --#elif defined(__powerpc__) && defined __GLIBC__ --# include <sys/platform/ppc.h> --# define UT_RELAX_CPU() __ppc_get_timebase() -+#elif defined(__powerpc__) -+# define UT_RELAX_CPU() __builtin_ppc_get_timebase() + /* Very low priority */ +-#define HMT_very_low() __ppc_set_ppr_very_low() ++#define HMT_very_low() asm volatile("or 31,31,31") + /* Low priority */ +-#define HMT_low() __ppc_set_ppr_low() ++#define HMT_low() asm volatile ("or 1,1,1") + /* Medium low priority */ +-#define HMT_medium_low() __ppc_set_ppr_med_low() ++#define HMT_medium_low() asm volatile ("or 6,6,6") + /* Medium priority */ +-#define HMT_medium() __ppc_set_ppr_med() ++#define HMT_medium() asm volatile ("or 2,2,2") + /* Medium high priority */ +-#define HMT_medium_high() __ppc_set_ppr_med_high() ++#define HMT_medium_high() asm volatile("or 5,5,5") + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") #else - # define UT_RELAX_CPU() do { \ - volatile int32 volatile_var; \ -@@ -90,9 +89,8 @@ - #endif - - #if defined(HAVE_HMT_PRIORITY_INSTRUCTION) --# include <sys/platform/ppc.h> --# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low() --# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med() -+# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1") -+# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2") +@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void) + */ + YieldProcessor(); + #elif defined(_ARCH_PWR8) +- __ppc_get_timebase(); ++ __builtin_ppc_get_timebase(); + #else + int32 var, oldval = 0; + my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED, +diff --git a/storage/tokudb/PerconaFT/portability/toku_time.h b/storage/tokudb/PerconaFT/portability/toku_time.h +index c4c45b8e..2f7a07f5 100644 +--- a/storage/tokudb/PerconaFT/portability/toku_time.h ++++ b/storage/tokudb/PerconaFT/portability/toku_time.h +@@ -110,7 +110,7 @@ static inline tokutime_t toku_time_now(void) { + __asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result)); + return result; + #elif defined(__powerpc__) +- return __ppc_get_timebase(); ++ return __builtin_ppc_get_timebase(); #else - # define UT_LOW_PRIORITY_CPU() ((void)0) - # define UT_RESUME_PRIORITY_CPU() ((void)0) + #error No timer implementation for this platform + #endif |