Gentoo Archives: gentoo-dev

From: Patrick McLean <chutzpah@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: virtual/libcrypt for libcrypt.so implementation
Date: Thu, 07 Nov 2019 21:36:59
Message-Id: 20191107133652.09c61426@patrickm.gaikai.org
In Reply to: Re: [gentoo-dev] rfc: virtual/libcrypt for libcrypt.so implementation by Sergei Trofimovich
1 On Thu, 7 Nov 2019 20:40:40 +0000
2 Sergei Trofimovich <slyfox@g.o> wrote:
3
4 > On Thu, 7 Nov 2019 11:52:19 -0800
5 > Patrick McLean <chutzpah@g.o> wrote:
6 >
7 > > Given glibc upstream's tentative plans to remove libcrypt [1], I
8 > > think we should start working out the kinks well in advance.
9 > > Toolchain has already added a package.use.force-ed "crypt" USE flag
10 > > to sys-libs/glibc-2.30-r2 [2]. The main alternative out there is
11 > > libxcrypt, which I have recently bumped and added a
12 > > package.use.mask-ed "system" USE flag to make it provide the
13 > > "system" version of libcrypt.so.
14 > >
15 > > To give us time to work out dependencies in advance, I would like to
16 > > propose a virtual to provide libcrypt.so, and we can gradually
17 > > update all users of libcrypt to {R,}DEPEND on this virtual.
18 >
19 > It's not clear how this virtual is supposed to work when
20 > sys-libs/libxcrypt actually changes ABI. Do we care about the missing
21 > rebuilds or we do not?
22
23 I clarified this in a reply to mgorny's message.
24
25 >
26 > If we don't it's (not ideal but) fine. But it should be stated
27 > explicitly and consequences should be described: does
28 > sys-libs/libxcrypt override glibc's libcrypt.so.1 and break existing
29 > applications? Or we guarantee it not to happen?
30 >
31 > > elibc_glibc? ( || (
32 > > sys-libs/glibc[crypt(+)]
33 > > sys-libs/libxcrypt[system(-)]
34 > > )
35 > > )
36 >
37 > Same for switching providers back and forth. For example, should we
38 > allow user to come back from sys-libs/libxcrypt to sys-libs/glibc?
39
40 With the current dual-library approach, switching back and fourth is
41 possible, but may involve a preserved-libs rebuild of recently built
42 packages. Portage does detect this and handle it cleanly.
43
44 >
45 > > Maybe once this is in place and the obvious/common packages are
46 > > updated, we could request a tinderbox run to flush out what was
47 > > missed.
48 >
49 > I don't think tinderbox will find much as util-linux, shadow or any
50 > other low-level package will pull it in as a dependency and be
51 > silently available.
52
53 I suppose that is true, though we could detect via the NEEDED* files
54 that portage generates in the vdb (we just need _all_ packages to be
55 installed somewhere at some point to detect it).
56
57 >
58 > I think you'll need to do extra to find those. Like, removing
59 > libcrypt.so to make sure linker won't find it even if libcrypt.so.1
60 > is available.
61
62 That is another approach, we could do some hackery in the tinderbox
63 once the basic system packages are there so we can detect those.
64
65 >
66 > > [1]
67 > > https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=50479f17c9a3a5ef074dafa3f23aca954b82bd6a;hb=HEAD#l768
68 > > [2] https://bugs.gentoo.org/699422
69 >
70 >