Difference between revisions of "PBI Manager/9.2"

From PC-BSD Wiki
Jump to: navigation, search
(pbi_makerepo(1))
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=Using AppCafe®|forward=Update Manager}}</noinclude>
+
<noinclude><translate>
  
 +
<!--T:1-->
 +
{{NavHeader|back=Using AppCafe®|forward=Using pkgng}}</noinclude>
 +
 +
<!--T:2-->
 
PBI Manager is a suite of command line utilities which can be used to install, remove, create and manage PBIs. It is also available for [[#Installing PBI Manager|FreeBSD systems]]. The PBI Manager is released under the {{citelink|url=http://www.freebsd.org/copyright/freebsd-license.html|txt=BSD license}}.
 
PBI Manager is a suite of command line utilities which can be used to install, remove, create and manage PBIs. It is also available for [[#Installing PBI Manager|FreeBSD systems]]. The PBI Manager is released under the {{citelink|url=http://www.freebsd.org/copyright/freebsd-license.html|txt=BSD license}}.
  
== Features ==
+
== Features == <!--T:3-->
  
 +
<!--T:4-->
 
The 9.x PBI format introduced the following features:
 
The 9.x PBI format introduced the following features:
  
 +
<!--T:5-->
 
* '''Upgrade deltas:''' since PBIs are self-contained, installation files tend to be large. In the previous implementation, updating a PBI required the re-downloading of the entire installation archive. For larger applications this could be a time-consuming process, especially over low bandwidth connections. The new PBI specification performs updates using binary diff patches known as PBP (Push Button Patch) files. PBPs are a fraction of the PBI's size; in some cases less than 5% of the original PBI archive. An upgrade automatically checks for for the presence of a PBP file and attempts to use it, only falling back to the original archive should the process fail.
 
* '''Upgrade deltas:''' since PBIs are self-contained, installation files tend to be large. In the previous implementation, updating a PBI required the re-downloading of the entire installation archive. For larger applications this could be a time-consuming process, especially over low bandwidth connections. The new PBI specification performs updates using binary diff patches known as PBP (Push Button Patch) files. PBPs are a fraction of the PBI's size; in some cases less than 5% of the original PBI archive. An upgrade automatically checks for for the presence of a PBP file and attempts to use it, only falling back to the original archive should the process fail.
  
 +
<!--T:6-->
 
* '''Library and file sharing:''' in the previous implementation of the PBI format it was common that identical files existed between various applications. These duplicates, while necessary to provide the self-contained functionality, wasted both disk space and runtime memory. This waste of space has been greatly reduced through the use of a hash-dir directory where libraries and common files are shared through a system of hard links. When an identical file is found in a PBI, the original will be removed and a hard-link stored in the hash-dir. After a PBI has been removed, any unneeded files left in the hash-dir are cleaned up by the pbid(8) daemon which monitors and maintains the integrity of the shared files.
 
* '''Library and file sharing:''' in the previous implementation of the PBI format it was common that identical files existed between various applications. These duplicates, while necessary to provide the self-contained functionality, wasted both disk space and runtime memory. This waste of space has been greatly reduced through the use of a hash-dir directory where libraries and common files are shared through a system of hard links. When an identical file is found in a PBI, the original will be removed and a hard-link stored in the hash-dir. After a PBI has been removed, any unneeded files left in the hash-dir are cleaned up by the pbid(8) daemon which monitors and maintains the integrity of the shared files.
  
 +
<!--T:7-->
 
* '''Repository management:''' allows administrators and PBI builders to create and manage their own repositories of PBIs. This repository system provides a number of tools for PBI distribution, release management, and repository browsing.  
 
* '''Repository management:''' allows administrators and PBI builders to create and manage their own repositories of PBIs. This repository system provides a number of tools for PBI distribution, release management, and repository browsing.  
  
 +
<!--T:8-->
 
* '''Digitally signed PBIs:''' each repository includes an openssl public key file which is installed on the end user's system. Each PBI includes several signatures for the content archive and installation and removal scripts. During the PBI installation process, these signatures are checked to confirm that the archive has not been tampered with during transit. This key file is also used to associate a particular PBI with a parent repository for upgrade purposes, since it is possible that multiple repositories will have the same applications.
 
* '''Digitally signed PBIs:''' each repository includes an openssl public key file which is installed on the end user's system. Each PBI includes several signatures for the content archive and installation and removal scripts. During the PBI installation process, these signatures are checked to confirm that the archive has not been tampered with during transit. This key file is also used to associate a particular PBI with a parent repository for upgrade purposes, since it is possible that multiple repositories will have the same applications.
  
 +
<!--T:9-->
 
* '''Root password not required:''' most applications can be installed and upgraded by regular user (non-root) accounts. This allows enhanced security in office or home situations, where users can now add/remove desktop applications without needing access to the root password. PBIs that impact on the security of the system (e.g. installing a web server) will require root access.
 
* '''Root password not required:''' most applications can be installed and upgraded by regular user (non-root) accounts. This allows enhanced security in office or home situations, where users can now add/remove desktop applications without needing access to the root password. PBIs that impact on the security of the system (e.g. installing a web server) will require root access.
  
 +
<!--T:10-->
 
* '''Implementation:''' the previous PBI design was developed in QT/KDE C++, making it inappropriate for use at the command line. The new format is implemented 100% in shell and is comprised of command-line utilities, each with an associated man page. These utilities are discussed in more detail in the rest of this section.
 
* '''Implementation:''' the previous PBI design was developed in QT/KDE C++, making it inappropriate for use at the command line. The new format is implemented 100% in shell and is comprised of command-line utilities, each with an associated man page. These utilities are discussed in more detail in the rest of this section.
  
== Additional Resources ==
+
== Additional Resources == <!--T:11-->
  
 +
<!--T:12-->
 
* {{citelink|url=http://www.pcbsd.org/~kris/pbi9-slides.pdf|txt=The PBI Format Re-implemented for Free/PC-BSD® (conference slides)}}
 
* {{citelink|url=http://www.pcbsd.org/~kris/pbi9-slides.pdf|txt=The PBI Format Re-implemented for Free/PC-BSD® (conference slides)}}
  
 +
<!--T:13-->
 
* {{citelink|url=http://www.pcbsd.org/~kris/asiabsdcon2011-pbi9.pdf|txt=The PBI Format Re-implemented for Free/PC-BSD® (formal paper)}}
 
* {{citelink|url=http://www.pcbsd.org/~kris/asiabsdcon2011-pbi9.pdf|txt=The PBI Format Re-implemented for Free/PC-BSD® (formal paper)}}
  
 +
<!--T:14-->
 
* [[PBI9 Format|The PBI Format for 9.0 and Beyond]]
 
* [[PBI9 Format|The PBI Format for 9.0 and Beyond]]
  
== Release History ==
+
== Release History == <!--T:15-->
  
 +
<!--T:16-->
 
; 1.0: ({{#dateformat:24 Sept 2012}}) - Kris Moore
 
; 1.0: ({{#dateformat:24 Sept 2012}}) - Kris Moore
  
 +
<!--T:17-->
 
:* Fix build with CLANG
 
:* Fix build with CLANG
  
 +
<!--T:18-->
 
:* Add support for shared XDG / Mime directories among users
 
:* Add support for shared XDG / Mime directories among users
  
 +
<!--T:19-->
 
:* Enhance icons handling when adding to LOCALBASE
 
:* Enhance icons handling when adding to LOCALBASE
  
 +
<!--T:20-->
 
:* Fixed a bug pruning the old version from an INDEX
 
:* Fixed a bug pruning the old version from an INDEX
  
 +
<!--T:21-->
 
:* Get rid of left-over .sha256 files in auto-build directories
 
:* Get rid of left-over .sha256 files in auto-build directories
  
 +
<!--T:22-->
 
; 0.9.9: ({{#dateformat:27 Aug 2012}}) - Kris Moore
 
; 0.9.9: ({{#dateformat:27 Aug 2012}}) - Kris Moore
  
 +
<!--T:23-->
 
:* Added new C .pbiwrapper file, which can set LD* variables, and use setuid among others
 
:* Added new C .pbiwrapper file, which can set LD* variables, and use setuid among others
  
 +
<!--T:24-->
 
:* Fixed issues doing pkg_add on pkgs which need license agreements
 
:* Fixed issues doing pkg_add on pkgs which need license agreements
  
 +
<!--T:25-->
 
:* Added support for saving / re-creating users & groups that a port may need
 
:* Added support for saving / re-creating users & groups that a port may need
  
 +
<!--T:26-->
 
:* Fixed some issues getting the correct Package Name
 
:* Fixed some issues getting the correct Package Name
  
 +
<!--T:27-->
 
:* Fixed and issue using exclude lists
 
:* Fixed and issue using exclude lists
  
 +
<!--T:28-->
 
:* Added option to view archive contents with pbi_add -i -v
 
:* Added option to view archive contents with pbi_add -i -v
  
 +
<!--T:29-->
 
:* Added internal priority system to pbi autobuilding
 
:* Added internal priority system to pbi autobuilding
  
 +
<!--T:30-->
 
:* Speed up build system with better package caching
 
:* Speed up build system with better package caching
  
 +
<!--T:31-->
 
:* Added additional tmpfs support for auto-building, to further speed up process
 
:* Added additional tmpfs support for auto-building, to further speed up process
  
 +
<!--T:32-->
 
:* Auto-source /etc/profile, to catch any HTTP_PROXY / FTP_PROXY values the user may set
 
:* Auto-source /etc/profile, to catch any HTTP_PROXY / FTP_PROXY values the user may set
  
 +
<!--T:33-->
 
; 0.9.8: ({{#dateformat:11 May 2011}}) - Kris Moore
 
; 0.9.8: ({{#dateformat:11 May 2011}}) - Kris Moore
  
 +
<!--T:34-->
 
:* Add support for copying linux binaries from ports, with their respective libs
 
:* Add support for copying linux binaries from ports, with their respective libs
  
 +
<!--T:35-->
 
:* Add GUI speed calculations when downloading
 
:* Add GUI speed calculations when downloading
  
 +
<!--T:36-->
 
:* Allow some overrides to built-in defaults, for FreeNAS / pfSense and others
 
:* Allow some overrides to built-in defaults, for FreeNAS / pfSense and others
  
 +
<!--T:37-->
 
:* Added fail-safes to make sure the user didn't manually mount things into a PBI directory
 
:* Added fail-safes to make sure the user didn't manually mount things into a PBI directory
  
 +
<!--T:38-->
 
; 0.9.7: ({{#dateformat:07 Dec 2011}}) - Kris Moore
 
; 0.9.7: ({{#dateformat:07 Dec 2011}}) - Kris Moore
  
 +
<!--T:39-->
 
:* Use -a flag for fetch to retry after soft failures
 
:* Use -a flag for fetch to retry after soft failures
  
 +
<!--T:40-->
 
:* Do not create binary patch files, if they are larger than the source
 
:* Do not create binary patch files, if they are larger than the source
  
 +
<!--T:41-->
 
:* Add ability to use /etc/pbi-make.conf on system, letting us set universal make options
 
:* Add ability to use /etc/pbi-make.conf on system, letting us set universal make options
  
 +
<!--T:42-->
 
:* Simplify the startup with less parsing commands
 
:* Simplify the startup with less parsing commands
  
 +
<!--T:43-->
 
:* Add new -R flag for pbi_add, which only downloads a PBI from a mirror, without installing it
 
:* Add new -R flag for pbi_add, which only downloads a PBI from a mirror, without installing it
  
 +
<!--T:44-->
 
:* Add support for using "ccache" automatically if configured on the host system
 
:* Add support for using "ccache" automatically if configured on the host system
  
 +
<!--T:45-->
 
:* Fixed a bug using "pbi_create" on a directory manually, make sure file end up in proper PBI application directory
 
:* Fixed a bug using "pbi_create" on a directory manually, make sure file end up in proper PBI application directory
  
 +
<!--T:46-->
 
:* Make sure we use the systems share/icons directory to use shared cursors / icons across all PBIs
 
:* Make sure we use the systems share/icons directory to use shared cursors / icons across all PBIs
  
 +
<!--T:47-->
 
; 0.9.6: ({{#dateformat:07 Nov 2011}})
 
; 0.9.6: ({{#dateformat:07 Nov 2011}})
  
 +
<!--T:48-->
 
:* Fix some bugs doing cleanup of stagedir / build directories
 
:* Fix some bugs doing cleanup of stagedir / build directories
  
 +
<!--T:49-->
 
:* Properly kill fetch process when canceling a download
 
:* Properly kill fetch process when canceling a download
  
 +
<!--T:50-->
 
:* Improve buildworld on FreeBSD to use /usr/src if it already has source
 
:* Improve buildworld on FreeBSD to use /usr/src if it already has source
  
 +
<!--T:51-->
 
:* Fix some random warnings when building via sudo
 
:* Fix some random warnings when building via sudo
  
 +
<!--T:52-->
 
; 0.9.5: ({{#dateformat:03 Nov 2011}})
 
; 0.9.5: ({{#dateformat:03 Nov 2011}})
  
 +
<!--T:53-->
 
:* Add sizes of PBIs to the meta index files
 
:* Add sizes of PBIs to the meta index files
  
 +
<!--T:54-->
 
:* Fix bug adding default icon to PBIs when none is specified
 
:* Fix bug adding default icon to PBIs when none is specified
  
 +
<!--T:55-->
 
:* Fix handling of PBI_PROGREVISION
 
:* Fix handling of PBI_PROGREVISION
  
 +
<!--T:56-->
 
:* Make sure we unmount nullfs mounts completely
 
:* Make sure we unmount nullfs mounts completely
  
 +
<!--T:57-->
 
; 0.9.4: ({{#dateformat:19 Oct 2011}})
 
; 0.9.4: ({{#dateformat:19 Oct 2011}})
  
 +
<!--T:58-->
 
:* Fix issue using system-fonts in PBIs
 
:* Fix issue using system-fonts in PBIs
  
 +
<!--T:59-->
 
:* Fix issue removing files which have been set r--
 
:* Fix issue removing files which have been set r--
  
 +
<!--T:60-->
 
:* Slow down fetch process to fix issues with fetch protocol errors
 
:* Slow down fetch process to fix issues with fetch protocol errors
  
 +
<!--T:61-->
 
:* Fix bug coping linux libraries into final PBI file
 
:* Fix bug coping linux libraries into final PBI file
  
 +
<!--T:62-->
 
:* Allow user settings in external-links to overwrite auto-detected values
 
:* Allow user settings in external-links to overwrite auto-detected values
  
 +
<!--T:63-->
 
:* Fix bug running "stat" on files with spaces in name
 
:* Fix bug running "stat" on files with spaces in name
  
 +
<!--T:64-->
 
:* Validate the build checksum before doing patching
 
:* Validate the build checksum before doing patching
  
 +
<!--T:65-->
 
:* Speed up builds with optional --tmpfs flags
 
:* Speed up builds with optional --tmpfs flags
  
 +
<!--T:66-->
 
:* Add priority system to building modules
 
:* Add priority system to building modules
  
 +
<!--T:67-->
 
:* Fix issues setting proxy support from pbi.conf / pcbsd.conf files
 
:* Fix issues setting proxy support from pbi.conf / pcbsd.conf files
  
 +
<!--T:68-->
 
:* Validate repo URL's when creating .rpo file
 
:* Validate repo URL's when creating .rpo file
  
 +
<!--T:69-->
 
; 0.9.3: ({{#dateformat:18 Jul 2011}})
 
; 0.9.3: ({{#dateformat:18 Jul 2011}})
  
 +
<!--T:70-->
 
:* Unset variables between auto-builds
 
:* Unset variables between auto-builds
  
 +
<!--T:71-->
 
:* Fixed some warnings with 'cut' when parsing i18n strings
 
:* Fixed some warnings with 'cut' when parsing i18n strings
  
 +
<!--T:72-->
 
:* When doing auto-builds, run through alphabetically
 
:* When doing auto-builds, run through alphabetically
  
 +
<!--T:73-->
 
:* Increase check frequency when first trying to download index's
 
:* Increase check frequency when first trying to download index's
  
 +
<!--T:74-->
 
:* Speed up the hashdir merging
 
:* Speed up the hashdir merging
  
 +
<!--T:75-->
 
:* Show repo MD5 with listings
 
:* Show repo MD5 with listings
  
 +
<!--T:76-->
 
:* If no index files, do not fail on listing, just show empty repo
 
:* If no index files, do not fail on listing, just show empty repo
  
 +
<!--T:77-->
 
; 0.9.2: ({{#dateformat:23 May 2011}})
 
; 0.9.2: ({{#dateformat:23 May 2011}})
  
 +
<!--T:78-->
 
:* Fixed usage errors with "tr"
 
:* Fixed usage errors with "tr"
 
    
 
    
Line 167: Line 244:
 
:* Auto-builder now checks if port is compatible with arch type of system
 
:* Auto-builder now checks if port is compatible with arch type of system
  
 +
<!--T:79-->
 
; 0.9.1: ({{#dateformat:3 May 2011}})
 
; 0.9.1: ({{#dateformat:3 May 2011}})
  
 +
<!--T:80-->
 
:* Initial public release
 
:* Initial public release
  
== What is the PBI format? ==
+
== What is the PBI format? == <!--T:81-->
  
 +
<!--T:82-->
 
One of the things holding back mainstream adoption of open source desktops is the package management format. With almost all open source desktops, software is simply treated as part of the operating system. Thus, when performing an update of some seemingly trivial application, you run the risk of potentially needing to upgrade other packages which could break other critical parts of your desktop.  
 
One of the things holding back mainstream adoption of open source desktops is the package management format. With almost all open source desktops, software is simply treated as part of the operating system. Thus, when performing an update of some seemingly trivial application, you run the risk of potentially needing to upgrade other packages which could break other critical parts of your desktop.  
  
 +
<!--T:83-->
 
While package management systems have gotten better at resolving dependency issues, trying to fix conflicts to prevent breakage before it occurs, they still do not address the underlying problem: every software package is a part of the system, and pulling on any one thread has the potential of causing a break somewhere farther down the line.
 
While package management systems have gotten better at resolving dependency issues, trying to fix conflicts to prevent breakage before it occurs, they still do not address the underlying problem: every software package is a part of the system, and pulling on any one thread has the potential of causing a break somewhere farther down the line.
  
 +
<!--T:84-->
 
The PBI format tries to correct this underlying flaw. Rather than making every application a part of the base system, PBIs are self-contained, including their own dependent library tree and related data. As a result, when you install a PBI there are no dependency issues to resolve, and applications can be added or removed freely, without fear of causing breakage to the desktop or any other installed software.
 
The PBI format tries to correct this underlying flaw. Rather than making every application a part of the base system, PBIs are self-contained, including their own dependent library tree and related data. As a result, when you install a PBI there are no dependency issues to resolve, and applications can be added or removed freely, without fear of causing breakage to the desktop or any other installed software.
  
== Installing PBI Manager ==
+
== Installing PBI Manager == <!--T:85-->
  
 +
<!--T:86-->
 
If you are running PC-BSD® 9 or higher, then the PBI Manager is already installed, and you can use it via the command-line, or a front-end such as the AppCafe®.  
 
If you are running PC-BSD® 9 or higher, then the PBI Manager is already installed, and you can use it via the command-line, or a front-end such as the AppCafe®.  
  
 +
<!--T:87-->
 
FreeBSD users can install it from the {{citelink|url=http://www.freshports.org/ports-mgmt/pbi-manager|txt=ports tree}}.  
 
FreeBSD users can install it from the {{citelink|url=http://www.freshports.org/ports-mgmt/pbi-manager|txt=ports tree}}.  
  
 +
<!--T:88-->
 
Users interested in installing the development version from our {{citelink|url=http://trac.pcbsd.org/brower/pcbsd/current/src-sh/pbi-manager/|txt=SVN repository}} can do so with the following commands: <!-- Is this still relevant or was this for pre-v9.0? -->
 
Users interested in installing the development version from our {{citelink|url=http://trac.pcbsd.org/brower/pcbsd/current/src-sh/pbi-manager/|txt=SVN repository}} can do so with the following commands: <!-- Is this still relevant or was this for pre-v9.0? -->
  
'''svn co <nowiki>svn://svn.pcbsd.org/pcbsd/current/src-sh/pbi-manager</nowiki>'''
+
<!--T:89-->
'''cd pbi-manager'''
+
{{txtbox|pre|box='''svn co {{svn}}svn.pcbsd.org/pcbsd/current/src-sh/pbi-manager'''
'''make install'''
+
'''cd pbi-manager'''
 +
'''make install'''
 +
|txt={{nbsp|65}} }}
  
 +
<!--T:90-->
 
'''NOTE: The development version may be unstable / buggy, use at your own risk'''
 
'''NOTE: The development version may be unstable / buggy, use at your own risk'''
  
== Getting PBI Files ==
+
== Getting PBI Files == <!--T:91-->
  
 +
<!--T:92-->
 
A list of approved and available PBIs can be viewed with '''pbi_info -i''' or '''pbi_browser''', and then installed with '''pbi_add -r <pbiname>'''.  
 
A list of approved and available PBIs can be viewed with '''pbi_info -i''' or '''pbi_browser''', and then installed with '''pbi_add -r <pbiname>'''.  
  
'''NOTE:''' PBI files previously created for PC-BSD® 7.x/8.x will NOT work with PBI Manager as it was designed for version 9.x.
+
<!--T:93-->
 +
{{note|PBI files previously created for PC-BSD® 7.x/8.x will NOT work with PBI Manager as it was designed for version 9.x.}}
  
== Underlying File / Directory Structure ==
+
== Underlying File / Directory Structure == <!--T:94-->
  
  
 +
<!--T:95-->
 
The underlying files and directories used by PBI Manager are as follows:
 
The underlying files and directories used by PBI Manager are as follows:
  
 +
<!--T:96-->
 
* '''/usr/local/etc/pbi.conf''': location of the PBI Manager configuration file  
 
* '''/usr/local/etc/pbi.conf''': location of the PBI Manager configuration file  
  
 +
<!--T:97-->
 
* '''/usr/pbi/''': where PBIs are installed on the system
 
* '''/usr/pbi/''': where PBIs are installed on the system
  
 +
<!--T:98-->
 
* '''/var/db/pbi/''': contains data files related to installed PBIs and repositories  
 
* '''/var/db/pbi/''': contains data files related to installed PBIs and repositories  
  
 +
<!--T:99-->
 
* '''/usr/local/sbin/pbi_*''': location of the PBI Manager commands
 
* '''/usr/local/sbin/pbi_*''': location of the PBI Manager commands
  
 +
<!--T:100-->
 
* '''/usr/local/share/pbi-manager/module-examples/convertoldmod.sh''': script which can be used to convert an existing 7.x or 8.x PBI module to the new 9.x format
 
* '''/usr/local/share/pbi-manager/module-examples/convertoldmod.sh''': script which can be used to convert an existing 7.x or 8.x PBI module to the new 9.x format
  
== Feedback / Reporting Problems ==
+
== Feedback / Reporting Problems == <!--T:101-->
  
 +
<!--T:102-->
 
Feedback, problem reports, and general discussion are welcome on the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=PBI Developers Mailing list}}.
 
Feedback, problem reports, and general discussion are welcome on the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=PBI Developers Mailing list}}.
  
== Command Reference ==
+
== Command Reference == <!--T:103-->
  
 +
<!--T:104-->
 
The following commands are installed by PBI Manager. For more details, refer to that command's man page. Note that single character commands can not be stacked. As an example, you must type '''pbi_add -i -v''' as '''pbi_add -iv''' will fail.
 
The following commands are installed by PBI Manager. For more details, refer to that command's man page. Note that single character commands can not be stacked. As an example, you must type '''pbi_add -i -v''' as '''pbi_add -iv''' will fail.
  
=== pbi_add(1) ===
+
=== pbi_add(1) === <!--T:105-->
  
 +
<!--T:106-->
 
Similar to FreeBSD's '''pkg_add''', the '''pbi_add''' command is used for adding/installing PBIs on a system, either from a local file or remotely from a repository. This utility supports the options listed in Table 7.2a. All of the options, except for '''-r''', assume that the ''.pbi'' file has already been downloaded and is in the current or specified directory.
 
Similar to FreeBSD's '''pkg_add''', the '''pbi_add''' command is used for adding/installing PBIs on a system, either from a local file or remotely from a repository. This utility supports the options listed in Table 7.2a. All of the options, except for '''-r''', assume that the ''.pbi'' file has already been downloaded and is in the current or specified directory.
  
'''Table 7.2a: pbi_add Options'''
+
<!--T:107-->
 
+
{{Tbl-init|caption=7.2a: pbi_add Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 285: Line 383:
 
|}
 
|}
  
 +
<!--T:108-->
 
For security reasons, it is recommend that users first use the '''-i -v''' and '''--checkscript''' options to view archive contents and installation scripts prior to installing a PBI file.
 
For security reasons, it is recommend that users first use the '''-i -v''' and '''--checkscript''' options to view archive contents and installation scripts prior to installing a PBI file.
  
 +
<!--T:109-->
 
To install a PBI from a remote repository, use: '''pbi_add -r name_of.pbi'''. The following example will install the alpine PBI on a 32-bit system:
 
To install a PBI from a remote repository, use: '''pbi_add -r name_of.pbi'''. The following example will install the alpine PBI on a 32-bit system:
  
'''pbi_add -r alpine'''
+
<!--T:110-->
Downloading <nowiki>ftp://ftp.pcbsd.org/pub/mirror/PBI/mail/alpine/9/x32/alpine-2.00_3-i386.pbi</nowiki>
+
{{txtbox|pre|box='''pbi_add -r alpine'''
/usr/pbi/.alpine-2.00_3-i386.pbi  100% of  11 MB 295 kBps 00m00s
+
Downloading {{ftp}}ftp.pcbsd.org/pub/mirror/PBI/mail/alpine/9/x32/alpine-2.00_3-i386.pbi
Verifying Checksum...OK
+
/usr/pbi/.alpine-2.00_3-i386.pbi  100% of  11 MB 295 kBps 00m00s
Extracting to: /usr/pbi/alpine-i386
+
Verifying Checksum...OK
Installed: Alpine-2.00_3
+
Extracting to: /usr/pbi/alpine-i386
 +
Installed: Alpine-2.00_3}}
  
 +
<!--T:111-->
 
PBI Manager will automatically detect the architecture and install the appropriate PBI. If only a 32-bit version is available and you are on a 64-bit system, the 32-bit PBI will be installed and will work correctly on the PC-BSD® system.
 
PBI Manager will automatically detect the architecture and install the appropriate PBI. If only a 32-bit version is available and you are on a 64-bit system, the 32-bit PBI will be installed and will work correctly on the PC-BSD® system.
  
 +
<!--T:112-->
 
If you previously downloaded the PBI, do not include the '''-r''' switch and give the fullname of the PBI:
 
If you previously downloaded the PBI, do not include the '''-r''' switch and give the fullname of the PBI:
  
'''pbi_add alpine-2.00_3-i386.pbi'''
+
<!--T:113-->
 +
{{txtbox|pre|box='''pbi_add alpine-2.00_3-i386.pbi'''}}
  
=== pbi_addrepo(8) ===
+
=== pbi_addrepo(8) === <!--T:114-->
  
 +
<!--T:115-->
 
The '''pbi_addrepo''' command is used to register a new PBI repository on a system. If the '''pbid''' daemon is running, the repository's index and meta files will be automatically fetched and made ready for browsing. The command has one argument: the name of the repository file. Repository files have a ''.rpo'' extension and are created with the '''pbi_makerepo''' command.
 
The '''pbi_addrepo''' command is used to register a new PBI repository on a system. If the '''pbid''' daemon is running, the repository's index and meta files will be automatically fetched and made ready for browsing. The command has one argument: the name of the repository file. Repository files have a ''.rpo'' extension and are created with the '''pbi_makerepo''' command.
  
=== pbi_autobuild(8) ===
+
=== pbi_autobuild(8) === <!--T:116-->
  
 +
<!--T:117-->
 
The '''pbi_autobuild''' command is used on the PBI build system to build any out-of-date or new packages. It can traverse the FreeBSD ports and metadata trees, building missing PBI files or PBIs in which the target port version has been updated. Instructions for using this command to keep a custom repository up-to-date can be found in the section [[Create Your Own PBI Repository#Configure the Automatic Build of Updated Ports|Configure the Automatic Build of Updated Ports]].
 
The '''pbi_autobuild''' command is used on the PBI build system to build any out-of-date or new packages. It can traverse the FreeBSD ports and metadata trees, building missing PBI files or PBIs in which the target port version has been updated. Instructions for using this command to keep a custom repository up-to-date can be found in the section [[Create Your Own PBI Repository#Configure the Automatic Build of Updated Ports|Configure the Automatic Build of Updated Ports]].
  
 +
<!--T:118-->
 
Table 7.2b summarizes this command's options:
 
Table 7.2b summarizes this command's options:
  
'''Table 7.2b: pbi_autobuild Options'''
+
<!--T:119-->
 
+
{{Tbl-init|caption=7.2b: pbi_autobuild Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 356: Line 462:
 
|}
 
|}
  
=== pbi_browser(1) ===
+
=== pbi_browser(1) === <!--T:120-->
  
 +
<!--T:121-->
 
The '''pbi_browser''' command provides a CLI front-end to browsing a repository's available PBIs. Options for viewing categories and searching by keyword are available, and once the desired PBI is located, it will show the '''pbi_add''' command which can be used to install the application. Table 7.2c summarizes the available options.
 
The '''pbi_browser''' command provides a CLI front-end to browsing a repository's available PBIs. Options for viewing categories and searching by keyword are available, and once the desired PBI is located, it will show the '''pbi_add''' command which can be used to install the application. Table 7.2c summarizes the available options.
  
'''Table 7.2c: pbi_browser Options'''
+
<!--T:122-->
 
+
{{Tbl-init|caption=7.2c: pbi_browser Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 380: Line 486:
 
|}
 
|}
  
=== pbi.conf(5) ===
+
=== pbi.conf(5) === <!--T:123-->
  
 +
<!--T:124-->
 
''pbi.conf'' is an ASCII text configuration file containing values that are used by the various '''pbi_*''' commands. The proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.2d lists the supported variables.
 
''pbi.conf'' is an ASCII text configuration file containing values that are used by the various '''pbi_*''' commands. The proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.2d lists the supported variables.
  
'''Table 7.2d: pbi_conf Variables'''
+
<!--T:125-->
 
+
{{Tbl-init|caption=7.2d: pbi_conf Variables}}
{{Tbl-init}}
+
 
{{Tbl-title|width=20%|'''Variable'''}}
 
{{Tbl-title|width=20%|'''Variable'''}}
 
{{Tbl-title|width=80%|'''Description'''}}
 
{{Tbl-title|width=80%|'''Description'''}}
Line 413: Line 519:
 
|}
 
|}
  
=== pbi_create(1) ===
+
=== pbi_create(1) === <!--T:126-->
  
 +
<!--T:127-->
 
The '''pbi_create''' command provides a way for packagers to manually specify a target directory to be compressed into a PBI file. The option '''-b''' can also be used to re-package an already installed PBI back to an archive. PBI creators are encouraged to send a tarball of the resulting PBI module to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=PBI-dev mailing list}} so they can be added to the PC-BSD® PBI repository and made available to other PC-BSD® users.
 
The '''pbi_create''' command provides a way for packagers to manually specify a target directory to be compressed into a PBI file. The option '''-b''' can also be used to re-package an already installed PBI back to an archive. PBI creators are encouraged to send a tarball of the resulting PBI module to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=PBI-dev mailing list}} so they can be added to the PC-BSD® PBI repository and made available to other PC-BSD® users.
  
 +
<!--T:128-->
 
Table 7.2e summarizes the available options:
 
Table 7.2e summarizes the available options:
  
'''Table 7.2e: pbi_create Options'''
+
<!--T:129-->
 
+
{{Tbl-init|caption=7.2e: pbi_create Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 463: Line 570:
 
|}
 
|}
  
 +
<!--T:130-->
 
As the superuser, you can create a PBI with the '''pbi_create''' command using the following syntax:
 
As the superuser, you can create a PBI with the '''pbi_create''' command using the following syntax:
  
'''pbi_create -a <author> -n <name> -r <version> -w <weburl> <target directory>'''
+
<!--T:131-->
 +
{{txtbox|pre|box='''pbi_create -a <author> -n <name> -r <version> -w <weburl> <target directory>'''}}
  
 +
<!--T:132-->
 
Inside the target directory place the application's binaries or scripts along with any required dependencies. To indicate which file(s) represent the runtime command(s), include a file named ''external-links'' in the target directory. That file contains an entry for each command, as seen in the following example:
 
Inside the target directory place the application's binaries or scripts along with any required dependencies. To indicate which file(s) represent the runtime command(s), include a file named ''external-links'' in the target directory. That file contains an entry for each command, as seen in the following example:
  
# Files to be symlinked into the default LOCALBASE
+
<!--T:133-->
# One per-line, relative to %%PBI_APPDIR%% and LOCALBASE
+
{{txtbox|pre|box={{pound}} Files to be symlinked into the default LOCALBASE
# Defaults to keeping any existing files in LOCALBASE
+
{{pound}} One per-line, relative to %%PBI_APPDIR%% and LOCALBASE
# Use bin-files/ for binaries that need wrapper functionality
+
{{pound}} Defaults to keeping any existing files in LOCALBASE
 +
{{pound}} Use bin-files/ for binaries that need wrapper functionality
 
   
 
   
# TARGET                LINK IN LOCALBASE      ACTION
+
{{pound}} TARGET                LINK IN LOCALBASE      ACTION
bin/myapp              bin/myapp              binary,nocrash
+
bin/myapp              bin/myapp              binary,nocrash}}
  
 +
<!--T:134-->
 
This entry instructs '''pbi_create''' to make the wrapper scripts for the ''myapp'' binary, along with placing it in the user's PATH at install time.
 
This entry instructs '''pbi_create''' to make the wrapper scripts for the ''myapp'' binary, along with placing it in the user's PATH at install time.
  
 +
<!--T:135-->
 
It is also possible to include desktop icons and mime entries using the ''xdg-mime/'', ''xdg-desktop/'' and ''xdg-menu/'' directories. The section on how to [[Create PBIs]] contains more details about creating these files. These directories should be created as subdirectories of the target directory of your application.
 
It is also possible to include desktop icons and mime entries using the ''xdg-mime/'', ''xdg-desktop/'' and ''xdg-menu/'' directories. The section on how to [[Create PBIs]] contains more details about creating these files. These directories should be created as subdirectories of the target directory of your application.
  
=== pbi_delete(1) ===
+
=== pbi_delete(1) === <!--T:136-->
  
 +
<!--T:137-->
 
Similar to FreeBSD's '''pkg_delete''', the '''pbi_delete''' command removes an installed PBI from the system. It also schedules cleaning for the shared library directory, which is performed by '''pbid'''. Table 7.2f summarizes its options:
 
Similar to FreeBSD's '''pkg_delete''', the '''pbi_delete''' command removes an installed PBI from the system. It also schedules cleaning for the shared library directory, which is performed by '''pbid'''. Table 7.2f summarizes its options:
  
'''Table 7.2f: pbi_delete Options'''
+
<!--T:138-->
 
+
{{Tbl-init|caption=7.2f: pbi_delete Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 499: Line 612:
 
|}
 
|}
  
 +
<!--T:139-->
 
When removing a PBI, you must give its full name. The full name can be found in the output of '''pbi_info'''. The following example searches for the ntop PBI and removes it:
 
When removing a PBI, you must give its full name. The full name can be found in the output of '''pbi_info'''. The following example searches for the ntop PBI and removes it:
 
   
 
   
'''pbi_info | grep ntop'''
+
{{txtbox|pre|box='''pbi_info {{pipe}} grep ntop'''
ntop-4.0.1_1-i386
+
ntop-4.0.1_1-i386
'''pbi_delete -v ntop-4.0.1_1-i386'''
+
'''pbi_delete -v ntop-4.0.1_1-i386'''
Running pre-removal script: /var/db/pbi/installed/ntop-4.0.1_1-i386/pre-remove.sh
+
Running pre-removal script: /var/db/pbi/installed/ntop-4.0.1_1-i386/pre-remove.sh
Removing: /usr/pbi/ntop-i386
+
Removing: /usr/pbi/ntop-i386
Removing: /var/db/pbi/installed/ntop-4.0.1_1-i386
+
Removing: /var/db/pbi/installed/ntop-4.0.1_1-i386}}
  
=== pbi_deleterepo(8) ===
+
=== pbi_deleterepo(8) === <!--T:140-->
  
 +
<!--T:141-->
 
The '''pbi_deleterepo''' command can be used to remove a registered repository from the system. It takes the repository's ID as the only command argument.
 
The '''pbi_deleterepo''' command can be used to remove a registered repository from the system. It takes the repository's ID as the only command argument.
  
=== pbi_icon(1) ===
+
=== pbi_icon(1) === <!--T:142-->
  
 +
<!--T:143-->
 
The '''pbi_icon''' command provides a number of options for adding desktop icons, menu entries, and mime data for an installed PBI. Not all PBIs will contain desktop/menu/mime data. Additionally, the window manager must be {{citelink|url=http://en.wikipedia.org/wiki/Xdg|XDG}}-compliant to understand a PBI's icon and mime settings. Table 7.2g summarizes this command's options:
 
The '''pbi_icon''' command provides a number of options for adding desktop icons, menu entries, and mime data for an installed PBI. Not all PBIs will contain desktop/menu/mime data. Additionally, the window manager must be {{citelink|url=http://en.wikipedia.org/wiki/Xdg|XDG}}-compliant to understand a PBI's icon and mime settings. Table 7.2g summarizes this command's options:
  
'''Table 7.2g: pbi_icon Options'''
+
<!--T:144-->
 
+
{{Tbl-init|caption=7.2g: pbi_icon Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 548: Line 663:
 
|}
 
|}
  
=== pbi_indextool(1) ===
+
=== pbi_indextool(1) === <!--T:145-->
  
 +
<!--T:146-->
 
The '''pbi_indextool''' command is useful for repository maintainers. It allows PBI files to be added and removed from the repository's ''INDEX'' file. An example of using this command can be found in [[Create Your Own PBI Repository]]. Table 7.2h summarizes the available options:
 
The '''pbi_indextool''' command is useful for repository maintainers. It allows PBI files to be added and removed from the repository's ''INDEX'' file. An example of using this command can be found in [[Create Your Own PBI Repository]]. Table 7.2h summarizes the available options:
  
'''Table 7.2h: pbi_indextool Options'''
+
<!--T:147-->
 
+
{{Tbl-init|caption=7.2h: pbi_indextool Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Command'''}}
 
{{Tbl-title|width=15%|'''Command'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
Line 589: Line 704:
 
|}
 
|}
  
=== pbi_info(1) ===
+
=== pbi_info(1) === <!--T:148-->
  
 +
<!--T:149-->
 
Similar to FreeBSD's '''pkg_info''' command, the '''pbi_info''' command is used to determine which PBIs are currently installed. Table 7.2i summarizes the available options:
 
Similar to FreeBSD's '''pkg_info''' command, the '''pbi_info''' command is used to determine which PBIs are currently installed. Table 7.2i summarizes the available options:
  
'''Table 7.2i: pbi_info Options'''
+
<!--T:150-->
 
+
{{Tbl-init|caption=7.2i: pbi_info Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 610: Line 725:
 
|}
 
|}
  
=== pbi_listrepo(1) ===
+
=== pbi_listrepo(1) === <!--T:151-->
  
 +
<!--T:152-->
 
The '''pbi_listrepo''' command manages installed repositories on a system. Table 7.2j summarizes this command's options:
 
The '''pbi_listrepo''' command manages installed repositories on a system. Table 7.2j summarizes this command's options:
  
'''Table 7.2j: pbi_listrepo Options'''
+
<!--T:153-->
 
+
{{Tbl-init|caption=7.2j: pbi_listrepo Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 631: Line 746:
 
|}
 
|}
  
 +
<!--T:154-->
 
Run the command without any options to list the IDs of the available repositories.
 
Run the command without any options to list the IDs of the available repositories.
  
=== pbi_makepatch(1) ===
+
=== pbi_makepatch(1) === <!--T:155-->
  
 +
<!--T:156-->
 
The '''pbi_makepatch''' command is automatically used by '''pbi_autobuild''' to create small ''*.pbp'' (Push Button Patch) files. These files can be downloaded to a user's system in order to update a PBI's version without re-downloading the entire archive. This allows users to download only the incremental changes when a PBI is upgraded. The command can also be run manually by providing two PBI archives to compare and generate a patch file for.
 
The '''pbi_makepatch''' command is automatically used by '''pbi_autobuild''' to create small ''*.pbp'' (Push Button Patch) files. These files can be downloaded to a user's system in order to update a PBI's version without re-downloading the entire archive. This allows users to download only the incremental changes when a PBI is upgraded. The command can also be run manually by providing two PBI archives to compare and generate a patch file for.
  
 +
<!--T:157-->
 
Table 7.2k summarizes the available options:
 
Table 7.2k summarizes the available options:
  
'''Table 7.2k: pbi_makepatch Options
+
<!--T:158-->
 
+
{{Tbl-init|caption=7.2k: pbi_makepatch Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 656: Line 773:
 
|}
 
|}
  
=== pbi_makeport(1) ===
+
=== pbi_makeport(1) === <!--T:159-->
  
 +
<!--T:160-->
 
The '''pbi_makeport''' command can be used by packagers to build a target FreeBSD port and convert it into a PBI file. Many options are provided to fine-tune the build process, and meta-data modules can also be specified to further improve the resulting PBI file. The first time this command is run, it will build a fresh chroot sandbox environment which can be used for clean-room building of the target port without affecting the host system. More details about how to create a PBI using this command, can be found in the [[PBI Module Builder Guide#Creating a New PBI with pbi makeport | ''PBI Module Builder Guide'']].
 
The '''pbi_makeport''' command can be used by packagers to build a target FreeBSD port and convert it into a PBI file. Many options are provided to fine-tune the build process, and meta-data modules can also be specified to further improve the resulting PBI file. The first time this command is run, it will build a fresh chroot sandbox environment which can be used for clean-room building of the target port without affecting the host system. More details about how to create a PBI using this command, can be found in the [[PBI Module Builder Guide#Creating a New PBI with pbi makeport | ''PBI Module Builder Guide'']].
  
'''NOTE:''' the '''pbi_makeport''' command has support for using {{citelink|url=http://ccache.samba.org/|txt=ccache}} to speed up the compile process. If '''ccache''' is installed on the host system and the CCACHE_DIR variable is set, the '''pbi_makeport''' command will automatically utilize it for the port compile phase. This can be disabled by setting NO_CCACHE=yes in ''/etc/pbi-make.conf'' on the host system, or as an optional make flag in a module's ''pbi.conf'' file.  
+
<!--T:161-->
 +
{{note|icon64=the '''pbi_makeport''' command has support for using {{citelink|url=http://ccache.samba.org/|txt=ccache}} to speed up the compile process. If '''ccache''' is installed on the host system and the CCACHE_DIR variable is set, the '''pbi_makeport''' command will automatically utilize it for the port compile phase. This can be disabled by setting NO_CCACHE=yes in ''/etc/pbi-make.conf'' on the host system, or as an optional make flag in a module's ''pbi.conf'' file.}}
  
 +
<!--T:162-->
 
'''pbi_makeport''', will attempt to create any users or groups that the underlying ports require during the PBI installation. If the PBI is being installed as non-root, it will instead provide a warning message regarding any users or groups that need to be manually created. For this functionality to work, the port must set ''USERS='' or ''GROUPS='' in its ''Makefile'' and provide the corresponding UID and/or GID entries.
 
'''pbi_makeport''', will attempt to create any users or groups that the underlying ports require during the PBI installation. If the PBI is being installed as non-root, it will instead provide a warning message regarding any users or groups that need to be manually created. For this functionality to work, the port must set ''USERS='' or ''GROUPS='' in its ''Makefile'' and provide the corresponding UID and/or GID entries.
  
 +
<!--T:163-->
 
Table 7.2l summarizes the available options:
 
Table 7.2l summarizes the available options:
  
'''Table 7.2l: pbi_makeport Options'''
+
<!--T:164-->
 
+
{{Tbl-init|caption=7.2l: pbi_makeport Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 703: Line 823:
 
|-
 
|-
 
{{Tbl-cell|row=11|'''--pkgdir dir'''}}
 
{{Tbl-cell|row=11|'''--pkgdir dir'''}}
{{Tbl-cell|row=11|uses the specified directory to cache the .txz package so subsequent builds will not rebuild the port from source
+
{{Tbl-cell|row=11|uses the specified directory to cache the .txz package so subsequent builds will not rebuild the port from source}}
}}
+
 
|-
 
|-
 
{{Tbl-cell|row=12|'''--tmpfs'''}}
 
{{Tbl-cell|row=12|'''--tmpfs'''}}
Line 714: Line 833:
 
|}
 
|}
  
=== pbi_makerepo(1) ===
+
=== pbi_makerepo(1) === <!--T:165-->
  
 +
<!--T:166-->
 
The '''pbi_makerepo''' command allows repository maintainers to create a single ''*.rpo'' file containing various information about the new repository. This ''.rpo'' file can then be installed on the target system with '''pbi_addrepo'''. Table 7.2m summarizes the available options.
 
The '''pbi_makerepo''' command allows repository maintainers to create a single ''*.rpo'' file containing various information about the new repository. This ''.rpo'' file can then be installed on the target system with '''pbi_addrepo'''. Table 7.2m summarizes the available options.
  
'''Table 7.2m: pbi_makerepo Options'''
+
<!--T:167-->
 
+
{{Tbl-init|caption=7.2m: pbi_makerepo Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 738: Line 857:
 
|}
 
|}
  
=== pbi_metatool(1) ===
+
=== pbi_metatool(1) === <!--T:168-->
  
 +
<!--T:169-->
 
The '''pbi_metatool''' command provides a way for repository maintainers to modify the PBI metadata in their repository in order to add or remove application categories or specified PBIs. An example of using this command can be found in [[Create Your Own PBI Repository]]. Table 7.2n summarizes the available options:
 
The '''pbi_metatool''' command provides a way for repository maintainers to modify the PBI metadata in their repository in order to add or remove application categories or specified PBIs. An example of using this command can be found in [[Create Your Own PBI Repository]]. Table 7.2n summarizes the available options:
  
'''Table 7.2n: pbi_metatool Options'''
+
<!--T:170-->
 
+
{{Tbl-init|caption=7.2n: pbi_metatool Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Command'''}}
 
{{Tbl-title|width=15%|'''Command'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
Line 753: Line 872:
 
{{Tbl-cell|row=1|indicates that a new category is being added to or removed from the target metafile}}
 
{{Tbl-cell|row=1|indicates that a new category is being added to or removed from the target metafile}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add''' or '''rem'''}}
+
{{Tbl-cell|row=2|'''add''' or '''rem'''}}
{{Tbl-cell|row=1|'''--app'''}}
+
{{Tbl-cell|row=2|'''--app'''}}
{{Tbl-cell|row=1|adds or removes a new PBI to/from the target metafile}}
+
{{Tbl-cell|row=2|adds or removes a new PBI to/from the target metafile}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=3|'''add'''}}
{{Tbl-cell|row=1|'''-a author'''}}
+
{{Tbl-cell|row=3|'''-a author'''}}
{{Tbl-cell|row=1|adds the name of the application's author to the target metafile}}
+
{{Tbl-cell|row=3|adds the name of the application's author to the target metafile}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=4|'''add'''}}
{{Tbl-cell|row=1|'''-c category'''}}
+
{{Tbl-cell|row=4|'''-c category'''}}
{{Tbl-cell|row=1|name of new category to add to the target metafile}}
+
{{Tbl-cell|row=4|name of new category to add to the target metafile}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=5|'''add'''}}
{{Tbl-cell|row=1|'''-d desc'''}}
+
{{Tbl-cell|row=5|'''-d desc'''}}
{{Tbl-cell|row=1|mandatory description of PBI or category being added}}
+
{{Tbl-cell|row=5|mandatory description of PBI or category being added}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=6|'''add'''}}
{{Tbl-cell|row=1|'''-i icon'''}}
+
{{Tbl-cell|row=6|'''-i icon'''}}
{{Tbl-cell|row=1|mandatory URL to 64x64 ''.png'' icon of PBI or category being added}}
+
{{Tbl-cell|row=6|mandatory URL to 64x64 ''.png'' icon of PBI or category being added}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=7|'''add'''}}
{{Tbl-cell|row=1|'''-k keywords'''}}
+
{{Tbl-cell|row=7|'''-k keywords'''}}
{{Tbl-cell|row=1|comma delimited list (with no spaces) of search keywords}}
+
{{Tbl-cell|row=7|comma delimited list (with no spaces) of search keywords}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=8|'''add'''}}
{{Tbl-cell|row=1|'''-l license'''}}
+
{{Tbl-cell|row=8|'''-l license'''}}
{{Tbl-cell|row=1|type of license (e.g. BSD, GPL, Commercial)}}
+
{{Tbl-cell|row=8|type of license (e.g. BSD, GPL, Commercial)}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add''' or '''rem'''}}
+
{{Tbl-cell|row=9|'''add''' or '''rem'''}}
{{Tbl-cell|row=1|'''-n name'''}}
+
{{Tbl-cell|row=9|'''-n name'''}}
{{Tbl-cell|row=1|mandatory name of category or PBI being added to or removed from the target metafile}}
+
{{Tbl-cell|row=9|mandatory name of category or PBI being added to or removed from the target metafile}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=10|'''add'''}}
{{Tbl-cell|row=1|'''-t type'''}}
+
{{Tbl-cell|row=10|'''-t type'''}}
{{Tbl-cell|row=1|type of application (e.g. Graphical, Text, Service)}}
+
{{Tbl-cell|row=10|type of application (e.g. Graphical, Text, Service)}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=11|'''add'''}}
{{Tbl-cell|row=1|'''-u URL'''}}
+
{{Tbl-cell|row=11|'''-u URL'''}}
{{Tbl-cell|row=1|website of application being added}}
+
{{Tbl-cell|row=11|website of application being added}}
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
{{Tbl-cell|row=12|'''add'''}}
{{Tbl-cell|row=1|'''-r'''}}
+
{{Tbl-cell|row=12|'''-r'''}}
{{Tbl-cell|row=1|include if application needs to be installed as the superuser}}
+
{{Tbl-cell|row=12|include if application needs to be installed as the superuser}}
 
|-
 
|-
 
|}
 
|}
  
=== pbi_patch(1) ===
+
=== pbi_patch(1) === <!--T:171-->
  
 +
<!--T:172-->
 
The '''pbi_patch''' command is used to update an installed PBI to a different version using a small diff Push Button Patch ''*.pbp'' file. This allows the user to perform an incremental upgrade of an installed PBI. The available options are summarized in Table 7.2o.
 
The '''pbi_patch''' command is used to update an installed PBI to a different version using a small diff Push Button Patch ''*.pbp'' file. This allows the user to perform an incremental upgrade of an installed PBI. The available options are summarized in Table 7.2o.
  
'''Table 7.2o: pbi_patch Options'''
+
<!--T:173-->
 
+
{{Tbl-init|caption=7.2o: pbi_patch Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 812: Line 931:
 
{{Tbl-cell|row=1|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless '''-o''' is used.}}
 
{{Tbl-cell|row=1|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless '''-o''' is used.}}
 
|-
 
|-
{{Tbl-cell|row=1|'''-g'''}}
+
{{Tbl-cell|row=2|'''-g'''}}
{{Tbl-cell|row=1|extract image data from header; commonly used for GUI installations}}
+
{{Tbl-cell|row=2|extract image data from header; commonly used for GUI installations}}
 
|-
 
|-
{{Tbl-cell|row=1|'''-i'''}}
+
{{Tbl-cell|row=3|'''-i'''}}
{{Tbl-cell|row=1|display information about this PBI file}}
+
{{Tbl-cell|row=3|display information about this PBI file}}
 
|-
 
|-
{{Tbl-cell|row=1|'''-o outdir'''}}
+
{{Tbl-cell|row=4|'''-o outdir'''}}
{{Tbl-cell|row=1|specify the directory to use when only extracting the PBI with '''-e'''}}
+
{{Tbl-cell|row=4|specify the directory to use when only extracting the PBI with '''-e'''}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--checkscript'''}}
+
{{Tbl-cell|row=5|'''--checkscript'''}}
{{Tbl-cell|row=1|display any custom scripts used in the installation/removal of this PBI file; recommended if the PBI file is suspect in any way}}
+
{{Tbl-cell|row=5|display any custom scripts used in the installation/removal of this PBI file; recommended if the PBI file is suspect in any way}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--no-checksig'''}}
+
{{Tbl-cell|row=6|'''--no-checksig'''}}
{{Tbl-cell|row=1|skip the openssl signature verification of the PBI data}}
+
{{Tbl-cell|row=6|skip the openssl signature verification of the PBI data}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--no-hash'''}}
+
{{Tbl-cell|row=7|'''--no-hash'''}}
{{Tbl-cell|row=1|disable using the shared hash directory which uses hard links to share files between applications}}
+
{{Tbl-cell|row=7|disable using the shared hash directory which uses hard links to share files between applications}}
 
|-
 
|-
 
|}
 
|}
  
=== pbi_update(1) ===
+
=== pbi_update(1) === <!--T:174-->
  
 +
<!--T:175-->
 
The '''pbi_update''' command is used to display information about which PBIs have available updates and to perform the updates. Table 7.2p summarizes the available options.
 
The '''pbi_update''' command is used to display information about which PBIs have available updates and to perform the updates. Table 7.2p summarizes the available options.
  
'''Table 7.2p: pbi_update Options'''
+
<!--T:176-->
 
+
{{Tbl-init|caption=7.2p: pbi_update Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 845: Line 964:
 
{{Tbl-cell|row=1|check only the specified PBI for available updates}}
 
{{Tbl-cell|row=1|check only the specified PBI for available updates}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--check-all'''}}
+
{{Tbl-cell|row=2|'''--check-all'''}}
{{Tbl-cell|row=1|run a full check of all installed PBIs and display list of available updates}}
+
{{Tbl-cell|row=2|run a full check of all installed PBIs and display list of available updates}}
 
|-
 
|-
{{Tbl-cell|row=1|'''-disable-auto'''}}
+
{{Tbl-cell|row=3|'''-disable-auto'''}}
{{Tbl-cell|row=1|disable auto-updating of the target PBI}}
+
{{Tbl-cell|row=3|disable auto-updating of the target PBI}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--enable-auto'''}}
+
{{Tbl-cell|row=4|'''--enable-auto'''}}
{{Tbl-cell|row=1|enable auto-updating of the target PBI}}
+
{{Tbl-cell|row=4|enable auto-updating of the target PBI}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--update-all'''}}
+
{{Tbl-cell|row=5|'''--update-all'''}}
{{Tbl-cell|row=1|update all installed PBIs to the latest versions}}
+
{{Tbl-cell|row=5|update all installed PBIs to the latest versions}}
 
|-
 
|-
 
|}
 
|}
  
=== pbi_update_hashdir(1) ===
+
=== pbi_update_hashdir(1) === <!--T:177-->
  
 +
<!--T:178-->
 
The '''pbi_update_hashdir''' command is used by the '''pbid''' daemon to merge the contents of a PBI into the hash directory.
 
The '''pbi_update_hashdir''' command is used by the '''pbid''' daemon to merge the contents of a PBI into the hash directory.
  
=== pbid(8) ===
+
=== pbid(8) === <!--T:179-->
  
 +
<!--T:180-->
 
The '''pbid''' command runs a small daemon which performs maintenance of installed PBIs, merges files into the shared hashdir, fetches the repository ''INDEX'' and meta files, and makes the adding and removing of PBIs much faster. It will automatically be started from the''/usr/local/etc/rc.d/pbid'' startup script if ''pbid_enable="YES"'' is in the ''/etc/rc.conf'' file.
 
The '''pbid''' command runs a small daemon which performs maintenance of installed PBIs, merges files into the shared hashdir, fetches the repository ''INDEX'' and meta files, and makes the adding and removing of PBIs much faster. It will automatically be started from the''/usr/local/etc/rc.d/pbid'' startup script if ''pbid_enable="YES"'' is in the ''/etc/rc.conf'' file.
  
 +
<!--T:181-->
 
This utility supports the option summarized in table 7.2q:
 
This utility supports the option summarized in table 7.2q:
  
'''Table 7.2q: pbid Options'''
+
<!--T:182-->
 
+
{{Tbl-init|caption=7.2q: pbid Options}}
{{Tbl-init}}
+
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=15%|'''Switch'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
 
{{Tbl-title|width=85%|'''Description'''}}
Line 878: Line 999:
 
{{Tbl-cell|row=1|enable verbose output when the daemon starts}}
 
{{Tbl-cell|row=1|enable verbose output when the daemon starts}}
 
|-
 
|-
{{Tbl-cell|row=1|'''--refresh'''}}
+
{{Tbl-cell|row=2|'''--refresh'''}}
{{Tbl-cell|row=1|schedule a refresh of index and meta files }}
+
{{Tbl-cell|row=2|schedule a refresh of index and meta files }}
 
|-
 
|-
 
|}
 
|}
  
 
+
<!--T:183-->
 
This command logs its output to ''/var/log/pbid.log''. Check this log for errors should you experience any problems with PBI maintenance.
 
This command logs its output to ''/var/log/pbid.log''. Check this log for errors should you experience any problems with PBI maintenance.
  
<noinclude>{{refheading}}</noinclude>
+
<!--T:184-->
 
<noinclude>
 
<noinclude>
 +
{{refheading}}
 +
{{GroupListHeading|group=tables}}
 +
[[category:PBI Manager]]
 +
[[category:Maintaining and Extending PC-BSD®]]
 
[[category:handbook]]
 
[[category:handbook]]
[[category:Maintaining and Extending PC-BSD®]]
 
[[category:PBI Manager]]
 
 
[[category:protect]]
 
[[category:protect]]
 
[[category:Referred by manpage]]
 
[[category:Referred by manpage]]
 +
</translate>
 +
<languages/>
 
</noinclude>
 
</noinclude>

Revision as of 00:12, 26 April 2013

(Sorry for the inconvenience)

PBI Manager is a suite of command line utilities which can be used to install, remove, create and manage PBIs. It is also available for FreeBSD systems. The PBI Manager is released under the BSD license[1].

Contents

Features

The 9.x PBI format introduced the following features:

  • Upgrade deltas: since PBIs are self-contained, installation files tend to be large. In the previous implementation, updating a PBI required the re-downloading of the entire installation archive. For larger applications this could be a time-consuming process, especially over low bandwidth connections. The new PBI specification performs updates using binary diff patches known as PBP (Push Button Patch) files. PBPs are a fraction of the PBI's size; in some cases less than 5% of the original PBI archive. An upgrade automatically checks for for the presence of a PBP file and attempts to use it, only falling back to the original archive should the process fail.
  • Library and file sharing: in the previous implementation of the PBI format it was common that identical files existed between various applications. These duplicates, while necessary to provide the self-contained functionality, wasted both disk space and runtime memory. This waste of space has been greatly reduced through the use of a hash-dir directory where libraries and common files are shared through a system of hard links. When an identical file is found in a PBI, the original will be removed and a hard-link stored in the hash-dir. After a PBI has been removed, any unneeded files left in the hash-dir are cleaned up by the pbid(8) daemon which monitors and maintains the integrity of the shared files.
  • Repository management: allows administrators and PBI builders to create and manage their own repositories of PBIs. This repository system provides a number of tools for PBI distribution, release management, and repository browsing.
  • Digitally signed PBIs: each repository includes an openssl public key file which is installed on the end user's system. Each PBI includes several signatures for the content archive and installation and removal scripts. During the PBI installation process, these signatures are checked to confirm that the archive has not been tampered with during transit. This key file is also used to associate a particular PBI with a parent repository for upgrade purposes, since it is possible that multiple repositories will have the same applications.
  • Root password not required: most applications can be installed and upgraded by regular user (non-root) accounts. This allows enhanced security in office or home situations, where users can now add/remove desktop applications without needing access to the root password. PBIs that impact on the security of the system (e.g. installing a web server) will require root access.
  • Implementation: the previous PBI design was developed in QT/KDE C++, making it inappropriate for use at the command line. The new format is implemented 100% in shell and is comprised of command-line utilities, each with an associated man page. These utilities are discussed in more detail in the rest of this section.

Additional Resources

Release History

1.0
(24 Sept 2012) - Kris Moore
  • Fix build with CLANG
  • Add support for shared XDG / Mime directories among users
  • Enhance icons handling when adding to LOCALBASE
  • Fixed a bug pruning the old version from an INDEX
  • Get rid of left-over .sha256 files in auto-build directories
0.9.9
(27 Aug 2012) - Kris Moore
  • Added new C .pbiwrapper file, which can set LD* variables, and use setuid among others
  • Fixed issues doing pkg_add on pkgs which need license agreements
  • Added support for saving / re-creating users & groups that a port may need
  • Fixed some issues getting the correct Package Name
  • Fixed and issue using exclude lists
  • Added option to view archive contents with pbi_add -i -v
  • Added internal priority system to pbi autobuilding
  • Speed up build system with better package caching
  • Added additional tmpfs support for auto-building, to further speed up process
  • Auto-source /etc/profile, to catch any HTTP_PROXY / FTP_PROXY values the user may set
0.9.8
(11 May 2011) - Kris Moore
  • Add support for copying linux binaries from ports, with their respective libs
  • Add GUI speed calculations when downloading
  • Allow some overrides to built-in defaults, for FreeNAS / pfSense and others
  • Added fail-safes to make sure the user didn't manually mount things into a PBI directory
0.9.7
(07 Dec 2011) - Kris Moore
  • Use -a flag for fetch to retry after soft failures
  • Do not create binary patch files, if they are larger than the source
  • Add ability to use /etc/pbi-make.conf on system, letting us set universal make options
  • Simplify the startup with less parsing commands
  • Add new -R flag for pbi_add, which only downloads a PBI from a mirror, without installing it
  • Add support for using "ccache" automatically if configured on the host system
  • Fixed a bug using "pbi_create" on a directory manually, make sure file end up in proper PBI application directory
  • Make sure we use the systems share/icons directory to use shared cursors / icons across all PBIs
0.9.6
(07 Nov 2011)
  • Fix some bugs doing cleanup of stagedir / build directories
  • Properly kill fetch process when canceling a download
  • Improve buildworld on FreeBSD to use /usr/src if it already has source
  • Fix some random warnings when building via sudo
0.9.5
(03 Nov 2011)
  • Add sizes of PBIs to the meta index files
  • Fix bug adding default icon to PBIs when none is specified
  • Fix handling of PBI_PROGREVISION
  • Make sure we unmount nullfs mounts completely
0.9.4
(19 Oct 2011)
  • Fix issue using system-fonts in PBIs
  • Fix issue removing files which have been set r--
  • Slow down fetch process to fix issues with fetch protocol errors
  • Fix bug coping linux libraries into final PBI file
  • Allow user settings in external-links to overwrite auto-detected values
  • Fix bug running "stat" on files with spaces in name
  • Validate the build checksum before doing patching
  • Speed up builds with optional --tmpfs flags
  • Add priority system to building modules
  • Fix issues setting proxy support from pbi.conf / pcbsd.conf files
  • Validate repo URL's when creating .rpo file
0.9.3
(18 Jul 2011)
  • Unset variables between auto-builds
  • Fixed some warnings with 'cut' when parsing i18n strings
  • When doing auto-builds, run through alphabetically
  • Increase check frequency when first trying to download index's
  • Speed up the hashdir merging
  • Show repo MD5 with listings
  • If no index files, do not fail on listing, just show empty repo
0.9.2
(23 May 2011)
  • Fixed usage errors with "tr"
  • Syntax fixes when trying to install app with no meta-data
  • Fixed some bugs with binary patching
  • Fixed auto-builder using the PBI_BUILDKEY in modules pbi.conf file
  • When building ports, do not export PREFIX since it confuses some linux ports
  • Perform check if user is root, if PBI is flagged root-only
  • Auto-builder now checks if port is compatible with arch type of system
0.9.1
(3 May 2011)
  • Initial public release

What is the PBI format?

One of the things holding back mainstream adoption of open source desktops is the package management format. With almost all open source desktops, software is simply treated as part of the operating system. Thus, when performing an update of some seemingly trivial application, you run the risk of potentially needing to upgrade other packages which could break other critical parts of your desktop.

While package management systems have gotten better at resolving dependency issues, trying to fix conflicts to prevent breakage before it occurs, they still do not address the underlying problem: every software package is a part of the system, and pulling on any one thread has the potential of causing a break somewhere farther down the line.

The PBI format tries to correct this underlying flaw. Rather than making every application a part of the base system, PBIs are self-contained, including their own dependent library tree and related data. As a result, when you install a PBI there are no dependency issues to resolve, and applications can be added or removed freely, without fear of causing breakage to the desktop or any other installed software.

Installing PBI Manager

If you are running PC-BSD® 9 or higher, then the PBI Manager is already installed, and you can use it via the command-line, or a front-end such as the AppCafe®.

FreeBSD users can install it from the ports tree[4].

Users interested in installing the development version from our SVN repository[5] can do so with the following commands:

svn co svn://svn.pcbsd.org/pcbsd/current/src-sh/pbi-manager

cd pbi-manager

make install
                                                                 

NOTE: The development version may be unstable / buggy, use at your own risk

Getting PBI Files

A list of approved and available PBIs can be viewed with pbi_info -i or pbi_browser, and then installed with pbi_add -r <pbiname>.

NOTE: PBI files previously created for PC-BSD® 7.x/8.x will NOT work with PBI Manager as it was designed for version 9.x.

Underlying File / Directory Structure

The underlying files and directories used by PBI Manager are as follows:

  • /usr/local/etc/pbi.conf: location of the PBI Manager configuration file
  • /usr/pbi/: where PBIs are installed on the system
  • /var/db/pbi/: contains data files related to installed PBIs and repositories
  • /usr/local/sbin/pbi_*: location of the PBI Manager commands
  • /usr/local/share/pbi-manager/module-examples/convertoldmod.sh: script which can be used to convert an existing 7.x or 8.x PBI module to the new 9.x format

Feedback / Reporting Problems

Feedback, problem reports, and general discussion are welcome on the PBI Developers Mailing list[6].

Command Reference

The following commands are installed by PBI Manager. For more details, refer to that command's man page. Note that single character commands can not be stacked. As an example, you must type pbi_add -i -v as pbi_add -iv will fail.

pbi_add(1)

Similar to FreeBSD's pkg_add, the pbi_add command is used for adding/installing PBIs on a system, either from a local file or remotely from a repository. This utility supports the options listed in Table 7.2a. All of the options, except for -r, assume that the .pbi file has already been downloaded and is in the current or specified directory.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2a: pbi_add Options [Tables 1] Please use alternative templates. Please use alternative templates.

For security reasons, it is recommend that users first use the -i -v and --checkscript options to view archive contents and installation scripts prior to installing a PBI file.

To install a PBI from a remote repository, use: pbi_add -r name_of.pbi. The following example will install the alpine PBI on a 32-bit system:

pbi_add -r alpine

Downloading ftp://ftp.pcbsd.org/pub/mirror/PBI/mail/alpine/9/x32/alpine-2.00_3-i386.pbi /usr/pbi/.alpine-2.00_3-i386.pbi 100% of 11 MB 295 kBps 00m00s Verifying Checksum...OK Extracting to: /usr/pbi/alpine-i386

Installed: Alpine-2.00_3

PBI Manager will automatically detect the architecture and install the appropriate PBI. If only a 32-bit version is available and you are on a 64-bit system, the 32-bit PBI will be installed and will work correctly on the PC-BSD® system.

If you previously downloaded the PBI, do not include the -r switch and give the fullname of the PBI:

pbi_add alpine-2.00_3-i386.pbi

pbi_addrepo(8)

The pbi_addrepo command is used to register a new PBI repository on a system. If the pbid daemon is running, the repository's index and meta files will be automatically fetched and made ready for browsing. The command has one argument: the name of the repository file. Repository files have a .rpo extension and are created with the pbi_makerepo command.

pbi_autobuild(8)

The pbi_autobuild command is used on the PBI build system to build any out-of-date or new packages. It can traverse the FreeBSD ports and metadata trees, building missing PBI files or PBIs in which the target port version has been updated. Instructions for using this command to keep a custom repository up-to-date can be found in the section Configure the Automatic Build of Updated Ports.

Table 7.2b summarizes this command's options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2b: pbi_autobuild Options [Tables 2] Please use alternative templates. Please use alternative templates.

pbi_browser(1)

The pbi_browser command provides a CLI front-end to browsing a repository's available PBIs. Options for viewing categories and searching by keyword are available, and once the desired PBI is located, it will show the pbi_add command which can be used to install the application. Table 7.2c summarizes the available options.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2c: pbi_browser Options [Tables 3] Please use alternative templates. Please use alternative templates.

pbi.conf(5)

pbi.conf is an ASCII text configuration file containing values that are used by the various pbi_* commands. The proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.2d lists the supported variables.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2d: pbi_conf Variables [Tables 4] Please use alternative templates. Please use alternative templates.

pbi_create(1)

The pbi_create command provides a way for packagers to manually specify a target directory to be compressed into a PBI file. The option -b can also be used to re-package an already installed PBI back to an archive. PBI creators are encouraged to send a tarball of the resulting PBI module to the PBI-dev mailing list[6] so they can be added to the PC-BSD® PBI repository and made available to other PC-BSD® users.

Table 7.2e summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2e: pbi_create Options [Tables 5] Please use alternative templates. Please use alternative templates.

As the superuser, you can create a PBI with the pbi_create command using the following syntax:

pbi_create -a <author> -n <name> -r <version> -w <weburl> <target directory>

Inside the target directory place the application's binaries or scripts along with any required dependencies. To indicate which file(s) represent the runtime command(s), include a file named external-links in the target directory. That file contains an entry for each command, as seen in the following example:

# Files to be symlinked into the default LOCALBASE

# One per-line, relative to %%PBI_APPDIR%% and LOCALBASE # Defaults to keeping any existing files in LOCALBASE # Use bin-files/ for binaries that need wrapper functionality

# TARGET LINK IN LOCALBASE ACTION

bin/myapp bin/myapp binary,nocrash

This entry instructs pbi_create to make the wrapper scripts for the myapp binary, along with placing it in the user's PATH at install time.

It is also possible to include desktop icons and mime entries using the xdg-mime/, xdg-desktop/ and xdg-menu/ directories. The section on how to Create PBIs contains more details about creating these files. These directories should be created as subdirectories of the target directory of your application.

pbi_delete(1)

Similar to FreeBSD's pkg_delete, the pbi_delete command removes an installed PBI from the system. It also schedules cleaning for the shared library directory, which is performed by pbid. Table 7.2f summarizes its options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2f: pbi_delete Options [Tables 6] Please use alternative templates. Please use alternative templates.

When removing a PBI, you must give its full name. The full name can be found in the output of pbi_info. The following example searches for the ntop PBI and removes it:

pbi_info | grep ntop

ntop-4.0.1_1-i386 pbi_delete -v ntop-4.0.1_1-i386 Running pre-removal script: /var/db/pbi/installed/ntop-4.0.1_1-i386/pre-remove.sh Removing: /usr/pbi/ntop-i386

Removing: /var/db/pbi/installed/ntop-4.0.1_1-i386

pbi_deleterepo(8)

The pbi_deleterepo command can be used to remove a registered repository from the system. It takes the repository's ID as the only command argument.

pbi_icon(1)

The pbi_icon command provides a number of options for adding desktop icons, menu entries, and mime data for an installed PBI. Not all PBIs will contain desktop/menu/mime data. Additionally, the window manager must be txt=Missing Link[7]-compliant to understand a PBI's icon and mime settings. Table 7.2g summarizes this command's options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2g: pbi_icon Options [Tables 7] Please use alternative templates. Please use alternative templates.

pbi_indextool(1)

The pbi_indextool command is useful for repository maintainers. It allows PBI files to be added and removed from the repository's INDEX file. An example of using this command can be found in Create Your Own PBI Repository. Table 7.2h summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2h: pbi_indextool Options [Tables 8] Please use alternative templates. Please use alternative templates. Please use alternative templates.

pbi_info(1)

Similar to FreeBSD's pkg_info command, the pbi_info command is used to determine which PBIs are currently installed. Table 7.2i summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2i: pbi_info Options [Tables 9] Please use alternative templates. Please use alternative templates.

pbi_listrepo(1)

The pbi_listrepo command manages installed repositories on a system. Table 7.2j summarizes this command's options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2j: pbi_listrepo Options [Tables 10] Please use alternative templates. Please use alternative templates.

Run the command without any options to list the IDs of the available repositories.

pbi_makepatch(1)

The pbi_makepatch command is automatically used by pbi_autobuild to create small *.pbp (Push Button Patch) files. These files can be downloaded to a user's system in order to update a PBI's version without re-downloading the entire archive. This allows users to download only the incremental changes when a PBI is upgraded. The command can also be run manually by providing two PBI archives to compare and generate a patch file for.

Table 7.2k summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2k: pbi_makepatch Options [Tables 11] Please use alternative templates. Please use alternative templates.

pbi_makeport(1)

The pbi_makeport command can be used by packagers to build a target FreeBSD port and convert it into a PBI file. Many options are provided to fine-tune the build process, and meta-data modules can also be specified to further improve the resulting PBI file. The first time this command is run, it will build a fresh chroot sandbox environment which can be used for clean-room building of the target port without affecting the host system. More details about how to create a PBI using this command, can be found in the PBI Module Builder Guide.

NOTE: The pbi_makeport command has support for using ccache[8] to speed up the compile process. If ccache is installed on the host system and the CCACHE_DIR variable is set, the pbi_makeport command will automatically utilize it for the port compile phase. This can be disabled by setting NO_CCACHE=yes in /etc/pbi-make.conf on the host system, or as an optional make flag in a module's pbi.conf file.

pbi_makeport, will attempt to create any users or groups that the underlying ports require during the PBI installation. If the PBI is being installed as non-root, it will instead provide a warning message regarding any users or groups that need to be manually created. For this functionality to work, the port must set USERS= or GROUPS= in its Makefile and provide the corresponding UID and/or GID entries.

Table 7.2l summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2l: pbi_makeport Options [Tables 12] Please use alternative templates. Please use alternative templates.

pbi_makerepo(1)

The pbi_makerepo command allows repository maintainers to create a single *.rpo file containing various information about the new repository. This .rpo file can then be installed on the target system with pbi_addrepo. Table 7.2m summarizes the available options.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2m: pbi_makerepo Options [Tables 13] Please use alternative templates. Please use alternative templates.

pbi_metatool(1)

The pbi_metatool command provides a way for repository maintainers to modify the PBI metadata in their repository in order to add or remove application categories or specified PBIs. An example of using this command can be found in Create Your Own PBI Repository. Table 7.2n summarizes the available options:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2n: pbi_metatool Options [Tables 14] Please use alternative templates. Please use alternative templates. Please use alternative templates.

pbi_patch(1)

The pbi_patch command is used to update an installed PBI to a different version using a small diff Push Button Patch *.pbp file. This allows the user to perform an incremental upgrade of an installed PBI. The available options are summarized in Table 7.2o.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2o: pbi_patch Options [Tables 15] Please use alternative templates. Please use alternative templates.

pbi_update(1)

The pbi_update command is used to display information about which PBIs have available updates and to perform the updates. Table 7.2p summarizes the available options.

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2p: pbi_update Options [Tables 16] Please use alternative templates. Please use alternative templates.

pbi_update_hashdir(1)

The pbi_update_hashdir command is used by the pbid daemon to merge the contents of a PBI into the hash directory.

pbid(8)

The pbid command runs a small daemon which performs maintenance of installed PBIs, merges files into the shared hashdir, fetches the repository INDEX and meta files, and makes the adding and removing of PBIs much faster. It will automatically be started from the/usr/local/etc/rc.d/pbid startup script if pbid_enable="YES" is in the /etc/rc.conf file.

This utility supports the option summarized in table 7.2q:

Please use alternative templates. Please use alternative templates. Please use alternative templates. Please use alternative templates.
Table 7.47.2q: pbid Options [Tables 17] Please use alternative templates. Please use alternative templates.

This command logs its output to /var/log/pbid.log. Check this log for errors should you experience any problems with PBI maintenance.


References

  1. http://www.freebsd.org/copyright/freebsd-license.html
  2. http://www.pcbsd.org/~kris/pbi9-slides.pdf
  3. http://www.pcbsd.org/~kris/asiabsdcon2011-pbi9.pdf
  4. http://www.freshports.org/ports-mgmt/pbi-manager
  5. http://trac.pcbsd.org/brower/pcbsd/current/src-sh/pbi-manager/
  6. 6.0 6.1 http://lists.pcbsd.org/mailman/listinfo/pbi-dev
  7. http://en.wikipedia.org/wiki/Xdg
  8. http://ccache.samba.org/

 Translator:  Please update the last element on this page, and/or locate the {{groupListHeading|group=tables}} line, replace that with {{GroupRefHeading|{{putCommon|19}}}}

Other languages:German 24% • ‎English 100% • ‎French 3%

Cite error: <ref> tags exist for a group named "Tables", but no corresponding <references group="Tables"/> tag was found
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox