Upgrading TWiki

The perils of upgrading TWiki on Gentoo.

One of the really cool things about Gentoo is it's webapp-config tool that allows you to run concurrent (or slotted) installations of different versions of the same web based application. For example, from one single instance of Apache, you can run numerous virtual hosts, each with a different version of TWiki.

It does this by installing to /usr/share/webapps then linking or copying files according to what is defined in the ebuild(5). Config files like lib/LocalSite.cfg are config protected the same as any other file in /etc/ and can be manually merged with

# CONFIG_PROTECT="$TWIKIHOME/bin" etc-update
# CONFIG_PROTECT="$TWIKIHOME/lib" etc-update

So cool, upgrading should be simple and easy. Right? Well almost.

At some point, I had decided to make a separate partition for my web stuff so hard linking the apps was broken. First, it removed the links for the unchanged files from the old version (good) then attempted to install the links for the new version which of course spewed lots of failures :( because you can't use hard links across different filesystems (they don't share the same inode table). I moved /usr/share/webapps to /var/www/webapps and created a symlink from the original location to the new location, then ran the upgrade again. This time all went well.

Awesome :) Time to see if it runs. I load up the home page and find that all my lovely TWiki.NatSkin settings have been lost. Damn! >:-( Luckily we have a backup and can just edit the TWikiPreferences file.

But wait. I'm no longer in the TWiki.TWikiAdminGroup. D'oh! I add myself back in and save again. Aaaah… NatSkin love again. A quick check of the TWiki.InstalledPlugins and we're back in business. Oooh… new versions – and with TWiki:Codev/Edinburgh release, we can now update plugins using the configure script from the browser. Well that's so much easier.

One thing I've been meaning to do was to make Waddlog.WebHome the default home page so I installed the TWiki:Plugins/RedirectPlugin and added %REDIRECT{"Waddlog.WebHome"}% to the Main.WebHome topic. Errm… why isn't that working? A quick dive into the source and I find the variable has changed to REDIRECTTO but the documentation has not been updated. Oh well. It works now. 8-P

So overall, it was far less painful than completely reinstalling or following the TWiki:TWiki04x01/TWikiUpgradeGuide which tells you to install afresh, then copy the non-standard webs (like Waddlog) over. Yick.

comments powered by Disqus