diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/puppetserver | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/puppetserver')
-rw-r--r-- | app-admin/puppetserver/Manifest | 1 | ||||
-rw-r--r-- | app-admin/puppetserver/files/puppetserver.initd | 65 | ||||
-rw-r--r-- | app-admin/puppetserver/metadata.xml | 14 | ||||
-rw-r--r-- | app-admin/puppetserver/puppetserver-2.1.1.ebuild | 107 |
4 files changed, 187 insertions, 0 deletions
diff --git a/app-admin/puppetserver/Manifest b/app-admin/puppetserver/Manifest new file mode 100644 index 000000000000..39cba4fba1ba --- /dev/null +++ b/app-admin/puppetserver/Manifest @@ -0,0 +1 @@ +DIST puppetserver-2.1.1.tar.gz 42547364 SHA256 206db88de533ebf0071a3d957aa21145500abb7748897b01f0de8e5d57dbff0c SHA512 850276fdd67f77f4c8e67be920ca4685fb267d6c90ed1eea41792c5f500ad4b199c198a4367a0faeb55d7aaf85ad531f50bd6704562c1c26bce499265d03a3d5 WHIRLPOOL aabce9259f99926788b9ff16e1b547e4f3c543a54c50a0bd3b0ef0e27eb5b1042981b5bbc73339b28b063798da3cd2453f45a40fcc77f9019f8db40fb5216f28 diff --git a/app-admin/puppetserver/files/puppetserver.initd b/app-admin/puppetserver/files/puppetserver.initd new file mode 100644 index 000000000000..42282db16796 --- /dev/null +++ b/app-admin/puppetserver/files/puppetserver.initd @@ -0,0 +1,65 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="checkconfig" + +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 [ ! -a $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 $? +} diff --git a/app-admin/puppetserver/metadata.xml b/app-admin/puppetserver/metadata.xml new file mode 100644 index 000000000000..e25100b94a84 --- /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> + <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.1.1.ebuild b/app-admin/puppetserver/puppetserver-2.1.1.ebuild new file mode 100644 index 000000000000..d40553ccb5d2 --- /dev/null +++ b/app-admin/puppetserver/puppetserver-2.1.1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +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/conf\.d/g' ext/redhat/puppetserver.service || die + sed -i 's/sysconfig/conf\.d/g' ext/bin/puppetserver || die + sed -i 's/sysconfig/conf\.d/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 +} + +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/bootstrap.cfg + doins ext/config/request-logging.xml + insinto /etc/puppetlabs/puppetserver/conf.d + doins ext/config/conf.d/puppetserver.conf + doins ext/config/conf.d/ca.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 + 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 + # 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 + systemd_dounit ext/redhat/puppetserver.service + newinitd "${FILESDIR}/puppetserver.initd" 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 +} + +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 "the jruby needs it's own puppet gem installed..." +# elog "/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver gem install puppet" +} |