Damon Cortesi's blog

Musings of an entrepreneur.

Gentoo Webapp-config Success!

| Comments

Well that wasn’t so bad.

emerge wordpress >>> emerge (1 of 1) www-apps/wordpress-1.5.2 to / >>> www-apps/wordpress-1.5.2 merged.

OK, getting wordpress installed was easy. Now let’s try to upgrade the old installation. Note the postinst has this:

* To install wordpress-1.5.2 into a virtual host, run the following command: * * webapp-config -I -h -d wordpress wordpress 1.5.2

but since I’m doing an upgrade, I’ll be using -U.

webapp-config -U -h domain.com -d /wordpress wordpress 1.5.2

* Upgrading wordpress- to wordpress-1.5.2 * Installed by root on 2005-07-04 21:40:54 * Config files owned by root:root * Creating required directories * Linking in required files * This can take several minutes for larger apps * Files and directories installed * Install completed - success * Removing old version wordpress- — !empty dir wp-includes — !empty dir wp-images/smilies — !empty dir wp-images — !empty dir wp-content/themes/default/images — !empty dir wp-content/themes/default — !empty dir wp-content/themes/classic — !empty dir wp-content/themes — !empty dir wp-content/plugins — !empty dir wp-content — !empty dir wp-admin — !morecontents /var/www/domain.com/htdocs/wordpress — !empty dir /var/www/domain.com/htdocs/wordpress * Remove whatever is listed above by hand

Ok, no problems there and after visiting /wp-admin/upgrade.php I was done!

scp debian:/blogs/* gentoo:/blogs


Let’s not forget to clean up: emerge -C wordpress-

Looking at the forums, I know one thing that got people upset was that upgrading would cause the new webapp to be placed in the wrong directory. This may be due to an error in the webapp-config manpage.

Note that under -d it says “directory is a directory under your htdocs dir.”, but in the examples it provides this: for x in webapp-config --list-installs phpmyadmin 2.5.6 ; do webapp-config -U -d $x phpmyadmin 2.5.7 ; done But the output of webapp-config –list-installs is the full path to the install path, not relative to htdocs.

The example is really quite horrible. To do a proper upgrade, one needs both the destination directory relative to htdocs as well as the target domain name. This requires a little bit more than a bash one-liner.