MirBSD: pkgsrc on MirOS (original) (raw)
⚠ This page contains old, outdated, obsolete, … historic or WIP content! No warranties e.g. for correctness!
pkgsrc is a “ports tree” developed by the NetBSD project and portable to several other operating systems. Support for MirOS has existed since 2006 in the form of a private patch. Since January 2011, MirOS support is contained in the upstream pkgsrc repository.
pkgsrc allows the easy installation of third-party software not contained in the base system. It is very similar to MirPorts, the ports framework developed by the MirOS project, “native” on MirOS. However, pkgsrc generally contains more and newer software.
For more information on pkgsrc, seehttp://www.pkgsrc.org/.
MirPorts and pkgsrc can be installed and used in parallel. However, there is one caveat: the package tools are incompatible but they have the same names. Thus, when installing packages, you must assure that the right ones are used. Moreover, when bootstrapping pkgsrc on MirOS, the MirPorts directories (normally /usr/mpkg/bin and /usr/mpkg/sbin)must not be in your PATH.
Binary packages
Pre-built binary packages of thepkgsrc-2013Q4 branch (from January 2014), built for recent MirOS-current, are available. They can be used even if you did not install a compiler on the system. The binary repository contains 7431 packages. The packages have been built with/usr/pkg as the prefix and/usr/pkg/var as VARBASE so that they are self-contained. You need root rights to use these packages. pkgsrc can also be installed as an unprivileged user but you will need to build from source in this case.
To install pkgsrc from binary packages, follow these steps:
- Download the bootstrap kit:
ftp ftp://ftp.netbsd.org/pub/pkgsrc/packages/MirBSD/i386/10uB4\_2013Q4/bootstrap.tar.gz - Extract the file:
cd / ; sudo tar xvpzf /path/to/bootstrap.tar.gz - Set the PATH:
export PATH=/usr/pkg/bin:/usr/pkg/sbin:$PATH
(Add this line to your .profile to make the change permanent.) - Update the package list for pkgin, the binary package manager:
pkgin update - Install the desired package(s), for example:
pkgin install python27
More information can be found inSection 4.1 of the pkgsrc guide. More information on using pkgin for binary packages can be found onpkgin.net.
Installation from source
- Check out pkgsrc, for example to /usr/pkgsrc:
cd /usr ; cvs -qd anoncvs@anoncvs.netbsd.org:/cvsroot co -P pkgsrc - As above, prepend the pkgsrc directories to the PATH:export PATH=/usr/pkg/bin:/usr/pkg/sbin:$PATH
- Bootstrap pkgsrc. In this example, we install (using sudo) into /usr/pkg. The dbdir should be inside the prefix to avoid conflicts with MirPorts.
cd bootstrap
./bootstrap --prefix /usr/pkg --pkgdbdir /usr/pkg/db - pkgsrc can be configured by editing the /usr/pkg/etc/mk.conf file. See thepkgsrc Guide for details.
- To build and install a package, use the bmake command. For example, to install Perl:
cd /usr/pkgsrc/lang/perl5
bmake package-install clean