summaryrefslogtreecommitdiff
path: root/app-admin/puppetdb
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/puppetdb')
-rw-r--r--app-admin/puppetdb/Manifest6
-rw-r--r--app-admin/puppetdb/files/puppetdb.initd64
-rw-r--r--app-admin/puppetdb/metadata.xml11
-rw-r--r--app-admin/puppetdb/puppetdb-5.2.1.ebuild92
-rw-r--r--app-admin/puppetdb/puppetdb-5.2.2.ebuild92
5 files changed, 265 insertions, 0 deletions
diff --git a/app-admin/puppetdb/Manifest b/app-admin/puppetdb/Manifest
new file mode 100644
index 000000000000..59d7d32aff62
--- /dev/null
+++ b/app-admin/puppetdb/Manifest
@@ -0,0 +1,6 @@
+AUX puppetdb.initd 1824 BLAKE2B 76d8252b2fee61270f440734d91735fa002df1583126de60befd3cc756cc0f5368ce49461cee85ffca4c6893b1e1859bff9af86e75d73171d15ae344a9fb4149 SHA512 0d0f67b7eaf7d10474e73eb77174a51e0f891bf664706e11c7a5ef1f918d7967c67251bab797e1d117b0f2b08f4b634ad06a81f6022ef04e6394c15e36a73961
+DIST puppetdb-5.2.1.tar.gz 25435195 BLAKE2B aed0e6175df0a603ea0aaf792c31b4933d408a4f7a037b557a8acb4b237e4c639a06f954232e049efe4b486d780a3af129c8a6a48833019168cd70f38e5bf403 SHA512 6d0b06f083093394f74e952112c6b388fd6c94452cf2954172dafc5dc42c7a0b45f6a9a7afcb6196f12316e15653943c3faed8a06ba7a7bd75a31db8515e0103
+DIST puppetdb-5.2.2.tar.gz 25436396 BLAKE2B e30d80b7da29c8cf3b00c9cda3d6e0a4c5635b3bb3a4e6d3e2bf284531509828df6d845a0d30b2a7a454ec35ab4879019fc4c68fc3aa8b6a72c3d0896b9e75f7 SHA512 cc598539801bedd4ef0052f50013320be5dc1eaf8098db8898a0759609d6d4e26aa094550bc1a45c041f9fe65ee99b0c00c00586d3cc93003836f1415bd92456
+EBUILD puppetdb-5.2.1.ebuild 2763 BLAKE2B a3aece6216d2a180ea14cb90e7d306720c09ce617e430c1b78241a696153f6d33787ab3d89f466b8635f80889531923d2e7a6305ede45e7b2c83bfa5438eb72a SHA512 34767f94ee58a38a05f975fc3f28b6b851eae1f9e0dab5985d671139319cf3c5df70c1afc2aee34a77c0172b499918aee8d188c290220d4ce2cca2abe91039c2
+EBUILD puppetdb-5.2.2.ebuild 2763 BLAKE2B a3aece6216d2a180ea14cb90e7d306720c09ce617e430c1b78241a696153f6d33787ab3d89f466b8635f80889531923d2e7a6305ede45e7b2c83bfa5438eb72a SHA512 34767f94ee58a38a05f975fc3f28b6b851eae1f9e0dab5985d671139319cf3c5df70c1afc2aee34a77c0172b499918aee8d188c290220d4ce2cca2abe91039c2
+MISC metadata.xml 485 BLAKE2B 5f2ffba1725ce7168c4bacbef8170b7ca626d4e639cc2c32e0063e076fc951681c9a7154d08036e935617bd5cf67a5640acec9ae3964829da9bc3a7cdf412222 SHA512 b9461d712e74a7ff469a554a21c1e4e67954395eaae8de9a8669f7e816e2291120be14e8c659f34b41f65962027cfa73030ef2678003b52a1a56b35de0f9b2b2
diff --git a/app-admin/puppetdb/files/puppetdb.initd b/app-admin/puppetdb/files/puppetdb.initd
new file mode 100644
index 000000000000..29a634e47a9e
--- /dev/null
+++ b/app-admin/puppetdb/files/puppetdb.initd
@@ -0,0 +1,64 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+
+LOGDIR="/var/log/puppetlabs/puppetdb"
+RUNDIR="/run/puppetlabs/puppetdb"
+
+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}/puppetdb.jar' clojure.main -m puppetlabs.puppetdb.main --config ${CONFIG} -b '${BOOTSTRAP_CONFIG}'"
+ EXEC="${JAVA_BIN} -XX:OnOutOfMemoryError=\"kill -9 %p\" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetlabs/puppetdb -Djava.security.egd=/dev/urandom ${JAVA_ARGS}"
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting PuppetDB"
+ start-stop-daemon --start -u "${USER}" -g "${GROUP}" \
+ -m --pidfile "${RUNDIR}/puppetdb.pid" \
+ -b --exec "/bin/bash" \
+ -- -c "exec ${EXEC} >> ${LOGDIR}/daemon.log 2>&1"
+ local retval=$?
+ if [ $retval -ne 0 ]; then
+ ewarn "Error starting puppetdb."
+ fi
+ eend $retval
+}
+
+stop() {
+ ebegin "Stopping PuppetDB"
+ start-stop-daemon --stop --pidfile "${RUNDIR}/puppetdb.pid"
+ eend $?
+}
diff --git a/app-admin/puppetdb/metadata.xml b/app-admin/puppetdb/metadata.xml
new file mode 100644
index 000000000000..df9a6a6a1c9d
--- /dev/null
+++ b/app-admin/puppetdb/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <longdescription lang="en">
+ PuppetDB collects data generated by Puppet. It enables advanced Puppet features like exported resources, and can be the foundation for other applications that use Puppet’s data.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-admin/puppetdb/puppetdb-5.2.1.ebuild b/app-admin/puppetdb/puppetdb-5.2.1.ebuild
new file mode 100644
index 000000000000..e2e9e4db500f
--- /dev/null
+++ b/app-admin/puppetdb/puppetdb-5.2.1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib systemd user
+
+DESCRIPTION="PuppetDB collects data generated by Puppet."
+HOMEPAGE="http://docs.puppetlabs.com/puppetdb/"
+SRC_URI="https://downloads.puppetlabs.com/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+# will need the same keywords as puppet
+KEYWORDS="amd64 x86"
+
+RDEPEND+=">=virtual/jdk-1.7.0"
+DEPEND+=""
+
+pkg_setup() {
+ enewgroup puppetdb
+ enewuser puppetdb -1 -1 /opt/puppetlabs/server/data/puppetdb "puppetdb"
+}
+
+src_prepare() {
+ sed -i 's/sysconfig/conf\.d/g' ext/redhat/puppetdb.service || die
+ sed -i 's/sysconfig/conf\.d/g' ext/bin/puppetdb || die
+ sed -i 's/sysconfig/conf\.d/g' install.sh || die
+ sed -i 's/var\/run/run/g' ext/puppetdb.tmpfiles.conf || die
+ sed -i 's/var\/run/run/g' install.sh || die
+ default
+}
+
+src_compile() {
+ einfo "not compiling"
+}
+
+src_install() {
+ dodir /opt/puppetlabs/server/data/puppetdb
+ insinto /opt/puppetlabs/server/apps/puppetdb
+ insopts -m0744
+ doins ext/ezbake-functions.sh
+ insopts -m0644
+ doins ext/ezbake.manifest
+ doins puppetdb.jar
+ insinto /etc/puppetlabs/puppetdb
+ doins ext/config/logback.xml
+ doins ext/config/bootstrap.cfg
+ doins ext/config/request-logging.xml
+ insinto /etc/puppetlabs/puppetdb/conf.d
+ doins ext/config/conf.d/jetty.ini
+ doins ext/config/conf.d/repl.ini
+ doins ext/config/conf.d/database.ini
+ doins ext/config/conf.d/config.ini
+ insopts -m0755
+ insinto /opt/puppetlabs/server/apps/puppetdb/scripts
+ doins install.sh
+ insinto /opt/puppetlabs/server/apps/puppetdb/cli/apps
+ doins ext/cli/foreground
+ doins ext/cli/ssl-setup
+ doins ext/cli/config-migration
+ doins ext/cli/foreground
+ doins ext/cli/anonymize
+ doins ext/cli/reload
+ doins ext/cli/start
+ doins ext/cli/stop
+ insinto /opt/puppetlabs/server/apps/puppetdb/bin
+ doins ext/bin/puppetdb
+ insopts -m0644
+ dodir /opt/puppetlabs/server/bin
+ dosym ../apps/puppetdb/bin/puppetdb /opt/puppetlabs/server/bin/puppetdb
+ dodir /opt/puppetlabs/bin
+ dosym ../server/apps/puppetdb/bin/puppetdb /opt/puppetlabs/bin/puppetdb
+ dosym ../../opt/puppetlabs/server/apps/puppetdb/bin/puppetdb /usr/bin/puppetdb
+ # init type tasks
+ newconfd ext/default puppetdb
+ systemd_dounit ext/redhat/puppetdb.service
+ systemd_newtmpfilesd ext/puppetdb.tmpfiles.conf puppetdb.conf
+ newinitd "${FILESDIR}/puppetdb.initd" puppetdb
+ # misc
+ insinto /etc/logrotate.d
+ newins ext/puppetdb.logrotate.conf puppetdb
+ fowners -R puppetdb:puppetdb /opt/puppetlabs/server/data/puppetdb
+ fperms -R 770 /opt/puppetlabs/server/data/puppetdb
+}
+
+pkg_postinst() {
+ elog "to install please run '/opt/puppetlabs/server/bin/puppetdb ssl-setup'"
+ elog
+ elog "to upgrade please run '/opt/puppetlabs/server/bin/puppetdb config-migration'"
+}
diff --git a/app-admin/puppetdb/puppetdb-5.2.2.ebuild b/app-admin/puppetdb/puppetdb-5.2.2.ebuild
new file mode 100644
index 000000000000..e2e9e4db500f
--- /dev/null
+++ b/app-admin/puppetdb/puppetdb-5.2.2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib systemd user
+
+DESCRIPTION="PuppetDB collects data generated by Puppet."
+HOMEPAGE="http://docs.puppetlabs.com/puppetdb/"
+SRC_URI="https://downloads.puppetlabs.com/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+# will need the same keywords as puppet
+KEYWORDS="amd64 x86"
+
+RDEPEND+=">=virtual/jdk-1.7.0"
+DEPEND+=""
+
+pkg_setup() {
+ enewgroup puppetdb
+ enewuser puppetdb -1 -1 /opt/puppetlabs/server/data/puppetdb "puppetdb"
+}
+
+src_prepare() {
+ sed -i 's/sysconfig/conf\.d/g' ext/redhat/puppetdb.service || die
+ sed -i 's/sysconfig/conf\.d/g' ext/bin/puppetdb || die
+ sed -i 's/sysconfig/conf\.d/g' install.sh || die
+ sed -i 's/var\/run/run/g' ext/puppetdb.tmpfiles.conf || die
+ sed -i 's/var\/run/run/g' install.sh || die
+ default
+}
+
+src_compile() {
+ einfo "not compiling"
+}
+
+src_install() {
+ dodir /opt/puppetlabs/server/data/puppetdb
+ insinto /opt/puppetlabs/server/apps/puppetdb
+ insopts -m0744
+ doins ext/ezbake-functions.sh
+ insopts -m0644
+ doins ext/ezbake.manifest
+ doins puppetdb.jar
+ insinto /etc/puppetlabs/puppetdb
+ doins ext/config/logback.xml
+ doins ext/config/bootstrap.cfg
+ doins ext/config/request-logging.xml
+ insinto /etc/puppetlabs/puppetdb/conf.d
+ doins ext/config/conf.d/jetty.ini
+ doins ext/config/conf.d/repl.ini
+ doins ext/config/conf.d/database.ini
+ doins ext/config/conf.d/config.ini
+ insopts -m0755
+ insinto /opt/puppetlabs/server/apps/puppetdb/scripts
+ doins install.sh
+ insinto /opt/puppetlabs/server/apps/puppetdb/cli/apps
+ doins ext/cli/foreground
+ doins ext/cli/ssl-setup
+ doins ext/cli/config-migration
+ doins ext/cli/foreground
+ doins ext/cli/anonymize
+ doins ext/cli/reload
+ doins ext/cli/start
+ doins ext/cli/stop
+ insinto /opt/puppetlabs/server/apps/puppetdb/bin
+ doins ext/bin/puppetdb
+ insopts -m0644
+ dodir /opt/puppetlabs/server/bin
+ dosym ../apps/puppetdb/bin/puppetdb /opt/puppetlabs/server/bin/puppetdb
+ dodir /opt/puppetlabs/bin
+ dosym ../server/apps/puppetdb/bin/puppetdb /opt/puppetlabs/bin/puppetdb
+ dosym ../../opt/puppetlabs/server/apps/puppetdb/bin/puppetdb /usr/bin/puppetdb
+ # init type tasks
+ newconfd ext/default puppetdb
+ systemd_dounit ext/redhat/puppetdb.service
+ systemd_newtmpfilesd ext/puppetdb.tmpfiles.conf puppetdb.conf
+ newinitd "${FILESDIR}/puppetdb.initd" puppetdb
+ # misc
+ insinto /etc/logrotate.d
+ newins ext/puppetdb.logrotate.conf puppetdb
+ fowners -R puppetdb:puppetdb /opt/puppetlabs/server/data/puppetdb
+ fperms -R 770 /opt/puppetlabs/server/data/puppetdb
+}
+
+pkg_postinst() {
+ elog "to install please run '/opt/puppetlabs/server/bin/puppetdb ssl-setup'"
+ elog
+ elog "to upgrade please run '/opt/puppetlabs/server/bin/puppetdb config-migration'"
+}