From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 06 Nov 2023 15:04:31 +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 1r00DP-000E3C-0S for lore@lore.pengutronix.de; Mon, 06 Nov 2023 15:04:31 +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 1r00DO-0006vd-8c; Mon, 06 Nov 2023 15:04:30 +0100 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r00DN-0006vI-L2; Mon, 06 Nov 2023 15:04:29 +0100 Message-ID: <3f541c627fe002268f515be0a036288a14388ece.camel@pengutronix.de> From: Enrico =?ISO-8859-1?Q?J=F6rns?= To: Roland Hieber , Ahmad Fatoum Date: Mon, 06 Nov 2023 15:04:29 +0100 In-Reply-To: <20231106135636.z4u4l7qqxrjktmev@pengutronix.de> References: <20231106115822.268672-1-a.fatoum@pengutronix.de> <20231106120426.qa7s6j7bktnxsp77@pengutronix.de> <3f9dc13e7710d87ad6a022d07c0c3e2314c0e5a1.camel@pengutronix.de> <20231106135636.z4u4l7qqxrjktmev@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 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 Hi Roland, Am Montag, dem 06.11.2023 um 14:56 +0100 schrieb Roland Hieber: > On Mon, Nov 06, 2023 at 01:12:48PM +0100, Enrico J=C3=B6rns 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: > > > >=20 > > > > =C2=A0 LIBDT_CURRENT=3D6 > > > > =C2=A0 LIBDT_REVISION=3D0 > > > > =C2=A0 LIBDT_AGE=3D0 > > > >=20 > > > > along with a comment on how the values were chosen. Copy the commen= t 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 syst= ems > > > > as we are intent on phasing out autotools anyway, once wrinkles suc= h as > > > > what's fixed here are ironed out. > > > >=20 > > > > Reported-by: Enrico J=C3=B6rns > > > > Signed-off-by: Ahmad Fatoum > > >=20 > > > Reviewed-by: Roland Hieber > > >=20 > > > > --- > > > > =C2=A0meson.build | 9 +++++++++ > > > > =C2=A01 file changed, 9 insertions(+) > > > >=20 > > > > diff --git a/meson.build b/meson.build > > > > index 9579e712dfea..9894d7311bb3 100644 > > > > --- a/meson.build > > > > +++ b/meson.build > > > > @@ -133,6 +133,15 @@ libdt =3D shared_library('dt-utils', > > > > =C2=A0=C2=A0 c_args : ['-include', meson.current_build_dir() / 'ver= sion.h'], > > > > =C2=A0=C2=A0 dependencies : [udevdep, versiondep], > > > > =C2=A0=C2=A0 gnu_symbol_visibility : 'default', > > > > +# If the library source code has changed at all since the last rel= ease, > > > > +#=C2=A0=C2=A0 then increment revision (=E2=80=98c:r:a=E2=80=99 bec= omes =E2=80=98c:r+1:a=E2=80=99). > > > > +# If any interfaces have been added/removed/changed since the last= release, > > > > +#=C2=A0=C2=A0 then increment current, and set revision to 0. > >=20 > > 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". > >=20 > > How does "interfaces" differ from "public interfaces" below? > >=20 > > Regards, Enrico > >=20 > > > > +# If any public interfaces have been added since the last public r= elease, > > > > +#=C2=A0=C2=A0 then increment age. > > > > +# If any interfaces have been removed or changed since the last re= lease, > > > > +#=C2=A0=C2=A0 then set age to 0. > > > > +=C2=A0 version: '6.0.0', >=20 > 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. mh, but this is just the 'library version' and may thus be changed by hand = and independent from any other release version, right? And "soversion" is just the first component of "version" by default if I ge= t the documentation right: > If this is not specified, the first part of version is used instead (see = below). For example, if > version is 3.6.0 and soversion is not defined, it is set to 3. https://mesonbuild.com/Reference-manual_functions.html#shared_library Regards, Enrico > Also [2] notes: >=20 > =C2=A0 > To set the version of the library, libtool provides the > =C2=A0 > -version-info parameter, which accepts three numbers, separated = by > =C2=A0 > colons, that are called respectively, current, revision and age. > =C2=A0 > Both their name and their behaviour, nowadays, have to be consid= ered > =C2=A0 > fully arbitrary, as the explanation provided in the official > =C2=A0 > documentation is confusing to say the least, and can be, in some > =C2=A0 > cases, considered completely wrong.=20 >=20 > 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. >=20 > =C2=A0 [1]: https://mesonbuild.com/Reference-manual_functions.html#shared= _library_version > =C2=A0 [2]: https://autotools.info/libtool/version.html#idm1602 >=20 > (Please disregard my premature Reviewed-by.) >=20 > =C2=A0- Roland >=20 > > > > =C2=A0=C2=A0 install : true) > > > > =C2=A0 > > > > =C2=A0executable('barebox-state', > > > > --=20 > > > > 2.39.2 > > > >=20 > > > >=20 > > > >=20 > > >=20 > >=20 > > --=20 > > Pengutronix e.K.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| Enrico J=C3=B6rns=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= | > > Embedded Linux Consulting & Support=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0| https://www.pengutronix.de/=C2=A0| > > Steuerwalder Str. 21=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0| Phone: +49-5121-206917-180=C2=A0=C2=A0| > > 31137 Hildesheim, Germany=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| Fax:=C2=A0= =C2=A0=C2=A0+49-5121-206917-9=C2=A0=C2=A0=C2=A0=C2=A0| > >=20 > >=20 >=20 --=20 Pengutronix e.K.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| Enrico J=C3=B6rns=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| Embedded Linux Consulting & Support=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0| https://www.pengutronix.de/ | Steuerwalder Str. 21=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0| Phone: +49-5121-206917-180=C2=A0=C2=A0| 31137 Hildesheim, Germany=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| Fax:=C2=A0=C2= =A0=C2=A0+49-5121-206917-9=C2=A0=C2=A0=C2=A0=C2=A0|