Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2022 13:13:24 -0600
From:      Christer Edwards <christer.edwards@gmail.com>
To:        current@freebsd.org
Subject:   Re: pkg: Newer FreeBSD version for package... but why?
Message-ID:  <CAH2d3%2Bs1VVRdA8Eskvc-R2HwH05PcqHBQKVNvB6eeJH8jtKDdg@mail.gmail.com>
In-Reply-To: <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org>
References:  <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org> <20220713120900.63cd5639.grembo@freebsd.org> <d08ca84e-5e48-f983-9540-44316089357e@FreeBSD.org> <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e4d6f405e3b494d5
Content-Type: text/plain; charset="UTF-8"

unsubscribe

On Wed, Jul 13, 2022 at 12:33 PM John Baldwin <jhb@freebsd.org> wrote:

> On 7/13/22 3:17 AM, Andriy Gapon wrote:
> > On 2022-07-13 13:09, Michael Gmelin wrote:
> >>
> >>
> >> 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.
> >
> > Thank you very much!  That's it:
> > # file /usr/bin/uname
> > /usr/bin/uname: ELF 32-bit LSB executable, ARM, EABI5 version 1
> > (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1,
> > FreeBSD-style, for FreeBSD 14.0 (1400051), stripped
> >
> >> 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.
> >
> > Indeed.
> >
> > Now the next thing (for me) to research is why the binaries were built
> > "for FreeBSD 14.0 (1400051)" when the source tree has 1400063 and uname
> > -U also reports 1400063.
> > FWIW, this was a cross-build, maybe that played a role too.
>
> If you do a NO_CLEAN=yes build, we don't relink binaries just because
> crt*.o changed (where the note is stored).
>
> --
> John Baldwin
>
>

--000000000000e4d6f405e3b494d5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e,monospace;font-size:small">unsubscribe</div></div><br><div class=3D"gmail=
_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 13, 2022 at 12:33=
 PM John Baldwin &lt;<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 7=
/13/22 3:17 AM, Andriy Gapon wrote:<br>
&gt; On 2022-07-13 13:09, Michael Gmelin wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Wed, 13 Jul 2022 10:29:06 +0300<br>
&gt;&gt; Andriy Gapon &lt;avg@FreeBSD.org&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; # uname -U<br>
&gt;&gt;&gt; 1400063<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # uname -K<br>
&gt;&gt;&gt; 1400063<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # pkg upgrade<br>
&gt;&gt;&gt; Updating FreeBSD repository catalogue...<br>
&gt;&gt;&gt; Fetching packagesite.pkg: 100%=C2=A0 =C2=A0 5 MiB=C2=A0 =C2=A0=
4.8MB/s=C2=A0 =C2=A0 00:01<br>
&gt;&gt;&gt; Processing entries:=C2=A0 =C2=A00%<br>
&gt;&gt;&gt; Newer FreeBSD version for package zyre:<br>
&gt;&gt;&gt; To ignore this error set IGNORE_OSVERSION=3Dyes<br>
&gt;&gt;&gt; - package: 1400063<br>
&gt;&gt;&gt; - running kernel: 1400051<br>
&gt;&gt;&gt; Ignore the mismatch and continue? [y/N]:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Does anyone know why this would happen?<br>
&gt;&gt;&gt; Where does pkg get its notion of the running kernel version?<b=
r>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; If I&#39;m reading the sources correctly, it&#39;s determining the=
 OS version<br>
&gt;&gt; by looking at the elf headers of various files in this order:<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0getenv(&quot;ABI_FILE&quot;)<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/uname<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0/bin/sh<br>
&gt;&gt;<br>
&gt;&gt; So I would assume that `file /usr/bin/uname` shows 1400051 on your=
<br>
&gt;&gt; system.<br>
&gt; <br>
&gt; Thank you very much!=C2=A0 That&#39;s it:<br>
&gt; # file /usr/bin/uname<br>
&gt; /usr/bin/uname: ELF 32-bit LSB executable, ARM, EABI5 version 1<br>
&gt; (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1,<br>
&gt; FreeBSD-style, for FreeBSD 14.0 (1400051), stripped<br>
&gt; <br>
&gt;&gt; You can point it to checking another file by setting ABI_FILE[0] i=
n the<br>
&gt;&gt; environment or ignore the check by setting IGNORE_OSVERSION (like<=
br>
&gt;&gt; advised). The &quot;running kernel:&quot; label seems a bit mislea=
ding.<br>
&gt; <br>
&gt; Indeed.<br>
&gt; <br>
&gt; Now the next thing (for me) to research is why the binaries were built=
<br>
&gt; &quot;for FreeBSD 14.0 (1400051)&quot; when the source tree has 140006=
3 and uname<br>
&gt; -U also reports 1400063.<br>
&gt; FWIW, this was a cross-build, maybe that played a role too.<br>
<br>
If you do a NO_CLEAN=3Dyes build, we don&#39;t relink binaries just because=
<br>
crt*.o changed (where the note is stored).<br>
<br>
-- <br>
John Baldwin<br>
<br>
</blockquote></div>

--000000000000e4d6f405e3b494d5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH2d3%2Bs1VVRdA8Eskvc-R2HwH05PcqHBQKVNvB6eeJH8jtKDdg>