commit: 0462b33e75b5061c6671edc5fabf89b53dd1e09f Author: Michael Seifert <mseifert <AT> error-reports <DOT> org> AuthorDate: Thu Mar 10 18:48:49 2016 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Wed Mar 30 12:03:13 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0462b33e
dev-util/buildbot: Added support for multiple service instances when using systemd. This commit adds support for starting multiple buildmaster instances using systemd. A service configuration file allows to specify the filesystem location of the buildmaster instances. A systemd target allows to start up or shut down all buildmaster instances at once. Gentoo-Bug: https://bugs.gentoo.org/570666 Closes: https://github.com/gentoo/gentoo/pull/1027 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> dev-util/buildbot/buildbot-0.8.12-r2.ebuild | 4 +++- dev-util/buildbot/files/buildmaster.target | 5 +++++ dev-util/buildbot/files/buildmaster_at.service | 16 ++++++++++++++++ dev-util/buildbot/files/buildmaster_at.service.conf | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild index 99f46ee..c20323b 100644 --- a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild +++ b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild @@ -82,7 +82,9 @@ src_install() { newconfd "${FILESDIR}/buildmaster.confd" buildmaster newinitd "${FILESDIR}/buildmaster.initd" buildmaster - systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dounit "${FILESDIR}/buildmaster.target" + systemd_newunit "${FILESDIR}/buildmaster_at.service" "[email protected]" + systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "[email protected]" readme.gentoo_create_doc } diff --git a/dev-util/buildbot/files/buildmaster.target b/dev-util/buildbot/files/buildmaster.target new file mode 100644 index 0000000..2bf1a36 --- /dev/null +++ b/dev-util/buildbot/files/buildmaster.target @@ -0,0 +1,5 @@ +[Unit] +Description=Buildbot target that allows to start or stop all buildmaster@*.service instances + +[Install] +WantedBy=multi-user.target diff --git a/dev-util/buildbot/files/buildmaster_at.service b/dev-util/buildbot/files/buildmaster_at.service new file mode 100644 index 0000000..88f9f57 --- /dev/null +++ b/dev-util/buildbot/files/buildmaster_at.service @@ -0,0 +1,16 @@ +[Unit] +Description=buildbot master daemon +After=local-fs.target network.target +PartOf=buildmaster.target + +[Service] +Environment=BASEDIR=/var/lib/buildmaster +Type=forking +User=buildbot +ExecStartPre=/usr/bin/buildbot checkconfig ${BASEDIR}/%i +ExecStart=/usr/bin/buildbot start ${BASEDIR}/%i +ExecStop=/usr/bin/buildbot stop ${BASEDIR}/%i + +[Install] +WantedBy=buildmaster.target + diff --git a/dev-util/buildbot/files/buildmaster_at.service.conf b/dev-util/buildbot/files/buildmaster_at.service.conf new file mode 100644 index 0000000..baf1ae7 --- /dev/null +++ b/dev-util/buildbot/files/buildmaster_at.service.conf @@ -0,0 +1,5 @@ +# Uncomment the following lines to configure the base directory for all buildmaster instances. + +#[Service] +#Environment=BASEDIR=/var/lib/buildmaster +
