git: 55be7095a43d - 2025Q3 - www/tomcat9: Update 9.0.107 => 9.0.108

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Thu, 07 Aug 2025 00:50:01 UTC
The branch 2025Q3 has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=55be7095a43d135a612093db7ea8c70627b8fb01

commit 55be7095a43d135a612093db7ea8c70627b8fb01
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-08-07 00:00:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-08-07 00:49:56 +0000

    www/tomcat9: Update 9.0.107 => 9.0.108
    
    Changelog:
    https://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.108_(remm)
    
    Improve port.
    Refresh patch.
    
    MFH:    2025Q3
    (cherry picked from commit bae35af04ef237195e67229cbde42e88c9222f37)
---
 www/tomcat9/Makefile                   | 34 ++++++++++++++++++++--------------
 www/tomcat9/distinfo                   |  6 +++---
 www/tomcat9/files/patch-bin__daemon.sh |  6 +++---
 www/tomcat9/pkg-plist                  |  2 ++
 4 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/www/tomcat9/Makefile b/www/tomcat9/Makefile
index 8eed8b293c57..b29754b71693 100644
--- a/www/tomcat9/Makefile
+++ b/www/tomcat9/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	tomcat
-DISTVERSION=	9.0.107
+DISTVERSION=	9.0.108
 CATEGORIES=	www java
 MASTER_SITES=	APACHE/${PORTNAME}/${PORTNAME}-${DISTVERSION:C/([0-9])(.*)/\1/}/v${DISTVERSION}/bin
 PKGNAMESUFFIX=	9
@@ -17,6 +17,12 @@ USES=		cpe java
 CPE_VENDOR=	apache
 USE_RC_SUBR=	${PKGBASE:C/-/_/}
 
+EXTRACT_AFTER_ARGS=	--exclude commons-daemon-native.tar.gz \
+			--exclude commons-daemon.jar \
+			--exclude tomcat-native.tar.gz \
+			--exclude *.bat \
+			--no-same-owner --no-same-permissions
+
 NO_ARCH=	yes
 NO_BUILD=	yes
 SUB_LIST=	TOMCAT_HOME=${TOMCAT_HOME} \
@@ -40,28 +46,28 @@ TOMCAT_SUBDIR?=	${DISTNAME:R}
 TOMCAT_HOME=	${PREFIX}/${TOMCAT_SUBDIR}
 
 post-patch:
-	@${RM} ${WRKSRC}/bin/commons-daemon-native.tar.gz ${WRKSRC}/bin/commons-daemon.jar ${WRKSRC}/bin/tomcat-native.tar.gz
-	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%JAVAJARDIR%%|${JAVAJARDIR}|g' ${WRKSRC}/bin/daemon.sh
-	@${FIND} ${WRKSRC} -name '*.bak' -delete -o -name '*.orig' -delete
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%JAVAJARDIR%%|${JAVAJARDIR}|g' \
+		${WRKSRC}/bin/daemon.sh
+	${FIND} ${WRKSRC} -name '*.bak' -delete -o -name '*.orig' -delete
 
 do-install:
-	@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs
-	@${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed
-	@${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME}
+	${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs \
+		 ${STAGEDIR}${TOMCAT_HOME}/endorsed
+	(cd ${WRKSRC} && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${TOMCAT_HOME} "! -name *\.sh" && \
+		${COPYTREE_BIN} bin ${STAGEDIR}${TOMCAT_HOME} "-name *\.sh")
 
 post-install:
-	@${RM} ${STAGEDIR}${TOMCAT_HOME}/bin/*.bat
-	@(cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\
-		for f in $$(find . -type f -not -name '*.xsd'); do ${MV} $$f $$f.sample; done)
+	${FIND} ${STAGEDIR}${TOMCAT_HOME}/conf -type f -not -name '*.xsd' -exec ${MV} {} {}.sample \;
 
 post-install-HOST_MANAGER-on:
-	@(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\
-		for f in host-manager/META-INF/context.xml host-manager/WEB-INF/manager.xml host-manager/WEB-INF/web.xml; do \
+	(cd ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager && \
+		for f in META-INF/context.xml WEB-INF/manager.xml WEB-INF/web.xml; do \
 			${MV} $$f $$f.sample; done)
 
 post-install-MANAGER-on:
-	@(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\
-		for f in manager/META-INF/context.xml manager/WEB-INF/web.xml; do \
+	(cd ${STAGEDIR}${TOMCAT_HOME}/webapps/manager && \
+		for f in META-INF/context.xml WEB-INF/web.xml; do \
 			${MV} $$f $$f.sample; done)
 
 .include <bsd.port.mk>
diff --git a/www/tomcat9/distinfo b/www/tomcat9/distinfo
index 80be723701b1..e0aaf4bfa890 100644
--- a/www/tomcat9/distinfo
+++ b/www/tomcat9/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1751700000
-SHA256 (apache-tomcat-9.0.107.tar.gz) = d3caa0ad0a65b4931a7d3aeca24e5541cf743ba5fa9e51abda5b3a31d0b4857d
-SIZE (apache-tomcat-9.0.107.tar.gz) = 13009294
+TIMESTAMP = 1754520000
+SHA256 (apache-tomcat-9.0.108.tar.gz) = aa9127cc738f532aa34e347b306a82157fb5b499bfc028b4ffaf79db5956d28d
+SIZE (apache-tomcat-9.0.108.tar.gz) = 13028093
diff --git a/www/tomcat9/files/patch-bin__daemon.sh b/www/tomcat9/files/patch-bin__daemon.sh
index d43ad7ef1eb6..fd81ac439ba9 100644
--- a/www/tomcat9/files/patch-bin__daemon.sh
+++ b/www/tomcat9/files/patch-bin__daemon.sh
@@ -1,6 +1,6 @@
---- bin/daemon.sh.orig
+--- bin/daemon.sh.orig	2025-07-31 18:19:48 UTC
 +++ bin/daemon.sh
-@@ -115,12 +115,9 @@
+@@ -114,12 +114,9 @@ test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache
  test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
  test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
  test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
@@ -15,7 +15,7 @@
  fi
  # Set the default service-start wait time if necessary
  test ".$SERVICE_START_WAIT_TIME" = . && SERVICE_START_WAIT_TIME=10
-@@ -137,7 +134,7 @@
+@@ -136,7 +133,7 @@ test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
  
  # Add on extra jar files to CLASSPATH
  test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
diff --git a/www/tomcat9/pkg-plist b/www/tomcat9/pkg-plist
index 7a480526a68d..2b1b63aa4d58 100644
--- a/www/tomcat9/pkg-plist
+++ b/www/tomcat9/pkg-plist
@@ -608,6 +608,7 @@
 %%HOST_MANAGER%%@sample %%T%%/webapps/host-manager/WEB-INF/web.xml.sample
 %%HOST_MANAGER%%%%T%%/webapps/host-manager/css/manager.css
 %%HOST_MANAGER%%%%T%%/webapps/host-manager/images/asf-logo.svg
+%%HOST_MANAGER%%%%T%%/webapps/host-manager/images/favicon.ico
 %%HOST_MANAGER%%%%T%%/webapps/host-manager/images/tomcat.svg
 %%HOST_MANAGER%%%%T%%/webapps/host-manager/index.jsp
 %%MANAGER%%@sample %%T%%/webapps/manager/META-INF/context.xml.sample
@@ -622,6 +623,7 @@
 %%MANAGER%%@sample %%T%%/webapps/manager/WEB-INF/web.xml.sample
 %%MANAGER%%%%T%%/webapps/manager/css/manager.css
 %%MANAGER%%%%T%%/webapps/manager/images/asf-logo.svg
+%%MANAGER%%%%T%%/webapps/manager/images/favicon.ico
 %%MANAGER%%%%T%%/webapps/manager/images/tomcat.svg
 %%MANAGER%%%%T%%/webapps/manager/index.jsp
 %%MANAGER%%%%T%%/webapps/manager/status.xsd