pkgsrc logo

Portable Package Management

pkgsrc is a framework for building over 25,000 open source software packages. It is the native package manager on SmartOS, NetBSD, and Minix, and is portable across 23 different operating systems. Use one package manager across all of your systems!

MNX Cloud provide binary packages for SmartOS/illumos, macOS, Linux, and NetBSD.


Illumos Packages For Server And Desktop

Thanks to its cross-platform support, pkgsrc is able to combine the efforts of developers from NetBSD, SmartOS, macOS, Linux, and others, to produce a single package repository containing over 24,000 binary packages, providing regularly updated desktop and server packages to cover a wide range of requirements. Our package sets are built on SmartOS, but are designed to be portable across all illumos distributions, as the examples below running on Tribblix and OmniOS demonstrate.

pkgsrc MATE 1.20.0 on Tribblix

MATE 1.20.0

pkgsrc Xfce 4.12 on OmniOS

Xfce 4.12

pkgsrc KDE 4 on OmniOS

KDE 4

pkgsrc Awesome on OmniOS

Awesome

Choose Your Illumos Package Set

Our packages are built on SmartOS 20210826 but should work on any illumos distribution of at least that date, and are regularly updated from pkgsrc trunk. The tools option is a smaller package set designed specifically to run in the SmartOS Global Zone. The upgrade kits unpack newer configs and PGP keys over the top of an existing install ready for upgrading. Older and LTS kits are in the archive.

#
# Copy and paste the lines below to install the latest bootstrap.
#
BOOTSTRAP_TAR="bootstrap-trunk-x86_64-20240116.tar.gz"
BOOTSTRAP_SHA="4d92a333587d9dcc669ff64264451ca65da701b7"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
#curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
#curl -sS https://pkgsrc.smartos.org/pgp/8254B861.asc | gpg2 --import
#gpg2 --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/local
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/local/sbin:/opt/local/bin:$PATH
MANPATH=/opt/local/man:$MANPATH

#
# Copy and paste the lines below to upgrade to the latest bootstrap.  This
# will overwrite the following files:
#
#	/opt/local/etc/mk.conf
#	/opt/local/etc/pkg_install.conf
#	/opt/local/etc/pkgin/repositories.conf
#	/opt/local/etc/gnupg/pkgsrc.gpg
#
UPGRADE_TAR="bootstrap-trunk-x86_64-20240116-upgrade.tar.gz"
UPGRADE_SHA="3099211460e84c34b9f558c8f7354a871187be41"

# Download the upgrade kit to the current directory.
curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
#curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
#curl -sS https://pkgsrc.smartos.org/pgp/8254B861.asc | gpg2 --import
#gpg2 --verify ${UPGRADE_TAR}{.asc,}

# Unpack upgrade kit to /opt/local
tar -zxpf ${UPGRADE_TAR} -C /

# Ensure you are running the latest package tools.
pkg_add -U pkg_install pkgin libarchive

# Clean out any old packages signed with the previous key.
pkgin clean

# Upgrade all packages.
pkgin -y upgrade

#
# Copy and paste the lines below to install the latest tools bootstrap.
#
BOOTSTRAP_TAR="bootstrap-trunk-tools-20240116.tar.gz"
BOOTSTRAP_SHA="8c104974605e7404edd9d10b9429bdf1d9b3bb60"

# Ensure you are in a directory with enough space for the bootstrap download,
# by default the SmartOS /root directory is limited to the size of the ramdisk.
cd /var/tmp

# Download the bootstrap kit to the current directory.  Note that we currently
# pass "-k" to skip SSL certificate checks as the GZ doesn't install them.
curl -kO https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
#curl -kO https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
#curl -ksS https://pkgsrc.smartos.org/pgp/8254B861.asc | gpg --import
#gpg --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/tools
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/tools/sbin:/opt/tools/bin:$PATH
MANPATH=/opt/tools/man:$MANPATH

#
# Copy and paste the lines below to upgrade to the latest tools bootstrap.  This
# will overwrite the following files:
#
#	/opt/tools/etc/mk.conf
#	/opt/tools/etc/pkg_install.conf
#	/opt/tools/etc/pkgin/repositories.conf
#	/opt/tools/etc/gnupg/pkgsrc.gpg
#
UPGRADE_TAR="bootstrap-trunk-tools-20240116-upgrade.tar.gz"
UPGRADE_SHA="d64fa27ec8a97eb69f1494d6b0843e6529ded67e"

# Download the upgrade kit to the current directory.  Note that we currently
# pass "-k" to skip SSL certificate checks as the GZ doesn't install them.
curl -kO https://pkgsrc.smartos.org/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
#curl -kO https://pkgsrc.smartos.org/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
#curl -sS https://pkgsrc.smartos.org/pgp/8254B861.asc | gpg --import
#gpg --verify ${UPGRADE_TAR}{.asc,}

# Unpack upgrade kit to /opt/tools
tar -zxpvf ${UPGRADE_TAR} -C /

# Ensure you are running the latest package tools.
pkg_add -U pkg_install pkgin libarchive

# Clean out any old packages signed with the previous key.
pkgin clean

# Upgrade all packages.
pkgin -y upgrade

Post-Install Steps

Now that you're ready to go, here are some common commands you may want to run.

Use pkgin to install packages

pkgin is the front-end to the binary packages, and lets you search for, install, upgrade, and remove packages. It also provides some basic functionality for querying both local and remote packages. If you have used apt-get or yum you should find it to be very familiar.

Use pkg_* tools to manage packages

The underlying packaging tools are pkg_add, pkg_admin, pkg_create, pkg_delete, and pkg_info. If pkgin is equivalent to apt-get or yum, then these are the equivalent of dpkg or rpm. Here are some useful commands to get you started.

: Refresh the pkgin database with the latest version
$ sudo pkgin -y update

: Search for a package.  Regular expressions are supported.
$ pkgin search ^ffmpeg[0-9]$
ffmpeg4-4.1.1   Decoding, encoding and streaming software (v4.x)
ffmpeg3-3.4.5   Decoding, encoding and streaming software (v3.x)
ffmpeg2-2.8.14  Decoding, encoding and streaming software (v2.x)
ffmpeg1-1.2.12  Decoding, encoding and streaming software (v1.x)

: Install a package without prompting
$ sudo pkgin -y install ffmpeg4

: List all available packages
$ pkgin avail

: Upgrade all installed packages
$ sudo pkgin -y upgrade

: Remove a package
$ sudo pkgin -y remove ffmpeg4

: Automatically remove orphaned dependencies
$ sudo pkgin -y autoremove
: List installed packages.
$ pkg_info

: Query which package a file belongs to.
$ pkg_info -Fe /opt/local/bin/ffmpeg4
ffmpeg4-4.1.1

: List the contents of a package.
$ pkg_info -qL ffmpeg4
/opt/local/bin/ffmpeg4
/opt/local/bin/ffprobe4
[...]

: Perform an audit of all currently installed packages.
$ sudo pkg_admin fetch-pkg-vulnerabilities
$ pkg_admin audit
Package npm-6.9.0 has a denial-of-service vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2018-3721
Package nodejs-8.12.0 has a denial-of-service vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2018-7651
Package nodejs-8.12.0 has a http-response-splitting vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2018-12116
Package nodejs-8.12.0 has a spoofing vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2018-12123
[...]

: Create a binary package from some metadata files and package directory.
$ pkg_create -B build-info -c comment -d description -f packlist -I /opt/local -p files/ -U foo-1.0.tgz