pkgbasify system failed to fetch

I have a VM with 14.3-RELEASE-p7, and thought I'd try to use pkgbasify with it. I followed the handbook instructions of making a bectl image called 15.0, then mounting it at /mnt/upgrade. In the past I'd had problems with it being unable to find keys but had found the solution when SirDice pointed me to https://www.freebsd.org/releases/15.0R/relnotes/#upgrade-rc, release notes which gave me the solution to get the right key urls. However, this time, it seems the base urls are off.
My /usr/local/etc/pkg/repos/FreeBSD-base.conf reads
FreeBSD-base: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_3", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes } (I haven't yet fixed the pkg keys line to see if that was still an issue)
This is what pkgbasify created. So, I tried copying from a machine where I did a successful upgrade. This shows base_release_0 rather than base_release_3.
But even when I do that, when I run, as instructed by the handbook
Code:
env ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base
I get
pkg-static: Repository FreeBSD-base has a wrong packagesite, need to re-create database pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf: Not found pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz: Not found pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg: Not found pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst: Not found pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg: Not found pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst: Not found Unable to update repository FreeBSD-base Error updating repositories!

Per the handbook's instructions I have already locked pkg in the chroot environment. It does running pkg bootstrap -f is recommended, but I remember from my previous update that worked (in that case, the problem was the keys directory) I didn't do that and had no problems. I'm not sure what I've missed here.
This is a VM and just for experimenting, but I'd like to know what I did wrong.
Per the release information page I did
Code:
cp /usr/src/usr.sbin/pkg/FreeBSD.conf.quarterly-release \
       /etc/pkg/FreeBSD.conf
 
Right, I think that what happens is that pkgbasify kept the 14.3 3, but then, when I try to modify FreeBSD-base.conf to release_0 I still get the error that it's looking for release_3 and I'm not sure what else to change if making FreeBSD-base.conf point to release_0 isn't having an effect.
 
when I try to modify FreeBSD-base.conf to release_0 I still get the error that it's looking for release_3 and I'm not sure what else to change if making FreeBSD-base.conf point to release_0 isn't having an effect.
It must pick up that setting "release_3" from somewhere. Can you post the output of:
env DEBUG_LEVEL=2 ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base

This will indicate what config files are being parsed by pkg.
 
env DEBUG_LEVEL=2 ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base
pkg-static: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
DBG(1)[764]> (config) loading repositories in /etc/pkg/
DBG(1)[764]> (config) loading /etc/pkg//FreeBSD.conf
DBG(1)[764]> (config) parsing key 'FreeBSD'
DBG(1)[764]> (config) parsing repository object FreeBSD
DBG(1)[764]> (config) parsing key 'FreeBSD-kmods'
DBG(1)[764]> (config) parsing repository object FreeBSD-kmods
DBG(1)[764]> (config) loading repositories in /usr/local/etc/pkg/repos/
DBG(1)[764]> (config) loading /usr/local/etc/pkg/repos//FreeBSD-base.conf
DBG(1)[764]> (config) parsing key 'FreeBSD-base'
DBG(1)[764]> (config) parsing repository object FreeBSD-base
DBG(1)[764]> (config) loading /usr/local/etc/pkg/repos//FreeBSD.conf
DBG(1)[764]> (config) parsing key 'FreeBSD'
DBG(1)[764]> (config) overwriting repository FreeBSD
DBG(1)[764]> (config) parsing repository object FreeBSD
DBG(1)[764]> (config) parsing key 'FreeBSD-kmods'
DBG(1)[764]> (config) overwriting repository FreeBSD-kmods
DBG(1)[764]> (config) parsing repository object FreeBSD-kmods
pkg-static: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
Updating FreeBSD-base repository catalogue...
DBG(1)[764]> PkgRepo: verifying update for FreeBSD-base
pkg-static: Repository FreeBSD-base has a wrong packagesite, need to re-create database
DBG(1)[764]> PkgRepo: need forced update of FreeBSD-base
DBG(1)[764]> Pkgrepo, begin update of '/var/db/pkg/repos/FreeBSD-base/db'
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf: Not found
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz: Not found
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg: Not found
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst: Not found
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg: Not found
DBG(1)[764]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst
DBG(2)[764]> (fetch) curl_open
DBG(1)[764]> (fetch) Fetch: fetcher used: pkg+https
DBG(2)[764]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst

pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst: Not found
Unable to update repository FreeBSD-base
Error updating repositories!


/usr/local/etc/pkg/repos/FreeBSD-base.conf

FreeBSD-base: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_0",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
 
I have a VM with 14.3-RELEASE-p7, and thought I'd try to use pkgbasify with it. I followed the handbook instructions of making a bectl image called 15.0, then mounting it at /mnt/upgrade.
Just to get the context clear for my understanding, you are runing a pkgbasified 14.3-RELEASE and you're attempting to upgrade to a pkgbasified 15.0-RELEASE ?

Also, it looks ok (judging by the posted output), but can you post the contents of /usr/local/etc/pkg/repos/FreeBSD.conf

Edit:
If 15.0-RELEASE is indeed your intended target result, then let's see what's the output of:
env DEBUG_LEVEL=2 OSVERSION=1500068 ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base
 
Erichans yes, I have a 14.3 RELEASE-p7 on a vm that I want to upgrade, via pkgbase, to 15.0 I am doing it as suggested in the handbook, making a boot environment called 15.0-RELEASE, then mounting it on /mnt/upgrade.

The results of env DEBUG requested
env DEBUG_LEVEL=2 OSVERSION=1500068 ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base DBG(1)[769]> (config) loading repositories in /etc/pkg/ DBG(1)[769]> (config) loading /etc/pkg//FreeBSD.conf DBG(1)[769]> (config) parsing key 'FreeBSD' DBG(1)[769]> (config) parsing repository object FreeBSD DBG(1)[769]> (config) parsing key 'FreeBSD-kmods' DBG(1)[769]> (config) parsing repository object FreeBSD-kmods DBG(1)[769]> (config) loading repositories in /usr/local/etc/pkg/repos/ DBG(1)[769]> (config) loading /usr/local/etc/pkg/repos//FreeBSD-base.conf DBG(1)[769]> (config) parsing key 'FreeBSD-base' DBG(1)[769]> (config) parsing repository object FreeBSD-base DBG(1)[769]> (config) loading /usr/local/etc/pkg/repos//FreeBSD.conf DBG(1)[769]> (config) parsing key 'FreeBSD' DBG(1)[769]> (config) overwriting repository FreeBSD DBG(1)[769]> (config) parsing repository object FreeBSD DBG(1)[769]> (config) parsing key 'FreeBSD-kmods' DBG(1)[769]> (config) overwriting repository FreeBSD-kmods DBG(1)[769]> (config) parsing repository object FreeBSD-kmods pkg-static: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended Updating FreeBSD-base repository catalogue... DBG(1)[769]> PkgRepo: verifying update for FreeBSD-base pkg-static: Repository FreeBSD-base has a wrong packagesite, need to re-create database DBG(1)[769]> PkgRepo: need forced update of FreeBSD-base DBG(1)[769]> Pkgrepo, begin update of '/var/db/pkg/repos/FreeBSD-base/db' DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.conf: Not found DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/meta.txz: Not found DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg: Not found DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.tzst: Not found DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.pkg: Not found DBG(1)[769]> (fetch) Request to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst DBG(2)[769]> (fetch) curl_open DBG(1)[769]> (fetch) Fetch: fetcher used: pkg+https DBG(2)[769]> (fetch) curl> fetching https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/packagesite.tzst: Not found Unable to update repository FreeBSD-base Error updating repositories!

petan
pkg -vv | sed -n '/Repositories:/,$p' Repositories: FreeBSD-ports: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" } FreeBSD-ports-kmods: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" } FreeBSD-base: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/base_release_0", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkgbase-15" } FreeBSD: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/latest", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" } FreeBSD-kmods: { url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_latest_3", enabled : yes, priority : 0, mirror_type : "SRV", signature_type : "FINGERPRINTS", fingerprints : "/usr/share/keys/pkg" }

And I see from that that it's expanding ${ABI}/ to FreeBSD:14 in FreeBSD-base.conf. I'm guessing that the handbook's instructions of
Code:
env ABI=FreeBSD:15:amd64 pkg-static upgrade -r FreeBSD-base

Are supposed to expand it to 15.

My thanks to both of you for taking the time and energy to help.
 
Ok, that looks really helpful. I copied your FreeBSD-base.conf, and did your pkg add -f but still got the same error of
Code:
pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg: Not found

As well as a bunch of other failed to find base_release_3. I think I'm leaving it for tonight, I might just try with a fresh install tomorrow. Again my thanks to everyone helping
 
Ok, that looks really helpful. I copied your FreeBSD-base.conf, and did your pkg add -f but still got the same error of
Code:
pkg-static: Failed to fetch https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_release_3/data.pkg: Not found

As well as a bunch of other failed to find base_release_3. I think I'm leaving it for tonight, I might just try with a fresh install tomorrow. Again my thanks to everyone helping
It makes no sense why it's trying to access base_release_3. If you just could get it to fetch base_release_0, I think your fine. :)

Could it be defined in /etc/pkg/?
 
I'll have to check again today. Installing the original VM takes about 5 minutes, so I may start afresh. I agree, I don't know where I've erred to make it look for base_release_3.
 
Back
Top