On Mon, Jul 29, 2013 at 6:42 PM, Vincent Massol <[email protected]> wrote:
Hi Guillaume,
On Jul 29, 2013, at 6:06 PM, Guillaume Fenollar < [email protected]> wrote:
Hello all,
Platform and Client team of XWiki SAS find interesting the idea of having XWiki version written as comment in the top of xwiki.cfg (no need for particular location though). When an upgrade is performed, it would permit to know if this configuration file has been merged (new xwiki version) or directly moved (first/previous xwiki version) from the old webapp.
Do you think it would be feasible?
How do you think it would work?
* Imagine you have version N installed. * Now you've upgraded your WAR to version N+1 * You merge the xwiki configuration files . If you don't edit their versions you still have version N mentioned and it's even worse than before because the next person that comes will see and *trust* that you're at version N when you're actually at version N+1.
I don't see how having a comment with the current version will help… I fear it might do the opposite...
I do not understand what you fear, a comment saying "Configuration file distributed with XWiki version x.y.z" could not really cause an issue to the merge process, and could help the way Guillaume said without causing any misinformation from our side anyway. Administrators could do tons of stupid things while merging, it does not matter.
Actually the config file is supposed to stay stable as you're supposed to use the same config version across xwiki versions. In the future it'll need to be in the data dir (except for the location of the data dir which should be something defined in the startup script as it is now btw ;)).
OTOH we could offer first some tools to upgrade the configuration files. We use sdiff for example to upgrade myxwiki.org:
sudo mv xwiki.new/WEB-INF/web.xml xwiki.new/WEB-INF/web.xml.ori; sudo sdiff xwiki/WEB-INF/web.xml xwiki.new/WEB-INF/web.xml.ori -B -W -E -o xwiki.new/WEB-INF/web.xml sudo mv xwiki.new/WEB-INF/xwiki.cfg xwiki.new/WEB-INF/xwiki.cfg.ori; sudo sdiff xwiki/WEB-INF/xwiki.cfg xwiki.new/WEB-INF/xwiki.cfg.ori -B -W -E -o xwiki.new/WEB-INF/xwiki.cfg sudo mv xwiki.new/WEB-INF/xwiki.properties xwiki.new/WEB-INF/xwiki.properties.ori; sudo sdiff xwiki/WEB-INF/xwiki.properties xwiki.new/WEB-INF/xwiki.properties.ori -B -W -E -o xwiki.new/WEB-INF/xwiki.properties sudo mv xwiki.new/WEB-INF/struts-config.xml xwiki.new/WEB-INF/struts-config.xml.ori; sudo sdiff xwiki/WEB-INF/struts-config.xml xwiki.new/WEB-INF/struts-config.xml.ori -B -W -E -o xwiki.new/WEB-INF/struts-config.xml sudo mv xwiki.new/templates/admin.vm xwiki.new/templates/admin.vm.ori; sudo sdiff xwiki/templates/admin.vm xwiki.new/templates/admin.vm.ori -B -W -E -o xwiki.new/templates/admin.vm sudo mv xwiki.new/WEB-INF/classes/logback.xml xwiki.new/WEB-INF/classes/logback.xml.ori; sudo sdiff xwiki/WEB-INF/classes/logback.xml xwiki.new/WEB-INF/classes/logback.xml.ori -B -W -E -o xwiki.new/WEB-INF/classes/logback.xml
That makes it quite easy to upgrade.
For a further future, we could imagine offering a UI in an upgrade wizard (just before the distribution wizard runs) to let the user discover new configuration options, deprecated ones and removed ones. We would just need to add some metadata somewhere in XWiki to indicate that.
Thanks -Vincent
Thank you in advance.
Guillaume
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO