summaryrefslogtreecommitdiff
path: root/app-admin/puppetserver
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/puppetserver
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/puppetserver')
-rw-r--r--app-admin/puppetserver/Manifest10
-rw-r--r--app-admin/puppetserver/files/puppetserver.init72
-rw-r--r--app-admin/puppetserver/files/puppetserver.initd71
-rw-r--r--app-admin/puppetserver/metadata.xml14
-rw-r--r--app-admin/puppetserver/puppetserver-2.8.0.ebuild113
-rw-r--r--app-admin/puppetserver/puppetserver-5.0.0-r1.ebuild129
-rw-r--r--app-admin/puppetserver/puppetserver-5.0.0-r2.ebuild130
7 files changed, 539 insertions, 0 deletions
diff --git a/app-admin/puppetserver/Manifest b/app-admin/puppetserver/Manifest
new file mode 100644
index 000000000000..ddf125acf98a
--- /dev/null
+++ b/app-admin/puppetserver/Manifest
@@ -0,0 +1,10 @@
+AUX puppetserver.init 2138 SHA256 d0beb6010d75aa355662bacc11f122823725ee36cb925606962d750cd6c6bbdc SHA512 50e78feda08e06a16290f90b7d593653c7fe2e98efdfc8cc7cc4a85a5be528e8bc585b934330f3a87b6f038311942fd8bc6d73f0538069d7b132dd3a64e23f11 WHIRLPOOL 7ff953601ecd6e23ea2578fd70b5553bb25149e2bb6620f4607d686959e9c52f9d79bdc607438a1a7cbf081fd03ee46ae61385c6690836b534fc4c5a7937ef4b
+AUX puppetserver.initd 2021 SHA256 6765d45ca5cd20ddc3f7fc784216a9cd0453575077e7ebfa8c4cdc0ca22d6b23 SHA512 e219da1099bb4183f5b835b93d414a0c3181332e6e898d14cfdaa6e7347c98d23b01b98ed0995e60ab37c755c407d90ee2ad73dc7e63488c9922f62d569d89c6 WHIRLPOOL 347416638227bd122e03f2e8adfe175597ddb298ddf1dd2bde222ba763b8a86785535641c44ef5a9223b33e8d013abbe645c5512589d987070b5a88107ac9b31
+DIST puppetserver-2.8.0.tar.gz 34015599 SHA256 0f6f49b149639b80c3caecaeced44c7c0cb98728da7ce12f6725b061f3152812 SHA512 7023278fe501614f1ff9650f72b9193054cb79888ce03f29932a10fa826ee07d67e96eee80a3f2c19007b8bae14008846ea850fb98544bcd39e1ada11fadd22c WHIRLPOOL 6319b7aaefd45b5c49189e15eb06575841c8ca24f3032739515f48f35efcc0ea4d3490f84b2325ff864b57e1a789263596d7f6095a4b35171d3b17a77b07ae68
+DIST puppetserver-5.0.0.tar.gz 66380485 SHA256 b1b62c31d31a69cf1912d6b785f53cbff219a98e0e7300b7f50114694b06ccbf SHA512 1dd7b332871abf12981a7ef33ee92a813275c86ca0cd72a24c3853679c3e93aaf264b76bf4108bf62c04021889e0b7ee0bb46963bd1f3df1f8e67c48e41698e8 WHIRLPOOL 89d15509f3afc96ccdae5370346c101dc48daa68dddbfc98b51151d0e706945858b4485d7358710223c43760f317b5aa6a27b247db3fa02d80077694b0ee4a9c
+EBUILD puppetserver-2.8.0.ebuild 4052 SHA256 48b793e9706747cfd5283cfc8317c32277b5b306ee7df3252222cfe29e281b20 SHA512 10fe93d4747aa1d7f3f1c4f400c63ad4a75e5dc7f5a662c0601bbd22a69b3f29ef04bd7f7fdabdf3fe74e5d2fef2429a083db598f1869648e739d8d6f99974af WHIRLPOOL e23d0e5111eeb62d923c014f90672c994e311b97ad0ecab57b1727dfba9ae85402780ce8ad7b75d90778f59a97f8f3336f15a6546d1df34761df28993ace8af7
+EBUILD puppetserver-5.0.0-r1.ebuild 4939 SHA256 08674dbcd4d0a317128964b18c4dbc93a32effa38126d6b9ca749d48b51237f3 SHA512 04832ab34dea9f8f6cc31f1b22688e3e8961c592b28f8b0e58522c849d2e3ba37879d7fff3afbf572ea768141da6fba871f1d9766c3bde2ff8573dabddce1248 WHIRLPOOL e226ac44eab49bf807272cca5d8738f9bdf0092d043b3d49d8d9efd2dfa55636d3652e7fa674ccf5814987b44b39fce7751e226c828edd0b372df7c4bdd76169
+EBUILD puppetserver-5.0.0-r2.ebuild 4890 SHA256 491606b7edde87459361b8d138181a13f92ab297450dba73702f83f646a52e9e SHA512 65f3d4e8522a505b039aa73a7fc724f62dd3d68a9db0f2f03487f7644de8143e43e3b3f73a73d66b56cbc8a7c2bbb78af8dd528aedf35bb4d74f3ef31bf201be WHIRLPOOL bc08bddfa5945c83bc4d5639e2ffc859f859fb6d47b3d45b9e21d7ec7cd7584688fac019dd504c5cb02697a1c8fa9260eccb33fc242522e114c0f1b2aec24196
+MISC ChangeLog 7993 SHA256 9a47868558e376193b4e988493a375526e8a01b780cb28e7ac140958522e0843 SHA512 473e51d6f52a3fbe7224caeba4aa4363357c87acb5939ba2d238f9857f1c72dba6eb5ccc3d76e9cce6d8c564df7888185ee960c963b7b8308006cd3f53d7c716 WHIRLPOOL af4fa4e71885c9a6cad8a59712e7de6c7854629c07a235915ad0b882fa0539c9e996e2e222eb2a835580049bcc0bf59618e36b825842c48c696f65f5fd0537d4
+MISC ChangeLog-2015 878 SHA256 55c43d296cd6cf910139ea29afe0d041358cc5a8ea0366936dfb75ba21640eae SHA512 5ad7c7171faf5a1c05cb9afaf307880e37744cdf472b1f6f1a72c1ab98f58f2e2150d8582ad72ad0ab9b45a075b7c1ce700603c942b183328a18cee505a186b7 WHIRLPOOL 7c5aaee9bea21577e2864ccc6c31d5accafd4a74ebb79d4f73388a0b3995de84471ed7b18c896747c8730349236136cd23f44f5c71a7aff3a08ef13ef42cc682
+MISC metadata.xml 468 SHA256 cedfad43df11b56dfc9042bc532da2c772f94202ca8819f38fd9cba9e3341107 SHA512 0bf5e337ba3d5d3e4d84cc397ecf40d0c0ba298aa22c9d54a89381391a69a2374ce736443edacc67403490d2a4950a7c386fb4741b149d0eca700d115b0ac24c WHIRLPOOL 356c70f8cfbd446e22a6849124d474ef9ce0663da00694accad62fab22458f69802bb06a247c61950a6e2c384996f6b067c0440499ddfa667342fbe8d627721d
diff --git a/app-admin/puppetserver/files/puppetserver.init b/app-admin/puppetserver/files/puppetserver.init
new file mode 100644
index 000000000000..34126ed8b1e5
--- /dev/null
+++ b/app-admin/puppetserver/files/puppetserver.init
@@ -0,0 +1,72 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig reload"
+
+LOGDIR="/var/log/puppetlabs/puppetserver"
+RUNDIR="/run/puppetlabs/puppetserver"
+
+checkconfig() {
+ if [ ! -x $JAVA_BIN ]; then
+ eerror "Missing JAVA_BIN."
+ eend 1
+ fi
+ if [ ! -d $INSTALL_DIR ]; then
+ eerror "Missing INSTALL_DIR."
+ eend 1
+ fi
+ if [ ! -e $BOOTSTRAP_CONFIG ]; then
+ eerror "Missing BOOTSTRAP_CONFIG."
+ eend 1
+ fi
+ if [ ! -e $CONFIG ]; then
+ eerror "Missing CONFIG."
+ eend 1
+ fi
+ if [ ! -n $USER ]; then
+ eerror "Missing USER."
+ eend 1
+ fi
+ if [ ! -n $GROUP ]; then
+ eerror "Missing GROUP."
+ eend 1
+ fi
+
+ checkpath -d -m 0755 "${LOGDIR%/*}"
+ checkpath -d -m 0755 "${RUNDIR%/*}"
+ checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
+ checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"
+
+ 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 clojure.main -m puppetlabs.trapperkeeper.main"
+ PUPPETSERVER_OPTS="--config /etc/puppetlabs/puppetserver/conf.d --bootstrap-config ${BOOTSTRAP_CONFIG} --restart-file /opt/puppetlabs/server/data/puppetserver/restartcounter"
+ EXEC="${JAVA_BIN} ${JAVA_ARGS} ${PUPPETSERVER_ARGS} ${PUPPETSERVER_OPTS}"
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Puppet Server"
+ start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
+ -m --pidfile "${RUNDIR}/puppetserver.pid" \
+ -b --exec "/bin/bash" \
+ -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
+ local retval=$?
+ if [ $retval -ne 0 ]; then
+ ewarn "Error starting puppetserver."
+ fi
+ eend $retval
+}
+
+stop() {
+ ebegin "Stopping Puppet Server"
+ start-stop-daemon --stop --pidfile "${RUNDIR}/puppetserver.pid"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading Puppet Server"
+ start-stop-daemon --signal HUP --pidfile "${RUNDIR}/puppetserver.pid"
+ eend $?
+}
+
diff --git a/app-admin/puppetserver/files/puppetserver.initd b/app-admin/puppetserver/files/puppetserver.initd
new file mode 100644
index 000000000000..080dd2c8de28
--- /dev/null
+++ b/app-admin/puppetserver/files/puppetserver.initd
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig reload"
+
+LOGDIR="/var/log/puppetlabs/puppetserver"
+RUNDIR="/run/puppetlabs/puppetserver"
+
+checkconfig() {
+ if [ ! -x $JAVA_BIN ]; then
+ eerror "Missing JAVA_BIN."
+ eend 1
+ fi
+ if [ ! -d $INSTALL_DIR ]; then
+ eerror "Missing INSTALL_DIR."
+ eend 1
+ fi
+ if [ ! -e $BOOTSTRAP_CONFIG ]; then
+ eerror "Missing BOOTSTRAP_CONFIG."
+ eend 1
+ fi
+ if [ ! -e $CONFIG ]; then
+ eerror "Missing CONFIG."
+ eend 1
+ fi
+ if [ ! -n $USER ]; then
+ eerror "Missing USER."
+ eend 1
+ fi
+ if [ ! -n $GROUP ]; then
+ eerror "Missing GROUP."
+ eend 1
+ fi
+
+ checkpath -d -m 0755 "${LOGDIR%/*}"
+ checkpath -d -m 0755 "${RUNDIR%/*}"
+ checkpath -d -m 0700 -o "${USER}:${GROUP}" "${LOGDIR}"
+ checkpath -d -m 0755 -o "${USER}:${GROUP}" "${RUNDIR}"
+
+ JAVA_ARGS="${JAVA_ARGS} -cp '${INSTALL_DIR}/puppet-server-release.jar' clojure.main -m puppetlabs.trapperkeeper.main --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"
+ EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetlabs/puppetserver -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Puppet Server"
+ start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
+ -m --pidfile "${RUNDIR}/puppetserver.pid" \
+ -b --exec "/bin/bash" \
+ -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
+ local retval=$?
+ if [ $retval -ne 0 ]; then
+ ewarn "Error starting puppetserver."
+ fi
+ eend $retval
+}
+
+stop() {
+ ebegin "Stopping Puppet Server"
+ start-stop-daemon --stop --pidfile "${RUNDIR}/puppetserver.pid"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading Puppet Server"
+ start-stop-daemon --signal HUP --pidfile "${RUNDIR}/puppetserver.pid"
+ eend $?
+}
+
diff --git a/app-admin/puppetserver/metadata.xml b/app-admin/puppetserver/metadata.xml
new file mode 100644
index 000000000000..13a741219359
--- /dev/null
+++ b/app-admin/puppetserver/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <use>
+ <flag name="puppetdb">Adds support for connecting to puppetdb</flag>
+ </use>
+ <longdescription lang="en">
+ Puppet Server is the next-generation application for managing Puppet agents.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-admin/puppetserver/puppetserver-2.8.0.ebuild b/app-admin/puppetserver/puppetserver-2.8.0.ebuild
new file mode 100644
index 000000000000..7dfbffdcbbc8
--- /dev/null
+++ b/app-admin/puppetserver/puppetserver-2.8.0.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib systemd user
+
+DESCRIPTION="Puppet Server is the next-generation application for managing Puppet agents."
+HOMEPAGE="http://docs.puppetlabs.com/puppetserver/"
+SRC_URI="https://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="puppetdb"
+# will need the same keywords as puppet
+KEYWORDS="amd64 x86"
+
+RDEPEND+="
+ >=virtual/jdk-1.7.0
+ app-admin/puppet-agent[puppetdb?]"
+DEPEND+=""
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /opt/puppetlabs/server/data/puppetserver "puppet"
+}
+
+src_prepare() {
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' ext/redhat/puppetserver.service || die
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' ext/bin/puppetserver || die
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' install.sh || die
+ sed -i 's/var\/run/run/g' ext/config/conf.d/puppetserver.conf || die
+ sed -i 's/var\/run/run/g' ext/redhat/puppetserver.service || die
+ sed -i 's/var\/run/run/g' install.sh || die
+ default
+}
+
+src_compile() {
+ einfo "not compiling"
+}
+
+src_install() {
+ insinto /opt/puppetlabs/server/apps/puppetserver
+ insopts -m0774
+ doins ext/ezbake-functions.sh
+ insopts -m0644
+ doins ext/ezbake.manifest
+ doins puppet-server-release.jar
+ insinto /etc/puppetlabs/puppetserver
+ doins ext/config/logback.xml
+ doins ext/config/request-logging.xml
+ insinto /etc/puppetlabs/puppetserver/services.d
+ doins ext/system-config/services.d/bootstrap.cfg
+ doins ext/config/services.d/ca.cfg
+ insinto /etc/puppetlabs/puppetserver/conf.d
+ doins ext/config/conf.d/puppetserver.conf
+ doins ext/config/conf.d/auth.conf
+ doins ext/config/conf.d/global.conf
+ doins ext/config/conf.d/web-routes.conf
+ doins ext/config/conf.d/webserver.conf
+ insopts -m0755
+ insinto /opt/puppetlabs/server/apps/puppetserver/scripts
+ doins install.sh
+ insinto /opt/puppetlabs/server/apps/puppetserver/cli/apps
+ doins ext/cli/irb
+ doins ext/cli/foreground
+ doins ext/cli/gem
+ doins ext/cli/ruby
+ doins ext/cli/reload
+ doins ext/cli/start
+ doins ext/cli/stop
+ insinto /opt/puppetlabs/server/apps/puppetserver/bin
+ doins ext/bin/puppetserver
+ insopts -m0644
+ dodir /opt/puppetlabs/server/bin
+ dosym ../apps/puppetserver/bin/puppetserver /opt/puppetlabs/server/bin/puppetserver
+ dodir /opt/puppetlabs/bin
+ dosym ../server/apps/puppetserver/bin/puppetserver /opt/puppetlabs/bin/puppetserver
+ dosym ../../opt/puppetlabs/server/apps/puppetserver/bin/puppetserver /usr/bin/puppetserver
+ dodir /opt/puppetlabs/server/apps/puppetserver/config/services.d
+ # other sys stuff
+ dodir /etc/puppetlabs/code
+ # needed for systemd
+ dodir /var/log/puppetlabs/puppetserver
+ dodir /etc/puppetlabs/puppet/ssl
+ fowners -R puppet:puppet /etc/puppetlabs/puppet/ssl
+ fperms -R 771 /etc/puppetlabs/puppet/ssl
+ # init type tasks
+ newconfd ext/default puppetserver
+ newinitd "${FILESDIR}/puppetserver.initd" puppetserver
+ # systemd type things
+ insinto /etc/systemd/system/puppetserver.service.d/
+ newins ext/default gentoo.conf
+ systemd_dounit ext/redhat/puppetserver.service
+ # misc
+ insinto /etc/logrotate.d
+ newins ext/puppetserver.logrotate.conf puppetserver
+ # cleanup
+ dodir /opt/puppetlabs/server/data/puppetserver/jruby-gems
+ fowners -R puppet:puppet /opt/puppetlabs/server/data
+ fperms -R 775 /opt/puppetlabs/server/data/puppetserver
+ fperms -R 700 /var/log/puppetlabs/puppetserver
+}
+
+pkg_postinst() {
+ elog "to install you may want to run the following:"
+ elog
+ elog "puppet config set --section master vardir /opt/puppetlabs/server/data/puppetserver"
+ elog "puppet config set --section master logdir /var/log/puppetlabs/puppetserver"
+ elog "puppet config set --section master rundir /run/puppetlabs/puppetserver"
+ elog "puppet config set --section master pidfile /run/puppetlabs/puppetserver/puppetserver.pid"
+ elog "puppet config set --section master codedir /etc/puppetlabs/code"
+}
diff --git a/app-admin/puppetserver/puppetserver-5.0.0-r1.ebuild b/app-admin/puppetserver/puppetserver-5.0.0-r1.ebuild
new file mode 100644
index 000000000000..b26b41865539
--- /dev/null
+++ b/app-admin/puppetserver/puppetserver-5.0.0-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib systemd tmpfiles user
+
+DESCRIPTION="Puppet Server is the next-generation application for managing Puppet agents."
+HOMEPAGE="http://docs.puppetlabs.com/puppetserver/"
+SRC_URI="https://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="puppetdb"
+# will need the same keywords as puppet
+KEYWORDS="amd64 x86"
+
+RDEPEND+="
+ >=virtual/jdk-1.8.0
+ app-admin/puppet-agent[puppetdb?]"
+DEPEND+=""
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /opt/puppetlabs/server/data/puppetserver "puppet"
+}
+
+src_prepare() {
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' ext/redhat/puppetserver.service || die
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' ext/bin/puppetserver || die
+ sed -i 's/sysconfig\/puppetserver/systemd\/system\/puppetserver\.service\.d\/gentoo\.conf/g' install.sh || die
+ sed -i 's/var\/run/run/g' ext/config/conf.d/puppetserver.conf || die
+ sed -i 's/var\/run/run/g' ext/redhat/puppetserver.service || die
+ sed -i 's/var\/run/run/g' install.sh || die
+ default
+}
+
+src_compile() {
+ einfo "not compiling"
+}
+
+src_install() {
+ insinto /opt/puppetlabs/server/apps/puppetserver
+ insopts -m0774
+ doins ext/ezbake-functions.sh
+ insopts -m0644
+ doins ext/ezbake.manifest
+ doins puppet-server-release.jar
+ doins jruby-9k.jar
+ doins jruby-1_7.jar
+ insinto /etc/puppetlabs/puppetserver
+ doins ext/config/logback.xml
+ doins ext/config/request-logging.xml
+ insinto /etc/puppetlabs/puppetserver/services.d
+ doins ext/system-config/services.d/bootstrap.cfg
+ doins ext/config/services.d/ca.cfg
+ insinto /etc/puppetlabs/puppetserver/conf.d
+ doins ext/config/conf.d/puppetserver.conf
+ doins ext/config/conf.d/auth.conf
+ doins ext/config/conf.d/global.conf
+ doins ext/config/conf.d/web-routes.conf
+ doins ext/config/conf.d/metrics.conf
+ doins ext/config/conf.d/webserver.conf
+ insopts -m0755
+ insinto /opt/puppetlabs/server/apps/puppetserver/scripts
+ doins install.sh
+ insinto /opt/puppetlabs/server/apps/puppetserver/cli/apps
+ doins ext/cli/irb
+ doins ext/cli/foreground
+ doins ext/cli/gem
+ doins ext/cli/ruby
+ doins ext/cli/reload
+ doins ext/cli/start
+ doins ext/cli/stop
+ insinto /opt/puppetlabs/server/apps/puppetserver/cli
+ doins ext/cli_defaults/cli-defaults.sh
+ insinto /opt/puppetlabs/server/apps/puppetserver/bin
+ doins ext/bin/puppetserver
+ insopts -m0644
+ dodir /opt/puppetlabs/server/bin
+ dosym ../apps/puppetserver/bin/puppetserver /opt/puppetlabs/server/bin/puppetserver
+ dodir /opt/puppetlabs/bin
+ dosym ../server/apps/puppetserver/bin/puppetserver /opt/puppetlabs/bin/puppetserver
+ dosym ../../opt/puppetlabs/server/apps/puppetserver/bin/puppetserver /usr/bin/puppetserver
+ dodir /opt/puppetlabs/server/apps/puppetserver/config/services.d
+ # other sys stuff
+ dodir /etc/puppetlabs/code
+ # needed for systemd
+ dodir /var/log/puppetlabs/puppetserver
+ dodir /etc/puppetlabs/puppet/ssl
+ fowners -R puppet:puppet /etc/puppetlabs/puppet/ssl
+ fperms -R 771 /etc/puppetlabs/puppet/ssl
+ # init type tasks
+ newconfd ext/default puppetserver
+ newinitd "${FILESDIR}/puppetserver.init" puppetserver
+ # systemd type things
+ insinto /etc/systemd/system/puppetserver.service.d/
+ newins ext/default gentoo.conf
+ systemd_dounit ext/redhat/puppetserver.service
+ # misc
+ insinto /etc/logrotate.d
+ newins ext/puppetserver.logrotate.conf puppetserver
+ # cleanup
+ dodir /opt/puppetlabs/server/data/puppetserver/jruby-gems
+ fowners -R puppet:puppet /opt/puppetlabs/server/data
+ fperms -R 775 /opt/puppetlabs/server/data/puppetserver
+ fperms -R 700 /var/log/puppetlabs/puppetserver
+ insinto /opt/puppetlabs/server/data
+ newins ext/build-scripts/gem-list.txt puppetserver-gem-list.txt
+ newtmpfiles ext/puppetserver.tmpfiles.conf puppetserver.conf
+}
+
+pkg_postinst() {
+ elog "to install you may want to run the following:"
+ elog
+ elog "puppet config set --section master vardir /opt/puppetlabs/server/data/puppetserver"
+ elog "puppet config set --section master logdir /var/log/puppetlabs/puppetserver"
+ elog "puppet config set --section master rundir /run/puppetlabs/puppetserver"
+ elog "puppet config set --section master pidfile /run/puppetlabs/puppetserver/puppetserver.pid"
+ elog "puppet config set --section master codedir /etc/puppetlabs/code"
+ elog
+ elog "# install puppetserver gems"
+ elog "cd /opt/puppetlabs/server/apps/puppetserver"
+ elog "echo "jruby-puppet: { gem-home: ${DESTDIR}/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems }" > jruby.conf"
+ elog "while read LINE"
+ elog "do"
+ elog " java -cp puppet-server-release.jar:jruby-1_7.jar clojure.main -m puppetlabs.puppetserver.cli.gem --config jruby.conf -- install \$(echo \$LINE |awk '{print \$1}') --version \$(echo \$LINE |awk '{print \$2}')"
+ elog "done < /opt/puppetlabs/server/data/puppetserver-gem-list.txt"
+}
diff --git a/app-admin/puppetserver/puppetserver-5.0.0-r2.ebuild b/app-admin/puppetserver/puppetserver-5.0.0-r2.ebuild
new file mode 100644
index 000000000000..569321228c04
--- /dev/null
+++ b/app-admin/puppetserver/puppetserver-5.0.0-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib systemd tmpfiles user
+
+DESCRIPTION="Puppet Server is the next-generation application for managing Puppet agents."
+HOMEPAGE="http://docs.puppetlabs.com/puppetserver/"
+SRC_URI="https://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="puppetdb"
+# will need the same keywords as puppet
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND+="
+ >=virtual/jdk-1.8.0
+ app-admin/puppet-agent[puppetdb?]"
+DEPEND+=""
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /opt/puppetlabs/server/data/puppetserver "puppet"
+}
+
+src_prepare() {
+ sed -i 's/sysconfig\/puppetserver/default\/puppetserver/g' ext/redhat/puppetserver.service || die
+ sed -i 's/sysconfig\/puppetserver/default\/puppetserver/g' ext/bin/puppetserver || die
+ sed -i 's/sysconfig\/puppetserver/default\/puppetserver/g' install.sh || die
+ sed -i 's/var\/run/run/g' ext/config/conf.d/puppetserver.conf || die
+ sed -i 's/var\/run/run/g' ext/redhat/puppetserver.service || die
+ sed -i 's/var\/run/run/g' install.sh || die
+ default
+}
+
+src_compile() {
+ einfo "not compiling"
+}
+
+src_install() {
+ insinto /opt/puppetlabs/server/apps/puppetserver
+ insopts -m0774
+ doins ext/ezbake-functions.sh
+ insopts -m0644
+ doins ext/ezbake.manifest
+ doins puppet-server-release.jar
+ doins jruby-9k.jar
+ doins jruby-1_7.jar
+ insinto /etc/puppetlabs/puppetserver
+ doins ext/config/logback.xml
+ doins ext/config/request-logging.xml
+ insinto /etc/puppetlabs/puppetserver/services.d
+ doins ext/system-config/services.d/bootstrap.cfg
+ doins ext/config/services.d/ca.cfg
+ insinto /etc/puppetlabs/puppetserver/conf.d
+ doins ext/config/conf.d/puppetserver.conf
+ doins ext/config/conf.d/auth.conf
+ doins ext/config/conf.d/global.conf
+ doins ext/config/conf.d/web-routes.conf
+ doins ext/config/conf.d/metrics.conf
+ doins ext/config/conf.d/webserver.conf
+ insopts -m0755
+ insinto /opt/puppetlabs/server/apps/puppetserver/scripts
+ doins install.sh
+ insinto /opt/puppetlabs/server/apps/puppetserver/cli/apps
+ doins ext/cli/irb
+ doins ext/cli/foreground
+ doins ext/cli/gem
+ doins ext/cli/ruby
+ doins ext/cli/reload
+ doins ext/cli/start
+ doins ext/cli/stop
+ insinto /opt/puppetlabs/server/apps/puppetserver/cli
+ doins ext/cli_defaults/cli-defaults.sh
+ insinto /opt/puppetlabs/server/apps/puppetserver/bin
+ doins ext/bin/puppetserver
+ insopts -m0644
+ dodir /opt/puppetlabs/server/bin
+ dosym ../apps/puppetserver/bin/puppetserver /opt/puppetlabs/server/bin/puppetserver
+ dodir /opt/puppetlabs/bin
+ dosym ../server/apps/puppetserver/bin/puppetserver /opt/puppetlabs/bin/puppetserver
+ dosym ../../opt/puppetlabs/server/apps/puppetserver/bin/puppetserver /usr/bin/puppetserver
+ dodir /opt/puppetlabs/server/apps/puppetserver/config/services.d
+ # other sys stuff
+ dodir /etc/puppetlabs/code
+ # needed for systemd
+ dodir /var/log/puppetlabs/puppetserver
+ dodir /etc/puppetlabs/puppet/ssl
+ fowners -R puppet:puppet /etc/puppetlabs/puppet/ssl
+ fperms -R 771 /etc/puppetlabs/puppet/ssl
+ # systemd type things
+ insinto /etc/systemd/system/puppetserver.service.d/
+ systemd_dounit ext/redhat/puppetserver.service
+ insinto /etc/default
+ newins ext/default puppetserver
+ # normal init type tasks
+ dosym ../default/puppetserver /etc/conf.d/puppetserver
+ newinitd "${FILESDIR}/puppetserver.init" puppetserver
+ # misc
+ insinto /etc/logrotate.d
+ newins ext/puppetserver.logrotate.conf puppetserver
+ # cleanup
+ dodir /opt/puppetlabs/server/data/puppetserver/jruby-gems
+ fowners -R puppet:puppet /opt/puppetlabs/server/data
+ fperms -R 775 /opt/puppetlabs/server/data/puppetserver
+ fperms -R 700 /var/log/puppetlabs/puppetserver
+ insinto /opt/puppetlabs/server/data
+ newins ext/build-scripts/gem-list.txt puppetserver-gem-list.txt
+ newtmpfiles ext/puppetserver.tmpfiles.conf puppetserver.conf
+}
+
+pkg_postinst() {
+ elog "to install you may want to run the following:"
+ elog
+ elog "puppet config set --section master vardir /opt/puppetlabs/server/data/puppetserver"
+ elog "puppet config set --section master logdir /var/log/puppetlabs/puppetserver"
+ elog "puppet config set --section master rundir /run/puppetlabs/puppetserver"
+ elog "puppet config set --section master pidfile /run/puppetlabs/puppetserver/puppetserver.pid"
+ elog "puppet config set --section master codedir /etc/puppetlabs/code"
+ elog
+ elog "# install puppetserver gems"
+ elog "cd /opt/puppetlabs/server/apps/puppetserver"
+ elog "echo "jruby-puppet: { gem-home: ${DESTDIR}/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems }" > jruby.conf"
+ elog "while read LINE"
+ elog "do"
+ elog " java -cp puppet-server-release.jar:jruby-1_7.jar clojure.main -m puppetlabs.puppetserver.cli.gem --config jruby.conf -- install \$(echo \$LINE |awk '{print \$1}') --version \$(echo \$LINE |awk '{print \$2}')"
+ elog "done < /opt/puppetlabs/server/data/puppetserver-gem-list.txt"
+}