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 }