aboutsummaryrefslogtreecommitdiff
path: root/sysutils/puppetserver7
diff options
context:
space:
mode:
authorRomain Tartière <romain@FreeBSD.org>2020-12-04 20:42:36 +0000
committerRomain Tartière <romain@FreeBSD.org>2020-12-04 20:42:36 +0000
commit2944f974d5ef9fe59cb698c418b8107a6c984c07 (patch)
tree133ab86c90e1cb5dfa27108028f162e41e4a6b60 /sysutils/puppetserver7
parentd5d37957054845a86543b84c916fabcd5b4e438a (diff)
downloadports-2944f974d5ef9fe59cb698c418b8107a6c984c07.tar.gz
ports-2944f974d5ef9fe59cb698c418b8107a6c984c07.zip
Copy sysutils/puppetserver6 to sysutils/puppetserver7
The pre-commit hook does not allow me to copy and update the port at the same time. With hat: puppet
Notes
Notes: svn path=/head/; revision=557017
Diffstat (limited to 'sysutils/puppetserver7')
-rw-r--r--sysutils/puppetserver7/Makefile98
-rw-r--r--sysutils/puppetserver7/distinfo5
-rw-r--r--sysutils/puppetserver7/files/patch-ext__bin__puppetserver15
-rw-r--r--sysutils/puppetserver7/files/patch-ext__cli__foreground19
-rw-r--r--sysutils/puppetserver7/files/patch-ext__cli_defaults__cli-defaults.sh12
-rw-r--r--sysutils/puppetserver7/files/patch-ext__config__conf.d__global.conf9
-rw-r--r--sysutils/puppetserver7/files/patch-ext__config__conf.d__puppetserver.conf55
-rw-r--r--sysutils/puppetserver7/files/patch-ext__config__conf.d__webserver.conf9
-rw-r--r--sysutils/puppetserver7/files/patch-ext__config__logback.xml17
-rw-r--r--sysutils/puppetserver7/files/patch-ext__config__request-logging.xml15
-rw-r--r--sysutils/puppetserver7/files/patch-ext__ezbake-functions.sh11
-rw-r--r--sysutils/puppetserver7/files/patch-ffi.rb19
-rw-r--r--sysutils/puppetserver7/files/pkg-message.in17
-rw-r--r--sysutils/puppetserver7/files/puppetserver.in97
-rw-r--r--sysutils/puppetserver7/pkg-descr13
-rw-r--r--sysutils/puppetserver7/pkg-plist29
16 files changed, 440 insertions, 0 deletions
diff --git a/sysutils/puppetserver7/Makefile b/sysutils/puppetserver7/Makefile
new file mode 100644
index 000000000000..c6371102d211
--- /dev/null
+++ b/sysutils/puppetserver7/Makefile
@@ -0,0 +1,98 @@
+# $FreeBSD$
+
+PORTNAME= puppetserver
+PORTVERSION= 6.14.1
+CATEGORIES= sysutils java
+MASTER_SITES= https://downloads.puppetlabs.com/puppet/:upstream \
+ https://raw.githubusercontent.com/jruby/jruby/fb3ba4b3543b72e735ba53b51e6b7ec8a9916e1b/lib/ruby/stdlib/ffi/:ffi
+PKGNAMESUFFIX= 6
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:upstream \
+ ffi.rb:ffi
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= puppet@FreeBSD.org
+COMMENT= Puppet Server running in the JVM
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= bash>=0:shells/bash \
+ puppet6>=0:sysutils/puppet6 \
+ rubygem-puppetserver-ca>=1:sysutils/rubygem-puppetserver-ca \
+ rubygem-semantic_puppet>=1:devel/rubygem-semantic_puppet \
+ sudo>=1:security/sudo
+
+USES= shebangfix
+USE_RC_SUBR= puppetserver
+
+USE_JAVA= yes
+USE_RUBY= yes
+NO_ARCH= yes
+NO_BUILD= yes
+JAVA_VERSION= 1.8+
+
+CONFLICTS_INSTALL= puppetserver-* puppetserver5-*
+
+SHEBANG_FILES= ext/bin/puppetserver
+
+USERS= puppet
+GROUPS= puppet
+
+SUB_LIST= JAVA_HOME=${JAVA_HOME}
+SUB_FILES= pkg-message
+
+pre-patch:
+ ${CP} ${_DISTDIR}/ffi.rb ${WRKSRC}
+
+post-patch:
+.for file in ext/config/logback.xml ext/config/request-logging.xml \
+ ext/config/conf.d/global.conf ext/config/conf.d/puppetserver.conf \
+ ext/config/conf.d/web-routes.conf ext/config/conf.d/webserver.conf \
+ ext/config/conf.d/auth.conf ext/config/services.d/ca.cfg \
+ ext/system-config/services.d/bootstrap.cfg ext/bin/puppetserver \
+ ext/cli_defaults/cli-defaults.sh ext/cli/foreground
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
+ -e 's|%%RUBY_SITELIBDIR%%|${RUBY_SITELIBDIR}|' \
+ -e 's|%%RUBY_VER%%|${RUBY_VER}|' \
+ -e 's|%%JAVA%%|${JAVA}|' \
+ -e 's|%%ETCDIR%%|${ETCDIR}|' \
+ -e 's|%%DATADIR%%|${DATADIR}|' \
+ ${WRKSRC}/${file}
+.endfor
+ @${REINPLACE_CMD} -e 's|#!/opt/puppetlabs/puppet/bin/ruby|#!${RUBY}|' \
+ ${WRKSRC}/ext/cli/ca
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${DATADIR}/cli/apps
+ @${MKDIR} ${STAGEDIR}${DATADIR}/lib
+ @${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d
+ @${MKDIR} ${STAGEDIR}${ETCDIR}/services.d
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/puppet/code
+ @${MKDIR} ${STAGEDIR}/var/log/puppetserver
+ @${MKDIR} ${STAGEDIR}/var/puppet/server
+ @${MKDIR} ${STAGEDIR}/var/puppet/server/data
+ @${MKDIR} ${STAGEDIR}/var/run/puppetserver
+ ${INSTALL_DATA} ${WRKSRC}/puppet-server-release.jar ${STAGEDIR}${DATADIR}/puppet-server-release.jar
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/global.conf ${STAGEDIR}${ETCDIR}/conf.d/global.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/logback.xml ${STAGEDIR}${ETCDIR}/logback.xml.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/request-logging.xml ${STAGEDIR}${ETCDIR}/request-logging.xml.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/puppetserver.conf ${STAGEDIR}${ETCDIR}/conf.d/puppetserver.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/web-routes.conf ${STAGEDIR}${ETCDIR}/conf.d/web-routes.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/webserver.conf ${STAGEDIR}${ETCDIR}/conf.d/webserver.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/auth.conf ${STAGEDIR}${ETCDIR}/conf.d/auth.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/conf.d/metrics.conf ${STAGEDIR}${ETCDIR}/conf.d/metrics.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/config/services.d/ca.cfg ${STAGEDIR}${ETCDIR}/services.d/ca.cfg.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/system-config/services.d/bootstrap.cfg ${STAGEDIR}${ETCDIR}/services.d/bootstrap.cfg.sample
+ ${INSTALL_DATA} ${WRKSRC}/ext/bin/puppetserver ${STAGEDIR}${PREFIX}/bin/puppetserver
+ ${INSTALL_DATA} ${WRKSRC}/ext/ezbake-functions.sh ${STAGEDIR}${DATADIR}/ezbake-functions.sh
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/ca ${STAGEDIR}${DATADIR}/cli/apps/ca
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/foreground ${STAGEDIR}${DATADIR}/cli/apps/foreground
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/gem ${STAGEDIR}${DATADIR}/cli/apps/gem
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/irb ${STAGEDIR}${DATADIR}/cli/apps/irb
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/reload ${STAGEDIR}${DATADIR}/cli/apps/reload
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/ruby ${STAGEDIR}${DATADIR}/cli/apps/ruby
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/start ${STAGEDIR}${DATADIR}/cli/apps/start
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli/stop ${STAGEDIR}${DATADIR}/cli/apps/stop
+ ${INSTALL_DATA} ${WRKSRC}/ext/cli_defaults/cli-defaults.sh ${STAGEDIR}${DATADIR}/cli/cli-defaults.sh
+ ${INSTALL_DATA} ${WRKSRC}/ffi.rb ${STAGEDIR}${DATADIR}/lib
+
+.include <bsd.port.mk>
diff --git a/sysutils/puppetserver7/distinfo b/sysutils/puppetserver7/distinfo
new file mode 100644
index 000000000000..44b76ea4756b
--- /dev/null
+++ b/sysutils/puppetserver7/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1604551702
+SHA256 (puppetserver-6.14.1.tar.gz) = 82bfa2306f990dd75e011b00d51406e92f0cac173a9fca9cdba2e7d1949b6436
+SIZE (puppetserver-6.14.1.tar.gz) = 61960154
+SHA256 (ffi.rb) = f991c5eb6b6e4c88541af592207aa7ea14ba48f482978b3b479c4b17390e8e93
+SIZE (ffi.rb) = 5893
diff --git a/sysutils/puppetserver7/files/patch-ext__bin__puppetserver b/sysutils/puppetserver7/files/patch-ext__bin__puppetserver
new file mode 100644
index 000000000000..fb17e51c6fde
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__bin__puppetserver
@@ -0,0 +1,15 @@
+--- ext/bin/puppetserver.orig 2018-10-03 16:18:58 UTC
++++ ext/bin/puppetserver
+@@ -15,6 +15,12 @@ elif [ `uname` == "OpenBSD" ] ; then
+ USER="_puppet"
+ INSTALL_DIR="/opt/puppetlabs/server/apps/puppetserver"
+ CONFIG="/etc/puppetlabs/puppetserver/conf.d"
++elif [ `uname` == "FreeBSD" ] ; then
++ JAVA_BIN="%%JAVA%%"
++ JAVA_ARGS="-Xms2g -Xmx2g"
++ USER="puppet"
++ INSTALL_DIR="%%DATADIR%%"
++ CONFIG="%%ETCDIR%%/conf.d"
+ else
+ echo "You seem to be missing some important configuration files; could not find /etc/default/puppetserver or /etc/sysconfig/puppetserver" >&2
+ exit 1
diff --git a/sysutils/puppetserver7/files/patch-ext__cli__foreground b/sysutils/puppetserver7/files/patch-ext__cli__foreground
new file mode 100644
index 000000000000..a4a4a5ad6649
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__cli__foreground
@@ -0,0 +1,19 @@
+--- ext/cli/foreground.orig 2019-09-17 14:05:56 UTC
++++ ext/cli/foreground
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env bash
+
+-restartfile="/opt/puppetlabs/server/data/puppetserver/restartcounter"
++restartfile="/var/puppet/server/data/puppetserver/restartcounter"
+ cli_defaults=${INSTALL_DIR}/cli/cli-defaults.sh
+
+ if [ ! -e "${INSTALL_DIR}/ezbake-functions.sh" ]; then
+@@ -30,7 +30,7 @@ fi
+ COMMAND="${JAVA_BIN} ${JAVA_ARGS} ${LOG_APPENDER} \
+ -cp "$CLASSPATH" \
+ clojure.main -m puppetlabs.trapperkeeper.main \
+- --config ${CONFIG} --bootstrap-config ${BOOTSTRAP_CONFIG} \
++ --config ${CONFIG} --bootstrap-config %%ETCDIR%%/services.d \
+ --restart-file "${restartfile}" \
+ ${TK_ARGS} \
+ ${@}"
diff --git a/sysutils/puppetserver7/files/patch-ext__cli_defaults__cli-defaults.sh b/sysutils/puppetserver7/files/patch-ext__cli_defaults__cli-defaults.sh
new file mode 100644
index 000000000000..85febc64943c
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__cli_defaults__cli-defaults.sh
@@ -0,0 +1,12 @@
+--- ext/cli_defaults/cli-defaults.sh.orig 2019-09-17 14:05:56 UTC
++++ ext/cli_defaults/cli-defaults.sh
+@@ -1,7 +1,7 @@
+-INSTALL_DIR="/opt/puppetlabs/server/apps/puppetserver"
++INSTALL_DIR="%%DATADIR%%"
+
+ if [ -n "$JRUBY_JAR" ]; then
+ echo "Warning: the JRUBY_JAR setting is no longer needed and will be ignored." 1>&2
+ fi
+
+-CLASSPATH="${CLASSPATH}:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.jar:/opt/puppetlabs/server/data/puppetserver/jars/*"
++CLASSPATH="${CLASSPATH}:/usr/local/lib/ruby/vendor_ruby/facter.jar:/opt/puppetlabs/server/data/puppetserver/jars/*"
diff --git a/sysutils/puppetserver7/files/patch-ext__config__conf.d__global.conf b/sysutils/puppetserver7/files/patch-ext__config__conf.d__global.conf
new file mode 100644
index 000000000000..5fc83d8e0ae8
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__config__conf.d__global.conf
@@ -0,0 +1,9 @@
+--- ext/config/conf.d/global.conf.orig 2018-10-01 20:36:05 UTC
++++ ext/config/conf.d/global.conf
+@@ -1,5 +1,5 @@
+ global: {
+ # Path to logback logging configuration file; for more
+ # info, see http://logback.qos.ch/manual/configuration.html
+- logging-config: /etc/puppetlabs/puppetserver/logback.xml
++ logging-config: %%PREFIX%%/etc/puppetserver/logback.xml
+ }
diff --git a/sysutils/puppetserver7/files/patch-ext__config__conf.d__puppetserver.conf b/sysutils/puppetserver7/files/patch-ext__config__conf.d__puppetserver.conf
new file mode 100644
index 000000000000..f67c4c57c546
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__config__conf.d__puppetserver.conf
@@ -0,0 +1,55 @@
+--- ext/config/conf.d/puppetserver.conf.orig 2020-10-16 14:28:08 UTC
++++ ext/config/conf.d/puppetserver.conf
+@@ -2,16 +2,20 @@
+ jruby-puppet: {
+ # Where the puppet-agent dependency places puppet, facter, etc...
+ # Puppet server expects to load Puppet from this location
+- ruby-load-path: [/opt/puppetlabs/puppet/lib/ruby/vendor_ruby]
++ ruby-load-path: [
++ %%PREFIX%%/share/puppetserver/lib,
++ %%RUBY_SITELIBDIR%%,
++ %%PREFIX%%/lib/ruby/vendor_ruby,
++ ]
+
+ # This setting determines where JRuby will install gems. It is used for loading gems,
+ # and also by the `puppetserver gem` command line tool.
+- gem-home: /opt/puppetlabs/server/data/puppetserver/jruby-gems
++ gem-home: /var/puppet/server/data/puppetserver/jruby-gems
+
+ # This setting defines the complete "GEM_PATH" for jruby. If set, it should include
+ # the gem-home directory as well as any other directories that gems can be loaded
+ # from (including the vendored gems directory for gems that ship with puppetserver)
+- gem-path: [${jruby-puppet.gem-home}, "/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems", "/opt/puppetlabs/puppet/lib/ruby/vendor_gems"]
++ gem-path: [${jruby-puppet.gem-home}, "/var/puppet/server/data/puppetserver/vendored-jruby-gems", "%%PREFIX%%/lib/ruby/gems/%%RUBY_VER%%"]
+
+ # PLEASE NOTE: Use caution when modifying the below settings. Modifying
+ # these settings will change the value of the corresponding Puppet settings
+@@ -26,23 +30,23 @@ jruby-puppet: {
+
+ # (optional) path to puppet conf dir; if not specified, will use
+ # /etc/puppetlabs/puppet
+- master-conf-dir: /etc/puppetlabs/puppet
++ master-conf-dir: %%PREFIX%%/etc/puppet
+
+ # (optional) path to puppet code dir; if not specified, will use
+ # /etc/puppetlabs/code
+- master-code-dir: /etc/puppetlabs/code
++ master-code-dir: %%PREFIX%%/etc/puppet/code
+
+ # (optional) path to puppet var dir; if not specified, will use
+ # /opt/puppetlabs/server/data/puppetserver
+- master-var-dir: /opt/puppetlabs/server/data/puppetserver
++ master-var-dir: /var/puppet/server/data/puppetserver
+
+ # (optional) path to puppet run dir; if not specified, will use
+ # /var/run/puppetlabs/puppetserver
+- master-run-dir: /var/run/puppetlabs/puppetserver
++ master-run-dir: /var/run/puppetserver
+
+ # (optional) path to puppet log dir; if not specified, will use
+ # /var/log/puppetlabs/puppetserver
+- master-log-dir: /var/log/puppetlabs/puppetserver
++ master-log-dir: /var/log/puppetserver
+
+ # (optional) maximum number of JRuby instances to allow
+ #max-active-instances: 1
diff --git a/sysutils/puppetserver7/files/patch-ext__config__conf.d__webserver.conf b/sysutils/puppetserver7/files/patch-ext__config__conf.d__webserver.conf
new file mode 100644
index 000000000000..21e4c5e6d868
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__config__conf.d__webserver.conf
@@ -0,0 +1,9 @@
+--- ext/config/conf.d/webserver.conf.orig 2018-10-01 20:36:05 UTC
++++ ext/config/conf.d/webserver.conf
+@@ -1,5 +1,5 @@
+ webserver: {
+- access-log-config: /etc/puppetlabs/puppetserver/request-logging.xml
++ access-log-config: %%PREFIX%%/etc/puppetserver/request-logging.xml
+ client-auth: want
+ ssl-host: 0.0.0.0
+ ssl-port: 8140
diff --git a/sysutils/puppetserver7/files/patch-ext__config__logback.xml b/sysutils/puppetserver7/files/patch-ext__config__logback.xml
new file mode 100644
index 000000000000..278ccaf5f825
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__config__logback.xml
@@ -0,0 +1,17 @@
+--- ext/config/logback.xml.orig 2018-09-18 17:16:33 UTC
++++ ext/config/logback.xml
+@@ -6,12 +6,11 @@
+ </appender>
+
+ <appender name="F1" class="ch.qos.logback.core.rolling.RollingFileAppender">
+- <!-- TODO: this path should not be hard-coded -->
+- <file>/var/log/puppetlabs/puppetserver/puppetserver.log</file>
++ <file>/var/log/puppetserver/puppetserver.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <!-- rollover daily -->
+- <fileNamePattern>/var/log/puppetlabs/puppetserver/puppetserver-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++ <fileNamePattern>/var/log/puppetserver/puppetserver-%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/sysutils/puppetserver7/files/patch-ext__config__request-logging.xml b/sysutils/puppetserver7/files/patch-ext__config__request-logging.xml
new file mode 100644
index 000000000000..4358008fdb47
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__config__request-logging.xml
@@ -0,0 +1,15 @@
+--- ext/config/request-logging.xml.orig 2018-09-18 17:16:33 UTC
++++ ext/config/request-logging.xml
+@@ -1,10 +1,10 @@
+ <configuration debug="false">
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+- <file>/var/log/puppetlabs/puppetserver/puppetserver-access.log</file>
++ <file>/var/log/puppetserver/puppetserver-access.log</file>
+ <append>true</append>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <!-- rollover daily -->
+- <fileNamePattern>/var/log/puppetlabs/puppetserver/puppetserver-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++ <fileNamePattern>/var/log/puppetserver/puppetserver-access-%d{yyyy-MM-dd}.%i.log.zip</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/sysutils/puppetserver7/files/patch-ext__ezbake-functions.sh b/sysutils/puppetserver7/files/patch-ext__ezbake-functions.sh
new file mode 100644
index 000000000000..bd4d0a1c26b7
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ext__ezbake-functions.sh
@@ -0,0 +1,11 @@
+--- ext/ezbake-functions.sh.orig 2019-09-17 14:05:56 UTC
++++ ext/ezbake-functions.sh
+@@ -126,7 +126,7 @@ init_restart_file()
+ local group="${GROUP:-puppet}"
+
+ if [ ! -e "$restartfile" ]; then
+- /usr/bin/install --directory --owner=$user --group=$group --mode=755 "$restart_file_base_dir"
++ /usr/bin/install -d -o $user -g $group -m 755 "$restart_file_base_dir"
+ if [ $? -ne 0 ]; then
+ echo "Unable to create or set permissions for restart file at ${restart_file_base_dir}" 1>&2
+ return 1
diff --git a/sysutils/puppetserver7/files/patch-ffi.rb b/sysutils/puppetserver7/files/patch-ffi.rb
new file mode 100644
index 000000000000..927fe2523bf2
--- /dev/null
+++ b/sysutils/puppetserver7/files/patch-ffi.rb
@@ -0,0 +1,19 @@
+--- ffi.rb.orig 2019-09-22 21:04:46 UTC
++++ ffi.rb
+@@ -125,7 +125,7 @@ module FFI
+ # Load all the platform dependent types/consts/struct members
+ class Config
+ CONFIG = Hash.new
+- begin
++ if File.exist?(File.join(Platform::CONF_DIR, 'platform.conf'))
+ File.open(File.join(Platform::CONF_DIR, 'platform.conf'), "r") do |f|
+ typedef = "rbx.platform.typedef."
+ f.each_line { |line|
+@@ -138,7 +138,6 @@ module FFI
+ end
+ }
+ end
+- rescue Errno::ENOENT
+ end
+ end
+ end
diff --git a/sysutils/puppetserver7/files/pkg-message.in b/sysutils/puppetserver7/files/pkg-message.in
new file mode 100644
index 000000000000..0635f9786fce
--- /dev/null
+++ b/sysutils/puppetserver7/files/pkg-message.in
@@ -0,0 +1,17 @@
+[
+{ type: install
+ message: <<EOM
+Remember to run:
+
+sysrc puppetserver_enable=yes
+
+A note to users upgrading to 2.6 who have also modified bootstrap.cfg, please
+see the release notes for breaking changes in 2.5.
+
+https://docs.puppet.com/puppetserver/latest/release_notes.html#puppet-server-25
+
+The file bootstrap.cfg has been removed and ca configuration has been moved out
+to its own file in ca.cfg.
+EOM
+}
+]
diff --git a/sysutils/puppetserver7/files/puppetserver.in b/sysutils/puppetserver7/files/puppetserver.in
new file mode 100644
index 000000000000..b05a7bf49364
--- /dev/null
+++ b/sysutils/puppetserver7/files/puppetserver.in
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# $FreeBSD: head/sysutils/puppetserver/files/puppetserver.in 428145 2016-12-08 17:41:39Z swills $
+#
+# PROVIDE: puppetserver
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Configuration settings for puppetserver in /etc/rc.conf:
+#
+# puppetserver_enable (bool):
+# Set to "NO" by default.
+# Set it to "YES" to enable puppetserver
+#
+# puppetserver_args (str):
+# Extra arguments passed to start command
+#
+# puppetserver_java_home (str):
+# Set to "%%JAVA_HOME%%" by default.
+# Set the Java virtual machine to run puppetserver
+#
+# puppetserver_java_opts (str):
+# Set to "" by default.
+# Java VM args to use.
+#
+# puppetserver_user (str):
+# Set to "puppet" by default.
+# User to run puppetserver as.
+#
+# puppetserver_group (str):
+# Set to "puppet" by default.
+# Group for data file ownership.
+#
+# puppetserver_log_file (str):
+# Set to "/var/log/puppetserver/puppetserver.log" by default.
+# Log file location.
+#
+
+. /etc/rc.subr
+
+name="puppetserver"
+rcvar=puppetserver_enable
+
+load_rc_config "${name}"
+
+: ${puppetserver_enable="NO"}
+: ${puppetserver_args="--config %%PREFIX%%/etc/puppetserver/conf.d -b %%PREFIX%%/etc/puppetserver/services.d"}
+: ${puppetserver_java_home="%%JAVA_HOME%%"}
+: ${puppetserver_java_opts=""}
+: ${puppetserver_user="puppet"}
+: ${puppetserver_group="puppet"}
+: ${puppetserver_log_file="/var/log/puppetserver/puppetserver.log"}
+
+pidfile="/var/run/puppetserver/puppetserver.pid"
+command="/usr/sbin/daemon"
+java_cmd="${puppetserver_java_home}/bin/java"
+procname="${java_cmd}"
+command_args="-f -p ${pidfile} ${java_cmd} ${puppetserver_java_opts} -cp %%DATADIR%%/puppet-server-release.jar:%%PREFIX%%/lib/ruby/vendor_ruby/facter.jar clojure.main -m puppetlabs.trapperkeeper.main ${puppetserver_args}"
+
+
+required_files="${java_cmd}"
+
+start_precmd="puppetserver_prestart"
+
+# An UTF-8 locale is required
+: LC_ALL=${LC_ALL:=C.UTF-8}
+case $LC_ALL in
+ *.UTF-8)
+ ;;
+ *.*)
+ LC_ALL="${LC_ALL%.*}.UTF-8"
+ ;;
+ *)
+ LC_ALL=C.UTF-8
+ ;;
+esac
+export LC_ALL
+
+puppetserver_prestart() {
+ if [ ! -f "${puppetserver_log_file}" ]; then
+ touch "${puppetserver_log_file}"
+ chown "${puppetserver_user}:${puppetserver_group}" "${puppetserver_log_file}"
+ chmod 640 "${puppetserver_log_file}"
+ fi
+ if [ ! -d "/var/run/puppetserver" ]; then
+ install -d -o "${puppetserver_user}" -g "${puppetserver_group}" -m 750 "/var/run/puppetserver"
+ fi
+
+ chown -R "root:${puppetserver_group}" "%%PREFIX%%/etc/puppetserver/conf.d"
+ chmod 0750 "%%PREFIX%%/etc/puppetserver/conf.d"
+
+ chown "root:${puppetserver_group}" "%%PREFIX%%/etc/puppetserver/logback.xml"
+ chmod 0640 "%%PREFIX%%/etc/puppetserver/logback.xml"
+}
+
+run_rc_command "$1"
diff --git a/sysutils/puppetserver7/pkg-descr b/sysutils/puppetserver7/pkg-descr
new file mode 100644
index 000000000000..99ba4db5203a
--- /dev/null
+++ b/sysutils/puppetserver7/pkg-descr
@@ -0,0 +1,13 @@
+Puppet master is a Ruby application that compiles configurations
+for any number of Puppet agent nodes, using Puppet code and various
+other data sources. (For more info, see Overview of Puppet's
+Architecture.)
+
+Puppet Server is an application that runs on the Java Virtual Machine
+(JVM) and provides the same services as the classic Puppet master
+application. It mostly does this by running the existing Puppet
+master code in several JRuby interpreters, but it replaces some
+parts of the classic application with new services written in
+Clojure.
+
+WWW: https://docs.puppetlabs.com/puppetserver/latest/services_master_puppetserver.html
diff --git a/sysutils/puppetserver7/pkg-plist b/sysutils/puppetserver7/pkg-plist
new file mode 100644
index 000000000000..569e25345e6b
--- /dev/null
+++ b/sysutils/puppetserver7/pkg-plist
@@ -0,0 +1,29 @@
+@(,,750) bin/puppetserver
+@sample %%ETCDIR%%/logback.xml.sample
+@sample %%ETCDIR%%/request-logging.xml.sample
+@sample %%ETCDIR%%/conf.d/auth.conf.sample
+@sample %%ETCDIR%%/conf.d/global.conf.sample
+@sample %%ETCDIR%%/conf.d/metrics.conf.sample
+@sample %%ETCDIR%%/conf.d/puppetserver.conf.sample
+@sample %%ETCDIR%%/conf.d/web-routes.conf.sample
+@sample %%ETCDIR%%/conf.d/webserver.conf.sample
+@sample %%ETCDIR%%/services.d/bootstrap.cfg.sample
+@sample %%ETCDIR%%/services.d/ca.cfg.sample
+@dir(,puppet,750) etc/puppet/code
+%%DATADIR%%/puppet-server-release.jar
+@(,,755) %%DATADIR%%/cli/apps/ca
+@(,,755) %%DATADIR%%/cli/apps/foreground
+@(,,755) %%DATADIR%%/cli/apps/gem
+@(,,755) %%DATADIR%%/cli/apps/irb
+@(,,755) %%DATADIR%%/cli/apps/reload
+@(,,755) %%DATADIR%%/cli/apps/ruby
+@(,,755) %%DATADIR%%/cli/apps/start
+@(,,755) %%DATADIR%%/cli/apps/stop
+@(,,755) %%DATADIR%%/cli/cli-defaults.sh
+@(,,755) %%DATADIR%%/ezbake-functions.sh
+%%DATADIR%%/lib/ffi.rb
+@dir(puppet,puppet,750) /var/log/puppetserver
+@dir(puppet,puppet,755) /var/puppet
+@dir(puppet,puppet,750) /var/puppet/server
+@dir(puppet,puppet,750) /var/puppet/server/data
+@dir(puppet,puppet,750) /var/run/puppetserver