diff --git a/sysutils/puppetserver7/Makefile b/sysutils/puppetserver7/Makefile index 03aa8711b89e..2178574621b1 100644 --- a/sysutils/puppetserver7/Makefile +++ b/sysutils/puppetserver7/Makefile @@ -1,93 +1,93 @@ PORTNAME= puppetserver PORTVERSION= 7.14.0 +PORTREVISION= 1 CATEGORIES= sysutils java MASTER_SITES= https://downloads.puppetlabs.com/puppet/ PKGNAMESUFFIX= 7 -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} -EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= puppet@FreeBSD.org COMMENT= Puppet Server running in the JVM WWW= https://docs.puppetlabs.com/puppetserver/latest/services_master_puppetserver.html LICENSE= APACHE20 -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= aarch64 amd64 +ONLY_FOR_ARCHS_REASON=Bundled JNI only support some architectures RUN_DEPENDS= bash>=0:shells/bash \ puppet7>=0:sysutils/puppet7 \ rubygem-puppetserver-ca>=1:sysutils/rubygem-puppetserver-ca \ rubygem-semantic_puppet>=1:devel/rubygem-semantic_puppet \ sudo>=1:security/sudo USES= ruby shebangfix USE_RC_SUBR= puppetserver USE_JAVA= yes NO_ARCH= yes NO_BUILD= yes JAVA_VERSION= 8+ CONFLICTS_INSTALL= puppetserver[0-9] SHEBANG_FILES= ext/bin/puppetserver USERS= puppet GROUPS= puppet SUB_LIST= JAVA_HOME=${JAVA_HOME} SUB_FILES= pkg-message 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 \ ${WRKSRC}/ext/cli/dropsonde do-install: @${MKDIR} ${STAGEDIR}${DATADIR}/cli/apps @${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/puppetserver @${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 .include diff --git a/sysutils/puppetserver7/files/patch-ext__config__logback.xml b/sysutils/puppetserver7/files/patch-ext__config__logback.xml index 278ccaf5f825..74a9d061510f 100644 --- a/sysutils/puppetserver7/files/patch-ext__config__logback.xml +++ b/sysutils/puppetserver7/files/patch-ext__config__logback.xml @@ -1,17 +1,31 @@ ---- ext/config/logback.xml.orig 2018-09-18 17:16:33 UTC +--- ext/config/logback.xml.orig 2023-10-19 16:07:56 UTC +++ ext/config/logback.xml @@ -6,12 +6,11 @@ - - /var/log/puppetlabs/puppetserver/puppetserver.log + /var/log/puppetserver/puppetserver.log true - /var/log/puppetlabs/puppetserver/puppetserver-%d{yyyy-MM-dd}.%i.log.gz + /var/log/puppetserver/puppetserver-%d{yyyy-MM-dd}.%i.log.gz 200MB 90 +@@ -23,11 +22,11 @@ + + + +- /var/log/puppetlabs/puppetserver/puppetserver-status.log ++ /var/log/puppetserver/puppetserver-status.log + true + + +- /var/log/puppetlabs/puppetserver/puppetserver-status-%d{yyyy-MM-dd}.%i.log.gz ++ /var/log/puppetserver/puppetserver-status-%d{yyyy-MM-dd}.%i.log.gz + + 200MB + 90 diff --git a/sysutils/puppetserver7/files/puppetserver.in b/sysutils/puppetserver7/files/puppetserver.in index e32698e335cc..65ab0c6714ac 100644 --- a/sysutils/puppetserver7/files/puppetserver.in +++ b/sysutils/puppetserver7/files/puppetserver.in @@ -1,95 +1,95 @@ #!/bin/sh # 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}" +command_args="-f -p ${pidfile} ${java_cmd} -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger -Dlogappender=F1 ${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"