Add docs for remotes

This commit is contained in:
Stephen McQuay 2018-02-24 19:52:01 -08:00
parent aea1947394
commit 0253b79881
Signed by untrusted user: sm
GPG Key ID: 4E4B72F479BA3CE5
1 changed files with 48 additions and 1 deletions

View File

@ -49,7 +49,7 @@ following files:
name: foo
version: 2.3.29
platform: darwin/amd64
namespace: /darwin/amd64
description: Foo is the world's simplest frobnicator
deps: [baz, bar@0.9.2]
@ -65,3 +65,50 @@ deps: [baz, bar@0.9.2]
contents have not been tampered with.
0. `bin/{pre,post}-{install,ugrade,remove}` (**optional**) -- a collection of
executables that are run at the relevant stages.
As a minimum package authors are required to author the `root.tar.bz2` and the
`meta.yaml` files, and the `pm pkg create` will generate the rest of the files,
using the key information associated with the `PM_PGP_EMAIL` environment
If you can make a [tar file]( and write
a [yaml]( file, you can create a `pm`package!
## Remote Repositories
The notion of `remote` is borrowed from [git](; a `pm`
client can be configured to pull packages from multiple remote repositories. It
is intended to be trivial to deploy `pmd`, and equally trivial to configure
clients to fetch from multiple `remote`s.
The example remote url:
encodes a remote that is served over `https` on the host `` and
informs the client to pull packages from the `/darwin/amd64/testing` namespace,
specified by the Path. `pm pull` will collect available package information
from the remote for a given namespace and will populate its local database with
the contents of the response. `pm` can then list available packages, and
request that they be installed.
As a practical example a client can be configured to pull from two `remotes`
$ pm add remote
$ pm add remote
$ pm pull
$ pm available
foo 0.1.2
bar 3.2.3
Here each remote advertises one package each. After pulling metadata from the
`remote` server the client database is populated, and the user listed all
installable packages. In the case of collisions the first configured `remote`
offering a colliding packages will be the used.
Previous versions of `pm` use to implicitly formulate namespace values based on
host information (os and arch), but allowing package maintainers and end users
to specify this value explicitly allows for greater flexibility.