1 |
commit: 0462b33e75b5061c6671edc5fabf89b53dd1e09f |
2 |
Author: Michael Seifert <mseifert <AT> error-reports <DOT> org> |
3 |
AuthorDate: Thu Mar 10 18:48:49 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 12:03:13 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0462b33e |
7 |
|
8 |
dev-util/buildbot: Added support for multiple service instances when using systemd. |
9 |
|
10 |
This commit adds support for starting multiple buildmaster instances using |
11 |
systemd. A service configuration file allows to specify the filesystem location |
12 |
of the buildmaster instances. A systemd target allows to start up or shut down |
13 |
all buildmaster instances at once. |
14 |
|
15 |
Gentoo-Bug: https://bugs.gentoo.org/570666 |
16 |
Closes: https://github.com/gentoo/gentoo/pull/1027 |
17 |
|
18 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
19 |
|
20 |
dev-util/buildbot/buildbot-0.8.12-r2.ebuild | 4 +++- |
21 |
dev-util/buildbot/files/buildmaster.target | 5 +++++ |
22 |
dev-util/buildbot/files/buildmaster_at.service | 16 ++++++++++++++++ |
23 |
dev-util/buildbot/files/buildmaster_at.service.conf | 5 +++++ |
24 |
4 files changed, 29 insertions(+), 1 deletion(-) |
25 |
|
26 |
diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild |
27 |
index 99f46ee..c20323b 100644 |
28 |
--- a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild |
29 |
+++ b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild |
30 |
@@ -82,7 +82,9 @@ src_install() { |
31 |
|
32 |
newconfd "${FILESDIR}/buildmaster.confd" buildmaster |
33 |
newinitd "${FILESDIR}/buildmaster.initd" buildmaster |
34 |
- systemd_dounit "${FILESDIR}"/${PN}.service |
35 |
+ systemd_dounit "${FILESDIR}/buildmaster.target" |
36 |
+ systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service" |
37 |
+ systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service" |
38 |
|
39 |
readme.gentoo_create_doc |
40 |
} |
41 |
|
42 |
diff --git a/dev-util/buildbot/files/buildmaster.target b/dev-util/buildbot/files/buildmaster.target |
43 |
new file mode 100644 |
44 |
index 0000000..2bf1a36 |
45 |
--- /dev/null |
46 |
+++ b/dev-util/buildbot/files/buildmaster.target |
47 |
@@ -0,0 +1,5 @@ |
48 |
+[Unit] |
49 |
+Description=Buildbot target that allows to start or stop all buildmaster@*.service instances |
50 |
+ |
51 |
+[Install] |
52 |
+WantedBy=multi-user.target |
53 |
|
54 |
diff --git a/dev-util/buildbot/files/buildmaster_at.service b/dev-util/buildbot/files/buildmaster_at.service |
55 |
new file mode 100644 |
56 |
index 0000000..88f9f57 |
57 |
--- /dev/null |
58 |
+++ b/dev-util/buildbot/files/buildmaster_at.service |
59 |
@@ -0,0 +1,16 @@ |
60 |
+[Unit] |
61 |
+Description=buildbot master daemon |
62 |
+After=local-fs.target network.target |
63 |
+PartOf=buildmaster.target |
64 |
+ |
65 |
+[Service] |
66 |
+Environment=BASEDIR=/var/lib/buildmaster |
67 |
+Type=forking |
68 |
+User=buildbot |
69 |
+ExecStartPre=/usr/bin/buildbot checkconfig ${BASEDIR}/%i |
70 |
+ExecStart=/usr/bin/buildbot start ${BASEDIR}/%i |
71 |
+ExecStop=/usr/bin/buildbot stop ${BASEDIR}/%i |
72 |
+ |
73 |
+[Install] |
74 |
+WantedBy=buildmaster.target |
75 |
+ |
76 |
|
77 |
diff --git a/dev-util/buildbot/files/buildmaster_at.service.conf b/dev-util/buildbot/files/buildmaster_at.service.conf |
78 |
new file mode 100644 |
79 |
index 0000000..baf1ae7 |
80 |
--- /dev/null |
81 |
+++ b/dev-util/buildbot/files/buildmaster_at.service.conf |
82 |
@@ -0,0 +1,5 @@ |
83 |
+# Uncomment the following lines to configure the base directory for all buildmaster instances. |
84 |
+ |
85 |
+#[Service] |
86 |
+#Environment=BASEDIR=/var/lib/buildmaster |
87 |
+ |