From: Michael Seifert Date: Thu, 10 Mar 2016 18:48:49 +0000 (+0100) Subject: dev-util/buildbot: Added support for multiple service instances when using systemd. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0462b33e75b5061c6671edc5fabf89b53dd1e09f;p=gentoo.git 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 --- diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild index 99f46ee2bb01..c20323b55094 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" "buildmaster@.service" + systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service" 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 000000000000..2bf1a361e6b0 --- /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 000000000000..88f9f5712002 --- /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 000000000000..baf1ae74ec08 --- /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 +