git: 7f03c6a64012 - main - sysutils/puppetserver7: Fix logging and build aarch64 packages

From: Romain Tartière <romain_at_FreeBSD.org>
Date: Thu, 23 Nov 2023 05:00:19 UTC
The branch main has been updated by romain:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f03c6a6401202155c7240cf827549a51d7395d5

commit 7f03c6a6401202155c7240cf827549a51d7395d5
Author:     Romain Tartière <romain@FreeBSD.org>
AuthorDate: 2023-11-22 00:33:49 +0000
Commit:     Romain Tartière <romain@FreeBSD.org>
CommitDate: 2023-11-23 04:59:10 +0000

    sysutils/puppetserver7: Fix logging and build aarch64 packages
    
    Some changes in the Puppet Server recently broke logging.  Ensure we
    write logs as before.
    
    The server work on aarch64 so add it to ONLY_FOR_ARCHS.
    
    While here, do some cleanup of the Makefile.
    
    With hat:       puppet
---
 sysutils/puppetserver7/Makefile                          |  6 +++---
 .../puppetserver7/files/patch-ext__config__logback.xml   | 16 +++++++++++++++-
 sysutils/puppetserver7/files/puppetserver.in             |  2 +-
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/sysutils/puppetserver7/Makefile b/sysutils/puppetserver7/Makefile
index 03aa8711b89e..2178574621b1 100644
--- a/sysutils/puppetserver7/Makefile
+++ b/sysutils/puppetserver7/Makefile
@@ -1,10 +1,9 @@
 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
@@ -12,7 +11,8 @@ WWW=		https://docs.puppetlabs.com/puppetserver/latest/services_master_puppetserv
 
 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 \
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,4 +1,4 @@
---- 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 @@
      </appender>
@@ -15,3 +15,17 @@
              <!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
              <maxFileSize>200MB</maxFileSize>
              <maxHistory>90</maxHistory>
+@@ -23,11 +22,11 @@
+     </appender>
+ 
+     <appender name="STATUS" class="ch.qos.logback.core.rolling.RollingFileAppender">
+-        <file>/var/log/puppetlabs/puppetserver/puppetserver-status.log</file>
++        <file>/var/log/puppetserver/puppetserver-status.log</file>
+         <append>true</append>
+         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+             <!-- rollover daily -->
+-            <fileNamePattern>/var/log/puppetlabs/puppetserver/puppetserver-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
++            <fileNamePattern>/var/log/puppetserver/puppetserver-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/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
@@ -54,7 +54,7 @@ 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}"