Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Markdown the README
Marin Atanasov Nikolov committed 14 years ago
commit 55e0ac6e6736f2689e7c813952e2c15a1e5bbc1b
parent f5f5161
1 file changed +69 -91
modified README.md
@@ -2,35 +2,34 @@ pkgng - a binary package manager for FreeBSD
============================================

Table of Contents:
-

-
	1. libpkg
-
	2. pkgng package format
-
	3. Local Database
-
	4. Installation of packages
-
	5. Upgrades of packages
-
	6. Deletion of packages
-
	7. pkgng in Ports
-
	8. A quick usage introduction to pkgng
-
		8.1. Installing pkgng
-
		8.2. Getting help on the commands usage
-
		8.3. Installing packages
-
		8.4. Querying the local package database
-
		8.5. Using remote package repositories
-
		8.6. Updating remote repositories
-
		8.7. Searching in remote package repositories
-
		8.8. Installing from remote repositories
-
		8.9. Backing up your package database
-
	9. Additional resources
+
------------------

1. libpkg
-
---------
+
2. pkgng package format
+
3. Local Database
+
4. Installation of packages
+
5. Upgrades of packages
+
6. Deletion of packages
+
7. pkgng in Ports
+
8. A quick usage introduction to pkgng
+
	8.1. Installing pkgng
+
	8.2. Getting help on the commands usage
+
	8.3. Installing packages
+
	8.4. Querying the local package database
+
	8.5. Using remote package repositories
+
	8.6. Updating remote repositories
+
	8.7. Searching in remote package repositories
+
	8.8. Installing from remote repositories
+
	8.9. Backing up your package database
+
9. Additional resources
+

+
### 1. 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.

-
2. pkgng package format
-
-----------------------
+
### 2. pkgng 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
@@ -41,20 +40,31 @@ 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
+
pkgng supports new scripts:
+

+
* +PREINSTALL 
+
* +POSTINSTALL
+
* +PREDEINSTALL
+
* +POSTDEINSTALL
+
* +PREUPGRADE
+
* +POSTUPGRADE
+

+
And 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 as well.

-
3. Local database
-
-----------------
+
### 3. Local database

Once a package is installed, it is registered to a SQLite database.

The SQLite database allow fast queries and ACID transactions.
-
It also allow to query the reverse dependencies without a +REQUIRED_BY hack.
+
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.
@@ -63,8 +73,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, ...

-
4. Installation of packages
-
---------------------------
+
### 4. Installation of packages

`pkg add' can install a package archive from the local disk, on from a
retote FTP/HTTP remote server.
@@ -79,40 +88,33 @@ remote repository database.
`pkg add' will check if the user attempts to install a package built for another
arch or release.

-
5. Upgrades of packages
-
-----------------------
+
### 5. Upgrades of packages

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.

-
6. Deletion packages
-
--------------------
+
### 6. Deletion packages

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

-
7. pkgng in Ports
-
-----------------
+
### 7. 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)
+
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)*

-
8. A quick usage introduction to pkgng
-
--------------------------------------
+
### 8. 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.

-
8.1. Installing pkgng
-
---------------------
+
### 8.1. Installing pkgng

The first thing to start with is to get pkgng installed on your machine.

-
You can grap a development snapshot of pkgng at the following Github repo:
-

-
	- https://github.com/pkgng/pkgng
+
You can grap a development snapshot of pkgng from the [pkgng Github repository][1]

To get the latest version of pkgng from the Git repo, just clone it:

@@ -131,13 +133,12 @@ Now you should have pkgng installed on your system.

Transferring your packages to pkgng is done by the ports/pkg2ng script.

-
In order to register your installed packages to pkgng, execute the command below:
+
In order to register your installed packages to pkgng, execute the commands below:

	# cd pkgng/ports
	# sh pkg2ng

-
8.2. Getting help on the commands usage
-
---------------------------------------
+
### 8.2. Getting help on the commands usage

In order to get help on any of the pkgng commands you should use the 'pkg help <command>'
command, which will take the man page of the specified command.
@@ -147,8 +148,7 @@ In order to get the available commands in pkgng, just execute 'pkg help'
	# pkg help 
	# pkg help <command>

-
8.3. Installing packages
-
------------------------
+
### 8.3. Installing packages

Packages can be installed from either a local directory on the file system or from
a remote location using the FTP/HTTP protocol in order to fetch the packages.
@@ -171,8 +171,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)

-
8.4. Querying the local package database
-
----------------------------------------
+
### 8.4. Querying the local package database

In order to get information about installed packages you need to use the 'pkg info' command.

@@ -185,8 +184,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.

-
8.5. Using remote package repositories
-
--------------------------------------
+
### 8.5. Using remote package repositories

The good thing about pkgng is that it is able to use remote package repositories.

@@ -205,8 +203,6 @@ repositories, so you can actually fetch, search and install from multiple locati
In order to use a remote repository you need to define the PACKAGESITE environment variable,
so that it points to a remote location, which contains packages that can be installed by pkgng.

-
Or set PACKAGESITE in the /etc/pkg.conf file.
-

If the PACKAGESITE environment variable is not defined then pkgng will work in multiple 
repositories mode, using the repositories which are defined in the /etc/pkg/repositories file.

@@ -241,8 +237,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.

-
8.6. Updating remote repositories
-
---------------------------------
+
### 8.6. Updating remote repositories

The first thing to do when working with remote repositories is to update from them.

@@ -258,8 +253,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).

-
8.7. Searching in remote package repositories
-
---------------------------------------------
+
### 8.7. Searching in remote package repositories

You can search in the remote package repositories using the 'pkg search' command.

@@ -273,8 +267,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)

-
8.8. Installing from remote repositories
-
----------------------------------------
+
### 8.8. Installing from remote repositories

In order to install a package from a remote repository you need to set the
PACKAGESITE environment variable to point to the remote server.
@@ -295,13 +288,10 @@ Remote installations of packages using pkgng are done by the 'pkg install' comma
Here's an example installation of the Apache web server package:

	# pkg install www/apache22
-
	# pkg install zsh
-
	# pkg install perl-5.12.4

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

-
8.9. Backing up your package database
-
-------------------------------------
+
### 8.9. Backing up your package database

It is a good idea that you backup your local package database on regular basis.

@@ -309,39 +299,27 @@ In order to backup the local package database, you should use the 'pkg backup' c

	# pkg backup -d /path/to/pkgng-backup.dump

-
The above command will create /path/to/pkgng-backup.dump.txz: a tar archive xz compressed
-
containing the dump of the local database.
+
The above command will dump the local package database in the /path/to/pkgng-backup.dump
+
file and compress it.

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

-
9. Additional resources
-
-----------------------
-

-
The Git repository of pkgng is hosted on Github at the following address:
-

-
	- https://github.com/pkgng/pkgng
-

-
For more information on pkgng you can visit it's Wiki page (still needs some work there):
-

-
	- http://wiki.freebsd.org/pkgng
-

-
Doxygen documentation of libpkg is available at the address below, which is generated
-
every 30min from the master pkgng repository:
-

-
	- http://pkgng.unix-heaven.org/
-

-
Buildbot for pkgng:
+
### 9. Additional resources

-
	- http://buildbot.etoilebsd.net/
+
* The Git repository of [pkgng is hosted on Github][1]

-
LLVM scanbuild:
+
* The [pkgng Wiki page][2] (still needs some work there)

-
	http://scanbuild.etoilebsd.net
+
* [Doxygen documentation for libpkg][3] is available as well and is updated every 30 minutes.

-
In order to get in contact with us, you can find us in the following IRC channel:
+
* [Buildbot for pkgng][4]

-
	- #pkgng@freenode
+
In order to get in contact with us, you can find us in the #pkgng@FreeNode IRC channel.

-
If you hit a bug when using pkgng, you can always submit an issue at the address below:
+
If you hit a bug when using pkgng, you can always submit an issue in the [pkgng issue tracker][5].

-
	- https://github.com/pkgng/pkgng/issues
+
[1]: https://github.com/pkgng/pkgng
+
[2]: http://wiki.freebsd.org/pkgng
+
[3]: http://pkgng.unix-heaven.org/
+
[4]: https://buildbot.etoilebsd.net/
+
[5]: https://github.com/pkgng/pkgng/issues