From nobody Thu Jul 28 15:23:43 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 4LtvYp3Lb7z4X2x5 for ; Thu, 28 Jul 2022 15:23:42 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (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 4LtvYm5XXGz488V; Thu, 28 Jul 2022 15:23:40 +0000 (UTC) (envelope-from ronald-lists@klop.ws) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=klop.ws; s=mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References: Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=HSOKp4Ex7kUP6Mk03zJR3Uw6YsdNzhlgrd2b72vnU9Q=; b=CrcvojbNvLsjaWXOqlXqec2zWl rox3IP4AEhUJSzQHVC/AvCZsEcyx1lFPuJggaNVDO2IlbxS4SsJtTf9og7D8JTbvlYYSOmiLhSOBz dK9yvof8Va28VkKwImOKl8Poal95bFWy0uuV8H7S4Moahw9aJ2d52U9gTrULwzklEXVc=; Message-ID: Date: Thu, 28 Jul 2022 17:23:43 +0200 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 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: pkg: Newer FreeBSD version for package... but why? Content-Language: en-US To: John Baldwin , Andriy Gapon , 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: Ronald Klop In-Reply-To: <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.greenhost.nl X-Spam-Level: / X-Spam-Score: -0.4 X-Spam-Status: No, score=-0.4 required=5.0 tests=ALL_TRUSTED,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A autolearn=disabled version=3.4.2 X-Scan-Signature: 4b8baa00aa45d625c6ee6c23f4cb0de1 X-Rspamd-Queue-Id: 4LtvYm5XXGz488V X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=mail header.b=CrcvojbN; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.94 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_LONG(-0.95)[-0.945]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; R_DKIM_ALLOW(-0.20)[klop.ws:s=mail]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[current@freebsd.org]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[195.190.28.88:from]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 7/13/22 20: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). > Why does pkg not look at the same thing as "uname -U" looks at? Regards, Ronald.