mkpk manual

MKPK(8)                     System Manager's Manual                    MKPK(8)


     mkpk -- packaging system using Plan9 mk


     mkpk [operation] [package]


     mkpk is a helper tool passing specific mkfiles to mk(1) to manage pack-
     ages.  operation can be one of the following:

           mkpk build package
                    Builds the most recent version of a package tarball and
                    puts it into PKGDIR.

           mkpk fetch package
                    Downloads the necessary sources to build package to the
                    directory SRCBASEDIR.

           mkpk info package
                    Shows information about the installed tarball of a

           mkpk install package
                    Installs the files from a built tarball of a package hav-
                    ing the most recent version.

           mkpk list package
                    Lists files from the installed tarball of a package.

           mkpk uninstall package
                    Uninstalls the installed package by unlinking files from
                    the filelist of its tarball.

           mkpk update
                    Updates the mkfiles repository.

           mkpk upgrade package
                    Upgrades the existing package, as if the following was ex-
                    ecuted, in order:

                    $ mkpk fetch package
                    $ mkpk build package
                    $ mkpk uninstall package
                    $ mkpk install package


     You can see the full list of relevant environment variables used by mkpk
     in the file /lib/mkpk/ (default location).

     mkpklib     Directory holding the library mkfiles.  By default,

     BINDDIRS    Passed to PRoot as an argument.  Defaults to -b /etc, which
                 bind-mounts /etc when creating a package.

                 URL of the repository with the mkfiles with information on
                 how to build individual packages.  Defaults to galeb-mkfiles

     NOBINDDIRS  If set to 1, no directories will be bind-mounted by PRoot
                 when creating a package.

     PKG         Full name of a package, including the full version.  For ex-
                 ample, "gcc-12.1.0-2" or "vim-9.0.135".

     PKGBASE     Base name of a package.  For example, "gcc" or "vim".

     PKGDB       Package database; TSV file holding the names, versions and
                 installation timestamps of all installed packages.  By de-
                 fault, /pkg/pkgdb.tsv.

     SKIPCLEAN   If set to 1, pkgroot won't be deleted after creating a pack-

     SRCBASEDIR  Base directory for source code.  Defaults to /src.

     SRCDIRS     Space-separated list of directories which are created by ex-
                 tracting archives.

     SRCCRDIRS   Space-separated list of directories to be created, to which
                 the archives are to be extracted.  Useful when a source ar-
                 chive doesn't have a root directory like it should.

     SRCEXDIRS   Space-separated list of directories to which the archive will
                 be extracted.  An alternative to SRCCRDIRS, when the directo-
                 ries already exist.

     SRCTODIRS   Space-separated list of directories to which the directories
                 from SRCDIRS will be renamed after extracting source ar-

                 Space-separated list of tarball names to which the tarballs
                 will be saved.  Useful eg. for Github tarballs which have
                 only version in their name.

     SRCMKFILES  Directory containing mkfiles.  By default, /src/mkfiles.


     /pkg/*.tar.xz   Tarballs containing built binaries, ready to be extracted
                     to /.

     /pkg/pkgdb.tsv  Package database; TSV file holding the names, versions
                     and installation timestamps of all installed packages.

     /lib/mkpk/*.mk  Mkfiles to be included into individual package's mkfiles
                     or called by the mkpk helper.

                     Main source directory for a package.

                     Mkfiles with instructions on how to build each individual
                     package.  Copied to /src/[package]-[version].




     Strahinya Radich <>, 2022-2023.

Galeb 2.2                       April 22, 2023                       Galeb 2.2