aosaginohi / ulyaoth

Ulyaoth
https://www.ulyaoth.net
18 stars 26 forks source link

Upgrading tomcat overrides ROOT webapp #1

Closed antoineco closed 9 years ago

antoineco commented 9 years ago

When upgrading from one version to another, the ROOT folder in ./webapps gets overriden, forcing the user to redeploy his ROOT app if previously deployed.

A better behaviour would be to check if this folder has been modified before replacing it. Would it be possible using %config(noreplace)?

antoineco commented 9 years ago

Or maybe you can move the webapps in a separate package, like in the official repos, making them optional (tomcat-admin-webapps for the manager and host manager, tomcat-webapps for the rest).

Just a suggestion of course

aosaginohi commented 9 years ago

So right now the webapps folder is like this when I install it: drwxr-xr-x. 14 tomcat tomcat 4096 Nov 15 09:24 docs drwxr-xr-x. 6 tomcat tomcat 4096 Nov 15 09:24 examples drwxr-xr-x. 5 tomcat tomcat 4096 Nov 15 09:24 host-manager drwxr-xr-x. 5 tomcat tomcat 4096 Nov 15 09:24 manager drwxr-xr-x. 3 tomcat tomcat 4096 Nov 15 09:24 ROOT

Which of those files cannot be changed?

Instead of making a different package would it work if I leave the "webapps" folder empty and instead make a folder "/opt/tomcat/tools/" and put the folders in there that are now in webapps?

That way people can simply decide to use it or not?, I am not sure if making a separate package will be better as then you still get the issue that some people might not want the docs or examples folder etc.

antoineco commented 9 years ago

Well the best option would probably be to remove them completely. After all they are available online. The ROOT app only contains generic stuff and not everybody wants to have the managers installed (I do!), not to mention the documentation and examples.

So yes, if maintaining a separate package for the default webapps is too much hassle you could deliver them in a different folder, why not.

FYI, the official packages for tomcat webapps are arranged in 3 packages as follows: tomcat-webapps ./webapps/ROOT ./webapps/examples ./webapps/sample tomcat-docs-webapp ./webapps/doc tomcat-admin-webapps ./webapps/manager ./webapps/host-manager

This setup makes it easy to chose which apps are desired or not, it's very convenient especially for automating the installation process. I can volunteer to maintain similar packages within your repo or GitHub if you believe this is a good option and if you want some help.

aosaginohi commented 9 years ago

I am creating it the way you suggest it with the separate rpms just need little time to make it.

So should be done soon!

antoineco commented 9 years ago

Thanks a lot !

aosaginohi commented 9 years ago

Alright I created the following packages for Tomcat 6, 7 , 8:

ulyaoth-tomcat ulyaoth-tomcat-admin ulyaoth-tomcat-docs ulyaoth-tomcat-examples

I have tested it as good as possible and for me it all looks fine, but since I not use the additional stuff to much please submit a new bug if one of the packages are not correct or have problems.

I hope the upgrade will not cause any issue to this new rpm.