The first idea was to merge old configuration lines to the new xwiki.cfg,
which means the version is correct when files are correctly merged. The
issue is also that some lines need to be remove from xwiki.cfg (like
workdir, which is useless in 5.x for example).
Being able to follow the version number could be useful in this case.
Upgrade wizard sounds nice BTW :)
2013/7/29 Vincent Massol <vincent(a)massol.net>
Hi Guillaume,
On Jul 29, 2013, at 6:06 PM, Guillaume Fenollar <
guillaume.fenollar(a)xwiki.com> 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...
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
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs