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] proj/mysql:master commit in: dev-db/mysql-init-scripts/files/, dev-db/mysql-init-scripts/
Date: Tue,  9 Jun 2015 16:17:39 +0000 (UTC)	[thread overview]
Message-ID: <1433866761.0f9b07f83dce8c4008c86746791f088695eaae41.grknight@gentoo> (raw)

commit:     0f9b07f83dce8c4008c86746791f088695eaae41
Author:     layman <layman <AT> localhost>
AuthorDate: Tue Jun  9 16:19:21 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jun  9 16:19:21 2015 +0000
URL:        https://gitweb.gentoo.org/proj/mysql.git/commit/?id=0f9b07f8

Version bump

 dev-db/mysql-init-scripts/files/init.d-s6          | 23 ++++++++++++----------
 ...ebuild => mysql-init-scripts-2.1_alpha4.ebuild} | 17 ++++++++--------
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/dev-db/mysql-init-scripts/files/init.d-s6 b/dev-db/mysql-init-scripts/files/init.d-s6
index f856e1d..07242d8 100644
--- a/dev-db/mysql-init-scripts/files/init.d-s6
+++ b/dev-db/mysql-init-scripts/files/init.d-s6
@@ -16,11 +16,11 @@ get_config() {
 
 mysql_svcname() {
 	local ebextra=
-	case "${SVCNAME}" in
+	case "${svc_name}" in
 		mysql*) ;;
 		*) ebextra=" (mysql)" ;;
 	esac
-	echo "${SVCNAME}${ebextra}"
+	echo "${svc_name}${ebextra}"
 }
 
 extra_commands="checkconfig"
@@ -28,12 +28,14 @@ supervisor=s6
 name=$(mysql_svcname)
 s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))"
 #s6_svwait_options_start="-U -t $((1000*${STARTUP_EARLY_TIMEOUT:-1000}))"
+svc_name=${RC_SVCNAME%-s6}
+s6_service_path=/var/svc.d/${svc_name}
 
 start_pre() {
 	# Check the config or die
 	checkconfig || return 1
 
-	MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+	MY_CNF="${MY_CNF:-/etc/${svc_name}/my.cnf}"
 
 	if [ ! -r "${MY_CNF}" ] ; then
 		eerror "Cannot read the configuration file \`${MY_CNF}'"
@@ -80,12 +82,13 @@ start_pre() {
 	fi
 
 	# Prepare env files to source
-	mkdir -p "/var/svc.d/${SVCNAME}"
-	echo "MY_CNF=\"${MY_CNF}\"" > "/var/svc.d/${SVCNAME}/env"
-	echo "MY_ARGS=\"${MY_ARGS}\"" >> "/var/svc.d/${SVCNAME}/env"
-	echo "basedir=\"${basedir}\"" >> "/var/svc.d/${SVCNAME}/env"
-	mkdir -p "/var/svc.d/${SVCNAME}/log"
-	echo "SVCNAME=\"${SVCNAME}\"" > "/var/svc.d/${SVCNAME}/log/env"
+	mkdir -p "/var/svc.d/${svc_name}"
+	echo "MY_CNF=\"${MY_CNF}\"" > "/var/svc.d/${svc_name}/env"
+	echo "MY_ARGS=\"${MY_ARGS}\"" >> "/var/svc.d/${svc_name}/env"
+	echo "basedir=\"${basedir}\"" >> "/var/svc.d/${svc_name}/env"
+	mkdir -p "/var/svc.d/${svc_name}/log"
+	echo "SVCNAME=\"${SVCNAME}\"" > "/var/svc.d/${svc_name}/log/env"
+	echo "S6_LOG_OPTIONS=\"${S6_LOG_OPTIONS}\"" > "/var/svc.d/${svc_name}/log/env"
 }
 
 start_post() {
@@ -100,7 +103,7 @@ start_post() {
 }
 
 checkconfig() {
-	local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}"
+	local my_cnf="${MY_CNF:-/etc/${svc_name}/my.cnf}"
 	local basedir=$(get_config "${my_cnf}" basedir | tail -n1)
 	local svc_name=$(mysql_svcname)
 	ebegin "Checking mysqld configuration for ${svc_name}"

diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha3.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild
similarity index 77%
rename from dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha3.ebuild
rename to dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild
index 34eae3b..a3e37d3 100644
--- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha3.ebuild
+++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild
@@ -1,10 +1,10 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha3.ebuild,v 1.1 2015/05/27 21:01:03 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild,v 1.1 2015/06/09 16:16:26 grknight Exp $
 
 EAPI=5
 
-inherit systemd
+inherit systemd s6
 
 DESCRIPTION="Gentoo MySQL init scripts."
 HOMEPAGE="http://www.gentoo.org/"
@@ -33,10 +33,8 @@ src_install() {
 	if use amd64 || use x86 ; then
 		newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
 		newinitd "${FILESDIR}/init.d-s6" "mysql-s6"
-		exeinto /var/svc.d/mysql-s6
-		newexe "${FILESDIR}/run-s6" "run"
-		exeinto /var/svc.d/mysql-s6/log
-		newexe "${FILESDIR}/log-s6" "run"
+		s6_install_service mysql "${FILESDIR}/run-s6"
+		s6_install_service mysql/log "${FILESDIR}/log-s6"
 	fi
 
 	newinitd "${FILESDIR}/init.d-2.0" "mysql"
@@ -53,7 +51,8 @@ src_install() {
 }
 
 pkg_postinst() {
-	einfo "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
-	einfo "If you wish to use s6 logging support, "
-	einfo "comment out the log-error setting in your my.cnf"
+	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:[~2015-06-09 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 16:17 Brian Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-14 18:23 [gentoo-commits] proj/mysql:master commit in: dev-db/mysql-init-scripts/files/, dev-db/mysql-init-scripts/ Brian Evans
2015-05-12 19:39 Brian Evans
2014-08-19  0:34 Brian Evans
2014-08-06  3:20 Brian Evans

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=1433866761.0f9b07f83dce8c4008c86746791f088695eaae41.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