Giter Club home page Giter Club logo

pkgng's Introduction

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)

pkgng's People

Contributors

bapt avatar jlaffaye avatar wca avatar philpep avatar grimreaper avatar dnaeon avatar flz avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.