From nobody Mon Aug 1 16:00:02 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 4LxNB223Gwz4Y7vY for ; Mon, 1 Aug 2022 16:00:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LxNB12C8dz3RVS; Mon, 1 Aug 2022 16:00:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: (Authenticated sender: andriy.gapon@uabsd.com) by mail.gandi.net (Postfix) with ESMTPSA id 95B40E0002; Mon, 1 Aug 2022 16:00:03 +0000 (UTC) Message-ID: <8ccb243e-55e5-e600-fe6a-9f40fc606ec3@FreeBSD.org> Date: Mon, 1 Aug 2022 19:00:02 +0300 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: pkg: Newer FreeBSD version for package... but why? Content-Language: en-US To: John Baldwin , Michael Gmelin Cc: current@freebsd.org References: <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org> <20220713120900.63cd5639.grembo@freebsd.org> <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> From: Andriy Gapon In-Reply-To: <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4LxNB12C8dz3RVS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 2001:4b98:dc4:8::224 is neither permitted nor denied by domain of avg@FreeBSD.org) smtp.mailfrom=avg@FreeBSD.org X-Spamd-Result: default: False [-2.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4b98:dc4:8::224:from]; MLMMJ_DEST(0.00)[current@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:203476, ipnet:2001:4b98:dc4::/48, country:FR]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[avg]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On 2022-07-13 21:33, 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). > I see. It was a NO_CLEAN build indeed. Thanks. -- Andriy Gapon https://standforukraine.com https://razomforukraine.org