Gentoo Archives: gentoo-dev

From: Richard Yao <ryao@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] usr merge
Date: Wed, 06 Apr 2016 21:36:33
Message-Id: B82FCCAA-B1D4-4E5B-8A65-7DB2513C5513@gentoo.org
In Reply to: Re: [gentoo-dev] usr merge by William Hubbs
1 >> On Apr 6, 2016, at 4:43 PM, William Hubbs <williamh@g.o> wrote:
2 >>
3 >>> On Wed, Apr 06, 2016 at 11:52:52AM -0400, Richard Yao wrote:
4 >>> On 04/06/2016 10:58 AM, M. J. Everitt wrote:
5 >>> What, if any, is the benefit of squashing /usr out of the equation? I
6 >>> happen to have a few workstations that load their /usr off an NFS share
7 >>> presently, with some bodgery-workarounds I did pre the udev notification
8 >>> about initramfs's which I have never got around to implementing
9 >>> (although I'm pretty sure I have the tools now to do, along with UUIDs
10 >>> for boot media).
11 >>
12 >> The idea in Solaris is to enable atomic updates via the /usr mount
13 >> without touching data files in /etc or temporary files in /var. Usually,
14 >> this would be done on reboot and could be propagated to many systems
15 >> either via /usr on NFS or ZFS send/recv.
16 >>
17 >> This works well on Solaris because both software versions are pegged
18 >> (such that file formats in /etc are stable) in favor of backported fixes
19 >> and the FHS does not change across major OS versions. The same goes for
20 >> RHEL.
21 >
22 > Also, there are other benefits to the /usr merge [1].
23
24 Are they worth breaking existing systems that are configured the one way we all know things will break if this is forced? If not, a USE flag would work.
25
26 As for those benefits, they do little for {/usr,}/sbin vs {/usr,}/bin, which is where the incompatibilities tend to live. I encountered one of these in powertop the other day (patch pending). The benefits of being able to access things from both places are somewhat exaggerated given that compatibility among systems has long required searching $PATH and likely always will.
27
28 > Note, we are not
29 > talking about squashing /usr out of the equasion, but merging /bin,
30 > /sbin and /lib* into their counterparts in /usr and creating symlinks in
31 > the root directory pointing to the counterparts in /usr.
32
33 While one guy did the reverse (and the reverse ought to be okay for those that want to do that), no one appears to think that adopting the reverse is what is being suggested. Having this sort of clarity on whether forcing this on everyone via baselayout update, just providing the option for those who want it or some combination of the two (e.g. a long transition period in which both are supported) is being discussed would be nice though. This is not a Boolean decision.
34
35 >> Gentoo systems managed this way will suffer from multiple problems:
36 >>
37 >> * Software updates that change the configuration file format without
38 >> supporting the older format will break.
39 >>
40 >> * Software updates that change the boot scripts will break.
41 >>
42 >> * Future baselayout updates will not be able to touch anything outside
43 >> of /usr and anything requiring such things be touched will break.
44 >>
45 >> * An update to /usr that adds new software will fail to include things
46 >> outside of /usr, like the boot scripts and configuration files.
47 >>
48 >> * The package database will fall out of sync with /usr (or be broken
49 >> period). Presumably, if you are updating this way, you should expect the
50 >> package database to be broken.
51 >>
52 >> These are likely to be mostly fixable, but I do not think we have a plan
53 >> in place to fix them right now. The general staleness of Solaris and
54 >> RHEL handle the first 3 issues for them for free.
55 >>
56 >> I have not looked at the specifics of how Solaris handles the 4th, but I
57 >> know that SMF in OpenSolaris descendents will update manifests on first
58 >> boot into a new boot environment. That suggests to me that the Solaris
59 >> boot scripts handle it by comparing /etc with /usr.
60 >>
61 >> As for the 5th, the package database is not broken in Solaris zones
62 >> where the /usr merge is leveraged to enable easy updates. However, I do
63 >> not know how updating all zones works when zones have independently
64 >> installed software. It might be that the software is installed in
65 >> /usr/local inside the zone and conflicts are the user's problem, but it
66 >> has been so long since I used an illumos distribution (which is
67 >> descended from OpenSolaris) that I do not remember.
68 >
69 > I don't think any of these issues are issues that Gentoo systems
70 > managed like this do not already have.
71
72 That is my point.
73
74 > If you are mounting /usr from nfs right now, for example,
75 > things are worse, because you also have to worry about whether packages
76 > split their installations between /usr/lib*->/lib* and
77 > /usr/{,s}bin->/{s,}bin.
78
79 Only a masochist would want to do this right now. There are saner ways of doing things with the legacy layout than the Solaris way that depends on the /usr merge.
80
81 >>> Whilst these aren't currently scheduled for upgrade, I don't personally
82 >>> see any merit, given discussions here about work needed to 'shore up' a
83 >>> change to match some particular use case. I would therefore definitely
84 >>> agree with those that have proposed that this is an Option and not a
85 >>> standard gentoo install item unless there are some specific caveats that
86 >>> this solves.
87 >>
88 >> The original purpose of the /usr merge in Solaris was to make managing
89 >> updates easier. Redhat realized that and copied it. Copying it too
90 >> without doing the enabling work necessary for a rolling distribution
91 >> would be setting a trap for users who would think that they can manage
92 >> deployments of Gentoo like they can manage deployments Solaris and/or RHEL.
93 >
94 > [1]
95 > https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/

Replies

Subject Author
Re: [gentoo-dev] usr merge William Hubbs <williamh@g.o>
Re: [gentoo-dev] usr merge Alexis Ballier <aballier@g.o>