From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages
Date: Fri, 18 Jan 2019 22:22:00 +0000 [thread overview]
Message-ID: <20190118222200.5944b91f@symphony.aura-online.co.uk> (raw)
In-Reply-To: <1547842414.839.23.camel@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 5059 bytes --]
On Fri, 18 Jan 2019 21:13:34 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Hello,
>
> Since I've been working on the early gx86-multilib, we've been using
> 'binary-only SLOTs' to support providing old versions of libraries for
> prebuilt software. I think this was a bad idea, and I'd like to suggest
> replacing it with something cleaner, for the reasons outlined below.
>
>
> Current state
> =============
>
> Let's take dev-libs/openssl as an example. This package has three SLOTs
> right now:
>
> 0.9.8: 0.9.8z_p8-r1
> 1.0.0: 1.0.2q-r200
> 0 : 1.0.2q 1.1.0j 1.1.1a 1.1.1a-r1
>
> The real package is provided as slot :0, that includes all libraries,
> headers and executables. Slots 0.9.8 and 1.0.0 only install .so.N*
> libraries that can be used to satisfy dependencies of prebuilt packages.
>
>
> Problems with the current state
> ===============================
>
> Firstly, it is confusing to developers. Let's analyze the dependencies
> on dev-libs/openssl. A quick grep reveals seven patterns. They are
> listed below, along with occurrence counts and percentages:
>
> dev-libs/openssl 278 7.8% }
> dev-libs/openssl:* 49 1.4% } 14.2%
> dev-libs/openssl:= 178 5.0% }
> dev-libs/openssl:0 660 18.6%
> dev-libs/openssl:0= 2381 67.0%
> dev-libs/openssl:0/0 4 0.1%
> dev-libs/openssl:0/1.1 2 0.1%
>
> (note that those are rough measures, not guaranteed to be precise)
>
> So apparently 14.2% of dependencies allow any slot of OpenSSL which is
> most likely wrong, and 1.4% explicitly claim that's what the package
> wants. This could be valid only if e.g. the package supported multiple
> ABIs of OpenSSL libraries and used dlopen() with a few possible SONAMEs
> which I honestly doubt any of those packages is doing.
>
> In other words, 14.2% of dependencies on OpenSSL are plain wrong,
> and 6.4% are wrong in a way that isn't going to be reported by repoman.
> 1.4% of cases are using ':*' which probably indicates the developer
> decided to silence repoman without understanding how slot operators work
> which is a horrible thing from QA perspective.
>
> We also have a few cases that require specific OpenSSL subslot (e.g.
> forcing old version into :0 slot) but *none* actually using the binary
> compatibility slots.
I have noticed this and more generally that slot operators are poorly
understood, which is frustrating. I was initially inclined to say that
I think the model still fits and we should educate devs better but...
> Secondly, it is confusing to users. If we remove old versions and only
> keep binary compatibility slots, users can be easily tricked into
> installing them and being surprised it's not a complete package. If we
> keep old versions, we end up having different revisions of the same
> version in different slots which is also easily confused.
I can't say I've ever seen this happen but I don't speak to many users.
I'll buy it.
> Thirdly, it is cumbersome to introduce. If we are to introduce a binary
> compatibility slot for a package that didn't have it, we need to update
> all reverse dependencies. This usually means researching whether we
> should use ':0' or ':0=', and if we get this wrong, we just silence
> repoman warning about missing slot-op.
This I certainly agree with. It's so bad that it puts you off adding it
at all.
> All of this considered, I can't think of a single real benefit of using
> slots for this purpose. They work but there's nothing really special
> about them.
>
>
> Suggested replacement
> =====================
>
> My suggestion is to move binary compatibility slots into separate
> packages. For example, dev-libs/openssl would be split into:
>
> dev-libs/openssl -- containing the actual package
>
> dev-libs/openssl-bin-compat -- containing binary compatibility slots
>
> In this case, all dependencies on dev-libs/openssl would become correct
> (or semi-correct, wrt missing := dep) again. Since packages are co-
> installable the same way slots are, there is no loss there. Since
> nothing depends on binary compatibility slots, we do not even need to
> update anything (but if we had, the update cost would be minimal both to
> developers and to users).
>
>
> What do you think?
I'm on board as I have to deal with this a lot in games and I think
there were one or two more on my list to add.
The only downside is that packages requiring what is currently the
latest version would need to be updated later, though I guess you could
use || instead. Take libpng, for example:
|| ( =media-libs/libpng-1.6* media-libs/libpng-bin-compat:1.6 )
Or perhaps?
|| ( media-libs/libpng:0/16 media-libs/libpng-bin-compat:1.6 )
The security team may want to comment on how this will affect GLSAs,
especially as these old versions are frequently vulnerable.
--
James Le Cuirot (chewi)
Gentoo Linux Developer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]
next prev parent reply other threads:[~2019-01-18 22:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 20:13 [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages Michał Górny
2019-01-18 22:22 ` James Le Cuirot [this message]
2019-01-18 22:35 ` Michał Górny
2019-01-18 23:31 ` Robin H. Johnson
2019-01-18 23:36 ` James Le Cuirot
2019-01-19 7:55 ` Michał Górny
2019-01-19 9:58 ` [gentoo-dev] " Ulrich Mueller
2019-01-19 11:14 ` [gentoo-dev] " Mart Raudsepp
2019-01-19 14:37 ` Andrew Savchenko
2019-01-19 16:25 ` Michał Górny
2019-01-21 14:14 ` Marc Schiffbauer
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=20190118222200.5944b91f@symphony.aura-online.co.uk \
--to=chewi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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