Tuesday, January 17, 2006

Broken wireless

Hmm. I clicked OK on a bunch of Software Update features last night, and now things are screwy. In particular, the wireless stuff isn't working—I just get the swirly rainbow beachball cursor for anything on the right hand side of the top menu bar (including the clock, which has stuck). I think that one of the things I clicked on was a new Powerbook update, which is presumably the prime suspect.

[Edit: I've now rebooted for a third time, and this time things work. This time I got the dialog on booting that asks about migrating AirPort keychains; that hadn't appeared on the previous two attempts at rebooting. I'm not sure what was different this time round—possibly that I completely powered off the machine rather than restarting.

Also, I figured out how to find out what Software Update installed: just go to Preferences, Installed Updates while Software Update is running (or System Preferences, Software Update, Installed Updates). For a more direct approach, just look in /Library/Logs/Software Update.log]

Friday, January 13, 2006

Wiki

Here's an easy one: getting a wiki set up just involves installing pre-built version of MoinMoin and jumping straight to http://localhost:8080.Looks like the underlying data is stored in files under ~/Library/Application Support/MoinX/instance/data, so it even gets picked up by my normal backup process.

Wednesday, January 11, 2006

And back to intel

As mentioned previously, I have some sympathy with this. Still, at least I've had mine for nine months, not three weeks.

Sunday, January 08, 2006

Bugzilla mail

To finish off my Bugzilla installation, I need to get email working. Thunderbird is working fine, but I need to configure things so that command line email works.

Postfix 2.0.10 looks to already be installed and running under Mac OS X 10.3.9, so the first step is to edit /etc/hostconfig so that Postfix starts at boot time (by setting MAILSERVER=-YES-).

At this point, a command line mail somebody@email.address works, but triggering Bugzilla to send a mail (by reassigning a bug, say) gives an error "undef error - Can't open sendmail at /System/Library/Perl/5.8.1/CGI/Carp.pm line 314"). Looking at the perl code in Bugzilla/BugMail.pm, it looks like the path to sendmail is hardcoded as /usr/lib/sendmail—so I just put in a symlink: ln -s /usr/sbin/sendmail /usr/lib/sendmail.

With that, mails from Bugzilla do start to get through, but the From: address isn't quite right. Time to edit /etc/postfix/main.cf to set myorigin = lurklurk.org, and then mails are coming from a more sensible place.

[Edit 13-Jun-06: The straightforward setup sends mail directly from my box, and this was getting bounced by some mail server recipients. To sent via my normal SMTP outgoing server, I also needed to change the value of relayhost.]

Friday, January 06, 2006

Bugzilla 2.18.4

OK, here's the sequence of steps I used to get Bugzilla up and running under Mac OS X. The official instructions are here, and the download is here. It's a reasonably convoluted process, so I'd recommend having some soothing music on: I went for Musica Antiqua Köln playing Bach's "Musical Offering".

Zerothly, I already had an install of MySQL that I'd gotten from here. It wasn't set up to auto-start on boot, so I re-opened the .dmg file and ran the MySQLStartupItem.pkg package.

Firstly, I used FinkCommander to install a collection of lower-level utilities that are needed:

  • libpng3 and libpng3-shlibs
  • gd2, gd2-bin, gd2-shlibs
  • expat

Nextly was to get all of the relevant Perl modules installed. This are the things that the ./checksetup.pl --check-modules command spits out; roughly:

  • perl -MCPAN -e 'install "Bundle::Bugzilla"': this is a shortcut to get all of the really-required modules in one go; there were a few problems, but running it repeatedly seemed to work eventually.
  • perl -MCPAN -e 'install "Chart::Base"'
  • perl -MCPAN -e 'install "PatchReader"'
  • perl -MCPAN -e 'install "GD::Graph"' (pointing it at the /sw/lib location for libgd
  • For the XML::Parser module, I had to tweak things by hand a bit
    • cpan
    • cpan> look "XML::Parser"
    • # perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include
    • # make; make test; make install
    • # exit
At the end of all of this, ./checksetup.pl --check-modules was happy, so I moved on to the full ./checksetup.pl and edited the generated localconfig file:
  • changed the value of $db_pass to a password
  • changed the value of $webservergroup to www to match the running Apache server

Some tweaking of the MySQL setup next:

  • created a /usr/local/mysql/data/my.cnf file, and added ft_min_word_len=2 and max_allowed_packet=1M in a [mysqld] section
  • set up a bugs user from the mysql -u root command line:
    • mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY 'password';
    • mysql> FLUSH PRIVILEGES;

At this point, running ./checksetup.pl did a bunch of work: setting up Apache configuration scripts, generating tables in the database, setting up an administrator account. Nearly there!

Next is webserver setup. To make the Bugzilla directory (/usr/local/bugzilla-2.18.4 for me) visible to the webserver, I just put in a symlink: cd /Library/WebServer/Documents; ln -s /usr/local/bugzilla-2.18.4 bugzilla. Then I added the following chunk of configuration to /etc/httpd/httpd.conf (just before Section 3 in the existing file):

<Directory /Library/WebServer/Documents/bugzilla>
  AddHandler cgi-script .cgi
  Options +Indexes +ExecCGI +FollowSymLinks
  DirectoryIndex index.cgi
  AllowOverride Limit
</Directory>

A swift killall -HUP httpd (to get the config file reloaded) and woot, http://localhost/bugzilla looks to be up and running.

The only thing left to do is to set things up so that Bugzilla can send out emails (in a manner that's effectively equivalent to running mail on the command line). My CD has finished playing now, so I'll defer that to another day.