Chapter 4. Using pkgsrc on systems other than NetBSD
Prev | Part I. The pkgsrc user's guide | Next

## Chapter 4. Using pkgsrc on systems other than NetBSD

## 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.

Prev | Up | Next
Chapter 3. Where to get pkgsrc and how to keep it up-to-date | Home | Chapter 5. Using pkgsrc