Disabling the kernel version check on packages

Hello. I am using an offshoot of FreeBSD and some packages don't seem to be making it down the pipeline. Several critical packages including my DE are trying to be removed on upgrade. I am holding for now, and am trying to upgrade that way to see what will happen. Story for another thread perhaps.

Anyway I was wondering, is there a way to disable the version checking between package and kernel? My new kernel is only the next version up as far as I know. I cannot imagine so much has changed that it would be literally impossible for my package to work in it's older compilation. I would at least like to test this theory, however packages will fail to run simply because they were not built in the same kernel version.

Is there any way to turn off this check? Preferably, this should be targetted, but a system-wide option is also acceptable.
 
Well, no, you need to set it in terminal before running pkg. If you are using sh/bash shell, you can do it like this:
Code:
export IGNORE_OSVERSION="yes"
If you are using csh/tcsh, you can do it like this.
Code:
setenv IGNORE_OSVERSION yes
then you can run pkg ...
 
To clarify: the programs are installed. The issue isn't with installation, it's with running an "outdated" package on a newer kernel.

If a package's version is mismatched on boot it will fail to execute that package and, often, will cause a kernel panic if you have a lot of packages that don't match that kernel version. Especially if those packages are critical to the system.

If a package's version is mismatched upon running it, it will fail to run. This can also cause issues especially with packages that need to be run in order to use the system.

So will setting this variable solve this problem?
 
will cause a kernel panic if you have a lot of packages that don't match that kernel version
The number of packages has absolutely nothing to do with this. And userland applications generally do not panic(9) unless there's something seriously wrong. Even if you run a binary built for a previous major version it typically just fails to start, because the system libraries it needs are not the expected version.

You might get a crash of the system if you tried to load kernel modules that are built for the "wrong" version. But even those generally just fail to load with a warning about the kernel version mismatch.
 
… Story for another thread perhaps. …

I guess, you use port packages from quarterly. True?

… set it in terminal before running pkg. …

It's also possible to set at runtime.

This seems to work with both csh (my default for the root user) and sh, I don't intend to test any other shell:

Code:
root@mowa219-gjp4-zbook-freebsd:~ # uname -prsKU
FreeBSD 15.0-CURRENT amd64 1500023 1500023
root@mowa219-gjp4-zbook-freebsd:~ # env ABI=freebsd:14:amd64 IGNORE_OSVERSION=yes pkg add --force https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/tor-browser-13.5.a9_1.pkg
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Fetching tor-browser-13.5.a9_1.pkg: 100%   68 MiB   6.0MB/s    00:12   
Installing tor-browser-13.5.a9_1...
package tor-browser is already installed, forced install
Extracting tor-browser-13.5.a9_1: 100%
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
root@mowa219-gjp4-zbook-freebsd:~ # sh
# env ABI=freebsd:14:amd64 IGNORE_OSVERSION=yes pkg add --force https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/tor-browser-13.5.a9_1.pkg
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Fetching tor-browser-13.5.a9_1.pkg: 100%   68 MiB   6.0MB/s    00:12   
Installing tor-browser-13.5.a9_1...
package tor-browser is already installed, forced install
Extracting tor-browser-13.5.a9_1: 100%
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
# exit
root@mowa219-gjp4-zbook-freebsd:~ # exit
logout
%
 
You might get a crash of the system if you tried to load kernel modules that are built for the "wrong" version. But even those generally just fail to load with a warning about the kernel version mismatch.
If that's the case I must be seriously unlucky, because it happens every time I upgrade a major version.

I guess, you use port packages from quarterly. True?
I honestly don't know about quarterly this or that. My offshoot (which I might as well say is HardenedBSD) does not have any "version types" for programs as far as I gather. You get one branch to work off of and one set of programs to work with, and that's it.

I also realized I was using the -CURRENT version, which as I came to find out after this thread is basically the experimental branch but for "bleeding edge" production systems. In any case, right or wrong, I downgraded to 14. I've been trying to get used to building from source, for this and other reasons.

Funnily enough, this has introduced another issue: package depreciation. Unfortunately as a result of this I've been forced to work with a barebones systems. Thankfully it still runs the critical software that keeps the system at least operational, but unfortunately all the programs that matter had to be removed, and building from source has turned out to be somewhat of a wash. Issues all over the place.

In any event, what would solve this is also funnily enough the same solution that it would be for my original question; turning off version checking. Now because I am so far behind, it probably wouldn't work. But it would still be interesting to try.

Is there just no way to disable the feature? I suppose I understand the reasoning, allowing older versions is a security liability, however I don't see any reason there shouldn't be a switch to allow users who know the risks (or frankly even don't) to simply turn it off. It would solve a myriad of problems, at least for me.
 
If that's the case I must be seriously unlucky, because it happens every time I upgrade a major version.


I honestly don't know about quarterly this or that. My offshoot (which I might as well say is HardenedBSD) does not have any "version types" for programs as far as I gather. You get one branch to work off of and one set of programs to work with, and that's it.

I also realized I was using the -CURRENT version, which as I came to find out after this thread is basically the experimental branch but for "bleeding edge" production systems. In any case, right or wrong, I downgraded to 14. I've been trying to get used to building from source, for this and other reasons.

Funnily enough, this has introduced another issue: package depreciation. Unfortunately as a result of this I've been forced to work with a barebones systems. Thankfully it still runs the critical software that keeps the system at least operational, but unfortunately all the programs that matter had to be removed, and building from source has turned out to be somewhat of a wash. Issues all over the place.

In any event, what would solve this is also funnily enough the same solution that it would be for my original question; turning off version checking. Now because I am so far behind, it probably wouldn't work. But it would still be interesting to try.

Is there just no way to disable the feature? I suppose I understand the reasoning, allowing older versions is a security liability, however I don't see any reason there shouldn't be a switch to allow users who know the risks (or frankly even don't) to simply turn it off. It would solve a myriad of problems, at least for me.

Wouldn't you know it, but it just turned out I didn't wait long enough. Packages are being repopulated to my current upgraded 14 version.

Still, it would be nice to be able to modify and turn off this feature as necessary, however.
 
Back
Top