Trimming the FreeBSD base system

The FreeBSD base system contains everything neccesary for a minimal functional operating system. However it contains a little more than that and since some of the developers started talking about importing OpenLDAP into base I have been thinking about a way to avoid installing that on my machines.

I update my machines using the traditional method of make buildworld and make installworld. The build system lets me specify NO_* variables in /etc/make.conf to exclude certain parts of the system from being built and installed. But if I add those variables after having done a standard install of the system those parts will not be removed from my system, just not updated. So I end up with a number of stale files that can possibly cause unpredictable behaviour.

To solve this problem I have written a script that builds a standard full world as well as a world using the variables from /etc/make.conf. It then compares the list of files installed from both of them and presents a list of files not present in the custom world.

The file list is opened in the vi editor and can be changed if desired. After closing the editor you need to confirm the deletion of the files before they are deleted.

The script takes one argument which is a path to a working directory. The directory needs to be on a filesystem with 1 to 1.5GB of free space.

The script can be downloaded from here. Enjoy.


E-mail Valid XHTML 1.1 Valid CSS!