sanos home

Sanos package manager


Sanos has a packagement management tool that can download, build, and install application and library packages from a central repository. You can use the pkg utility to install and maintain the installed packages:

usage: pkg [OPTIONS] PACKAGE...

  -f      Install from package file
  -R URL  Package repository URL (default:
  -B      Build but do not install packages
  -F      Fetch but do not build packages
  -u      Upgrade packages if newer versions are available
  -U      Force update of packages
  -d      Delete package
  -l      List installed packages
  -q      Query packages in repository
  -v      Output verbose installation information

A database of installed packages is stored in /usr/share/pkg/db. This file lists all the installed packages and their manifests. A package manifest is a text file in INI file format that contains the package name, description, author, version, project homepage, etc. The manifest also contains a list of files installed by the package in the [files] section and the other packages it depends on in the [dependencies] section. The commands for building and installing the package are in the [build] and [install] sections. The [readme] and [license] sections are currently only for informational purposes. The manifest files for the installed packages are stored in the /usr/share/pkg directory. This is an example of the manifest file for the awk package:

description=Pattern scanning and text processing language
author=Brian Kernighan




make -C /usr/src/pkg/awk

make -C /usr/src/pkg/awk install

This is the version of awk described in "The AWK Programming Language",
by Al Aho, Brian Kernighan, and Peter Weinberger
(Addison-Wesley, 1988, ISBN 0-201-07981-X).

Copyright (C) Lucent Technologies 1997
All Rights Reserved

A package is just an uncompressed tar file (although it has a .pkg extension) containing all the source files in the package. The file names in the package must be relative to the root directory and the first file in the package must be the manifest. This is the list of files in the awk package (

-rw-r--r-- sanos/sanos    1561 2013-01-19 15:29 usr/share/pkg/awk.inf
-rw-r--r-- sanos/sanos    5187 2013-01-10 15:23 usr/src/pkg/awk/maketab.c
-rw-r--r-- sanos/sanos    6919 2013-01-10 15:23 usr/src/pkg/awk/proto.h
-rw-r--r-- sanos/sanos   44781 2013-01-10 15:23 usr/src/pkg/awk/run.c
-rw-r--r-- sanos/sanos    6431 2013-01-10 15:23 usr/src/pkg/awk/awk.h
-rw-r--r-- sanos/sanos   13104 2013-01-10 15:23 usr/src/pkg/awk/lex.c
-rw-r--r-- sanos/sanos   12642 2013-01-10 15:23 usr/src/pkg/awk/tran.c
-rw-r--r-- sanos/sanos   13914 2013-01-10 15:23 usr/src/pkg/awk/awkgram.y
-rw-r--r-- sanos/sanos     531 2013-01-10 15:23 usr/src/pkg/awk/Makefile
-rw-r--r-- sanos/sanos    5185 2013-01-10 15:23 usr/src/pkg/awk/parse.c
-rw-r--r-- sanos/sanos    5798 2013-01-10 15:23 usr/src/pkg/awk/main.c
-rw-r--r-- sanos/sanos   17340 2013-01-10 15:23 usr/src/pkg/awk/lib.c
-rw-r--r-- sanos/sanos   22867 2013-01-10 15:23 usr/src/pkg/awk/b.c

You can use the pkg -l or pkg -lv command to list the currently installed packages, and you can use the pkg -q command to seach for packages on the repository server. If you want to install the awk package you type pkg awk on the command line. This will check if the package is already installed, and if not, download the package from the repository. The package files are downloaded using HTTP from a normal web server. The default repository is but you can specify another repository with the -R option. After the package file has been downloaded and the files have been extracted, the pkg tool inspects the manifest for the package. First it checks if all packages it depends on have already been installed. If some of these are missing they are downloaded and installed before proceeding. This is done recursively until all dependencies have been resolved. Then the pkg tool runs the install (or build) commands from the manifest to install the package. If the package is sucessfully installed the package database in /usr/share/pkg/db is updated with the newly installed packages, and the applications and libraries in the package are now ready to be used.

Most packages are distributed in source form and need to be compiled and linked before installing, so these packages usually depend on the sdk package (Sanos Development Kit) which contains the compiler, assembler, runtime library, and standard build utilities like make, ar, and impdef. To avoid a chicken-and-egg problem the sdk packages contain prebuilt applications and libraries in addition to the source code for these.


Sanos packages


sanosSanos operating system
sysSanos kernel
asAssembler for x86
ccC compiler
clibC runtime library
makeMake utility to maintain groups of programs
impdefGenerate import definitions for DLLs
arLibrary archive utility
mkbootKernel install utility
genvmdkGenerate VMDK disk image
sdkSanos Development Kit
ctohtmlConvert C source files to HTML
cmdsShell command utilities
editText editor
fdiskDisk partitioning utility
ftpdFTP server
httpdHTTP server library
loginUser login
mshMini shell
pkgPackage management tool
setupSetup program
telnetdTelnet server
win32Win32 thunking layer


Third-party packages


awkPattern scanning and text processing language
binutilsTools for creating and managing binary program and object files
bwbasicBywater BASIC Interpreter
ctagsGenerate tag files for source code
cursesX/Open curses terminal control library
disasmDisassembler for x86
luaLua embeddable scripting language
makedependCreate dependencies in makefiles
pdp11PDP-11 simulator
tarTape archive utility and library
unixv7Unix V7 kit
unzipUnZip decompression and extraction utility
yaccParser generator
zipZip compression and file packaging utility
zlibData compression library