RHEL3 Upgrade to RHEL4 Breaks up2date

Last week I had to upgrade one of our old RHEL3 servers in order to get it to address disks larger than 2TB. I did the upgrade from CD, and it went fairly smoothly, except up2date would not run after the box came back up.

It gave me the following error:

[root@x up2date]# Traceback (most recent call last):
  File "/usr/sbin/up2date", line 27, in ?
    from up2date_client import repoDirector
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 5, in ?
    import rhnChannel
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 10, in ?
    import up2dateAuth
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 5, in ?
    import rpcServer
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 23, in ?
    from rhn import rpclib
ImportError: No module named rhn

It turns out that there is no “really easy” way to fix it, but these directions on spaceblog do work. Basically it involves removing a lot of packages and re-adding them. The problem is related to python, so rather than remove the entire list of packages, I focused only on those relating to python and up2date:


libxml2-python
popt
pyOpenSSL
python
rhnlib
rhpl
up2date

Make sure not to remove these packages:


rpm
rpm-libs
rpm-python

Or you will break rpm and not be able to add the packages back after you remove them. All told, this is a grisly process, and you will have to use rpm -e --nodeps in order to get it done. This sucks, but up2date will work everything out once you can get it running again.

Managing WordPress and Gallery2 With Subversion

Keeping WordPress up to date using the standard method of deleting old files, extracting the new ones and then running the database upgrade script is a bit cumbersome, but really not that difficult. Gallery2 uses more or less the same methodology, but it does not require you to delete your files prior to the upgrade because it generates a script to remove deprecated files after the install is complete. This is very kind of them, but the Gallery package is large, and upgrades can get a bit unwieldy. While there are certainly more difficult software packages to maintain, there are things I would much rather be doing than software updates, so I decided to make my life easier by using subversion to manage both applications.

Subversion is a code revision management tool that is everything CVS should have been. It is not only amazingly useful for software developers, but it can be readily used by end users as a convenient method of keeping their software up to date. It is for this reason that the Automattic and and Gallery folks have started recommending it for those who have command line access to subversion enabled servers.

There is no way to force the software to make an existing install into a subversion checkout, so to convert my site, I pretty much just followed the instructions at wordpress.org site.

Create a directory for the new install and “cd” into it:
$ mkdir wordpress-svn

Checkout the current WordPress version:
$ svn co http://svn.automattic.com/wordpress/tags/2.3.1 .

Copy the things I cared about into from the old directory into the new one:
$ cp ../wordpress/wp-config.php .
And the same for:
favicon.ico
.htaccess

The only thing I didn’t really like was their method for copying the files from the old wp-content directory to the new one.

They suggested using “cp -rpf”:
$ cd wordpress
$ cp -rpf wp-content/* ../wordpress-svn/wp-content

But I prefer to use a “tar | tar” operation as root from my original wp-content directory.
$ cd wordpress/wp-content
$ tar cpEf - * | (cd ../../wordpress-svn/wp-content; tar xf -)

I don’t really have a reason for this other than it’s the way I have always moved large directories full of files with varying permissions. I just have more confidence in “tar” to maintain permissions than I do “cp”. I seem to remember being bitten by “cp” while moving some Oracle databases at some point.

That pretty much did it for WordPress… Next I moved onto Gallery2. The process was very similar.

Create the new gallery2 directory within your wordpress-svn folder and “cd” into it:
$ mkdir gallery2

Checkout the latest version of the Gallery2 code:
svn co https://gallery.svn.sourceforge.net/
svnroot/gallery/branches/BRANCH_2_2/gallery2 .

Copy over the config file:
cp ../../wordpress/gallery2/config.php .

Finally, copy the g2data directory over using “tar | tar”:
$ cd ../../wordpress/gallery2/g2data
$ tar cpEf - * | (cd ../../wordpress-svn/gallery2/g2data; tar xf -)

That was it… Now all that was left was to rename wordpress to wordpress-presvn and wordpress-svn to wordpress:
$ mv wordpress wordpress-presvn; mv wordpress-svn wordpress

Everything worked fine, so I was golden. If it had not been, I could have simply renamed the directories back to their original names.

What did all this get me? Much much easier upgrades. Upgrading WordPress is now just a matter of switching to the latest tag and running “svn up”:
$ svn sw http://svn.automattic.com/wordpress/tags/2.3.2
$ svn up

With Gallery, however, there is no need to do a switch for dot releases, so until it goes from 2.2.x to 2.3.x there is no need to run the “svn switch”… I can just “svn up”.

Remember that this is a 10,000 foot view of the process. Please read the links to the Automattic and Gallery documentation if you are going to make the move yourself.

Mac OSX 10.5 Upgrade


Apple Online Store
I’ve just finished upgrading my Mac Mini to OSX 10.5, and I have to say, the upgrade could not be simpler. While it did take slightly over an hour to complete, there were fewer than 10 clicks throughout the entire upgrade process, so I can’t imagine how anyone could mung it up. The one detail that I found a little strange was the lack of any indication that the installer was going to perform an “upgrade” install rather than a “fresh” install. Zach simply took it on faith, but I insisted on clicking the “Details” button just to be certain.

The OS itself is quite nice, although it is a bit strange to get used to the finder looking like iTunes. Stacks is a great idea, but part of me wishes it behaved more like a launcher-type application than a different interface to folders. Who knows though. Maybe after using them, I will come to appreciate the feature a lot more.

One thing that I am very glad to see is “Spaces”. Basically virtual desktops, X Windows has had this feature since the very beginning, but it is just now becoming native in Mac OS. Granted, there has almost always been external applications that handle this, but it’s nice to see it wrapped in.

There is a lot of buzz about the “Cover Flow” features that have been added to the finder. I have to admit that it is extremely aesthetically cool and very very slick. How much I use it in my day to day life remains to be seen, but it will be nice to browse documents visually without having to depend only on the title to find them.

Time machine, basically well integrated filesystem snapshots, seems like it will be a wonderful addition, but I have not had the chance to use it yet because I don’t have an external fire wire drive. It’s on my shopping list though, so I will be enabling it just as soon as I have the gear to make it run.

All and all, I think it’s an outstanding upgrade, and well worth the money. Give it a shot… You won’t be sorry.