From 422f427463814c35f597603c8b50bc492037251e Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Thu, 19 Nov 2020 23:25:49 -0600 Subject: 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 --- app-admin/puppet-agent/files/puppet.initd2 | 29 +++++++++ .../puppet-agent/puppet-agent-6.19.1-r1.ebuild | 76 ++++++++++++++++++++++ app-admin/puppet-agent/puppet-agent-6.19.1.ebuild | 76 ---------------------- 3 files changed, 105 insertions(+), 76 deletions(-) create mode 100644 app-admin/puppet-agent/files/puppet.initd2 create mode 100644 app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild delete mode 100644 app-admin/puppet-agent/puppet-agent-6.19.1.ebuild (limited to 'app-admin/puppet-agent') 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-r1.ebuild b/app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild new file mode 100644 index 000000000000..71f2744a5a5e --- /dev/null +++ b/app-admin/puppet-agent/puppet-agent-6.19.1-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit eutils systemd unpacker + +DESCRIPTION="general puppet client utils along with hiera and facter" +HOMEPAGE="https://puppetlabs.com/" +SRC_URI="http://apt.puppetlabs.com/pool/focal/puppet/${PN:0:1}/${PN}/${PN}_${PV}-1focal_amd64.deb" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="puppetdb selinux" +RESTRICT="strip" + +CDEPEND="!app-admin/puppet + !dev-ruby/hiera + !dev-ruby/facter + !app-emulation/virt-what + acct-user/puppet + acct-group/puppet" + +DEPEND=" + ${CDEPEND} + app-admin/augeas" +RDEPEND="${CDEPEND} + app-portage/eix + sys-apps/dmidecode + sys-libs/libselinux + sys-libs/glibc + sys-libs/readline:0/8 + sys-libs/libxcrypt + sys-libs/ncurses:0[tinfo] + selinux? ( + sys-libs/libselinux[ruby] + sec-policy/selinux-puppet + ) + puppetdb? ( >=dev-ruby/puppetdb-termini-5.0.1 )" + +S=${WORKDIR} + +QA_PREBUILT="*" + +src_install() { + # conf.d + doconfd etc/default/puppet + doconfd etc/default/pxp-agent + # logrotate.d + insinto /etc/logrotate.d + doins etc/logrotate.d/pxp-agent + # puppet itself + insinto /etc/puppetlabs + doins -r etc/puppetlabs/* + # logdir for systemd + dodir var/log/puppetlabs/puppet/ + fperms 0750 var/log/puppetlabs/puppet/ + # the rest + insinto /opt + dodir opt/puppetlabs/puppet/cache + doins -r opt/* + fperms 0750 /opt/puppetlabs/puppet/cache + # init + newinitd "${FILESDIR}/puppet.initd2" puppet + systemd_dounit lib/systemd/system/puppet.service + systemd_dounit lib/systemd/system/pxp-agent.service + 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" + dosym ../../opt/puppetlabs/bin/facter /usr/bin/facter + dosym ../../opt/puppetlabs/bin/hiera /usr/bin/hiera + dosym ../../opt/puppetlabs/bin/puppet /usr/bin/puppet + dosym ../../opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what + dosym ../../../../usr/lib64/xcrypt/libcrypt.so.1 /opt/puppetlabs/puppet/lib/libcrypt.so.1 +} diff --git a/app-admin/puppet-agent/puppet-agent-6.19.1.ebuild b/app-admin/puppet-agent/puppet-agent-6.19.1.ebuild deleted file mode 100644 index d2a6b4ff967b..000000000000 --- a/app-admin/puppet-agent/puppet-agent-6.19.1.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit eutils systemd unpacker - -DESCRIPTION="general puppet client utils along with hiera and facter" -HOMEPAGE="https://puppetlabs.com/" -SRC_URI="http://apt.puppetlabs.com/pool/focal/puppet/${PN:0:1}/${PN}/${PN}_${PV}-1focal_amd64.deb" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64" -IUSE="puppetdb selinux" -RESTRICT="strip" - -CDEPEND="!app-admin/puppet - !dev-ruby/hiera - !dev-ruby/facter - !app-emulation/virt-what - acct-user/puppet - acct-group/puppet" - -DEPEND=" - ${CDEPEND} - app-admin/augeas" -RDEPEND="${CDEPEND} - app-portage/eix - sys-apps/dmidecode - sys-libs/libselinux - sys-libs/glibc - sys-libs/readline:0/8 - sys-libs/libxcrypt - sys-libs/ncurses:0[tinfo] - selinux? ( - sys-libs/libselinux[ruby] - sec-policy/selinux-puppet - ) - puppetdb? ( >=dev-ruby/puppetdb-termini-5.0.1 )" - -S=${WORKDIR} - -QA_PREBUILT="*" - -src_install() { - # conf.d - doconfd etc/default/puppet - doconfd etc/default/pxp-agent - # logrotate.d - insinto /etc/logrotate.d - doins etc/logrotate.d/pxp-agent - # puppet itself - insinto /etc/puppetlabs - doins -r etc/puppetlabs/* - # logdir for systemd - dodir var/log/puppetlabs/puppet/ - fperms 0750 var/log/puppetlabs/puppet/ - # the rest - insinto /opt - dodir opt/puppetlabs/puppet/cache - doins -r opt/* - fperms 0750 /opt/puppetlabs/puppet/cache - # init - newinitd "${FILESDIR}/puppet.initd" 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 - # symlinks - chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/" - chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper" - dosym ../../opt/puppetlabs/bin/facter /usr/bin/facter - dosym ../../opt/puppetlabs/bin/hiera /usr/bin/hiera - dosym ../../opt/puppetlabs/bin/puppet /usr/bin/puppet - dosym ../../opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what - dosym ../../../../usr/lib64/xcrypt/libcrypt.so.1 /opt/puppetlabs/puppet/lib/libcrypt.so.1 -} -- cgit v1.2.3-65-gdbad