diff options
| author | Przemyslaw Pawelczyk <przemoc@zoho.com> | 2016-06-17 03:47:31 +0200 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-06-20 13:35:25 +0000 |
| commit | 6c0e846e12e780a2f46f3179ef9e6cdd3a413bbb (patch) | |
| tree | dc65e6b19405e90013f06a6d7949c146e809a9c9 /testing/buildbot/buildmaster.initd | |
| parent | 071c1400c272c0f381651a0dc9b181ab0abfc1fc (diff) | |
| download | aports-6c0e846e12e780a2f46f3179ef9e6cdd3a413bbb.tar.bz2 aports-6c0e846e12e780a2f46f3179ef9e6cdd3a413bbb.tar.xz | |
testing/buildbot: Fix some stuff.
* APKBUILD: Leverage default_prepare and use builddir (no _).
* APKBUILD: Introduce some constants for better DRY-ness,
reformat package() function, create there a workdir
(otherwise buildbot won't start).
* buildmaster.initd: Put openrc-run in shebang.
Add create command, which is a wrapper around
`buildbot create-master -r $BASEDIR`.
It has not been truly tested, but at least it starts now if you perform
following command before starting buildmaster:
/etc/init.d/buildmaster create
Diffstat (limited to 'testing/buildbot/buildmaster.initd')
| -rw-r--r-- | testing/buildbot/buildmaster.initd | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/testing/buildbot/buildmaster.initd b/testing/buildbot/buildmaster.initd index 313365f3a6..05c1a10104 100644 --- a/testing/buildbot/buildmaster.initd +++ b/testing/buildbot/buildmaster.initd @@ -1,8 +1,9 @@ -#!/sbin/runscript +#!/sbin/openrc-run # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 extra_started_commands="reload" +extra_stopped_commands="create" depend() { need net @@ -52,3 +53,17 @@ reload() { "${BASEDIR}"/buildmaster.pid eend $? } + +create() { + if [ -e "${BASEDIR}"/buildbot.tac -o -e "${BASEDIR}"/master.cfg ]; then + eerror "${BASEDIR} already contains buildbot.tac or master.cfg" + return 1 + fi + ebegin "Creating buildmaster in ${BASEDIR}" + start-stop-daemon -u "${USERNAME}" \ + --exec /usr/bin/buildbot \ + -- create-master -r "${BASEDIR}" + mv "${BASEDIR}"/master.cfg.sample "${BASEDIR}"/master.cfg + ewarn "Remember to customize exemplary master.cfg in ${BASEDIR}" + eend $? +} |
