upgrade userland 15.0 to 15.1 with pkgbase

I have:
Code:
# freebsd-version -kru
15.1-STABLE
15.1-STABLE
15.0-BETA1
# uname -a
FreeBSD thinkpad 15.1-STABLE FreeBSD 15.1-STABLE stable/15-n285415-9df7eede349c GENERIC amd64

Nothing happens when I try:
Code:
# pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 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 (296 candidates): 100%
Processing candidates (296 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

I still have the old packages:
Code:
# pkg info FreeBSD-*
FreeBSD-acct-15.0.b1.20251011075131
FreeBSD-acpi-15.0.b1.20251011075131
FreeBSD-apm-15.0.b1.20251011075131
FreeBSD-at-15.0.b1.20251011075131
FreeBSD-atf-15.0.b1.20251011075131
FreeBSD-atf-dev-15.0.b1.20251011075131
FreeBSD-atf-lib-15.0.b1.20251011075131
FreeBSD-audit-15.0.b1.20251011075131
...

How do I get newer base packages?
 
Not sure if that's the cause for needing the -f option, but 15.1-STABLE is "OSVERSION=1501502" , not "OSVERSION=1501000" (Bump __FreeBSD_version to 1501502).
# pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
After upgrade, uname -KU should show bumped stable/15 kernel and userland versions.

Also, what does pkg repos show? "FreeBSD-base: { url: .../base_*" is what interests us. For stable/15 it should be "base_latest".
 
Ok, I have to use the -f switch for pkg upgrade, but why?
Because as strange as it may appear (and strange it is), going from RELEASE to STABLE is a downgrade from pkg point of view. I guess it's the same for a BETA version. Reference: https://github.com/freebsd/pkg/issues/2703

What I wondering is how you come to a 15.0 userland with a 15.1-STABLE kernel.

As T-Daemon said, check your base repo, but not only. Check also the content of any file in /usr/local/etc/pkg/repos (you should have at least one that enable the base repo).

It is also worth checking all the repositories listed by pkg repos.
 
I did several pkg upgrade and now have
Code:
# uname -KU
1501502 1501502

# 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
}

# pkg repos
FreeBSD-ports: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
    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_latest",
    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_latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
 
At first glance, that seems ok. What is the content of /etc/pkg/FreeBSD.conf?
Your /usr/local/etc/pkg/repos/FreeBSD-base.conf is partially redondant, I think.
 
/etc/pkg/FreeBSD.conf has all of pkg repos, so yes the other file seems redundant ...

Code:
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}
 
EDIT: looks like you're good with /etc/pkg/FreeBSD.conf; just missed your message #7 while editing.

Check your /etc/pkg/FreeBSD.conf (src: src/tree/usr.sbin/pkg/FreeBSD.conf.latest - stable/15), it should be:
Code:
#
# 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}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}

While a separate /usr/local/etc/pkg/repos/FreeBSD-base.conf* is perfectly legal, unless you have specific reasons for this separate .conf file, I suggest you consider to just use /usr/local/etc/pkg/repos/FreeBSD.conf for your local settings. Given the above /etc/pkg/FreeBSD.conf, the absolute minimum /usr/local/etc/pkg/repos/FreeBSD.conf is like**:
Code:
FreeBSD-base: {
  enabled: yes
}

___
* /usr/local/etc/pkg/repos/FreeBSD-base.conf was explicitly introduced in the 14 branch when pkgbase was still experimental.
** Personally, I find it clearer and easier to understand the current settings when I can see the url explicitly as this can have several variations:
Code:
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest",
  enabled: yes
}
The same applies if I might consider at some time switching to quarterly instead of latest for the ports tree packages.
 
So, in your /usr/local/etc/pkg/repos/FreeBSD-base.conf, you only need:
Code:
FreeBSD-base { enabled: yes }
It's not just a simplification. If you change the branch (RELEASE, RC or whatever) by upgrade, you will always stuck to STABLE versions. As a result, you would get some troubles, possibly.

/usr/local/etc/pkg/repos/FreeBSD-base.conf takes precedence over /etc/FreeBSD.conf.
 
Personally, I find it clearer and easier to understand the current settings when I can see the url explicitly as this can have several variations:
FreeBSD-base: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_latest", enabled: yes }The same applies if I might consider at some time switching to quarterly instead of latest for the ports tree packages.
The /etc/pkg/FreeBSD.conf is changed depending of what you choose for an upgrade. It's not a good idea of modifying the url in the user .conf, except for a RELEASE version when you want to move from quarterly to latest repos.

And even, if you move from a RELEASE to a STABLE version, you have to delete these URL for otherwise, they will be used instead of latest and kmods_latest legitimate repos.

I learned that writing pkgb-update tool.
 
Back
Top