Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2022 12:09:00 +0200
From:      Michael Gmelin <grembo@freebsd.org>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        current@freebsd.org
Subject:   Re: pkg: Newer FreeBSD version for package... but why?
Message-ID:  <20220713120900.63cd5639.grembo@freebsd.org>
In-Reply-To: <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org>
References:  <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 13 Jul 2022 10:29:06 +0300
Andriy Gapon <avg@FreeBSD.org> wrote:

> # uname -U
> 1400063
> 
> # uname -K
> 1400063
> 
> # pkg upgrade
> Updating FreeBSD repository catalogue...
> Fetching packagesite.pkg: 100%    5 MiB   4.8MB/s    00:01
> Processing entries:   0%
> Newer FreeBSD version for package zyre:
> To ignore this error set IGNORE_OSVERSION=yes
> - package: 1400063
> - running kernel: 1400051
> Ignore the mismatch and continue? [y/N]:
> 
> Does anyone know why this would happen?
> Where does pkg get its notion of the running kernel version?
> 

If I'm reading the sources correctly, it's determining the OS version
by looking at the elf headers of various files in this order:

    getenv("ABI_FILE")
    /usr/bin/uname
    /bin/sh

So I would assume that `file /usr/bin/uname` shows 1400051 on your
system.

You can point it to checking another file by setting ABI_FILE[0] in the
environment or ignore the check by setting IGNORE_OSVERSION (like
advised). The "running kernel:" label seems a bit misleading.

Cheers
Michael

-- 
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220713120900.63cd5639.grembo>