summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2020-11-19 23:25:49 -0600
committerMatthew Thode <prometheanfire@gentoo.org>2020-11-19 23:25:49 -0600
commit422f427463814c35f597603c8b50bc492037251e (patch)
tree14e32a92f45fc52a802f819336119308d54c04ee /app-admin/puppet-agent
parentdev-python/python-swiftclient: fix tests (diff)
downloadgentoo-422f427463814c35f597603c8b50bc492037251e.tar.gz
gentoo-422f427463814c35f597603c8b50bc492037251e.tar.bz2
gentoo-422f427463814c35f597603c8b50bc492037251e.zip
app-admin/puppet-agent: use upstream tmpfiles
Closes: https://bugs.gentoo.org/753767 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Diffstat (limited to 'app-admin/puppet-agent')
-rw-r--r--app-admin/puppet-agent/files/puppet.initd229
-rw-r--r--app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild (renamed from app-admin/puppet-agent/puppet-agent-6.19.1.ebuild)4
2 files changed, 31 insertions, 2 deletions
diff --git a/app-admin/puppet-agent/files/puppet.initd2 b/app-admin/puppet-agent/files/puppet.initd2
new file mode 100644
index 000000000000..90ebd0481701
--- /dev/null
+++ b/app-admin/puppet-agent/files/puppet.initd2
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+PUPPET_PID_DIR="${PUPPET_PID_DIR:-/run/puppet}"
+
+pidfile="${PUPPET_PID_DIR}/puppet.pid"
+PUPPET_LOG_DIR="/var/log/puppetlabs/puppet"
+
+command="/usr/bin/puppet"
+extra_started_commands="reload"
+
+command_args="agent --pidfile ${pidfile} --confdir /etc/puppetlabs/puppet ${PUPPET_EXTRA_OPTS}"
+
+depend() {
+ need localmount
+ use dns logger puppetserver netmount nfsmount
+}
+
+start_pre() {
+ checkpath --directory --owner puppet:puppet "${PUPPET_PID_DIR}"
+ checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
+}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-admin/puppet-agent/puppet-agent-6.19.1.ebuild b/app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild
index d2a6b4ff967b..71f2744a5a5e 100644
--- a/app-admin/puppet-agent/puppet-agent-6.19.1.ebuild
+++ b/app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild
@@ -61,10 +61,10 @@ src_install() {
doins -r opt/*
fperms 0750 /opt/puppetlabs/puppet/cache
# init
- newinitd "${FILESDIR}/puppet.initd" puppet
+ newinitd "${FILESDIR}/puppet.initd2" puppet
systemd_dounit lib/systemd/system/puppet.service
systemd_dounit lib/systemd/system/pxp-agent.service
- systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
+ systemd_newtmpfilesd usr/lib/tmpfiles.d/puppet-agent.conf puppet-agent.conf
# symlinks
chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"