aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile2
-rw-r--r--databases/puppetdb-terminus4/Makefile2
-rw-r--r--databases/puppetdb-terminus5/Makefile2
-rw-r--r--databases/puppetdb-terminus6/Makefile28
-rw-r--r--databases/puppetdb-terminus6/distinfo3
-rw-r--r--databases/puppetdb-terminus6/files/patch-Makefile62
-rw-r--r--databases/puppetdb-terminus6/pkg-descr3
-rw-r--r--databases/puppetdb-terminus6/pkg-plist17
-rw-r--r--databases/puppetdb4/Makefile2
-rw-r--r--databases/puppetdb5/Makefile2
-rw-r--r--databases/puppetdb6/Makefile52
-rw-r--r--databases/puppetdb6/distinfo3
-rw-r--r--databases/puppetdb6/files/patch-Makefile37
-rw-r--r--databases/puppetdb6/files/patch-ext_bin_puppetdb15
-rw-r--r--databases/puppetdb6/files/patch-ext_cli_ssl-setup11
-rw-r--r--databases/puppetdb6/files/patch-ext_config_conf.d_config.ini15
-rw-r--r--databases/puppetdb6/files/patch-ext_config_conf.d_jetty.ini8
-rw-r--r--databases/puppetdb6/files/patch-ext_config_logback.xml29
-rw-r--r--databases/puppetdb6/files/patch-ext_config_request-logging.xml14
-rw-r--r--databases/puppetdb6/files/pkg-message.in6
-rw-r--r--databases/puppetdb6/files/puppetdb.in91
-rw-r--r--databases/puppetdb6/pkg-descr3
-rw-r--r--databases/puppetdb6/pkg-plist21
23 files changed, 424 insertions, 4 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 914eb7466276..c7a472533c8c 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -762,8 +762,10 @@
SUBDIR += pspg
SUBDIR += puppetdb-terminus4
SUBDIR += puppetdb-terminus5
+ SUBDIR += puppetdb-terminus6
SUBDIR += puppetdb4
SUBDIR += puppetdb5
+ SUBDIR += puppetdb6
SUBDIR += pure-sql3
SUBDIR += puredb
SUBDIR += pxlib
diff --git a/databases/puppetdb-terminus4/Makefile b/databases/puppetdb-terminus4/Makefile
index 9d523077a481..569dce5b51e4 100644
--- a/databases/puppetdb-terminus4/Makefile
+++ b/databases/puppetdb-terminus4/Makefile
@@ -14,7 +14,7 @@ LICENSE= APACHE20
BUILD_DEPENDS= puppet4>=0:sysutils/puppet4
-CONFLICTS_INSTALL= puppetdb-terminus3-* puppetdb-terminus5-*
+CONFLICTS_INSTALL= puppetdb-terminus5-* puppetdb-terminus6-*
USE_RUBY= yes
NO_BUILD= yes
USES= gmake
diff --git a/databases/puppetdb-terminus5/Makefile b/databases/puppetdb-terminus5/Makefile
index fb7f44bc85e4..6e1aa60dc3bc 100644
--- a/databases/puppetdb-terminus5/Makefile
+++ b/databases/puppetdb-terminus5/Makefile
@@ -14,7 +14,7 @@ LICENSE= APACHE20
BUILD_DEPENDS= puppet5>=0:sysutils/puppet5
-CONFLICTS_INSTALL= puppetdb-terminus3-* puppetdb-terminus4-*
+CONFLICTS_INSTALL= puppetdb-terminus4-* puppetdb-terminus6-*
USE_RUBY= yes
NO_BUILD= yes
USES= gmake
diff --git a/databases/puppetdb-terminus6/Makefile b/databases/puppetdb-terminus6/Makefile
new file mode 100644
index 000000000000..3e96b6453028
--- /dev/null
+++ b/databases/puppetdb-terminus6/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= puppetdb-terminus
+PORTVERSION= 6.0.0
+CATEGORIES= databases ruby
+MASTER_SITES= https://downloads.puppetlabs.com/puppetdb/
+PKGNAMESUFFIX= 6
+DISTNAME= puppetdb-${PORTVERSION}
+
+MAINTAINER= puppet@FreeBSD.org
+COMMENT= PuppetDB storeconfigs backend terminus module
+
+LICENSE= APACHE20
+
+BUILD_DEPENDS= puppet6>=0:sysutils/puppet6
+
+CONFLICTS_INSTALL= puppetdb-terminus4-* puppetdb-terminus5-*
+USE_RUBY= yes
+NO_BUILD= yes
+USES= gmake
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/Makefile
+
+do-install:
+ @cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} ${GMAKE} install-puppetdb-termini
+
+.include <bsd.port.mk>
diff --git a/databases/puppetdb-terminus6/distinfo b/databases/puppetdb-terminus6/distinfo
new file mode 100644
index 000000000000..ed832e11bfcf
--- /dev/null
+++ b/databases/puppetdb-terminus6/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1537338868
+SHA256 (puppetdb-6.0.0.tar.gz) = c4821f6c6acb1e4250a36462cc7b51ffadc2d1510b9b42887b47c1bf75afa070
+SIZE (puppetdb-6.0.0.tar.gz) = 23168375
diff --git a/databases/puppetdb-terminus6/files/patch-Makefile b/databases/puppetdb-terminus6/files/patch-Makefile
new file mode 100644
index 000000000000..11bbbff369e8
--- /dev/null
+++ b/databases/puppetdb-terminus6/files/patch-Makefile
@@ -0,0 +1,62 @@
+--- Makefile.orig
++++ Makefile
+@@ -1,7 +1,7 @@
+ prefix = /usr/local
+ datadir = $(prefix)/share
+ confdir = /etc
+-rubylibdir = $(shell ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
++rubylibdir = $(shell %%PREFIX%%/bin/ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
+ rundir = /var/run
+ bindir = /usr/bin
+
+@@ -34,22 +34,34 @@
+
+
+ install-puppetdb-termini:
+- install -Dm 0644 puppet/face/node/deactivate.rb "$(DESTDIR)$(rubylibdir)/puppet/face/node/deactivate.rb"
+- install -Dm 0644 puppet/face/node/status.rb "$(DESTDIR)$(rubylibdir)/puppet/face/node/status.rb"
+- install -Dm 0644 puppet/functions/puppetdb_query.rb "$(DESTDIR)$(rubylibdir)/puppet/functions/puppetdb_query.rb"
+- install -Dm 0644 puppet/indirector/catalog/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/catalog/puppetdb.rb"
+- install -Dm 0644 puppet/indirector/facts/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/facts/puppetdb.rb"
+- install -Dm 0644 puppet/indirector/facts/puppetdb_apply.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/facts/puppetdb_apply.rb"
+- install -Dm 0644 puppet/indirector/node/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/node/puppetdb.rb"
+- install -Dm 0644 puppet/indirector/resource/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/resource/puppetdb.rb"
+- install -Dm 0644 puppet/reports/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/reports/puppetdb.rb"
+- install -Dm 0644 puppet/util/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb.rb"
+- install -Dm 0644 puppet/util/puppetdb/atom.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/atom.rb"
+- install -Dm 0644 puppet/util/puppetdb/char_encoding.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/char_encoding.rb"
+- install -Dm 0644 puppet/util/puppetdb/command.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/command.rb"
+- install -Dm 0644 puppet/util/puppetdb/command_names.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/command_names.rb"
+- install -Dm 0644 puppet/util/puppetdb/config.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/config.rb"
+- install -Dm 0644 puppet/util/puppetdb/http.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/http.rb"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/face"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/face/node"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/functions"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/indirector"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/indirector/catalog"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/indirector/facts"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/indirector/node"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/indirector/resource"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/reports"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/util"
++ install -d -m 0755 "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb"
++ install -m 0644 puppet/face/node/deactivate.rb "$(DESTDIR)$(rubylibdir)/puppet/face/node/deactivate.rb"
++ install -m 0644 puppet/face/node/status.rb "$(DESTDIR)$(rubylibdir)/puppet/face/node/status.rb"
++ install -m 0644 puppet/functions/puppetdb_query.rb "$(DESTDIR)$(rubylibdir)/puppet/functions/puppetdb_query.rb"
++ install -m 0644 puppet/indirector/catalog/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/catalog/puppetdb.rb"
++ install -m 0644 puppet/indirector/facts/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/facts/puppetdb.rb"
++ install -m 0644 puppet/indirector/facts/puppetdb_apply.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/facts/puppetdb_apply.rb"
++ install -m 0644 puppet/indirector/node/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/node/puppetdb.rb"
++ install -m 0644 puppet/indirector/resource/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/indirector/resource/puppetdb.rb"
++ install -m 0644 puppet/reports/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/reports/puppetdb.rb"
++ install -m 0644 puppet/util/puppetdb.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb.rb"
++ install -m 0644 puppet/util/puppetdb/atom.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/atom.rb"
++ install -m 0644 puppet/util/puppetdb/char_encoding.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/char_encoding.rb"
++ install -m 0644 puppet/util/puppetdb/command.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/command.rb"
++ install -m 0644 puppet/util/puppetdb/command_names.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/command_names.rb"
++ install -m 0644 puppet/util/puppetdb/config.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/config.rb"
++ install -m 0644 puppet/util/puppetdb/http.rb "$(DESTDIR)$(rubylibdir)/puppet/util/puppetdb/http.rb"
+
+ install-rpm-sysv-init: install-rpm-preinst
+ install -d -m 0755 "$(DESTDIR)$(initdir)"
diff --git a/databases/puppetdb-terminus6/pkg-descr b/databases/puppetdb-terminus6/pkg-descr
new file mode 100644
index 000000000000..82720763fd9c
--- /dev/null
+++ b/databases/puppetdb-terminus6/pkg-descr
@@ -0,0 +1,3 @@
+The PuppetDB storeconfigs backend terminus module.
+
+WWW: https://docs.puppetlabs.com/puppetdb/latest/
diff --git a/databases/puppetdb-terminus6/pkg-plist b/databases/puppetdb-terminus6/pkg-plist
new file mode 100644
index 000000000000..a12b86eb6a1a
--- /dev/null
+++ b/databases/puppetdb-terminus6/pkg-plist
@@ -0,0 +1,17 @@
+%%RUBY_SITELIBDIR%%/puppet/face/node/deactivate.rb
+%%RUBY_SITELIBDIR%%/puppet/face/node/status.rb
+%%RUBY_SITELIBDIR%%/puppet/functions/puppetdb_query.rb
+%%RUBY_SITELIBDIR%%/puppet/indirector/catalog/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/indirector/facts/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/indirector/facts/puppetdb_apply.rb
+%%RUBY_SITELIBDIR%%/puppet/indirector/node/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/indirector/resource/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/reports/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/atom.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/char_encoding.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/command.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/command_names.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/config.rb
+%%RUBY_SITELIBDIR%%/puppet/util/puppetdb/http.rb
+
diff --git a/databases/puppetdb4/Makefile b/databases/puppetdb4/Makefile
index 5ed1d7fe923f..8a69e9260a82 100644
--- a/databases/puppetdb4/Makefile
+++ b/databases/puppetdb4/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS= bash:shells/bash \
USE_RC_SUBR= puppetdb
-CONFLICTS_INSTALL= puppetdb3-* puppetdb5-*
+CONFLICTS_INSTALL= puppetdb5-* puppetdb6-*
USES= shebangfix
SHEBANG_FILES= ext/bin/puppetdb \
ext/cli/anonymize \
diff --git a/databases/puppetdb5/Makefile b/databases/puppetdb5/Makefile
index 4a6df20cd9d7..34f3e240c217 100644
--- a/databases/puppetdb5/Makefile
+++ b/databases/puppetdb5/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS= bash:shells/bash \
USE_RC_SUBR= puppetdb
-CONFLICTS_INSTALL= puppetdb3-* puppetdb4-*
+CONFLICTS_INSTALL= puppetdb4-* puppetdb5-*
USES= shebangfix
SHEBANG_FILES= ext/bin/puppetdb \
ext/cli/anonymize \
diff --git a/databases/puppetdb6/Makefile b/databases/puppetdb6/Makefile
new file mode 100644
index 000000000000..79778dce6ed1
--- /dev/null
+++ b/databases/puppetdb6/Makefile
@@ -0,0 +1,52 @@
+# $FreeBSD$
+
+PORTNAME= puppetdb
+PORTVERSION= 6.0.0
+CATEGORIES= databases java
+MASTER_SITES= https://downloads.puppetlabs.com/puppetdb/
+PKGNAMESUFFIX= 6
+
+MAINTAINER= puppet@FreeBSD.org
+COMMENT= PuppetDB storeconfigs backend
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= bash:shells/bash \
+ puppet:sysutils/puppet6
+
+USE_RC_SUBR= puppetdb
+
+CONFLICTS_INSTALL= puppetdb4-* puppetdb5-*
+USES= shebangfix
+SHEBANG_FILES= ext/bin/puppetdb \
+ ext/cli/anonymize \
+ ext/cli/config-migration \
+ ext/cli/foreground \
+ ext/cli/ssl-setup \
+ ext/cli/start \
+ ext/cli/stop \
+ ext/cli/reload \
+ ext/cli/upgrade \
+ ext/ezbake-functions.sh
+USE_JAVA= yes
+NO_ARCH= yes
+NO_BUILD= yes
+JAVA_VERSION= 1.7+
+
+USERS= puppetdb
+GROUPS= puppetdb
+
+SUB_LIST= JAVA_HOME=${JAVA_HOME}
+SUB_FILES= pkg-message
+
+post-patch:
+.for file in Makefile ext/bin/puppetdb ext/cli/ssl-setup \
+ ext/config/conf.d/jetty.ini ext/config/conf.d/config.ini
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/${file}
+.endfor
+ @${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" ${WRKSRC}/ext/bin/puppetdb
+
+do-install:
+ @cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} make install-puppetdb
+
+.include <bsd.port.mk>
diff --git a/databases/puppetdb6/distinfo b/databases/puppetdb6/distinfo
new file mode 100644
index 000000000000..4d15b003c3cb
--- /dev/null
+++ b/databases/puppetdb6/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1537338682
+SHA256 (puppetdb-6.0.0.tar.gz) = c4821f6c6acb1e4250a36462cc7b51ffadc2d1510b9b42887b47c1bf75afa070
+SIZE (puppetdb-6.0.0.tar.gz) = 23168375
diff --git a/databases/puppetdb6/files/patch-Makefile b/databases/puppetdb6/files/patch-Makefile
new file mode 100644
index 000000000000..5466cf74ae28
--- /dev/null
+++ b/databases/puppetdb6/files/patch-Makefile
@@ -0,0 +1,37 @@
+--- Makefile.orig
++++ Makefile
+@@ -1,23 +1,23 @@
+-prefix = /usr/local
++prefix = %%PREFIX%%
+ datadir = $(prefix)/share
+-confdir = /etc
++confdir = %%PREFIX%%/etc
+ rubylibdir = $(shell ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
+ rundir = /var/run
+-bindir = /usr/bin
++bindir = %%PREFIX%%/bin
+
+ install-puppetdb:
+ install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb"
+ install -m 0644 puppetdb.jar "$(DESTDIR)$(datadir)/puppetdb"
+ install -m 0774 ext/ezbake-functions.sh "$(DESTDIR)$(datadir)/puppetdb"
+ install -m 0644 ext/ezbake.manifest "$(DESTDIR)$(datadir)/puppetdb"
+- install -d -m 0755 "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d"
+- install -m 0644 ext/config/bootstrap.cfg "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/bootstrap.cfg"
+- install -m 0644 ext/config/conf.d/config.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/config.ini"
+- install -m 0644 ext/config/conf.d/database.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/database.ini"
+- install -m 0644 ext/config/conf.d/jetty.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/jetty.ini"
+- install -m 0644 ext/config/conf.d/repl.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/repl.ini"
+- install -m 0644 ext/config/logback.xml "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/logback.xml"
+- install -m 0644 ext/config/request-logging.xml "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/request-logging.xml"
++ install -d -m 0755 "$(DESTDIR)$(confdir)/puppetdb/conf.d"
++ install -m 0644 ext/config/bootstrap.cfg "$(DESTDIR)$(confdir)/puppetdb/bootstrap.cfg.sample"
++ install -m 0644 ext/config/conf.d/config.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/config.ini.sample"
++ install -m 0644 ext/config/conf.d/database.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/database.ini.sample"
++ install -m 0644 ext/config/conf.d/jetty.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/jetty.ini.sample"
++ install -m 0644 ext/config/conf.d/repl.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/repl.ini.sample"
++ install -m 0644 ext/config/logback.xml "$(DESTDIR)$(confdir)/puppetdb/logback.xml.sample"
++ install -m 0644 ext/config/request-logging.xml "$(DESTDIR)$(confdir)/puppetdb/request-logging.xml.sample"
+ install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb/cli"
+ install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb/cli/apps"
+ install -d -m 0755 "$(DESTDIR)$(bindir)"
diff --git a/databases/puppetdb6/files/patch-ext_bin_puppetdb b/databases/puppetdb6/files/patch-ext_bin_puppetdb
new file mode 100644
index 000000000000..0a139b110d2e
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_bin_puppetdb
@@ -0,0 +1,15 @@
+--- ext/bin/puppetdb.orig 2016-03-17 04:17:10 UTC
++++ ext/bin/puppetdb
+@@ -5,6 +5,12 @@ if [ -r "/etc/default/puppetdb" ] ; then
+ . /etc/default/puppetdb
+ elif [ -r "/etc/sysconfig/puppetdb" ] ; then
+ . /etc/sysconfig/puppetdb
++elif [ `uname` == "FreeBSD" ] ; then
++ CONFIG="%%PREFIX%%/etc/puppetdb/conf.d"
++ INSTALL_DIR="%%DATADIR%%"
++ JAVA_BIN="%%PREFIX%%/bin/java"
++ JAVA_ARGS="-Xmx192m"
++ USER="puppet"
+ elif [ `uname` == "OpenBSD" ] ; then
+ JAVA_BIN=$(javaPathHelper -c puppetdb)
+ JAVA_ARGS="-Xmx192m"
diff --git a/databases/puppetdb6/files/patch-ext_cli_ssl-setup b/databases/puppetdb6/files/patch-ext_cli_ssl-setup
new file mode 100644
index 000000000000..ab86d849142d
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_cli_ssl-setup
@@ -0,0 +1,11 @@
+--- ext/cli/ssl-setup.orig 2016-03-17 04:17:10 UTC
++++ ext/cli/ssl-setup
+@@ -230,7 +230,7 @@ else
+ user=puppetdb
+ group=puppetdb
+
+- puppetdb_confdir="/etc/puppetlabs/puppetdb"
++ puppetdb_confdir="%%PREFIX%%/etc/puppetdb"
+ fi
+
+ set -e
diff --git a/databases/puppetdb6/files/patch-ext_config_conf.d_config.ini b/databases/puppetdb6/files/patch-ext_config_conf.d_config.ini
new file mode 100644
index 000000000000..390068840508
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_config_conf.d_config.ini
@@ -0,0 +1,15 @@
+--- ext/config/conf.d/config.ini.orig 2016-03-17 04:17:06 UTC
++++ ext/config/conf.d/config.ini
+@@ -3,10 +3,10 @@
+
+ [global]
+ # Store mq/db data in a custom directory
+-vardir = /opt/puppetlabs/server/data/puppetdb
++vardir = /var/db/puppetdb
+
+ # Use an external logback config file
+-logging-config = /etc/puppetlabs/puppetdb/logback.xml
++logging-config = %%PREFIX%%/etc/puppetdb/logback.xml
+
+ [command-processing]
+ # How many command-processing threads to use, defaults to (CPUs / 2)
diff --git a/databases/puppetdb6/files/patch-ext_config_conf.d_jetty.ini b/databases/puppetdb6/files/patch-ext_config_conf.d_jetty.ini
new file mode 100644
index 000000000000..42d5665a0f64
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_config_conf.d_jetty.ini
@@ -0,0 +1,8 @@
+--- ext/config/conf.d/jetty.ini.orig 2016-03-17 04:17:06 UTC
++++ ext/config/conf.d/jetty.ini
+@@ -30,4 +30,4 @@ port = 8080
+
+ # Access logging configuration path. To turn off access logging
+ # comment out the line with `access-log-config=...`
+-access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml
++access-log-config = %%PREFIX%%/etc/puppetdb/request-logging.xml
diff --git a/databases/puppetdb6/files/patch-ext_config_logback.xml b/databases/puppetdb6/files/patch-ext_config_logback.xml
new file mode 100644
index 000000000000..08cb543440aa
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_config_logback.xml
@@ -0,0 +1,29 @@
+--- ext/config/logback.xml.orig 2017-04-24 12:27:57.366296793 -0700
++++ ext/config/logback.xml 2017-04-24 12:28:48.723259627 -0700
+@@ -6,10 +6,10 @@
+ </appender>
+
+ <appender name="F1" class="ch.qos.logback.core.rolling.RollingFileAppender">
+- <file>/var/log/puppetlabs/puppetdb/puppetdb.log</file>
++ <file>/var/log/puppetdb/puppetdb.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++ <fileNamePattern>/var/log/puppetdb/puppetdb-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+ <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+ <maxFileSize>200MB</maxFileSize>
+ <maxHistory>90</maxHistory>
+@@ -31,11 +31,11 @@
+ level="info"/>
+
+ <appender name="STATUS" class="ch.qos.logback.core.rolling.RollingFileAppender">
+- <file>/var/log/puppetlabs/puppetdb/puppetdb-status.log</file>
++ <file>/var/log/puppetdb/puppetdb-status.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <!-- rollover daily -->
+- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++ <fileNamePattern>/var/log/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+ <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+ <maxFileSize>200MB</maxFileSize>
+ <maxHistory>90</maxHistory>
diff --git a/databases/puppetdb6/files/patch-ext_config_request-logging.xml b/databases/puppetdb6/files/patch-ext_config_request-logging.xml
new file mode 100644
index 000000000000..51b90d0e844e
--- /dev/null
+++ b/databases/puppetdb6/files/patch-ext_config_request-logging.xml
@@ -0,0 +1,14 @@
+--- ext/config/request-logging.xml.orig 2017-04-24 12:32:16.604464262 -0700
++++ ext/config/request-logging.xml 2017-04-24 12:32:46.404637027 -0700
+@@ -1,9 +1,9 @@
+ <configuration debug="false">
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+- <file>/var/log/puppetlabs/puppetdb/puppetdb-access.log</file>
++ <file>/var/log/puppetdb/puppetdb-access.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++ <fileNamePattern>/var/log/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
+ <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
+ <maxFileSize>200MB</maxFileSize>
+ <maxHistory>90</maxHistory>
diff --git a/databases/puppetdb6/files/pkg-message.in b/databases/puppetdb6/files/pkg-message.in
new file mode 100644
index 000000000000..4e13534c21f6
--- /dev/null
+++ b/databases/puppetdb6/files/pkg-message.in
@@ -0,0 +1,6 @@
+If this is a new installation, please run the follow to setup your SSL/puppetdb
+server:
+
+%%PREFIX%%/bin/puppetdb ssl-setup
+
+Please also remember to add puppetdb_enable="YES" into your rc.conf.
diff --git a/databases/puppetdb6/files/puppetdb.in b/databases/puppetdb6/files/puppetdb.in
new file mode 100644
index 000000000000..66bcf18618e8
--- /dev/null
+++ b/databases/puppetdb6/files/puppetdb.in
@@ -0,0 +1,91 @@
+#!/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 "/var/log/puppetdb/puppetdb.log" 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="/var/log/puppetdb/puppetdb.log"}
+
+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} -Djava.security.egd=/dev/urandom -cp %%DATADIR%%/puppetdb.jar clojure.main -m puppetlabs.puppetdb.main ${puppetdb_args} > ${puppetdb_log_file} 2>&1"
+
+
+required_files="${java_cmd}"
+
+start_precmd="puppetdb_prestart"
+
+puppetdb_prestart() {
+ if [ ! -d "/var/log/puppetdb" ]; then
+ install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/log/puppetdb"
+ fi
+ 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"
+
+ if [ ! -d "/var/db/puppetdb" ]; then
+ install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/db/puppetdb"
+ fi
+ chown -R "${puppetdb_user}:${puppetdb_group}" "/var/db/puppetdb"
+ chmod 0750 "/var/db/puppetdb"
+}
+
+run_rc_command "$1"
diff --git a/databases/puppetdb6/pkg-descr b/databases/puppetdb6/pkg-descr
new file mode 100644
index 000000000000..47fcde3773c6
--- /dev/null
+++ b/databases/puppetdb6/pkg-descr
@@ -0,0 +1,3 @@
+The PuppetDB storeconfigs backend
+
+WWW: https://docs.puppetlabs.com/puppetdb/latest/
diff --git a/databases/puppetdb6/pkg-plist b/databases/puppetdb6/pkg-plist
new file mode 100644
index 000000000000..99a04d10b5d5
--- /dev/null
+++ b/databases/puppetdb6/pkg-plist
@@ -0,0 +1,21 @@
+bin/puppetdb
+%%DATADIR%%/cli/apps/anonymize
+%%DATADIR%%/cli/apps/config-migration
+%%DATADIR%%/cli/apps/foreground
+%%DATADIR%%/cli/apps/ssl-setup
+%%DATADIR%%/cli/apps/start
+%%DATADIR%%/cli/apps/stop
+%%DATADIR%%/cli/apps/reload
+%%DATADIR%%/cli/apps/upgrade
+%%DATADIR%%/ezbake-functions.sh
+%%DATADIR%%/ezbake.manifest
+%%DATADIR%%/puppetdb.jar
+@group puppetdb
+@sample etc/puppetdb/bootstrap.cfg.sample
+@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
+@sample etc/puppetdb/logback.xml.sample
+@sample etc/puppetdb/request-logging.xml.sample
+@group