Difference between revisions of "Pkgng and pc-metapkgmanager/9.2"

From PC-BSD Wiki
Jump to: navigation, search
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude><translate>
 
<noinclude><translate>
  
{{NavHeader|back=PBI Manager|forward=pc-updatemanager}}</noinclude>
+
<!--T:33-->
 +
{{UseTOC{{putVers}}|Nav}}</noinclude>
  
 
<!--T:2-->
 
<!--T:2-->
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.
+
PC-BSD® 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.
  
 
<!--T:5-->
 
<!--T:5-->
Line 10: Line 11:
  
 
<!--T:25-->
 
<!--T:25-->
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 [http://aria2.sourceforge.net/ aria2] downloader utility, which can significantly reduce download speeds over a slow link.
+
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 {{citelink|url=http://aria2.sourceforge.net/|txt=aria2}} downloader utility, which can significantly reduce download speeds over a slow link.
  
 
<!--T:7-->
 
<!--T:7-->
 
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).   
 
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 [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html 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'''.
+
<!--T:34-->
 +
The {{citelink|fbsdh|url=pkgng-intro.html|txt=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=== <!--T:26-->
 
===pc-metapkgmanager=== <!--T:26-->
Line 21: Line 23:
 
<!--T:27-->
 
<!--T:27-->
 
'''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-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.
 
<!--T:28-->
 
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.
 
  
 
<!--T:29-->
 
<!--T:29-->
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:
+
The '''pc-metapkgmanager''' command can be used to install or delete meta-packages. If you type the command without any options, it will display its usage:
  
 
<!--T:30-->
 
<!--T:30-->
'''pc-metapkgmanager'''
+
{{txtbox|box='''pc-metapkgmanager'''
usage: pc-metapkgmanager [options]
+
usage: pc-metapkgmanager [options]
Options:
+
Options:
add pkg1,pkg2 <loc> -- Add the specified list of meta-packages  
+
add pkg1,pkg2 <loc> -- Add the specified list of meta-packages  
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{{nbsp|2}}
--pkgset <pkgset> -- Change default pkgset we are using
+
--pkgset <pkgset> -- Change default pkgset we are using}}
  
 
<!--T:31-->
 
<!--T:31-->
Line 42: Line 41:
  
 
<!--T:32-->
 
<!--T:32-->
'''pc-metapkgmanager list {{pipe}} more'''
+
{{txtbox|box='''pc-metapkgmanager list {{pipe}} more'''
Meta Package: Awesome
+
Meta Package: Awesome
-------------------------------------
+
<nowiki>-------------------------------------
Description: A highly configurable, next generation framework window manager
+
Description: A highly configurable, next generation framework window manager
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Awesome/pkg-icon.png
+
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Awesome/pkg-icon.png
Parent: Unsupported-Desktops
+
Parent: Unsupported-Desktops
Desktop: YES
+
Desktop: YES
Required Packages:
+
Required Packages:
pcbsd-meta-awesome
+
pcbsd-meta-awesome
Meta Package: Compiz
+
Meta Package: Compiz
-------------------------------------
+
-------------------------------------
Description: Compiz - OpenGL compositing manager
+
Description: Compiz - OpenGL compositing manager
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Compiz/pkg-icon.png
+
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Compiz/pkg-icon.png
Parent: Misc
+
Parent: Misc
Desktop: NO
+
Desktop: NO
Required Packages:
+
Required Packages:
pcbsd-meta-compiz
+
pcbsd-meta-compiz
Meta Package: Desktops
+
Meta Package: Desktops
-------------------------------------
+
-------------------------------------</nowiki>
Description: Supported Desktop Environments for your PC-BSD system.  
+
Description: Supported Desktop Environments for your PC-BSD system.  
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Desktops/pkg-icon.png
+
Icon: /usr/local/share/pcbsd/metaset/pcbsd/Desktops/pkg-icon.png
Desktop: NO
+
Desktop: NO
--More--(byte 989)}}
+
--More--(byte 989)}}
 
+
<!--T:11-->
+
To change the default pkgset, modify the ''PCBSD_METAPKGSET'' variable in ''/usr/local/etc/pcbsd.conf''.
+
  
 
<!--T:12-->
 
<!--T:12-->
Line 74: Line 70:
 
<!--T:13-->
 
<!--T:13-->
 
{{txtbox|box='''pc-metapkgmanager status Awesome'''
 
{{txtbox|box='''pc-metapkgmanager status Awesome'''
The meta-pkg Awesome is not installed}}
+
The meta-pkg Awesome is not installed{{nbsp|39}}}}
  
 
<!--T:14-->
 
<!--T:14-->
Line 83: Line 79:
  
 
<!--T:16-->
 
<!--T:16-->
'''pc-metapkgmanager add Awesome'''  
+
{{txtbox|box='''pc-metapkgmanager add Awesome'''  
   
+
Pending Meta-Package changes: 1
 +
Installing Meta-Package: Awesome (pcbsd-meta-awesome)
 +
Updating repository catalogue
 +
/usr/local/tmp/All/pcbsd-meta-awesome-13661335
 +
100% of 2860 B  18 kBps 00m01s
 +
Updating repository catalogue
 +
Resuming download of: /usr/local/tmp/All/pcbsd-meta-awesome-1366133527.txz{{nbsp|2}}
 +
The following 1 packages will be installed:
 +
{{nbsp}}      Installing pcbsd-meta-awesome: 1366133527
 +
0 B to be downloaded
 +
Checking integrity... done
 +
[1/1] Installing pcbsd-meta-awesome-1366133527... done
 +
Cleaning up cache files..Done
 +
The meta-pkg Awesome is installed
 +
Extracting ports overlay data...DONE
 +
Finished Meta-Package: Awesome
 +
Meta-Package changes finished!}}
  
 
<!--T:17-->
 
<!--T:17-->
Line 93: Line 105:
 
Pending Meta-Package changes: 1
 
Pending Meta-Package changes: 1
 
Removing Meta-Package: Awesome
 
Removing Meta-Package: Awesome
Getting package list...
+
Removing: pcbsd-meta-awesome
Pending package changes: 66
+
The meta-pkg Awesome is not installed{{nbsp|39}}
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!}}
 
Meta-Package changes finished!}}
  
 +
<!--T:35-->
 
<noinclude>
 
<noinclude>
<!-- {{refheading}} --><!-- uncomment when citelink is used on this page -->
+
{{refheading}}
 
[[category:Using pkgng]]
 
[[category:Using pkgng]]
 
[[category:Installing Applications and Keeping PC-BSD® Updated]]
 
[[category:Installing Applications and Keeping PC-BSD® Updated]]

Latest revision as of 00:33, 16 December 2013


Contents


PC-BSD® 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[1] 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[2] 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.

[edit] pc-metapkgmanager

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.

The pc-metapkgmanager command can be used to install or delete meta-packages. 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 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: pcbsd-meta-awesome 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: pcbsd-meta-compiz 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 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 Installing Meta-Package: Awesome (pcbsd-meta-awesome) Updating repository catalogue /usr/local/tmp/All/pcbsd-meta-awesome-13661335 100% of 2860 B 18 kBps 00m01s Updating repository catalogue Resuming download of: /usr/local/tmp/All/pcbsd-meta-awesome-1366133527.txz   The following 1 packages will be installed:   Installing pcbsd-meta-awesome: 1366133527 0 B to be downloaded Checking integrity... done [1/1] Installing pcbsd-meta-awesome-1366133527... done Cleaning up cache files..Done The meta-pkg Awesome is installed Extracting ports overlay data...DONE 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 Removing: pcbsd-meta-awesome The meta-pkg Awesome is not installed                                       

Meta-Package changes finished!


References


  1. http://aria2.sourceforge.net/
  2. http://www.freebsd.org/doc/en/books/handbook/pkgng-intro.html
Other languages:German 19% • ‎English 100% • ‎French 10%