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 <<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>= > 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> > On 2022-07-13 13:09, Michael Gmelin wrote:<br> >><br> >><br> >> On Wed, 13 Jul 2022 10:29:06 +0300<br> >> Andriy Gapon <avg@FreeBSD.org> wrote:<br> >><br> >>> # uname -U<br> >>> 1400063<br> >>><br> >>> # uname -K<br> >>> 1400063<br> >>><br> >>> # pkg upgrade<br> >>> Updating FreeBSD repository catalogue...<br> >>> Fetching packagesite.pkg: 100%=C2=A0 =C2=A0 5 MiB=C2=A0 =C2=A0= 4.8MB/s=C2=A0 =C2=A0 00:01<br> >>> Processing entries:=C2=A0 =C2=A00%<br> >>> Newer FreeBSD version for package zyre:<br> >>> To ignore this error set IGNORE_OSVERSION=3Dyes<br> >>> - package: 1400063<br> >>> - running kernel: 1400051<br> >>> Ignore the mismatch and continue? [y/N]:<br> >>><br> >>> Does anyone know why this would happen?<br> >>> Where does pkg get its notion of the running kernel version?<b= r> >>><br> >><br> >> If I'm reading the sources correctly, it's determining the= OS version<br> >> by looking at the elf headers of various files in this order:<br> >><br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0getenv("ABI_FILE")<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/uname<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0/bin/sh<br> >><br> >> So I would assume that `file /usr/bin/uname` shows 1400051 on your= <br> >> system.<br> > <br> > Thank you very much!=C2=A0 That's it:<br> > # file /usr/bin/uname<br> > /usr/bin/uname: ELF 32-bit LSB executable, ARM, EABI5 version 1<br> > (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1,<br> > FreeBSD-style, for FreeBSD 14.0 (1400051), stripped<br> > <br> >> You can point it to checking another file by setting ABI_FILE[0] i= n the<br> >> environment or ignore the check by setting IGNORE_OSVERSION (like<= br> >> advised). The "running kernel:" label seems a bit mislea= ding.<br> > <br> > Indeed.<br> > <br> > Now the next thing (for me) to research is why the binaries were built= <br> > "for FreeBSD 14.0 (1400051)" when the source tree has 140006= 3 and uname<br> > -U also reports 1400063.<br> > FWIW, this was a cross-build, maybe that played a role too.<br> <br> If you do a NO_CLEAN=3Dyes build, we don'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>