FreeBSD virtual environment management and repository

2020-10 upd: we reached the first fundraising goal and rented a server in Hetzner for development! Thank you for donating !

Attention! Current pages describe CBSD version 13.0.x. If you are using an older version, please update first.

Attention! I apologize for the automatic translation of this text. You can improve it by sending me a more correct version of the text or fix html pages via GITHUB repository.

Wirking with packages and pkg(7) in jail via CBSD

Command: pkg

			% cbsd pkg
		

Description:

cbsd pkg - is wrapper around stanart FreeBSD pkg(7) tools for adding jname argument for more convenient work with the jail from the master host

Via mode= argument indicating a needet action. Values can be:

  • add,install - to install packages
  • remove - to remove packages
  • bootstrap - init pkg (normally done in the jail one times on creating)
  • info, query - execute queries info or query with the same syntax pkg
  • update - execute pkg update
  • upgrade - execute upgrade

Keep in mind that must first be specified parameters mode and jname. All that comes after - not analyzed and treated pkg(7) as is.

In addition, please note that all operations are performed with the argument -y to suppress the interactivity that basically, you need to work in automated scripts.

Example1: Get installed packages frin jail1:

			% cbsd pkg mode=query jname=jail1 %o
		

Example2: Install bash, mc, wget in mytest1 jail:

			% cbsd pkg mode=install jname=mytest1 bash mc wget
		

or that much better (in order to avoid the same name in different categories) indicate origin package, not the name:

			% cbsd pkg mode=install jname=mytest1 shells/bash ftp/wget misc/mc
		

Example3: Upgrade mc package in jail1:

			% cbsd pkg mode=upgrade jname=jail1 mc
		

Example4: Upgrade all packages in jail1:

			% cbsd pkg mode=upgrade jname=jail1
		

Example5: Remove wget and lsof packages:

			% cbsd pkg mode=remove jname=jail1 wget lsof