Hello Nadav/Waldek/Friends,

Just to document this is the flow of the changes on tomcat
As you already pointed out, this set contains patch-of-patch
The following are all correlated to the same file:
- update 0001-configure-web-admin-user.patch
- add admin-gui permission
- add manager-script permission

This "update 0001-configure-web-admin-user.patch" goes from this
(tomcat-users.xml, note that only the new user is enabled):
<?xml version="1.0" encoding="UTF-8"?>
...
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  <user username="role1" password="<must-be-changed>" roles="role1"/>
-->
</tomcat-users>

to this:
<?xml version="1.0" encoding="UTF-8"?>
...
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  <user username="role1" password="<must-be-changed>" roles="role1"/>
-->
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>


The second patch goes from:
<?xml version="1.0" encoding="UTF-8"?>
...
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>

to:
<?xml version="1.0" encoding="UTF-8"?>
...
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
</tomcat-users>


The third patch goes from:
<?xml version="1.0" encoding="UTF-8"?>
...
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
</tomcat-users>

to:
<?xml version="1.0" encoding="UTF-8"?>
...
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui
,manager-script"/>
</tomcat-users>

and then we have the renaming so patches change the configuration without
"jumps"
before we were changing the files without any other, eg:
conf/tomcat-users.xml => 0001-configure-web-admin-user.patch
conf/server.xml => 0002-change-http-port-to-8081.patch
conf/tomcat-users.xml => 0003-assign-admin-gui-role-to-tomcat-user.patch
conf/web.xml => 0004-disable-Jasper-development-mode.patch
conf/server.xml => 0005-bump-up-number-of-threads.patch
conf/tomcat-users.xml => 0006-Add-script-managment-role-to-tomcat-user.patch
conf/server.xml => 0007-Use-bio-connector-explicitly.patch
conf/server.xml => 0008-Do-not-enable-AJP-connector.patch

with this set, the changes are in order:
conf/tomcat-users.xml => 0001-configure-web-admin-user.patch
conf/tomcat-users.xml => 0002-assign-admin-gui-role-to-tomcat-user.patch
conf/tomcat-users.xml => 0003-Add-script-managment-role-to-tomcat-user.patch
conf/web.xml => 0004-disable-Jasper-development-mode.patch
conf/server.xml => 0005-bump-up-number-of-threads.patch
conf/server.xml => 0006-change-http-port-to-8081.patch
conf/server.xml => 0007-Use-nio-connector-explicitly.patch
conf/server.xml => 0008-Do-not-enable-AJP-connector.patch


Kind Regards,

Geraldo Netto
Sapere Aude => Non dvcor, dvco
http://exdev.sf.net/



Geraldo Netto
Sapere Aude => Non dvcor, dvco
http://exdev.sf.net/


On Sun, 10 Mar 2019 at 15:41, Geraldo Netto <[email protected]> wrote:

> Hey Nadav,
>
> Thanks for reviewing the patches :)
> Sorry by not answer in line
> but yes, instead of deleting commented lines and then add just the one
> we need (old approach)
> I keep the commented code and just add one single line with the
> configuration we need just before the last line
> that way it also makes simpler to change in future
> the other users are commented anyway, so, they won't impact
>
> and then, in the next patches, we apply the changes just in one single line
> of course, if you see any problem, please, let me know
>
>
> Kind Regards,
> Geraldo Netto
>
>
> >>
> >> update the patch 0001-configure-web-admin-user.patch in order to work
> on tomcat 9
> >> the change only adds a new user with manager-gui on second-last line
> >> instead of removing the past lines and then add the user
> >>
> >> in any case, the changes on tomcat-user.xml must be done in order
> >> once all 3 patches touch the same line
> >>
> >> Signed-off-by: geraldo netto <[email protected]>
> >> ---
> >>  .../perf/0001-configure-web-admin-user.patch      | 15 ++++-----------
> >>  1 file changed, 4 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/tomcat/patches/perf/0001-configure-web-admin-user.patch
> b/tomcat/patches/perf/0001-configure-web-admin-user.patch
> >> index d445541..0dbb4ed 100644
> >> --- a/tomcat/patches/perf/0001-configure-web-admin-user.patch
> >> +++ b/tomcat/patches/perf/0001-configure-web-admin-user.patch
> >> @@ -13,18 +13,11 @@ diff --git a/conf/tomcat-users.xml
> b/conf/tomcat-users.xml
> >>  index 7f022ff..2f9579c 100644
> >>  --- a/conf/tomcat-users.xml
> >>  +++ b/conf/tomcat-users.xml
> >> -@@ -26,11 +26,6 @@
> >> -   and thus are ignored when reading this file. Do not forget to remove
> >> -   <!.. ..> that surrounds them.
> >> +@@ -41,4 +41,5 @@
> >> +   <user username="both" password="<must-be-changed>"
> roles="tomcat,role1"/>
> >> +   <user username="role1" password="<must-be-changed>" roles="role1"/>
> >
> >
> > Hmm, I think I'm starting to understand this patch-of-patch.
> >
> > The existing patch 0001-configure-web-admin-user.patch the patch also
> removed
> > the "both" and "role1" users, and in this patch, you no longer do.
> > Seeing the above  two "context lines" I see that in order to remove
> these two users,
> > you would need to change what this patch removes, but you decided that
> it's simpler
> > not to remove those extra users at all. Is this a correct understanding?
> I have no idea
> > why we cared about removing these two example users in the first case,
> so I'm fine
> > with not removing them, but I just want to understand if this is really
> what you did.
> >
> >>   -->
> >> --<!--
> >> -   <role rolename="tomcat"/>
> >> --  <role rolename="role1"/>
> >> --  <user username="tomcat" password="tomcat" roles="tomcat"/>
> >> --  <user username="both" password="tomcat" roles="tomcat,role1"/>
> >> --  <user username="role1" password="tomcat" roles="role1"/>
> >> ---->
> >> -+  <user username="tomcat" password="tomcat" roles="manager-gui"/>
> >> ++<user username="tomcat" password="tomcat" roles="manager-gui"/>
> >>   </tomcat-users>
> >>  --
> >>  1.8.1.2
> >> --
> >> 2.17.1
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "OSv Development" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to