Browse Source

[trunk] -> [testing] 'mariadb-10.3.15-1' add

master
artoo 1 month ago
parent
commit
311ff40d9d
Signed by: artoo <artoo@artixlinux.org> GPG Key ID: 3292CD0BB0DB310B

+ 134
- 0
mariadb/repos/testing-x86_64/0001-arch-specific.patch View File

@@ -0,0 +1,134 @@
1
+From 07abbcbbe129a4c44c58fa2496b0921e52a759c2 Mon Sep 17 00:00:00 2001
2
+From: Christian Hesse <mail@eworm.de>
3
+Date: Tue, 29 Jan 2019 23:12:01 +0100
4
+Subject: enable PrivateTmp for a little bit more security
5
+---
6
+ support-files/mariadb.service.in  | 2 +-
7
+ support-files/mariadb@.service.in | 2 +-
8
+ 2 files changed, 2 insertions(+), 2 deletions(-)
9
+
10
+diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
11
+index 8d43b6db428..a96fbcc9d2c 100644
12
+--- a/support-files/mariadb.service.in
13
++++ b/support-files/mariadb.service.in
14
+@@ -117,7 +117,7 @@ UMask=007
15
+ 
16
+ # If you don't use the /tmp directory for SELECT ... OUTFILE and
17
+ # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
18
+-PrivateTmp=false
19
++PrivateTmp=true
20
+ 
21
+ ##
22
+ ## Options previously available to be set via [mysqld_safe]
23
+diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
24
+index a2f5cff0828..30631a8738a 100644
25
+--- a/support-files/mariadb@.service.in
26
++++ b/support-files/mariadb@.service.in
27
+@@ -138,7 +138,7 @@ UMask=007
28
+ 
29
+ # If you don't use the /tmp directory for SELECT ... OUTFILE and
30
+ # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
31
+-PrivateTmp=false
32
++PrivateTmp=true
33
+ 
34
+ ##
35
+ ## Options previously available to be set via [mysqld_safe]
36
+From 0e4a158086b765aa3a12b84646aefb9b192443f7 Mon Sep 17 00:00:00 2001
37
+From: Christian Hesse <mail@eworm.de>
38
+Date: Tue, 29 Jan 2019 23:12:54 +0100
39
+Subject: force preloading jemalloc for memory management
40
+---
41
+ support-files/mariadb.service.in  | 1 +
42
+ support-files/mariadb@.service.in | 1 +
43
+ 2 files changed, 2 insertions(+)
44
+
45
+diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
46
+index a96fbcc9d2c..6bb5d4227b9 100644
47
+--- a/support-files/mariadb.service.in
48
++++ b/support-files/mariadb.service.in
49
+@@ -140,6 +140,7 @@ LimitNOFILE=16364
50
+ # Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
51
+ # (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
52
+ # Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=
53
++Environment="LD_PRELOAD=/usr/lib/libjemalloc.so"
54
+ 
55
+ # Flush caches. previously [mysqld_safe] flush-caches=1
56
+ # ExecStartPre=sync
57
+diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
58
+index 83d75f80b87..d1d24d685f9 100644
59
+--- a/support-files/mariadb@.service.in
60
++++ b/support-files/mariadb@.service.in
61
+@@ -161,6 +161,7 @@ LimitNOFILE=16364
62
+ # Library substitutions. previously [mysqld_safe] malloc-lib with explicit paths
63
+ # (in LD_LIBRARY_PATH) and library name (in LD_PRELOAD).
64
+ # Environment="LD_LIBRARY_PATH=/path1 /path2" "LD_PRELOAD=
65
++Environment="LD_PRELOAD=/usr/lib/libjemalloc.so"
66
+ 
67
+ # Flush caches. previously [mysqld_safe] flush-caches=1
68
+ # ExecStartPre=sync
69
+From 72b42fb1a344bfc3f3c3c905fe85c93ac4a752e3 Mon Sep 17 00:00:00 2001
70
+From: Christian Hesse <mail@eworm.de>
71
+Date: Tue, 29 Jan 2019 23:14:23 +0100
72
+Subject: fix path to our config
73
+---
74
+ support-files/rpm/enable_encryption.preset | 2 +-
75
+ support-files/rpm/my.cnf                   | 2 +-
76
+ 2 files changed, 2 insertions(+), 2 deletions(-)
77
+
78
+diff --git a/support-files/rpm/enable_encryption.preset b/support-files/rpm/enable_encryption.preset
79
+index 722db7e5fa1..978a7494c6b 100644
80
+--- a/support-files/rpm/enable_encryption.preset
81
++++ b/support-files/rpm/enable_encryption.preset
82
+@@ -1,5 +1,5 @@
83
+ #
84
+-# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d)
85
++# !include this file into your my.cnf (or any of *.cnf files in /etc/mysql/my.cnf.d)
86
+ # and it will enable data at rest encryption. This is a simple way to
87
+ # ensure that everything that can be encrypted will be and your
88
+ # data will not leak unencrypted.
89
+diff --git a/support-files/rpm/my.cnf b/support-files/rpm/my.cnf
90
+index 913b88f8328..17d25361178 100644
91
+--- a/support-files/rpm/my.cnf
92
++++ b/support-files/rpm/my.cnf
93
+@@ -7,5 +7,5 @@
94
+ #
95
+ # include all files from the config directory
96
+ #
97
+-!includedir /etc/my.cnf.d
98
++!includedir /etc/mysql/my.cnf.d
99
+ 
100
+From 820b47c1e70d36f1272cca3ddbdf4bbd2dd62bde Mon Sep 17 00:00:00 2001
101
+From: Christian Hesse <mail@eworm.de>
102
+Date: Wed, 30 Jan 2019 00:46:47 +0100
103
+Subject: remove aliases from systemd unit files
104
+---
105
+ support-files/mariadb.service.in  | 2 --
106
+ support-files/mariadb@.service.in | 2 --
107
+ 2 files changed, 4 deletions(-)
108
+
109
+diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
110
+index 8d43b6db428..d7fa6bf5b14 100644
111
+--- a/support-files/mariadb.service.in
112
++++ b/support-files/mariadb.service.in
113
+@@ -20,8 +20,6 @@ After=network.target
114
+ 
115
+ [Install]
116
+ WantedBy=multi-user.target
117
+-Alias=mysql.service
118
+-Alias=mysqld.service
119
+ 
120
+ 
121
+ [Service]
122
+diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
123
+index a2f5cff0828..3fc41358e14 100644
124
+--- a/support-files/mariadb@.service.in
125
++++ b/support-files/mariadb@.service.in
126
+@@ -27,8 +27,6 @@ ConditionPathExists=@sysconf2dir@/my%I.cnf
127
+ 
128
+ [Install]
129
+ WantedBy=multi-user.target
130
+-Alias=mysql.service
131
+-Alias=mysqld.service
132
+ 
133
+ 
134
+ [Service]

+ 22
- 0
mariadb/repos/testing-x86_64/0002-systemd-sysusers-tmpfiles.patch View File

@@ -0,0 +1,22 @@
1
+From dc7aff5e5331820205282576f6ade015f672969b Mon Sep 17 00:00:00 2001
2
+From: Christian Hesse <mail@eworm.de>
3
+Date: Tue, 2 Jan 2018 14:32:21 +0100
4
+Subject: Use descriptive file names for sysusers and tmpfiles configuration
5
+
6
+These files were installed to:
7
+
8
+${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf
9
+${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf
10
+
11
+Instead rename the files to more descriptive file names 'mariadb.conf'.
12
+---
13
+ support-files/tmpfiles.conf.in | 1 +
14
+ 1 file changed, 1 insertion(+)
15
+
16
+diff --git a/support-files/tmpfiles.conf.in b/support-files/tmpfiles.conf.in
17
+index 03d66abc0c7..3c89cb258c9 100644
18
+--- a/support-files/tmpfiles.conf.in
19
++++ b/support-files/tmpfiles.conf.in
20
+@@ -1 +1,2 @@
21
+ d @MYSQL_UNIX_DIR@ 0755 @MYSQLD_USER@ @MYSQLD_USER@ -
22
++d @MYSQL_DATADIR@ 0700 @MYSQLD_USER@ @MYSQLD_USER@ -

+ 56
- 0
mariadb/repos/testing-x86_64/0004-do-not-break-main-configuration-with-instantiated-one.patch View File

@@ -0,0 +1,56 @@
1
+From 8fe9b2658664d0ece15fe57442706446fed66d6e Mon Sep 17 00:00:00 2001
2
+From: Christian Hesse <mail@eworm.de>
3
+Date: Tue, 15 Jan 2019 17:22:56 +0100
4
+Subject: do not break main configuration with instantiated one
5
+
6
+The main configuration file /etc/my.cnf includes all configuration files in
7
+/etc/my.cnf.d/. However an instantiated service mariadb@example.service
8
+reads its configuration from /etc/my.cnf.d/myexample.cnf. This breaks
9
+the main configuration as that includes a snippet intended for an instance.
10
+
11
+This can be fixed by changing the path: Let the instantiated service
12
+read its configuration from /etc/myexample.cnf.
13
+---
14
+ support-files/mariadb@.service.in | 8 ++++----
15
+ 1 file changed, 4 insertions(+), 4 deletions(-)
16
+
17
+diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
18
+index a2f5cff0828..1207e690f47 100644
19
+--- a/support-files/mariadb@.service.in
20
++++ b/support-files/mariadb@.service.in
21
+@@ -1,7 +1,7 @@
22
+ # Multi instance version of mariadb. For if you run multiple versions at once.
23
+ # Also used for mariadb@bootstrap to bootstrap Galera.
24
+ #
25
+-# create config file @sysconf2dir@/my{instancename}.cnf
26
++# create config file @sysconfdir@/my{instancename}.cnf
27
+ #
28
+ # start as systemctl start mariadb@{instancename}.server
29
+ 
30
+@@ -23,7 +23,7 @@ Documentation=man:mysqld(8)
31
+ Documentation=https://mariadb.com/kb/en/library/systemd/
32
+ After=network.target
33
+ 
34
+-ConditionPathExists=@sysconf2dir@/my%I.cnf
35
++ConditionPathExists=@sysconfdir@/my%I.cnf
36
+ 
37
+ [Install]
38
+ WantedBy=multi-user.target
39
+@@ -75,7 +75,7 @@ PermissionsStartOnly=true
40
+ ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
41
+ 
42
+ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
43
+- VAR=`@bindir@/galera_recovery --defaults-file=@sysconf2dir@/my%I.cnf`; [ $? -eq 0 ] \
44
++ VAR=`@bindir@/galera_recovery --defaults-file=@sysconfdir@/my%I.cnf`; [ $? -eq 0 ] \
45
+  && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
46
+ 
47
+ # Alternate: (remove ConditionPathExists above)
48
+@@ -96,7 +96,7 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
49
+ 
50
+ # Note: Place $MYSQLD_OPTS at the very end for its options to take precedence.
51
+ 
52
+-ExecStart=@sbindir@/mysqld --defaults-file=@sysconf2dir@/my%I.cnf \
53
++ExecStart=@sbindir@/mysqld --defaults-file=@sysconfdir@/my%I.cnf \
54
+   $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION%I $MYSQLD_OPTS
55
+ # Alternate: (remove ConditionPathExists above)
56
+ # use [mysqld.INSTANCENAME] as sections in my.cnf

+ 32
- 0
mariadb/repos/testing-x86_64/0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch View File

@@ -0,0 +1,32 @@
1
+From 5936f0be4a49eda7b05ea1591bbbba3d72e4d7b9 Mon Sep 17 00:00:00 2001
2
+From: Christian Hesse <mail@eworm.de>
3
+Date: Fri, 25 Jan 2019 14:50:53 +0100
4
+Subject: fix galera_recovery with fs.protected_regular enabled
5
+
6
+The fs.protected_regular sysctls was added in Linux 4.19 to make some
7
+data spoofing attacks harder. With systemd v241 these will be enabled
8
+by default.
9
+
10
+With this protection enabled galera_recovery fails with EPERM
11
+(permission denied). This is caused by a wrong security measure:
12
+The script changes ownership of $log_file to $user, though $user never
13
+touches it. The shell redirection writes output to the file, not mysqld.
14
+So just drop chown to fix this.
15
+---
16
+ scripts/galera_recovery.sh | 3 +--
17
+ 1 file changed, 1 insertion(+), 2 deletions(-)
18
+
19
+diff --git a/scripts/galera_recovery.sh b/scripts/galera_recovery.sh
20
+index c58f3d8f6b9..c70decc0005 100644
21
+--- a/scripts/galera_recovery.sh
22
++++ b/scripts/galera_recovery.sh
23
+@@ -101,8 +101,7 @@ wsrep_recover_position() {
24
+ 
25
+ # Safety checks
26
+ if [ -n "$log_file" -a -f "$log_file" ]; then
27
+-  [ "$euid" = "0" ] && chown $user $log_file
28
+-      chmod 600 $log_file
29
++  chmod 600 $log_file
30
+ else
31
+   log "WSREP: mktemp failed"
32
+ fi

+ 227
- 0
mariadb/repos/testing-x86_64/PKGBUILD View File

@@ -0,0 +1,227 @@
1
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
2
+# Maintainer: Christian Hesse <mail@eworm.de>
3
+
4
+pkgbase=mariadb
5
+pkgname=('mariadb-libs' 'mariadb-clients' 'mariadb' 'mytop')
6
+pkgdesc='Fast SQL database server, derived from MySQL'
7
+pkgver=10.3.15
8
+pkgrel=1
9
+arch=('x86_64')
10
+license=('GPL')
11
+url='https://mariadb.org/'
12
+makedepends=('boost' 'bzip2' 'cmake' 'jemalloc' 'libaio' 'libxml2' 'lz4' 'lzo'
13
+             'openssl' 'zlib' 'zstd')
14
+validpgpkeys=('199369E5404BD5FC7D2FE43BCBCB082A1BB943DB') # MariaDB Package Signing Key <package-signing-key@mariadb.org>
15
+source=("https://mirrors.n-ix.net/mariadb/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz"{,.asc}
16
+        '0001-arch-specific.patch'
17
+        '0002-systemd-sysusers-tmpfiles.patch'
18
+        '0004-do-not-break-main-configuration-with-instantiated-one.patch'
19
+        '0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch'
20
+        'dont-check-systemd.patch')
21
+sha256sums=('27f391a54d544f93850d4edfb3ef1b4cf24f8e27e61e51727b0e7d31bb4d6968'
22
+            'SKIP'
23
+            '5b74e328e75369dfb68491a06dd53bd736e34f87281103ae0dd2f50401dc70d3'
24
+            '56a73dde8ad59b80aa256bd644a9c87d5004493b6983a48e2e3f6d6bc9998609'
25
+            'd12806e4f90cc0fc081205dd4c0a5e0e7c455844f04276811b61b57fd24f5545'
26
+            '66e0acac7436fd8925710ef5cc66ba1a8f63a385ce374f01ae83096cc33d97a0'
27
+            'c2023f01c93cd5dc3c814a9688322275657a5df3a9fe46abfd3d583e1bf1a836')
28
+
29
+prepare() {
30
+  cd $pkgbase-$pkgver/
31
+
32
+  # Arch Linux specific patches:
33
+  #  * enable PrivateTmp for a little bit more security
34
+  #  * force preloading jemalloc for memory management
35
+  #  * fix path to our config
36
+  patch -Np1 < ../0001-arch-specific.patch
37
+
38
+  # MDEV-17028 Fix glitches with systemd sysusers and tmpfiles:
39
+  #  * Use descriptive file names for sysusers and tmpfiles configuration
40
+  #  * Make systemd-tmpfiles create MYSQL_DATADIR
41
+  # https://github.com/MariaDB/server/pull/530
42
+  patch -Np1 < ../0002-systemd-sysusers-tmpfiles.patch
43
+
44
+  # do not break main configuration with instantiated one
45
+  # https://github.com/MariaDB/server/pull/1095
46
+  patch -Np1 < ../0004-do-not-break-main-configuration-with-instantiated-one.patch
47
+
48
+  # fix galera_recovery with fs.protected_regular enabled
49
+  # https://github.com/MariaDB/server/pull/1137
50
+  patch -Np1 < ../0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
51
+
52
+  patch -Np1 -i ../dont-check-systemd.patch
53
+}
54
+
55
+build() {
56
+  local _cmake_options=(
57
+    # build options
58
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo
59
+    -Wno-dev
60
+
61
+    # file paths
62
+    # /etc
63
+    -DINSTALL_SYSCONFDIR=/etc/mysql
64
+    -DINSTALL_SYSCONF2DIR=/etc/mysql/my.cnf.d
65
+    # /run
66
+    -DINSTALL_UNIX_ADDRDIR=/run/mysqld/mysqld.sock
67
+    # /usr
68
+    -DCMAKE_INSTALL_PREFIX=/usr
69
+    # /usr/bin /usr/include
70
+    -DINSTALL_SCRIPTDIR=bin
71
+    -DINSTALL_INCLUDEDIR=include/mysql
72
+    # /usr/lib
73
+    -DINSTALL_PLUGINDIR=lib/mysql/plugin
74
+    -DINSTALL_SYSTEMD_UNITDIR=no
75
+    -DINSTALL_SYSTEMD_SYSUSERSDIR=/usr/lib/sysusers.d/
76
+    -DINSTALL_SYSTEMD_TMPFILESDIR=/usr/lib/tmpfiles.d/
77
+    # /usr/share
78
+    -DINSTALL_SHAREDIR=share
79
+    -DINSTALL_SUPPORTFILESDIR=share/mysql
80
+    -DINSTALL_MYSQLSHAREDIR=share/mysql
81
+    -DINSTALL_DOCREADMEDIR=share/doc/mariadb
82
+    -DINSTALL_DOCDIR=share/doc/mariadb
83
+    -DINSTALL_MANDIR=share/man
84
+    # /var
85
+    -DMYSQL_DATADIR=/var/lib/mysql
86
+
87
+    # default settings
88
+    -DDEFAULT_CHARSET=utf8mb4
89
+    -DDEFAULT_COLLATION=utf8mb4_unicode_ci
90
+
91
+    # features
92
+    -DENABLED_LOCAL_INFILE=ON
93
+    -DPLUGIN_EXAMPLE=NO
94
+    -DPLUGIN_FEDERATED=NO
95
+    -DPLUGIN_FEEDBACK=NO
96
+    -DWITH_EMBEDDED_SERVER=ON
97
+    -DWITH_EXTRA_CHARSETS=complex
98
+    -DWITH_JEMALLOC=ON
99
+    -DWITH_LIBWRAP=OFF
100
+    -DWITH_PCRE=bundled
101
+    -DWITH_READLINE=ON
102
+    -DWITH_SSL=system
103
+    -DWITH_SYSTEMD=no
104
+    -DWITH_UNIT_TESTS=OFF
105
+    -DWITH_ZLIB=system
106
+    -DTOKUDB_OK=0
107
+  )
108
+
109
+  mkdir build
110
+  cd build
111
+
112
+  cmake ../"$pkgbase-$pkgver" "${_cmake_options[@]}"
113
+
114
+  make
115
+}
116
+
117
+check() {
118
+  cd build/mysql-test
119
+
120
+  # Takes *really* long, so disabled by default.
121
+  #./mtr --parallel=5 --mem --force --max-test-fail=0
122
+}
123
+
124
+package_mariadb-libs() {
125
+  pkgdesc='MariaDB libraries'
126
+  depends=('bzip2' 'libaio' 'lz4' 'lzo' 'openssl' 'xz' 'zlib')
127
+  conflicts=('libmysqlclient' 'libmariadbclient' 'mariadb-connector-c')
128
+  provides=('libmariadbclient' 'mariadb-connector-c')
129
+  replaces=('libmariadbclient')
130
+
131
+  cd build
132
+
133
+  for dir in libmariadb libmysqld libservices include; do
134
+    make -C "$dir" DESTDIR="$pkgdir" install
135
+  done
136
+
137
+  ln -s mariadb_config "$pkgdir"/usr/bin/mysql_config
138
+  install -D -m0644 "$srcdir"/"$pkgbase-$pkgver"/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/mysql_config.1
139
+
140
+  install -D -m0644 support-files/mariadb.pc "$pkgdir"/usr/share/pkgconfig/mariadb.pc
141
+  install -D -m0644 "$srcdir"/"$pkgbase-$pkgver"/support-files/mysql.m4 "$pkgdir"/usr/share/aclocal/mysql.m4
142
+
143
+  cd "$pkgdir"
144
+
145
+  # remove static libraries
146
+  rm usr/lib/*.a
147
+}
148
+
149
+package_mariadb-clients() {
150
+  pkgdesc='MariaDB client tools'
151
+  depends=("mariadb-libs=${pkgver}" 'jemalloc')
152
+  conflicts=('mysql-clients')
153
+  provides=("mysql-clients=$pkgver")
154
+
155
+  cd build
156
+
157
+  make -C client DESTDIR="$pkgdir" install
158
+
159
+  # install man pages
160
+  for man in mysql mysql_plugin mysql_upgrade mysqladmin mysqlbinlog mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqltest; do
161
+    install -D -m0644 "$srcdir"/"$pkgbase-$pkgver"/man/"$man.1" "$pkgdir"/usr/share/man/man1/"$man.1"
162
+  done
163
+}
164
+
165
+package_mariadb() {
166
+  pkgdesc='Fast SQL database server, derived from MySQL'
167
+  backup=('etc/mysql/my.cnf'
168
+          'etc/mysql/my.cnf.d/client.cnf'
169
+          'etc/mysql/my.cnf.d/enable_encryption.preset'
170
+          'etc/mysql/my.cnf.d/mysql-clients.cnf'
171
+          'etc/mysql/my.cnf.d/server.cnf')
172
+  install=mariadb.install
173
+  depends=("mariadb-clients=${pkgver}" 'inetutils' 'libxml2' 'zstd')
174
+  optdepends=('galera: for MariaDB cluster with Galera WSREP'
175
+              'perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission')
176
+  conflicts=('mysql')
177
+  provides=("mysql=$pkgver")
178
+  options=('emptydirs')
179
+
180
+  cd build
181
+
182
+  make DESTDIR="$pkgdir" install
183
+
184
+  cd "$pkgdir"
185
+
186
+  # no SysV init, please!
187
+  rm -r etc/mysql/{init.d,logrotate.d}
188
+  rm usr/bin/rcmysql
189
+  rm usr/share/mysql/{binary-configure,mysql{,d_multi}.server}
190
+
191
+  # move to proper licenses directories
192
+  install -d usr/share/licenses/mariadb
193
+  mv usr/share/doc/mariadb/COPYING* usr/share/licenses/mariadb/
194
+
195
+  # move it where one might look for it
196
+  mv usr/share/{groonga{,-normalizer-mysql},doc/mariadb/}
197
+
198
+  # provided by mariadb-libs
199
+  rm usr/bin/mariadb_config
200
+  rm usr/bin/mysql_config
201
+  rm -r usr/include/
202
+  rm usr/share/man/man1/mysql_config.1
203
+  rm -r usr/share/{aclocal,pkgconfig}
204
+  rm usr/lib/lib*
205
+  rm usr/lib/mysql/plugin/{auth_gssapi_client,caching_sha2_password,dialog,mysql_clear_password,sha256_password}.so
206
+  rm -r usr/lib/pkgconfig/
207
+
208
+  # provided by mariadb-clients
209
+  rm usr/bin/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}
210
+  rm usr/share/man/man1/{mysql,mysql_plugin,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest}.1
211
+
212
+  # provided by mytop
213
+  rm usr/bin/mytop
214
+
215
+  # not needed
216
+  rm -r usr/{data,mysql-test,sql-bench}
217
+  rm usr/share/man/man1/mysql-test-run.pl.1
218
+}
219
+
220
+package_mytop() {
221
+  pkgdesc='Top clone for MariaDB'
222
+  depends=('perl' 'perl-dbd-mysql' 'perl-term-readkey')
223
+
224
+  cd build
225
+
226
+  install -D -m0755 scripts/mytop "$pkgdir"/usr/bin/mytop
227
+}

+ 48
- 0
mariadb/repos/testing-x86_64/dont-check-systemd.patch View File

@@ -0,0 +1,48 @@
1
+--- a/support-files//CMakeLists.txt	2019-02-20 08:59:15.000000000 +0100
2
++++ b/support-files/CMakeLists.txt	2019-02-21 19:42:07.746535817 +0100
3
+@@ -104,21 +104,6 @@
4
+             ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
5
+             DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
6
+
7
+-    IF(INSTALL_SYSTEMD_SYSUSERSDIR)
8
+-      CONFIGURE_FILE(sysusers.conf.in
9
+-              ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
10
+-      INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
11
+-              DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} COMPONENT Server)
12
+-    ENDIF()
13
+-
14
+-    IF(INSTALL_SYSTEMD_TMPFILESDIR)
15
+-      get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
16
+-      CONFIGURE_FILE(tmpfiles.conf.in
17
+-              ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
18
+-      INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
19
+-              DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} COMPONENT Server)
20
+-    ENDIF()
21
+-
22
+     # @ in directory name broken between CMake version 2.8.12.2 and 3.3
23
+     # http://public.kitware.com/Bug/view.php?id=14782
24
+     IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
25
+@@ -145,6 +130,23 @@
26
+     ENDIF()
27
+   ENDIF()
28
+
29
++  IF(INSTALL_SYSTEMD_SYSUSERSDIR)
30
++      CONFIGURE_FILE(sysusers.conf.in
31
++              ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
32
++      INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
33
++              DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR}
34
++              RENAME mariadb.conf COMPONENT Server)
35
++  ENDIF()
36
++
37
++  IF(INSTALL_SYSTEMD_TMPFILESDIR)
38
++      get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
39
++      CONFIGURE_FILE(tmpfiles.conf.in
40
++              ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
41
++      INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
42
++              DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR}
43
++              RENAME mariadb.conf COMPONENT Server)
44
++  ENDIF()
45
++
46
+   IF (INSTALL_SYSCONFDIR)
47
+     INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d
48
+             RENAME mysql COMPONENT SupportFiles)

+ 15
- 0
mariadb/repos/testing-x86_64/mariadb.install View File

@@ -0,0 +1,15 @@
1
+#!/bin/sh
2
+
3
+post_install() {
4
+  echo ":: You need to initialize the MariaDB data directory prior to starting"
5
+  echo "   the service. This can be done with mysql_install_db command, e.g.:"
6
+  echo "   mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
7
+}
8
+
9
+post_upgrade(){
10
+  # show for feature release: 10.1 -> 10.2 -> 10.3 -> ...
11
+  if [ $(vercmp "${1%.*}" "${2%.*}") -ne 0 ]; then
12
+    echo ":: MariaDB was updated to a new feature release. To update the data"
13
+    echo "   restart mariadb service and run: mysql_upgrade -u root -p"
14
+  fi
15
+}

+ 3
- 3
mariadb/trunk/PKGBUILD View File

@@ -4,7 +4,7 @@
4 4
 pkgbase=mariadb
5 5
 pkgname=('mariadb-libs' 'mariadb-clients' 'mariadb' 'mytop')
6 6
 pkgdesc='Fast SQL database server, derived from MySQL'
7
-pkgver=10.3.14
7
+pkgver=10.3.15
8 8
 pkgrel=1
9 9
 arch=('x86_64')
10 10
 license=('GPL')
@@ -18,7 +18,7 @@ source=("https://mirrors.n-ix.net/mariadb/mariadb-$pkgver/source/mariadb-$pkgver
18 18
         '0004-do-not-break-main-configuration-with-instantiated-one.patch'
19 19
         '0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch'
20 20
         'dont-check-systemd.patch')
21
-sha256sums=('ba1c94d92fc8ebdf9b8a1d1b93ed6aeeead33da507efbbd4afcf49f32023e054'
21
+sha256sums=('27f391a54d544f93850d4edfb3ef1b4cf24f8e27e61e51727b0e7d31bb4d6968'
22 22
             'SKIP'
23 23
             '5b74e328e75369dfb68491a06dd53bd736e34f87281103ae0dd2f50401dc70d3'
24 24
             '56a73dde8ad59b80aa256bd644a9c87d5004493b6983a48e2e3f6d6bc9998609'
@@ -48,7 +48,7 @@ prepare() {
48 48
   # fix galera_recovery with fs.protected_regular enabled
49 49
   # https://github.com/MariaDB/server/pull/1137
50 50
   patch -Np1 < ../0005-fix-galera_recovery-with-fs.protected_regular-enabled.patch
51
-  
51
+
52 52
   patch -Np1 -i ../dont-check-systemd.patch
53 53
 }
54 54
 

Loading…
Cancel
Save