2009-02-05 16:12:00 +01:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
BRIEF INTRODUCTION
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
2008-12-11 03:22:54 +01:00
|
|
|
A binary package built with xbps is a normal tar(1) archive, compressed
|
2008-12-18 07:15:02 +01:00
|
|
|
with bzip2 and has the following structure:
|
2008-12-11 03:22:54 +01:00
|
|
|
|
2009-08-08 22:29:48 +02:00
|
|
|
Package metadata
|
|
|
|
-----------------
|
|
|
|
/INSTALL
|
|
|
|
/REMOVE
|
|
|
|
/files.plist
|
|
|
|
/props.plist
|
|
|
|
|
|
|
|
Package data
|
|
|
|
-----------------
|
|
|
|
/usr
|
|
|
|
/var
|
|
|
|
/etc
|
2008-12-11 03:22:54 +01:00
|
|
|
...
|
|
|
|
|
2009-02-14 23:21:12 +01:00
|
|
|
Metadata info is stored in the "/var/db/xbps/metadata/$pkgname"
|
2009-08-08 22:29:48 +02:00
|
|
|
directory and two files will be always be present: files.plist
|
|
|
|
and props.plist.
|
2008-12-17 08:27:28 +01:00
|
|
|
|
2009-04-03 17:02:38 +02:00
|
|
|
The files.plist file contains the list of files/links/dirs that package
|
|
|
|
will install, as well as SHA256 hashes for files.
|
2009-08-08 22:29:48 +02:00
|
|
|
|
2009-04-03 17:02:38 +02:00
|
|
|
The props.plist file contains package metadata properties and has the
|
|
|
|
following structure:
|
2008-12-11 03:22:54 +01:00
|
|
|
|
|
|
|
<dict>
|
2008-12-18 07:15:02 +01:00
|
|
|
<key>pkgname</key>
|
|
|
|
<string>foo</string>
|
|
|
|
|
|
|
|
<key>version</key>
|
|
|
|
<string>3.40</string>
|
|
|
|
|
|
|
|
<key>maintainer</key>
|
|
|
|
<string>The Master BOFH <bofh@baobab.org> </string>
|
|
|
|
|
|
|
|
<key>short_desc</key>
|
|
|
|
<string>Foo is a virtual package</string>
|
|
|
|
|
|
|
|
<key>long_desc</key>
|
|
|
|
<string>
|
|
|
|
Foo is a virtual package to show how the metadata props.plist file works
|
|
|
|
with xbps handling binary packages.</string>
|
|
|
|
|
2008-12-11 03:22:54 +01:00
|
|
|
<key>architecture</key>
|
|
|
|
<string>x86_64</string>
|
2008-12-18 07:15:02 +01:00
|
|
|
|
2008-12-11 03:22:54 +01:00
|
|
|
<key>installed_size</key>
|
|
|
|
<integer>500000</integer>
|
2008-12-18 07:15:02 +01:00
|
|
|
|
2008-12-11 03:22:54 +01:00
|
|
|
<key>configuration_files</key>
|
|
|
|
<array>
|
|
|
|
<string>/etc/foo.conf</string>
|
|
|
|
...
|
|
|
|
</array>
|
|
|
|
<key>run_depends</key>
|
|
|
|
<array>
|
|
|
|
<string>bofh-2.0</string>
|
2008-12-18 07:15:02 +01:00
|
|
|
<string>blab-1.1</string>
|
2008-12-11 03:22:54 +01:00
|
|
|
...
|
|
|
|
</array>
|
2008-12-18 07:15:02 +01:00
|
|
|
...
|
2008-12-11 03:22:54 +01:00
|
|
|
</dict>
|
|
|
|
|
2009-02-26 18:01:18 +01:00
|
|
|
The INSTALL/REMOVE executables allows you to trigger any action
|
2009-02-03 17:32:51 +01:00
|
|
|
at pre/post installation/removal of the binary package.
|
2008-12-11 03:22:54 +01:00
|
|
|
|
2008-12-18 07:15:02 +01:00
|
|
|
The package's dictionary will also be written into the repository's package
|
|
|
|
index file, that describes information about a binary package on it.
|
|
|
|
See the BINPKG_REPOSITORY file for more info about repositories.
|
2009-02-05 16:12:00 +01:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
HOW TO USE BINARY PACKAGES
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
To install binary packages, firstly a repository must be created as well as
|
|
|
|
some binary packages for it. The flow for this task is:
|
|
|
|
|
|
|
|
1- xbps-src install <package>
|
2009-02-16 17:36:21 +01:00
|
|
|
2- xbps-src build-pkg all [requires sudo access]
|
2009-04-03 16:03:31 +02:00
|
|
|
3- xbps-repo genindex $XBPS_PACKAGES
|
2009-02-05 16:12:00 +01:00
|
|
|
4- xbps-repo add $XBPS_PACKAGES
|
|
|
|
5- xbps-bin install -r /rootdir <package>
|
|
|
|
|
|
|
|
So the tasks are: install the package into destdir (and all its dependencies),
|
|
|
|
build the binary package from the required package, generate the repository
|
|
|
|
index, add the repository into the pool and install the binary package.
|
|
|
|
|
|
|
|
Please note that by default, the xbps-* utils accept the -r flag, to specify
|
|
|
|
the root directory for all operations, in that case the package will be
|
2009-02-14 23:21:12 +01:00
|
|
|
installed into <rootdir> and metadata files into <rootdir>/var/db/xbps.
|
2009-02-05 16:12:00 +01:00
|
|
|
|
|
|
|
Don't forget to set this flag if you aren't using xbps as the primary
|
|
|
|
package manager in your system, otherwise it could overwrite some files!
|
|
|
|
|
|
|
|
See the BINPKG_REPOSITORY file for more info about repositories for
|
|
|
|
binary packages or SRCPKG_INFO for source packages.
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
Juan Romero Pardines <xtraeme@gmail.com>
|