Trying to upgrade 15>15.1 using packages

ufs root 15.0 installed used old method
followed this https://docs.freebsd.org/en/books/handbook/cutting-edge/#pkgbase
The pkgbasify tool complained about zstd out of date so I installed new on by choosing ignore mismatch.
I then continued the handbook
Code:
root@laptop-thinkpad:~ # cat /usr/local/etc/pkg/repos/FreeBSD-base.conf
FreeBSD-base {
    url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
    mirror_type = "srv";
    signature_type = "fingerprints";
    fingerprints = "/usr/share/keys/pkg";
    enabled = yes;
}

changed to

root@laptop-thinkpad:~ # cat /usr/local/etc/pkg/repos/FreeBSD-base.conf
FreeBSD-base {
    url = "pkg+https://pkg.freebsd.org/${ABI}/base_latest";
    mirror_type = "srv";
    signature_type = "fingerprints";
    fingerprints = "/usr/share/keys/pkg";
    enabled = yes;
}
then these worked:
pkg update -r FreeBSD-base
pkg upgrade -r FreeBSD-base

I went 15.0p10>15.0p11

I then tried https://www.freebsd.org/releases/15.1R/upgrading/#upgrade-pkg
Code:
root@laptop-thinkpad:~ # pkg -oABI=FreeBSD:15:amd64 -oOSVERSION=1501000 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01   
Fetching data: 100%    82 KiB  84.0 kB/s    00:01   
pkg: No trusted public keys found
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
pkg: Repository FreeBSD-base cannot be opened. 'pkg update' required
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

I tried again with
Code:
root@laptop-thinkpad:~ # cat /usr/local/etc/pkg/repos/FreeBSD-base.conf
FreeBSD-base {
    url = "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}";
    mirror_type = "srv";
    signature_type = "fingerprints";
    fingerprints = "/usr/share/keys/pkg";
    enabled = yes;
}

same result

HELP!
 
Code:
Looked at the pkg website and made a change:
root@laptop-thinkpad:~ # cat /usr/local/etc/pkg/repos/FreeBSD-base.conf

FreeBSD-base {
    url = "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_1";
    mirror_type = "srv";
    signature_type = "fingerprints";
    fingerprints = "/usr/share/keys/pkg";
    enabled = yes;
}

#pkg-static install -f pkg

( It says here I might want to remove /usr/local/etc/pkg.conf which has a lot of stuff)

still not working:
root@laptop-thinkpad:~ # pkg update -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01   
Fetching data: 100%    82 KiB  84.0 kB/s    00:01   
pkg: No trusted public keys found
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
 
Why do you have modified the url for fetching the base? Where, on the earth, have you read that?
base_latest is one of the STABLE versions...
Furthermore, you give a wrong path for getting the pkg key, hence this problem.

Just put in /usr/local/etc/pkg/repos/FreeBSD-base.conf:
FreeBSD-base: { enabled: yes }

All the rest is defined in the system pkg file /etc/pkg/FreeBSD.conf.

Then, redo the upgrade release instructions.
 
Why do you have modified the url for fetching the base? Where, on the earth, have you read that?
base_latest is one of the STABLE versions...
Furthermore, you give a wrong path for getting the pkg key, hence this problem.

Just put in /usr/local/etc/pkg/repos/FreeBSD-base.conf:
FreeBSD-base: { enabled: yes }

All the rest is defined in the system pkg file /etc/pkg/FreeBSD.conf.

Then, redo the upgrade release instructions.
That works... I remember the pkgbasify script created such a FreeBSD-base.conf
https://docs.freebsd.org/en/books/handbook/cutting-edge/#pkgbase is where I got the instructions to change it...
Continuing with https://www.freebsd.org/releases/15.1R/upgrading/#upgrade-pkg
 
Code:
root@laptop-thinkpad:~ # pkg upgrade -r FreeBSD-ports-kmods
Updating FreeBSD-ports-kmods repository catalogue...
pkg: Repository FreeBSD-ports-kmods has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01   
Fetching data: 100%    35 KiB  35.6 kB/s    00:01   
Processing entries: 100%
FreeBSD-ports-kmods repository update completed. 239 packages processed.
FreeBSD-ports-kmods is up to date.
Updating database digests format: 100%
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@laptop-thinkpad:~ # find /etc /usr/local/etc -name '*.pkgnew' -ls
root@laptop-thinkpad:~ # sysctl machdep.bootmethod
machdep.bootmethod: BIOS
root@laptop-thinkpad:~ # gpart show
=>        0  625142448  ada0  BSD  (298G)
          0  616562688     1  freebsd-ufs  (294G)
  616562688    8388608     2  freebsd-swap  (4.0G)
  624951296     191152        - free -  (93M)

root@laptop-thinkpad:~ # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
gpart: /dev/ada0a: Operation not permitted

Am I ok to reboot? or is there something I need to fix here?
 
PS: pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base WORKED upgraded like 328 packages to 15.1 and the check for unhappy packages came back with 0
 
Woe! Stop using gpart bootcode. If you had succeed with this command, you had destroyed your ufs partition.

I don't see a freebsd-boot partition. Where it is?
I Just would like to know where it is. Is there another disk on your machine?

Oh, I see... It's a MBR scheme? If yes, don't update any loader. Just reboot to complete the upgrade.
 
rebooted and all is well :)
g@laptop-thinkpad:~ $ uname -a
FreeBSD laptop-thinkpad 15.1-RELEASE-p1 FreeBSD 15.1-RELEASE-p1 releng/15.1-n283582-0f691888dc56 GENERIC amd64
Thank you!
going forward..... do I just run
Code:
# pkg update -r FreeBSD-base
# pkg upgrade -r FreeBSD-base
?
 
Code:
root@laptop-thinkpad:~ # pkg update -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
root@laptop-thinkpad:~ # pkg upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
 
What you tried is suited for 14 versions but not for 15. Because all is integrated in the pkg system configuration file. That what not the case in 14 where the use of pkgbase was a little more complicated.
It may deserve a bug, just to specify more often in the text, it's only for 14.
 
I wonder if this doc needs a tweak to discourage modifying /usr/local/etc/pkg/repos/FreeBSD-base.conf ?
In principle, there is no problem with using a second local pkg .conf, that is using both:
  1. /usr/local/etc/pkg/repos/FreeBSD.conf - for packages from the ports tree, when that is needed, for example for using latest instead of quarterly.
  2. /usr/local/etc/pkg/repos/FreeBSD-base.conf - for packages in a package based base-install.
Note: with the correct settings!
The mentioned use of /usr/local/etc/pkg/repos/FreeBSD-base.conf was done at a time that a packaged base (aka "pkgbase") was experimental*, that is for the 14 branch and probably comes from the Packaging FreeBSD base wiki. I'm not sure what the reasoning was why that was in a seperate pkg .conf. A correctly named and placed .conf will get parsed ( i.e. "picked up") and processed by pkg(8); see pkg.conf(5).

However, unless a user has a specific desire or need to have multiple user defined pkg .conf files, I suggest most users of a packaged base, should be quite well served with just one: /usr/local/etc/pkg/repos/FreeBSD.conf. Use pkg-repositories(8) ( or pkg -vv ) to see the result of how all pkg .conf files are parsed.

___
* that is no longer the case for the 15 branch.
 
Back
Top