1 |
On Sat, Mar 27, 2021 at 05:43:34PM -0400, Joshua Kinard wrote: |
2 |
> On 3/23/2021 07:31, Rich Freeman wrote: |
3 |
> > On Mon, Mar 22, 2021 at 6:54 PM Andreas K. Huettel <dilfridge@g.o> wrote: |
4 |
> >> |
5 |
> >>>> Council decided years ago that we don't support separate /usr without |
6 |
> >>>> an initramfs, but we haven't completed that transition yet. |
7 |
> >>> |
8 |
> >>> Which doesn't imply that we deliberately break things. |
9 |
> >> |
10 |
> >> That's right. Though we should at some point start thinking about an end of support for separate usr without initramfs. |
11 |
> >> |
12 |
> > |
13 |
> > Just to clarify - it is already unsupported at a distro level. It is |
14 |
> > just that some individual packages still work with it. |
15 |
> > |
16 |
> > The current Council decisions on the issue are (just providing for |
17 |
> > general reference): |
18 |
> > |
19 |
> > - "Since that particular setup may already be subtly broken today |
20 |
> > depending on the installed software, Council recommends using an |
21 |
> > early boot mount mechanism, e.g. initramfs, to mount /usr if /usr |
22 |
> > is on a separate partition." |
23 |
> > Accepted unanimously. [1] |
24 |
> > |
25 |
> > - "The intention is to eventually not require maintainers to support |
26 |
> > a separate /usr without an early boot mechanism once the Council |
27 |
> > agrees that the necessary docs/migration path is in place." |
28 |
> > Accepted with 4 yes votes, 1 no vote, 2 abstentions. [1] |
29 |
> > |
30 |
> > - "The Council agrees that all preparations for dropping support for |
31 |
> > separate /usr without an initramfs or similar boot mechanism are |
32 |
> > complete. A news item will be prepared, and users will be given one |
33 |
> > month to switch after the news item has been sent." |
34 |
> > Accepted with 5 yes votes, 1 no vote, 1 abstention. [2] |
35 |
> > |
36 |
> > Current policy documentation: |
37 |
> > Developers are not required to support using separate /usr filesystem |
38 |
> > without an initramfs. [3] |
39 |
> > |
40 |
> > 1 - https://projects.gentoo.org/council/meeting-logs/20130813-summary.txt |
41 |
> > 2 - https://projects.gentoo.org/council/meeting-logs/20130924-summary.txt |
42 |
> > 3 - https://projects.gentoo.org/qa/policy-guide/filesystem.html#pg0202 |
43 |
> |
44 |
> Is there a list of software/ebuilds that currently do this "subtle" handling |
45 |
> of separate /usr w/o initramfs? |
46 |
> |
47 |
> I've got just my MIPS systems left that use a separate /usr and do not boot |
48 |
> with initramfs because I build fully monolithic kernels and that makes the |
49 |
> resulting vmlinux images run up against hard size limits in the SGI PROM |
50 |
> (firmware, BIOS, etc) on these machines if I try to pack too large of an |
51 |
> initramfs in. I can check for any software that may be switched over soon |
52 |
> to a hard initramfs requirement and look at my options. |
53 |
|
54 |
One group of packages involved in this is any package that calls |
55 |
gen_usr_ldscript. We have this function for a couple of reasons. |
56 |
|
57 |
Gentoo has a policy that bans *.a static libraries from being |
58 |
installed in /lib*. I think this policy is unique to Gentoo, |
59 |
because Most build systems I've seen do not |
60 |
have separate paths for static vs dynamic libraries, so all libraries |
61 |
from a package are installed in /usr/lib* or /lib*. This policy was |
62 |
originally hard coded into portage some time back (I can find the commit |
63 |
if you want it) before it was made a formal policy by the qa team. |
64 |
It has since become a formal policy. |
65 |
|
66 |
Because of this policy, we have to tell upstream build systems to |
67 |
install libraries in ${ED}/usr/$(get_libdir). This is fine unless you |
68 |
have separate usr with no initramfs. In that case, you have binaries on |
69 |
/ that link to shared libraries on /usr. When we saw this happening, we |
70 |
started manually moving shared libraries from /usr/lib* to /lib* if |
71 |
someone needed the package at boot time. Then we hit bug 4411 [1] |
72 |
where the linker was prioritizing static libraries in /usr/lib* over shared |
73 |
libraries in /lib*. |
74 |
|
75 |
I don't know if we tried to address that upstream or not, but ultimately |
76 |
gen_usr_ldscript came out of it. |
77 |
|
78 |
Several folks have wanted to get rid of this function for years [2]. |
79 |
|
80 |
I have looked into it before, and there are several things that can be done. |
81 |
|
82 |
We can have packages that currently build static libraries and |
83 |
use gen_usr_ldscript stop building static libraries and use the |
84 |
appropriate setting in their build systems to install libraries in |
85 |
/$(get_libdir). This is the path OpenRC is taking per request of the qa |
86 |
lead. The next release will not support the static-libs use flag. This |
87 |
will actively break anyone who is expecting this use flag to exist for OpenRC. |
88 |
|
89 |
If a package does not build static libraries in the first place, there is |
90 |
really no reason to call gen_usr_ldscript; the ebuild should be using |
91 |
the upstream build system to put the libraries where they need to be. |
92 |
|
93 |
If static libraries are needed for a package that is using |
94 |
gen_usr_ldscript to move shared libraries to /lib*, the only option you |
95 |
have is to drop the gen_usr_ldscript call. If you do that, all of the |
96 |
libraries will stay in /usr/lib*, but as soon as one package takes this |
97 |
path, there will be active breakage for someone who is using a separate |
98 |
/usr without an initramfs. |
99 |
|
100 |
The most controversial thing to do would be the /usr merge. It would |
101 |
affect far more users than the other paths for getting rid of |
102 |
gen_usr_ldscript, but it would make all "separate /usr" concerns go |
103 |
away along with giving us a number of other benefits. |
104 |
|
105 |
The short version is, anything we do to remove the gen_usr_ldscript |
106 |
function will actively break some group of users. |
107 |
|
108 |
William |
109 |
|
110 |
[1] https://bugs.gentoo.org/4411 |
111 |
[2] https://bugs.gentoo.org/417451 |