summaryrefslogtreecommitdiff
path: root/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2016-01-29 21:33:01 -0500
committerBrian Evans <grknight@gentoo.org>2016-01-29 21:33:01 -0500
commitc3bf8ff29ade3fd7eba1f1ca98a96d70558b3720 (patch)
treee17bbf3e8878837680c1e91f8f346b720a408d8e /dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild
parent0c8693fc1c0c34cb150bd8bbb454a4f9424174ed (diff)
downloadgentoo-c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720.tar.gz
gentoo-c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720.tar.bz2
gentoo-c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720.zip
dev-db/mysql-init-scripts: Version bump to update systemd units wrt bug 572788
dev-db/mariadb has started shipping it's own Notify based units starting with 10.1.8 Set the conflict in mysqld.service to compensate Also, set the binary to be /usr/sbin/mysqld so we are not monitoring a monitor Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild')
-rw-r--r--dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild
new file mode 100644
index 000000000000..b47641df8059
--- /dev/null
+++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_rc1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit systemd s6
+
+DESCRIPTION="Gentoo MySQL init scripts."
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+# This _will_ break with MySQL 5.0, 4.x, 3.x
+# It also NEEDS openrc for the save_options/get_options builtins.
+# The s6 support was added after openrc 0.16.2
+RDEPEND="
+ !<dev-db/mysql-5.1
+ !<sys-apps/openrc-0.16.2
+ "
+# Need to set S due to PMS saying we need it existing, but no SRC_URI
+S=${WORKDIR}
+
+src_install() {
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql"
+
+ # s6 init scripts
+ if use amd64 || use x86 ; then
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
+ newinitd "${FILESDIR}/init.d-s6" "mysql-s6"
+ s6_install_service mysql "${FILESDIR}/run-s6"
+ s6_install_service mysql/log "${FILESDIR}/log-s6"
+ fi
+
+ newinitd "${FILESDIR}/init.d-2.0" "mysql"
+
+ # systemd unit installation
+ exeinto /usr/libexec
+ doexe "${FILESDIR}"/mysqld-wait-ready
+ systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
+ systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
+ systemd_dotmpfilesd "${FILESDIR}/mysql.conf"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate.mysql" "mysql"
+}
+
+pkg_postinst() {
+ if use amd64 || use x86 ; then
+ elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
+ elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
+ fi
+}