1 |
On Tue, 2020-12-29 at 13:21 +0000, Peter Stuge wrote: |
2 |
> Michał Górny wrote: |
3 |
> > > 2. Install them into different prefixes (eg /usr/lib/openssl + |
4 |
> > > /usr/lib/libressl and have the linker link to a specific version, |
5 |
> > > /usr/include/{openssl,libressl} too). |
6 |
> > |
7 |
> > For the record, this is something I've been wondering about for a |
8 |
> > long |
9 |
> > time. However, there are two problems with that: a small one |
10 |
> > and a huge one. |
11 |
> > |
12 |
> > The small problem is that this requires a lot of additional |
13 |
> > downstream |
14 |
> > work. I mean, you have to explicitly support the choice in ebuilds, |
15 |
> > and this means making things even harder for newcomers. |
16 |
> |
17 |
> pkg-config/pkgconf and .pc files can help with this part, taking care |
18 |
> of all abstraction if/when downstream uses a libressl.pc. |
19 |
|
20 |
As we have learned from the ncurses[tinfo] debacle, 80% of build systems |
21 |
don't use the .pc files, and just guess "-lssl" flags and a bunch of |
22 |
include dirs. Hence, this boils down to patching a mountain of build |
23 |
systems again, which while being the ultimately correct way, is a pipe |
24 |
dream. |
25 |
|
26 |
> > The big problem is that (unless I'm mistaken) we won't be able to |
27 |
> > load |
28 |
> > LibreSSL and OpenSSL to the same executable. So we'd actually have |
29 |
> > to |
30 |
> > enforce that the whole link chain links to the same SSL provider, |
31 |
> > and effectively land pretty close to where we are now. |
32 |
> |
33 |
> I'd suggest investigating whether symbol versioning could help with |
34 |
> this, |
35 |
> or if the only way forward would indeed be to require some symbol |
36 |
> mangling/rewriting. |
37 |
|
38 |
While this sounds like a theoretical solution, it isn't tractable |
39 |
because |
40 |
1. We're inventing our own ABI that is incompatible with everyone else's |
41 |
2. We'd have to maintain a huge swamp of downstream patches |
42 |
3. ABI can still break even with perfect symbol versioning |