Bug 243648

Summary: www/tomcat85,90: Clean up port
Product: Ports & Packages Reporter: Michael Osipov <michael.osipov>
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed FIXED    
Severity: Affects Some People CC: michael.osipov, vvd
Priority: --- Flags: vvd: maintainer-feedback+
koobs: merge-quarterly+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
www/tomcat8
koobs: maintainer-approval? (vvd)
www/tomcat9 koobs: maintainer-approval? (vvd)

Description Michael Osipov 2020-01-27 12:55:38 UTC
Created attachment 211101 [details]
www/tomcat8

Minor improvements to the port:

* Don't echo actions like the rest of the 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

Ran 11.3 and 12.1 Poudriere tests with several "make config" states, all successful and no warnings/errors by package QA.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2020-02-01 23:47:31 UTC
Look good for me.
But we need same patch for www/tomcat9.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2020-02-01 23:50:50 UTC
Comment on attachment 211101 [details]
www/tomcat8

>Index: www/tomcat85/Makefile
>===================================================================
>--- www/tomcat85/Makefile	(revision 524249)
>+++ www/tomcat85/Makefile	(working copy)
>@@ -50,36 +50,21 @@
> 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 <bsd.port.mk>
>Index: www/tomcat85/pkg-plist
>===================================================================
>--- www/tomcat85/pkg-plist	(revision 524249)
>+++ www/tomcat85/pkg-plist	(working copy)
>@@ -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
Comment 3 Michael Osipov 2020-02-02 21:24:49 UTC
(In reply to VVD from comment #1)

I can provide one tomorrow.
Comment 4 Michael Osipov 2020-02-02 21:46:33 UTC
Created attachment 211305 [details]
www/tomcat9
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2020-02-03 01:12:56 UTC
Patch for tomcat9 look good too.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-07 03:52:07 UTC
@Maintainer, 

Please provide confirmation that these patches pass QA (poudriere, portlint, etc) and approve both attachment if they do, and you approve them generally

Further, if the changes otherwise make no functional changes, and should be merged to the quarterly branch under "ports frame work compliance" category, please let us know
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2020-02-07 10:17:13 UTC
(In reply to Kubilay Kocak from comment #6)
> Further, if the changes otherwise make no functional changes
Yes, changes make no functional changes. I confirm this.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2020-02-12 15:56:42 UTC
Who can commit?
I have to update tomcat85 and tomcat9 to new versions - just got announces.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-17 06:18:40 UTC
(In reply to VVD from comment #8)

Set any new (version update) issues to depend on this issue
Comment 10 commit-hook freebsd_committer freebsd_triage 2020-02-17 08:30:11 UTC
A commit references this bug:

Author: koobs
Date: Mon Feb 17 08:30:01 UTC 2020
New revision: 526349
URL: https://svnweb.freebsd.org/changeset/ports/526349

Log:
  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 <michael.osipov siemens com>
  Approved by:	VVD <vvd unislabs com>
  MFH:		2020Q1 (blanket: ports compliance, bugfixes)

Changes:
  head/www/tomcat85/Makefile
  head/www/tomcat85/pkg-plist
  head/www/tomcat9/Makefile
  head/www/tomcat9/pkg-plist
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-02-17 10:44:24 UTC
A commit references this bug:

Author: koobs
Date: Mon Feb 17 10:43:52 UTC 2020
New revision: 526359
URL: https://svnweb.freebsd.org/changeset/ports/526359

Log:
  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 <michael.osipov siemens com>
  Approved by:	VVD <vvd unislabs com>

  Approved by:	ports-secteam (blanket: ports compliance, bugfixes)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/www/tomcat85/Makefile
  branches/2020Q1/www/tomcat85/pkg-plist
  branches/2020Q1/www/tomcat9/Makefile
  branches/2020Q1/www/tomcat9/pkg-plist
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2020-02-17 10:46:44 UTC
Committed and merged, thank you Michael!