Skip to content

philpep/pkgng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkgng - a binary package manager for FreeBSD
============================================

libpkg
------

pkgng is built on top of libpkg, a new library to interface with package registration backends.
It abstracts package management details such as registration, remote repositories, package creation,
updating, etc.

Package format
--------------

pkgng uses a new +MANIFEST file to describe a package. It is very similar to
the old +CONTENTS file, but cleaned (no more @comment which in fact can be an
hidden key-value!). The new manifest has new metadatas such as the
architecture and the release it is built for, the maintainer of the package,
the ports options it was build with.

@exec and @unexec are deprecated. They are still executed but pkgng print a
deprecation warning message.

pkgng supports new scripts: +PREINSTALL +POSTINSTALL, +PREDEINSTALL, +POSTDEINSTALL,
+PREUPGRADE, +POSTUPGRADE as well as the original scripts : +INSTALL +DEINSTALL +UPGRADE

The prefered compression format of pkgng for package archive is .txz. It is
faster to decompress than bzip2, thus allow faster installation with a smaller
archive file. Of course, pkgng can manage .tbz, .tgz and .tar archives.

Local database
--------------

Once a package is installed, it is registered to a sqlite database.
The sqlite database allow fast queries, ACID transactions.
It also allow to query the reverse dependencies without a +REQUIRED_BY hack.
In order to save space the MTREE is only stored once, which save 18K per
installed package.

pkgng supports a `register' command to register packages into the sqlite
database from the ports. The register command can execute the install script,
show pkg-message, ...

Installation of a package
-------------------------

`pkg add' can install a package archive on the local disk, on a http/ftp remote
server. If only a package name is given, it will search the remote repository
and download and install the package if it exists. The dependencies will be
downloaded and installed first. This is possible because we have the
dependencies informations in the repository database.

`pkg add' will check if the user attempt to install a package built for another
arch or release.

Upgrade of packages
-------------------

pkgng will compare the versions of installed packages and those available on
the repository. It will compute the proper update order and apply them.

Deletion of a package
---------------------

Directory leftovers are automatically removed if they are not in the MTREE.

Using from ports
----------------
To use pkgng from ports currently we need to include bsd.pkgng.mk in bsd.port.mk
the line before .if !defined(PKG_ARGS)

About

NextGeneration package management tools for FreeBSD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.9%
  • Shell 0.1%