public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-init-scripts/files/, dev-db/mysql-init-scripts/
Date: Sat, 30 Jan 2016 02:33:14 +0000 (UTC)	[thread overview]
Message-ID: <1454121181.c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720.grknight@gentoo> (raw)

commit:     c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 30 02:33:01 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 02:33:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3bf8ff2

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

 dev-db/mysql-init-scripts/files/mysqld-v2.service  | 27 ++++++++++
 .../mysql-init-scripts/files/mysqld_at-v2.service  | 26 ++++++++++
 .../mysql-init-scripts-2.1_rc1.ebuild              | 58 ++++++++++++++++++++++
 3 files changed, 111 insertions(+)

diff --git a/dev-db/mysql-init-scripts/files/mysqld-v2.service b/dev-db/mysql-init-scripts/files/mysqld-v2.service
new file mode 100644
index 0000000..12f7731
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysqld-v2.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=MySQL database server
+After=syslog.target
+After=network.target
+Conflicts=mariadb.service
+
+[Service]
+Type=simple
+User=mysql
+Group=mysql
+
+# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
+# https://bugzilla.redhat.com/show_bug.cgi?id=547485
+ExecStart=/usr/sbin/mysqld --basedir=/usr
+ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# We rely on systemd, not mysqld_safe, to restart mysqld if it dies
+Restart=always
+
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target

diff --git a/dev-db/mysql-init-scripts/files/mysqld_at-v2.service b/dev-db/mysql-init-scripts/files/mysqld_at-v2.service
new file mode 100644
index 0000000..4c6a8ca
--- /dev/null
+++ b/dev-db/mysql-init-scripts/files/mysqld_at-v2.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=MySQL database server
+ConditionPathExists=/etc/mysql/my%I.cnf
+After=network.target
+
+[Service]
+Type=simple
+User=mysql
+Group=mysql
+
+# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
+# https://bugzilla.redhat.com/show_bug.cgi?id=547485
+ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr
+ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# We rely on systemd, not mysqld_safe, to restart mysqld if it dies
+Restart=always
+
+# Place temp files in a secure directory, not /tmp
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target

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 0000000..b47641d
--- /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
+}


             reply	other threads:[~2016-01-30  2:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30  2:33 Brian Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-20 16:34 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-init-scripts/files/, dev-db/mysql-init-scripts/ Brian Evans
2017-07-23 22:39 Brian Evans
2017-07-26 13:20 Brian Evans
2017-10-31 16:09 Brian Evans
2018-01-24 21:55 Brian Evans
2019-03-05 21:28 Brian Evans
2019-08-28 14:43 Thomas Deutschmann
2019-08-28 14:43 Thomas Deutschmann
2022-12-04 20:23 Louis Sautier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454121181.c3bf8ff29ade3fd7eba1f1ca98a96d70558b3720.grknight@gentoo \
    --to=grknight@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox