summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2019-06-24 00:37:57 +0200
committerMuflone2019-06-24 00:37:57 +0200
commit222a3059f556509ecb48201b9a0559bbcbd53599 (patch)
treee82e76034171737523c2829cc5000ded95de9087
parentb91d78e21fc8ad1b3b7f8e5016db9dcbaac92fd0 (diff)
downloadaur-222a3059f556509ecb48201b9a0559bbcbd53599.tar.gz
Updated pkgbase mysql 8.0.16-1
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD89
-rw-r--r--my-default.cnf5
-rw-r--r--mysql.sysconfig1
-rwxr-xr-xmysqld-post.sh8
-rw-r--r--mysqld-tmpfile.conf1
-rw-r--r--mysqld.service16
-rw-r--r--mysqld_service.patch35
-rw-r--r--systemd-sysusers-tmpfiles.patch7
9 files changed, 135 insertions, 66 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1602a18345..a996df680c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mysql
pkgdesc = Fast SQL database server, community edition
- pkgver = 8.0.15
+ pkgver = 8.0.16
pkgrel = 1
url = https://www.mysql.com/products/community/
arch = x86_64
@@ -19,20 +19,18 @@ pkgbase = mysql
makedepends = re2
makedepends = rapidjson
makedepends = protobuf
- options = !libtool
- options = !ccache
- source = https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.15.tar.gz
- source = mysqld-post.sh
- source = mysqld-tmpfile.conf
- source = mysqld.service
+ source = https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.16.tar.gz
source = my-default.cnf
source = mysql-ld.so.conf
- sha256sums = 95dbdb54c3967feefb255b96458b089a601e4de238bcc1f328b066018ee47db0
- sha256sums = 368f9fd2454d80eb32abb8f29f703d1cf9553353fb9e1ae4529c4b851cb8c5dd
- sha256sums = 2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd
- sha256sums = 50212165bdb09855b97b15a917464ba34f82edf30a0c43f9a0c93a27071df556
- sha256sums = 3cc3ba4149fb2f9e823601b9a414ff5b28a2a52f20bc68c74cc0505cf2d1832d
+ source = mysql.sysconfig
+ source = mysqld_service.patch
+ source = systemd-sysusers-tmpfiles.patch
+ sha256sums = 7c936aa7bc9f4c462b24bade2e9abe1b3a6869ea19c46e78ec0a9b2a87a3d17f
+ sha256sums = 6bc24ae510f6b6bbad6b3edda2d0028b29292937b482274a4c2fae335f4de328
sha256sums = e1c23fa0971a13d998f2790379b68c475438d05b6d6f2691b99051dbf497567f
+ sha256sums = 203dcd22fea668477ac7123dbd9909fae72d3d07f8855417a669a9c94db072ae
+ sha256sums = 8fbedfc2c5fe271ed13217feeceeac00202d2cb135e4283eeee2f9a13d6251af
+ sha256sums = 9e585631cfe95da9d18df6c64fca370c0aff2b2cda5dc29f694579dab9d9f561
pkgname = mysql
pkgdesc = Fast SQL database server, community edition
@@ -47,19 +45,22 @@ pkgname = mysql
depends = lz4
depends = libevent
depends = protobuf
- provides = mariadb=8.0.15
- provides = mysql=8.0.15
+ depends = systemd-libs
+ optdepends = perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission
+ provides = mariadb=8.0.16
+ provides = mysql=8.0.16
conflicts = mariadb
options = emptydirs
backup = etc/mysql/my.cnf
+ backup = etc/conf.d/mysql.conf
pkgname = libmysqlclient
pkgdesc = MySQL client libraries
depends = libsasl
depends = zlib
- provides = libmariadbclient=8.0.15
- provides = libmysqlclient=8.0.15
- provides = mariadb-libs=8.0.15
+ provides = libmariadbclient=8.0.16
+ provides = libmysqlclient=8.0.16
+ provides = mariadb-libs=8.0.16
conflicts = libmariadbclient
conflicts = mariadb-libs
@@ -71,7 +72,7 @@ pkgname = mysql-clients
depends = jemalloc
depends = libedit
depends = lz4
- provides = mariadb-clients=8.0.15
- provides = mysql-clients=8.0.15
+ provides = mariadb-clients=8.0.16
+ provides = mysql-clients=8.0.16
conflicts = mariadb-clients
diff --git a/PKGBUILD b/PKGBUILD
index c75d33d6217..00eca78d68d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,12 @@
# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Contributor: Francois Menning <f.menning@pm.me>
# Contributor: Rustam Tsurik <rustam.tsurik@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=('mysql' 'libmysqlclient' 'mysql-clients')
pkgbase=mysql
-pkgver=8.0.15
+pkgver=8.0.16
pkgrel=1
pkgdesc="Fast SQL database server, community edition"
arch=('x86_64')
@@ -14,19 +15,18 @@ makedepends=('openssl' 'zlib' 'cmake' 'systemd-tools' 'libaio' 'jemalloc'
'rapidjson' 'protobuf')
license=('GPL')
url="https://www.mysql.com/products/community/"
-options=('!libtool' '!ccache') # Sorry but actually ccache is not supported
source=("https://cdn.mysql.com/Downloads/MySQL-8.0/${pkgbase}-boost-${pkgver}.tar.gz"
- "mysqld-post.sh"
- "mysqld-tmpfile.conf"
- "mysqld.service"
"my-default.cnf"
- "mysql-ld.so.conf")
-sha256sums=('95dbdb54c3967feefb255b96458b089a601e4de238bcc1f328b066018ee47db0'
- '368f9fd2454d80eb32abb8f29f703d1cf9553353fb9e1ae4529c4b851cb8c5dd'
- '2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd'
- '50212165bdb09855b97b15a917464ba34f82edf30a0c43f9a0c93a27071df556'
- '3cc3ba4149fb2f9e823601b9a414ff5b28a2a52f20bc68c74cc0505cf2d1832d'
- 'e1c23fa0971a13d998f2790379b68c475438d05b6d6f2691b99051dbf497567f')
+ "mysql-ld.so.conf"
+ "mysql.sysconfig"
+ "mysqld_service.patch"
+ "systemd-sysusers-tmpfiles.patch")
+sha256sums=('7c936aa7bc9f4c462b24bade2e9abe1b3a6869ea19c46e78ec0a9b2a87a3d17f'
+ '6bc24ae510f6b6bbad6b3edda2d0028b29292937b482274a4c2fae335f4de328'
+ 'e1c23fa0971a13d998f2790379b68c475438d05b6d6f2691b99051dbf497567f'
+ '203dcd22fea668477ac7123dbd9909fae72d3d07f8855417a669a9c94db072ae'
+ '8fbedfc2c5fe271ed13217feeceeac00202d2cb135e4283eeee2f9a13d6251af'
+ '9e585631cfe95da9d18df6c64fca370c0aff2b2cda5dc29f694579dab9d9f561')
build() {
rm -rf build
@@ -37,6 +37,7 @@ build() {
-DCMAKE_AR=/usr/bin/gcc-ar \
-DCMAKE_RANLIB=/usr/bin/gcc-ranlib \
-DBUILD_CONFIG=mysql_release \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc/mysql \
-DMYSQL_DATADIR=/var/lib/mysql \
@@ -53,18 +54,35 @@ build() {
-DINSTALL_DOCDIR=share/mysql/docs \
-DINSTALL_SHAREDIR=share/mysql \
-DWITH_SYSTEM_LIBS=ON \
+ -DWITH_SSL=system \
-DWITH_LIBWRAP=OFF \
- -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
+ -DWITH_LTO=ON \
+ -DWITH_JEMALLOC=ON \
+ -DWITH_READLINE=ON \
+ -DWITH_SYSTEMD=yes \
+ -DWITH_UNIT_TESTS=OFF \
+ -DPLUGIN_EXAMPLE=NO \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=ON \
+ -DPLUGIN_FEDERATED=NO \
-DWITHOUT_FEDERATED_STORAGE_ENGINE=ON \
+ -DPLUGIN_FEEDBACK=NO \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_C_LINK_FLAGS="${LDFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_CXX_LINK_FLAGS="${LDFLAGS}" \
+ -DDEFAULT_CHARSET=utf8mb4 \
+ -DDEFAULT_COLLATION=utf8mb4_unicode_ci \
-DWITH_BOOST="../${pkgname}-${pkgver}/boost"
make
}
+check() {
+ cd build/mysql-test
+
+ # Takes *really* long, so disabled by default.
+ # ./mtr --parallel=5 --mem --force --max-test-fail=0
+}
+
package_libmysqlclient(){
pkgdesc="MySQL client libraries"
depends=('libsasl' 'zlib')
@@ -80,6 +98,9 @@ package_libmysqlclient(){
install -m 755 -d "${pkgdir}/usr/bin"
install -m 755 scripts/mysql_config "${pkgdir}/usr/bin/"
install -m 755 -d "${pkgdir}/usr/share/man/man1"
+ install -m 700 -d "${pkgdir}/var/lib/mysql"
+ install -m 644 -D "${srcdir}/my-default.cnf" "${pkgdir}/etc/mysql/my.cnf.default"
+ install -m 644 -D "${srcdir}/${pkgbase}-${pkgver}/support-files/mysql.m4" "${pkgdir}/usr/share/aclocal/mysql.m4"
for man in mysql_config
do
install -m 644 "${srcdir}/${pkgbase}-${pkgver}/man/${man}.1" "${pkgdir}/usr/share/man/man1/${man}.1"
@@ -106,6 +127,7 @@ package_mysql-clients(){
rm "${pkgdir}/usr/bin/mysql_upgrade"
rm "${pkgdir}/usr/bin/mysql_config_editor"
rm "${pkgdir}/usr/bin/mysqlbinlog"
+ rm "${pkgdir}/usr/bin/mysqlpump"
rm "${pkgdir}/usr/bin/mysql_secure_installation"
rm "${pkgdir}/usr/bin/mysql_ssl_rsa_setup"
rm "${pkgdir}/usr/bin/mysqltest"
@@ -113,22 +135,20 @@ package_mysql-clients(){
package_mysql(){
pkgdesc="Fast SQL database server, community edition"
- backup=('etc/mysql/my.cnf')
+ backup=("etc/mysql/my.cnf"
+ "etc/conf.d/${pkgname}.conf")
install="${pkgbase}.install"
depends=('mysql-clients' 'libsasl' 'zlib' 'jemalloc' 'libaio' 'libtirpc' 'icu'
- 'lz4' 'libevent' 'protobuf')
+ 'lz4' 'libevent' 'protobuf' 'systemd-libs')
conflicts=('mariadb')
provides=("mariadb=${pkgver}" "mysql=${pkgver}")
+ optdepends=('perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission')
options=('emptydirs')
cd build
make DESTDIR="${pkgdir}" install
install -m 644 -D "${srcdir}/my-default.cnf" "${pkgdir}/etc/mysql/my.cnf"
- install -m 755 -D "${srcdir}/mysqld-post.sh" "${pkgdir}/usr/bin/mysqld-post"
- install -m 644 -D "${srcdir}/mysqld-tmpfile.conf" "${pkgdir}/usr/lib/tmpfiles.d/mysqld.conf"
- install -m 755 -d "${pkgdir}/usr/lib/systemd/system"
- install -m 644 -D "${srcdir}/mysqld.service" "${pkgdir}/usr/lib/systemd/system/"
install -m 755 -d "${pkgdir}/etc/ld.so.conf.d"
install -m 644 -D "${srcdir}/mysql-ld.so.conf" "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf"
@@ -136,28 +156,33 @@ package_mysql(){
rm "${pkgdir}/usr/bin/mysql_config"
rm "${pkgdir}/usr/lib/libmysqlclient.so"
rm "${pkgdir}/usr/lib/libmysqlclient.so.21"
- rm "${pkgdir}/usr/lib/libmysqlclient.so.21.0.15"
+ rm "${pkgdir}/usr/lib/libmysqlclient.so.21.0.16"
rm "${pkgdir}/usr/lib/libmysqlservices.a"
rm "${pkgdir}/usr/lib/mysql/plugin/authentication_ldap_sasl_client.so"
rm -r "${pkgdir}/usr/include/"
rm "${pkgdir}/usr/share/man/man1/mysql_config.1"
+ rm "${pkgdir}/usr/share/mysql/aclocal/mysql.m4"
+ rmdir "${pkgdir}/usr/share/mysql/aclocal/"
# provided by mysql-clients
rm "${pkgdir}/usr/bin/mysql"
rm "${pkgdir}/usr/bin/mysqladmin"
+ rm "${pkgdir}/usr/bin/mysqlbinlog"
rm "${pkgdir}/usr/bin/mysqlcheck"
rm "${pkgdir}/usr/bin/mysqldump"
rm "${pkgdir}/usr/bin/mysqlimport"
- rm "${pkgdir}/usr/bin/mysqlpump"
rm "${pkgdir}/usr/bin/mysqlshow"
rm "${pkgdir}/usr/bin/mysqlslap"
+ rm "${pkgdir}/usr/bin/mysql_upgrade"
rm "${pkgdir}/usr/share/man/man1/mysql.1"
rm "${pkgdir}/usr/share/man/man1/mysqladmin.1"
+ rm "${pkgdir}/usr/share/man/man1/mysqlbinlog.1"
rm "${pkgdir}/usr/share/man/man1/mysqlcheck.1"
rm "${pkgdir}/usr/share/man/man1/mysqldump.1"
rm "${pkgdir}/usr/share/man/man1/mysqlimport.1"
rm "${pkgdir}/usr/share/man/man1/mysqlshow.1"
rm "${pkgdir}/usr/share/man/man1/mysqlslap.1"
+ rm "${pkgdir}/usr/share/man/man1/mysql_upgrade.1"
# not needed
rm -r "${pkgdir}/usr/mysql-test"
@@ -167,7 +192,29 @@ package_mysql(){
mv "${pkgdir}/usr/LICENSE.router" "${pkgdir}/usr/share/mysql/docs"
mv "${pkgdir}/usr/README.router" "${pkgdir}/usr/share/mysql/docs"
+ # Create environment file
+ install -D -m 644 "${srcdir}/mysql.sysconfig" "${pkgdir}/etc/conf.d/${pkgname}.conf"
+
# Fix permissions
chmod 755 "${pkgdir}/usr"
+
+ # Move systemd files
+ mv "${pkgdir}/usr/usr/lib/systemd" "${pkgdir}/usr/lib/"
+ mv "${pkgdir}/usr/usr/lib/tmpfiles.d" "${pkgdir}/usr/lib/"
+
+ # Cleanup
+ rmdir "${pkgdir}/usr/usr/lib"
+ rmdir "${pkgdir}/usr/usr"
+ rmdir "${pkgdir}/usr/var/lib/mysqlrouter"
+ rmdir "${pkgdir}/usr/var/lib"
+ rmdir "${pkgdir}/usr/var"
+
+ # Arch Linux specific patches:
+ # * enable PrivateTmp for a little bit more security
+ # * force preloading jemalloc for memory management
+ # * fix path to our config
+ cd "${pkgdir}"
+ patch -Np1 -i "${srcdir}/mysqld_service.patch"
+ patch -Np1 -i "${srcdir}/systemd-sysusers-tmpfiles.patch"
}
diff --git a/my-default.cnf b/my-default.cnf
index caf77cbcd5d..307f85722f2 100644
--- a/my-default.cnf
+++ b/my-default.cnf
@@ -28,4 +28,7 @@
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
-sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
+datadir=/var/lib/mysql
+socket=/run/mysqld/mysqld.sock
+
+sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
diff --git a/mysql.sysconfig b/mysql.sysconfig
new file mode 100644
index 00000000000..610190ff2bc
--- /dev/null
+++ b/mysql.sysconfig
@@ -0,0 +1 @@
+LD_PRELOAD=/usr/lib/libjemalloc.so
diff --git a/mysqld-post.sh b/mysqld-post.sh
deleted file mode 100755
index c4ac181710d..00000000000
--- a/mysqld-post.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-while true; do
- response=$(/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1) && break
- echo "$response" | grep -q "mysqld is alive" && break
- echo "$response" | grep -q "Access denied for user" && break
- sleep 1
-done
diff --git a/mysqld-tmpfile.conf b/mysqld-tmpfile.conf
deleted file mode 100644
index 6883dc79888..00000000000
--- a/mysqld-tmpfile.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/mysqld 0755 mysql mysql -
diff --git a/mysqld.service b/mysqld.service
deleted file mode 100644
index a6fc8cf889a..00000000000
--- a/mysqld.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=MySQL database server
-After=syslog.target
-
-[Service]
-User=mysql
-Group=mysql
-
-ExecStart=/usr/bin/mysqld --pid-file=/run/mysqld/mysqld.pid
-ExecStartPost=/usr/bin/mysqld-post
-
-Restart=always
-PrivateTmp=true
-
-[Install]
-WantedBy=multi-user.target
diff --git a/mysqld_service.patch b/mysqld_service.patch
new file mode 100644
index 00000000000..5f7136ff65c
--- /dev/null
+++ b/mysqld_service.patch
@@ -0,0 +1,35 @@
+--- a/usr/lib/systemd/system/mysqld.service
++++ b/usr/lib/systemd/system/mysqld.service
+@@ -52,7 +52,7 @@
+ ExecStart=/usr/bin/mysqld $MYSQLD_OPTS
+
+ # Use this to switch malloc implementation
+-EnvironmentFile=-/etc/sysconfig/mysql
++EnvironmentFile=-/etc/conf.d/mysql
+
+ # Sets open_files_limit
+ LimitNOFILE = 10000
+@@ -64,4 +64,4 @@
+ # Set enviroment variable MYSQLD_PARENT_PID. This is required for restart.
+ Environment=MYSQLD_PARENT_PID=1
+
+-PrivateTmp=false
++PrivateTmp=true
+
+--- a/usr/lib/systemd/system/mysqld@.service
++++ b/usr/lib/systemd/system/mysqld@.service
+@@ -52,7 +52,7 @@
+ ExecStart=/usr/bin/mysqld --defaults-group-suffix=@%I $MYSQLD_OPTS
+
+ # Use this to switch malloc implementation
+-EnvironmentFile=-/etc/sysconfig/mysql
++EnvironmentFile=-/etc/conf.d/mysql
+
+ # Sets open_files_limit
+ LimitNOFILE = 10000
+@@ -64,4 +64,4 @@
+ # Set enviroment variable MYSQLD_PARENT_PID. This is required for restart.
+ Environment=MYSQLD_PARENT_PID=1
+
+-PrivateTmp=false
++PrivateTmp=true
diff --git a/systemd-sysusers-tmpfiles.patch b/systemd-sysusers-tmpfiles.patch
new file mode 100644
index 00000000000..cd2cd803bd1
--- /dev/null
+++ b/systemd-sysusers-tmpfiles.patch
@@ -0,0 +1,7 @@
+--- a/usr/lib/tmpfiles.d/mysql.conf
++++ b/usr/lib/tmpfiles.d/mysql.conf
+@@ -21,3 +21,4 @@
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ d /var/run/mysqld 0755 mysql mysql -
++d /var/lib/mysql 0700 mysql mysql -