Jumat, 03 Februari 2006

Dangers of Tracking FreeBSD STABLE

Most of my FreeBSD systems track the SECURITY branch of FreeBSD. Wherever possible I try to apply binary updates for the kernel and userland with Colin Percival's freebsd-update tool. Most of my hardware is really old and I prefer not to spend a lot of time recompiling from source.

One of my systems does track the STABLE branch of FreeBSD, specifically RELENG_6. This is more or less a lab system. I like to see what might appear in the next version of FreeBSD, since 6.1 will be a version of STABLE.

Although STABLE is definitely more likely to be operational than CURRENT (which is the bleeding edge and will become FreeBSD 7.0), running STABLE is not without its hazards. Recently a commit appeared that changed part of the PCI code, shown with diffs here.

I happened to try updating to the version of FreeBSD STABLE that had src/sys/dev/pci/pci.c version 1.292.2.6, dated Mon Jan 30 18:42:10 2006 UTC. While compiling, I got this error:


/usr/src/sys/dev/pci/pci.c:1611: error: `PCI_IVAR_LATTIMER' undeclared
(first use in this function)
*** Error code 1
Stop in /usr/obj/usr/src/sys/JANNEY.
Error code 1
Stop in /usr/src.
*** Error code 1

I can see the line in pci.c the compiler doesn't like:

1611 case PCI_IVAR_LATTIMER:
1612 *result = cfg->lattimer;
1613 break;

Shorly after version 1.292.2.6, dated Mon Jan 30 18:42:10 2006 UTC, appeared in STABLE, it was updated to 1.292.2.7, dated Tue Jan 31 14:42:43 2006 UTC. However, the diffs to the previous version don't appear to affect the PCI_IVAR_LATTIMER code. I'm not sure what happened, but I was able to update to STABLE after the new code was committed and therefore get the system compiled and running.

janney:/home/richard$ uname -a
FreeBSD janney.taosecurity.com 6.0-STABLE FreeBSD 6.0-STABLE #0: Tue Jan 31 22:17:14 EST 2006
root@janney.taosecurity.com:/usr/obj/usr/src/sys/JANNEY i386
janney:/home/richard$ grep FBSDID /usr/src/sys/dev/pci/pci.c
__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.292.2.7 2006/01/31 14:42:43 imp Exp $");

As you can see, the system is now running STABLE as of late 31 Jan 06.

0 komentar:

Posting Komentar