From 4e3fe60565b211340f50f96a699d3303ed053be5 Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Mon, 17 Feb 2020 10:43:51 +0000 Subject: [PATCH] MFH: r526349 www/tomcat85,9: Improve port quality - Don't echo automatic actions unlike other manual actions - Don't perform ${RM} -R because the OPTIONS system takes @comment parts in pkg-plist into account, poudriere build does not complain. - Don't provide samples for XML schema files, these are NOT intended to be modified by the user PR: 243648 Submitted by: Michael Osipov Approved by: VVD Approved by: ports-secteam (blanket: ports compliance, bugfixes) --- www/tomcat85/Makefile | 26 ++++++-------------------- www/tomcat85/pkg-plist | 4 ++-- www/tomcat9/Makefile | 27 ++++++--------------------- www/tomcat9/pkg-plist | 4 ++-- 4 files changed, 16 insertions(+), 45 deletions(-) diff --git a/www/tomcat85/Makefile b/www/tomcat85/Makefile index 161ce6808e71..73cda4de299e 100644 --- a/www/tomcat85/Makefile +++ b/www/tomcat85/Makefile @@ -3,6 +3,7 @@ PORTNAME= tomcat PORTVERSION= 8.5.49 +PORTREVISION= 1 CATEGORIES= www java MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION:C/([0-9])(.*)/\1/}/v${PORTVERSION}/bin PKGNAMESUFFIX= 85 @@ -50,36 +51,21 @@ post-patch: do-install: @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed - ${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} + @${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} post-install: @${RM} ${STAGEDIR}${TOMCAT_HOME}/bin/*.bat - (cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\ - for f in $$(find . -type f); do ${MV} $$f $$f.sample; done) + @(cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\ + for f in $$(find . -type f -not -name '*.xsd'); do ${MV} $$f $$f.sample; done) post-install-HOST_MANAGER-on: - (cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ + @(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ for f in host-manager/META-INF/context.xml host-manager/WEB-INF/web.xml; do \ ${MV} $$f $$f.sample; done) -post-install-HOST_MANAGER-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager - post-install-MANAGER-on: - (cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ + @(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ for f in manager/META-INF/context.xml manager/WEB-INF/web.xml; do \ ${MV} $$f $$f.sample; done) -post-install-MANAGER-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager - -post-install-DOCS-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs - -post-install-EXAMPLES-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples - -post-install-ROOT-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT - .include diff --git a/www/tomcat85/pkg-plist b/www/tomcat85/pkg-plist index 55d96c6ca344..eb3ba3372f2c 100644 --- a/www/tomcat85/pkg-plist +++ b/www/tomcat85/pkg-plist @@ -60,11 +60,11 @@ @sample %%T%%/conf/catalina.properties.sample @sample %%T%%/conf/context.xml.sample @sample %%T%%/conf/jaspic-providers.xml.sample -@sample %%T%%/conf/jaspic-providers.xsd.sample +%%T%%/conf/jaspic-providers.xsd @sample %%T%%/conf/logging.properties.sample @sample %%T%%/conf/server.xml.sample @sample %%T%%/conf/tomcat-users.xml.sample -@sample %%T%%/conf/tomcat-users.xsd.sample +%%T%%/conf/tomcat-users.xsd @sample %%T%%/conf/web.xml.sample %%T%%/temp/safeToDelete.tmp %%DOCS%%%%T%%/webapps/docs/BUILDING.txt diff --git a/www/tomcat9/Makefile b/www/tomcat9/Makefile index 1f95034b31d1..ff35433e9231 100644 --- a/www/tomcat9/Makefile +++ b/www/tomcat9/Makefile @@ -3,7 +3,7 @@ PORTNAME= tomcat PORTVERSION= 9.0.29 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= www java MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION:C/([0-9])(.*)/\1/}/v${PORTVERSION}/bin PKGNAMESUFFIX= 9 @@ -52,36 +52,21 @@ post-patch: do-install: @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed - ${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} + @${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} post-install: @${RM} ${STAGEDIR}${TOMCAT_HOME}/bin/*.bat - (cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\ - for f in $$(find . -type f); do ${MV} $$f $$f.sample; done) + @(cd ${STAGEDIR}${TOMCAT_HOME}/conf &&\ + for f in $$(find . -type f -not -name '*.xsd'); do ${MV} $$f $$f.sample; done) post-install-HOST_MANAGER-on: - (cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ + @(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ for f in host-manager/META-INF/context.xml host-manager/WEB-INF/web.xml; do \ ${MV} $$f $$f.sample; done) -post-install-HOST_MANAGER-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager - post-install-MANAGER-on: - (cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ + @(cd ${STAGEDIR}${TOMCAT_HOME}/webapps &&\ for f in manager/META-INF/context.xml manager/WEB-INF/web.xml; do \ ${MV} $$f $$f.sample; done) -post-install-MANAGER-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager - -post-install-DOCS-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs - -post-install-EXAMPLES-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples - -post-install-ROOT-off: - @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT - .include diff --git a/www/tomcat9/pkg-plist b/www/tomcat9/pkg-plist index bffe13662910..d60a3ff57cfb 100644 --- a/www/tomcat9/pkg-plist +++ b/www/tomcat9/pkg-plist @@ -63,11 +63,11 @@ @sample %%T%%/conf/catalina.properties.sample @sample %%T%%/conf/context.xml.sample @sample %%T%%/conf/jaspic-providers.xml.sample -@sample %%T%%/conf/jaspic-providers.xsd.sample +%%T%%/conf/jaspic-providers.xsd @sample %%T%%/conf/logging.properties.sample @sample %%T%%/conf/server.xml.sample @sample %%T%%/conf/tomcat-users.xml.sample -@sample %%T%%/conf/tomcat-users.xsd.sample +%%T%%/conf/tomcat-users.xsd @sample %%T%%/conf/web.xml.sample %%T%%/temp/safeToDelete.tmp %%DOCS%%%%T%%/webapps/docs/BUILDING.txt