Chapter 6 User Applications

6.1. So, where are all the user applications?
6.2. How do I download the Ports tree? Should I be using SVN?
6.3. Does FreeBSD support Java™?
6.4. Why can I not build this port on my 7.X -, 8.X -, or 9.X -STABLE machine?
6.5. I just tried to build INDEX using make index, and it failed. Why?
6.6. I updated the sources, now how do I update my installed ports?
6.7. Do I need to recompile every port each time I perform a major version update?
6.8. Do I need to recompile every port each time I perform a minor version update?
6.9. Why is /bin/sh so minimal? Why does FreeBSD not use bash or another shell?
6.10. How do I create audio CDs from my MIDI files?
6.11. Where can I get an Office Suite for FreeBSD?
6.12. Are there any Database systems for FreeBSD?
6.13. How can I convert from pkgng to the old package tools?

6.1. So, where are all the user applications?

Please take a look at the ports page for info on software packages ported to FreeBSD. The list currently tops 24,000 and is growing daily, so come back to check often or subscribe to the FreeBSD announcements mailing list for periodic updates on new entries.

Most ports should work on the 7.X, 8.X, and 9.X branches. Each time a FreeBSD release is made, a snapshot of the ports tree at the time of release in also included in the ports/ directory.

We also support the concept of a “package”, essentially no more than a compressed binary distribution with a little extra intelligence embedded in it for doing whatever custom installation work is required. A package can be installed and uninstalled again easily without having to know the gory details of which files it includes.

Use pkg_add(1) on the specific package files you are interested in installing. Package files can usually be identified by their .tbz suffix and CD-ROM distribution people will have a packages/All directory on their CD which contains such files. They can also be downloaded over the net for various versions of FreeBSD at the following locations:

or your nearest local mirror site.

Note that all ports may not be available as packages since new ones are constantly being added. It is always a good idea to check back periodically to see which packages are available at the ftp.FreeBSD.org master site.

6.2. How do I download the Ports tree? Should I be using SVN?

Any of the methods listed here work:

  • Use portsnap for most use cases.

  • Use SVN directly if you need custom patches to the ports tree.

  • Use CTM if you prefer getting patches by email (this is a rarer use case).

Any other method should be considered a legacy method. If you do not already use them, do not start.

6.3. Does FreeBSD support Java™?

Yes. Please see http://www.FreeBSD.org/java/.

6.4. Why can I not build this port on my 7.X -, 8.X -, or 9.X -STABLE machine?

If you are running a FreeBSD version that lags significantly behind -CURRENT or -STABLE, you may need to update your Ports Collection; see the Keeping Up section of the Porter's Handbook for further information on how to do this. If you are up to date, then someone might have committed a change to the port which works for -CURRENT but which broke the port for -STABLE. Please submit a bug report on this with the send-pr(1) command, since the Ports Collection is supposed to work for both the -CURRENT and -STABLE branches.

6.5. I just tried to build INDEX using make index, and it failed. Why?

First, always make sure that you have a complete up-to-date Ports Collection. Errors that affect building INDEX from an up-to-date copy of the Ports Collection are high-visibility and are thus almost always fixed immediately.

There are rare cases where INDEX will not build due to odd cases involving WITH_* or WITHOUT_* variables being set in make.conf. If you suspect that this is the case, please try to make INDEX with those make variables turned off before reporting it to FreeBSD ports mailing list.

6.6. I updated the sources, now how do I update my installed ports?

FreeBSD does not include a port upgrading tool, but it does have some tools to make the upgrade process somewhat easier. You can also install additional tools to simplify port handling, see the Upgrading Ports section in the FreeBSD Handbook.

6.7. Do I need to recompile every port each time I perform a major version update?

By all means! While a recent system will run with software compiled under an older release, you will end up with things randomly crashing and failing to work once you start installing other ports or updating a portion of what you already have.

When the system is upgraded, various shared libraries, loadable modules, and other parts of the system will be replaced with newer versions. Applications linked against the older versions may fail to start or, in other cases, fail to function properly.

For more information, see the section on upgrades in the FreeBSD Handbook.

6.8. Do I need to recompile every port each time I perform a minor version update?

In general, no. FreeBSD developers do their utmost to guarantee binary compatibility across all releases with the same major version number. Any exceptions will be documented in the Release Notes, and advice given there should be followed.

6.9. Why is /bin/sh so minimal? Why does FreeBSD not use bash or another shell?

Many people need to write shell scripts which will be portable across many systems. That is why POSIX® specifies the shell and utility commands in great detail. Most scripts are written in Bourne shell (sh(1)), and because several important programming interfaces (make(1), system(3), popen(3), and analogues in higher-level scripting languages like Perl and Tcl) are specified to use the Bourne shell to interpret commands. Because the Bourne shell is so often and widely used, it is important for it to be quick to start, be deterministic in its behavior, and have a small memory footprint.

The existing implementation is our best effort at meeting as many of these requirements simultaneously as we can. To keep /bin/sh small, we have not provided many of the convenience features that other shells have. That is why other more featureful shells like bash, scsh, tcsh(1), and zsh are available. (You can compare for yourself the memory utilization of all these shells by looking at the “VSZ” and “RSS” columns in a ps -u listing.)

6.10. How do I create audio CDs from my MIDI files?

To create audio CDs from MIDI files, first install audio/timidity++ from ports then install manually the GUS patches set by Eric A. Welsh, available at http://alleg.sourceforge.net/digmid.html. After TiMidity++ has been installed properly, MIDI files may be converted to WAV files with the following command line:

% timidity -Ow -s 44100 -o /tmp/juke/01.wav 01.mid

The WAV files can then be converted to other formats or burned onto audio CDs, as described in the FreeBSD Handbook.

6.11. Where can I get an Office Suite for FreeBSD?

The open-source Apache OpenOffice and LibreOffice office suites work natively on FreeBSD.

FreeBSD also includes a variety of text editors, spreadsheets, and drawing programs in the Ports Collection.

6.12. Are there any Database systems for FreeBSD?

Yes! See the Commercial Vendors section of FreeBSD's Web site.

Also see the Databases section of the Ports Collection.

6.13. How can I convert from pkgng to the old package tools?

Short answer: it is not possible.

Longer answer: if you have made any changes using pkg converting back is non-trivial and requires lots of manual editing of internal package database files. However, if you have just run pkg2ng then you may remove /var/db/pkg/local.sqlite and extract /var/backups/pkgdb.bak.tbz.