Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pkgprimer [2012/08/28 18:29] – bulk now keeps packages by default in poudriere 2.0 BryanDrewerypkgprimer [2017/08/23 13:17] (current) – Add to CategoryHowTo and fix a typo MateuszPiotrowski
Line 1: Line 1:
 ====== Pkg Primer ====== ====== Pkg Primer ======
 +
 +===== Switching to pkgng =====
 +
 +Please see [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html|Using pkgng for Binary Package Management]]
 +in the %%FreeBSD%% Handbook for information about changing a system to use pkgng.
 +
 +===== Charter and Roadmap =====
 +
 +see: [[pkgng/CharterAndRoadMap]]
  
 ===== Rosetta Stone ===== ===== Rosetta Stone =====
Line 6: Line 15:
 | get list of installed packages | //pkg_info// | //pkg info// | | get list of installed packages | //pkg_info// | //pkg info// |
 | get basic information about a package | //pkg_info pkgname-pkgversion// | //pkg info pkgname// OR //pkg info category/name// OR //pkg info pkgname-pkgversion// | | get basic information about a package | //pkg_info pkgname-pkgversion// | //pkg info pkgname// OR //pkg info category/name// OR //pkg info pkgname-pkgversion// |
-| get detailled information about a package | N/A | //pkg info -f pkgname// OR //pkg info -f category/name// OR //pkg info -f pkgname-pkgversion// |+| get detailed information about a package | N/A | //pkg info -f pkgname// OR //pkg info -f category/name// OR //pkg info -f pkgname-pkgversion// |
 | list all files contained in an installed package | //pkg_info -L pkgname-pkgversion// | //pkg info -l pkgname// OR //pkg info -l category/name// OR //pkg info -l pkgname-pkgversion// | | list all files contained in an installed package | //pkg_info -L pkgname-pkgversion// | //pkg info -l pkgname// OR //pkg info -l category/name// OR //pkg info -l pkgname-pkgversion// |
 | find which package provide an installed file | //pkg_info -W /path/to/my/file// | //pkg which /path/to/my/file// | | find which package provide an installed file | //pkg_info -W /path/to/my/file// | //pkg which /path/to/my/file// |
Line 12: Line 21:
 | install a remote package | //pkg_add -r mypackage// | //pkg install mypackage// OR //pkg install category/name// OR //pkg install pkgname-pkgversion// | | install a remote package | //pkg_add -r mypackage// | //pkg install mypackage// OR //pkg install category/name// OR //pkg install pkgname-pkgversion// |
 | search for a remote package | N/A | //pkg search mypackage// OR //pkg search category/name// OR //pkg search pkgname-pkgversion// | | search for a remote package | N/A | //pkg search mypackage// OR //pkg search category/name// OR //pkg search pkgname-pkgversion// |
-| search for detailled informations about a remote package | N/A | //pkg search -f mypackage// OR //pkg search -f category/name// OR //pkg search -f pkgname-pkgversion// |+| search for detailed informations about a remote package | N/A | //pkg search -f mypackage// OR //pkg search -f category/name// OR //pkg search -f pkgname-pkgversion// |
 | show reverse dependencies of an installed package | //pkg_info -R pkgname-pkgversion// | //pkg info -r mypackage// OR //pkg info -r category/name// OR //pkg info -r pkgname-pkgversion// | | show reverse dependencies of an installed package | //pkg_info -R pkgname-pkgversion// | //pkg info -r mypackage// OR //pkg info -r category/name// OR //pkg info -r pkgname-pkgversion// |
 | show dependencies of an installed package | //pkg_info -r pkgname-pkgversion// | //pkg info -d mypackage// OR //pkg info -d category/name// OR //pkg info -d pkgname-pkgversion// | | show dependencies of an installed package | //pkg_info -r pkgname-pkgversion// | //pkg info -d mypackage// OR //pkg info -d category/name// OR //pkg info -d pkgname-pkgversion// |
Line 29: Line 38:
 | show statistic about installed packages | N/A | //pkg stat// | | show statistic about installed packages | N/A | //pkg stat// |
 | checking for missing dependency (and try to fix them) | N/A | //pkg check -d// | | checking for missing dependency (and try to fix them) | N/A | //pkg check -d// |
 +| port origin | pkg_info -o | //pkg info -o//  |
  
 ===== Details ===== ===== Details =====
 +
 +==== Marking all packages but vim-lite and pkg as automatic ====
 +
 +<code>
 +pkg set -yA 1 `pkg query -e "%n != pkg && %n != vim-lite" %o`
 +</code>
 +
 +Now you can cleanup all the left crufts
 +
 +<code>
 +pkg autoremove
 +</code>
  
 ===== Building custom repositories ===== ===== Building custom repositories =====
Line 105: Line 127:
   * ${POUDRIERE_DATA}/packages/90amd64-default   * ${POUDRIERE_DATA}/packages/90amd64-default
  
-Configure you http server to those directories to be able to serve them.+Configure your http server to those directories to be able to serve them.
  
 On your user boxes: (if you use the automatic bootstrap it will take care of creating this file) On your user boxes: (if you use the automatic bootstrap it will take care of creating this file)
Line 119: Line 141:
 From 9.1 you can directly bootstrap from the base: From 9.1 you can directly bootstrap from the base:
  
-Before 9.1 you will need to boostrap by hand:+Before 9.1 you will need to bootstrap by hand:
  
 <code> <code>
Line 130: Line 152:
  
 <code> <code>
-poudriere ports -u # this update your default ports tree+poudriere ports -u # this updates your default ports tree
 poudriere bulk -f ~/mylist1 -j 90amd64 poudriere bulk -f ~/mylist1 -j 90amd64
 poudriere bulk -f ~/mylist2 -j 10i386 poudriere bulk -f ~/mylist2 -j 10i386
 </code> </code>
 +
 +==== Using portbuilder inside a jail ====
 +
 +When building 9-stable ports in a 9-stable jail under -current you might want to set the UNAME_r environment variable to fake the %%FreeBSD%% version in /path_to_my_jail/root/.cshrc . Some examples:
 +
 +  * setenv      UNAME_r 9-STABLE
 +  * setenv      UNAME_r 8-STABLE
 +  * setenv      UNAME_r 7-STABLE
 +
 +Else some ports won't build properly.
 +
 +----
 +
 +{{tag>HowTo}}
  
  • pkgprimer.1346178571.txt.gz
  • Last modified: 2012/08/28 18:29
  • by BryanDrewery