Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Documentation update
Marin Atanasov Nikolov committed 14 years ago
commit 3d94fd1fdeaccf3e50fe19a78fe30be5e8fd22b2
parent cc1aa54
3 files changed +97 -58
modified FAQ.md
@@ -14,6 +14,7 @@ Table of Contents
* [The repository format of pkgng is different from the old one. Will pkgng adapt the old format too?](#8)
* [Does `pkg repo` include symlinked packages?](#9)
* [How do I know if I have packages with the same origin?](#10)
+
* [How to start working with multi-repos in pkgng?](#11)

<a name="1"></a>
### Q: Is there an equivalent for pkg-orphan/pkg_cutleaves with pkgng?
@@ -73,3 +74,9 @@ The default hierarchy has lots of symlinks which should just be ignored and thus
Hee is how to do that:

    sh -c 'find . -name "*.txz" -exec pkg query -f {} %o \;' | sort | uniq -d
+

+
<a name="11"></a>
+
### Q: How to start working with multi-repos in pkgng?
+

+
Please refer to the [README](https://github.com/pkgng/pkgng/blob/master/README.md#multirepos), which explains
+
how to enable and get started with multi-repos in pkgng.
modified README.md
@@ -16,7 +16,8 @@ Table of Contents:
* [Getting help on the commands usage](#pkghelp)
* [Installing packages](#pkgadd)
* [Querying the local package database](#pkginfo)
-
* [Using remote package repositories](#pkgrepos)
+
* [Working with a remote package repository](#pkgrepos)
+
* [Working with multiple remote package repositories](#multirepos)
* [Updating remote repositories](#pkgupdate)
* [Searching in remote package repositories](#pkgsearch)
* [Installing from remote repositories](#pkginstall)
@@ -37,7 +38,7 @@ updating, etc.
pkgng package format is a tar archive which can be raw, or use the following
compression: gz, bzip2 and xz, defaulting in xz format.

-
The tar it self is composed in two types of elements:
+
The tar itself is composed in two types of elements:

* the special files at the begining of the archive, starting with a "+"
* the datas.
@@ -272,30 +273,16 @@ 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
+
### Working with a remote package repository

-
The good thing about pkgng is that it is able to use remote package repositories.
+
pkgng is able to work with remote package repositories as well.

A remote package repository contains a collection of packages which can be
fetched, searched and installed into your systems.

-
The other good thing of pkgng is that it is able to work with multiple remote
-
repositories, so you can actually fetch, search and install from multiple locations!
-

-
	NOTE: Multple remote repositories are currently considered experimental.
-
	      Currently multiple remote repositories can be used to fetch, search and
-
	      install packages from. Upgrading from multiple repositories will be available
-
	      in the next releases of pkgng. For now upgrading can only be done from
-
	      a single remote package repository.
-

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.
-

-
_PACKAGESITE_ can also be set in the */etc/pkg.conf* configuration file.
-

-
If the _PACKAGESITE_ environment variable (or option in */etc/pkg.conf*) is not defined
-
then pkgng will work in multiple repositories mode, using the repositories which are
-
defined in the */etc/pkg/repositories* file.
+
so that it points to a remote location, which contains packages that can be installed by pkgng,
+
or set _PACKAGESITE_ in the *pkg.conf(5)* configuration file.

In order to work with a single remote package repository, you would define _PACKAGESITE_ to
your remote server with packages, like for example (or use */etc/pkg.conf* to set it there):
@@ -308,25 +295,61 @@ your remote server with packages, like for example (or use */etc/pkg.conf* to se

	# export PACKAGESITE=http://example.org/pkgng-repo/

-
For multiple remote repositories the _PACKAGESITE_ variable needs _NOT_ to be defined and the
-
remote package repositories should be definend in the */etc/pkg/repositories* file.
+
Then fetch the remote repository using the below command:
+

+
	# pkg update
+

+
This would fetch the remote package database to your local system. Now in order to install
+
packages from the remote repository, you would use the `pkg install` command:
+

+
	# pkg install zsh cfengine3
+

+
<a name="multirepos"></a>
+
### Working with multiple remote repositories
+

+
pkgng is also able to work with multiple remote repositories. In the previous section
+
we are using only a single remote repository, which is defined by the *PACKAGESITE* option.
+

+
In order to be able to work with multiple remote repositories and instead of changing 
+
each time *PACKAGESITE*, you can tell pkg(1) to work in multi-repos mode as well.
+

+
To do this, simply enable multi-repos in *pkg.conf(5)* like this:
+

+
	# echo "PKG_MULTIREPOS : YES" >> /etc/pkg.conf
+

+
The next thing is to define your remote repositories in the *pkg.conf(5)* file.
+

+
Below is a part from example configuration file, which defines three remote repositories - *repo1*, *repo2* and
+
the *default* repository.
+

+
	repos:
+
	  default : http://example.org/pkgng/
+
	  repo1 : http://somewhere.org/pkgng/repo1/
+
	  repo2 : http://somewhere.org/pkgng/repo2/
+

+
It is important that you always define a *default* repository - this is the repository that is being
+
used when no remote repositories are specified via the `-r <repo>` flag.
+

+
Next, fetch the remote repositories:
+

+
	# pkg update
+

+
And now you can install from the remote repositories using the `pkg install` command like this:
+

+
	# pkg install -r repo1 zsh cfengine3

-
A remote package repository in the */etc/pkg/repositories* file uses the following format:
+
Below you can find publically available repositories for pkgng that you can use:

-
	repo-name = url
+
* http://repos.etoilebsd.net/
+
* http://www.unix-heaven.org/FreeBSD/pkgng/repository/

-
The file format is the same as described in pkg.conf(5).
+
Example repo entries in *pkg.conf(5)* would look like this:

-
Example remote repository definition might look like this:
-
	
-
	# dnaeon's repo of i386 packages
-
	dnaeon-i386   = http://unix-heaven.org/FreeBSD/dnaeon-i386/
-
	
-
	# dnaeon's repo of amd64 packages
-
	dnaeon-amd64  = http://unix-heaven.org/FreeBSD/dnaeon-amd64/
+
	  bapt : http://repos.etoilebsd.net/9-amd64-20111222/
+
	  dnaeon : http://www.unix-heaven.org/FreeBSD/pkgng/repository/9-amd64-20111222/

-
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.
+
If you want to mirror the repositories and make them public as well, please get in contact with us, so that we
+
can add your repository to the list as well :)

<a name="pkgupdate"></a>
### Updating remote repositories
modified pkg/pkg.conf.5
@@ -34,49 +34,58 @@ The default location of this file is
Lines in the file beginning with a "#" are comments
and are ignored.
.Pp
-
The file is in YAML format and currently only supports
-
the
-
.Fa name : value
-
notation, but will be extended in the future to support
-
more options.
+
The file is in YAML format. For more information on the syntax of YAML,
+
please visit the official YAML website - http://www.yaml.org/.
+
.Pp
+
The following types of options are recognized -
+
boolean, string and list options.
+
.Pp
+
A boolean option is marked as enabled if one of the following values is
+
specified in the configuration file -
+
.Fa YES, TRUE
+
and
+
.Fa ON.
+
.Pp
.Sh OPTIONS
The following options can be defined in
.Nm :
.Bl -tag -width F1
-
.It Cm PACKAGESITE
+
.It Cm PACKAGESITE(string)
Specifies the remote location to use
-
when fetching a database file. 
-
.It Cm PKG_DBDIR
+
when fetching the database file and packages.
+
.It Cm PKG_DBDIR(string)
Specifies the directory to use for storing the package
database files. The default value for this option is
.Fa /var/db/pkg
-
.It Cm PKG_CACHEDIR
+
.It Cm PKG_CACHEDIR(string)
Specifies the cache directory for packages. The default value
for this option is
.Fa /var/cache/pkg
-
.It Cm PORTSDIR
+
.It Cm PORTSDIR(string)
Specifies the location to the Ports directory. The default value
for this option is
.Fa /usr/ports
-
.It Cm PUBKEY
+
.It Cm PUBKEY(string)
Specifies the location to the public RSA key used for signing the
repository database. The default value for this file is
.Fa /etc/ssl/pkg.conf
-
.It Cm HANDLE_RC_SCRIPTS
-
This option when set to
-
.Fa YES
-
will automatically do start/stop of services during package
-
installation and deinstallation. Default value of this option is
-
set to
-
.Fa NO
-
.It Cm ASSUME_ALWAYS_YES
-
When this option is set to
-
.Fa YES
-
pkgng will automatically assume "yes" to all questions
-
which require confirmation before doing anything, as if it
+
.It Cm HANDLE_RC_SCRIPTS(boolean)
+
This option when enabled
+
will automatically perform start/stop of services during package
+
installation and deinstallation. By default this option is disabled.
+
.It Cm ASSUME_ALWAYS_YES(boolean)
+
This option when enabled
+
.Xr pkg 1
+
will automatically assume "yes" to all questions
+
which require user confirmation before doing anything, as if it
the
.Fl y
-
flag was specified.
+
flag was specified. By default this option is disabled.
+
.It Cm PKG_MULTIREPOS(boolean)
+
This option when enabled will tell
+
.Xr pkg 1
+
to work in mutliple repositories mode. For example repositories
+
definitions, please have a look at the sample configuration file.
.El
.Sh WARNING
.Sh ENVRIOMENT