Опубликован: 06.08.2012 | Доступ: свободный | Студентов: 1189 / 25 | Оценка: 5.00 / 5.00 | Длительность: 53:41:00
Лекция 31:

Keeping up to date

< Лекция 30 || Лекция 31: 1234 || Лекция 32 >


FreeBSD-CURRENT is the very latest version of FreeBSD, located on the trunk of the tree. All new development work is done on this branch of the tree. FreeBSD-CURRENT is an ever-changing snapshot of the working sources for FreeBSD, including work in progress, experimental changes and transitional mechanisms that may or may not be present in the next official release of the software. Many users compile almost daily from FreeBSD-CURRENT sources, but there are times when the sources are uncompilable, or when the system crashes frequently. The problems are always resolved, but others can take their place. On occasion, keeping up with FreeBSD-CURRENT can be a full-time business. If you use -CURRENT, you should be prepared to spend a lot of time keeping the system running. The following extract from the RCS log file for /usr/src/Makfile should give you a feel for the situation:

$ cvs log Makefile
revision 1.152
date: 1997/10/06 09:58:11;   author: jkh;   state: Exp;   lines: +41 -13
Did I ever spam this file good with that last commit. Despite 3 
reviewers, we still managed to revoke the eBones fixes, TCL 8.0 
support, libvgl and a host of other new things from this file in 
the process of parallelizing the Makefile. DOH! I think we need 
more pointy hats - this
particular incident is worthy of a small children's birthday 
party's worth of pointy hats. ;-)
I certainly intend to take more care with the processing of aged 
diffs in the future, even if it does mean reading through 20K's 
worth of them. I might also be a bit more anal about asking for 
more up-to-date changes before looking at them. ;)

This example also shows the list of the symbolic names for this file, and their corresponding revision numbers. There is no symbolic name for -CURRENT, because it is located on the trunk. That's the purpose of the line head, which shows that at the time of this example, the –CURRENT revision of this file was 1.270.

So why use -CURRENT? The main reasons are:

  • You might be doing development work on some part of the source tree. Keeping "current" is an absolute requirement.
  • You may be an active tester, which implies that you're willing to spend time working through problems to ensure that FreeBSD-CURRENT remains as sane as possible. You may also wish to make topical suggestions on changes and the general direction of FreeBSD.
  • You may just want to keep an eye on things and use the current sources for reference purposes.

People occasionally have other reasons for wanting to use FreeBSD-CURRENT. The following are not good reasons:

  • They see it as a way to be the first on the block with great new FreeBSD features. This is not a good reason, because there's no reason to believe that the features will stay, and there is good reason to believe that they will be unstable.
  • They see it as a quick way of getting bug fixes. In fact, it's a way of testing bug fixes. Bug fixes will be retrofitted into the -STABLE branch as soon as they have been properly tested.
  • They see it as the newest officially supported release of FreeBSD. This is incorrect: FreeBSD-CURRENT is not officially supported. The support is provided by the users.

If you do decide to use -CURRENT, read the suggestions on page 622.


FreeBSD-CURRENT is available in the form of ISO (CD-ROM) images. From time to time, at irregular intervals when the tree is relatively stable, the release team makes a snapshot release from the - CURRENT source tree. They are also available on CD-ROM from some vendors; check the online handbook for details. This is a possible alternative to online updates if you don't want the absolute latest version of the system.

Getting updates from the Net

There are a number of possibilities to keep up with the daily modifications to the source tree. The first question is: how much space do you want to invest in keeping the sources? Table 31-1 shows the approximate space required by different parts of the sources. Note that the repository keeps growing faster than the source tree, because it includes all old revisions as well.

Таблица 31.1. Approximate source tree sizes
Component Size (MB)
Repository src/sys 250
Repository src 1000
Repository ports 300
Source tree /usr/src/sys 110
Source tree /usr/src 450
Source tree /usr/ports 200
Object/usr/obj 160

The size of /usr/src/sys includes the files involved in a single kernel build. You can remove the entire kernel build directory, but if you want to be able to analyze a panic dump, you should keep the kernel.debug file in the kernel build directory. This changes the size of /usr/src as well, of course. The other object files get built in the directory /usr/obj. Again, you can remove this directory tree entirely if you want, either with the rm command or with make clean. Similarly, the size of /usr/ports includes a few ports. It will, of course, grow extremely large (many gigabytes) if you start porting all available packages.

If you're maintaining multiple source trees (say, for different versions), you still only need one copy of the repository.

< Лекция 30 || Лекция 31: 1234 || Лекция 32 >
Владимир Шишкин
Владимир Шишкин
Россия, Киров
Олег Страхов
Олег Страхов