A mini-FAQ on pkg

Status
Not open for further replies.

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,409
Messages: 27,707

#51
That file already exists in /usr/local/etc/pkg. Will it append it with the one in repos?
Then you probably created it at some point in time. The file doesn't exist by default. Settings from /etc/pkg/FreeBSD.conf and /usr/local/etc/pkg/repos/FreeBSD.conf will be merged. Strictly speaking it's not the files that's merged but the name labels. The actual filename is irrelevant.
 

IT_Architect

Member

Thanks: 4
Messages: 87

#52
Then you probably created it at some point in time. The file doesn't exist by default. Settings from /etc/pkg/FreeBSD.conf and /usr/local/etc/pkg/repos/FreeBSD.conf will be merged. Strictly speaking it's not the files that's merged but the name labels. The actual filename is irrelevant.
Awesome!
PS: Actually, this is a fresh install of FreeBSD 11, so if it's not part of the base install, I don't know how it got there. The only things installed so far from packages are nano because the VM console is eating the <ctrl> character which is new, screen, and portupgrade. LOL! The content of the file is:
Code:
# $FreeBSD: releng/11.0/etc/pkg/FreeBSD.conf 303975 2016-08-11 23:39:23Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
Thanks TONS!!!
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,409
Messages: 27,707

#53
That's the content of /etc/pkg/FreeBSD.conf. This file does exist and contains the default settings. Don't edit this file, instead create a /usr/local/etc/pkg/repos/FreeBSD.conf and use it to overrule the default settings.
 

getopt

Aspiring Daemon

Thanks: 307
Messages: 520

#55
Actually, this is a fresh install of FreeBSD 11, so if it's not part of the base install, I don't know how it got there.
After fresh install there is even no /usr/local directory. When bootstrapping pkg the tree there is created along with the configuration files for pkg up to and including /usr/local/etc/pkg/repos/FreeBSD.conf.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,409
Messages: 27,707

#57
When bootstrapping pkg the tree there is created along with the configuration files for pkg up to and including /usr/local/etc/pkg/repos/FreeBSD.conf.
Unless something changed recently, installing ports-mgmt/pkg (or bootstrapping) only creates /usr/local/etc/pkg.conf. It does not create the pkg/repos/ directory.
 
Status
Not open for further replies.
Top