aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-08-28 08:46:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-28 08:50:37 +0000
commit7fd31e497c7d3dc058c3620358f31d24e83d5007 (patch)
tree4e3127220cccee2b69b0f27de3a25e764fb83479 /main/mariadb/APKBUILD
parentc48e70f36d4bbe93e00283f1e937ad59fb671561 (diff)
downloadaports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.gz
aports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.bz2
aports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.xz
main/mariadb: upgrade to 10.3.9 and move default config
move default config to /etc/my.cnf and /etc/my.cnf.d/. This is to make it easier to ship default configs for clients, plugins and mysql, without introducing conflicts. We also add a post-upgrade script which makes sure that the skip-networking setting does not disable networking in a pre-existing config on upgrade.
Diffstat (limited to 'main/mariadb/APKBUILD')
-rw-r--r--main/mariadb/APKBUILD89
1 files changed, 74 insertions, 15 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"