A never before used pkg on this install attempts to bootstrap pkg by pulling https://pkg.freebsd.org/FreeBSD:14:amd64/latest/Latest/pkg.txz but the file does not exist. For comparison, pkg.txz is present in the repo for FreeBSD 13 https://pkg.freebsd.org/FreeBSD:13:amd64/latest/Latest/ I noticed the fault after building podman images from https://github.com/dfr/freebsd-images and being unable to bootstrap pkg from and amd64 image. $ sudo podman run -it localhost/freebsd14.1-small sh # pkg bootstrap The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest, please wait... pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/Latest/pkg.txz: Address family for host not supported Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest. Consider changing PACKAGESITE. When viewing http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest/Latest/ in a web browser you can see that pkg.txz is missing.
When I visit http://pkg.freebsd.org/FreeBSD:14:amd64/latest/Latest, I do see pkg.txz so perhaps this is a problem with your local mirror?
Note that the pkg bootstrap first tries fetching pkg.pkg, falling back to pkg.txz if that is not successful. If all fail to fetch the URL from the last fetch attempt will be printed. I assume the same error "Address family for host not supported" occurred for both pkg.pkg and pkg.txz.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f5c847ae849aab9354d0956afd683f1c90bfd91e commit f5c847ae849aab9354d0956afd683f1c90bfd91e Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 15:11:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-07 16:01:36 +0000 pkg: prefer .pkg extension .pkg is the default extension as of commit c244b1d8a387, falling back to .txz if not found. PR: 281924 Reviewed by: bapt Fixes: a2aac2f5e564 ("pkg(7): when bootstrapping first search for pkg.bsd file then pkg.txz") Fixes: c244b1d8a387 ("pkg: settle the uniq extension to .pkg instead of .bsd") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46977 usr.sbin/pkg/pkg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
To be explicit - pkg tried to fetch both pkg.pkg and pkg.txz and both fetch attempts failed. The issue is not a missing pkg.txz. Two different approaches for improving the error message to help diagnose issues like this one: https://reviews.freebsd.org/D46983 https://reviews.freebsd.org/D46981
Created attachment 254076 [details] Screenshot of folder index
(In reply to Vincent Bentley from comment #5) Yes, pkg.txz is a red herring -- pkg.txz does not exist there, but it does not matter. The pkg bootstrap looks (first) for pkg.pkg, which exists.
Ah, perhaps the missing info is that pkg.pkg and pkg.txz are the same thing - the default package extension was changed, and for some time pkg was provided under both names, for backwards compatibility. In FreeBSD 14.0 and later pkg looks first for the new name, falling back to trying the old name if that is not found.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=be9243409d6be99f5d7815b6d074a85a6e84f7ce commit be9243409d6be99f5d7815b6d074a85a6e84f7ce Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 16:33:12 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-07 17:05:07 +0000 pkg: improve error message Print the complete list of url that have failed PR: 281924 Co-authored-by: Baptiste Daroussin <bapt@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D46983 usr.sbin/pkg/pkg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
(In reply to Ed Maste from comment #6) pkg.pkg is present on the mirror I have access to. I think my problem is actually networking. I can fetch the pkg.pkg file from my podman host but not from a podman image. The clue was both pkg.pkg and pkg.txz failing. I have tried using pkg from two separate podman hosts in separate locations but both had complex network configs with various combinations of wlan, lagg, vlan and bridges. I have probably messed something up with the PF NAT configs on each host for podman. I will build a specific test host for podman with a simple wired network config and try again.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=fef1f3fecd5b6e7bf040f6dd2e31177332c3c0ec commit fef1f3fecd5b6e7bf040f6dd2e31177332c3c0ec Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 15:11:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-11 15:27:41 +0000 pkg: prefer .pkg extension .pkg is the default extension as of commit c244b1d8a387, falling back to .txz if not found. PR: 281924 Reviewed by: bapt Fixes: a2aac2f5e564 ("pkg(7): when bootstrapping first search for pkg.bsd file then pkg.txz") Fixes: c244b1d8a387 ("pkg: settle the uniq extension to .pkg instead of .bsd") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46977 (cherry picked from commit f5c847ae849aab9354d0956afd683f1c90bfd91e) usr.sbin/pkg/pkg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2f29060f46138bbfc52c5944825293d598cc68de commit 2f29060f46138bbfc52c5944825293d598cc68de Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 16:33:12 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-11 15:27:42 +0000 pkg: improve error message Print the complete list of url that have failed PR: 281924 Co-authored-by: Baptiste Daroussin <bapt@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D46983 (cherry picked from commit be9243409d6be99f5d7815b6d074a85a6e84f7ce) usr.sbin/pkg/pkg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=40b58e3183ac23dbb14d1be2c35dcef7efb6111d commit 40b58e3183ac23dbb14d1be2c35dcef7efb6111d Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 16:33:12 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-11 16:17:56 +0000 pkg: improve error message Print the complete list of url that have failed PR: 281924 Co-authored-by: Baptiste Daroussin <bapt@FreeBSD.org> Differential Revision: https://reviews.freebsd.org/D46983 (cherry picked from commit be9243409d6be99f5d7815b6d074a85a6e84f7ce) (cherry picked from commit 2f29060f46138bbfc52c5944825293d598cc68de) usr.sbin/pkg/pkg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=911ebc3d8cb3907ec44a772aafe2310b3c8fe27c commit 911ebc3d8cb3907ec44a772aafe2310b3c8fe27c Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-10-07 15:11:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-11 16:17:40 +0000 pkg: prefer .pkg extension .pkg is the default extension as of commit c244b1d8a387, falling back to .txz if not found. PR: 281924 Reviewed by: bapt Fixes: a2aac2f5e564 ("pkg(7): when bootstrapping first search for pkg.bsd file then pkg.txz") Fixes: c244b1d8a387 ("pkg: settle the uniq extension to .pkg instead of .bsd") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46977 (cherry picked from commit f5c847ae849aab9354d0956afd683f1c90bfd91e) (cherry picked from commit fef1f3fecd5b6e7bf040f6dd2e31177332c3c0ec) usr.sbin/pkg/pkg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
^Triage: over to committer who resolved.