Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Cc: multilib <multilib@g.o>, qa <qa@g.o>
Subject: Re: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages
Date: Sat, 19 Jan 2019 11:14:38
Message-Id: 1547896465.11707.3.camel@gentoo.org
In Reply to: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages by "Michał Górny"
1 Ühel kenal päeval, R, 18.01.2019 kell 21:13, kirjutas Michał Górny:
2 > Hello,
3 >
4 > Since I've been working on the early gx86-multilib, we've been using
5 > 'binary-only SLOTs' to support providing old versions of libraries
6 > for
7 > prebuilt software. I think this was a bad idea, and I'd like to
8 > suggest
9 > replacing it with something cleaner, for the reasons outlined below.
10 >
11 >
12 > Current state
13 > =============
14 >
15 > Let's take dev-libs/openssl as an example. This package has three
16 > SLOTs
17 > right now:
18 >
19 > 0.9.8: 0.9.8z_p8-r1
20 > 1.0.0: 1.0.2q-r200
21 > 0 : 1.0.2q 1.1.0j 1.1.1a 1.1.1a-r1
22 >
23 > The real package is provided as slot :0, that includes all libraries,
24 > headers and executables. Slots 0.9.8 and 1.0.0 only install .so.N*
25 > libraries that can be used to satisfy dependencies of prebuilt
26 > packages.
27 >
28 >
29 > Problems with the current state
30 > ===============================
31 >
32 > Firstly, it is confusing to developers. Let's analyze the
33 > dependencies
34 > on dev-libs/openssl. A quick grep reveals seven patterns. They are
35 > listed below, along with occurrence counts and percentages:
36 >
37 > dev-libs/openssl 278 7.8% }
38 > dev-libs/openssl:* 49 1.4% } 14.2%
39 > dev-libs/openssl:= 178 5.0% }
40 > dev-libs/openssl:0 660 18.6%
41 > dev-libs/openssl:0= 2381 67.0%
42 > dev-libs/openssl:0/0 4 0.1%
43 > dev-libs/openssl:0/1.1 2 0.1%
44 >
45 > (note that those are rough measures, not guaranteed to be precise)
46 >
47 > So apparently 14.2% of dependencies allow any slot of OpenSSL which
48 > is
49 > most likely wrong, and 1.4% explicitly claim that's what the package
50 > wants. This could be valid only if e.g. the package supported
51 > multiple
52 > ABIs of OpenSSL libraries and used dlopen() with a few possible
53 > SONAMEs
54 > which I honestly doubt any of those packages is doing.
55 >
56 > In other words, 14.2% of dependencies on OpenSSL are plain wrong,
57 > and 6.4% are wrong in a way that isn't going to be reported by
58 > repoman.
59 > 1.4% of cases are using ':*' which probably indicates the developer
60 > decided to silence repoman without understanding how slot operators
61 > work
62 > which is a horrible thing from QA perspective.
63 >
64 > We also have a few cases that require specific OpenSSL subslot (e.g.
65 > forcing old version into :0 slot) but *none* actually using the
66 > binary
67 > compatibility slots.
68 >
69 >
70 > Secondly, it is confusing to users. If we remove old versions and
71 > only
72 > keep binary compatibility slots, users can be easily tricked into
73 > installing them and being surprised it's not a complete package. If
74 > we
75 > keep old versions, we end up having different revisions of the same
76 > version in different slots which is also easily confused.
77 >
78 >
79 > Thirdly, it is cumbersome to introduce. If we are to introduce a
80 > binary
81 > compatibility slot for a package that didn't have it, we need to
82 > update
83 > all reverse dependencies. This usually means researching whether we
84 > should use ':0' or ':0=', and if we get this wrong, we just silence
85 > repoman warning about missing slot-op.
86 >
87 >
88 > All of this considered, I can't think of a single real benefit of
89 > using
90 > slots for this purpose. They work but there's nothing really special
91 > about them.
92 >
93 >
94 > Suggested replacement
95 > =====================
96 >
97 > My suggestion is to move binary compatibility slots into separate
98 > packages. For example, dev-libs/openssl would be split into:
99 >
100 > dev-libs/openssl -- containing the actual package
101 >
102 > dev-libs/openssl-bin-compat -- containing binary compatibility
103 > slots
104 >
105 > In this case, all dependencies on dev-libs/openssl would become
106 > correct
107 > (or semi-correct, wrt missing := dep) again. Since packages are co-
108 > installable the same way slots are, there is no loss there. Since
109 > nothing depends on binary compatibility slots, we do not even need to
110 > update anything (but if we had, the update cost would be minimal both
111 > to
112 > developers and to users).
113 >
114 >
115 > What do you think?
116
117 I can only find bikeshed painting for the naming of the legacy
118 packages, so I guess sounds good. Though that historical digging about
119 why we moved away from it may be useful, if just to find that it was
120 just a "SLOTs are cool, lets use them" case, to strengthen the argument
121 to move back to separate package again.
122
123
124 Mart

Attachments

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