4.2 Overview of Software Installation

If you have used a UNIX® system before you will know that the typical procedure for installing third party software goes something like this:

  1. Download the software, which might be distributed in source code format, or as a binary.

  2. Unpack the software from its distribution format (typically a tarball compressed with compress(1), gzip(1), or bzip2(1)).

  3. Locate the documentation (perhaps an INSTALL or README file, or some files in a doc/ subdirectory) and read up on how to install the software.

  4. If the software was distributed in source format, compile it. This may involve editing a Makefile, or running a configure script, and other work.

  5. Test and install the software.

And that is only if everything goes well. If you are installing a software package that was not deliberately ported to DragonFly you may even have to go in and edit the code to make it work properly.

Should you want to, you can continue to install software the ``traditional'' way with DragonFly. However, DragonFly provides technology from NetBSD, which can save you a lot of effort: pkgsrc. At the time of writing, over 5,999 third party applications have been made available in this way.

For any given application, the DragonFly Binary package for that application is a single file which you must download. The package contains pre-compiled copies of all the commands for the application, as well as any configuration files or documentation. A downloaded package file can be manipulated with DragonFly package management commands, such as pkg_add(1), pkg_delete(1), pkg_info(1), and so on. Installing a new application can be carried out with a single command.

In addition the pkgsrc collection supplies a collection of files designed to automate the process of compiling an application from source code.

Remember that there are a number of steps you would normally carry out if you compiled a program yourself (downloading, unpacking, patching, compiling, installing). The files that make up a pkgsrc source collection contain all the necessary information to allow the system to do this for you. You run a handful of simple commands and the source code for the application is automatically downloaded, extracted, patched, compiled, and installed for you.

In fact, the pkgsrc source subsystem can also be used to generate packages which can later be manipulated with pkg_add and the other package management commands that will be introduced shortly.

Pkgsrc understands dependencies. Suppose you want to install an application that depends on a specific library being installed. Both the application and the library have been made available through the pkgsrc collection. If you use the pkg_add command or the pkgsrc subsystem to add the application, both will notice that the library has not been installed, and automatically install the library first.

You might be wondering why pkgsrc® bothers with both. Binary packages and the source tree both have their own strengths, and which one you use will depend on your own preference.

Binary Package Benefits

Pkgsrc source Benefits

To keep track of updated pkgsrc releases subscribe to the netBSD pkgsrc users mailing list and the netBSD pkgsrc users mailing list. It's also useful to watch the DragonFly User related mailing list as errors with pkgsrc on DragonFly should be reported there.

Warning: Before installing any application, you should check http://www.pkgsrc.org/ for security issues related to your application.

You can also install security/audit-packages which will automatically check all installed applications for known vulnerabilities, a check will be also performed before any application build. Meanwhile, you can use the command audit-packages -d after you have installed some packages.

The remainder of this chapter will explain how to use the pkgsrc system to install and manage third party software on DragonFly.

Contact the Documentation mailing list for comments, suggestions and questions about this document.