From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 06 Nov 2023 14:56:39 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r005n-000Dd1-0a for lore@lore.pengutronix.de; Mon, 06 Nov 2023 14:56:39 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r005m-0005fP-BO; Mon, 06 Nov 2023 14:56:38 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r005k-0005eQ-Rb; Mon, 06 Nov 2023 14:56:36 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r005k-0073Bb-DJ; Mon, 06 Nov 2023 14:56:36 +0100 Received: from rhi by pty.whiteo.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r005k-008ncj-4M; Mon, 06 Nov 2023 14:56:36 +0100 Date: Mon, 6 Nov 2023 14:56:36 +0100 From: Roland Hieber To: Ahmad Fatoum Message-ID: <20231106135636.z4u4l7qqxrjktmev@pengutronix.de> References: <20231106115822.268672-1-a.fatoum@pengutronix.de> <20231106120426.qa7s6j7bktnxsp77@pengutronix.de> <3f9dc13e7710d87ad6a022d07c0c3e2314c0e5a1.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3f9dc13e7710d87ad6a022d07c0c3e2314c0e5a1.camel@pengutronix.de> Subject: Re: [OSS-Tools] [PATCH dt-utils] meson: align libdt-utils version with autotools' X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: oss-tools@pengutronix.de Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Mon, Nov 06, 2023 at 01:12:48PM +0100, Enrico Jörns wrote: > Am Montag, dem 06.11.2023 um 13:04 +0100 schrieb Roland Hieber: > > On Mon, Nov 06, 2023 at 12:58:22PM +0100, Ahmad Fatoum wrote: > > > Makefile.am has: > > > > > >   LIBDT_CURRENT=6 > > >   LIBDT_REVISION=0 > > >   LIBDT_AGE=0 > > > > > > along with a comment on how the values were chosen. Copy the comment and > > > the values into the meson.build as well, so appropriate symlinks > > > pointing at the versioned library are created. We forego the extra > > > complexity of having a common file that's read from both build systems > > > as we are intent on phasing out autotools anyway, once wrinkles such as > > > what's fixed here are ironed out. > > > > > > Reported-by: Enrico Jörns > > > Signed-off-by: Ahmad Fatoum > > > > Reviewed-by: Roland Hieber > > > > > --- > > >  meson.build | 9 +++++++++ > > >  1 file changed, 9 insertions(+) > > > > > > diff --git a/meson.build b/meson.build > > > index 9579e712dfea..9894d7311bb3 100644 > > > --- a/meson.build > > > +++ b/meson.build > > > @@ -133,6 +133,15 @@ libdt = shared_library('dt-utils', > > >    c_args : ['-include', meson.current_build_dir() / 'version.h'], > > >    dependencies : [udevdep, versiondep], > > >    gnu_symbol_visibility : 'default', > > > +# If the library source code has changed at all since the last release, > > > +#   then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > > > +# If any interfaces have been added/removed/changed since the last release, > > > +#   then increment current, and set revision to 0. > > Does this make sense? > Isn't "current" meant to mark *incompatible* public API changes? > This might be valid for "removed" or "changed", but not for "added". > > How does "interfaces" differ from "public interfaces" below? > > Regards, Enrico > > > > +# If any public interfaces have been added since the last public release, > > > +#   then increment age. > > > +# If any interfaces have been removed or changed since the last release, > > > +#   then set age to 0. > > > +  version: '6.0.0', Wait. Enrico has a point. The "version" field in meson has the usual "major.minor.patch" semantics [1], which does not relate to autotools' current/revision/age scheme, which in autotools is used to calculate the soversion (by some strange formula that I can never memorise). meson however assumes the major number as soversion if nothing else is specified. Also [2] notes: > To set the version of the library, libtool provides the > -version-info parameter, which accepts three numbers, separated by > colons, that are called respectively, current, revision and age. > Both their name and their behaviour, nowadays, have to be considered > fully arbitrary, as the explanation provided in the official > documentation is confusing to say the least, and can be, in some > cases, considered completely wrong. As we want to get rid of autotools in the foreseeable future anyway, I suggest that we drop the current/revision/age scheme and use semantic versioning instead (i.e., increase major for ABI-incompatible changes, increase minor for ABI-compatible new features, increase patch for ABI-compatible bugfixes), which for versions like "6.1.2" results in library names like "libdt-utils.so.6.1.2" and soversion of 6. [1]: https://mesonbuild.com/Reference-manual_functions.html#shared_library_version [2]: https://autotools.info/libtool/version.html#idm1602 (Please disregard my premature Reviewed-by.) - Roland > > >    install : true) > > >   > > >  executable('barebox-state', > > > -- > > > 2.39.2 > > > > > > > > > > > > > -- > Pengutronix e.K.                           | Enrico Jörns                | > Embedded Linux Consulting & Support        | https://www.pengutronix.de/ | > Steuerwalder Str. 21                       | Phone: +49-5121-206917-180  | > 31137 Hildesheim, Germany                  | Fax:   +49-5121-206917-9    | > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |