Simple HTTP pkg Repository Config?

Hi,

I have read the pkg.conf man page, the Github readme, the wiki pages, and I just can't get this to work. I have created a location on an internal server with some packages and the repository files. I want to use that location as a repository with pkg. I have a fresh install of 10 RC1 running.
Code:
#cat /letc/pkg/repos/FreeBSD-Local.conf
FreeBSD-Local: {
  url: pkg+http://10.1.1.7/freebsd/arm/pkgs/releng/10.0/
}

Code:
# pkg update
Updating repository catalogue
pkg: http://pkg.FreeBSD.org/freebsd:10:armv6:32:el:eabi:softfp/latest/digests.txz: Not Found
pkg: Unable to find catalogs

I get the same result with both pkg+http and just http.

I want to disable the use of the default pkg site (because there are no ARM packages there), and enable the HTTP location instead. Why is this so difficult? Am I missing something?

Thanks.
 
Disable the official repo at /etc/pkg/FreeBSD.conf:

Code:
  enabled: no

Do not use pkg+http on your own repositories because that implies the use of SRV DNS records to find the mirrors, use only http.

Code:
url: http://10.1.1.7/freebsd/arm/pkgs/releng/10.0/

Can you access your repository with a web browser with the URL that uses only http? If you can not you have a misconfiguration somewhere, the web server or the URL address is wrong.
 
OK, I got somewhere by disabling the default FreeBSD repository in /etc/pkg: mv /etc/pkg/FreeBSD.conf /etc/pkg/FreeBSD.conf.old but why should I have to remove the default repository in order to have a second?
 
No need to remove the configuration file, just disable the repository in it. The idea is that you can use multiple repositories at the same time, that's why you are offered the possibility to have multiple repositories enabled.
 
One thing to check if you can access the repository with a web browser is that the URL should take you directly to a directory with these entries:

Code:
All/
Latest/
digests.txz
packagesite.txz
 
You also need to run pkg repo /where/my/packages/are to create the catalogue files.
 
Thanks everyone. There was no problem with my HTTP repository, I had already done all that stuff. It worked fine after I disabled the default repository.

But this still leaves me scratching my head.

kpa said:
No need to remove the configuration file, just disable the repository in it. The idea is that you can use multiple repositories at the same time, that's why you are offered the possibility to have multiple repositories enabled.

If I can use multiple repositories at the same time, then why do I have to disable the default one in order to add another? If there are no pkgs packages for my architecture in the default repository then should it not just fail over to the next one?
 
Back
Top