Installing Binary Packages

It is entirely possible to skip this step if one wishes to build all software from source. However, should one wish to work with binary packages provided by Hitch Hiker, it is recommended that the first package built be the pkgin package manager.

zaphod@magrathea% cd /usr/pkgsrc/pkgtools/pkgin
zaphod@magrathea% bmake install clean clean-depends

To configure pkgin, edit the file /usr/pkg/etc/pkgin/repositories.conf to point towards the package repository appropriate for your architecture and version of Hitch Hiker. The hitchhiker-linux.org server is structures as follows:

pub
└── 2021q2              # Release version
    ├── src             # Source tree
    ├── aarch64         # Architecture
    │   ├── packages
    │   │   └── All     # Package repository
    │   ├── release     # Release tarballs

Therefore, if the Hitch Hiker release was 2021q2 and the architecture of your machine was riscv64, the repository can be added with the following command:

zaphod@magrathea% echo 'http://hitchhiker-linux.org/pub/2021q2/riscv64/packages/All' \
  >> /usr/pkg/etc/pkgin/repositories.conf

Once pkgin is installed and configured it functions similarly to any good package manager one might have previously used under Linux, such as apt or pacman. To see the list of possible operations just run the pkgin command without arguments:

zaphod@magrathea% pkgin
Usage: pkgin [-cdfhlnPtvVy] command [package ...]

Commands and shortcuts:
list                (ls  ) - List installed local packages
avail               (av  ) - List all available remote packages
search              (se  ) - Search for a remote package
install             (in  ) - Install or upgrade packages
update              (up  ) - Refresh local and remote package lists
upgrade             (ug  ) - Upgrade all packages
full-upgrade        (fug ) - Upgrade all packages (deprecated)
remove              (rm  ) - Remove packages and any dependent packages
keep                (ke  ) - Mark packages that should be kept
unkeep              (uk  ) - Mark packages that can be autoremoved
export              (ex  ) - Display PKGPATH for all keep packages
import              (im  ) - Import keep package list from file
show-keep           (sk  ) - Display keep packages
show-no-keep        (snk ) - Display autoremovable packages
autoremove          (ar  ) - Remove orphaned dependencies
clean               (cl  ) - Remove downloaded package files
show-deps           (sd  ) - List remote package direct dependencies
show-full-deps      (sfd ) - List remote package full dependencies
show-rev-deps       (srd ) - List local package reverse dependencies
provides            (prov) - Show which shared libraries a package provides
requires            (req ) - Show which shared libraries a package requires
show-category       (sc  ) - List all packages belonging to a category
show-pkg-category   (spc ) - Show categories a package belongs to
show-all-categories (sac ) - List all known categories
pkg-content         (pc  ) - Show remote package content
pkg-descr           (pd  ) - Show remote package long-description
pkg-build-defs      (pbd ) - Show remote package build definitions
stats               (st  ) - Show local and remote package statistics
zaphod@magrathea%