[arch-commits] Commit in percona-server/repos (12 files)
Felix Yan
felixonmars at archlinux.org
Mon Nov 7 18:19:58 UTC 2016
Date: Monday, November 7, 2016 @ 18:19:57
Author: felixonmars
Revision: 194963
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
percona-server/repos/community-staging-i686/
percona-server/repos/community-staging-i686/PKGBUILD
(from rev 194962, percona-server/trunk/PKGBUILD)
percona-server/repos/community-staging-i686/my.cnf
(from rev 194962, percona-server/trunk/my.cnf)
percona-server/repos/community-staging-i686/mysql-user.conf
(from rev 194962, percona-server/trunk/mysql-user.conf)
percona-server/repos/community-staging-i686/percona-server-CVE-2016-6662.patch
(from rev 194962, percona-server/trunk/percona-server-CVE-2016-6662.patch)
percona-server/repos/community-staging-i686/percona.install
(from rev 194962, percona-server/trunk/percona.install)
percona-server/repos/community-staging-x86_64/
percona-server/repos/community-staging-x86_64/PKGBUILD
(from rev 194962, percona-server/trunk/PKGBUILD)
percona-server/repos/community-staging-x86_64/my.cnf
(from rev 194962, percona-server/trunk/my.cnf)
percona-server/repos/community-staging-x86_64/mysql-user.conf
(from rev 194962, percona-server/trunk/mysql-user.conf)
percona-server/repos/community-staging-x86_64/percona-server-CVE-2016-6662.patch
(from rev 194962, percona-server/trunk/percona-server-CVE-2016-6662.patch)
percona-server/repos/community-staging-x86_64/percona.install
(from rev 194962, percona-server/trunk/percona.install)
-------------------------------------------------------------+
community-staging-i686/PKGBUILD | 173 ++++++++++
community-staging-i686/my.cnf | 38 ++
community-staging-i686/mysql-user.conf | 1
community-staging-i686/percona-server-CVE-2016-6662.patch | 114 ++++++
community-staging-i686/percona.install | 19 +
community-staging-x86_64/PKGBUILD | 173 ++++++++++
community-staging-x86_64/my.cnf | 38 ++
community-staging-x86_64/mysql-user.conf | 1
community-staging-x86_64/percona-server-CVE-2016-6662.patch | 114 ++++++
community-staging-x86_64/percona.install | 19 +
10 files changed, 690 insertions(+)
Copied: percona-server/repos/community-staging-i686/PKGBUILD (from rev 194962, percona-server/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,173 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=percona-server
+pkgname=('libperconaserverclient' 'percona-server-clients' 'percona-server')
+pkgver=5.7.14_8
+_boost_ver=1.59.0
+_pkgver=${pkgver/_/-}
+_myver=${pkgver/_rel*}
+pkgrel=3
+arch=('i686' 'x86_64')
+# valgrind necessary for bug https://bugs.launchpad.net/percona-server/+bug/1494283
+makedepends=('cmake' 'openssl' 'zlib' 'libaio' 'systemd-tools' 'valgrind' 'pam' 'numactl' 'jemalloc')
+license=('GPL' 'AGPL')
+url="http://www.percona.com/software/percona-server/"
+source=("http://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-$_pkgver/source/tarball/percona-server-$_pkgver.tar.gz"
+ "http://sourceforge.net/projects/boost/files/boost/${_boost_ver}/boost_${_boost_ver//./_}.tar.gz"
+ 'percona-server-CVE-2016-6662.patch'
+ 'my.cnf'
+ 'mysql-user.conf')
+
+prepare() {
+ cd $pkgbase-$_pkgver
+ rm -v sql/sql_yacc.{cc,h}
+
+ sed 's|${fullhostname}|"archbuild"|' \
+ -i storage/tokudb/PerconaFT/cmake_modules/TokuSetupCTest.cmake
+
+ patch -Np1 < "${srcdir}/percona-server-CVE-2016-6662.patch"
+}
+
+build() {
+ rm -rf build
+ mkdir build
+ cd build
+
+ cmake ../$pkgbase-$_pkgver \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_CONFIG=mysql_release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DINSTALL_INFODIR=share/mysql/docs \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_INCLUDEDIR=include/perconaserver \
+ -DINSTALL_DOCREADMEDIR=share/mysql \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_DOCDIR=share/mysql/docs \
+ -DINSTALL_SHAREDIR=share/mysql \
+ -DWITH_ZLIB=system \
+ -DWITH_SSL=system \
+ -DWITH_LIBWRAP=OFF \
+ -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
+ -DWITH_UNIT_TESTS=OFF \
+ -DWITH_PAM=ON \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_EMBEDDED_SERVER=ON \
+ -DWITH_EMBEDDED_SHARED_LIBRARY=ON \
+ -DWITH_INNODB_MEMCACHED=ON \
+ -DWITH_INNOBASE_STORAGE_ENGINE=ON \
+ -DWITH_PARTITION_STORAGE_ENGINE=ON \
+ -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \
+ -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
+ -DWITH_FEDERATED_STORAGE_ENGINE=OFF \
+ -DWITH_EXAMPLE_STORAGE_ENGINE=OFF \
+ -DWITH_SYSTEMD=1 \
+ -DCMAKE_C_FLAGS="-fPIC $CFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks" \
+ -DCMAKE_CXX_FLAGS="-fPIC $CXXFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-delete-null-pointer-checks -Wno-error=nonnull-compare -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-maybe-uninitialized" \
+ -DWITH_MYSQLD_LDFLAGS="-pie ${LDFLAGS},-z,now" \
+ -DWITH_BOOST="../boost_${_boost_ver//./_}" \
+ -DWITH_NUMA=ON
+
+ make
+}
+
+package_libperconaserverclient() {
+ pkgdesc='Percona Server client libraries'
+ depends=('openssl' 'zlib')
+
+ cd build
+ for dir in include libmysql libmysqld libservices; do
+ make -C $dir DESTDIR="$pkgdir" install
+ done
+
+ # Conflicting files with libmariadbclient
+ rm "$pkgdir"/usr/lib/libmysql*
+
+ install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/perconaserver_config
+ install -d "$pkgdir"/usr/share/man/man1
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/perconaserver_config.1
+}
+
+package_percona-server-clients() {
+ pkgdesc='Percona Server client tools'
+ depends=('libperconaserverclient' 'zlib' 'openssl' 'jemalloc')
+ conflicts=('mysql-clients')
+ provides=("mysql-clients=$_myver" "mariadb-clients=$_myver")
+
+ cd build
+ make -C client DESTDIR="$pkgdir" install
+
+ # install man pages
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqlpump; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ # provided by percona-server
+ rm "$pkgdir"/usr/bin/mysql{_plugin,_upgrade,binlog,test,_config_editor,_install_db,_secure_installation,_ssl_rsa_setup}
+}
+
+package_percona-server() {
+ pkgdesc='Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and TokuDB storage engine'
+ backup=('etc/mysql/my.cnf')
+ install=percona.install
+ depends=('libaio' 'systemd-tools' 'pam' 'jemalloc' 'numactl')
+ optdepends=('perl-dbd-mysql')
+ conflicts=('mysql')
+ provides=("mysql=$_myver" "mariadb=$_myver")
+ options=('emptydirs')
+
+ cd build
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 ../my.cnf "$pkgdir"/etc/mysql/my.cnf
+ install -Dm644 ../mysql-user.conf "$pkgdir"/usr/lib/sysusers.d/mysql.conf
+
+ cd "$pkgdir"
+ mv usr/usr/lib/* usr/lib
+ rm -rf usr/usr
+
+ # Move documentation
+ install -dm755 usr/share/doc
+ mv usr/share/mysql/docs usr/share/doc/$pkgname
+ mv usr/share/mysql/{COPYING,README.MySQL} usr/share/doc/$pkgname/
+
+ if [ -f usr/PATENTS ]; then
+ mv usr/{PATENTS,README.md} usr/share/doc/$pkgname/
+ rm usr/COPYING.*
+ fi
+
+ # provided by libperconaserverclient
+ rm usr/bin/mysql_config
+ rm usr/lib/lib{mysql,perconaserver}*
+ rm -r usr/include/
+ rm usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
+
+ # provided by percona-server-clients
+ rm usr/bin/mysql{,admin,check,dump,import,show,slap,pump}
+ rm usr/share/man/man1/mysql{,admin,check,dump,import,show,slap,pump}.1
+
+ # deprecated/unused
+ rm usr/bin/replace
+ rm usr/share/man/man1/replace.1
+
+ # not needed
+ rm -r usr/mysql-test
+ rm usr/share/man/man1/mysql-test-run.pl.1
+}
+
+sha256sums=('9a842bdbfb052edeee6f85d4ee977b2b4e1a8ac67d88e5d248d83474682d401e'
+ '47f11c8844e579d02691a607fbd32540104a9ac7a2534a8ddaef50daf502baac'
+ '924543feda4c377386a5c20f35302132e204ded5c7e4401bd1ac9f3e12a2f49a'
+ 'ae451839c368f0db25a63bb0a6a890194897a8e74818bd4245140933c29e5f83'
+ 'e638a2657085f15b6728f43c1fd6aa551b27608fbf6b435e33afd3606a0cfb0e')
Copied: percona-server/repos/community-staging-i686/my.cnf (from rev 194962, percona-server/trunk/my.cnf)
===================================================================
--- community-staging-i686/my.cnf (rev 0)
+++ community-staging-i686/my.cnf 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,38 @@
+# For advice on how to change settings please see
+# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
+
+[client]
+#password = your_password
+port = 3306
+socket = /run/mysqld/mysqld.sock
+
+[mysqld]
+port = 3306
+socket = /run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+
+#
+# Remove leading # and set to the amount of RAM for the most important data
+# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
+# innodb_buffer_pool_size = 128M
+#
+# Remove leading # to turn on a very important data integrity option: logging
+# changes to the binary log between backups.
+# log_bin
+#
+# Remove leading # to set options mainly useful for reporting servers.
+# The server defaults are faster for transactions and fast SELECTs.
+# Adjust sizes as needed, experiment to find the optimal values.
+# join_buffer_size = 128M
+# sort_buffer_size = 2M
+# read_rnd_buffer_size = 2M
+
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
+
+# Recommended in standard MySQL setup
+sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
+
+[mysqld_safe]
+log-error = /var/log/mysqld.log
+pid-file = /run/mysqld/mysqld.pid
Copied: percona-server/repos/community-staging-i686/mysql-user.conf (from rev 194962, percona-server/trunk/mysql-user.conf)
===================================================================
--- community-staging-i686/mysql-user.conf (rev 0)
+++ community-staging-i686/mysql-user.conf 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1 @@
+u mysql 89 "MySQL user"
Copied: percona-server/repos/community-staging-i686/percona-server-CVE-2016-6662.patch (from rev 194962, percona-server/trunk/percona-server-CVE-2016-6662.patch)
===================================================================
--- community-staging-i686/percona-server-CVE-2016-6662.patch (rev 0)
+++ community-staging-i686/percona-server-CVE-2016-6662.patch 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,114 @@
+diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+index 30bb0f3..e1fddd8 100644
+--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
++++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+@@ -13,6 +13,16 @@ SET @@global.general_log_file = mytest.log;
+ ERROR 42000: Incorrect argument type to variable 'general_log_file'
+ SET @@global.general_log_file = 12;
+ ERROR 42000: Incorrect argument type to variable 'general_log_file'
++SET @@global.general_log_file = 'my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = '/tmp/my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp/my.cnf'
++SET @@global.general_log_file = '.my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
++SET @@global.general_log_file = 'my.cnf\0foo';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = 'my.ini';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
+ '#----------------------FN_DYNVARS_004_03------------------------#'
+ SELECT @@global.general_log_file = VARIABLE_VALUE
+ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+index c032a36..503d1c8 100644
+--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
++++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+@@ -10,6 +10,16 @@ SET @@global.slow_query_log_file = mytest.log;
+ ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
+ SET @@global.slow_query_log_file = 12;
+ ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
++SET @@global.slow_query_log_file = 'my.cnf';
++ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'my.cnf'
++SET @@global.slow_query_log_file = '/tmp/my.cnf';
++ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/tmp/my.cnf'
++SET @@global.general_log_file = '.my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
++SET @@global.general_log_file = 'my.cnf\0foo';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = 'my.ini';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
+ '#----------------------FN_DYNVARS_004_03------------------------#'
+ SELECT @@global.slow_query_log_file = VARIABLE_VALUE
+ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+index 62b2105..2e24f1d 100644
+--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
++++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+@@ -59,6 +59,20 @@ SET @@global.general_log_file = mytest.log;
+ --error ER_WRONG_TYPE_FOR_VAR
+ SET @@global.general_log_file = 12;
+
++#
++# MDEV-10465
++#
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '/tmp/my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '.my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf\0foo';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.ini';
++
+
+ --echo '#----------------------FN_DYNVARS_004_03------------------------#'
+ ##############################################################################
+diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+index c91ff45..5f59dc9 100644
+--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
++++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+@@ -57,6 +57,20 @@ SET @@global.slow_query_log_file = mytest.log;
+ --error ER_WRONG_TYPE_FOR_VAR
+ SET @@global.slow_query_log_file = 12;
+
++#
++# MDEV-10465
++#
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.slow_query_log_file = 'my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.slow_query_log_file = '/tmp/my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '.my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf\0foo';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.ini';
++
+ --echo '#----------------------FN_DYNVARS_004_03------------------------#'
+ ##############################################################################
+ # Check if the value in GLOBAL Tables matches values in variable #
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 9ed27e2..31679c2 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4973,6 +4973,17 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
+ return true;
+ }
+
++ static const LEX_CSTRING my_cnf= { STRING_WITH_LEN("my.cnf") };
++ static const LEX_CSTRING my_ini= { STRING_WITH_LEN("my.ini") };
++ if (path_length >= my_cnf.length)
++ {
++ if (strcasecmp(path + path_length - my_cnf.length, my_cnf.str) == 0)
++ return true; // log file name ends with "my.cnf"
++ DBUG_ASSERT(my_cnf.length == my_ini.length);
++ if (strcasecmp(path + path_length - my_ini.length, my_ini.str) == 0)
++ return true; // log file name ends with "my.ini"
++ }
++
+ MY_STAT f_stat;
+
+ if (my_stat(path, &f_stat, MYF(0)))
Copied: percona-server/repos/community-staging-i686/percona.install (from rev 194962, percona-server/trunk/percona.install)
===================================================================
--- community-staging-i686/percona.install (rev 0)
+++ community-staging-i686/percona.install 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,19 @@
+post_install() {
+ systemd-sysusers mysql.conf
+ systemd-tmpfiles --create mysql.conf
+
+ echo " >> "
+ echo " >> A temporary password is generated on first start and logged in journald."
+ echo " >> Use 'journalctl -au mysqld | grep "\""temporary password"\""' to retrieve it."
+ echo " >> "
+}
+
+post_upgrade() {
+ systemd-sysusers mysql.conf
+
+ if [ "$(vercmp $2 5.7)" -lt 0 ]; then
+ echo " >> "
+ echo " >> Major version update. Consider restart the service, running mysql_upgrade and restart it again after it."
+ echo " >> "
+ fi
+}
Copied: percona-server/repos/community-staging-x86_64/PKGBUILD (from rev 194962, percona-server/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,173 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=percona-server
+pkgname=('libperconaserverclient' 'percona-server-clients' 'percona-server')
+pkgver=5.7.14_8
+_boost_ver=1.59.0
+_pkgver=${pkgver/_/-}
+_myver=${pkgver/_rel*}
+pkgrel=3
+arch=('i686' 'x86_64')
+# valgrind necessary for bug https://bugs.launchpad.net/percona-server/+bug/1494283
+makedepends=('cmake' 'openssl' 'zlib' 'libaio' 'systemd-tools' 'valgrind' 'pam' 'numactl' 'jemalloc')
+license=('GPL' 'AGPL')
+url="http://www.percona.com/software/percona-server/"
+source=("http://www.percona.com/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-$_pkgver/source/tarball/percona-server-$_pkgver.tar.gz"
+ "http://sourceforge.net/projects/boost/files/boost/${_boost_ver}/boost_${_boost_ver//./_}.tar.gz"
+ 'percona-server-CVE-2016-6662.patch'
+ 'my.cnf'
+ 'mysql-user.conf')
+
+prepare() {
+ cd $pkgbase-$_pkgver
+ rm -v sql/sql_yacc.{cc,h}
+
+ sed 's|${fullhostname}|"archbuild"|' \
+ -i storage/tokudb/PerconaFT/cmake_modules/TokuSetupCTest.cmake
+
+ patch -Np1 < "${srcdir}/percona-server-CVE-2016-6662.patch"
+}
+
+build() {
+ rm -rf build
+ mkdir build
+ cd build
+
+ cmake ../$pkgbase-$_pkgver \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_CONFIG=mysql_release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DINSTALL_INFODIR=share/mysql/docs \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_INCLUDEDIR=include/perconaserver \
+ -DINSTALL_DOCREADMEDIR=share/mysql \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_DOCDIR=share/mysql/docs \
+ -DINSTALL_SHAREDIR=share/mysql \
+ -DWITH_ZLIB=system \
+ -DWITH_SSL=system \
+ -DWITH_LIBWRAP=OFF \
+ -DCMAKE_EXE_LINKER_FLAGS='-ljemalloc' \
+ -DWITH_UNIT_TESTS=OFF \
+ -DWITH_PAM=ON \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_EMBEDDED_SERVER=ON \
+ -DWITH_EMBEDDED_SHARED_LIBRARY=ON \
+ -DWITH_INNODB_MEMCACHED=ON \
+ -DWITH_INNOBASE_STORAGE_ENGINE=ON \
+ -DWITH_PARTITION_STORAGE_ENGINE=ON \
+ -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \
+ -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
+ -DWITH_FEDERATED_STORAGE_ENGINE=OFF \
+ -DWITH_EXAMPLE_STORAGE_ENGINE=OFF \
+ -DWITH_SYSTEMD=1 \
+ -DCMAKE_C_FLAGS="-fPIC $CFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks" \
+ -DCMAKE_CXX_FLAGS="-fPIC $CXXFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-delete-null-pointer-checks -Wno-error=nonnull-compare -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-maybe-uninitialized" \
+ -DWITH_MYSQLD_LDFLAGS="-pie ${LDFLAGS},-z,now" \
+ -DWITH_BOOST="../boost_${_boost_ver//./_}" \
+ -DWITH_NUMA=ON
+
+ make
+}
+
+package_libperconaserverclient() {
+ pkgdesc='Percona Server client libraries'
+ depends=('openssl' 'zlib')
+
+ cd build
+ for dir in include libmysql libmysqld libservices; do
+ make -C $dir DESTDIR="$pkgdir" install
+ done
+
+ # Conflicting files with libmariadbclient
+ rm "$pkgdir"/usr/lib/libmysql*
+
+ install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/perconaserver_config
+ install -d "$pkgdir"/usr/share/man/man1
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/mysql_config.1 "$pkgdir"/usr/share/man/man1/perconaserver_config.1
+}
+
+package_percona-server-clients() {
+ pkgdesc='Percona Server client tools'
+ depends=('libperconaserverclient' 'zlib' 'openssl' 'jemalloc')
+ conflicts=('mysql-clients')
+ provides=("mysql-clients=$_myver" "mariadb-clients=$_myver")
+
+ cd build
+ make -C client DESTDIR="$pkgdir" install
+
+ # install man pages
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap mysqlpump; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ # provided by percona-server
+ rm "$pkgdir"/usr/bin/mysql{_plugin,_upgrade,binlog,test,_config_editor,_install_db,_secure_installation,_ssl_rsa_setup}
+}
+
+package_percona-server() {
+ pkgdesc='Drop-in replacement for MySQL that provides improved performance, diagnostics, instrumentation and TokuDB storage engine'
+ backup=('etc/mysql/my.cnf')
+ install=percona.install
+ depends=('libaio' 'systemd-tools' 'pam' 'jemalloc' 'numactl')
+ optdepends=('perl-dbd-mysql')
+ conflicts=('mysql')
+ provides=("mysql=$_myver" "mariadb=$_myver")
+ options=('emptydirs')
+
+ cd build
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 ../my.cnf "$pkgdir"/etc/mysql/my.cnf
+ install -Dm644 ../mysql-user.conf "$pkgdir"/usr/lib/sysusers.d/mysql.conf
+
+ cd "$pkgdir"
+ mv usr/usr/lib/* usr/lib
+ rm -rf usr/usr
+
+ # Move documentation
+ install -dm755 usr/share/doc
+ mv usr/share/mysql/docs usr/share/doc/$pkgname
+ mv usr/share/mysql/{COPYING,README.MySQL} usr/share/doc/$pkgname/
+
+ if [ -f usr/PATENTS ]; then
+ mv usr/{PATENTS,README.md} usr/share/doc/$pkgname/
+ rm usr/COPYING.*
+ fi
+
+ # provided by libperconaserverclient
+ rm usr/bin/mysql_config
+ rm usr/lib/lib{mysql,perconaserver}*
+ rm -r usr/include/
+ rm usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
+
+ # provided by percona-server-clients
+ rm usr/bin/mysql{,admin,check,dump,import,show,slap,pump}
+ rm usr/share/man/man1/mysql{,admin,check,dump,import,show,slap,pump}.1
+
+ # deprecated/unused
+ rm usr/bin/replace
+ rm usr/share/man/man1/replace.1
+
+ # not needed
+ rm -r usr/mysql-test
+ rm usr/share/man/man1/mysql-test-run.pl.1
+}
+
+sha256sums=('9a842bdbfb052edeee6f85d4ee977b2b4e1a8ac67d88e5d248d83474682d401e'
+ '47f11c8844e579d02691a607fbd32540104a9ac7a2534a8ddaef50daf502baac'
+ '924543feda4c377386a5c20f35302132e204ded5c7e4401bd1ac9f3e12a2f49a'
+ 'ae451839c368f0db25a63bb0a6a890194897a8e74818bd4245140933c29e5f83'
+ 'e638a2657085f15b6728f43c1fd6aa551b27608fbf6b435e33afd3606a0cfb0e')
Copied: percona-server/repos/community-staging-x86_64/my.cnf (from rev 194962, percona-server/trunk/my.cnf)
===================================================================
--- community-staging-x86_64/my.cnf (rev 0)
+++ community-staging-x86_64/my.cnf 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,38 @@
+# For advice on how to change settings please see
+# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
+
+[client]
+#password = your_password
+port = 3306
+socket = /run/mysqld/mysqld.sock
+
+[mysqld]
+port = 3306
+socket = /run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+
+#
+# Remove leading # and set to the amount of RAM for the most important data
+# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
+# innodb_buffer_pool_size = 128M
+#
+# Remove leading # to turn on a very important data integrity option: logging
+# changes to the binary log between backups.
+# log_bin
+#
+# Remove leading # to set options mainly useful for reporting servers.
+# The server defaults are faster for transactions and fast SELECTs.
+# Adjust sizes as needed, experiment to find the optimal values.
+# join_buffer_size = 128M
+# sort_buffer_size = 2M
+# read_rnd_buffer_size = 2M
+
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
+
+# Recommended in standard MySQL setup
+sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
+
+[mysqld_safe]
+log-error = /var/log/mysqld.log
+pid-file = /run/mysqld/mysqld.pid
Copied: percona-server/repos/community-staging-x86_64/mysql-user.conf (from rev 194962, percona-server/trunk/mysql-user.conf)
===================================================================
--- community-staging-x86_64/mysql-user.conf (rev 0)
+++ community-staging-x86_64/mysql-user.conf 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1 @@
+u mysql 89 "MySQL user"
Copied: percona-server/repos/community-staging-x86_64/percona-server-CVE-2016-6662.patch (from rev 194962, percona-server/trunk/percona-server-CVE-2016-6662.patch)
===================================================================
--- community-staging-x86_64/percona-server-CVE-2016-6662.patch (rev 0)
+++ community-staging-x86_64/percona-server-CVE-2016-6662.patch 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,114 @@
+diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+index 30bb0f3..e1fddd8 100644
+--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
++++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+@@ -13,6 +13,16 @@ SET @@global.general_log_file = mytest.log;
+ ERROR 42000: Incorrect argument type to variable 'general_log_file'
+ SET @@global.general_log_file = 12;
+ ERROR 42000: Incorrect argument type to variable 'general_log_file'
++SET @@global.general_log_file = 'my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = '/tmp/my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp/my.cnf'
++SET @@global.general_log_file = '.my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
++SET @@global.general_log_file = 'my.cnf\0foo';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = 'my.ini';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
+ '#----------------------FN_DYNVARS_004_03------------------------#'
+ SELECT @@global.general_log_file = VARIABLE_VALUE
+ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+index c032a36..503d1c8 100644
+--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
++++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+@@ -10,6 +10,16 @@ SET @@global.slow_query_log_file = mytest.log;
+ ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
+ SET @@global.slow_query_log_file = 12;
+ ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
++SET @@global.slow_query_log_file = 'my.cnf';
++ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'my.cnf'
++SET @@global.slow_query_log_file = '/tmp/my.cnf';
++ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/tmp/my.cnf'
++SET @@global.general_log_file = '.my.cnf';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
++SET @@global.general_log_file = 'my.cnf\0foo';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
++SET @@global.general_log_file = 'my.ini';
++ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
+ '#----------------------FN_DYNVARS_004_03------------------------#'
+ SELECT @@global.slow_query_log_file = VARIABLE_VALUE
+ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+index 62b2105..2e24f1d 100644
+--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
++++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+@@ -59,6 +59,20 @@ SET @@global.general_log_file = mytest.log;
+ --error ER_WRONG_TYPE_FOR_VAR
+ SET @@global.general_log_file = 12;
+
++#
++# MDEV-10465
++#
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '/tmp/my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '.my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf\0foo';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.ini';
++
+
+ --echo '#----------------------FN_DYNVARS_004_03------------------------#'
+ ##############################################################################
+diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+index c91ff45..5f59dc9 100644
+--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
++++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+@@ -57,6 +57,20 @@ SET @@global.slow_query_log_file = mytest.log;
+ --error ER_WRONG_TYPE_FOR_VAR
+ SET @@global.slow_query_log_file = 12;
+
++#
++# MDEV-10465
++#
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.slow_query_log_file = 'my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.slow_query_log_file = '/tmp/my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = '.my.cnf';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.cnf\0foo';
++--error ER_WRONG_VALUE_FOR_VAR
++SET @@global.general_log_file = 'my.ini';
++
+ --echo '#----------------------FN_DYNVARS_004_03------------------------#'
+ ##############################################################################
+ # Check if the value in GLOBAL Tables matches values in variable #
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index 9ed27e2..31679c2 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4973,6 +4973,17 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
+ return true;
+ }
+
++ static const LEX_CSTRING my_cnf= { STRING_WITH_LEN("my.cnf") };
++ static const LEX_CSTRING my_ini= { STRING_WITH_LEN("my.ini") };
++ if (path_length >= my_cnf.length)
++ {
++ if (strcasecmp(path + path_length - my_cnf.length, my_cnf.str) == 0)
++ return true; // log file name ends with "my.cnf"
++ DBUG_ASSERT(my_cnf.length == my_ini.length);
++ if (strcasecmp(path + path_length - my_ini.length, my_ini.str) == 0)
++ return true; // log file name ends with "my.ini"
++ }
++
+ MY_STAT f_stat;
+
+ if (my_stat(path, &f_stat, MYF(0)))
Copied: percona-server/repos/community-staging-x86_64/percona.install (from rev 194962, percona-server/trunk/percona.install)
===================================================================
--- community-staging-x86_64/percona.install (rev 0)
+++ community-staging-x86_64/percona.install 2016-11-07 18:19:57 UTC (rev 194963)
@@ -0,0 +1,19 @@
+post_install() {
+ systemd-sysusers mysql.conf
+ systemd-tmpfiles --create mysql.conf
+
+ echo " >> "
+ echo " >> A temporary password is generated on first start and logged in journald."
+ echo " >> Use 'journalctl -au mysqld | grep "\""temporary password"\""' to retrieve it."
+ echo " >> "
+}
+
+post_upgrade() {
+ systemd-sysusers mysql.conf
+
+ if [ "$(vercmp $2 5.7)" -lt 0 ]; then
+ echo " >> "
+ echo " >> Major version update. Consider restart the service, running mysql_upgrade and restart it again after it."
+ echo " >> "
+ fi
+}
More information about the arch-commits
mailing list