Getting pkgsrc

Before you start installing pkgsrc, you need to decide from you get it. You can get it as a tar file or via CVS. Before you download any pkgsrc files, you should decide whether you want the current branch or the stable branch. The names of the stable branches are built from the year and the quarter, for example 2023Q4.

Tar Files

Tar files can be downloaded from https://cdn.NetBSD.org/pub/pkgsrc/. There are a number of subdirectories for different purposes: . distfiles (distributed source files): it contains lots of archive files from all pkgsrc packages, which are mirrored here. . misc (Miscellaneous things): this directory contains things that individual pkgsrc developers find worth publishing. . packages (Binary packages): this directory contains binary packages for the various platforms that are supported by pkgsrc. . reports (Bulk build reports): it contains reports from bulk builds, for those who want to fix packages that didn’t build on some of the platforms. . current, stable, pkgsrc-20xxQy: The directory pkgsrc contains a snapshot of the CVS repository, which is updated regularly. The current directory contains files related to the HEAD branch of the CVS repository. The stable directory is a symlink to the latest pkgsrc-20xxQy. The pkgsrc-20xxQy. directories contain files related to the -20xxQy stable branch of the CVS repository. Where xx is the last two digits of the year, and y is the quarter, for example, pkgsrc-2023Q4.

Via Anonymous CVS

To fetch a specific pkgsrc stable branch into your directory, make sure that you are in the directoery, and run:

anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r pkgsrc-2023Q4 -P pkgsrc

Where -r flag is used to specify a revision or tag when working with files and directories in a CVS repository.

To fetch the pkgsrc current branch, don’t use -r flag.

You may get error messages from ssh. To fix the errors, you need to set CVS_RSH.

CVS_RSH=ssh
export CVS_RSH

To keep pkgsrc updated via CVS, change to the pkgsrc directory and run:

cvs update -dP