Possible solution to the drm-kmod kernel mismatch after upgrade from Bapt

Nice thread, it kind of shows the limits of freebsd-update(8).

I mean, it's really oversold as a 'smooth upgrade tool'. It works best on a bare-bones installation, where there are no kernel-dependent hardware drivers or other useful packages like www/firefox installed. Anything beyond a bare-bones installation - and using freebsd-update(8) means there's a risk of a train wreck that ultimately results in a need for a complete re-install of the entire system.

For a recent example of a horror story from using freebsd-update(8) blindly: Thread cant-compile-anything-anymore-since-upgrade.96060.
 
Nice thread, it kind of shows the limits of freebsd-update(8).

I mean, it's really oversold as a 'smooth upgrade tool'. It works best on a bare-bones installation, where there are no kernel-dependent hardware drivers or other useful packages like www/firefox installed. Anything beyond a bare-bones installation - and using freebsd-update(8) means there's a risk of a train wreck that ultimately results in a need for a complete re-install of the entire system.

For a recent example of a horror story from using freebsd-update(8) blindly: Thread cant-compile-anything-anymore-since-upgrade.96060.
Yes, I had to reinstall three time by starting with 14.0 - 14.1 - and finally upgrading 14.1 to 14.2!! And then upgrading all pkgs each time the base OS version was upgraded.
 
Yes, I had to reinstall three time by starting with 14.0 - 14.1 - and finally upgrading 14.1 to 14.2!! And then upgrading all pkgs each time the base OS version was upgraded.
Well, Linux suffers from the exact same problem. I moved to FreeBSD because it's well-documented, and doesn't try to pull the smoke-and-mirrors bullshit to the extent that Linux distro devs try to. With FreeBSD, I can at least play with Poudriere, and see what I can do to ameliorate the problem of upgrading... And in the process, I learned to live with the shortcomings, and enjoy the perks of FreeBSD...
 
Well, Linux suffers from the exact same problem. I moved to FreeBSD because it's well-documented, and doesn't try to pull the smoke-and-mirrors bullshit to the extent that Linux distro devs try to. With FreeBSD, I can at least play with Poudriere, and see what I can do to ameliorate the problem of upgrading... And in the process, I learned to live with the shortcomings, and enjoy the perks of FreeBSD...
Yes, I've been using FreeBSD since 4.9 version. And, YES - I've always been appreciative and honored by the BSD'rs who do for the rest of us by volunteering their expertise and openness to help others!!! Have a great family and fun filled Holiday Season - All
 
From CFT: repository for kernel modules
Rich (BB code):
From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Fri, 13 Dec 2024 08:09:22 UTC

Hello everyone,

In our current release model the binary packages are built on the lowest
supported version of a given branch. Which means when 14.2, the packages it is
using are built on 14.1 until 14.1's EOL which is march 31st.
   [...]
The goal of this change is that the kernel module for 14.2 is at a higher
version from the kernel module from 14.1 which means will force reinstalling
considering this is an upgrade.
The stated "force reinstalling" doesn't work for me.
A pkg upgrade or explicit pkg install drm-61-kmod don't have the desired effect.
However, after deleting drm-61-kmod, a fresh install does get the right version.
Note this was a seperate explicit install of drm-61-kmod on 14.1-RELEASE.

Can anyone confirm this?


On 14.1-RELEASE (latest patch) and "kmods" in FreeBSD.conf not enabled:
Code:
[1](0) ~ # pkg install drm-61-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1401000_3 [FreeBSD]

Number of packages to be installed: 1

The process will require 17 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing drm-61-kmod-6.1.92.1401000_3...
[1/1] Extracting drm-61-kmod-6.1.92.1401000_3: 100%
=====
Message from drm-61-kmod-6.1.92.1401000_3:

--
The drm-61-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled.

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"

Please ensure that all users requiring graphics are members of the
"video" group.

Please note that this package was built for FreeBSD 14.1.
If this is not your current running version, please rebuild
it from ports to prevent panics when loading the module.
[2](0) ~ # pkg info drm-61-kmod | grep version
        FreeBSD_version: 1401000
This version is for FreeBSD 14-STABLE 1400508
[3](0) ~ # pkg -vv | sed -n '/^Repositories:/,$ p'
Repositories:
  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_1",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[4](0) ~ #

Then, after freebsd-update -r 14.2-RELEASE upgrade and changing /usr/local/etc/pkg/repos/FreeBSD.conf:
Rich (BB code):
FreeBSD-kmods: {
       url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR},
       signature_type: "fingerprints",
       fingerprints: "/usr/share/keys/pkg",
       mirror_type: "srv",
       enabled: yes,


Code:
[0](0) ~ # freebsd-version -kru
14.2-RELEASE
14.2-RELEASE
14.2-RELEASE
[1](0) ~ # pkg info  drm-61-kmod | grep version
        FreeBSD_version: 1401000
This version is for FreeBSD 14-STABLE 1400508
[2](0) ~ # pkg -vv | sed -n '/^Repositories:/,$ p'
Repositories:
  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_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[3](0) ~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
[4](0) ~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (15 candidates): 100%
Processing candidates (15 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[5](0) ~ # pkg ins drm-61-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
[6](0) ~ # pkg del drm-61-kmod
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        drm-61-kmod: 6.1.92.1401000_3

Number of packages to be removed: 1

The operation will free 17 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling drm-61-kmod-6.1.92.1401000_3...
[1/1] Deleting files for drm-61-kmod-6.1.92.1401000_3: 100%
[7](0) ~ # pkg ins drm-61-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1402000_3 [FreeBSD-kmods]

Number of packages to be installed: 1

The process will require 17 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing drm-61-kmod-6.1.92.1402000_3...
[1/1] Extracting drm-61-kmod-6.1.92.1402000_3: 100%
=====
Message from drm-61-kmod-6.1.92.1402000_3:

--
The drm-61-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled.

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"

Please ensure that all users requiring graphics are members of the
"video" group.

Please note that this package was built for FreeBSD 14.2.
If this is not your current running version, please rebuild
it from ports to prevent panics when loading the module.
[8](0) ~ # pkg info  drm-61-kmod | grep version
        FreeBSD_version: 1402000
This version is for FreeBSD 14-STABLE 1400508

Adding a priority doesn't make a difference:
Code:
FreeBSD-kmods: {
        url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR},
        priority: 1,
        signature_type: "fingerprints",
        fingerprints: "/usr/share/keys/pkg",
        mirror_type: "srv",
        enabled: yes,
}
 
The stated "force reinstalling" doesn't work for me.
However, after deinstalling drm-61-kmod, a fresh install does get the right version.
Note this was a seperate explicit install of drm-61-kmod on 14.1-RELEASE.

Can anyone confirm this?
Not actually confirmed (I'm building almost all ports installed locally) the pkg operations, but now, on latest [aka main] branch of ports/pkgs, OSVERSION is included in version strings of kmod ports.
So possibly exactly same pkg could be reinstalled with -f option, with the existense of currently installed pkg, thus, deinstall and fresh install is needed.

This version is for FreeBSD 14-STABLE 1400508
There seems to be remaining some oddities.
1400508 is the OSVERSION for stable/14 prior to the branch of releng/14.1 (old).
For stable/14 after releng/14.1 branched and before releng/14.2 branched is 14015nn, and for stable/14 after releng/14.2 branched is 14025nn (at this momen I'm writing this post, it's at 1402501). The value of __FreeBSD_version here is indirectly used for OSVERSION of ports.
 
Ah, right!

Code:
New packages to be INSTALLED: drm-61-kmod: 6.1.92.1401000_3 [FreeBSD]
   [...]
New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1402000_3 [FreeBSD-kmods]

Then, it would seem there is some inconsitancy in how pkg-upgrade(8) handles version comparisons:
Code:
 # pkg version -t 6.1.92.1401000_3  6.1.92.1402000_3
<
versus
Code:
[1](0) /usr/local/etc/pkg/repos # pkg info drm-61-kmod | grep  Version
Version        : 6.1.92.1401000_3
[2](0) /usr/local/etc/pkg/repos # pkg -vv | sed -n '/^Repositories:/,$ p'
Repositories:
  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_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[3](0) /usr/local/etc/pkg/repos # pkg version -vRL=
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
[4](0) /usr/local/etc/pkg/repos #
 
Follow up on the previous message and #30

The issue with version comparison for drm-61-kmod with the new "kmods" repository may apply to:
  1. 14.2-RELEASE - pkg repository latest and quarterly
  2. 14-STABLE - pkg repository latest and quarterly
If someone could test and confirm; I have confirmed this on 14.2-RELEASE and pkg latest. As mentioned above adding a priority of 1 did not make a difference.

The series of commands below should be easy to test.

Since the version number extension kmod: append osversion to the portversion (Dec 10, 2024) seems to apply to all FreeBSD generated packages, it is unclear if this version comparison issue reaches beyond this drm-61-kmod example but, IMO this is probable, especially for the kernel modules where a special repository is created for as was announced on CFT: repository for kernel modules.
Rich (BB code):
[1](0) # uname -a
FreeBSD q210 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64
[2](0) # pkg -v
1.21.3
[3](0) # pkg info drm-61-kmod
pkg: No package(s) matching drm-61-kmod
[4](1) # cd /usr/local/etc/pkg/repos/
[5](0) # grep -v '^#' FreeBSD.conf

FreeBSD: {
        url: pkg+https://pkg.freebsd.org/${ABI}/latest,
}

FreeBSD-kmods: {
        enabled: no,
        url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR},
        signature_type: "fingerprints",
        fingerprints: "/usr/share/keys/pkg",
        mirror_type: "srv",
}
[6](0) # pkg -vv | sed -n '/^Repositories:/,$ p'      <-- start with scan for "kmods" repository disabled
Repositories:
  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_2",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[7](0) # pkg install drm-61-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1401000_3 [FreeBSD]

Number of packages to be installed: 1

The process will require 17 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing drm-61-kmod-6.1.92.1401000_3...
[1/1] Extracting drm-61-kmod-6.1.92.1401000_3: 100%
=====
Message from drm-61-kmod-6.1.92.1401000_3:

--
The drm-61-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled.

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"

Please ensure that all users requiring graphics are members of the
"video" group.

Please note that this package was built for FreeBSD 14.1.
If this is not your current running version, please rebuild
it from ports to prevent panics when loading the module.
[8](0) # pkg info drm-61-kmod | grep  Version        <-- the version specific to 14.1-RELEASE is installed
Version        : 6.1.92.1401000_3
[9](0) # sed -i.org '/FreeBSD-kmods:/,$ s/enabled:*.no,/enabled: yes,/' FreeBSD.conf   <-- a ".org" backup of the original FreeBSD.conf is made
[10](0) # pkg -vv | sed -n '/^Repositories:/,$ p'    <-- "kmods" repository is enabled
Repositories:
  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_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[11](0) # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
[12](0) # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (15 candidates): 100%
Processing candidates (15 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[13](0) # pkg version -vRL=                <-- attempts to recognise an upgrade fail
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
[14](0) # pkg delete drm-61-kmod        <-- delete the "14.1 version"
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        drm-61-kmod: 6.1.92.1401000_3

Number of packages to be removed: 1

The operation will free 17 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling drm-61-kmod-6.1.92.1401000_3...
[1/1] Deleting files for drm-61-kmod-6.1.92.1401000_3: 100%
[15](0) # pkg install drm-61-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1402000_3 [FreeBSD-kmods]

Number of packages to be installed: 1

The process will require 17 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing drm-61-kmod-6.1.92.1402000_3...
[1/1] Extracting drm-61-kmod-6.1.92.1402000_3: 100%
=====
Message from drm-61-kmod-6.1.92.1402000_3:

--
The drm-61-kmod port can be enabled for amdgpu (for AMD
GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel
APUs starting with HD3000 / Sandy Bridge) through kld_list in
/etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are
some positive reports if EFI boot is NOT enabled.

For amdgpu: kld_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"

Please ensure that all users requiring graphics are members of the
"video" group.

Please note that this package was built for FreeBSD 14.2.
If this is not your current running version, please rebuild
it from ports to prevent panics when loading the module.
[16](0) # pkg info drm-61-kmod | grep  Version    <-- drm-61-kmod version specific to 14.2-RELEASE is installed
Version        : 6.1.92.1402000_3
[17](0) # pkg version -t 6.1.92.1401000_3  6.1.92.1402000_3     <-- this shows how pkg-upgrade should compare version numbers
<
[18](0) #

You can return to the original version of FreeBSD.conf by rm FreeBSD.conf and mv FreeBSD.conf.org FreeBSD.conf

___
Edit: not using [11](0) # pkg update, but instead:
Rich (BB code):
[11](0) # pkg update -f
does not make a difference.
 
After adding and enabling the "kmods" by means of adding the aforementioned FreeBSD-kmods repository to /usr/local/etc/pkg/repos/FreeBSD.conf, it seems the following sequence of two commands* is a practicle work-around at the moment:
pkg upgrade -r FreeBSD
pkg upgrade -r FreeBSD-kmods
This should keep all packages for 14.2-RELEASE up-to-date. Most likely also for its recent -STABLE versions.

___
* According to pkg-upgrade(8) only one reponame can be specified:
Code:
SYNOPSIS
       pkg     upgrade       [-fInFqUy]      [-r    reponame]      [-Cgix]
       [<pkg-origin|pkg-name|pkg-name-version> ...]
   [...]

OPTIONS
       The following options are supported by pkg upgrade:
   [...]
       -r reponame, --repository reponame
           Install  packages from only the named repository, irrespec-
           tive    of the configured "enabled" status from    repo.conf.
It does not specify anything like [-r reponame [-r reponame ...]], although I admit I do not know if such an option specification in a SYNOPSIS exists.

However, using both repositories in one command may or may not work; I view this as undefined behaviour:
Rich (BB code):
[1](0) # pkg -vv | sed -n -e '/^Repositories:/,$ p'
Repositories:
  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_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[2](0) # pkg info drm-61-kmod | grep  Version
Version        : 6.1.92.1401000_3
[3](0) # pkg upgrade -r FreeBSD-kmods -r FreeBSD
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (9 candidates): 100%
Processing candidates (9 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[4](0) # pkg upgrade -r FreeBSD -r FreeBSD-kmods
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        drm-61-kmod: 6.1.92.1401000_3 -> 6.1.92.1402000_3 [FreeBSD-kmods]

Number of packages to be upgraded: 1

Proceed with this action? [y/N]: y
[1/1] Upgrading drm-61-kmod from 6.1.92.1401000_3 to 6.1.92.1402000_3...
[1/1] Extracting drm-61-kmod-6.1.92.1402000_3: 100%
[5](0) # pkg info drm-61-kmod | grep  Version
Version        : 6.1.92.1402000_3
[6](0) #
 
The above repo. has higher versions of all packages related to graphics/drm-kmod. This repo. has only these packages. I do pkg update first with original url: commenting the above url:. Then again do same updating with above url: commenting the original one. For every package upgrading, the same process need to be followed.
If you're tracking quarterly, replace kmods_latest_2 to kmods_quarterly_2.
 
The above repo. has higher versions of all packages related to graphics/drm-kmod. This repo. has only these packages. I do pkg update first with original url: commenting the above url:. Then again do same updating with above url: commenting the original one. For every package upgrading, the same process need to be followed.
What I suggested (just using two commands) intends to have the same effect for the upgrade of packages.

It has more packages than "only these" graphics kmods: also other "lonely" packages (i.e. without specific dependencies) with kernel modules are contained in the "kmods" repositories (see below, currently 43 packages, watch it grow :)), CFT: repository for kernel modules:
Code:
This has the advantage of allowing us to get kernel modules for every single
architecture we do support quickly, the drawback being kernel modules with build
and/or run dependency cannot be built (note that for run dependency I am working
on a workaround, stay tuned).

in order to discover quickly which ports should be built, the following is being
done:
> git grep "^USES.*kmod" and ls */*-kmod

Anything mathing with the above is listed as to be built.

Because of the way we are building and because we want to be able to ship
quickly updates on those kernel modules, there are other limitation which have
been added:

Only kernel modules without any build and run dependencies are being built,
which means most of them but not all.

By using the suggested two upgrade commands and settings (both the FreeBSD and the FreeBD-kmods repositories enabled), pkg-search(8) shows results spanning both repositories:
Rich (BB code):
[1](0) # pkg -vv | sed -n -e '/^Repositories:/,$ p'
Repositories:
  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_2",
    enabled         : yes,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[2](0) # pkg search intel-em-kmod
intel-em-kmod-7.7.8.1401000    Gigabit FreeBSD Base Drivers for Intel(R) Ethernet
intel-em-kmod-7.7.8.1402000    Gigabit FreeBSD Base Drivers for Intel(R) Ethernet
[3](0) # pkg search '\.1402' | wc -l
      43
[4](0) #
 
If you're tracking quarterly, replace kmods_latest_2 to kmods_quarterly_2.
Just to be clear: the output of pkg -vv is parsed.

The appropriate (=future proof) way to specify it in a .conf file (e.g. /usr/local/etc/pkg/repos/FreeBSD.conf like shown in message #34) is:
  • url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}, for the latest package repositories
  • url: pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly_${VERSION_MINOR}, for the quarterly package repositories
 
With the two upgrade commands, the new scheme also seems to work with a meta port like graphics/drm-kmod:
Rich (BB code):
[1](0) # pkg -vv | sed -n -e '/^Repositories:/,$ p'
Repositories:
  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_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[2](0) # pkg install drm-kmod
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 130 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        drm-61-kmod: 6.1.92.1401000_3 [FreeBSD]
        drm-kmod: 20220907_3 [FreeBSD]
        gpu-firmware-amd-kmod-aldebaran: 20230625.1401000_2 [FreeBSD]
   < snap >
Number of packages to be installed: 130

The process will require 123 MiB more space.

Proceed with this action? [y/N]: y
[1/130] Installing gpu-firmware-amd-kmod-psp-13-0-4-20230625.1401000_2...
   < snap >
[130/130] Extracting drm-kmod-20220907_3: 100%
=====
Message from drm-61-kmod-6.1.92.1401000_3:
   < snap >
[3](0) # pkg upgrade -r FreeBSD
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (9 candidates): 100%
Processing candidates (9 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[4](0) # pkg upgrade -r FreeBSD-kmods
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (4 candidates): 100%
Processing candidates (4 candidates): 100%
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        drm-61-kmod: 6.1.92.1401000_3 -> 6.1.92.1402000_3 [FreeBSD-kmods]
        gpu-firmware-amd-kmod-aldebaran: 20230625.1401000_2 -> 20230625.1402000_2 [FreeBSD-kmods]
        gpu-firmware-intel-kmod-skylake: 20230625.1401000 -> 20230625.1402000 [FreeBSD-kmods]
        gpu-firmware-radeon-kmod-aruba: 20220511.1401000 -> 20220511.1402000 [FreeBSD-kmods]

Number of packages to be upgraded: 4

Proceed with this action? [y/N]: y
[1/4] Upgrading gpu-firmware-radeon-kmod-aruba from 20220511.1401000 to 20220511.1402000...
[1/4] Extracting gpu-firmware-radeon-kmod-aruba-20220511.1402000: 100%
[2/4] Upgrading drm-61-kmod from 6.1.92.1401000_3 to 6.1.92.1402000_3...
[2/4] Extracting drm-61-kmod-6.1.92.1402000_3: 100%
[3/4] Upgrading gpu-firmware-amd-kmod-aldebaran from 20230625.1401000_2 to 20230625.1402000_2...
[3/4] Extracting gpu-firmware-amd-kmod-aldebaran-20230625.1402000_2: 100%
[4/4] Upgrading gpu-firmware-intel-kmod-skylake from 20230625.1401000 to 20230625.1402000...
[4/4] Extracting gpu-firmware-intel-kmod-skylake-20230625.1402000: 100%
[5](0) #
 
Back
Top