Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-init-scripts/, dev-db/mysql-init-scripts/files/
Date: Wed, 24 Jan 2018 21:55:55
Message-Id: 1516830936.a51d8843bdf6d39c7964abac3b751f658ed4a078.grknight@gentoo
1 commit: a51d8843bdf6d39c7964abac3b751f658ed4a078
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 24 21:50:44 2018 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 24 21:55:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a51d8843
7
8 dev-db/mysql-init-scripts: Add 'keyword -timeout'
9
10 It may take longer than 60 seconds to startup. Let the script
11 handle any timeouts.
12
13 Package-Manager: Portage-2.3.20, Repoman-2.3.6
14
15 dev-db/mysql-init-scripts/files/init.d-2.2 | 5 +-
16 .../mysql-init-scripts-2.2-r3.ebuild | 64 ++++++++++++++++++++++
17 2 files changed, 68 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-db/mysql-init-scripts/files/init.d-2.2 b/dev-db/mysql-init-scripts/files/init.d-2.2
20 index f6ad52496e4..5603f9e6031 100644
21 --- a/dev-db/mysql-init-scripts/files/init.d-2.2
22 +++ b/dev-db/mysql-init-scripts/files/init.d-2.2
23 @@ -1,5 +1,5 @@
24 #!/sbin/openrc-run
25 -# Copyright 1999-2017 Gentoo Foundation
26 +# Copyright 1999-2018 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28
29 extra_commands="checkconfig"
30 @@ -12,6 +12,9 @@ depend() {
31 use net.lo
32 # localmount needed for $basedir
33 need localmount
34 + # This service has its own timeout and may need to wait for repairs
35 + # or remote synchronization
36 + keyword -timeout
37 }
38
39 get_config() {
40
41 diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild
42 new file mode 100644
43 index 00000000000..f405a38a67f
44 --- /dev/null
45 +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r3.ebuild
46 @@ -0,0 +1,64 @@
47 +# Copyright 1999-2018 Gentoo Foundation
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=6
51 +
52 +inherit systemd s6
53 +
54 +DESCRIPTION="Gentoo MySQL init scripts."
55 +HOMEPAGE="https://www.gentoo.org/"
56 +SRC_URI=""
57 +
58 +LICENSE="GPL-2"
59 +SLOT="0"
60 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
61 +IUSE=""
62 +
63 +DEPEND=""
64 +# This _will_ break with MySQL 5.0, 4.x, 3.x
65 +# It also NEEDS openrc for the save_options/get_options builtins.
66 +# The s6 support was added after openrc 0.16.2
67 +RDEPEND="
68 + !<dev-db/mysql-5.1
69 + !<sys-apps/openrc-0.16.2
70 + "
71 +# Need to set S due to PMS saying we need it existing, but no SRC_URI
72 +S=${WORKDIR}
73 +
74 +src_install() {
75 + newconfd "${FILESDIR}/conf.d-2.0" "mysql"
76 +
77 + # s6 init scripts
78 + if use amd64 || use x86 ; then
79 + newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
80 + newinitd "${FILESDIR}/init.d-s6-2.2" "mysql-s6"
81 + s6_install_service mysql "${FILESDIR}/run-s6"
82 + s6_install_service mysql/log "${FILESDIR}/log-s6"
83 + fi
84 +
85 + newinitd "${FILESDIR}/init.d-2.2" "mysql"
86 + newinitd "${FILESDIR}/init.d-supervise" "mysql-supervise"
87 +
88 + # systemd unit installation
89 + exeinto /usr/libexec
90 + doexe "${FILESDIR}"/mysqld-wait-ready
91 + systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
92 + systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
93 + systemd_dotmpfilesd "${FILESDIR}/mysql.conf"
94 +
95 + insinto /etc/logrotate.d
96 + newins "${FILESDIR}/logrotate.mysql" "mysql"
97 +}
98 +
99 +pkg_postinst() {
100 + if use amd64 || use x86 ; then
101 + elog ""
102 + elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
103 + elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
104 + fi
105 +
106 + elog ""
107 + elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
108 + elog "You should prefer that unit over this package's mysqld.service."
109 + einfo ""
110 +}