From nobody Wed Jul 13 19:13:24 2022 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8DE151D0F3D7 for ; Wed, 13 Jul 2022 19:13:37 +0000 (UTC) (envelope-from christer.edwards@gmail.com) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LjnN068fDz43Jj for ; Wed, 13 Jul 2022 19:13:36 +0000 (UTC) (envelope-from christer.edwards@gmail.com) Received: by mail-ej1-x632.google.com with SMTP id oy13so16678939ejb.1 for ; Wed, 13 Jul 2022 12:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=x3KLgSNu/0xLA9WH3S4vHw0CA/dA1L3puLCMdqdfEYQ=; b=UUc36ggh/lFkKI2jBEoVWtfzy/2x2wIkyN8sDPkwnVbqDswXZahO9KMx7gGiJVxu4Y ItQ891qVsq2V/hmwaaPx073wJ47nAbOUX5J1/LDOP1szNhpZtx1BKOKqEKzn9mDHgMHs dbJGspxCLCTEei7nUH5a/eH95RlXilRp0michPH5hDpviR7S+I04kbUp+eNhsRwgjQoV 1Ksnq1UelLRY75EPpE+086OcLDbpcbIqCjW5EegTAyZ4IOzN0OI3C4h40N/9bKxNvzTX KcTCxMYE3Yvclw2cN0fv0O3z+zLqNqtRNMh2gGL9aVXMZw++4PyDhUdsToV9yOhtFjKC 3hgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=x3KLgSNu/0xLA9WH3S4vHw0CA/dA1L3puLCMdqdfEYQ=; b=FHS/gaRb8hvSAYnTtUyc0IVIR66udX86qeCFk7DDJgWF43diex7FBTjdZ/hc0w9fAv 7YLhknJ7EL1l0YvLzwuPh11qv9c9kQblnXi7x3GzZTXINCSFHOlUioCIPJrfJ8WHWM1o RWta5DdTKbmN16D2RpQYPL2JIXM4n9dmAJlEWWAML3CVQtBrWzMKJbG91j1A+063SguX tEawEDelttI+1ogie9FVo121Co2z6fhCTf+hMKIs81nLvhWx1qReErUcI32++D/98Qg8 R11Udp6Uf+6UzZ0yikpo0LrZxBa8p2fEHokVLriIaqGcOoJcJSJGAfBs5t9BoxQCqCT+ wXaw== X-Gm-Message-State: AJIora98BzN4FPePaJo7ojESpjoy/iI7++OZANOSOONXBbwQ6I9HBmWg r0P+5Wt7vytJBfDnAU7gIRwfvZSmyt9lXlD1VGjsat6cEVE= X-Google-Smtp-Source: AGRyM1sBJYqt95Urs1i74yfM3xl4kzACo0GNOz5aoeCoYtCnwU9H201r6W32JmWTXASceL3QnhaglbZ4jKkvyZrqdFs= X-Received: by 2002:a17:907:3f29:b0:72b:91df:2c4b with SMTP id hq41-20020a1709073f2900b0072b91df2c4bmr4980956ejc.206.1657739615195; Wed, 13 Jul 2022 12:13:35 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org> <20220713120900.63cd5639.grembo@freebsd.org> <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> In-Reply-To: <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> From: Christer Edwards Date: Wed, 13 Jul 2022 13:13:24 -0600 Message-ID: Subject: Re: pkg: Newer FreeBSD version for package... but why? To: current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e4d6f405e3b494d5" X-Rspamd-Queue-Id: 4LjnN068fDz43Jj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=UUc36ggh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of christer.edwards@gmail.com designates 2a00:1450:4864:20::632 as permitted sender) smtp.mailfrom=christer.edwards@gmail.com X-Spamd-Result: default: False [-2.94 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.944]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::632:from]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MLMMJ_DEST(0.00)[current]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; TAGGED_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000e4d6f405e3b494d5 Content-Type: text/plain; charset="UTF-8" unsubscribe On Wed, Jul 13, 2022 at 12:33 PM John Baldwin 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 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
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%=C2=A0 =C2=A0 5 MiB=C2=A0 =C2=A0= 4.8MB/s=C2=A0 =C2=A0 00:01
>>> Processing entries:=C2=A0 =C2=A00%
>>> Newer FreeBSD version for package zyre:
>>> To ignore this error set IGNORE_OSVERSION=3Dyes
>>> - 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:
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0getenv("ABI_FILE")
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/uname
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0/bin/sh
>>
>> So I would assume that `file /usr/bin/uname` shows 1400051 on your=
>> system.
>
> Thank you very much!=C2=A0 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] i= n the
>> environment or ignore the check by setting IGNORE_OSVERSION (like<= br> >> advised). The "running kernel:" label seems a bit mislea= ding.
>
> 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 140006= 3 and uname
> -U also reports 1400063.
> FWIW, this was a cross-build, maybe that played a role too.

If you do a NO_CLEAN=3Dyes build, we don't relink binaries just because=
crt*.o changed (where the note is stored).

--
John Baldwin

--000000000000e4d6f405e3b494d5--