* [gentoo-commits] proj/mysql:master commit in: dev-db/percona-server/, dev-db/percona-server/files/
@ 2013-05-01 1:09 Jorge Manuel B. S. Vicetto
0 siblings, 0 replies; 2+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2013-05-01 1:09 UTC (permalink / raw
To: gentoo-commits
commit: fa7cd051011a9ef3c878433d4edbb4894805a4be
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Wed May 1 01:07:56 2013 +0000
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Wed May 1 01:07:56 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=fa7cd051
[dev-db/percona-server] Add percona-server to the overlay. This still needs much testing.
Currently fails to build with USE="embedded".
---
dev-db/percona-server/Manifest | 1 +
dev-db/percona-server/files/my.cnf-5.5 | 153 ++++++++++++++++++++
dev-db/percona-server/metadata.xml | 22 +++
.../percona-server/percona-server-5.5.30.2.ebuild | 129 +++++++++++++++++
4 files changed, 305 insertions(+), 0 deletions(-)
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
new file mode 100644
index 0000000..0bc083f
--- /dev/null
+++ b/dev-db/percona-server/Manifest
@@ -0,0 +1 @@
+DIST Percona-Server-5.5.30-rel30.2.tar.gz 22542120 SHA256 d30876033cd5590f8e1d68aff6a2eaad677dbe59168d4610c580c4e4e2e923a7 SHA512 0ff7fe9a1ea11295b7e817ae7b492078babd5b1dd1cc302b4745f5eeb5700d01c26a0d00b0341e1591db4d40b1f111fe90f4bb7be82b55454a303ec6a5eadf98 WHIRLPOOL 21cb0b5d80256a3eb2c7bbcb33a81fe466002eac5ab36f7b07dfad480a03ef6201eac307673649a2ebde902c80e694958298cf9cf92933f6d782ba7126b62e26
diff --git a/dev-db/percona-server/files/my.cnf-5.5 b/dev-db/percona-server/files/my.cnf-5.5
new file mode 100644
index 0000000..f43d535
--- /dev/null
+++ b/dev-db/percona-server/files/my.cnf-5.5
@@ -0,0 +1,153 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.5,v 1.2 2013/01/20 02:40:02 robbat2 Exp $
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer = 16M
+max_allowed_packet = 1M
+table_open_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# uncomment the following directives if you are using BDB tables
+#bdb_cache_size = 4M
+#bdb_max_lock = 10000
+
+# the following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase it if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
new file mode 100644
index 0000000..ea3fe5a
--- /dev/null
+++ b/dev-db/percona-server/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mysql</herd>
+<use>
+ <flag name='big-tables'>Make tables contain up to 1.844E+19 rows</flag>
+ <flag name='cluster'>Add support for NDB clustering (deprecated)</flag>
+ <flag name='community'>Enables the community features from upstream.</flag>
+ <flag name='embedded'>Build embedded server (libmysqld)</flag>
+ <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
+ <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
+ <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag>
+ <flag name='minimal'>Install client programs only, no server</flag>
+ <flag name='pbxt'>Add experimental support for PBXT storage engine</flag>
+ <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag>
+ <flag name='raid'>Deprecated option, removed in the 5.0 series</flag>
+ <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
+ <flag name='test'>Install upstream testsuites for end use.</flag>
+ <flag name='xtradb'>Add experimental support for Percona's InnoDB replacement: XtraDB</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-db/percona-server/percona-server-5.5.30.2.ebuild b/dev-db/percona-server/percona-server-5.5.30.2.ebuild
new file mode 100644
index 0000000..05ca569
--- /dev/null
+++ b/dev-db/percona-server/percona-server-5.5.30.2.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+MY_EXTRAS_VER="live"
+MY_PV="${PV//_alpha_pre/-m}"
+MY_PV="${MY_PV//_/-}"
+
+# Build type
+BUILD="cmake"
+
+inherit toolchain-funcs mysql-v2
+# only to make repoman happy. it is really set in the eclass
+IUSE="$IUSE"
+
+# Define the mysql-extras source
+EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/mysql-extras.git"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+
+# When MY_EXTRAS is bumped, the index should be revised to exclude these.
+EPATCH_EXCLUDE=''
+
+DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
+RDEPEND="${RDEPEND}"
+
+# Please do not add a naive src_unpack to this ebuild
+# If you want to add a single patch, copy the ebuild to an overlay
+# and create your own mysql-extras tarball, looking at 000_index.txt
+
+# Official test instructions:
+# USE='berkdb -cluster embedded extraengine perl ssl community' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild percona-server-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+
+ local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! use "minimal" ; then
+
+ if [[ $UID -eq 0 ]]; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # Run CTest (test-units)
+ cmake-utils_src_test
+ retstatus_unit=$?
+ [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ # create directories because mysqladmin might right out of order
+ mkdir -p "${S}"/mysql-test/var-tests{,/log}
+
+ # These are failing in MySQL 5.5 for now and are believed to be
+ # false positives:
+ #
+ # main.information_schema, binlog.binlog_statement_insert_delayed,
+ # main.mysqld--help-notwin
+ # fails due to USE=-latin1 / utf8 default
+ #
+ # main.mysql_client_test:
+ # segfaults at random under Portage only, suspect resource limits.
+ #
+ # sys_vars.plugin_dir_basic
+ # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin
+ # instead of MYSQL_LIBDIR/plugin
+ #
+ # main.flush_read_lock_kill
+ # fails because of unknown system variable 'DEBUG_SYNC'
+ #
+ # main.openssl_1
+ # error message changing
+ # -mysqltest: Could not open connection 'default': 2026 SSL connection
+ # error: ASN: bad other signature confirmation
+ # +mysqltest: Could not open connection 'default': 2026 SSL connection
+ # error: error:00000001:lib(0):func(0):reason(1)
+ #
+
+ for t in main.mysql_client_test \
+ binlog.binlog_statement_insert_delayed main.information_schema \
+ main.mysqld--help-notwin main.flush_read_lock_kill \
+ sys_vars.plugin_dir_basic main.openssl_1 ; do
+ mysql-v2_disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Run mysql tests
+ pushd "${TESTDIR}"
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests"
+ retstatus_tests=$?
+ [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ popd
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+ has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+
+ else
+
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/mysql:master commit in: dev-db/percona-server/, dev-db/percona-server/files/
@ 2018-04-04 20:39 Thomas Deutschmann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Deutschmann @ 2018-04-04 20:39 UTC (permalink / raw
To: gentoo-commits
commit: 2cc0f195736f689d5132dc29ec761d231a4db8b0
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 4 20:32:51 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Apr 4 20:33:10 2018 +0000
URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=2cc0f195
dev-db/percona-server: Final touches to new revision v3
Package-Manager: Portage-2.3.28, Repoman-2.3.9
dev-db/percona-server/files/my.cnf-5.6 | 140 ++++++
dev-db/percona-server/metadata.xml | 2 +-
.../percona-server-5.6.39.83.1-r1.ebuild | 494 ++++++++++-----------
3 files changed, 381 insertions(+), 255 deletions(-)
diff --git a/dev-db/percona-server/files/my.cnf-5.6 b/dev-db/percona-server/files/my.cnf-5.6
new file mode 100644
index 0000000..047c8d7
--- /dev/null
+++ b/dev-db/percona-server/files/my.cnf-5.6
@@ -0,0 +1,140 @@
+# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+[myisampack]
+character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
+[mysqld]
+character-set-server = utf8
+user = mysql
+port = 3306
+socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
+pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
+log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
+basedir = @GENTOO_PORTAGE_EPREFIX@/usr
+datadir = @DATADIR@
+skip-external-locking
+key_buffer_size = 16M
+max_allowed_packet = 4M
+table_open_cache = 400
+sort_buffer_size = 512K
+net_buffer_length = 16K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
+#Set this to your desired error message language
+lc_messages = en_US
+
+# security:
+# using "localhost" in connects uses sockets by default
+# skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# point the following paths to different dedicated disks
+tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
+#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
+
+# you need the debug USE flag enabled to use the following directives,
+# if needed, uncomment them, start the server and issue
+# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
+# this will show you *exactly* what's happening in your server ;)
+
+#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 128M
+#
+# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 48M
+# this is the default, increase it if you have very large transactions going on
+innodb_log_buffer_size = 8M
+# this is the default and won't hurt you
+# you shouldn't need to tweak it
+innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+innodb_file_per_table
+
+# Uncomment this to get FEDERATED engine support
+#plugin-load=federated=ha_federated.so
+loose-federated
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# uncomment the next directive if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer_size = 20M
+sort_buffer_size = 20M
+read_buffer_size = 2M
+write_buffer_size = 2M
+
+[mysqlhotcopy]
+interactive-timeout
diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml
index 0e3879e..526cc50 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -19,7 +19,7 @@
<flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag>
<flag name="server">Build the server program</flag>
<flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
- <flag name="test">Install upstream testsuites for end use.</flag>
+ <flag name="test-suite">Install upstream testsuites for end use.</flag>
<flag name="tokudb">Add support for TokuDB storage engine</flag>
<flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</flag>
<flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
diff --git a/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild b/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild
index 3c3e1d6..1b9728c 100644
--- a/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild
+++ b/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild
@@ -9,10 +9,12 @@ CMAKE_MAKEFILE_GENERATOR=emake
# Keeping eutils in EAPI=6 for emktemp in pkg_config
inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \
- user cmake-utils multilib-minimal versionator
+ versionator user cmake-utils multilib-minimal
+
MY_PV=$(replace_version_separator 3 '-')
MY_PN="Percona-Server"
MY_MAJOR_PV=$(get_version_component_range 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/release-notes/release-notes_index.html"
SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz"
# Gentoo patches to MySQL
@@ -30,7 +32,7 @@ DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team"
LICENSE="GPL-2"
SLOT="0/18"
IUSE="-client-libs cracklib debug jemalloc latin1 libressl numa pam +perl profiling rocksdb selinux
- +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin yassl"
+ +server static static-libs systemtap tcmalloc test test-suite tokudb tokudb-backup-plugin yassl"
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
RESTRICT="libressl? ( test )"
@@ -90,7 +92,6 @@ COMMON_DEPEND="
!client-libs? ( >=sys-libs/zlib-1.2.3:0= )
sys-libs/ncurses:0=
server? (
- >=app-arch/lz4-0_p131:=
>=dev-libs/boost-1.65.0:=
numa? ( sys-process/numactl )
pam? ( virtual/pam:0= )
@@ -117,6 +118,66 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )"
+python_check_deps() {
+ has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
+}
+
+mysql_init_vars() {
+ MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
+ MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
+ MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
+ MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=""
+ if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
+ MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
+ | sed -e 's/.*=\s*//' \
+ | tail -n1`
+ fi
+ fi
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+ einfo "Using default MY_DATADIR"
+ fi
+ elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+
+ if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
+ if [[ -e "${MY_DATADIR}" ]] ; then
+ # If you get this and you're wondering about it, see bug #207636
+ elog "MySQL datadir found in ${MY_DATADIR}"
+ elog "A new one will not be created."
+ PREVIOUS_DATADIR="yes"
+ else
+ PREVIOUS_DATADIR="no"
+ fi
+ export PREVIOUS_DATADIR
+ fi
+ else
+ if [[ ${EBUILD_PHASE} == "config" ]] ; then
+ local new_MY_DATADIR
+ new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
+ | sed -ne '/datadir/s|^--datadir=||p' \
+ | tail -n1`
+
+ if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then
+ ewarn "MySQL MY_DATADIR has changed"
+ ewarn "from ${MY_DATADIR}"
+ ewarn "to ${new_MY_DATADIR}"
+ MY_DATADIR="${new_MY_DATADIR}"
+ fi
+ fi
+ fi
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
pkg_pretend() {
if use numa; then
local CONFIG_CHECK="~NUMA"
@@ -128,10 +189,6 @@ pkg_pretend() {
fi
}
-python_check_deps() {
- has_version "dev-python/mysql-python[${PYTHON_USEDEP}]"
-}
-
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]] ; then
local GCC_MAJOR_SET=$(gcc-major-version)
@@ -161,57 +218,9 @@ pkg_setup() {
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
}
-pkg_preinst() {
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${EROOT%/}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT%/}${MY_LOGDIR}"
-
- if use server ; then
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
- fi
-
- # Note about configuration change
- einfo
- elog "This version of mysql reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/${PN}.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
- elog "You may have as many files as needed and they are read alphabetically."
- elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
- einfo
-}
-
src_unpack() {
unpack ${A}
+
# Grab the patches
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
@@ -221,8 +230,7 @@ src_unpack() {
src_prepare() {
if use jemalloc ; then
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
- if use tcmalloc; then
+ elif use tcmalloc ; then
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
fi
@@ -253,9 +261,10 @@ src_prepare() {
cmake-utils_src_prepare
}
-src_configure(){
+src_configure() {
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
+
# Bug #114895, bug #110149
filter-flags "-O" "-O[01]"
@@ -316,7 +325,7 @@ multilib_src_configure() {
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
-DWITH_LIBEVENT=NO
)
- if use test ; then
+ if use test || use test-suite ; then
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
else
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
@@ -347,13 +356,12 @@ multilib_src_configure() {
fi
if multilib_is_native_abi && use server ; then
-
mycmakeargs+=(
-DWITH_PAM=$(usex pam)
-DWITH_NUMA=$(usex numa ON OFF)
)
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
+ if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
ewarn "You MUST file bugs without these variables set."
@@ -386,10 +394,6 @@ multilib_src_configure() {
mycmakeargs+=( -DWITH_PIC=1 )
fi
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
# Storage engines
mycmakeargs+=(
-DWITH_EXAMPLE_STORAGE_ENGINE=0
@@ -437,112 +441,11 @@ multilib_src_compile() {
cmake-utils_src_compile
}
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
- cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- if use server ; then
- mycnf_src="my.cnf.distro-server"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- if use prefix ; then
- sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
# Official test instructions:
# FEATURES='test userpriv -usersandbox' \
# ebuild percona-server-X.X.XX.ebuild \
# digest clean package
-multilib_src_test() {
- if ! multilib_is_native_abi ; then
- einfo "Server tests not available on non-native abi".
- return 0;
- fi
-
+src_test() {
_disable_test() {
local rawtestname reason
rawtestname="${1}" ; shift
@@ -564,11 +467,6 @@ multilib_src_test() {
# localhost. Also causes weird failures.
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
# Run CTest (test-units)
@@ -583,18 +481,14 @@ multilib_src_test() {
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
# create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
+ mkdir -p "${T}"/var-tests{,/log} || die "Failed to create \"${T}/var-tests{,/log}\""
# Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
+ pushd "${TESTDIR}" > /dev/null || die "Failed to chdir into \"${TESTDIR}\""
touch "${T}/disabled.def"
- # These are failing in MySQL 5.7 for now and are believed to be
+ # These are failing in MySQL 5.6 for now and are believed to be
# false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
local t
for t in main.mysql_client_test \
@@ -619,21 +513,16 @@ multilib_src_test() {
fi
fi
- # bug 401673, 530766
-# for t in federated.federated_plugin ; do
-# _disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
-# done
-
# Set file limits higher so tests run
- if ! ulimit -n 16500 1>/dev/null 2>&1; then
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
# Upper limit comes from parts.partition_* tests
ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
- if ! ulimit -n 4162 1>/dev/null 2>&1; then
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
- if ! ulimit -n 3000 1>/dev/null 2>&1; then
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
else
einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
@@ -661,64 +550,162 @@ multilib_src_test() {
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
- [[ -z "$failures" ]] || die "Test failures: $failures"
+ if [[ -n "$failures" ]] ; then
+ if has usersandbox ${FEATURES}; then
+ ewarn "Some tests may have failed due to FEATURES=usersandbox"
+ ewarn "Please confirm test failure with FEATURES=-usersandbox before reporting a bug."
+ fi
+
+ die "Test failures: $failures"
+ fi
+
einfo "Tests successfully completed"
}
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/mysql_version.h )
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+ multilib-minimal_src_install
else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
+# Intentionally override eclass function
+multilib_src_install() {
+ cmake-utils_src_install
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -rf "${ED%/}/usr/data" || die
fi
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test-suite ; then
+ rm -rf "${D%/}/${MY_SHAREDSTATEDIR#/}/mysql-test" || die
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ mycnf_src="my.cnf-5.6"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+ use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ eprefixify "${TMPDIR}/my.cnf.ok"
+ newins "${TMPDIR}/my.cnf.ok" my.cnf
+
+ if use server ; then
+ einfo "Including support files and sample configurations"
+ docinto "support-files"
+ for script in \
+ "${S}"/support-files/my-*.cnf.sh \
+ "${S}"/support-files/magic \
+ "${S}"/support-files/ndb-config-2-node.ini.sh
+ do
+ [[ -f $script ]] && dodoc "${script}"
+ done
+
+ docinto "scripts"
+ for script in "${S}"/scripts/mysql* ; do
+ [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}"
+ done
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_preinst() {
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${EROOT%/}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT%/}${MY_LOGDIR}"
+
+ if use server ; then
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog " \"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ local _replacing_version=
+ for _replacing_version in ${REPLACING_VERSIONS}; do
+ local _new_version_branch=$(get_version_component_range 1-3 "${PV}")
+ local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}")
+ debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..."
+
+ if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then
+ debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..."
+ # https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/
+
+ einfo
+ elog "You are upgrading an existing ${PN} installation, you should review"
+ elog "release notes at ${MY_RELEASE_NOTES_URI}"
+ elog "and run the mysql_upgrade tool."
+ einfo
+
+ // Break loop - we only want to show this hint once
+ break
+ fi
+ done
+ fi
+
+ elog "Since ${PN}-5.6.39.83.1-r1 we no longer provide client libs."
+ elog "Applications depending on client libs should migrate to virtual/libmysqlclient"
+ elog "which will pull-in dev-db/mysql-connector-c as their new client lib provider."
+ einfo
+ fi
}
pkg_config() {
@@ -747,13 +734,13 @@ pkg_config() {
die "Minimal builds do NOT include the MySQL server"
fi
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
+ if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then
local MY_DATADIR_s="${EROOT%/}/${MY_DATADIR#/}"
MY_DATADIR_s="${MY_DATADIR_s%%/}"
local old_MY_DATADIR_s="${EROOT%/}/${old_MY_DATADIR#/}"
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
+ if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then
if [[ -d "${MY_DATADIR_s}" ]]; then
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
@@ -764,7 +751,7 @@ pkg_config() {
fi
else
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
+ if [[ -d "${MY_DATADIR_s}" ]] ; then
ewarn "Attempting to use ${MY_DATADIR_s}"
else
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
@@ -787,15 +774,15 @@ pkg_config() {
die "MySQL database already exists!"
fi
- if [[ ! -d "${EROOT%/}/${MYSQL_TMPDIR#/}" ]]; then
+ if [[ ! -d "${EROOT%/}/${MYSQL_TMPDIR#/}" ]] ; then
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
install -d -m 770 -o mysql -g mysql "${EROOT%/}/${MYSQL_TMPDIR#/}"
fi
- if [[ ! -d "${EROOT%/}/${MYSQL_LOG_BIN#/}" ]]; then
+ if [[ ! -d "${EROOT%/}/${MYSQL_LOG_BIN#/}" ]] ; then
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
install -d -m 770 -o mysql -g mysql "${EROOT%/}/${MYSQL_LOG_BIN#/}"
fi
- if [[ ! -d "${EROOT%/}/${MYSQL_RELAY_LOG#/}" ]]; then
+ if [[ ! -d "${EROOT%/}/${MYSQL_RELAY_LOG#/}" ]] ; then
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
install -d -m 770 -o mysql -g mysql "${EROOT%/}/${MYSQL_RELAY_LOG#/}"
fi
@@ -804,14 +791,14 @@ pkg_config() {
local pwd2="b"
local maxtry=15
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
+ if [ -z "${MYSQL_ROOT_PASSWORD}" ] ; then
local tmp_mysqld_password_source=
for tmp_mysqld_password_source in mysql client; do
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
MYSQL_ROOT_PASSWORD=
continue
@@ -823,15 +810,14 @@ pkg_config() {
done
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
fi
unset tmp_mysqld_password_source
fi
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
einfo "Please provide a password for the mysql 'root' user now"
einfo "or through the ${HOME}/.my.cnf file."
ewarn "Avoid [\"'\\_%] characters in the password"
@@ -869,11 +855,11 @@ pkg_config() {
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
PID_DIR="${EROOT%/}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
+ if [[ ! -d "${PID_DIR}" ]] ; then
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
fi
- if [[ ! -d "${EROOT%/}/${MY_DATADIR#/}" ]]; then
+ if [[ ! -d "${EROOT%/}/${MY_DATADIR#/}" ]] ; then
install -d -m 750 -o mysql -g mysql "${EROOT%/}/${MY_DATADIR#/}" || die "Could not create data directory"
fi
@@ -889,7 +875,7 @@ pkg_config() {
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
>"${TMPDIR%/}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
+ if [[ $? -ne 0 ]] ; then
grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
die "Failed to initialize mysqld. Please review ${EROOT%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
fi
@@ -923,7 +909,7 @@ pkg_config() {
done
eend $rc
- if ! [[ -S "${socket}" ]]; then
+ if ! [[ -S "${socket}" ]] ; then
die "Completely failed to start up mysqld with: ${mysqld}"
fi
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-04 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-04 20:39 [gentoo-commits] proj/mysql:master commit in: dev-db/percona-server/, dev-db/percona-server/files/ Thomas Deutschmann
-- strict thread matches above, loose matches on Subject: below --
2013-05-01 1:09 Jorge Manuel B. S. Vicetto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox