Difference between revisions of "PBI Manager/10.1"

From PC-BSD Wiki
Jump to: navigation, search
(21 intermediate revisions by one user not shown)
Line 5: Line 5:
  
 
<!--T:2-->
 
<!--T:2-->
PBI Manager is a suite of command line utilities which can be used to install, remove, create and manage PBIs.  
+
PBI Manager is a suite of command line utilities which can be used to install, remove, and manage PBIs.  
  
 +
<!--T:187-->
 
This chapter provides an overview of the commands that are installed by PBI Manager. When using these commands, note that single character options can not be stacked. As an example, you must type '''pbi_add -i -v''' as '''pbi_add -iv''' will fail with a syntax error.
 
This chapter provides an overview of the commands that are installed by PBI Manager. When using these commands, note that single character options can not be stacked. As an example, you must type '''pbi_add -i -v''' as '''pbi_add -iv''' will fail with a syntax error.
  
=== pbi === <!--T:105-->
+
=== pbi === <!--T:188-->  
  
 +
<!--T:189-->
 +
The '''pbi''' meta-command can be used to install, uninstall, and get information about PBIs. Unlike the other '''pbi_*''' commands, it uses a space instead of an underscore. For example, '''pbi add''' is equivalent to '''pbi_add''' and either command can be used to install a PBI.
  
 +
<!--T:190-->
 +
This meta-command expects to be given a sub-command, and then a suitable option for that sub-command. To see the available options for a sub-command, use the built-in help system. For example, to see the available options for the '''add''' sub-command, type '''pkg help add'''. Table 7.3a summarizes the available sub-commands.
 +
 +
<!--T:191-->
 
{{Tbl-init|caption=7.3a: pbi Sub-Commands}}
 
{{Tbl-init|caption=7.3a: pbi Sub-Commands}}
 
!Sub-Command
 
!Sub-Command
Line 17: Line 24:
 
|-
 
|-
 
|'''add'''
 
|'''add'''
|
+
|installs the specified PBI
 
|-
 
|-
 
|'''delete'''
 
|'''delete'''
|
+
|uninstalls the specified PBI
 
|-  
 
|-  
 
|'''help'''
 
|'''help'''
|
+
|shows the options for the specified sub-command
 
|-
 
|-
 
|'''icon'''
 
|'''icon'''
|
+
|adds or deletes the PBI's desktop icon, menu icon, or MIME registration
 
|-
 
|-
 
|'''info'''
 
|'''info'''
|
+
|shows all available PBIs or lists the packages installed into a specified jail
 
|-
 
|-
 
|'''install'''
 
|'''install'''
|
+
|equivalent to '''add'''
 
|-
 
|-
 
|}
 
|}
Line 39: Line 46:
  
 
<!--T:106-->
 
<!--T:106-->
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.3a. All of the options, except for '''-r''', assume that the ''.pbi'' file has already been downloaded and is in the current or specified directory.
+
The pbi_add command is used to install a specified PBI. Table 7.3b summarizes the available options.
  
 
<!--T:107-->
 
<!--T:107-->
{{Tbl-init|caption=7.3a: pbi_add Options}}
+
{{Tbl-init|caption=7.3b: pbi_add Options}}
 
!Switch
 
!Switch
 
!Description
 
!Description
|-
 
|'''-e'''
 
|extract only, do not install; will extract the archive to ''~/<pbidirname>'' unless the '''-o''' option is used
 
 
|-
 
|-
 
|'''-f'''
 
|'''-f'''
 
|force installation, overwriting an already installed copy of the application
 
|force installation, overwriting an already installed copy of the application
 
|-  
 
|-  
|'''-g'''
 
|show path to icons and images for GUI installations
 
|-
 
 
|'''-i'''
 
|'''-i'''
 
|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
 +
|-
 +
|'''-j <nowiki><jailname></nowiki>'''
 +
|installs the PBI into the specified jail
 
|-
 
|-
 
|'''-l'''
 
|'''-l'''
|display license for specified PBI
+
|display ''LICENSE'' text 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 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'''
 
|'''-v'''
 
|enable verbose output
 
|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
 
 
|-
 
|-
 
|}
 
|}
  
 
<!--T:108-->
 
<!--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.
+
The following example installs the alpine PBI. When prompted, input your password.
 
+
<!--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:
+
  
 
<!--T:186-->
 
<!--T:186-->
{{txtbox|box='''pbi_add -r alpine'''
+
{{txtbox|box='''sudo pbi_add alpine'''
/usr/pbi/.alpine-2.00_4_1-amd64.pbi      100% of 22 MB  159 kBps 02m27s
+
Password:
Verifying Checksum...OK
+
Updating repository catalogue
Extracting to: /usr/pbi/alpine-amd64
+
Installing: alpine
Installed: Alpine-2.00_4_1}}
+
The following 2 packages will be installed:
 
+
        Installing pico-alpine: 2.00_1
<!--T:111-->
+
        Installing alpine: 2.00_4
PBI Manager will automatically install the appropriate PBI. If only a 32-bit version is available, the 32-bit PBI will be installed and will work correctly on the PC-BSD® system.
+
The installation will require 9 MB more space
 
+
2 MB to be downloaded
<!--T:112-->
+
pico-alpine-2.00_1.txz              100%  314KB 313.9KB/s 313.9KB/s  00:01   
If you previously downloaded the PBI, do not include the '''-r''' switch and give the fullname of the PBI:
+
alpine-2.00_4.txz                  100% 1701KB  1.7MB/s  1.4MB/s  00:01   
 
+
Checking integrity... done
<!--T:113-->
+
The following 2 packages will be installed:
{{txtbox|box='''pbi_add alpine-2.00_4_1-amd64.pbi'''}}
+
        Installing pico-alpine: 2.00_1
 +
        Installing alpine: 2.00_4
 +
The installation will require 9 MB more space
 +
0 B to be downloaded
 +
Checking integrity... done
 +
[1/2] Installing pico-alpine-2.00_1... done
 +
[2/2] Installing alpine-2.00_4... done
 +
<nowiki>*******************************************************************************</nowiki>
 +
<nowiki>***</nowiki> To use GnuPG with Alpine, take a look at the mail/pine-pgp-filters port <nowiki>***</nowiki>
 +
<nowiki>*******************************************************************************</nowiki>
 +
}}
  
 
=== pbi.conf === <!--T:123-->
 
=== pbi.conf === <!--T:123-->
  
 
<!--T:124-->
 
<!--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.3d lists the supported variables.
+
The '''pbi_*''' commands support several environment variables which can be stored in the ASCII text configuration file, ''/usr/local/etc/pbi.conf''. These proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.3c lists the supported variables.
  
 
<!--T:125-->
 
<!--T:125-->
{{Tbl-init|caption=7.3d: pbi.conf Variables}}
+
{{Tbl-init|caption=7.3c: pbi.conf Variables}}
 
!Variable
 
!Variable
 
!Description
 
!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
 
|PBI_PROXYURL
Line 160: Line 132:
  
 
<!--T:137-->
 
<!--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.3f summarizes its options:
+
The pbi_delete command removes an installed PBI from the system. Table 7.3d summarizes its one available option:  
  
 
<!--T:138-->
 
<!--T:138-->
{{Tbl-init|caption=7.3f: pbi_delete Options}}
+
{{Tbl-init|caption=7.3d: pbi_delete Options}}
 
!Switch
 
!Switch
 
!Description
 
!Description
Line 169: Line 141:
 
|'''-v'''
 
|'''-v'''
 
|enable verbose output
 
|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
 
 
|-
 
|-
 
|}
 
|}
Line 178: Line 147:
 
The following example uninstalls the previously installed alpine PBI:
 
The following example uninstalls the previously installed alpine PBI:
 
   
 
   
{{txtbox|pre|box='''pbi_delete -v alpine-2.00_4_1-amd64'''
+
{{txtbox|pre|box='''sudo pbi_delete alpine'''
Running pre-removal script: /var/db/pbi/installed/alpine-2.00_4_1-amd64/pre-remove.sh
+
Password:
Removing: /usr/pbi/alpine-amd64
+
Updating repository catalogue
Removing: /var/db/pbi/installed/alpine-2.00_4_1-amd64}}
+
Deinstallation has been requested for the following 1 packages:
  
=== pbi_icon(1) === <!--T:142-->
+
        <!--T:192-->
 +
alpine-2.00_4
 +
 
 +
<!--T:193-->
 +
The deinstallation will free 8 MB
 +
[1/1] Deleting alpine-2.00_4... done
 +
Deinstallation has been requested for the following 2 packages:
 +
 
 +
        <!--T:194-->
 +
openjpeg-2.1.0
 +
        pico-alpine-2.00_1
 +
 
 +
<!--T:195-->
 +
The deinstallation will free 2 MB
 +
[1/2] Deleting openjpeg-2.1.0... done
 +
[2/2] Deleting pico-alpine-2.00_1... done
 +
}}
 +
 
 +
=== pbi_icon === <!--T:142-->
  
 
<!--T:143-->
 
<!--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|txt=XDG}}-compliant to understand a PBI's icon and mime settings. Table 7.3g 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|txt=XDG}}-compliant to understand a PBI's icon and mime settings. Table 7.3e summarizes this command's options:
  
 
<!--T:144-->
 
<!--T:144-->
{{Tbl-init|caption=7.3g: pbi_icon Options}}
+
{{Tbl-init|caption=7.3e: pbi_icon Options}}
 
!Switch
 
!Switch
 
!Description
 
!Description
Line 201: Line 188:
 
|'''add-menu'''
 
|'''add-menu'''
 
|installs menu icons; should be run as root
 
|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'''
 
|'''del-desktop'''
Line 213: Line 197:
 
|'''del-mime'''
 
|'''del-mime'''
 
|removes mime information; should be run as root
 
|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_info(1) === <!--T:148-->
+
=== pbi_info === <!--T:148-->
  
 
<!--T:149-->
 
<!--T:149-->
Similar to FreeBSD's '''pkg_info''' command, the '''pbi_info''' command is used to determine which PBIs are currently installed. Table 7.3i summarizes the available options:
+
The '''pbi_info''' command is used to determine which PBIs are currently installed. Table 7.3f summarizes the available options:
  
 
<!--T:150-->
 
<!--T:150-->
{{Tbl-init|caption=7.3i: pbi_info Options}}
+
{{Tbl-init|caption=7.3f: pbi_info Options}}
 
!width=15%|Switch
 
!width=15%|Switch
 
!width=85%|Description
 
!width=85%|Description
Line 232: Line 213:
 
|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
 
|-
 
|-
|'''-i'''
+
|'''-j <nowiki><jailname></nowiki>'''
|list all available PBIs from any repo
+
|list PBIs installed in the specified jail
 
|-
 
|-
 
|'''-v'''
 
|'''-v'''
|enable verbose output
+
|includes verbose information about each PBI
 
|-
 
|-
 
|}
 
|}
  
=== pbi_update_makeindex === <!--T:177-->
+
=== pbi_makeindex === <!--T:177-->
 +
 
 +
<!--T:196-->
 +
This command is used to make the INDEX for a custom PBI repository which can then be used in [[AppCafe®/10.1|AppCafe®]]. Refer to [[Create Your Own PBI Repository/10.1|Create Your Own PBI Repository]] for instructions on how to create a custom repository.
  
 
=== pbi_updateindex === <!--T:179-->
 
=== pbi_updateindex === <!--T:179-->
  
 +
<!--T:197-->
 +
To check for a newer version of the PC-BSD® ''PBI-INDEX.txz'' file, type '''sudo pbi_updateindex''' and input your password when prompted. If a newer version is available, this command fetches and extracts it so that the system has the most recent list of available PBIs.
  
 +
<!--T:198-->
 
<noinclude>
 
<noinclude>
 
{{refheading}}
 
{{refheading}}

Revision as of 07:37, 17 June 2014


Contents


PBI Manager is a suite of command line utilities which can be used to install, remove, and manage PBIs.

This chapter provides an overview of the commands that are installed by PBI Manager. When using these commands, note that single character options can not be stacked. As an example, you must type pbi_add -i -v as pbi_add -iv will fail with a syntax error.

pbi

The pbi meta-command can be used to install, uninstall, and get information about PBIs. Unlike the other pbi_* commands, it uses a space instead of an underscore. For example, pbi add is equivalent to pbi_add and either command can be used to install a PBI.

This meta-command expects to be given a sub-command, and then a suitable option for that sub-command. To see the available options for a sub-command, use the built-in help system. For example, to see the available options for the add sub-command, type pkg help add. Table 7.3a summarizes the available sub-commands.

Table 7.3a: pbi Sub-Commands [tables 1]
Sub-Command Description
add installs the specified PBI
delete uninstalls the specified PBI
help shows the options for the specified sub-command
icon adds or deletes the PBI's desktop icon, menu icon, or MIME registration
info shows all available PBIs or lists the packages installed into a specified jail
install equivalent to add

pbi_add

The pbi_add command is used to install a specified PBI. Table 7.3b summarizes the available options.

Table 7.3b: pbi_add Options [tables 2]
Switch Description
-f force installation, overwriting an already installed copy of the application
-i display information about specified PBI; if combined with -v, will display all of the files that will be installed with the PBI
-j <jailname> installs the PBI into the specified jail
-l display LICENSE text for specified PBI
-v enable verbose output

The following example installs the alpine PBI. When prompted, input your password.

sudo pbi_add alpine

Password: Updating repository catalogue Installing: alpine The following 2 packages will be installed:

       Installing pico-alpine: 2.00_1
       Installing alpine: 2.00_4

The installation will require 9 MB more space 2 MB to be downloaded pico-alpine-2.00_1.txz 100% 314KB 313.9KB/s 313.9KB/s 00:01 alpine-2.00_4.txz 100% 1701KB 1.7MB/s 1.4MB/s 00:01 Checking integrity... done The following 2 packages will be installed:

       Installing pico-alpine: 2.00_1
       Installing alpine: 2.00_4

The installation will require 9 MB more space 0 B to be downloaded Checking integrity... done [1/2] Installing pico-alpine-2.00_1... done [2/2] Installing alpine-2.00_4... done ******************************************************************************* *** To use GnuPG with Alpine, take a look at the mail/pine-pgp-filters port ***

*******************************************************************************

pbi.conf

The pbi_* commands support several environment variables which can be stored in the ASCII text configuration file, /usr/local/etc/pbi.conf. These proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.3c lists the supported variables.

Table 7.3c: pbi.conf Variables [tables 3]
Variable Description
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_FBSDMAJOR can be set to the major FreeBSD version when running -CURRENT or some other version with no PBIs

pbi_delete

The pbi_delete command removes an installed PBI from the system. Table 7.3d summarizes its one available option:

Table 7.3d: pbi_delete Options [tables 4]
Switch Description
-v enable verbose output

The following example uninstalls the previously installed alpine PBI:

sudo pbi_delete alpine

Password: Updating repository catalogue Deinstallation has been requested for the following 1 packages:

       alpine-2.00_4

The deinstallation will free 8 MB [1/1] Deleting alpine-2.00_4... done Deinstallation has been requested for the following 2 packages:

       openjpeg-2.1.0
       pico-alpine-2.00_1

The deinstallation will free 2 MB [1/2] Deleting openjpeg-2.1.0... done

[2/2] Deleting pico-alpine-2.00_1... done

pbi_icon

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

Table 7.3e: pbi_icon Options [tables 5]
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
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

pbi_info

The pbi_info command is used to determine which PBIs are currently installed. Table 7.3f summarizes the available options:

Table 7.3f: pbi_info Options [tables 6]
Switch Description
-a list all PBIs installed on the system; same as running pbi_info without an argument
-j <jailname> list PBIs installed in the specified jail
-v includes verbose information about each PBI

pbi_makeindex

This command is used to make the INDEX for a custom PBI repository which can then be used in AppCafe®. Refer to Create Your Own PBI Repository for instructions on how to create a custom repository.

pbi_updateindex

To check for a newer version of the PC-BSD® PBI-INDEX.txz file, type sudo pbi_updateindex and input your password when prompted. If a newer version is available, this command fetches and extracts it so that the system has the most recent list of available PBIs.


References


  1. http://en.wikipedia.org/wiki/Xdg

List of Tables


  1. Table 7.3a: pbi Sub-Commands
  2. Table 7.3b: pbi_add Options
  3. Table 7.3c: pbi.conf Variables
  4. Table 7.3d: pbi_delete Options
  5. Table 7.3e: pbi_icon Options
  6. Table 7.3f: pbi_info Options
Other languages:German 11% • ‎English 100%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox