correcting pkg.conf file

I recently installed FreeBSD 9 in a VM, and I'm trying to install some packages, following the directions in the handbook. But I'm getting warnings.

Code:
root@freebsd9:~ # pkg install sudo
pkg: PACKAGESITE in pkg.conf is deprecated. Please create a repository configuration file
Updating repository catalogue
pkg: Warning: use of http:// URL scheme with SRV records is deprecated: switch to pkg+http://

I tried copying/usr/local/etc/pkg.conf.sample to pkg.conf, but that just made pkg stop working entirely.

Code:
root@freebsd9:~ # pkg install sudo
Updating repository catalogue
No valid repository found.

I'm running pkg 1.2.7_2, and I've run pkg2ng already. What should pkg.conf say to prevent these warnings?

My attempt to pkg install xorg fails with many errors like these:

Code:
pkg: WARNING: locally installed perl-5.14.4 conflicts on /usr/local/man/man1/shasum.1.gz with:
        - perl5-5.16.3_10

pkg: WARNING: locally installed perl-5.14.4 conflicts on /usr/local/man/man1/splain.1.gz with:
        - perl5-5.16.3_10

pkg: WARNING: locally installed perl-5.14.4 conflicts on /usr/local/man/man1/xsubpp.1.gz with:
        - perl5-5.16.3_10

Perhaps that's part of the same issue?
 
Don't use pkg.conf. Create a directory /usr/local/etc/pkg/repos, then create a file called myrepo.conf (or any other name, as long as it ends with .conf). Use something this to set up your own repo:
Code:
myrepo: {
 url: http://myrepo.example.com/packages/${ABI}/
 mirror_type: none
 enabled: yes
}
 
What should I put in place of myrepo.example.com?

I'm simply trying to get standard FreeBSD 9 packages installed, but it sounds like you're telling me I need to set up my own web site to serve as a private repository to do that? Or do you mean I should consult a list of FreeBSD repositories somewhere and pick one?

When you say don't use pkg.conf, are you saying I should delete it, or that I shouldn't modify it?
 
StevenD said:
When you say don't use pkg.conf, are you saying I should delete it, or that I shouldn't modify it?
If you want to use the default FreeBSD repository, just delete that file and ignore the warning about PACKAGESITE. And make sure the base OS is up to date, there's been an update specifically for pkg(8).
 
So if I use the default repo, there's no way to prevent the two warnings, one about PACKAGESITE and one about using http (as shown in my original post)?

What about that failure to install the xorg package? If the two warnings are normal, how do I get the package system to install that package?
 
I just deleted /usr/local/etc/pkg.conf as you suggested, and now pkg install xorg results in the error

Code:
Updating repository catalogue
No valid repository found.

Did you mean for me to delete some other file?
 
StevenD said:
So if I use the default repo, there's no way to prevent the two warnings, one about PACKAGESITE and one about using http (as shown in my original post)?
Don't set the PACKAGESITE variable as was common with the old package system. And make sure your base OS is up to date. Then the message should go away.

Your Xorg error message is because of /usr/ports/UPDATING entry 20140214:
Code:
20140214:
  AFFECTS: users of lang/perl5.12
  AUTHOR: mat@FreeBSD.org

  Perl 5.12 has been removed.  The default Perl is lang/perl5.16.

  pkg(8) users:
    1) Update the origin to point to 5.16:
       pkg set -o lang/perl5.12:lang/perl5.16

    2) Upgrade perl and all dependencies:
       pkg install -Rf lang/perl5.16

  Portupgrade users:
    0) Fix pkgdb.db (for safety):
       pkgdb -Ff

    1) Reinstall new version of Perl (5.16):
       portupgrade -o lang/perl5.16 -f lang/perl5.12

    2) Reinstall everything that depends on Perl:
       portupgrade -fr lang/perl5.16

  Portmaster users:
    portmaster -o lang/perl5.16 lang/perl5.12

    Conservative:
      portmaster p5-

    Comprehensive (but perhaps overkill):
      portmaster -r perl-

    Note: If the "perl-" glob matches more than one port specify the name of
      the Perl directory in /var/db/pkg explicitly.  Also, depending on when
      perl 5.12 was installed last, the prefix may be perl-, perl5- or
      perl5.12-.
In your case replace perl5.12 with perl5.14.
 
Back
Top