From nobody Sat May 13 16:24:45 2023 X-Original-To: ports@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 4QJWFZ65qYz4BXD6 for ; Sat, 13 May 2023 16:25:22 +0000 (UTC) (envelope-from xavier@groumpf.org) Received: from aragorn.amdh.fr (aragorn.groumpf.org [176.31.180.205]) by mx1.freebsd.org (Postfix) with ESMTP id 4QJWFY3Fh2z3CVM for ; Sat, 13 May 2023 16:25:21 +0000 (UTC) (envelope-from xavier@groumpf.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=groumpf.org header.s=dkim header.b=gBtmhBbX; spf=pass (mx1.freebsd.org: domain of xavier@groumpf.org designates 176.31.180.205 as permitted sender) smtp.mailfrom=xavier@groumpf.org; dmarc=none Received: from numenor.groumpf.org (82-64-247-11.subs.proxad.net [82.64.247.11]) by aragorn.amdh.fr (Postfix) with ESMTP id 0AE582000FF80 for ; Sat, 13 May 2023 18:25:18 +0200 (CEST) Received: from numenor.groumpf.org (localhost [127.0.0.1]) by numenor.groumpf.org (Postfix) with ESMTP id E98EF1C4FC9 for ; Sat, 13 May 2023 18:24:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groumpf.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :content-language:references:subject:subject:from:from :user-agent:mime-version:date:date:message-id:received:received; s=dkim; t=1683995085; x=1684859086; bh=5ZBXfkzJCCIezsITKEX9iSQ5 Gr3/FPLAx4iS9V3T0PI=; b=gBtmhBbXFP7gi/3cgP2E20Nz281sKBM3kdWbOIE5 rd5p60w96CTA5pz6zZC8W0LVnWRGYGOoyrIJHbOH+NA2n4NaYeSs9THlKYCOV/Gc d6rwKhDdW4mQj9Dy9sWZD7X9zJDJcHqr0XUh9eGurpLUK//aGkZjgcizYVWXLZnC zPZayG8/GnWCAjhUoYrjipIC2PM5hQ7v8yfrUxNa1N5Yi933MmFtk6vLaCulW0xV 8BWM+kI6zGscVmbfl30jrxfodVadyLuTF1yFjAid13aQi7F1C3rULXXHaj63wTBJ BE47pvOkJCv1AH6AsesKXJCJdTMIvYBb30bO/Y/2KUAXxsH+jqvw7a/YfMgMya3t aOOb7CSzheSyV7mEIj0fcqOn3F9iQuT+RnXywLODy2G5ejrHU+FzoByCMeaq21LS kXtM0I2Nphh851Y8kvdfjnVYaeITQKc0/+zNjN1V9DO0j/FqPeuJqfmOphvP65K5 tbGtg5vQmurjI0vOfTwImGCl50BgRDm3pRTp0f1h3jUnItJf7SMFs67iQ8lnTjL1 IHN1Oew5Rsyiri/a/W3vDaw1Gq0JQUsH4gd/qbRiIDTWEONYLUsdh7UPeLy/reZ4 j54ia2U5gr3GmGvHIFtbUoBXPh+TSW0WZcUYMkbol3t1JWJDiTAvGlbVgd71RCjt GAY= Received: from numenor.groumpf.org ([127.0.0.1]) by numenor.groumpf.org (ns3.groumpf.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BLEWvqnawL7m for ; Sat, 13 May 2023 18:24:45 +0200 (CEST) Received: from [192.168.100.30] (imladris.groumpf.org [192.168.100.30]) by numenor.groumpf.org (Postfix) with ESMTPSA id D7E941C4FC8 for ; Sat, 13 May 2023 18:24:45 +0200 (CEST) Message-ID: Date: Sat, 13 May 2023 18:24:45 +0200 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Xavier Humbert Subject: Re: How to determine ports affected by ABI change To: ports@freebsd.org References: <6162831e-19d8-42be-dee2-4263bd69a0a6@groumpf.org> <988465e8-3793-2829-590c-1207f60422df@FreeBSD.org> Content-Language: fr In-Reply-To: <988465e8-3793-2829-590c-1207f60422df@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.35 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.958]; R_SPF_ALLOW(-0.20)[+ip4:176.31.180.205]; R_DKIM_ALLOW(-0.20)[groumpf.org:s=dkim]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; DKIM_TRACE(0.00)[groumpf.org:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[ports@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DMARC_NA(0.00)[groumpf.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; ARC_NA(0.00)[]; ASN(0.00)[asn:16276, ipnet:176.31.0.0/16, country:FR]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[ports@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QJWFY3Fh2z3CVM X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Le 5/13/23 16:03, Matthew Seaman a écrit : > On 13/05/2023 13:43, Xavier Humbert wrote: >> I'm planning in a few days, as soon as it beeen branched, to upgrade >> base from 13-STABLE to 14-STABLE >> >> I'm trying to avoid to rebuild my > 1600 ports. >> >> Is there a wayto determine ports affected by the ABI change, which >> must be recompiled ? Obviously Pure Perl or Pure Pyhton don't need to. >> > > Since libc and other shared libraries in the FreeBSD base system use > API versioning, almost all of your ports will continue to function on > 14-STABLE.  There will also be a misc/compat13x port to provide > compatibility for any non-versioned system shared libraries, which you > should install as part of upgrading your base system. > > So, no need to rebuild everything immediately.  With the obvious > exception of any loadable kernel modules which will definitely need to > be updated to operate with the new 14-STABLE kernel. > > However, as soon as you start updating ports on your new 14-STABLE > system, this can change and simultaneous re-installation of several > pkgs be required.  That's generally a consequence of something being > linked against a different API version somewhere in a dependency > chain, which may require the whole dependency chain involved to be > updated at the same time. > > Obviously, as you correctly observe, that only applies to software > compiled down into machine code and linked by the system loader, ld.so > -- statically linked binaries, interpreted languages (shell) or pure > byte-compiled language modules (python, perl, lua, java) won't be > affected.  Although the interpreters for any of those languages could > well be, as would any modules built around loadable shared objects. > > In terms of packages, the things to look for are: > >  (1) architecture independence: `pkg query -a '%n-%v %q' | grep -F '*'` > > Although the ABI string built into the package will say eg. > `FreeBSD:13:*` indicating a specific major version of the OS, such > packages probably _don't_ need to be recompiled for an OS major verson > change. > >  (2) Of the architecture dependent packages, check for those requiring > or providing shared libraries: `pkg info -bB pkgname` > > Typically this will not include any shared library dependencies on the > base system (so not entirely foolproof) but any package only linking > against the base system shlibs and not providing shlibs for anything > else to link against is effectively a leaf package in this respect, > and can be updated independent of anything else. > > Look out for compiled dynamically loaded modules too -- things like > apache or nginx modules, wrappers for shared libraries to make them > available in other languages and so forth.  (eg. Python modules that > are not architecture independent.) > > Anything remaining after applying those filters is going to require > more care to update smoothly.  It's going to be quite a laborious task > to classify all of your 1600 ports and map out what depends on what > and what groups of packages would need to be reinstalled in synchrony. > Whether it's worth it compared to just throwing CPU-cycles at the > problem and rebuilding everything straight off is not obvious to me. > > Running a mixed set of packages from different major OS versions will > run the risk of software packages arbitrarily crashing with consequent > loss of functionality and potential system downtime. Good luck. > > Note that if you're using poudriere to build packages, updating a > poudriere-jail to 14-STABLE will automatically trigger a full rebuild > of all packages, precisely what you want to avoid. > >     Cheers, > >     Matthew > Many thanks for this very detailed answer ! Cheers, Xavier -- Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Engineer https://www.amdh.fr