diff options
author | Michael Seifert <mseifert@error-reports.org> | 2016-03-22 19:33:20 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-03-30 12:03:40 +0000 |
commit | af7e5e8ac24a8c425a500b441474f86c0aebf148 (patch) | |
tree | e20df950df9e61b499f1c135898068f5ed04b09e /dev-util/buildbot | |
parent | dev-util/buildbot: Version migration elog message not displayed on fresh inst... (diff) | |
download | gentoo-af7e5e8ac24a8c425a500b441474f86c0aebf148.tar.gz gentoo-af7e5e8ac24a8c425a500b441474f86c0aebf148.tar.bz2 gentoo-af7e5e8ac24a8c425a500b441474f86c0aebf148.zip |
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 <monsieurp@gentoo.org>
Diffstat (limited to 'dev-util/buildbot')
-rw-r--r-- | dev-util/buildbot/buildbot-0.8.12-r2.ebuild | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild index f7304091b1ed..1df44223ed9b 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." +} + |