Difference between revisions of "PBI Manager/9.2/en"

From PC-BSD Wiki
Jump to: navigation, search
(Importing a new version from external source)
 
(从外部源导入一个新的版本)
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=Using AppCafe®|forward=Update Manager}}</noinclude>
+
<noinclude>
 +
{{NavHeader|back=Using AppCafe®|forward=Using Package Manager}}</noinclude>
  
 
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}}.
Line 192: Line 193:
 
|txt={{nbsp|65}} }}
 
|txt={{nbsp|65}} }}
  
'''NOTE: The development version may be unstable / buggy, use at your own risk'''
+
{{warning|width=68%|'''The development version may be unstable / buggy, use at your own risk'''}}
  
 
== Getting PBI Files ==
 
== Getting PBI Files ==
Line 198: Line 199:
 
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.}}
+
{{warning|width=48.5%|icon64=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 ==
Line 228: Line 229:
  
 
{{Tbl-init|caption=7.2a: pbi_add Options}}
 
{{Tbl-init|caption=7.2a: pbi_add Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-e'''}}
+
|'''-e'''
{{Tbl-cell|row=1|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless the '''-o''' option is used}}
+
|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless the '''-o''' option is used
 
|-
 
|-
{{Tbl-cell|row=2|'''-f'''}}
+
|'''-f'''
{{Tbl-cell|row=2|force installation, overwriting an already installed copy of the application}}
+
|force installation, overwriting an already installed copy of the application
 
|-  
 
|-  
{{Tbl-cell|row=3|'''-g'''}}
+
|'''-g'''
{{Tbl-cell|row=3|show path to icons and images for GUI installations}}
+
|show path to icons and images for GUI installations
 
|-
 
|-
{{Tbl-cell|row=4|'''-i'''}}
+
|'''-i'''
{{Tbl-cell|row=4|display information about specified PBI; if combined with '''-v''', will display all of the files that will be installed with the PBI}}
+
|display information about specified PBI; if combined with '''-v''', will display all of the files that will be installed with the PBI
 
|-
 
|-
{{Tbl-cell|row=5|'''-l'''}}           
+
|'''-l'''
{{Tbl-cell|row=5|display license for specified PBI}}
+
|display license for specified PBI
 
|-
 
|-
{{Tbl-cell|row=6|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=6|specify the directory to use when extracting the PBI with '''-e'''}}
+
|specify the directory to use when extracting the PBI with '''-e'''
 
|-
 
|-
{{Tbl-cell|row=7|'''-r'''}}
+
|'''-r'''
{{Tbl-cell|row=7|remote fetch installation file from update server; the system architecture and version will be automatically determined in order to fetch the correct file and resume support is built-in}}
+
|remote fetch installation file from update server; the system architecture and version will be automatically determined in order to fetch the correct file and resume support is built-in
 
|-
 
|-
{{Tbl-cell|row=8|'''-R'''}}
+
|'''-R'''
{{Tbl-cell|row=8|remote fetch the install file from the update server but do not install}}
+
|remote fetch the install file from the update server but do not install
 
|-
 
|-
{{Tbl-cell|row=9|'''-v'''}}
+
|'''-v'''
{{Tbl-cell|row=9|enable verbose output}}
+
|enable verbose output
 
|-
 
|-
{{Tbl-cell|row=10|'''--checkscript'''}}
+
|'''--checkscript'''
{{Tbl-cell|row=10|display any custom scripts used in the installation/removal of the PBI}}
+
|display any custom scripts used in the installation/removal of the PBI
 
|-
 
|-
{{Tbl-cell|row=11|'''--licagree'''}}
+
|'''--licagree'''
{{Tbl-cell|row=11|agree to license terms and conditions; to view the license, use '''-l'''}}
+
|agree to license terms and conditions; to view the license, use '''-l'''
 
|-
 
|-
{{Tbl-cell|row=12|'''--no-checksig'''}}
+
|'''--no-checksig'''
{{Tbl-cell|row=12|skip the openssl signature verification of the PBI data}}
+
|skip the openssl signature verification of the PBI data
 
|-
 
|-
{{Tbl-cell|row=13|'''--no-checksum'''}}
+
|'''--no-checksum'''
{{Tbl-cell|row=13|skip the checksum verification of the archive data}}
+
|skip the checksum verification of the archive data
 
|-
 
|-
{{Tbl-cell|row=14|'''--no-hash'''}}
+
|'''--no-hash'''
{{Tbl-cell|row=14|disable using the shared hash dir}}
+
|disable using the shared hash dir
 
|-
 
|-
{{Tbl-cell|row=15|'''--repo repoid'''}}
+
|'''--repo repoid'''
{{Tbl-cell|row=15|specify which repository to use}}
+
|specify which repository to use
 
|-
 
|-
{{Tbl-cell|row=16|'''--rArch arch'''}}
+
|'''--rArch arch'''
{{Tbl-cell|row=16|manually specify the PBI architecture type of i386 or amd64}}
+
|manually specify the PBI architecture type of i386 or amd64
 
|-
 
|-
{{Tbl-cell|row=17|'''--rVer version'''}}
+
|'''--rVer version'''
{{Tbl-cell|row=17|specify which version of the PBI to install}}
+
|specify which version of the PBI to install
 
|-
 
|-
 
|}
 
|}
Line 312: Line 313:
  
 
{{Tbl-init|caption=7.2b: pbi_autobuild Options}}
 
{{Tbl-init|caption=7.2b: pbi_autobuild Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-c confdir'''}}
+
|'''-c confdir'''
{{Tbl-cell|row=1|mandatory; specify the directory containing the PBI configuration modules; any found ''pbi.conf'' files will be parsed, and if PBI_MAKEPORT is set, the target port will be used for the build; if PBI_MAKEPORT is unset, the auto-build will attempt to match the module to a FreeBSD port based upon the dirname of ''pbi.conf''}}
+
|mandatory; specify the directory containing the PBI configuration modules; any found ''pbi.conf'' files will be parsed, and if PBI_MAKEPORT is set, the target port will be used for the build; if PBI_MAKEPORT is unset, the auto-build will attempt to match the module to a FreeBSD port based upon the dirname of ''pbi.conf''
 
|-
 
|-
{{Tbl-cell|row=2|'''-d portsdir'''}}
+
|'''-d portsdir'''
{{Tbl-cell|row=2|specify an alternative ports directory; defaults to ''/usr/ports/''}}
+
|specify an alternative ports directory; defaults to ''/usr/ports/''
 
|-
 
|-
{{Tbl-cell|row=3|'''-h script'''}}
+
|'''-h script'''
{{Tbl-cell|row=3|specify a helper script to call after building a PBI}}
+
|specify a helper script to call after building a PBI
 
|-
 
|-
{{Tbl-cell|row=4|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=4|mandatory; the directory to place the finished PBI files}}
+
|mandatory; the directory to place the finished PBI files
 
|-
 
|-
{{Tbl-cell|row=5|'''-p num'''}}
+
|'''-p num'''
{{Tbl-cell|row=5|if your build hardware has the CPU and disk I/O to support concurrent build processes, specify the number of concurrent builds}}
+
|if your build hardware has the CPU and disk I/O to support concurrent build processes, specify the number of concurrent builds
 
|-
 
|-
{{Tbl-cell|row=6|'''-32'''}}
+
|'''-32'''
{{Tbl-cell|row=6|include when building a 32-bit PBI on a 64-bit system}}
+
|include when building a 32-bit PBI on a 64-bit system
 
|-
 
|-
{{Tbl-cell|row=7|'''--genpatch'''}}
+
|'''--genpatch'''
{{Tbl-cell|row=7|when building a new PBI, check for archived copies and generate smaller patch updates to the new version (*.pbp files)}}
+
|when building a new PBI, check for archived copies and generate smaller patch updates to the new version (*.pbp files)
 
|-
 
|-
{{Tbl-cell|row=8|'''--keep num'''}}
+
|'''--keep num'''
{{Tbl-cell|row=8|when building new PBIs, keep <num> copies of past versions of working PBI in ''<outdir>/archived/'' folder; these archived copies can be used with the '''--genpatch''' command to generate update patch files}}
+
|when building new PBIs, keep <num> copies of past versions of working PBI in ''<outdir>/archived/'' folder; these archived copies can be used with the '''--genpatch''' command to generate update patch files
 
|-
 
|-
{{Tbl-cell|row=9|'''--pkgcache'''}}
+
|'''--pkgcache'''
{{Tbl-cell|row=9|enable caching of ''.txz'' pkg files which greatly speeds up subsequent builds of a PBI}}
+
|enable caching of ''.txz'' pkg files which greatly speeds up subsequent builds of a PBI
 
|-
 
|-
{{Tbl-cell|row=10|'''--prune'''}}
+
|'''--prune'''
{{Tbl-cell|row=10|remove any PBIs which no longer have an associated module}}
+
|remove any PBIs which no longer have an associated module
 
|-
 
|-
{{Tbl-cell|row=11|'''--tmpfs'''}}
+
|'''--tmpfs'''
{{Tbl-cell|row=11|automatically create and mount a tmp filesystem which can speed up port compiles on systems with available RAM}}
+
|automatically create and mount a tmp filesystem which can speed up port compiles on systems with available RAM
 
|-
 
|-
{{Tbl-cell|row=12|'''--sign keyfile'''}}
+
|'''--sign keyfile'''
{{Tbl-cell|row=12|digitally sign the PBI file with the specified openssl private key file}}
+
|digitally sign the PBI file with the specified openssl private key file
 
|-
 
|-
 
|}
 
|}
Line 358: Line 359:
  
 
{{Tbl-init|caption=7.2c: pbi_browser Options}}
 
{{Tbl-init|caption=7.2c: pbi_browser Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-c category'''}}
+
|'''-c category'''
{{Tbl-cell|row=1|displays a list of PBIs in the specified category}}
+
|displays a list of PBIs in the specified category
 
|-
 
|-
{{Tbl-cell|row=2|'''-s search'''}}
+
|'''-s search'''
{{Tbl-cell|row=2|search for PBIs containing the specified string in the name, description, or keywords}}
+
|search for PBIs containing the specified string in the name, description, or keywords
 
|-
 
|-
{{Tbl-cell|row=3|'''--listcats'''}}
+
|'''--listcats'''
{{Tbl-cell|row=3|list the available categories}}
+
|list the available categories
 
|-
 
|-
{{Tbl-cell|row=4|'''--viewall'''}}
+
|'''--viewall'''
{{Tbl-cell|row=4|list all available PBIs}}
+
|list all available PBIs
 
|-
 
|-
 
|}
 
|}
Line 380: Line 381:
  
 
{{Tbl-init|caption=7.2d: pbi_conf Variables}}
 
{{Tbl-init|caption=7.2d: pbi_conf Variables}}
{{Tbl-title|width=20%|'''Variable'''}}
+
!Variable
{{Tbl-title|width=80%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|PBID_REFRESH}}
+
|PBID_REFRESH
{{Tbl-cell|row=1|wakeup time in seconds for '''pbid''' to run its checks}}
+
|wakeup time in seconds for '''pbid''' to run its checks
 
|-
 
|-
{{Tbl-cell|row=2|PBI_INDEXREFRESH}}
+
|PBI_INDEXREFRESH
{{Tbl-cell|row=2|number of hours representing how often '''pbid''' refreshes the index and meta files from repos; default is every 24 hours}}
+
|number of hours representing how often '''pbid''' refreshes the index and meta files from repos; default is every 24 hours
 
|-
 
|-
{{Tbl-cell|row=3|PBI_PROXYURL}}
+
|PBI_PROXYURL
{{Tbl-cell|row=3|proxy server IP address}}
+
|proxy server IP address
 
|-
 
|-
{{Tbl-cell|row=4|PBI_PROXYPORT}}
+
|PBI_PROXYPORT
{{Tbl-cell|row=4|proxy server port number}}
+
|proxy server port number
 
|-
 
|-
{{Tbl-cell|row=5|PBI_PROXYTYPE}}
+
|PBI_PROXYTYPE
{{Tbl-cell|row=5|can be HTTP or SOCKS5}}
+
|can be HTTP or SOCKS5
 
|-
 
|-
{{Tbl-cell|row=6|PBI_PROXYUSER}}
+
|PBI_PROXYUSER
{{Tbl-cell|row=6|username used to authenticate with proxy server}}
+
|username used to authenticate with proxy server
 
|-
 
|-
{{Tbl-cell|row=7|PBI_PROXYPASS}}
+
|PBI_PROXYPASS
{{Tbl-cell|row=7|password used to authenticate with proxy server}}
+
|password used to authenticate with proxy server
 
|-
 
|-
 
|}
 
|}
Line 413: Line 414:
  
 
{{Tbl-init|caption=7.2e: pbi_create Options}}
 
{{Tbl-init|caption=7.2e: pbi_create Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-a author'''}}
+
|'''-a author'''
{{Tbl-cell|row=1|specify the author for this PBI}}
+
|specify the author for this PBI
 
|-
 
|-
{{Tbl-cell|row=2|'''-b'''}}
+
|'''-b'''
{{Tbl-cell|row=2|make a backup of an installed PBI; specify the target PBI name instead of the PBI directory}}
+
|make a backup of an installed PBI; specify the target PBI name instead of the PBI directory
 
|-
 
|-
{{Tbl-cell|row=3|'''-c confdir'''}}
+
|'''-c confdir'''
{{Tbl-cell|row=3|specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points}}
+
|specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points
 
|-
 
|-
{{Tbl-cell|row=4|'''-d portsdir'''}}
+
|'''-d portsdir'''
{{Tbl-cell|row=4|specify an alternative ports directory; defaults to ''/usr/ports/''}}
+
|specify an alternative ports directory; defaults to ''/usr/ports/''
 
|-
 
|-
{{Tbl-cell|row=5|'''-i icon'''}}
+
|'''-i icon'''
{{Tbl-cell|row=5|specify a default icon, relative to ''pbidir/''}}
+
|specify a default icon, relative to ''pbidir/''
 
|-
 
|-
{{Tbl-cell|row=6|'''-n name'''}}
+
|'''-n name'''
{{Tbl-cell|row=6|specify a name for this PBI}}
+
|specify a name for this PBI
 
|-
 
|-
{{Tbl-cell|row=7|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=7|place the finished ''.pbi'' file into the specified directory; defaults to $HOME}}
+
|place the finished ''.pbi'' file into the specified directory; defaults to $HOME
 
|-
 
|-
{{Tbl-cell|row=8|'''-p port'''}}
+
|'''-p port'''
{{Tbl-cell|row=8|use the given port to get PBI name and version}}
+
|use the given port to get PBI name and version
 
|-
 
|-
{{Tbl-cell|row=9|'''-r version'''}}
+
|'''-r version'''
{{Tbl-cell|row=9|specify a version for this PBI}}
+
|specify a version for this PBI
 
|-
 
|-
{{Tbl-cell|row=10|'''-u weburl'''}}
+
|'''-u weburl'''
{{Tbl-cell|row=10|specify a website URL for the PBI}}
+
|specify a website URL for the PBI
 
|-
 
|-
{{Tbl-cell|row=11|'''--no-hash'''}}
+
|'''--no-hash'''
{{Tbl-cell|row=11|disable using the shared hash directory which uses hard links to share files between applications}}
+
|disable using the shared hash directory which uses hard links to share files between applications
 
|-
 
|-
{{Tbl-cell|row=12|'''--sign keyfile'''}}
+
|'''--sign keyfile'''
{{Tbl-cell|row=12|digitally sign the PBI file with the specified openssl private key file}}
+
|digitally sign the PBI file with the specified openssl private key file
 
|-
 
|-
 
|}
 
|}
Line 477: Line 478:
  
 
{{Tbl-init|caption=7.2f: pbi_delete Options}}
 
{{Tbl-init|caption=7.2f: pbi_delete Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-v'''}}
+
|'''-v'''
{{Tbl-cell|row=1|enable verbose output}}
+
|enable verbose output
 
|-
 
|-
{{Tbl-cell|row=2|'''--clean-hdir'''}}
+
|'''--clean-hdir'''
{{Tbl-cell|row=2|perform a full cleaning of the shared hash directory, removing any unused files; should only be required after a system crash or failure in removing a PBI}}
+
|perform a full cleaning of the shared hash directory, removing any unused files; should only be required after a system crash or failure in removing a PBI
 
|-
 
|-
 
|}
 
|}
Line 506: Line 507:
  
 
{{Tbl-init|caption=7.2g: pbi_icon Options}}
 
{{Tbl-init|caption=7.2g: pbi_icon Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''add-desktop'''}}
+
|'''add-desktop'''
{{Tbl-cell|row=1|installs desktop icon; should be run as regular user}}
+
|installs desktop icon; should be run as regular user
 
|-
 
|-
{{Tbl-cell|row=2|'''add-mime'''}}
+
|'''add-mime'''
{{Tbl-cell|row=2|installs mime information; should be run as root}}
+
|installs mime information; should be run as root
 
|-
 
|-
{{Tbl-cell|row=3|'''add-menu'''}}
+
|'''add-menu'''
{{Tbl-cell|row=3|installs menu icons; should be run as root}}
+
|installs menu icons; should be run as root
 
|-
 
|-
{{Tbl-cell|row=4|'''add-pathlnk'''}}
+
|'''add-pathlnk'''
{{Tbl-cell|row=4|installs any $PATH links to ''~/bin'' when run as user or to $LOCALBASE when run as root}}
+
|installs any $PATH links to ''~/bin'' when run as user or to $LOCALBASE when run as root
 
|-
 
|-
{{Tbl-cell|row=5|'''del-desktop'''}}
+
|'''del-desktop'''
{{Tbl-cell|row=5|removes desktop icon; should be run as regular user}}
+
|removes desktop icon; should be run as regular user
 
|-
 
|-
{{Tbl-cell|row=6|'''del-menu'''}}
+
|'''del-menu'''
{{Tbl-cell|row=6|removes menu icons; should be run as root}}
+
|removes menu icons; should be run as root
 
|-
 
|-
{{Tbl-cell|row=7|'''del-mime'''}}
+
|'''del-mime'''
{{Tbl-cell|row=7|removes mime information; should be run as root}}
+
|removes mime information; should be run as root
 
|-
 
|-
{{Tbl-cell|row=8|'''del-pathlnk'''}}
+
|'''del-pathlnk'''
{{Tbl-cell|row=8|removes any $PATH links to ''~/bin'' when run as user or to $LOCALBASE when run as root}}
+
|removes any $PATH links to ''~/bin'' when run as user or to $LOCALBASE when run as root
 
|-
 
|-
 
|}
 
|}
Line 540: Line 541:
  
 
{{Tbl-init|caption=7.2h: pbi_indextool Options}}
 
{{Tbl-init|caption=7.2h: pbi_indextool Options}}
{{Tbl-title|width=15%|'''Command'''}}
+
!Command
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=70%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''add'''}}
+
|rowspan=4|'''add'''
{{Tbl-cell|row=1|'''-b vers'''}}
+
|'''-b vers'''
{{Tbl-cell|row=1|mark previous versions as having a binary diff patch (''.pbp'' file used for upgrading) available}}
+
|mark previous versions as having a binary diff patch (''.pbp'' file used for upgrading) available
 
|-
 
|-
{{Tbl-cell|row=2|'''add'''}}
+
<!-- add (handled by rowspan 4) -->
{{Tbl-cell|row=2|'''-f pbifile'''}}
+
|'''-f pbifile'''
{{Tbl-cell|row=2|mandatory, name of PBI being added to the target ''INDEX'' file}}
+
|mandatory, name of PBI being added to the target ''INDEX'' file
 
|-
 
|-
{{Tbl-cell|row=3|'''add'''}}
+
<!-- add (handled by rowspan 4) -->
{{Tbl-cell|row=3|'''-k num'''}}
+
|'''-k num'''
{{Tbl-cell|row=3|number of previous versions of this PBI to keep in the ''INDEX'' file}}
+
|number of previous versions of this PBI to keep in the ''INDEX'' file
 
|-
 
|-
{{Tbl-cell|row=4|'''add'''}}
+
<!-- add (handled by rowspan 4) -->
{{Tbl-cell|row=4|'''-u fileurl'''}}
+
|'''-u fileurl'''
{{Tbl-cell|row=4|mandatory URL to PBI location on server in the format category/pbi_name}}
+
|mandatory URL to PBI location on server in the format category/pbi_name
 
|-
 
|-
{{Tbl-cell|row=5|'''rem'''}}
+
|rowspan=3|'''rem'''
{{Tbl-cell|row=5|'''-m arch'''}}
+
|'''-m arch'''
{{Tbl-cell|row=5|mandatory architecture type for PBI being removed (e.g. i386, amd64)}}
+
|mandatory architecture type for PBI being removed (e.g. i386, amd64)
 
|-
 
|-
{{Tbl-cell|row=6|'''rem'''}}
+
<!-- rem (handled by rowspan 3) -->
{{Tbl-cell|row=6|'''-n pbiname'''}}
+
|'''-n pbiname'''
{{Tbl-cell|row=6|mandatory name of PBI being removed from the ''INDEX'' file}}
+
|mandatory name of PBI being removed from the ''INDEX'' file
 
|-
 
|-
{{Tbl-cell|row=7|'''rem'''}}
+
<!-- rem (handled by rowspan 3) -->
{{Tbl-cell|row=7|'''-v version'''}}
+
|'''-v version'''
{{Tbl-cell|row=7|mandatory, version of the PBI being removed from the ''INDEX'' file}}
+
|mandatory, version of the PBI being removed from the ''INDEX'' file
 
|-
 
|-
 
|}
 
|}
Line 579: Line 580:
  
 
{{Tbl-init|caption=7.2i: pbi_info Options}}
 
{{Tbl-init|caption=7.2i: pbi_info Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!width=15%|Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!width=85%|Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-a'''}}
+
|'''-a'''
{{Tbl-cell|row=1|list all PBIs installed on the system; same as running '''pbi_info''' without an argument}}
+
|list all PBIs installed on the system; same as running '''pbi_info''' without an argument
 
|-
 
|-
{{Tbl-cell|row=2|'''-i'''}}
+
|'''-i'''
{{Tbl-cell|row=2|list all available PBIs from any repo}}
+
|list all available PBIs from any repo
 
|-
 
|-
{{Tbl-cell|row=3|'''-v'''}}
+
|'''-v'''
{{Tbl-cell|row=3|enable verbose output}}
+
|enable verbose output
 
|-
 
|-
 
|}
 
|}
Line 598: Line 599:
  
 
{{Tbl-init|caption=7.2j: pbi_listrepo Options}}
 
{{Tbl-init|caption=7.2j: pbi_listrepo Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!width=15%|Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!width=85%|Description
 
|-
 
|-
{{Tbl-cell|row=1|'''--down'''}}
+
|'''--down'''
{{Tbl-cell|row=1|move the targeted repoID down a single number in priority}}
+
|move the targeted repoID down a single number in priority
 
|-
 
|-
{{Tbl-cell|row=2|'''-mirror URL'''}}
+
|'''-mirror URL'''
{{Tbl-cell|row=2|change the specified repoID's mirror URL}}
+
|change the specified repoID's mirror URL
 
|-
 
|-
{{Tbl-cell|row=3|'''--up'''}}
+
|'''--up'''
{{Tbl-cell|row=3|move the targeted repoID up a single number in priority}}
+
|move the targeted repoID up a single number in priority
 
|-
 
|-
 
|}
 
|}
Line 621: Line 622:
  
 
{{Tbl-init|caption=7.2k: pbi_makepatch Options}}
 
{{Tbl-init|caption=7.2k: pbi_makepatch Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!width=15%|Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!width=85%|Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=1|save the resulting ''*pbp'' file to the specified directory}}
+
|save the resulting ''*pbp'' file to the specified directory
 
|-
 
|-
{{Tbl-cell|row=2|'''--sign keyfile'''}}
+
|'''--sign keyfile'''
{{Tbl-cell|row=2|use the specified openssl key to digitally sign the patch file}}
+
|use the specified openssl key to digitally sign the patch file
 
|-
 
|-
{{Tbl-cell|row=3|'''--tmpfs'''}}
+
|'''--tmpfs'''
{{Tbl-cell|row=3|can reduce building time for large PBIs}}
+
|can reduce building time for large PBIs
 
|-
 
|-
 
|}
 
|}
Line 646: Line 647:
  
 
{{Tbl-init|caption=7.2l: pbi_makeport Options}}
 
{{Tbl-init|caption=7.2l: pbi_makeport Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!width=15%|Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!width=85%|Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-B'''}}
+
|'''-B'''
{{Tbl-cell|row=1|build-only; generally used with '''-k''' to build a port before running '''pbi_create''' manually}}
+
|build-only; generally used with '''-k''' to build a port before running '''pbi_create''' manually
 
|-
 
|-
{{Tbl-cell|row=2|'''-c confdir'''}}
+
|'''-c confdir'''
{{Tbl-cell|row=2|specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points }}
+
|specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points  
 
|-
 
|-
{{Tbl-cell|row=3|'''-d portsdir'''}}
+
|'''-d portsdir'''
{{Tbl-cell|row=3|specify an alternative ports directory; defaults to ''/usr/ports''}}
+
|specify an alternative ports directory; defaults to ''/usr/ports''
 
|-
 
|-
{{Tbl-cell|row=4|'''-k'''}}
+
|'''-k'''
{{Tbl-cell|row=4|keep the build files after building the PBI}}
+
|keep the build files after building the PBI
 
|-
 
|-
{{Tbl-cell|row=5|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=5|the directory to place the finished PBI file; defaults to user's $HOME directory}}
+
|the directory to place the finished PBI file; defaults to user's $HOME directory
 
|-
 
|-
{{Tbl-cell|row=6|'''-p prefix'''}}
+
|'''-p prefix'''
{{Tbl-cell|row=6|manually provide a PREFIX which determines the location where the PBI will be installed on the end-user's system}}
+
|manually provide a PREFIX which determines the location where the PBI will be installed on the end-user's system
 
|-
 
|-
{{Tbl-cell|row=7|'''--32'''}}
+
|'''--32'''
{{Tbl-cell|row=7|include when building a 32-bit PBI on a 64-bit system}}
+
|include when building a 32-bit PBI on a 64-bit system
 
|-
 
|-
{{Tbl-cell|row=8|'''--delbuild'''}}
+
|'''--delbuild'''
{{Tbl-cell|row=8|remove any existing build directories before starting the build}}
+
|remove any existing build directories before starting the build
 
|-
 
|-
{{Tbl-cell|row=9|'''--mkdebug'''}}
+
|'''--mkdebug'''
{{Tbl-cell|row=9|will drop to a debugging shell should the port make fail}}
+
|will drop to a debugging shell should the port make fail
 
|-
 
|-
{{Tbl-cell|row=10|'''--no-prune'''}}
+
|'''--no-prune'''
{{Tbl-cell|row=10|disable auto-pruning of non-REQUIREDBY ports after the compile phase; by default any ports which are used solely for building and which are not required for program execution will be pruned}}
+
|disable auto-pruning of non-REQUIREDBY ports after the compile phase; by default any ports which are used solely for building and which are not required for program execution will be pruned
 
|-
 
|-
{{Tbl-cell|row=11|'''--pkgdir dir'''}}
+
|'''--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}}
+
|uses the specified directory to cache the .txz package so subsequent builds will not rebuild the port from source
 
|-
 
|-
{{Tbl-cell|row=12|'''--tmpfs'''}}
+
|'''--tmpfs'''
{{Tbl-cell|row=12|automatically create and mount a tmp filesystem and use it for WRKDIRPREFIX; can speed up port compiles on systems with available RAM}}
+
|automatically create and mount a tmp filesystem and use it for WRKDIRPREFIX; can speed up port compiles on systems with available RAM
 
|-
 
|-
{{Tbl-cell|row=13|'''--sign keyfile'''}}
+
|'''--sign keyfile'''
{{Tbl-cell|row=13|digitally sign the PBI file with the specified openssl private key file}}
+
|digitally sign the PBI file with the specified openssl private key file
 
|-
 
|-
 
|}
 
|}
Line 695: Line 696:
  
 
{{Tbl-init|caption=7.2m: pbi_makerepo Options}}
 
{{Tbl-init|caption=7.2m: pbi_makerepo Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''--desc description'''}}
+
|'''--desc description'''
{{Tbl-cell|row=1|required; description of the repo to be shown in the repo list}}
+
|required; description of the repo to be shown in the repo list
 
|-
 
|-
{{Tbl-cell|row=2|'''--key keyfile'''}}
+
|'''--key keyfile'''
{{Tbl-cell|row=2|required; OpenSSL public key used to verify the digital signature of PBIs installed from this repo}}
+
|required; OpenSSL public key used to verify the digital signature of PBIs installed from this repo
 
|-
 
|-
{{Tbl-cell|row=3|'''--mirror URL'''}}
+
|'''--mirror URL'''
{{Tbl-cell|row=3|required; URL in <nowiki>http://</nowiki>, <nowiki>https://</nowiki>, or <nowiki>ftp://</nowiki> format to download PBIs and updates from}}
+
|required; URL in <nowiki>http://</nowiki>, <nowiki>https://</nowiki>, or <nowiki>ftp://</nowiki> format to download PBIs and updates from
 
|-
 
|-
{{Tbl-cell|row=4|'''--url URL'''}}
+
|'''--url URL'''
{{Tbl-cell|row=4|required; URL in <nowiki>http://</nowiki>, <nowiki>https://</nowiki>, or <nowiki>ftp://</nowiki> format to use when downloading the master ''INDEX'' file of available PBIs}}
+
|required; URL in {{http}}, {{https}}, or {{ftp}} format to use when downloading the master ''INDEX'' file of available PBIs
 
|-
 
|-
 
|}
 
|}
Line 717: Line 718:
  
 
{{Tbl-init|caption=7.2n: pbi_metatool Options}}
 
{{Tbl-init|caption=7.2n: pbi_metatool Options}}
{{Tbl-title|width=15%|'''Command'''}}
+
!Command
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=70%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''add''' or '''rem'''}}
+
|rowspan=2|'''add''' or '''rem'''
{{Tbl-cell|row=1|'''--cat'''}}
+
|'''--cat'''
{{Tbl-cell|row=1|indicates that a new category is being added to or removed from the target metafile}}
+
|indicates that a new category is being '''added to''' or ''removed from'' the target metafile
 
|-
 
|-
{{Tbl-cell|row=2|'''add''' or '''rem'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=2|'''--app'''}}
+
|'''--app'''
{{Tbl-cell|row=2|adds or removes a new PBI to/from the target metafile}}
+
|adds or removes a new PBI to/from the target metafile
 
|-
 
|-
{{Tbl-cell|row=3|'''add'''}}
+
|rowspan=6|'''add'''
{{Tbl-cell|row=3|'''-a author'''}}
+
|'''-a author'''
{{Tbl-cell|row=3|adds the name of the application's author to the target metafile}}
+
|adds the name of the application's author to the target metafile
 
|-
 
|-
{{Tbl-cell|row=4|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=4|'''-c category'''}}
+
|'''-c category'''
{{Tbl-cell|row=4|name of new category to add to the target metafile}}
+
|name of new category to add to the target metafile
 
|-
 
|-
{{Tbl-cell|row=5|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=5|'''-d desc'''}}
+
|'''-d desc'''
{{Tbl-cell|row=5|mandatory description of PBI or category being added}}
+
|mandatory description of PBI or category being added
 
|-
 
|-
{{Tbl-cell|row=6|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=6|'''-i icon'''}}
+
|'''-i icon'''
{{Tbl-cell|row=6|mandatory URL to 64x64 ''.png'' icon of PBI or category being added}}
+
|mandatory URL to 64x64 ''.png'' icon of PBI or category being added
 
|-
 
|-
{{Tbl-cell|row=7|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=7|'''-k keywords'''}}
+
|'''-k keywords'''
{{Tbl-cell|row=7|comma delimited list (with no spaces) of search keywords}}
+
|comma delimited list (with no spaces) of search keywords
 
|-
 
|-
{{Tbl-cell|row=8|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=8|'''-l license'''}}
+
|'''-l license'''
{{Tbl-cell|row=8|type of license (e.g. BSD, GPL, Commercial)}}
+
|type of license (e.g. BSD, GPL, Commercial)
 
|-
 
|-
{{Tbl-cell|row=9|'''add''' or '''rem'''}}
+
|rowspan=1|'''add''' or '''rem'''
{{Tbl-cell|row=9|'''-n name'''}}
+
|'''-n name'''
{{Tbl-cell|row=9|mandatory name of category or PBI being added to or removed from the target metafile}}
+
|mandatory name of category or PBI being ''added to'' or ''removed from'' the target metafile
 
|-
 
|-
{{Tbl-cell|row=10|'''add'''}}
+
|rowspan=3|'''add'''
{{Tbl-cell|row=10|'''-t type'''}}
+
|'''-t type'''
{{Tbl-cell|row=10|type of application (e.g. Graphical, Text, Service)}}
+
|type of application (e.g. Graphical, Text, Service)
 
|-
 
|-
{{Tbl-cell|row=11|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=11|'''-u URL'''}}
+
|'''-u URL'''
{{Tbl-cell|row=11|website of application being added}}
+
|website of application being added
 
|-
 
|-
{{Tbl-cell|row=12|'''add'''}}
+
<!-- handled by rowspan -->
{{Tbl-cell|row=12|'''-r'''}}
+
|'''-r'''
{{Tbl-cell|row=12|include if application needs to be installed as the superuser}}
+
|include if application needs to be installed as the superuser
 
|-
 
|-
 
|}
 
|}
Line 776: Line 777:
  
 
{{Tbl-init|caption=7.2o: pbi_patch Options}}
 
{{Tbl-init|caption=7.2o: pbi_patch Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-e'''}}
+
|'''-e'''
{{Tbl-cell|row=1|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless '''-o''' is used.}}
+
|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless '''-o''' is used.
 
|-
 
|-
{{Tbl-cell|row=2|'''-g'''}}
+
|'''-g'''
{{Tbl-cell|row=2|extract image data from header; commonly used for GUI installations}}
+
|extract image data from header; commonly used for GUI installations
 
|-
 
|-
{{Tbl-cell|row=3|'''-i'''}}
+
|'''-i'''
{{Tbl-cell|row=3|display information about this PBI file}}
+
|display information about this PBI file
 
|-
 
|-
{{Tbl-cell|row=4|'''-o outdir'''}}
+
|'''-o outdir'''
{{Tbl-cell|row=4|specify the directory to use when only extracting the PBI with '''-e'''}}
+
|specify the directory to use when only extracting the PBI with '''-e'''
 
|-
 
|-
{{Tbl-cell|row=5|'''--checkscript'''}}
+
|'''--checkscript'''
{{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}}
+
|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=6|'''--no-checksig'''}}
+
|'''--no-checksig'''
{{Tbl-cell|row=6|skip the openssl signature verification of the PBI data}}
+
|skip the openssl signature verification of the PBI data
 
|-
 
|-
{{Tbl-cell|row=7|'''--no-hash'''}}
+
|'''--no-hash'''
{{Tbl-cell|row=7|disable using the shared hash directory which uses hard links to share files between applications}}
+
|disable using the shared hash directory which uses hard links to share files between applications
 
|-
 
|-
 
|}
 
|}
Line 807: Line 808:
  
 
{{Tbl-init|caption=7.2p: pbi_update Options}}
 
{{Tbl-init|caption=7.2p: pbi_update Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-c'''}}
+
|'''-c'''
{{Tbl-cell|row=1|check only the specified PBI for available updates}}
+
|check only the specified PBI for available updates
 
|-
 
|-
{{Tbl-cell|row=2|'''--check-all'''}}
+
|'''--check-all'''
{{Tbl-cell|row=2|run a full check of all installed PBIs and display list of available updates}}
+
|run a full check of all installed PBIs and display list of available updates
 
|-
 
|-
{{Tbl-cell|row=3|'''-disable-auto'''}}
+
|'''-disable-auto'''
{{Tbl-cell|row=3|disable auto-updating of the target PBI}}
+
|disable auto-updating of the target PBI
 
|-
 
|-
{{Tbl-cell|row=4|'''--enable-auto'''}}
+
|'''--enable-auto'''
{{Tbl-cell|row=4|enable auto-updating of the target PBI}}
+
|enable auto-updating of the target PBI
 
|-
 
|-
{{Tbl-cell|row=5|'''--update-all'''}}
+
|'''--update-all'''
{{Tbl-cell|row=5|update all installed PBIs to the latest versions}}
+
|update all installed PBIs to the latest versions
 
|-
 
|-
 
|}
 
|}
Line 838: Line 839:
  
 
{{Tbl-init|caption=7.2q: pbid Options}}
 
{{Tbl-init|caption=7.2q: pbid Options}}
{{Tbl-title|width=15%|'''Switch'''}}
+
!Switch
{{Tbl-title|width=85%|'''Description'''}}
+
!Description
 
|-
 
|-
{{Tbl-cell|row=1|'''-v'''}}
+
|'''-v'''
{{Tbl-cell|row=1|enable verbose output when the daemon starts}}
+
|enable verbose output when the daemon starts
 
|-
 
|-
{{Tbl-cell|row=2|'''--refresh'''}}
+
|'''--refresh'''
{{Tbl-cell|row=2|schedule a refresh of index and meta files }}
+
|schedule a refresh of index and meta files
 
|-
 
|-
 
|}
 
|}
Line 854: Line 855:
 
{{refheading}}
 
{{refheading}}
 
{{GroupListHeading|group=tables}}
 
{{GroupListHeading|group=tables}}
[[category:handbook]]
 
[[category:Maintaining and Extending PC-BSD®]]
 
 
[[category:PBI Manager]]
 
[[category:PBI Manager]]
 +
[[category:Maintaining and Extending PC-BSD®]]
 +
[[category:handbook]]
 
[[category:protect]]
 
[[category:protect]]
 
[[category:Referred by manpage]]
 
[[category:Referred by manpage]]
 +
<languages/>
 
</noinclude>
 
</noinclude>

Revision as of 05:59, 5 July 2013

(Sorry for the inconvenience)

Contents

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

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
                                                                 


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


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

Table 7.2a: pbi_add Options [tables 1]
Switch Description
-e extract only, do not install; will extract the archive to ~/<pbidirname> unless the -o option is used
-f force installation, overwriting an already installed copy of the application
-g show path to icons and images for GUI installations
-i display information about specified PBI; if combined with -v, will display all of the files that will be installed with the PBI
-l display license for specified PBI
-o outdir specify the directory to use when extracting the PBI with -e
-r remote fetch installation file from update server; the system architecture and version will be automatically determined in order to fetch the correct file and resume support is built-in
-R remote fetch the install file from the update server but do not install
-v enable verbose output
--checkscript display any custom scripts used in the installation/removal of the PBI
--licagree agree to license terms and conditions; to view the license, use -l
--no-checksig skip the openssl signature verification of the PBI data
--no-checksum skip the checksum verification of the archive data
--no-hash disable using the shared hash dir
--repo repoid specify which repository to use
--rArch arch manually specify the PBI architecture type of i386 or amd64
--rVer version specify which version of the PBI to install

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:

Table 7.2b: pbi_autobuild Options [tables 2]
Switch Description
-c confdir mandatory; specify the directory containing the PBI configuration modules; any found pbi.conf files will be parsed, and if PBI_MAKEPORT is set, the target port will be used for the build; if PBI_MAKEPORT is unset, the auto-build will attempt to match the module to a FreeBSD port based upon the dirname of pbi.conf
-d portsdir specify an alternative ports directory; defaults to /usr/ports/
-h script specify a helper script to call after building a PBI
-o outdir mandatory; the directory to place the finished PBI files
-p num if your build hardware has the CPU and disk I/O to support concurrent build processes, specify the number of concurrent builds
-32 include when building a 32-bit PBI on a 64-bit system
--genpatch when building a new PBI, check for archived copies and generate smaller patch updates to the new version (*.pbp files)
--keep num when building new PBIs, keep <num> copies of past versions of working PBI in <outdir>/archived/ folder; these archived copies can be used with the --genpatch command to generate update patch files
--pkgcache enable caching of .txz pkg files which greatly speeds up subsequent builds of a PBI
--prune remove any PBIs which no longer have an associated module
--tmpfs automatically create and mount a tmp filesystem which can speed up port compiles on systems with available RAM
--sign keyfile digitally sign the PBI file with the specified openssl private key file

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.

Table 7.2c: pbi_browser Options [tables 3]
Switch Description
-c category displays a list of PBIs in the specified category
-s search search for PBIs containing the specified string in the name, description, or keywords
--listcats list the available categories
--viewall list all available PBIs

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.

Table 7.2d: pbi_conf Variables [tables 4]
Variable Description
PBID_REFRESH wakeup time in seconds for pbid to run its checks
PBI_INDEXREFRESH number of hours representing how often pbid refreshes the index and meta files from repos; default is every 24 hours
PBI_PROXYURL proxy server IP address
PBI_PROXYPORT proxy server port number
PBI_PROXYTYPE can be HTTP or SOCKS5
PBI_PROXYUSER username used to authenticate with proxy server
PBI_PROXYPASS password used to authenticate with proxy server

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:

Table 7.2e: pbi_create Options [tables 5]
Switch Description
-a author specify the author for this PBI
-b make a backup of an installed PBI; specify the target PBI name instead of the PBI directory
-c confdir specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points
-d portsdir specify an alternative ports directory; defaults to /usr/ports/
-i icon specify a default icon, relative to pbidir/
-n name specify a name for this PBI
-o outdir place the finished .pbi file into the specified directory; defaults to $HOME
-p port use the given port to get PBI name and version
-r version specify a version for this PBI
-u weburl specify a website URL for the PBI
--no-hash disable using the shared hash directory which uses hard links to share files between applications
--sign keyfile digitally sign the PBI file with the specified openssl private key file

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:

Table 7.2f: pbi_delete Options [tables 6]
Switch Description
-v enable verbose output
--clean-hdir perform a full cleaning of the shared hash directory, removing any unused files; should only be required after a system crash or failure in removing a PBI

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 [1][7]-compliant to understand a PBI's icon and mime settings. Table 7.2g summarizes this command's options:

Table 7.2g: pbi_icon Options [tables 7]
Switch Description
add-desktop installs desktop icon; should be run as regular user
add-mime installs mime information; should be run as root
add-menu installs menu icons; should be run as root
add-pathlnk installs any $PATH links to ~/bin when run as user or to $LOCALBASE when run as root
del-desktop removes desktop icon; should be run as regular user
del-menu removes menu icons; should be run as root
del-mime removes mime information; should be run as root
del-pathlnk removes any $PATH links to ~/bin when run as user or to $LOCALBASE when run as root

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:

Table 7.2h: pbi_indextool Options [tables 8]
Command Switch Description
add -b vers mark previous versions as having a binary diff patch (.pbp file used for upgrading) available
-f pbifile mandatory, name of PBI being added to the target INDEX file
-k num number of previous versions of this PBI to keep in the INDEX file
-u fileurl mandatory URL to PBI location on server in the format category/pbi_name
rem -m arch mandatory architecture type for PBI being removed (e.g. i386, amd64)
-n pbiname mandatory name of PBI being removed from the INDEX file
-v version mandatory, version of the PBI being removed from the INDEX file

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:

Table 7.2i: pbi_info Options [tables 9]
Switch Description
-a list all PBIs installed on the system; same as running pbi_info without an argument
-i list all available PBIs from any repo
-v enable verbose output

pbi_listrepo(1)

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

Table 7.2j: pbi_listrepo Options [tables 10]
Switch Description
--down move the targeted repoID down a single number in priority
-mirror URL change the specified repoID's mirror URL
--up move the targeted repoID up a single number in priority

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:

Table 7.2k: pbi_makepatch Options [tables 11]
Switch Description
-o outdir save the resulting *pbp file to the specified directory
--sign keyfile use the specified openssl key to digitally sign the patch file
--tmpfs can reduce building time for large PBIs

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:

Table 7.2l: pbi_makeport Options [tables 12]
Switch Description
-B build-only; generally used with -k to build a port before running pbi_create manually
-c confdir specify the metadata configuration directory; while not required it is highly recommended as metadata is required to create icons and binary entry-points
-d portsdir specify an alternative ports directory; defaults to /usr/ports
-k keep the build files after building the PBI
-o outdir the directory to place the finished PBI file; defaults to user's $HOME directory
-p prefix manually provide a PREFIX which determines the location where the PBI will be installed on the end-user's system
--32 include when building a 32-bit PBI on a 64-bit system
--delbuild remove any existing build directories before starting the build
--mkdebug will drop to a debugging shell should the port make fail
--no-prune disable auto-pruning of non-REQUIREDBY ports after the compile phase; by default any ports which are used solely for building and which are not required for program execution will be pruned
--pkgdir dir uses the specified directory to cache the .txz package so subsequent builds will not rebuild the port from source
--tmpfs automatically create and mount a tmp filesystem and use it for WRKDIRPREFIX; can speed up port compiles on systems with available RAM
--sign keyfile digitally sign the PBI file with the specified openssl private key file

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.

Table 7.2m: pbi_makerepo Options [tables 13]
Switch Description
--desc description required; description of the repo to be shown in the repo list
--key keyfile required; OpenSSL public key used to verify the digital signature of PBIs installed from this repo
--mirror URL required; URL in http://, https://, or ftp:// format to download PBIs and updates from
--url URL required; URL in http://, https://, or ftp:// format to use when downloading the master INDEX file of available PBIs

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:

Table 7.2n: pbi_metatool Options [tables 14]
Command Switch Description
add or rem --cat indicates that a new category is being added to or removed from the target metafile
--app adds or removes a new PBI to/from the target metafile
add -a author adds the name of the application's author to the target metafile
-c category name of new category to add to the target metafile
-d desc mandatory description of PBI or category being added
-i icon mandatory URL to 64x64 .png icon of PBI or category being added
-k keywords comma delimited list (with no spaces) of search keywords
-l license type of license (e.g. BSD, GPL, Commercial)
add or rem -n name mandatory name of category or PBI being added to or removed from the target metafile
add -t type type of application (e.g. Graphical, Text, Service)
-u URL website of application being added
-r include if application needs to be installed as the superuser

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.

Table 7.2o: pbi_patch Options [tables 15]
Switch Description
-e extract only, do not install; will extract the archive to ~/<pbidirname> unless -o is used.
-g extract image data from header; commonly used for GUI installations
-i display information about this PBI file
-o outdir specify the directory to use when only extracting the PBI with -e
--checkscript display any custom scripts used in the installation/removal of this PBI file; recommended if the PBI file is suspect in any way
--no-checksig skip the openssl signature verification of the PBI data
--no-hash disable using the shared hash directory which uses hard links to share files between applications

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.

Table 7.2p: pbi_update Options [tables 16]
Switch Description
-c check only the specified PBI for available updates
--check-all run a full check of all installed PBIs and display list of available updates
-disable-auto disable auto-updating of the target PBI
--enable-auto enable auto-updating of the target PBI
--update-all update all installed PBIs to the latest versions

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:

Table 7.2q: pbid Options [tables 17]
Switch Description
-v enable verbose output when the daemon starts
--refresh schedule a refresh of index and meta files

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/

List of Tables


  1. Table 7.2a: pbi_add Options
  2. Table 7.2b: pbi_autobuild Options
  3. Table 7.2c: pbi_browser Options
  4. Table 7.2d: pbi_conf Variables
  5. Table 7.2e: pbi_create Options
  6. Table 7.2f: pbi_delete Options
  7. Table 7.2g: pbi_icon Options
  8. Table 7.2h: pbi_indextool Options
  9. Table 7.2i: pbi_info Options
  10. Table 7.2j: pbi_listrepo Options
  11. Table 7.2k: pbi_makepatch Options
  12. Table 7.2l: pbi_makeport Options
  13. Table 7.2m: pbi_makerepo Options
  14. Table 7.2n: pbi_metatool Options
  15. Table 7.2o: pbi_patch Options
  16. Table 7.2p: pbi_update Options
  17. Table 7.2q: pbid Options
Other languages:German 24% • ‎English 100% • ‎French 2%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox