Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages
Date: Sat, 19 Jan 2019 16:26:11
Message-Id: 1547915145.1154.15.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages by Andrew Savchenko
1 On Sat, 2019-01-19 at 17:37 +0300, Andrew Savchenko wrote:
2 > On Fri, 18 Jan 2019 21:13:34 +0100 Michał Górny wrote:
3 > > Hello,
4 > >
5 > > Since I've been working on the early gx86-multilib, we've been using
6 > > 'binary-only SLOTs' to support providing old versions of libraries for
7 > > prebuilt software. I think this was a bad idea, and I'd like to suggest
8 > > replacing it with something cleaner, for the reasons outlined below.
9 > >
10 > >
11 > > Current state
12 > > =============
13 > >
14 > > Let's take dev-libs/openssl as an example. This package has three SLOTs
15 > > right now:
16 > >
17 > > 0.9.8: 0.9.8z_p8-r1
18 > > 1.0.0: 1.0.2q-r200
19 > > 0 : 1.0.2q 1.1.0j 1.1.1a 1.1.1a-r1
20 > >
21 > > The real package is provided as slot :0, that includes all libraries,
22 > > headers and executables. Slots 0.9.8 and 1.0.0 only install .so.N*
23 > > libraries that can be used to satisfy dependencies of prebuilt packages.
24 > >
25 > >
26 > > Problems with the current state
27 > > ===============================
28 > >
29 > > Firstly, it is confusing to developers. Let's analyze the dependencies
30 > > on dev-libs/openssl. A quick grep reveals seven patterns. They are
31 > > listed below, along with occurrence counts and percentages:
32 > >
33 > > dev-libs/openssl 278 7.8% }
34 > > dev-libs/openssl:* 49 1.4% } 14.2%
35 > > dev-libs/openssl:= 178 5.0% }
36 > > dev-libs/openssl:0 660 18.6%
37 > > dev-libs/openssl:0= 2381 67.0%
38 > > dev-libs/openssl:0/0 4 0.1%
39 > > dev-libs/openssl:0/1.1 2 0.1%
40 > >
41 > > (note that those are rough measures, not guaranteed to be precise)
42 > >
43 > > So apparently 14.2% of dependencies allow any slot of OpenSSL which is
44 > > most likely wrong, and 1.4% explicitly claim that's what the package
45 > > wants. This could be valid only if e.g. the package supported multiple
46 > > ABIs of OpenSSL libraries and used dlopen() with a few possible SONAMEs
47 > > which I honestly doubt any of those packages is doing.
48 > >
49 > > In other words, 14.2% of dependencies on OpenSSL are plain wrong,
50 > > and 6.4% are wrong in a way that isn't going to be reported by repoman.
51 > > 1.4% of cases are using ':*' which probably indicates the developer
52 > > decided to silence repoman without understanding how slot operators work
53 > > which is a horrible thing from QA perspective.
54 > >
55 > > We also have a few cases that require specific OpenSSL subslot (e.g.
56 > > forcing old version into :0 slot) but *none* actually using the binary
57 > > compatibility slots.
58 > >
59 > >
60 > > Secondly, it is confusing to users. If we remove old versions and only
61 > > keep binary compatibility slots, users can be easily tricked into
62 > > installing them and being surprised it's not a complete package. If we
63 > > keep old versions, we end up having different revisions of the same
64 > > version in different slots which is also easily confused.
65 > >
66 > >
67 > > Thirdly, it is cumbersome to introduce. If we are to introduce a binary
68 > > compatibility slot for a package that didn't have it, we need to update
69 > > all reverse dependencies. This usually means researching whether we
70 > > should use ':0' or ':0=', and if we get this wrong, we just silence
71 > > repoman warning about missing slot-op.
72 > >
73 > >
74 > > All of this considered, I can't think of a single real benefit of using
75 > > slots for this purpose. They work but there's nothing really special
76 > > about them.
77 > >
78 > >
79 > > Suggested replacement
80 > > =====================
81 > >
82 > > My suggestion is to move binary compatibility slots into separate
83 > > packages. For example, dev-libs/openssl would be split into:
84 > >
85 > > dev-libs/openssl -- containing the actual package
86 > >
87 > > dev-libs/openssl-bin-compat -- containing binary compatibility slots
88 > >
89 > > In this case, all dependencies on dev-libs/openssl would become correct
90 > > (or semi-correct, wrt missing := dep) again. Since packages are co-
91 > > installable the same way slots are, there is no loss there. Since
92 > > nothing depends on binary compatibility slots, we do not even need to
93 > > update anything (but if we had, the update cost would be minimal both to
94 > > developers and to users).
95 > >
96 > >
97 > > What do you think?
98 >
99 > I do not like the idea. Slots are very elegant and effective
100 > mechanism and is one of the points where Gentoo outruns other
101 > distributions. Proposed approach with compat packages will
102 > effectively disable slots for most cases.
103
104 You haven't brought a single argument as to how slots are better than
105 compat packages. In fact, it's not even clear if you're talking about
106 the same use of slots that I am.
107
108 > Also proposed change will create a lot of unneeded technical
109 > difficulties in maintaining packages: there will be double ebuilds
110 > to maintain instead of a single one,
111
112 I don't see how this would change the effective number of ebuilds. You
113 can't produce two slots out of a single ebuild, so you always have to
114 duplicate them.
115
116 > ${PN} references will be
117 > broken without additional changes and so far and so on. A lot of
118 > unnecessary rebuilds will happen due slot to package moves.
119
120 Are you saying that there are 'lots' of binary compatibility slots being
121 currently used right now? Could you support this claim with actual
122 numbers or examples?
123
124 > Aside from development questions for me in a role of sysadmin slots
125 > are much easier and understandable to manage than zoo of *compat*
126 > packages in other distributions.
127
128 I don't see how binary compatibility slots are even relevant to
129 sysadmins. Their only purpose is to satisfy dependencies of other
130 packages, so sysadmin should never have to care about them.
131
132 > Assumption that :* is always wrong is invalid, since there are
133 > valid cases: there are apps supporting various API versions
134
135 Binary compatibility slots are used for ABI incompatibility, not any API
136 incompatibility. Also, I have the feeling those 'various API versions'
137 require headers to build.
138
139 > or
140 > using tools/data files without any care from where they are coming.
141
142 Tools aren't included in binary compatibility slots. As James already
143 pointed out in this thread.
144
145 --
146 Best regards,
147 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies