You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/06/29 16:07:06 UTC

[tomcat] branch main updated (6916f850b0 -> c9d49ff794)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from 6916f850b0 Simplify code
     new 3dac3363b9 Add missing credit
     new c9d49ff794 Fix BZ 66134 - installer + config file + mgmt apps

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 res/install-win/tomcat.nsi | 30 +++++++++++++++++++++++++-----
 webapps/docs/changelog.xml |  8 +++++++-
 2 files changed, 32 insertions(+), 6 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 02/02: Fix BZ 66134 - installer + config file + mgmt apps

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c9d49ff79449b74e29a744d8ea742168479fc0e4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jun 29 17:06:52 2022 +0100

    Fix BZ 66134 - installer + config file + mgmt apps
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=66134
    
    The NSIS based Tomcat installer for Windows now correctly handles the
    combination of TomcatAdminRoles defined in a configuration file and
    selecting the Manager and/or Host Manager web applications in the
    installer's GUI.
---
 res/install-win/tomcat.nsi | 30 +++++++++++++++++++++++++-----
 webapps/docs/changelog.xml |  6 ++++++
 2 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/res/install-win/tomcat.nsi b/res/install-win/tomcat.nsi
index 04f5163951..fe16505799 100644
--- a/res/install-win/tomcat.nsi
+++ b/res/install-win/tomcat.nsi
@@ -47,6 +47,7 @@ Unicode true
 !include "FileFunc.nsh"
 !include "TextFunc.nsh"
 ${StrRep}
+${Using:StrFunc} StrLoc
 
 Var JavaHome
 Var JavaExe
@@ -67,6 +68,10 @@ Var TomcatAdminUsername
 Var TomcatAdminPassword
 Var TomcatAdminRoles
 
+Var TomcatAdminEnableConfigured
+Var TomcatAdminRolesConfigured
+Var TomcatMenuEntriesEnableConfigured
+
 ; Variables that store handles of dialog controls
 Var CtlJavaHome
 Var CtlTomcatPortShutdown
@@ -488,6 +493,11 @@ Function .onInit
   ${EndIf}
   ClearErrors
 
+  ;take a copy of the default / configured values
+  StrCpy $TomcatAdminEnableConfigured $TomcatAdminEnable
+  StrCpy $TomcatAdminRolesConfigured $TomcatAdminRoles
+  StrCpy $TomcatMenuEntriesEnableConfigured $TomcatMenuEntriesEnable
+
 FunctionEnd
 
 Function pageChooseJVM
@@ -539,15 +549,22 @@ FunctionEnd
 ; It updates options based on what components were selected.
 ;
 Function pageComponentsLeave
-  StrCpy $TomcatAdminEnable "0"
-  StrCpy $TomcatAdminRoles ""
-  StrCpy $TomcatMenuEntriesEnable "0"
+  StrCpy $TomcatAdminEnable $TomcatAdminEnableConfigured
+  StrCpy $TomcatAdminRoles $TomcatAdminRolesConfigured
+  StrCpy $TomcatMenuEntriesEnable $TomcatMenuEntriesEnableConfigured
 
   SectionGetFlags ${SecManager} $0
   IntOp $0 $0 & ${SF_SELECTED}
   ${If} $0 <> 0
     StrCpy $TomcatAdminEnable "1"
-    StrCpy $TomcatAdminRoles "manager-gui"
+    ${If} $TomcatAdminRoles != ""
+      ${StrLoc} $0 $TomcatAdminRoles "manager-gui" 0
+      ${If} $0 == ""
+        StrCpy $TomcatAdminRoles "$TomcatAdminRoles,manager-gui"
+      ${EndIf}
+    ${Else}
+      StrCpy $TomcatAdminRoles "manager-gui"
+    ${EndIf}
   ${EndIf}
 
   SectionGetFlags ${SecHostManager} $0
@@ -555,7 +572,10 @@ Function pageComponentsLeave
   ${If} $0 <> 0
     StrCpy $TomcatAdminEnable "1"
     ${If} $TomcatAdminRoles != ""
-      StrCpy $TomcatAdminRoles "admin-gui,$TomcatAdminRoles"
+      ${StrLoc} $0 $TomcatAdminRoles "admin-gui" 0
+      ${If} $0 == ""
+        StrCpy $TomcatAdminRoles "$TomcatAdminRoles,admin-gui"
+      ${EndIf}
     ${Else}
       StrCpy $TomcatAdminRoles "admin-gui"
     ${EndIf}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fff6506c3f..16077232ef 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -224,6 +224,12 @@
         to <code>org.apache.tomcat.util.threads</code> package for consistency
         with the rest of the Tomcat code base. (markt)
       </fix>
+      <fix>
+        <bug>66134</bug>: The NSIS based Tomcat installer for Windows now
+        correctly handles the combination of <code>TomcatAdminRoles</code>
+        defined in a configuration file and selecting the Manager and/or
+        Host Manager web applications in the installer's GUI. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 01/02: Add missing credit

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3dac3363b97a70cd3945c4c328683cb9981e0de8
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jun 29 17:05:07 2022 +0100

    Add missing credit
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fa87fc1c1c..fff6506c3f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -222,7 +222,7 @@
         <code>org.apache.tomcat.util.threads.res</code> package. The
         <code>LocalStrings*.properties</code> files in that package were moved
         to <code>org.apache.tomcat.util.threads</code> package for consistency
-        with the rest of the Tomcat code base.
+        with the rest of the Tomcat code base. (markt)
       </fix>
     </changelog>
   </subsection>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org