GNU/Linux Index

2.2. Package Management

For more information read crux handbook Package management front-end: prt-get and Introduction to pkgutils.

pkgmk(8)
Makes a software package. A package is an archive of files (.pkg.tar.gz, .pkg.tar.bz2 or .pkg.tar.xz) that can be installed using pkgadd(8).
pkgadd(8)
install a software package. A package is an archive of files (.pkg.tar.gz).
pkginfo(8)
Displays information about software packages that are installed on the system or that reside in a particular directory.
pkgrm(8)
Removes/uninstalls a previously installed software packages.
prt-get(8)
prt-get is a package management tool which provides additional functionality to crux' package management system. It works with the local ports tree and is therefore fully compatible with ports(8) and pkgmk(8)/pkgadd(8)

Test configuration by runing prt-get as admin user installing ports that are related;

        $ prt-get depinst prt-utils prt-get-bashcompletion
        

2.2.1. Update System

Before build software get latest version of port collections;

        $ sudo ports -u
        

When coming from install or there is to much updates, I prefer to update gcc, glibc, libtool and binutils before doing a sysup;

        $ prt-get update gcc
        $ prt-get update glibc
        $ prt-get update libtool
        $ prt-get update binutils
        

Build and install updated versions of ports;

        $ prt-get sysup
        

Rebuild any revision dependency;

        $ prt-get update -fr $(revdep)
        

2.2.2. Install port and dependencies

Installing using prt-get tool;

        $ prt-get depinst git
        

Installing using pkgmk and pkgadd, first build the package;

        $ cd /usr/ports/opt/git
        $ sudo -H -u pkgmk fakeroot pkgmk -d
        

Install the package;

        $ sudo pkgadd /usr/ports/packages/git#2.9.3-1.pkg.tar.gz
        

If you user pkgmk and pkgadd allways check if README, pre and post instal files exist.

2.2.3. Ports collections

Clone this documentation;

        $ git clone git://tribu.semdestino.org/ports.git
        

Install collections later documented;

        $ sudo cp doc/core/conf/ports/* /etc/ports/
        

Edit /etc/prt-get.conf to activate new collections;

        # the following line enables the user maintained contrib collection
        prtdir /usr/ports/contrib

        # ports described on this documentation
        prtdir /usr/ports/ports

        # 6c37 team provides a collection with freetype-iu, fontconfig-iu
        # and cairo-iu ports.
        # prtdir /usr/ports/6c37-dropin
        # prtdir /usr/ports/6c37
        

Get new ports;

        $ sudo ports -u ports
        

2.2.4. Show port information

        $ prt-get info port_name
        

List files port install into system;

        $ pkginfo -l package_name
        

Discover to wich port a file belongs;

        $ pkginfo -o filename
        

2.2.5. Show port dependencies

        $ prt-get depends port_name
        

2.2.6. Print information

Example how to get ports installed from contrib. Maybe there is a "cleaner" way to this, for now is ok;

        prt-get printf "%p %i %n %v\n" | grep "/usr/ports/contrib yes"
        
GNU/Linux Index

This is part of the LeetIO System Documentation. Copyright (C) 2021 LeetIO Team. See the file Gnu Free Documentation License for copying conditions.