Removing /usr/src on pkgbase system

I am doing the unthinkable. I've had a source tree since the beginning. I plan to remove it and never use it again.

I noticed that the source is a package in my pkgbase system.

Code:
# pkg info | grep src
FreeBSD-set-src-15.snap20251011015136 System source code
FreeBSD-src-15.snap20260813004244 System userland source code
FreeBSD-src-sys-15.snap20260814160322 System kernel source code
[root@l1 /home/jcw]# pkg remove FreeBSD-set-src-15.snap20251011015136
Checking integrity... done (0 conflicting)
The following package(s) are locked or vital and may not be removed:

    FreeBSD-set-src (vital)

1 packages requested for removal: 1 locked, 0 missing

FreeBSD-set-src is the meta package for the other two listed above.

The source tree doesn't want to go. pkg-remove reports this scary word "vital" but the source tree has never been vital. Is there something special I should do to remove my source tree?
 
The source tree doesn't want to go. pkg-remove reports this scary word "vital"
To remove a "vital" package, unset the "vital" flag of the package [1], then delete it, and, in this case, afterwards pkg-autoremove(8) the dependent packages, or remove them individually.

Be careful with the removable of other "vital" packages, it may brake the system if deleted.

Example:
Code:
#  pkg  set  -v  0  FreeBSD-set-src
#  pkg  del  FreeBSD-set-src
#  pkg  autoremove

[1] pkg-set(8)
Code:
OPTIONS

     -v 0|1, --vital 0|1
                Set or unset the "vital" flag on the target package(s).  Set
                to 0 to disable the "vital" flag, and 1 to enable it.
 
pkg-remove reports this scary word "vital" but the source tree has never been vital.
If you're using NVIDIA GPU driver on 15.1-RELEASE or stable/15, FreeBSD-src-sys-*.pkg is vital until 15.0-RELEASE is EoL'ed.

This is because FreeBSD-ports-kmod repo builder has regression NOT building NVIDIA related kmods other than x11/nvidia-kmod alone for now, and at least graphics/nvidia-drm-*-kmod* pkgs built on 15.0 doesn't work for 15.1 (including stable/15), thus, affected users need to build them locally.
 
If you're using NVIDIA GPU driver on 15.1-RELEASE or stable/15, FreeBSD-src-sys-*.pkg is vital until 15.0-RELEASE is EoL'ed.

This is because FreeBSD-ports-kmod repo builder has regression NOT building NVIDIA related kmods other than x11/nvidia-kmod alone for now, and at least graphics/nvidia-drm-*-kmod* pkgs built on 15.0 doesn't work for 15.1 (including stable/15), thus, affected users need to build them locally.
Does this perhaps apply to the amdgpu modules as well?

I just recompiled those after git -C /usr/ports pull. My ports tree was quite old.
 
Does this perhaps apply to the amdgpu modules as well?
Fortunately, no. As far as I know, it's NVIDIA specific regression.

But beware! unless you switch from snapshot to RELEASE, you could be bitten even if you're using amdgpu (or radeonkms or i915kms).

This is because kmod repo provides pkgs for RELEASE only (for 15.*, 15.0 and 15.1 currently), not for snapshots. And anything depends on LinuxKPI (including graphics/drm-*-kmod) are quite keen with kernel source. So need to build them using /usr/src/sys/ that 100% matches with running kernel.
 
Fortunately, no. As far as I know, it's NVIDIA specific regression.

But beware! unless you switch from snapshot to RELEASE, you could be bitten even if you're using amdgpu (or radeonkms or i915kms).

This is because kmod repo provides pkgs for RELEASE only (for 15.*, 15.0 and 15.1 currently), not for snapshots. And anything depends on LinuxKPI (including graphics/drm-*-kmod) are quite keen with kernel source. So need to build them using /usr/src/sys/ that 100% matches with running kernel.
That's the warning I was looking for. Thanks!
 
This is because kmod repo provides pkgs for RELEASE only (for 15.*, 15.0 and 15.1 currently), not for snapshots.
The "not for snapshots." part I understand.

However, the first part of your sentence, I do not understand.
For -STABLE (instead of -RELEASE), using latest, the settings for packages for the ports tree are:
Rich (BB code):
  FreeBSD-ports: {
    url             : "pkg+https://pkg.FreeBSD.org/${ABI}/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/${ABI}/kmods_latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }

What is the current status of the (generation of) kmod packages of the FreeBSD-ports-kmods repository for -STABLE ?
 
What is the current status of the (generation of) kmod packages of the FreeBSD-ports-kmods repository for -STABLE ?
As far as I can see, none.

Cannot see subdirectories via https, we all (except China under Great Firewall?) can see as below for 15.*, amd64.
Screenshot_pkg_repo_20260816.png

Not sure about unversioned ones, sorry. Possibilities would be:
  • The default (oldest supported) RELEASE (currently, 15.0)
  • stable/15, but cannot determine on which commit (of base) by seeing directory alone.
 
Code:
$ fetch http://pkg.freebsd.org/FreeBSD:15:amd64/kmods_latest/packagesite.pkg
$ tar xzf packagesite.pkg packagesite.yaml
$ head -1 packagesite.yaml |tail -c 50
{"FreeBSD_version":"1500503","flavor":"mt7601u"}}
That would be from December 1, 2025, to December 18, 2025.

For "latest", it is "FreeBSD_version":"1500068".
 
Cannot see subdirectories via https [...]
I've looked at these too; these date-time stamps seem not a reliable indicator if a certain remote repository is being updated.
Comparing the versions of certain "graphics" packages*, using latest :
  1. graphics-repo-stable.out - using kmods repo of stable/15
  2. graphics-repo-releng.out - using kmods repo of releng/15
Rich (BB code):
[1-0] # diff graphics-repo-stable.out graphics-repo-releng.out
31,34c31,34
<     31        [FreeBSD-ports-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1501500_9
<     32        [FreeBSD-ports-kmods]  graphics/drm-61-kmod                drm-61-kmod                6.1.128.1501500_9
<     33        [FreeBSD-ports-kmods]  graphics/drm-66-kmod                drm-66-kmod                6.6.25.1501500_9
<     34        [FreeBSD-ports-kmods]  x11/nvidia-kmod                     nvidia-kmod                595.71.05.1501500
---
>     31        [FreeBSD-ports-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1501000_9
>     32        [FreeBSD-ports-kmods]  graphics/drm-61-kmod                drm-61-kmod                6.1.128.1501000_9
>     33        [FreeBSD-ports-kmods]  graphics/drm-66-kmod                drm-66-kmod                6.6.25.1501000_9
>     34        [FreeBSD-ports-kmods]  x11/nvidia-kmod                     nvidia-kmod                595.71.05.1501000
[2->1<] #

< 31 [FreeBSD-ports-kmods] graphics/drm-515-kmod drm-515-kmod 5.15.160.1501500_9
shows that there are specific kmods packages in a remote FreeBSD-ports-kmods repository generated for stable/15.

According to Packaging FreeBSD base - Status table, the kmods repo for stable/15 (most recent version of stable/15 is 1501502 versus 1501000 for releng/15.1.0-p2):

BranchFrequencyURLkmods
...
stable/15twice daily – 12:00 and 00:00 UTChttps://pkg.freebsd.org/${ABI}/base_latesthttps://pkg.freebsd.org/${ABI}/kmods_latest

My comparison of outputs seem to confirm this, allthough I cannot determine from this if it actually happens "twice daily".
___
* using:
Code:
pkg rquery -x '[%R] %o %n %v' '^drm-(51.-|6..?-)?kmod|(^nvidia-(d|k))' | column -t | nl -b a
 
I've looked at these too; these date-time stamps seem not a reliable indicator if a certain remote repository is being updated.
Comparing the versions of certain "graphics" packages*, using latest :
  1. graphics-repo-stable.out - using kmods repo of stable/15
  2. graphics-repo-releng.out - using kmods repo of releng/15
Rich (BB code):
[1-0] # diff graphics-repo-stable.out graphics-repo-releng.out
31,34c31,34
<     31        [FreeBSD-ports-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1501500_9
<     32        [FreeBSD-ports-kmods]  graphics/drm-61-kmod                drm-61-kmod                6.1.128.1501500_9
<     33        [FreeBSD-ports-kmods]  graphics/drm-66-kmod                drm-66-kmod                6.6.25.1501500_9
<     34        [FreeBSD-ports-kmods]  x11/nvidia-kmod                     nvidia-kmod                595.71.05.1501500
---
>     31        [FreeBSD-ports-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1501000_9
>     32        [FreeBSD-ports-kmods]  graphics/drm-61-kmod                drm-61-kmod                6.1.128.1501000_9
>     33        [FreeBSD-ports-kmods]  graphics/drm-66-kmod                drm-66-kmod                6.6.25.1501000_9
>     34        [FreeBSD-ports-kmods]  x11/nvidia-kmod                     nvidia-kmod                595.71.05.1501000
[2->1<] #

< 31 [FreeBSD-ports-kmods] graphics/drm-515-kmod drm-515-kmod 5.15.160.1501500_9
shows that there are specific kmods packages in a remote FreeBSD-ports-kmods repository generated for stable/15.

According to Packaging FreeBSD base - Status table, the kmods repo for stable/15 (most recent version of stable/15 1501502 versus 1501000 for releng/15.1.0-p2):

BranchFrequencyURLkmods
...
stable/15twice daily – 12:00 and 00:00 UTChttps://pkg.freebsd.org/${ABI}/base_latesthttps://pkg.freebsd.org/${ABI}/kmods_latest

My comparison of outputs seem to confirm this, allthough I cannot determine from this if it actually happens "twice daily".
___
* using:
Code:
pkg rquery -x '[%R] %o %n %v' '^drm-(51.-|6..?-)?kmod|(^nvidia-(d|k))' | column -t | nl -b a
What's confusing "twice daily" is that it's unclear both base and kmod pkgs are built (base first, then, kmods) or kmods only.

If the latter, pkgs in kmod repo is unusable for latest stable/15 installations.
And it seems likely, as
Code:
<     31        [FreeBSD-ports-kmods]  graphics/drm-515-kmod               drm-515-kmod               5.15.160.1501500_9
indicates it's built for OSVERSION (== __FreeBSD_version in sys/sys/param.h) of 1501500, not current 1501502.
 
Back
Top