2009-02-05 16:12:00 +01:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
BRIEF INTRODUCTION
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2008-12-18 07:15:02 +01:00
|
|
|
A repository for binary packages contains the packages itself, and
|
|
|
|
an index file describing the information about available packages.
|
|
|
|
|
|
|
|
The structure for this file is just the same than the plist file used
|
|
|
|
to register installed packages, aka "an array of dictionaries" and
|
2008-12-19 06:22:03 +01:00
|
|
|
a "dictionary per package". Additional objects are added into the
|
|
|
|
main dictionary to specify more info, like:
|
|
|
|
|
|
|
|
- pkgindex-version: version used to build the index.
|
|
|
|
- location-local: local path to the repository.
|
|
|
|
- location-remote: remote URI repository.
|
|
|
|
- total-pkgs: total of number of available packages.
|
|
|
|
|
|
|
|
"location-local" will always be created, and it might be exported via
|
|
|
|
a remote location specified with "location-remote".
|
2008-12-18 07:15:02 +01:00
|
|
|
|
|
|
|
The package dictionary will be the same than the one available in
|
2009-02-14 23:21:12 +01:00
|
|
|
package's metadata directory "/var/db/xbps/metadata/$pkgname/props.plist",
|
2008-12-18 07:15:02 +01:00
|
|
|
but some additional objects are added to provide enough info for
|
2008-12-19 21:44:00 +01:00
|
|
|
the repository itself:
|
|
|
|
|
2009-02-05 06:02:16 +01:00
|
|
|
- filename: name (and path relative to current dir) for the binary
|
|
|
|
package.
|
2008-12-19 21:44:00 +01:00
|
|
|
- filename-sha256: SHA256 hash of the binary package.
|
2008-12-18 07:15:02 +01:00
|
|
|
|
|
|
|
Here's how the package index plist file shall look like in a repository:
|
|
|
|
|
|
|
|
<dict>
|
2008-12-19 06:22:03 +01:00
|
|
|
<key>pkgindex-version</key>
|
|
|
|
<string>1.0</string>
|
|
|
|
<key>location-local</key>
|
|
|
|
<string>/xbps/repo/local</string>
|
|
|
|
<key>location-remote</key>
|
|
|
|
<string>http://www.xbps-remote.org/repo/public</string>
|
|
|
|
<key>total-pkgs</key>
|
|
|
|
<integer>666</integer>
|
|
|
|
<key>available-packages</key>
|
2008-12-18 07:15:02 +01:00
|
|
|
<array>
|
|
|
|
<dict>
|
|
|
|
<key>pkgname</key>
|
|
|
|
<string>klibc</string>
|
|
|
|
<key>version</key>
|
|
|
|
<string>1.5.17</string>
|
|
|
|
<key>filename</key>
|
|
|
|
<string>klibc-1.5.17.x86_64.xbps</string>
|
2008-12-19 21:44:00 +01:00
|
|
|
<key>filename-sha256</key>
|
|
|
|
<string>7b0de0521983037107cc33f2b1514126432f86ac2be1ef9b9dc51a1e959ea777</string>
|
2008-12-18 07:15:02 +01:00
|
|
|
<key>architecture</key>
|
|
|
|
<string>x86_64</string>
|
|
|
|
<key>installed_size</key>
|
|
|
|
<integer>9471141</integer>
|
|
|
|
<key>maintainer</key>
|
|
|
|
<string>Juan RP xtraeme@gmail.com</string>
|
|
|
|
<key>short_desc</key>
|
|
|
|
<string>Minimal libc subset for use with initramfs</key>
|
|
|
|
<key>long_desc</key>
|
|
|
|
<string>
|
|
|
|
klibc is intended to be a minimalistic libc subset for use with initramfs.
|
|
|
|
It is deliberately written for small size, minimal entanglement, and
|
|
|
|
portability, not speed. It is definitely a work in progress and a lot of
|
|
|
|
things are still missing.</string>
|
|
|
|
...
|
|
|
|
</dict>
|
|
|
|
...
|
|
|
|
</array>
|
|
|
|
</dict>
|
2008-12-21 05:41:17 +01:00
|
|
|
|
2009-02-05 16:12:00 +01:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
HOW TO USE BINPKGS WITH REPOSITORIES
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2008-12-21 05:41:17 +01:00
|
|
|
To build binary packages from all currently installed packages in
|
|
|
|
XBPS_MASTERDIR:
|
|
|
|
|
2008-12-29 16:22:55 +01:00
|
|
|
$ xbps-src build-pkg all
|
2008-12-21 05:41:17 +01:00
|
|
|
|
2009-04-03 16:03:31 +02:00
|
|
|
To generate the repository package index for your $XBPS_PACKAGESDIR
|
|
|
|
setting in the configuration file:
|
2008-12-21 05:41:17 +01:00
|
|
|
|
2009-04-03 16:03:31 +02:00
|
|
|
$ xbps-repo genindex /path/to/dir
|
2008-12-21 05:41:17 +01:00
|
|
|
|
|
|
|
After this you can add your own local repository with binary packages:
|
|
|
|
|
2009-02-05 14:51:32 +01:00
|
|
|
$ xbps-repo add /path/to/dir
|
2008-12-21 05:41:17 +01:00
|
|
|
Added repository at /path/to/dir (1.0) with 6 packages.
|
|
|
|
$
|
|
|
|
|
|
|
|
Once it's registered, you can start searching/installing/removing
|
|
|
|
binary packages. You can add multiple repositories, the order for searching
|
|
|
|
is the same than they were added; check it with:
|
|
|
|
|
2009-02-05 14:51:32 +01:00
|
|
|
$ xbps-repo list
|
2008-12-21 05:41:17 +01:00
|
|
|
/storage/xbps/binpkgs
|
|
|
|
/path/to/dir
|
|
|
|
$
|
|
|
|
|
|
|
|
The first repository that has the metadata for a package wins, if not found
|
|
|
|
it will search in all them until it's found. A repository can also be
|
|
|
|
unregistered from the pool:
|
|
|
|
|
2009-02-05 14:51:32 +01:00
|
|
|
$ xbps-repo remove /path/to/dir
|
2008-12-21 05:41:17 +01:00
|
|
|
|
|
|
|
To show information about available packages in the repository pool:
|
|
|
|
|
2009-02-05 14:51:32 +01:00
|
|
|
$ xbps-repo show package
|
2008-12-21 05:41:17 +01:00
|
|
|
|
|
|
|
To search for binary packages by specifying a string:
|
|
|
|
|
2009-02-05 14:51:32 +01:00
|
|
|
$ xbps-repo search mypkg
|
2008-12-21 05:41:17 +01:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
Juan Romero Pardines <xtraeme@gmail.com>
|