pkg: No HTTP mirrors founds for the repo

For a long time we've had a poudriere server building packages and happily pointing all hosts to the repo.

A few days ago, probably after upgrading to pkg 1.20, pkg output this on most operations:

pkg: No HTTP mirrors founds for the repo 'repo'

It doesn't seem to have any effect, but we have scripts that break because of this extra output.
I can get rid of this by setting in repos/repo.conf:

mirror_type: none

Information about mirror_type is fairly scarce in the documentation. Can someone tell me what mirror_type: http and mirror_type: none do? If I have only a single server hosting my local repo, am I safe in changing to mirror_type: none?
 
Code:
     For a MIRROR_TYPE of NONE, any of the URL schemes supported by
     libfetch(3) can be used, including: http://, https://, ftp://, or
     file://.  In addition a ssh:// URL scheme is also supported.  Where
     MIRROR_TYPE is SRV, you should use a pkg+http:// or pkg+https:// (etc.)
     URL scheme.  Using an http:// URL implies that the hostname part is a
     simple hostname according to RFC 2616, and is no longer accepted.
See pkg.conf(5)

The mirror_type should default to none, did something change?

Code:
	      MIRROR_TYPE: string  MIRROR_TYPE for this	repository only.  De-
				   fault: NONE.	 Any of	HTTP or	SRV or NONE.

Haven't updated mine to 1.20 yet I see. Wasn't planning on letting my build server run right now, it's already bloody hot inside, but I'll give it a push any way.
 
Code:
     For a MIRROR_TYPE of NONE, any of the URL schemes supported by
     libfetch(3) can be used, including: http://, https://, ftp://, or
     file://.  In addition a ssh:// URL scheme is also supported.  Where
     MIRROR_TYPE is SRV, you should use a pkg+http:// or pkg+https:// (etc.)
     URL scheme.  Using an http:// URL implies that the hostname part is a
     simple hostname according to RFC 2616, and is no longer accepted.
See pkg.conf(5)

The mirror_type should default to none, did something change?
Our ansible playbook set the mirror_type to http. I think it was a misunderstating on our parts, that since we were fetching the packages with http that the mirror_type should be set to http.

The man page doesn't say anything about what the different mirror types actually do. I have a rough understanding that SRV does a DNS query for the SRV record to find the best mirror, but I have no idea what http mirror_type does.
 
Right. I'm a little fuzzy on the details myself. But if I can't get a good enough clarification from the manual pages I just have a look at the source code. Most of the FreeBSD source codes are heavily commented and usually explain things in much greater detail.

In any case, yes, for a single HTTP(S) server you should really set mirror_type to none (or not set it all).
 
just another we too:
We had mirror_type: "http" in conf for private repo for many years (it was inherited from some online How To for Poudriere) but right after pkg was upgraded from pkg-1.19.2 to pkg-1.20.8 we start seeing the errors: "pkg: No HTTP mirrors founds for the repo"
Fixed by removing mirror_type line from the conf (because none is the default).
 
Back
Top