Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/puppetserver/files/, app-admin/puppetserver/
Date: Mon, 23 Sep 2019 19:18:36
Message-Id: 1569266308.043d40cdb0aab8d973f675e2cf4bb853282e3b04.prometheanfire@gentoo
1 commit: 043d40cdb0aab8d973f675e2cf4bb853282e3b04
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 23 19:18:15 2019 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 23 19:18:28 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=043d40cd
7
8 app-admin/puppetserver: add missing class
9
10 prevented puppetserver from loading
11
12 Package-Manager: Portage-2.3.69, Repoman-2.3.17
13 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
14
15 app-admin/puppetserver/files/puppetserver.init-r1 | 72 ++++++++++++++++++++++
16 ...r-6.6.0.ebuild => puppetserver-6.6.0-r1.ebuild} | 2 +-
17 2 files changed, 73 insertions(+), 1 deletion(-)
18
19 diff --git a/app-admin/puppetserver/files/puppetserver.init-r1 b/app-admin/puppetserver/files/puppetserver.init-r1
20 new file mode 100644
21 index 00000000000..2b7665d901a
22 --- /dev/null
23 +++ b/app-admin/puppetserver/files/puppetserver.init-r1
24 @@ -0,0 +1,72 @@
25 +#!/sbin/openrc-run
26 +# Copyright 1999-2019 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +extra_commands="checkconfig reload"
30 +
31 +LOGDIR="/var/log/puppetlabs/puppetserver"
32 +RUNDIR="/run/puppetlabs/puppetserver"
33 +
34 +checkconfig() {
35 + if [ ! -x $JAVA_BIN ]; then
36 + eerror "Missing JAVA_BIN."
37 + eend 1
38 + fi
39 + if [ ! -d $INSTALL_DIR ]; then
40 + eerror "Missing INSTALL_DIR."
41 + eend 1
42 + fi
43 + if [ ! -e $BOOTSTRAP_CONFIG ]; then
44 + eerror "Missing BOOTSTRAP_CONFIG."
45 + eend 1
46 + fi
47 + if [ ! -e $CONFIG ]; then
48 + eerror "Missing CONFIG."
49 + eend 1
50 + fi
51 + if [ ! -n $USER ]; then
52 + eerror "Missing USER."
53 + eend 1
54 + fi
55 + if [ ! -n $GROUP ]; then
56 + eerror "Missing GROUP."
57 + eend 1
58 + fi
59 +
60 + checkpath -d -m 0755 "${LOGDIR%/*}"
61 + checkpath -d -m 0755 "${RUNDIR%/*}"
62 + checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
63 + checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"
64 +
65 + PUPPETSERVER_ARGS="-Djava.security.egd=/dev/urandom -XX:OnOutOfMemoryError=\"kill -9 %p\" -cp ${INSTALL_DIR}/puppet-server-release.jar:${INSTALL_DIR}/jruby-1_7.jar:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.jar clojure.main -m puppetlabs.trapperkeeper.main"
66 + PUPPETSERVER_OPTS="--config /etc/puppetlabs/puppetserver/conf.d --bootstrap-config ${BOOTSTRAP_CONFIG} --restart-file /opt/puppetlabs/server/data/puppetserver/restartcounter"
67 + EXEC="${JAVA_BIN} ${JAVA_ARGS} ${PUPPETSERVER_ARGS} ${PUPPETSERVER_OPTS}"
68 +}
69 +
70 +start() {
71 + checkconfig || return 1
72 +
73 + ebegin "Starting Puppet Server"
74 + start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
75 + -m --pidfile "${RUNDIR}/puppetserver.pid" \
76 + -b --exec "/bin/bash" \
77 + -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
78 + local retval=$?
79 + if [ $retval -ne 0 ]; then
80 + ewarn "Error starting puppetserver."
81 + fi
82 + eend $retval
83 +}
84 +
85 +stop() {
86 + ebegin "Stopping Puppet Server"
87 + start-stop-daemon --stop --pidfile "${RUNDIR}/puppetserver.pid"
88 + eend $?
89 +}
90 +
91 +reload() {
92 + ebegin "Reloading Puppet Server"
93 + start-stop-daemon --signal HUP --pidfile "${RUNDIR}/puppetserver.pid"
94 + eend $?
95 +}
96 +
97
98 diff --git a/app-admin/puppetserver/puppetserver-6.6.0.ebuild b/app-admin/puppetserver/puppetserver-6.6.0-r1.ebuild
99 similarity index 98%
100 rename from app-admin/puppetserver/puppetserver-6.6.0.ebuild
101 rename to app-admin/puppetserver/puppetserver-6.6.0-r1.ebuild
102 index 1b0b26fd739..45ac7ad8e73 100644
103 --- a/app-admin/puppetserver/puppetserver-6.6.0.ebuild
104 +++ b/app-admin/puppetserver/puppetserver-6.6.0-r1.ebuild
105 @@ -96,7 +96,7 @@ src_install() {
106 newins ext/default puppetserver
107 # normal init type tasks
108 dosym ../default/puppetserver /etc/conf.d/puppetserver
109 - newinitd "${FILESDIR}/puppetserver.init" puppetserver
110 + newinitd "${FILESDIR}/puppetserver.init-r1" puppetserver
111 # misc
112 insinto /etc/logrotate.d
113 newins ext/puppetserver.logrotate.conf puppetserver