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 3D88C59CAA for ; Wed, 30 Mar 2016 12:18:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB61021C022; Wed, 30 Mar 2016 12:18:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0443C21C026 for ; Wed, 30 Mar 2016 12:18:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FC1F340CCB for ; Wed, 30 Mar 2016 12:18:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 84B7A86E for ; Wed, 30 Mar 2016 12:18:10 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1459339420.af7e5e8ac24a8c425a500b441474f86c0aebf148.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/buildbot/buildbot-0.8.12-r2.ebuild X-VCS-Directories: dev-util/buildbot/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: af7e5e8ac24a8c425a500b441474f86c0aebf148 X-VCS-Branch: master Date: Wed, 30 Mar 2016 12:18:10 +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: 2e9060e7-6efc-493c-aeff-921c4488d2e5 X-Archives-Hash: 852b73ad6701df6bcd17b4da914cbadc commit: af7e5e8ac24a8c425a500b441474f86c0aebf148 Author: Michael Seifert error-reports org> AuthorDate: Tue Mar 22 18:33:20 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Wed Mar 30 12:03:40 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af7e5e8a dev-util/buildbot: Added pkg_config. buildbot-0.8.12-r2 supports the use of emerge --config to create instances of buildmaster. Closes: https://github.com/gentoo/gentoo/pull/1027 Signed-off-by: Patrice Clement gentoo.org> dev-util/buildbot/buildbot-0.8.12-r2.ebuild | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild index f7304091..1df4422 100644 --- a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild +++ b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild @@ -101,3 +101,35 @@ pkg_postinst() { elog "your old config and the new code." fi } + +pkg_config() { + local buildmaster_path="/var/lib/buildmaster" + einfo "This will prepare a new buildmaster instance in ${buildmaster_path}." + einfo "Press Control-C to abort." + + einfo "Enter the name for the new instance: " + read instance_name + [[ -z "${instance_name}" ]] && die "Invalid instance name" + + local instance_path="${buildmaster_path}/${instance_name}" + if [[ -e "${instance_path}" ]]; then + eerror "The instance with the specified name already exists:" + eerror "${instance_path}" + die "Instance already exists" + fi + + local buildbot="/usr/bin/buildbot" + if [[ ! -d "${buildmaster_path}" ]]; then + mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}" + fi + "${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed" + chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed" + mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \ + || die "Moving sample configuration failed" + ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \ + || die "Unable to create link to init file" + + einfo "Successfully created a buildmaster instance at ${instance_path}." + einfo "To change the default settings edit the master.cfg file in this directory." +} +