From nobody Wed Jul 13 18:33:10 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 D89B31D0A1B3 for ; Wed, 13 Jul 2022 18:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LjmTN5mfGz3wQL; Wed, 13 Jul 2022 18:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657737192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6JkoSYOUkhjqxdG6UkbO3y3DeW+7fSpGwmghDKHpuYs=; b=LlQuTo+d5R+PfI4KuxzlGgwzKpwMNkrysBZI4+qyvb68UyxjGT/On9t4y34lJOT+S/wLBV 1Kd9XDSksEHdI99AFefEoWujgtSEF+RDSiSItRbKFLp4r8B02Y25FAqqtYeX0Vmr//W81u zV4ruG3ilKYpQfhgLPpL876N504TOVNExVlFjmukLSHuCYTTjK01VN9d1ZNi3/SNixvB7v R2PC8UqG3tpDTPF9p5FRJoiOSnhSGPVIaJ0jKpWj5D4Cl3I17k/3uJl05bnzwtbtat3jSQ t7NKwkYH0R0pkWParuuqd6lTt9Zs2CGnF6YpJ2rzZzdTC54lNORml10Wq29dxw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4LjmTN20Lcz1Hjk; Wed, 13 Jul 2022 18:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <402cf119-b07e-76fd-48b6-50eeb9b4508f@FreeBSD.org> Date: Wed, 13 Jul 2022 11:33:10 -0700 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 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: pkg: Newer FreeBSD version for package... but why? Content-Language: en-US To: Andriy Gapon , Michael Gmelin Cc: current@freebsd.org References: <81814ba9-5040-c102-dad4-0a69f3c46121@FreeBSD.org> <20220713120900.63cd5639.grembo@freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657737192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6JkoSYOUkhjqxdG6UkbO3y3DeW+7fSpGwmghDKHpuYs=; b=n16oF//XKIyEfarXV1lfscL+dfD2NwSKg87MGFTi88nBu5i6ilQHpRMhPH+Wcqz65bDErv L3EeCYFmjYZXJtpoQ805Uc73xOohGPbOe9O3+KdltlKF6L7DITZkosLkXc0PudKMt2CEki bo/YUfMZPossdLCeEBG/3mCciDCW2dKSfYxporhrxy8RHBc8fOObyDuBWjFI0SE323JCHT Fkj9vTqQOcKoQmd+jLk++gHEfXDjcBaPy3iX0oXUQrP7yBHSC473z7ESEi7UOLskFuo3TM sbhpHncou/OktD1U47u0BMqlNFyB3cDn9HOhQWcsy6QwCgIBhH6WdWLOhePM3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657737192; a=rsa-sha256; cv=none; b=CQKJIeoV2ZfXZdc2VCWjCxbFjIK2bkVNT8hQE5zX+ZtP3ArPVMS1eI9keGutfePUOVioHM ZaasG85IoI4on4ozZZSh6L1C6HpxbbgJ5PjgwZoxbdwW0UVPvw2lnm5QHpKsMVzkc5C3An NcbEhQd0F2W93xQ1Tx+7CaoxB/0c0InPsjckWxVtNmDb2gn1EsUwRnjJmdhsurBJ1Bndoi 8v4rTyfPczKunJ+YF55mBEPaw18e3bb56C5nv0pTMrrHTxoURCtPRIMg7xwoaM2CuUEGjP zDXCHhPMVCR5EBW2Su0qZ4uhvlQYfAoTSKYs8BtDHLiXUoDrIdaum+roqFDY7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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