Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Make them clickable and add example of creating repo :)
Marin Atanasov Nikolov committed 14 years ago
commit 4f19302cecb862cf20c9952d70ba1de05764a768
parent e43d48e
1 file changed +55 -19
modified README.md
@@ -4,31 +4,34 @@ pkgng - a binary package manager for FreeBSD
Table of Contents:
------------------

-
* libpkg
-
* pkgng package format
-
* Local Database
-
* Installation of packages
-
* Upgrades of packages
-
* Deletion of packages
-
* pkgng in Ports
-
* A quick usage introduction to pkgng
-
* Installing pkgng
-
* Getting help on the commands usage
-
* Installing packages
-
* Querying the local package database
-
* Using remote package repositories
-
* Updating remote repositories
-
* Searching in remote package repositories
-
* Installing from remote repositories
-
* Backing up your package database
-
* Additional resources
-

+
* [libpkg](#libpkg)
+
* [pkgng package format](#pkgngfmt)
+
* [Local Database](#localdb)
+
* [Installation of packages](#pkginst)
+
* [Upgrades of packages](#pkgupg)
+
* [Deletion of packages](#pkgdel)
+
* [pkgng in Ports](#pkgngports)
+
* [A quick usage introduction to pkgng](#usageintro)
+
* [Installing pkgng](#installpkgng)
+
* [Getting help on the commands usage](#pkghelp)
+
* [Installing packages](#pkgadd)
+
* [Querying the local package database](#pkginfo)
+
* [Using remote package repositories](#pkgrepos)
+
* [Updating remote repositories](#pkgupdate)
+
* [Searching in remote package repositories](#pkgsearch)
+
* [Installing from remote repositories](#pkginstall)
+
* [Backing up your package database](#pkgbackup)
+
* [Creating a package repository](#pkgrepo)
+
* [Additional resources](#resources)
+

+
<a name="libpkg"></a>
### 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.

+
<a name="pkgngfmt"></a>
### pkgng package format

pkgng uses a new +MANIFEST file to describe a package. It is very similar to
@@ -59,6 +62,7 @@ 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 as well.

+
<a name="localdb"></a>
### Local database

Once a package is installed, it is registered to a SQLite database.
@@ -73,6 +77,7 @@ 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, ...

+
<a name="pkginst"></a>
### Installation of packages

`pkg add' can install a package archive from the local disk, on from a
@@ -88,6 +93,7 @@ remote repository database.
`pkg add' will check if the user attempts to install a package built for another
arch or release.

+
<a name="pkgupg"></a>
### Upgrades of packages

pkgng will also support upgrades of binary packages.
@@ -95,21 +101,25 @@ pkgng will also support upgrades of binary 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.

+
<a name="pkgdel"></a>
### Deletion packages

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

+
<a name="pkgngports"></a>
### pkgng in Ports

To use pkgng from ports currently we need to include *bsd.pkgng.mk* in *bsd.port.mk*,
the line before *.if defined(USE_LOCAL_MK)*

+
<a name="usageintro"></a>
### A quick usage introduction to pkgng

In this section of the document we will try to give a quick and dirty introduction
on the practical usage of pkgng - installing packages, searching in remote package
repositories, updating remote package repositories and installing from them, etc.

+
<a name="installpkgng"></a>
### Installing pkgng

The first thing to start with is to get pkgng installed on your machine.
@@ -138,6 +148,7 @@ In order to register your installed packages to pkgng, execute the commands belo
	# cd pkgng/ports
	# sh pkg2ng

+
<a name="pkghelp"></a>
### Getting help on the commands usage

In order to get help on any of the pkgng commands you should use the 'pkg help <command>'
@@ -148,6 +159,7 @@ In order to get the available commands in pkgng, just execute 'pkg help'
	# pkg help 
	# pkg help <command>

+
<a name="pkgadd"></a>
### Installing packages

Packages can be installed from either a local directory on the file system or from
@@ -171,6 +183,7 @@ server example.org using the HTTP protocol for fetching the packages.

For more information on installing packages on your FreeBSD system, please refer to pkg-add(1)

+
<a name="pkginfo"></a>
### Querying the local package database

In order to get information about installed packages you need to use the 'pkg info' command.
@@ -184,6 +197,7 @@ To list all install/registered packages in the local database, you will use the

For more information on querying the local package database, please refer to pkg-info(1) man page.

+
<a name="pkgrepos"></a>
### Using remote package repositories

The good thing about pkgng is that it is able to use remote package repositories.
@@ -237,6 +251,7 @@ Example remote repository definition might look like this:
Please check the included sample 'repositories' file for example definitions of remote
packages repositories and pkg.conf(5) for the file format of the file.

+
<a name="pkgupdate"></a>
### Updating remote repositories

The first thing to do when working with remote repositories is to update from them.
@@ -253,6 +268,7 @@ So, to update your remote repositories, you would execute this command:

For more information on the remote repositories, please refer to pkg-update(1).

+
<a name="pkgsearch"></a>
### Searching in remote package repositories

You can search in the remote package repositories using the 'pkg search' command.
@@ -267,6 +283,7 @@ An example search for a package could be done like this:

For more information on the repositories search, please refer to pkg-search(1)

+
<a name="pkginstall"></a>
### Installing from remote repositories

In order to install a package from a remote repository you need to set the
@@ -291,6 +308,7 @@ Here's an example installation of the Apache web server package:

For more information on the remote package installs, please refer to pkg-install(1)

+
<a name="pkgbackup"></a>
### Backing up your package database

It is a good idea that you backup your local package database on regular basis.
@@ -304,6 +322,24 @@ file and compress it.

For more information on backing up your local package database, please refer to pkg-backup(1)

+
<a name="pkgcreate"></a>
+
### Creating a package repository
+

+
You can also use pkgng, so that you create a package repository.
+

+
In order to create a package repository you need to use the 'pkg create' command.
+

+
Here's an example that will create a repository of all your currently installed packages:
+

+
	# cd /path/with/enough/space
+
	# pkg create -a
+
	# pkg repo . 
+

+
The above commands will create a repository of all packages on your system.
+

+
Now you can share your repo with other people by letting them know of your repository :)
+

+
<a name="resources"></a>
### Additional resources

* The Git repository of [pkgng is hosted on Github][1]