Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-init-scripts/
Date: Wed, 28 Aug 2019 11:38:27
Message-Id: 1566992294.5c61d964bfc659eb2a8474552853311a2b1d8503.whissi@gentoo
1 commit: 5c61d964bfc659eb2a8474552853311a2b1d8503
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 28 11:34:23 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 28 11:38:14 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c61d964
7
8 dev-db/mysql-init-scripts: package requires acct-{user,group}/mysql
9
10 ...already in pkg_post* phase.
11
12 Bug: https://bugs.gentoo.org/693000
13 Package-Manager: Portage-2.3.72, Repoman-2.3.17
14 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
15
16 .../mysql-init-scripts-2.3-r2.ebuild | 71 ++++++++++++++++++++++
17 1 file changed, 71 insertions(+)
18
19 diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.3-r2.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.3-r2.ebuild
20 new file mode 100644
21 index 00000000000..dc33b534706
22 --- /dev/null
23 +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.3-r2.ebuild
24 @@ -0,0 +1,71 @@
25 +# Copyright 1999-2019 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=6
29 +
30 +inherit systemd s6 tmpfiles
31 +
32 +DESCRIPTION="Gentoo MySQL init scripts."
33 +HOMEPAGE="https://www.gentoo.org/"
34 +SRC_URI=""
35 +
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
39 +IUSE=""
40 +
41 +DEPEND="
42 + !prefix? (
43 + acct-group/mysql acct-user/mysql
44 + )
45 + "
46 +# This _will_ break with MySQL 5.0, 4.x, 3.x
47 +# It also NEEDS openrc for the save_options/get_options builtins.
48 +# The s6 support was added after openrc 0.16.2
49 +# mysql-connector-c needed for my_print_defaults
50 +RDEPEND="
51 + !<dev-db/mysql-5.1
52 + !<sys-apps/openrc-0.16.2
53 + dev-db/mysql-connector-c
54 + "
55 +# Need to set S due to PMS saying we need it existing, but no SRC_URI
56 +S=${WORKDIR}
57 +
58 +src_install() {
59 + newconfd "${FILESDIR}/conf.d-2.0" "mysql"
60 +
61 + # s6 init scripts
62 + if use amd64 || use x86 ; then
63 + newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
64 + newinitd "${FILESDIR}/init.d-s6-2.3" "mysql-s6"
65 + s6_install_service mysql "${FILESDIR}/run-s6"
66 + s6_install_service mysql/log "${FILESDIR}/log-s6"
67 + fi
68 +
69 + newinitd "${FILESDIR}/init.d-2.3" "mysql"
70 + newinitd "${FILESDIR}/init.d-supervise-2.3" "mysql-supervise"
71 +
72 + # systemd unit installation
73 + exeinto /usr/libexec
74 + doexe "${FILESDIR}"/mysqld-wait-ready
75 + systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
76 + systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
77 + dotmpfiles "${FILESDIR}/mysql.conf"
78 +
79 + insinto /etc/logrotate.d
80 + newins "${FILESDIR}/logrotate.mysql-2.3" "mysql"
81 +}
82 +
83 +pkg_postinst() {
84 + tmpfiles_process mysql.conf
85 + if use amd64 || use x86 ; then
86 + elog ""
87 + elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
88 + elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
89 + fi
90 +
91 + elog ""
92 + elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
93 + elog "You should prefer that unit over this package's mysqld.service."
94 + einfo ""
95 +}