Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
PKG.CONF(5)		  FreeBSD File Formats Manual		   PKG.CONF(5)

     pkg.conf -- System-wide configuration file	for pkg(1)

     pkg.conf is the system-wide configuration file used by the	pkg(1) tools.

     The default location of this file is /usr/local/etc/pkg.conf

     Lines in the file beginning with a	"#" are	comments and are ignored.

     The file is in UCL	format.	 For more information on the syntax of UCL,
     please visit the official UCL website -

     The following types of options are	recognized - boolean, string and list

     A boolean option is marked	as enabled if one of the following values is
     specified in the configuration file - YES,	TRUE and ON.

     The following options can be defined in pkg.conf:

     ASSUME_ALWAYS_YES:	boolean	 When this option is enabled pkg(1) will auto-
				 matically assume "yes"	to all questions which
				 require user confirmation before doing	any-
				 thing,	as if it the -y	flag was specified.
				 By default this option	is disabled.

     PUBKEY: string		 Specifies the location	to the public RSA key
				 used for signing the repository database.
				 The default value for this file is

     HANDLE_RC_SCRIPTS:	boolean	 This option when enabled will automatically
				 perform start/stop of services	during package
				 installation and deinstallation.  Services
				 are started on	installation only if they are
				 enabled in /etc/rc.conf.  By default this
				 option	is disabled.

     PACKAGESITE: string	 Specifies the URL of the remote location to
				 use when fetching the database	file and pack-
				 ages.	This supports using ${ABI} to create a
				 dynamic URL based on the ABI being used.

     MIRROR_TYPE: string	 Specifies which mirror	type to	use for
				 PACKAGESITE.  Either HTTP or SRV or NONE can
				 be used.  For a MIRROR_TYPE of	NONE, any of
				 the URL schemes supported by libfetch(3) can
				 be used, including: http://, https://,
				 ftp://, or file:// plus ssh://.  Where
				 MIRROR_TYPE is	SRV, you should	use a
				 pkg+http:// or	pkg+https:// (etc.) URL
				 scheme.  Using	http://	URLS implies that the
				 hostname part is a simple hostname according
				 to RFC	2616, and is deprecated. (deprecated)

     PKG_CACHEDIR: string	 Specifies the cache directory for packages.
				 The default value for this option is

     PKG_DBDIR:	string		 Specifies the directory to use	for storing
				 the package database files.  The default
				 value for this	option is /var/db/pkg

     PLIST_KEYWORDS_DIR: string	 < To be added >

     PORTSDIR: string		 Specifies the location	to the Ports direc-
				 tory.	The default value for this option is

     SYSLOG: boolean		 This option is	enabled	by default, log	all
				 the installation/deinstallation/upgrade oper-
				 ation via syslog(3)

     AUTODEPS: boolean		 Analyse the elf to add	dependencies (shared
				 libraries) that may have been forgotten by
				 the maintainer.  default: off

     ABI: string		 the abi of the	package	you want to install,
				 by default the	/bin/sh	abi is used

     DEVELOPER_MODE: boolean	 Makes certain errors immediately fatal.  Adds
				 various warnings and suggestions to the out-
				 put of	pkg(1) as an aide to port maintainers,
				 including indicating when the port might be
				 marked	as architecture	independent.  default:

     PERMISSIVE: boolean	 Ignore	conflicts while	registering a package,
				 note that the files conflicting will not be
				 marked	as owned by the	new package. (default:

     PORTAUDIT_SITE: string	 Specifies the remote location to use when
				 fetching the portaudit	database.  See
				 pkg-audit(8) for more information.

     DEBUG_SCRIPTS: boolean	 Activate debug	mode for scripts (aka set -x)

     REPO_AUTOUPDATE: boolean	 When true, automatically check	for and	down-
				 load updates to /var/db/pkg/repo.sqlite when
				 running one of: pkg upgrade, pkg fetch, pkg
				 install or pkg	version	-R.  (default: YES)

     PKG_ENV: Key/Value	list	 This tells pkg(8) to set key/values passed in
				 the environment.  Therefore underlying
				 libraries like	fetch(3) can be	configured
				 (e.g.,	setting	FTP_PROXY and HTTP_PROXY).
				 (default: empty)

     NAMESERVER: string		 Bypass	name resolution	forcing	a nameserver

     EVENT_PIPE: string		 Send all events to the	specified fifo or Unix
				 socket, events	will be	formatted in JSON.

     SSH_RESTRICT_DIR: string	 Directory where the ssh subsystem will	be
				 restricted to

     DISABLE_MTREE: boolean	 For experimental purposes only.  Not for use
				 on production systems.	 All this option does
				 is prevent processing of +MTREE data when
				 installing a package.	+MTREE files are a
				 legacy	feature	of the ports tree, which pro-
				 vide functionality necessary for
				 pkg-install(8)	as it cannot handle creating
				 arbitrary directory heirarcies	otherwise.
				 pkg(8)	can create such	directory structures
				 natively, but currently still uses the	+MTREE
				 data.	This option exists to facilitate
				 developing +MTREE free	package	sets.

     ALIAS: key/value list	 Define	local aliases for various pkg(8) stan-
				 dard command lines.  Whenever the key text
				 occurs	as a separate `action' word in a com-
				 mand line of the form pkg key ..., substitute
				 the value text	verbatim.  The replacement can
				 consist of any	sequence of text, which	should
				 form a	syntactically correct pkg(8) command
				 line when substituted in and followed by any
				 remaining tokens from the original command

     To	use multiple repositories, specify the primary repository as shown
     above.  Further repositores can be	configured using repository files.

     Repository	files reside in	/etc/pkg/ and /usr/local/etc/pkg/repos/.

     Filenames are arbitrary, but should end in	`.conf'	For example

     A repository file is in UCL format	and has	the following form (see	above
     for the description of most options):


	      URL: string	   PACKAGESITE for this	repository only.

	      ENABLED: boolean	   The repository will be used only if this
				   option is enabled. (default:	YES)

	      MIRROR_TYPE: string  MIRROR_TYPE for this	repository only.
				   (default: NONE)

	      SIGNATURE_TYPE: string
				   Specifies what type of signature this
				   repository uses.  Can be either NONE,
				   SIGNATURE_TYPE is NONE, then	no signature
				   checking will be done on the	repository.
				   When	SIGNATURE_TYPE is PUBKEY, then the
				   PUBKEY option will be used for signature
				   verification.  When SIGNATURE_TYPE is
				   FINGERPRINTS, then the FINGERPRINTS option
				   will	be used	for signature verification.
				   (default: NONE)

	      PUBKEY: string	   PUBKEY for this repository only. (default:
				   NONE) (deprecated)

	      FINGERPRINTS: string
				   This	should be set to a path	containing
				   known signatures for	the repository.	 I.e.,
				   if FINGERPRINTS is set to
				   then	the directories
				   should exist	with known good	and bad	fin-
				   gerprints, respectively.  Files in those
				   directories should be in the	format:

					 function: sha256
					 fingerprint: sha256_representation_of_the_public_key

     Note that myrepo could be any string.  However no two repositories	may
     share the same name.  It is possible to specify more than one repository
     per file.

     An	environment variable with the same name	as the option in the configu-
     ration file always	overrides the value of an option set in	the file.

     Repository	configuration file:

	   FreeBSD: {
	       url: "pkg+${ABI}/latest",
	       enabled:	true,
	       signature_type: "fingerprints",
	       fingerprints: "/usr/share/keys/pkg",
	       mirror_type: "srv"
     Example for pkg.conf

	   pkg_dbdir: "/var/db/pkg"
	   pkg_cachedir: "/var/cache/pkg"
	   portsdir: "/usr/ports"
	   handle_rc_cripts: false
	   assume_always_yes: false
	   repos_dir: [
	   syslog: true
	   autodeps: true
	   developer_mode: false
	   pkg_env: {
	       http_proxy: "http://myproxy:3128",
	   alias: {
	       origin: "info -qo",
	       nonauto:	"query -e '%a == 0' '%n-%v'"

     fetch(3), pkg(8), pkg-add(8), pkg-annotate(8), pkg-audit(8),
     pkg-autoremove(8),	pkg-backup(8), pkg-check(8), pkg-clean(8),
     pkg-config(8), pkg-convert(8), pkg-create(8), pkg-delete(8),
     pkg-fetch(8), pkg-info(8),	pkg-install(8),	pkg-lock(8), pkg-query(8),
     pkg-register(8), pkg-repo(8), pkg-rquery(8), pkg-search(8), pkg-set(8),
     pkg-shell(8), pkg-shlib(8), pkg-stats(8), pkg-update(8), pkg-updating(8),
     pkg-upgrade(8), pkg-version(8), pkg-which(8)

FreeBSD	9.2		       December	15, 2013		   FreeBSD 9.2


Want to link to this manual page? Use this URL:

home | help