Solved Can't upgrade 15.0 > 15.1 - "pkg: Repository FreeBSD-base has a wrong packagesite..."

I've searched online and this specific forum for clues, but I didn't find anything that might help me. I'm trying to upgrade to 15.1-RELEASE-p6, and I'm following https://www.freebsd.org/releases/15.1R/upgrading/#upgrade-pkg .

Here's where I'm stuck:

# freebsd-version -kru
15.0-RELEASE-p5
15.0-RELEASE-p5
15.0-RELEASE-p5

# pkg 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% 81 KiB 82.6 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.

Suggestions?

Thank you
Ed
 
Give the result of: pkg repos
Thank you, here are the results:

# pkg repos
FreeBSD-ports: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:15: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:15:amd64/kmods_quarterly_0",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
FreeBSD-base: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
FreeBSD-kmods: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/kmods_latest_0",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
FreeBSD: {
url : "http://pkg0.son.freebsd.org/FreeBSD:15:amd64/quarterly",
enabled : yes,
priority : 0,
signature_type : "NONE"
}


Ed
 
FreeBSD: {
url : "http://pkg0.son.freebsd.org/FreeBSD:15:amd64/quarterly",
enabled : yes,
priority : 0,
signature_type : "NONE"
}
You have an extra repository ("ports" repo named so in the 14 FreeBSD versions). You should remove it.
List the content of files you have in /usr/local/etc/pkg/repos/.

FreeBSD-base: {
url : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_release_0",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
Your FreeBSD-base repo fingerprints path is wrong. Should be /usr/share/keys/pkgbase-15.
List the content of /etc/pkg/FreeBSD.conf. Normally, it must remain untouched, just to verify.
 
There is no update to 15.0, so nothing wrong here. The instruction are:
pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
 
There is no update to 15.0, so nothing wrong here. The instruction are:
pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
Get the updates for 15.0 is the preamble before actually upgrading. See the upgrading instructions (link in post #1).

Whether you are up-to-date or not, you shouldn't have the error he gets.
 
Thank you all!

I don't have access to this server until Monday, so I'll try it then and see how I do.

Have a great weekend!

Ed
 
You have an extra repository ("ports" repo named so in the 14 FreeBSD versions). You should remove it.
List the content of files you have in /usr/local/etc/pkg/repos/.


Your FreeBSD-base repo fingerprints path is wrong. Should be /usr/share/keys/pkgbase-15.
List the content of /etc/pkg/FreeBSD.conf. Normally, it must remain untouched, just to verify.
1.) I can't find the file that has the extra ports repo you're referring to to remove it as you suggested.

2.) I edited the /usr/local/etc/pkg/repos/FreeBSD-base.conf and changed the fingerprints path as you suggested.

3.)
cat /etc/pkg/FreeBSD.conf
#
# To disable a repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file, e.g.:
#
# mkdir -p /usr/local/etc/pkg/repos
# echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
# echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf
#
# Note that the FreeBSD-base repository is disabled by default.
#

FreeBSD-ports: {
url: "pkg+https://pkg.freebsd.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD-ports-kmods: {
url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD-base: {
url: "pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
enabled: yes
}


Thank you for your help!

Ed
 
rm -rf /usr/local/etc/pkg/repos/*
echo "FreeBSD-base: { enabled: yes }" > /usr/local/etc/pkg/repos/FreeBSD-base.conf
 
You don't need to define the fingerprints path since it is correct (or should be, your answer is confuse) in /etc/pkg/FreeBSD.conf.

In your case, in /usr/local/etc/pkg/repos/FreeBSD-base.conf, you only need:
Code:
FreeBSD-base: { enabled: yes }

You have to understand that the files you put in /usr/local/etc/pkg/repos/ just override the variables you already have in /etc/pkg/FreeBSD.conf.

There is a "FreeBSD" repo declared somewhere, I warmly recomand to find and delete it.

Also, you must not touch the content of /etc/pkg/FreeBSD.conf. If you did, get a pristine conf file and replace it.
 
Good news! The suggestion above by SirDice solved my problems and I was able to easily upgrade! Thank you Emrion as well for all of your help!

# freebsd-version -kru
15.1-RELEASE-p6
15.1-RELEASE-p6
15.1-RELEASE-p6

Ed
 
Back
Top