Chapter 4. Using pkgsrc on systems other than NetBSD

Table of Contents

4.1. Binary distribution
4.2. Bootstrapping pkgsrc

4.1. Binary distribution

See Section 5.1, “Using binary packages”.

4.2. Bootstrapping pkgsrc

pkgsrc can be bootstrapped for use in two different modes: privileged and unprivileged one. In unprivileged mode in contrast to privileged one all programs are installed under one particular user and cannot utilise privileged operations (packages don't create special users and all special file permissions like setuid are ignored).

Installing the bootstrap kit from source should be as simple as:

# env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc
# cd pkgsrc/bootstrap
# ./bootstrap
    

To bootstrap in unprivileged mode pass --unprivileged flag to bootstrap

By default, in privileged mode pkgsrc uses /usr/pkg for prefix where programs will be installed in, and /usr/pkg/pkgdb for the package database directory where pkgsrc will do its internal bookkeeping, /var is used as varbase, where packages install their persistent data. In unprivileged mode pkgsrc uses ~/pkg for prefix, ~/pkg/pkgdb for the package database, and ~/pkg/var for varbase.

You can change default layout using command-line arguments. Run ./bootstrap --help to get details.

Note

The bootstrap installs a bmake tool. Use this bmake when building via pkgsrc. For examples in this guide, use bmake instead of make.

Note

It is possible to bootstrap multiple instances of pkgsrc using non-intersecting directories. Use bmake corresponding to the installation you're working with to build and install packages.