Pkgng and pc-metapkgmanager/9.2

From PC-BSD Wiki
Revision as of 09:00, 29 August 2013 by Drulavigne (Talk | contribs)

Jump to: navigation, search

(Sorry for the inconvenience)

PC-BSD® 9.2 uses pkgng, the next generation package management system for FreeBSD. All of the PC-BSD® utilities that deal with installing or updating non-PBI software now use the pkgng system. This allows users to safely install non-PBI software from the command line without that software being deleted by a system upgrade.

Since FreeBSD does not have an official pkgng repository yet, the PC-BSD® project provides its own repository containing all of the packages that can be built using pkgng.

PC-BSD® provides a custom command, pc-pkg, which is a small wrapper to pkg. When pc-pkg is used with the install or upgrade flags, it will automatically connect to the PC-BSD® pkgng repository using the integrated aria2 downloader utility, which can significantly reduce download speeds over a slow link.

If you are used to using the traditional FreeBSD package system, take note that the commands used to install and manage software differ slightly. For example, instead of using pkg_add to install a package from a remote repository, use pkg install or pc-pkg install (notice there is now a space instead of an underscore).

The FreeBSD Handbook provides an introduction to using pkgng. Section 5.5.1 is not needed on a PC-BSD® or TrueOS® system as the operating system installation does this for you. The various pkgng commands have associated man pages. Type man pkg for an overview of general usage; the names of the associated man pages will be found towards the bottom of this man page. Once you know the name of a command, you can also use the built-in help system to get more information about that command. For example, to learn more about pkg install, type pkg help install.


pc-metapkgmanager is the back-end command line utility used by the PC-BSD® installer, Package 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.

PC-BSD® uses pkgsets to determine which system components are available and which applications are installed with each system component. Currently, two pkgsets 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 TrueOS® server.

The pc-metapkgmanager command can be used to install or delete meta-packages or to change the default pkgset. If you type the command without any options, it will display its usage:

usage: pc-metapkgmanager [options]
add pkg1,pkg2 <loc>	 -- Add the specified list of meta-packages 
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
--pkgset <pkgset>	 -- Change default pkgset we are using

To determine which meta-packages are available:

pc-metapkgmanager list | more
Meta Package: Awesome
Description: A highly configurable, next generation framework window manager
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Awesome/pkg-icon.png
Parent: Unsupported-Desktops
Desktop: YES
Required Packages:
Meta Package: Compiz
Description: Compiz - OpenGL compositing manager
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Compiz/pkg-icon.png
Parent: Misc
Desktop: NO
Required Packages:
Meta Package: Desktops
Description: Supported Desktop Environments for your PC-BSD system. 
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Desktops/pkg-icon.png
Desktop: NO
--More--(byte 989)}}

To view which meta-packages are available in an alternate pkgset, specify the pkgset 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: Development 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.

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!
Other languages:German 19% • ‎English 100% • ‎French 10%
Personal tools