Difference between revisions of "Package Manager/9.2"

From PC-BSD Wiki
Jump to: navigation, search
(Upgrading Meta-Packages)
(37 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=Update Manager|forward=Control Panel}}</noinclude>
+
<noinclude>{{NavHeader|back=Update Manager|forward=Create Your Own PBI Repository}}</noinclude>
  
In PC-BSD, software is divided into PBIs, meta-packages, and package sets:
+
'''pc-metapkgmanager''' is the back-end command line utility used by the PC-BSD® installer, System Manager, Update Manager, and Warden® to manage meta-packages. Meta-packages are like system components, and include supported and unsupported desktops, development utilities, hardware drivers, and miscellaneous applications such as MythTV or XBMC.
  
* '''PBIs''' are single applications, such as web browsers or multimedia utilities. PBIs are installed and managed using [[Using_AppCafe® | AppCafe®]] and [[Update Manager]] will automatically notify you when newer versions of installed PBIs become available.
+
Beginning with version 9.1, PC-BSD® uses metapkgsets to determine which system components are available and which applications are installed with each system component. Currently, two metapkgsets are available: ''pcbsd'' which defines the available desktop components, and ''warden'' which defines the components available when creating a jail with Warden® or installing a PC-BSD® server. You can view the contents of these metapkgsets on {{citelink|url=http://trac.pcbsd.org/browser/pcbsd/current#build-files/metapkgsets|txt=trac}}.
  
* '''Meta-packages''' are installable software collections and can be considered as system components.  Meta-packages are selected during installation and include supported and unsupported desktops, development utilities, hardware drivers, and miscellaneous applications such as MythTV or XBMC. After installation, your initial meta-packages choices can be modified using [[System_Manager#Install.2FUninstall_Desktops_and_System_Components | System Manager]]. [[Warden®]] also supports meta-packages, allowing you to install system components into a jail.
+
The '''pc-metapkgmanager''' command can be used at the command line to install or delete meta-packages, update to the latest package set, or to change the default metapkgset. If you type the command without any options, it will display its usage:
  
* '''Package sets''' include the default packages that get installed with any PC-BSD system, plus the meta-packages which are selected for installation by the user. The list of packages which are installed during a 9.1 PC-BSD installation are listed [http://trac.pcbsd.org/browser/pcbsd/current/build-files/metapkgsets/pcbsd/pkgset/base-system/ports-list here]. CHANGE URL WHEN 9.1 IS RELEASED You can also view the package list for each meta-package [http://trac.pcbsd.org/browser/pcbsd/current/build-files/metapkgsets/pcbsd/pkgset here].
+
'''pc-metapkgmanager'''
 
+
usage: pc-metapkgmanager [options]
'''pc-metapkgmanger''' is the command line utility used by the graphical installer, System Manager, Update Manager, and Warden® utilities.
+
Options:
 
+
for managing collections of FreeBSD packages in PC-BSD, also know as a "meta-package". It includes the ability to switch between pkgsets, such as "pcbsd" for the desktop, or "warden" for jailed environments or a PC-BSD server installation.
+
 
+
== Usage ==
+
 
+
 
+
<code>
+
pc-metapkgmanager [options]
+
 
+
Options:
+
 
   add pkg1,pkg2 <loc> -- Add the specified list of meta-packages  
 
   add pkg1,pkg2 <loc> -- Add the specified list of meta-packages  
  <loc> should be a FTP / HTTP url where pkg_add can fetch packages, or an absolute path to location of pkg files on disk.
+
                            <loc> should be a FTP / HTTP url where pkg_add  
 +
                            can fetch packages, or an absolute path to  
 +
                            location of pkg files on disk.
 
   checkup -- Check for updates to pkgs
 
   checkup -- Check for updates to pkgs
 
   del pkg1,pkg2   -- Delete the specified list of meta-packages
 
   del pkg1,pkg2   -- Delete the specified list of meta-packages
 
   list            -- List the available meta-packages
 
   list            -- List the available meta-packages
 
   status <pkg>    -- List the status of the specified meta-packages
 
   status <pkg>    -- List the status of the specified meta-packages
   update pkg1,pkg2 <loc> -- Update all system packages, or just <pkg> if specified
+
   update pkg,pkg2 <loc> -- Update system packages. Can use 'all' or <pkg,pkg2>.
  <loc> should be a FTP / HTTP url where pkg_add can fetch packages, or an absolute path to location of pkg files on disk.
+
                            <loc> should be a FTP / HTTP url where pkg_add  
 +
                            can fetch packages, or an absolute path to  
 +
                            location of pkg files on disk.
 
   --pkgset <pkgset> -- Change default pkgset we are using
 
   --pkgset <pkgset> -- Change default pkgset we are using
   --chroot <dir> -- Operate on the directory specififed using chroot
+
   --chroot <dir> -- Operate on the directory specified using chroot
</code>
+
 
 +
=== Finding, Installing, and Uninstalling Meta-Packages ===
 +
 
 +
To determine which meta-packages are available:
 +
 
 +
'''pc-metapkgmanager list |more'''
 +
Meta Package: Awesome
 +
-------------------------------------
 +
Description: A highly configurable, next generation framework window manager
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Awesome/pkg-icon.png
 +
Parent: Unsupported-Desktops
 +
Desktop: YES
 +
Required Packages:
 +
awesome-3.4.13
 +
Meta Package: Compiz
 +
-------------------------------------
 +
Description: Compiz - OpenGL compositing manager
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Compiz/pkg-icon.png
 +
Parent: Misc
 +
Desktop: NO
 +
Required Packages:
 +
compiz-fusion-0.8.4_2
 +
Meta Package: Desktops
 +
-------------------------------------
 +
Description: Supported Desktop Environments for your PC-BSD system.
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Desktops/pkg-icon.png
 +
Desktop: NO
 +
Category Entry
 +
Meta Package: Development
 +
-------------------------------------
 +
Description: Development tools and utilities for your Desktop
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Development/pkg-icon.png
 +
Desktop: NO
 +
--More--(byte 989)
 +
 
 +
To view which meta-packages are available in an alternate metapkgset, specify the metapkgset name. For example, to view the available ''warden'' meta-packages from your desktop, use this command:
 +
 
 +
'''pc-metapkgmanager --pkgset warden list | more'''
 +
Meta Package: Apache
 +
-------------------------------------
 +
Description: The Apache Web Server
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Apache/pkg-icon.png
 +
Parent: Web-Servers
 +
Desktop: NO
 +
Required Packages:
 +
apache-2.2.22_6
 +
Meta Package: BigBlueButton
 +
-------------------------------------
 +
Description: BigBlueButton enables universities and colleges to deliver
 +
a high-quality learning experience to remote students.
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/BigBlueButton/pkg-icon.png
 +
Parent: Web-Apps
 +
Desktop: NO
 +
Required Packages:
 +
mysql-server-5.5.27
 +
bigbluebutton-0.71_3
 +
Meta Package: Database-Servers
 +
-------------------------------------
 +
Description: Database Server Software
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Database-Servers/pkg-icon.png
 +
Desktop: NO
 +
Category Entry
 +
Meta Package: Development
 +
-------------------------------------
 +
Description: Developement tools and utilities
 +
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Development/pkg-icon.png
 +
--More--(byte 989)
 +
 
 +
To permanently change the default metapkgset between ''pcbsd'' and ''warden'', modify the ''PCBSD_METAPKGSET'' variable in ''/usr/local/etc/pcbsd.conf''.
 +
 
 +
To determine if a meta-package is installed, specify its "Meta Package" name as shown in the output of the '''pc-metapkgmanager list''' command. For example, to see if the Awesome desktop is installed:
 +
 
 +
'''pc-metapkgmanager status Awesome'''
 +
The meta-pkg Awesome is not installed
 +
 
 +
To install the meta-package, use the '''add''' option and specify the meta-package name. Only the superuser can install meta-packages. If you do not specify the URL, the default mirror will be used. If you receive an error when downloading the package, you can change the default mirror in Control Panel ➜ [[System Manager]] ➜ Mirrors.
 +
 
 +
The following example installs the Awesome meta-package. '''pc-metapkgmanager''' will provide messages regarding the status of the installation:
 +
 
 +
'''pc-metapkgmanager add Awesome'''
 +
Pending Meta-Package changes: 1
 +
Package source: NET
 +
Preparing to add: Awesome...
 +
Checking for updates to old packages...
 +
Installing Meta-Package: Awesome
 +
Getting package list...
 +
Pending package changes: 6
 +
Downloading package: awesome-3.4.13
 +
//usr/local/tmp/awesome-3.4.13.txz            100% of  704 kB  637 kBps
 +
Downloading package: libev-4.11,1
 +
//usr/local/tmp/libev-4.11,1.txz              100% of  117 kB  361 kBps
 +
Downloading package: libxdg-basedir-1.1.1
 +
//usr/local/tmp/libxdg-basedir-1.1.1.txz      100% of  11 kB  130 kBps
 +
Downloading package: xcb-util-image-0.3.8
 +
//usr/local/tmp/xcb-util-image-0.3.8.txz      100% of  18 kB  141 kBps
 +
Downloading package: xcb-util-keysyms-0.3.8
 +
//usr/local/tmp/xcb-util-keysyms-0.3.8.txz    100% of 8040  B  72 kBps
 +
Downloading package: xcb-util-wm-0.3.8
 +
//usr/local/tmp/xcb-util-wm-0.3.8.txz        100% of  35 kB  148 kBps
 +
Installing package: awesome-3.4.13
 +
Skipping installed package: libev-4.11,1
 +
Skipping installed package: libxdg-basedir-1.1.1
 +
Skipping installed package: xcb-util-image-0.3.8
 +
Skipping installed package: xcb-util-keysyms-0.3.8
 +
Skipping installed package: xcb-util-wm-0.3.8
 +
The meta-pkg Awesome is installed
 +
Finished Meta-Package: Awesome
 +
Meta-Package changes finished!
 +
 
 +
To delete an installed meta-package, specify its name. Only the superuser can uninstall meta-packages. As seen in the following example, '''pc-metapkgmanager''' automatically determines which dependent packages are still needed by other applications and which can be safely removed.
 +
 
 +
'''pc-metapkgmanager del Awesome'''
 +
Pending Meta-Package changes: 1
 +
Removing Meta-Package: Awesome
 +
Getting package list...
 +
Pending package changes: 66
 +
Removing: awesome-3.4.13
 +
Skipping Meta-Required: giflib-4.2.0_2
 +
Removing: libev-4.11,1
 +
Removing: libxdg-basedir-1.1.1
 +
Removing: xcb-util-image-0.3.8
 +
Removing: xcb-util-keysyms-0.3.8
 +
Removing: xcb-util-wm-0.3.8
 +
Skipping Required: bitstream-vera-1.10_5
 +
Skipping Required: cairo-1.10.2_4,2
 +
<snip output of other required packages>
 +
The meta-pkg Awesome is not installed
 +
Meta-Package changes finished!
 +
 
 +
=== Upgrading Meta-Packages ===
 +
 
 +
'''pc-metapkgmanager''' can also be used to determine if any meta-packages are out of date and to update meta-packages. To determine if any meta-packages have newer versions:
  
== Configuration ==
+
'''pc-metapkgmanager checkup'''
The default pkgset can be changed by editing /usr/local/etc/pcbsd.conf and editing the PCBSD_METAPKGSET variable.
+
All packages are up to date!
  
== Examples ==
+
In this example, all meta-packages are at their latest versions. If any were out of date, you would instead receive the message "The following package updates are available:" followed by the names of the out-of-date meta-packages.
pc-metapkgmanger add LXDE,XFCE,GNOME http://mirrors.isc.org/pub/pcbsd/9.0/amd64/netinstall/packages/
+
  
pc-metapkgmanager del LXDE,GNOME
+
To update a meta-package, use the '''pc-metapkgmanager update''' command followed by the name of the specific meta-package or the word '''all''' to update all out-of-date meta-packages.
  
 +
'''pc-metapkgmanager''' records any error messages to ''/tmp/.pc-metamanager.log''. This log file automatically rotates whenever it reaches 5MB in size.
  
 +
<noinclude>{{refheading}}</noinclude>
 
<noinclude>
 
<noinclude>
 
[[category:handbook]]
 
[[category:handbook]]
 +
[[category:Maintaining and Extending PC-BSD®]]
 +
[[category:Meta Package Manager]]
 
</noinclude>
 
</noinclude>

Revision as of 10:00, 27 November 2012

(Sorry for the inconvenience)

Contents

pc-metapkgmanager is the back-end command line utility used by the PC-BSD® installer, System Manager, Update Manager, and Warden® to manage meta-packages. Meta-packages are like system components, and include supported and unsupported desktops, development utilities, hardware drivers, and miscellaneous applications such as MythTV or XBMC.

Beginning with version 9.1, PC-BSD® uses metapkgsets to determine which system components are available and which applications are installed with each system component. Currently, two metapkgsets are available: pcbsd which defines the available desktop components, and warden which defines the components available when creating a jail with Warden® or installing a PC-BSD® server. You can view the contents of these metapkgsets on trac[1].

The pc-metapkgmanager command can be used at the command line to install or delete meta-packages, update to the latest package set, or to change the default metapkgset. If you type the command without any options, it will display its usage:

pc-metapkgmanager
usage: pc-metapkgmanager [options]
Options:
 add pkg1,pkg2 <loc>	 -- Add the specified list of meta-packages 
                           <loc> should be a FTP / HTTP url where pkg_add 
                           can fetch packages, or an absolute path to 
                           location of pkg files on disk.
 checkup		 -- Check for updates to pkgs
 del pkg1,pkg2	  	 -- Delete the specified list of meta-packages
 list     	         -- List the available meta-packages
 status <pkg>    	 -- List the status of the specified meta-packages
 update pkg,pkg2 <loc>  -- Update system packages. Can use 'all' or <pkg,pkg2>.
                           <loc> should be a FTP / HTTP url where pkg_add 
                           can fetch packages, or an absolute path to 
                           location of pkg files on disk.
 --pkgset <pkgset>	 -- Change default pkgset we are using
 --chroot <dir>	 -- Operate on the directory specified using chroot

Finding, Installing, and Uninstalling Meta-Packages

To determine which meta-packages are available:

pc-metapkgmanager list |more
Meta Package: Awesome
-------------------------------------
Description: A highly configurable, next generation framework window manager
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Awesome/pkg-icon.png
Parent: Unsupported-Desktops
Desktop: YES
Required Packages:
awesome-3.4.13
Meta Package: Compiz
-------------------------------------
Description: Compiz - OpenGL compositing manager
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Compiz/pkg-icon.png
Parent: Misc
Desktop: NO
Required Packages:
compiz-fusion-0.8.4_2
Meta Package: Desktops
-------------------------------------
Description: Supported Desktop Environments for your PC-BSD system. 
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Desktops/pkg-icon.png
Desktop: NO
Category Entry
Meta Package: Development
-------------------------------------
Description: Development tools and utilities for your Desktop
Icon: /var/db/pc-metapkgmanager/pkgsets/pcbsd/Development/pkg-icon.png
Desktop: NO
--More--(byte 989)

To view which meta-packages are available in an alternate metapkgset, specify the metapkgset name. For example, to view the available warden meta-packages from your desktop, use this command:

pc-metapkgmanager --pkgset warden list | more
Meta Package: Apache
-------------------------------------
Description: The Apache Web Server
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Apache/pkg-icon.png
Parent: Web-Servers
Desktop: NO 
Required Packages:
apache-2.2.22_6 
Meta Package: BigBlueButton
-------------------------------------
Description: BigBlueButton enables universities and colleges to deliver
a high-quality learning experience to remote students.
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/BigBlueButton/pkg-icon.png
Parent: Web-Apps
Desktop: NO
Required Packages:
mysql-server-5.5.27
bigbluebutton-0.71_3
Meta Package: Database-Servers
-------------------------------------
Description: Database Server Software
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Database-Servers/pkg-icon.png
Desktop: NO 
Category Entry 
Meta Package: Development
-------------------------------------
Description: Developement tools and utilities
Icon: /var/db/pc-metapkgmanager/pkgsets/warden/Development/pkg-icon.png
--More--(byte 989)

To permanently change the default metapkgset between pcbsd and warden, modify the PCBSD_METAPKGSET variable in /usr/local/etc/pcbsd.conf.

To determine if a meta-package is installed, specify its "Meta Package" name as shown in the output of the pc-metapkgmanager list command. For example, to see if the Awesome desktop is installed:

pc-metapkgmanager status Awesome
The meta-pkg Awesome is not installed

To install the meta-package, use the add option and specify the meta-package name. Only the superuser can install meta-packages. If you do not specify the URL, the default mirror will be used. If you receive an error when downloading the package, you can change the default mirror in Control Panel ➜ System Manager ➜ Mirrors.

The following example installs the Awesome meta-package. pc-metapkgmanager will provide messages regarding the status of the installation:

pc-metapkgmanager add Awesome 
Pending Meta-Package changes: 1
Package source: NET
Preparing to add: Awesome... 
Checking for updates to old packages...
Installing Meta-Package: Awesome
Getting package list...
Pending package changes: 6
Downloading package: awesome-3.4.13
//usr/local/tmp/awesome-3.4.13.txz            100% of  704 kB  637 kBps
Downloading package: libev-4.11,1
//usr/local/tmp/libev-4.11,1.txz              100% of  117 kB  361 kBps
Downloading package: libxdg-basedir-1.1.1
//usr/local/tmp/libxdg-basedir-1.1.1.txz      100% of   11 kB  130 kBps
Downloading package: xcb-util-image-0.3.8
//usr/local/tmp/xcb-util-image-0.3.8.txz      100% of   18 kB  141 kBps
Downloading package: xcb-util-keysyms-0.3.8
//usr/local/tmp/xcb-util-keysyms-0.3.8.txz    100% of 8040  B   72 kBps
Downloading package: xcb-util-wm-0.3.8
//usr/local/tmp/xcb-util-wm-0.3.8.txz         100% of   35 kB  148 kBps
Installing package: awesome-3.4.13
Skipping installed package: libev-4.11,1
Skipping installed package: libxdg-basedir-1.1.1
Skipping installed package: xcb-util-image-0.3.8
Skipping installed package: xcb-util-keysyms-0.3.8
Skipping installed package: xcb-util-wm-0.3.8
The meta-pkg Awesome is installed
Finished Meta-Package: Awesome
Meta-Package changes finished!

To delete an installed meta-package, specify its name. Only the superuser can uninstall meta-packages. As seen in the following example, pc-metapkgmanager automatically determines which dependent packages are still needed by other applications and which can be safely removed.

pc-metapkgmanager del Awesome
Pending Meta-Package changes: 1
Removing Meta-Package: Awesome
Getting package list...
Pending package changes: 66
Removing: awesome-3.4.13
Skipping Meta-Required: giflib-4.2.0_2
Removing: libev-4.11,1
Removing: libxdg-basedir-1.1.1
Removing: xcb-util-image-0.3.8
Removing: xcb-util-keysyms-0.3.8
Removing: xcb-util-wm-0.3.8
Skipping Required: bitstream-vera-1.10_5
Skipping Required: cairo-1.10.2_4,2
<snip output of other required packages>
The meta-pkg Awesome is not installed
Meta-Package changes finished!

Upgrading Meta-Packages

pc-metapkgmanager can also be used to determine if any meta-packages are out of date and to update meta-packages. To determine if any meta-packages have newer versions:

pc-metapkgmanager checkup
All packages are up to date!

In this example, all meta-packages are at their latest versions. If any were out of date, you would instead receive the message "The following package updates are available:" followed by the names of the out-of-date meta-packages.

To update a meta-package, use the pc-metapkgmanager update command followed by the name of the specific meta-package or the word all to update all out-of-date meta-packages.

pc-metapkgmanager records any error messages to /tmp/.pc-metamanager.log. This log file automatically rotates whenever it reaches 5MB in size.

References


  1. http://trac.pcbsd.org/browser/pcbsd/current#build-files/metapkgsets
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox