Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2014 19:21:56 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r367468 - in head/databases: . puppetdb puppetdb/files
Message-ID:  <201409061921.s86JLucl072803@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Sat Sep  6 19:21:56 2014
New Revision: 367468
URL: http://svnweb.freebsd.org/changeset/ports/367468
QAT: https://qat.redports.org/buildarchive/r367468/

Log:
  databases/puppetdb: add port for puppetdb
  
  The PuppetDB storeconfigs backend
  
  WWW: https://docs.puppetlabs.com/puppetdb/latest/
  
  PR:		187517
  Submitted by:	Zach Leslie <xaque208@gmail.com>

Added:
  head/databases/puppetdb/
  head/databases/puppetdb/Makefile   (contents, props changed)
  head/databases/puppetdb/distinfo   (contents, props changed)
  head/databases/puppetdb/files/
  head/databases/puppetdb/files/patch-Rakefile   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__config.ini   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__database.ini   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb-anonymize   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb-export   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb-foreground   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb-import   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb-ssl-setup   (contents, props changed)
  head/databases/puppetdb/files/patch-ext__files__puppetdb.newsyslog   (contents, props changed)
  head/databases/puppetdb/files/patch-tasks__install.rake   (contents, props changed)
  head/databases/puppetdb/files/pkg-message.in   (contents, props changed)
  head/databases/puppetdb/files/puppetdb.in   (contents, props changed)
  head/databases/puppetdb/pkg-descr   (contents, props changed)
  head/databases/puppetdb/pkg-plist   (contents, props changed)
Modified:
  head/databases/Makefile

Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile	Sat Sep  6 19:16:52 2014	(r367467)
+++ head/databases/Makefile	Sat Sep  6 19:21:56 2014	(r367468)
@@ -701,6 +701,7 @@
     SUBDIR += proftpd-mod_sql_postgres
     SUBDIR += proftpd-mod_sql_sqlite
     SUBDIR += proftpd-mod_sql_tds
+    SUBDIR += puppetdb
     SUBDIR += puppetdb-terminus
     SUBDIR += pure-sql3
     SUBDIR += puredb

Added: head/databases/puppetdb/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/Makefile	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,53 @@
+# $FreeBSD$
+
+PORTNAME=	puppetdb
+PORTVERSION=	2.2.0
+CATEGORIES=	databases java
+MASTER_SITES=	http://downloads.puppetlabs.com/puppetdb/
+
+MAINTAINER=	xaque208@gmail.com
+COMMENT=	PuppetDB storeconfigs backend
+
+RUN_DEPENDS=	bash>=0:${PORTSDIR}/shells/bash \
+		puppet>=0:${PORTSDIR}/sysutils/puppet
+BUILD_DEPENDS=	rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \
+		rubygem-rake>=0:${PORTSDIR}/devel/rubygem-rake
+
+USE_RC_SUBR=	puppetdb
+
+USES=		shebangfix
+SHEBANG_FILES=	ext/files/puppetdb \
+		ext/files/puppetdb-anonymize \
+		ext/files/puppetdb-export \
+		ext/files/puppetdb-foreground \
+		ext/files/puppetdb-import \
+		ext/files/puppetdb-legacy \
+		ext/files/puppetdb-ssl-setup
+USE_JAVA=	yes
+USE_RUBY=	yes
+USE_RAKE=	yes
+NO_BUILD=	yes
+JAVA_VERSION=	1.7+
+
+USERS=		puppetdb
+GROUPS=		puppetdb
+
+SUB_LIST=	JAVA_HOME=${JAVA_HOME}
+SUB_FILES=	pkg-message
+
+PKGMESSAGE=	${WRKDIR}/pkg-message
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+.for file in tasks/install.rake ext/files/config.ini ext/files/puppetdb \
+	ext/files/puppetdb-import ext/files/puppetdb-anonymize \
+	ext/files/database.ini ext/files/puppetdb-ssl-setup \
+	ext/files/puppetdb-export ext/files/puppetdb-foreground Rakefile
+	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/${file}
+.endfor
+
+do-install:
+	@cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} rake install
+
+.include <bsd.port.post.mk>

Added: head/databases/puppetdb/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/distinfo	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,2 @@
+SHA256 (puppetdb-2.2.0.tar.gz) = 3a177568e67eda3191f52509c91ca1fdf989a21437dfbaf21fa024790eac93d6
+SIZE (puppetdb-2.2.0.tar.gz) = 21787873

Added: head/databases/puppetdb/files/patch-Rakefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-Rakefile	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,49 @@
+--- ./Rakefile.orig	2014-07-07 17:37:05.000000000 +0000
++++ ./Rakefile	2014-09-01 19:12:56.379106833 +0000
+@@ -80,29 +80,29 @@
+     @java_bin = "/opt/puppet/bin/java"
+ else
+     @install_dir = case @osfamily
+-      when /openbsd/
+-        "/usr/local/share/puppetdb"
++      when /openbsd/, /freebsd/
++        "%%PREFIX%%/share/puppetdb"
+       else
+         "/usr/share/puppetdb"
+       end
+-    @etc_dir = "/etc/puppetdb"
+-    @config_dir = "/etc/puppetdb/conf.d"
+-    @lib_dir = "/var/lib/puppetdb"
++    @etc_dir = "%%PREFIX%%/etc/puppetdb"
++    @config_dir = "%%PREFIX%%/etc/puppetdb/conf.d"
++    @lib_dir = "/var/db/puppetdb"
+     @libexec_dir = case @osfamily
+-      when /openbsd/
++      when /openbsd/, /freebsd/
+         "/usr/local/libexec/puppetdb"
+       when /redhat/, /suse/, /darwin/, /bsd/
+         "/usr/libexec/puppetdb"
+       else
+         "/usr/lib/puppetdb"
+       end
+-    @link = "/usr/share/puppetdb"
++    @link = "%%PREFIX%%/share/puppetdb"
+     @name = "puppetdb"
+     @sbin_dir = case @osfamily
+       when /archlinux/
+         "/usr/bin"
+       else
+-        "/usr/sbin"
++        "%%PREFIX%%/sbin"
+       end
+ end
+ 
+@@ -129,6 +129,8 @@
+     @plibdir = @pe ? PE_SITELIBDIR : (%x(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']").chomp)
+   when /openbsd/
+     @plibdir = @pe ? PE_SITELIBDIR : '/usr/local/lib/ruby/site_ruby/1.9.1'
++  when /freebsd/
++    @plibdir = @pe ? PE_SITELIBDIR : Facter.value(:rubysitedir).chomp
+   when /archlinux/
+     @plibdir = @pe ? PE_SITELIBDIR : (%x(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]').chomp)
+ end

Added: head/databases/puppetdb/files/patch-ext__files__config.ini
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__config.ini	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,14 @@
+--- ./ext/files/config.ini.orig	2014-09-01 19:00:53.886157411 +0000
++++ ./ext/files/config.ini	2014-09-01 19:06:59.957163437 +0000
+@@ -3,9 +3,9 @@
+ 
+ [global]
+ # Store mq/db data in a custom directory
+-vardir = /var/lib/puppetdb
++vardir = /var/db/puppetdb
+ # Use an external logback config file
+-logging-config = /etc/puppetdb/logback.xml
++logging-config = %%PREFIX%%/etc/puppetdb/logback.xml
+ 
+ 
+ [command-processing]

Added: head/databases/puppetdb/files/patch-ext__files__database.ini
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__database.ini	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,11 @@
+--- ./ext/files/database.ini.orig	2014-07-07 17:37:41.000000000 +0000
++++ ./ext/files/database.ini	2014-09-01 19:00:53.907156973 +0000
+@@ -12,7 +12,7 @@
+ # For the embedded DB: file:/path/to/database;hsqldb.tx=mvcc;sql.syntax_pgs=true
+ # For PostgreSQL: //host:port/databaseName
+ # Defaults to embedded DB located in <vardir>/db
+-subname = file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true
++subname = file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true
+ 
+ # Connect as a specific user
+ # username = foobar

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,20 @@
+--- ./ext/files/puppetdb.orig	2014-09-01 19:00:53.880156353 +0000
++++ ./ext/files/puppetdb	2014-09-01 19:03:36.589145104 +0000
+@@ -6,7 +6,7 @@
+ 
+ # Display usage then exit
+ function usage {
+-  local libexecdir=/usr/libexec/puppetdb
++  local libexecdir=%%PREFIX%%/libexec/puppetdb
+   local files="${libexecdir}/puppetdb-*"
+ 
+   # Seems trying to match an asterisk is hard in bash
+@@ -48,7 +48,7 @@
+ function execsubcommand {
+   sub=$1
+   shift
+-  cmd="/usr/libexec/puppetdb/puppetdb-${sub}"
++  cmd="%%PREFIX%%/libexec/puppetdb/puppetdb-${sub}"
+ 
+   if [ -e ${cmd} ]; then
+     exec "${cmd}" "$@"

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb-anonymize
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb-anonymize	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,9 @@
+--- ./ext/files/puppetdb-anonymize.orig	2014-09-01 19:00:53.880156353 +0000
++++ ./ext/files/puppetdb-anonymize	2014-09-01 19:08:46.772124148 +0000
+@@ -1,5 +1,5 @@
+ #!/bin/bash
+ 
+-. /usr/libexec/puppetdb/puppetdb.env
++. %%PREFIX%%/libexec/puppetdb/puppetdb.env
+ 
+ ${JAVA_BIN} -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom -cp ${INSTALL_DIR}/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core anonymize "$@"

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb-export
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb-export	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,9 @@
+--- ./ext/files/puppetdb-export.orig	2014-09-01 19:00:53.880156353 +0000
++++ ./ext/files/puppetdb-export	2014-09-01 19:05:29.845137420 +0000
+@@ -1,5 +1,5 @@
+ #!/bin/bash
+ 
+-. /usr/libexec/puppetdb/puppetdb.env
++. %%PREFIX%%/libexec/puppetdb/puppetdb.env
+ 
+ ${JAVA_BIN} -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom -cp ${INSTALL_DIR}/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core export "$@"

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb-foreground
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb-foreground	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,12 @@
+--- ./ext/files/puppetdb-foreground.orig	2014-09-01 19:00:53.881157604 +0000
++++ ./ext/files/puppetdb-foreground	2014-09-01 19:09:39.676120322 +0000
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+ 
+-. /usr/libexec/puppetdb/puppetdb.env
++. %%PREFIX%%/libexec/puppetdb/puppetdb.env
+ 
+ ARGS="$@"
+ 
+-su ${USER} -s /bin/bash -c "${JAVA_BIN} ${JAVA_ARGS} -cp ${INSTALL_DIR}/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core services -c ${CONFIG} ${@}"
++su ${USER} -s %%PREFIX%%/bin/bash -c "${JAVA_BIN} ${JAVA_ARGS} -cp ${INSTALL_DIR}/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core services -c ${CONFIG} ${@}"

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb-import
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb-import	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,9 @@
+--- ./ext/files/puppetdb-import.orig	2014-09-01 19:00:53.881157604 +0000
++++ ./ext/files/puppetdb-import	2014-09-01 19:08:07.084126366 +0000
+@@ -1,5 +1,5 @@
+ #!/bin/bash
+ 
+-. /usr/libexec/puppetdb/puppetdb.env
++. %%PREFIX%%/libexec/puppetdb/puppetdb.env
+ 
+ ${JAVA_BIN} -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom -cp ${INSTALL_DIR}/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core import "$@"

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb-ssl-setup
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb-ssl-setup	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,17 @@
+--- ./ext/files/puppetdb-ssl-setup.orig	2014-09-01 19:00:53.881157604 +0000
++++ ./ext/files/puppetdb-ssl-setup	2014-09-01 19:04:54.653139914 +0000
+@@ -226,11 +226,11 @@
+   agent_confdir=`puppet agent --configprint confdir`
+   agent_vardir=`puppet agent --configprint vardir`
+ 
+-  if [ -d "/etc/puppetlabs/puppetdb" ] ; then
+-    puppetdb_confdir="/etc/puppetlabs/puppetdb"
++  if [ -d "%%PREFIX%%/etc/puppetlabs/puppetdb" ] ; then
++    puppetdb_confdir="%%PREFIX%%/etc/puppetlabs/puppetdb"
+     user=pe-puppetdb
+   else
+-    puppetdb_confdir="/etc/puppetdb"
++    puppetdb_confdir="%%PREFIX%%/etc/puppetdb"
+     user=puppetdb
+   fi
+ fi

Added: head/databases/puppetdb/files/patch-ext__files__puppetdb.newsyslog
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-ext__files__puppetdb.newsyslog	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,6 @@
+--- ./ext/files/puppetdb.newsyslog.orig	2014-09-01 19:00:53.887156756 +0000
++++ ./ext/files/puppetdb.newsyslog	2014-09-01 19:00:53.887156756 +0000
+@@ -0,0 +1,3 @@
++# See man 5 newsyslog.conf or man.freebsd.org/newsyslog.conf(5)
++# logfilename			[owner:group]		mode	count	size	when	flags [/pid_file] [sig_num]
++/var/log/puppetdb/puppetdb.log	puppetdb:puppetdb	640	12	*	$W6D0	J	/var/run/puppetdb/puppetdb.pid

Added: head/databases/puppetdb/files/patch-tasks__install.rake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/patch-tasks__install.rake	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,76 @@
+--- tasks/install.rake.orig	2014-07-07 17:37:05.000000000 +0000
++++ tasks/install.rake	2014-09-01 19:42:02.500986018 +0000
+@@ -14,24 +14,21 @@
+   @osfamily = Facter.value(:osfamily).downcase
+   mkdir_p "#{DESTDIR}/#{@install_dir}"
+   mkdir_p "#{DESTDIR}/#{@config_dir}"
+-  mkdir_p "#{DESTDIR}/#{@config_dir}/.."
+   mkdir_p "#{DESTDIR}/#{@log_dir}"
+-  mkdir_p "#{DESTDIR}/etc/init.d/"
++  unless @osfamily =~ /freebsd/
++    mkdir_p "#{DESTDIR}/etc/init.d/"
++  end
+   mkdir_p "#{DESTDIR}/#{@lib_dir}"
+   mkdir_p "#{DESTDIR}/#{@libexec_dir}"
+   mkdir_p "#{DESTDIR}/#{@sbin_dir}"
+-  mkdir_p "#{DESTDIR}/etc/logrotate.d/"
+-  ln_sf @config_dir, "#{DESTDIR}/#{@lib_dir}/config"
+-  ln_sf @log_dir, "#{DESTDIR}/#{@install_dir}/log"
++#  ln_sf @config_dir, "#{DESTDIR}/#{@lib_dir}/config"
++#  ln_sf @log_dir, "#{DESTDIR}/#{@install_dir}/log"
+ 
+   unless @pe
+-    mkdir_p "#{DESTDIR}/var/lib/puppetdb/state"
+-    mkdir_p "#{DESTDIR}/var/lib/puppetdb/db"
+-    mkdir_p "#{DESTDIR}/var/lib/puppetdb/mq"
+-    ln_sf "#{@lib_dir}/state", "#{DESTDIR}#{@link}/state"
+-    ln_sf "#{@lib_dir}/db", "#{DESTDIR}#{@link}/db"
+-    ln_sf "#{@lib_dir}/mq", "#{DESTDIR}#{@link}/mq"
+-    mkdir_p "#{DESTDIR}/etc/puppetdb"
++    mkdir_p "#{DESTDIR}#{@lib_dir}/state"
++    mkdir_p "#{DESTDIR}#{@lib_dir}/db"
++    mkdir_p "#{DESTDIR}#{@lib_dir}/mq"
++    mkdir_p "#{DESTDIR}#{@etc_dir}"
+   else
+     mkdir_p "#{DESTDIR}#{@lib_dir}/state"
+     mkdir_p "#{DESTDIR}#{@lib_dir}/db"
+@@ -40,11 +37,11 @@
+   end
+ 
+   cp_p JAR_FILE, "#{DESTDIR}/#{@install_dir}"
+-  cp_pr "ext/files/config.ini", "#{DESTDIR}/#{@config_dir}"
+-  cp_pr "ext/files/database.ini", "#{DESTDIR}/#{@config_dir}"
+-  cp_pr "ext/files/jetty.ini", "#{DESTDIR}/#{@config_dir}"
+-  cp_pr "ext/files/repl.ini", "#{DESTDIR}/#{@config_dir}"
+-  cp_pr "ext/files/puppetdb.logrotate", "#{DESTDIR}/etc/logrotate.d/#{@name}"
++  cp_pr "ext/files/config.ini", "#{DESTDIR}/#{@config_dir}/config.ini.sample"
++  cp_pr "ext/files/database.ini", "#{DESTDIR}/#{@config_dir}/database.ini.sample"
++  cp_pr "ext/files/jetty.ini", "#{DESTDIR}/#{@config_dir}/jetty.ini.sample"
++  cp_pr "ext/files/repl.ini", "#{DESTDIR}/#{@config_dir}/repl.ini.sample"
++  cp_pr "ext/files/puppetdb.newsyslog", "#{DESTDIR}%%PREFIX%%/etc/newsyslog.conf.d/#{@name}"
+   cp_pr "ext/files/logback.xml", "#{DESTDIR}/#{@config_dir}/.."
+   cp_pr "ext/files/puppetdb", "#{DESTDIR}/#{@sbin_dir}"
+ 
+@@ -100,6 +97,11 @@
+     cp_p "ext/files/puppetdb.openbsd.init", "#{DESTDIR}/etc/rc.d/#{@name}.rc"
+     cp_p "ext/files/puppetdb.env", "#{DESTDIR}/#{@libexec_dir}/#{@name}.env"
+     chmod 0755, "#{DESTDIR}/etc/rc.d/#{@name}.rc"
++  elsif @osfamily == "freebsd"
++    #mkdir_p "#{DESTDIR}/etc/rc.d/"
++    #cp_p "ext/files/puppetdb.openbsd.init", "#{DESTDIR}/etc/rc.d/#{@name}.rc"
++    #cp_p "ext/files/puppetdb.env", "#{DESTDIR}/#{@libexec_dir}/#{@name}.env"
++    #chmod 0755, "#{DESTDIR}/etc/rc.d/#{@name}.rc"
+   elsif @osfamily == "archlinux"
+     #systemd!
+     mkdir_p "#{DESTDIR}/etc/sysconfig"
+@@ -113,10 +115,5 @@
+   end
+   chmod 0750, "#{DESTDIR}/#{@config_dir}"
+   chmod 0640, "#{DESTDIR}/#{@config_dir}/../logback.xml"
+-  chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb-ssl-setup"
+-  chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb-foreground"
+-  chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb-import"
+-  chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb-export"
+-  chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb-anonymize"
+   chmod 0700, "#{DESTDIR}/#{@sbin_dir}/puppetdb"
+ end

Added: head/databases/puppetdb/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/pkg-message.in	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,6 @@
+If this is a new installation, please run the follow to setup your SSL/puppetdb
+server:
+
+%%PREFIX%%/sbin/puppetdb ssl-setup
+
+Please also remember to add puppetdb_enable="YES" into your rc.conf.

Added: head/databases/puppetdb/files/puppetdb.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/files/puppetdb.in	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: puppetdb
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Configuration settings for puppetdb in /etc/rc.conf:
+#
+# puppetdb_enable (bool):
+#   Set to "NO" by default.
+#   Set it to "YES" to enable puppetdb
+#
+# puppetdb_args (str):
+#   Extra arguments passed to start command
+#
+# puppetdb_java_home (str):
+#   Set to "%%JAVA_HOME%%" by default.
+#   Set the Java virtual machine to run puppetdb
+#
+# puppetdb_java_opts (str):
+#   Set to "" by default.
+#   Java VM args to use.
+#
+# puppetdb_user (str):
+#   Set to "puppetdb" by default.
+#   User to run puppetdb as.
+#
+# puppetdb_group (str):
+#   Set to "puppetdb" by default.
+#   Group for data file ownership.
+#
+# puppetdb_log_file (str):
+#   Set to "%%PUPPETDB_LOG_FILE%%" by default.
+#   Log file location.
+#
+
+. /etc/rc.subr
+
+name="puppetdb"
+rcvar=puppetdb_enable
+
+load_rc_config "${name}"
+
+: ${puppetdb_enable="NO"}
+: ${puppetdb_args="services -c %%PREFIX%%/etc/puppetdb/conf.d"}
+: ${puppetdb_java_home="%%JAVA_HOME%%"}
+: ${puppetdb_user="puppetdb"}
+: ${puppetdb_group="puppetdb"}
+: ${puppetdb_log_file="%%PUPPETDB_LOG_FILE%%"}
+
+pidfile="/var/run/puppetdb/puppetdb.pid"
+command="/usr/sbin/daemon"
+java_cmd="${puppetdb_java_home}/bin/java"
+procname="${java_cmd}"
+command_args="-p ${pidfile} ${java_cmd} -cp %%DATADIR%%/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core ${puppetdb_args} > ${puppetdb_log_file} 2>&1"
+
+
+required_files="${java_cmd}"
+
+start_precmd="puppetdb_prestart"
+
+puppetdb_prestart() {
+  if [ ! -f "${puppetdb_log_file}" ]; then
+    touch "${puppetdb_log_file}"
+    chown "${puppetdb_user}:${puppetdb_group}" "${puppetdb_log_file}"
+    chmod 640 "${puppetdb_log_file}"
+  fi
+  if [ ! -d "/var/run/puppetdb" ]; then
+    install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/run/puppetdb"
+  fi
+
+  chown -R "root:${puppetdb_group}" "%%PREFIX%%/etc/puppetdb/conf.d"
+  chmod 0750 "%%PREFIX%%/etc/puppetdb/conf.d"
+
+  chown "root:${puppetdb_group}" "%%PREFIX%%/etc/puppetdb/logback.xml"
+  chmod 0640 "%%PREFIX%%/etc/puppetdb/logback.xml"
+
+  chown -R "${puppetdb_user}:${puppetdb_group}" "/var/db/puppetdb"
+  chmod 0750 "/var/db/puppetdb"
+}
+
+run_rc_command "$1"

Added: head/databases/puppetdb/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/pkg-descr	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,3 @@
+The PuppetDB storeconfigs backend
+
+WWW: https://docs.puppetlabs.com/puppetdb/latest/

Added: head/databases/puppetdb/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/puppetdb/pkg-plist	Sat Sep  6 19:21:56 2014	(r367468)
@@ -0,0 +1,33 @@
+%%ETCDIR%%/logback.xml
+etc/newsyslog.conf.d/puppetdb
+libexec/puppetdb/puppetdb-anonymize
+libexec/puppetdb/puppetdb-export
+libexec/puppetdb/puppetdb-foreground
+libexec/puppetdb/puppetdb-import
+libexec/puppetdb/puppetdb-ssl-setup
+sbin/puppetdb-anonymize
+sbin/puppetdb-export
+sbin/puppetdb-foreground
+sbin/puppetdb-import
+sbin/puppetdb-ssl-setup
+sbin/puppetdb
+%%DATADIR%%/puppetdb.jar
+@group puppetdb
+@sample etc/puppetdb/conf.d/config.ini.sample
+@sample etc/puppetdb/conf.d/database.ini.sample
+@sample etc/puppetdb/conf.d/jetty.ini.sample
+@sample etc/puppetdb/conf.d/repl.ini.sample
+@group wheel
+@dirrmtry etc/puppetdb/conf.d
+@dirrmtry etc/puppetdb
+@dirrm libexec/puppetdb
+@dirrm %%DATADIR%%
+@cwd /
+@mode 0750
+@dirrmtry var/db/puppetdb/state
+@dirrmtry var/db/puppetdb/db
+@dirrmtry var/db/puppetdb/mq
+@dirrmtry var/db/puppetdb
+@owner puppetdb
+@dirrmtry var/log/puppetdb
+@cwd %%RESETPREFIX%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409061921.s86JLucl072803>