From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 71E97138CCF for ; Thu, 14 May 2015 02:25:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60FF8E087F; Thu, 14 May 2015 02:25:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EDD90E087F for ; Thu, 14 May 2015 02:25:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 09E69340BA7 for ; Thu, 14 May 2015 02:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C8C2F9DF for ; Thu, 14 May 2015 02:25:45 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1431570329.6c32023dd3eba7c3d55ed30457487074c1bd2bb5.grknight@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: dev-db/mysql-init-scripts/, dev-db/mysql-init-scripts/files/ X-VCS-Repository: proj/mysql X-VCS-Files: dev-db/mysql-init-scripts/files/log-s6 dev-db/mysql-init-scripts/files/run-s6 dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha1.ebuild dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha2.ebuild X-VCS-Directories: dev-db/mysql-init-scripts/files/ dev-db/mysql-init-scripts/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 6c32023dd3eba7c3d55ed30457487074c1bd2bb5 X-VCS-Branch: master Date: Thu, 14 May 2015 02:25:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f37a3286-9a4c-4607-8228-3ed21e083f3c X-Archives-Hash: a514202ef053f53e2751b74ba24744c2 commit: 6c32023dd3eba7c3d55ed30457487074c1bd2bb5 Author: Brian Evans gentoo org> AuthorDate: Thu May 14 02:25:29 2015 +0000 Commit: Brian Evans gentoo org> CommitDate: Thu May 14 02:25:29 2015 +0000 URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=6c32023d Version bump to mark openrc move and add logging support dev-db/mysql-init-scripts/files/log-s6 | 12 ++++ dev-db/mysql-init-scripts/files/run-s6 | 2 +- .../mysql-init-scripts-2.1_alpha1.ebuild | 77 ---------------------- .../mysql-init-scripts-2.1_alpha2.ebuild | 56 ++++++++++++++++ 4 files changed, 69 insertions(+), 78 deletions(-) diff --git a/dev-db/mysql-init-scripts/files/log-s6 b/dev-db/mysql-init-scripts/files/log-s6 new file mode 100644 index 0000000..dca71a8 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/log-s6 @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +SVCNAME=$(cd `dirname $0` && pwd | awk -F/ '{ print $--NF }' ) +mkdir -p "/var/log/mysql/${SVCNAME}" +if [ ${S6_LOG_OPTIONS} ] ; then + exec s6-log ${S6_LOG_OPTIONS} +else + exec s6-log -b n20 S15000000 T !"gzip -nq9" "/var/log/mysql/${SVCNAME}" +fi diff --git a/dev-db/mysql-init-scripts/files/run-s6 b/dev-db/mysql-init-scripts/files/run-s6 index 64a89c7..a9615a1 100644 --- a/dev-db/mysql-init-scripts/files/run-s6 +++ b/dev-db/mysql-init-scripts/files/run-s6 @@ -15,4 +15,4 @@ source "${ROOT:-/}etc/conf.d/${SVCNAME}" MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" basedir=$(get_config "${MY_CNF}" basedir | tail -n1) -exec s6-notifywhenup -t ${STARTUP_TIMEOUT:-900} "${basedir}"/sbin/mysqld --defaults-file="${MY_CNF}" ${MY_ARGS} +exec "${basedir}"/sbin/mysqld --defaults-file="${MY_CNF}" ${MY_ARGS} 2>&1 diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha1.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha1.ebuild deleted file mode 100644 index 232246d..0000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha1.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -inherit systemd - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="http://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="s6" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc for the save_options/get_options builtins. -RDEPEND=" - !=sys-apps/openrc-0.16 sys-apps/s6 ) - " -# 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" - if use s6 ; then - newinitd "${FILESDIR}/init.d-s6" "mysql" - exeinto /etc/svc.d/mysql - newexe "${FILESDIR}/run-s6" "run" - else - newinitd "${FILESDIR}/init.d-2.0" "mysql" - fi - - # systemd unit installation - exeinto /usr/libexec - doexe "${FILESDIR}"/mysqld-wait-ready - systemd_dounit "${FILESDIR}/mysqld.service" - systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" - systemd_dotmpfilesd "${FILESDIR}/mysql.conf" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} - -pkg_postinst() { - grep -sq mysql_slot "${ROOT}"/etc/conf.d/mysql - old_conf_present=$? - grep -sq get_slot_config "${ROOT}"/etc/init.d/mysql - old_init_present=$? - - egrep -sq 'MY_CNF|MY_ARGS|(STARTUP|STOP)_TIMEOUT' "${ROOT}"/etc/conf.d/mysql - new_conf_present=$? - egrep -sq 'MY_ARGS|STOP_TIMEOUT' "${ROOT}"/etc/init.d/mysql - new_init_present=$? - - einfo "Please note that if you are using multiple internal 'slots' in the" - einfo "old conf.d file, you should use multiple init files now." - echo old $old_conf_present $old_init_present - echo new $new_conf_present $new_init_present - - # new scripts present - if [ $new_conf_present -eq 0 -a $new_init_present -eq 0 -a \ - $old_conf_present -eq 1 -a $old_init_present -eq 1 ]; then - : - elif [ $old_conf_present -eq 0 -a $old_init_present -eq 0 -a \ - $new_conf_present -eq 1 -a $new_init_present -eq 1 ]; then - ewarn "Old /etc/init.d/mysql and /etc/conf.d/mysql still present!" - ewarn "Update both of those files to the new versions!" - else - eerror "DANGER, mixed update of /etc/init.d/mysql and /etc/conf.d/mysql" - eerror "detected! You must update BOTH to the new versions" - fi -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha2.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha2.ebuild new file mode 100644 index 0000000..b8fcf01 --- /dev/null +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit systemd + +DESCRIPTION="Gentoo MySQL init scripts." +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="s6" + +DEPEND="" +# This _will_ break with MySQL 5.0, 4.x, 3.x +# It also NEEDS openrc for the save_options/get_options builtins. +RDEPEND=" + !=sys-apps/openrc-0.16.1 sys-apps/s6 ) + " +# 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" + if use s6 ; then + newinitd "${FILESDIR}/init.d-s6" "mysql" + exeinto /var/svc.d/mysql + newexe "${FILESDIR}/run-s6" "run" + exeinto /var/svc.d/mysql/log + newexe "${FILESDIR}/log-s6" "run" + else + newinitd "${FILESDIR}/init.d-2.0" "mysql" + fi + + # systemd unit installation + exeinto /usr/libexec + doexe "${FILESDIR}"/mysqld-wait-ready + systemd_dounit "${FILESDIR}/mysqld.service" + systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" + systemd_dotmpfilesd "${FILESDIR}/mysql.conf" + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate.mysql" "mysql" +} + +pkg_postinst() { + if use s6 ; then + einfo "If you wish to use s6 logging support, " + einfo "comment out the log-error setting in your my.cnf" + fi +}