Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libgpiod: bump version to 1.6
Date: Fri, 30 Oct 2020 10:15:59 +0100	[thread overview]
Message-ID: <20201030101559.0a1fb98c@windsurf.home> (raw)
In-Reply-To: <CAMRc=MexG_jDoNuuVzRmNqHD56yYJmwzq43JgGo38equmPiqzQ@mail.gmail.com>

Hello Bartosz,

On Fri, 30 Oct 2020 09:42:01 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> > What worries a bit with supporting both 1.4 and 1.6, and in the future
> > say 1.4, 1.6 and 2.0 is that newer versions are likely to introduce new
> > APIs. Applications may rely on such new APIs. When the kernel headers
> > are recent enough, a recent version of libgpiod will be used, and such
> > applications will build properly. But as soon as soon builds a system
> > with older kernel headers, libgpiod will downgrade to an older version,
> > providing potentially less APIs, and therefore breaking any application
> > using them.
> 
> In yocto this can be handled by providing multiple versions of a
> package and then making any recipes that need it depend on at-least
> certain version of it - is buildroot capable of doing something like
> this?

No, what we typically do is have separate packages for libraries which
have major versions with significantly different APIs.

> I don't entirely agree. v1.6 is backward compatible with v1.4 (API-
> and ABI-wise) - programs linked against v1.4 will work with v1.6. v1.6
> will still work with older kernels (granted it's built with v5.5
> headers) but any operations that require new kernel features will
> simply fail at the kernel level. If users don't use these new
> features, the library works the same.
> 
> The whole goal of developing a new major release (v2.0) is to rework
> the public API entirely and also use uAPI v2. Otherwise it would be
> impossible to support new kernel features. This kind of API breakage
> has been done by many projects: look at gtk2 & gtk3, gstreamer0 and
> gstreamer1, python2 and python3 and probably many others. And libgpiod
> is a rather small library with not many reverse dependencies so far.
> 
> Libgpiod v2.0 will use the new kernel uAPI and thus require at least
> the kernel version where this uAPI first appeared. Just like libgpiod
> v1.x won't work with kernels pre v4.6, libgpiod v2.x won't work with
> kernels pre v5.10. I don't see how that's a problem.
> 
> > I am still highly doubtful of the strategy chosen by upstream libgpiod
> > here.
> >  
> 
> I think you're overestimating the impact here. For now the master
> branch moves forward towards a stable v2.0 API. Users are definitely
> not encouraged to use it ATM. v1.4 and v1.6 are the currently
> supported stable branches. v1.4 builds and works with linux v4.6. v1.6
> builds with linux v5.5 but still works with v4.6 unless the user calls
> new functions (set_config, bias flags, etc.) where it will fail at
> run-time but older user programs can still link against it.
> 
> Let me know if I'm missing something but I really prefer to avoid an
> ifdef hell and QA mess with supporting earlier kernels with v2.0.

I think as long as there's really a 1.x series that is entirely API
compatible, and then another 2.x series that is entirely API
compatible, but different than 1.x, then it's fine indeed.

We can use the 1.4/1.6 conditional in libgpiod.mk, as 1.4 and 1.6 are
guaranteed to offer the same API to users of the libraries.

And once libgpiod2 is out, we'll have a separate libgpiod2.mk.

Would that work ?

If so, then it's fine for me.

Thanks for explaining your strategy. It's great to have upstream
directly on-board in these discussions!

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-10-30  9:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 11:06 [Buildroot] [PATCH] package/libgpiod: bump version to 1.6 buildroot at heine.tech
2020-10-29 12:50 ` Thomas Petazzoni
2020-10-29 13:06   ` Michael Nosthoff
2020-10-29 13:12     ` Bartosz Golaszewski
2020-10-29 13:13     ` Thomas Petazzoni
2020-10-29 13:41       ` Bartosz Golaszewski
2020-10-30  7:53         ` Michael Nosthoff
2020-10-30  8:19           ` Thomas Petazzoni
2020-10-30  8:42             ` Bartosz Golaszewski
2020-10-30  9:15               ` Thomas Petazzoni [this message]
2020-10-30  9:25                 ` Bartosz Golaszewski
2020-10-30  9:34                   ` Thomas Petazzoni
2020-10-30 10:16                     ` Bartosz Golaszewski
2020-10-30 10:41                       ` Thomas Petazzoni
2020-10-30 10:53                         ` Bartosz Golaszewski
2020-11-03 20:25                           ` Arnout Vandecappelle
2020-11-03 20:56                             ` Bartosz Golaszewski
2020-11-30 20:31                               ` Bartosz Golaszewski
2020-12-02 16:57                                 ` Nicolas Cavallari
2020-10-30  8:25           ` Bartosz Golaszewski
2020-11-02 10:21 ` [Buildroot] [PATCH v2] package/libgpiod: bump version to 1.4.5 Michael Nosthoff
2020-11-02 10:27   ` [Buildroot] [PATCH v3] " Michael Nosthoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030101559.0a1fb98c@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox