Gentoo Archives: gentoo-user

From: Mark David Dumlao <madumlao@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [Bulk] Re: [gentoo-user] Re: Anyone switched to eudev yet?
Date: Thu, 27 Dec 2012 20:18:27
Message-Id: CAG2nJkO7KaAyg0qTZAP70WOAmM5gAx=Udr2zOE7=XTHkZt0Hdg@mail.gmail.com
In Reply to: Re: [Bulk] Re: [gentoo-user] Re: Anyone switched to eudev yet? by Michael Mol
1 On Fri, Dec 28, 2012 at 2:40 AM, Michael Mol <mikemol@×××××.com> wrote:
2 >> or the fact that some udev programs tend to
3 >> be located in /usr,
4 >
5 >
6 > That's either a bug with those programs, or a need for architectural
7 > improvements within udev. Both plausible answers.
8 >
9
10 The most obvious architectural improvement being: simply place udev
11 where all its dependencies are and all those bugs turn to nothing.
12 Which is what the udev guys did. And the part which seems to elude
13 everyone is: it isn't even a limitation of the program. It can still
14 be installed to /. Heck we could probably make a USE=root-prefix flag
15 for udev that installs it to / instead of /usr.
16
17 >
18 >>
19 >> or even just a solid detailed specification on the
20 >> precise criteria for inclusion into /.
21 >
22 >
23 > For anyone arguing that / and /usr should be separate, the answer to this is
24 > "that ought to be common sense."
25 >
26 > Since I'm not someone who knows all there is to know about the software and
27 > interactions thereof, the most I can say is:
28 >
29 > * / ought to contain all binaries, libraries and static data necessary for
30 > booting beyond the point where / is mounted, and any machine-specific
31 > binaries, libraries and static data.
32 > * /usr ought to contain all binaries, libraries and static data not
33 > necessary for its own mount.
34 >
35
36 I'm sure you mean well, as did most of the architects of the past, but
37 the reality is, this simplistic take on the problem misses out on some
38 fundamental issues. Yes, you mention later that the spec just doesn't
39 specify what happens in such and such case, and try to trivialize it
40 into saying people think that specs should "be able to do their
41 thinking for them". But unfortunately, specifying what happens is
42 exactly what specs are for!
43
44 However...
45
46 >>
47 >> Even the FHS is mum on all the
48 >> extra crap we randomly decide between / and /usr to land in.
49 >
50 >
51 > So fix it. FHS was a document written to say "we have a standard" that
52 > happened to map almost cleanly to all the implementations of the day. Kinda
53 > like how SQL mapped "almost cleanly" to the existing RDBMSs that existed
54 > when it was introduced. Such is how standards documents are born.
55 >
56
57 Don't forget that FHS is heavily an after-the-fact descriptive
58 document of what is happening in practice, with heavy "rationale"
59 sections describing what's going on in the wild. Before you can fix
60 FHS, you first have to fix the practice, then FHS can get amended to
61 reflect what's going on.
62
63 And the "we have a standard" part is effectively not true anymore, on
64 the matter of the / and /usr split. That is - what the specification
65 says should happen is not happening, on a massive scale, because it
66 turns out that it's not that trivial to determine which binaries go in
67 / and which go in /usr. Now that doesn't translate to epic disasters
68 of biblical proportion, fire and brimstone, rivers and seas boiling,
69 dogs and cats living together, mass hysteria - because it's just a
70 collection of hard to pin down "essential" boot programs - but it does
71 translate to an unsustainable practice in distro development / package
72 management.
73
74 http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM
75
76 """
77 Purpose:
78 The contents of the root filesystem must be adequate to boot, restore,
79 recover, and/or repair the system.
80
81 To boot a system, enough must be present on the root partition to
82 mount other filesystems. This includes utilities, configuration, boot
83 loader information, and other essential start-up data. /usr, /opt, and
84 /var are designed such that they may be located on other partitions or
85 filesystems.
86
87 To enable recovery and/or repair of a system, those utilities needed
88 by an experienced maintainer to diagnose and reconstruct a damaged
89 system must be present on the root filesystem.
90
91 To restore a system, those utilities needed to restore from system
92 backups (on floppy, tape, etc.) must be present on the root
93 filesystem.
94 """
95
96 * some teasers:
97 [1] udev rules themselves being a case in point. I mean, do the
98 requisite binaries belong in /? For example, there's a virtualbox udev
99 rule in /usr that doesn't mount other filesystems or stop udev from
100 starting. However, given the right race conditions, udev will fail to
101 start the requisite script because /usr isn't mounted.
102 [2] fuse-based filesystems allow an administrator the crazy
103 possibility of, for example, demanding that /home be an ssh
104 connection. Should the ssh client belong in /? ftp? substitute any
105 arbitrary client program.
106 [3] a fuse-based filesystem depends on a local network service being
107 started. For example, someone writes a crazy fuse mysql browser that
108 also is coincidentally mounted at boot time. Should the mysqld service
109 belong in /? ldap? substitute any arbitrary server program.
110 [4] /root (which is why it's separated from /home) contains docs and
111 custom utilities used by root user for recovery. Unfortunately,
112 there's a lot of perl scripts there specifically for doing filesystem
113 checks / reports. Should perl be in in /? substitute any scripting
114 language.
115
116 The point is not whether _you_ can come up with an answer for _your_
117 own case. A _standard_ speaks for everyone that conforms to it. If it
118 doesn't, or it comes up with conflicting use cases as above, the spec
119 is broken. The fact that edge cases are appearing (and would all
120 disappear if / and /usr were merged) is a hint that something funny is
121 going on.
122 --
123 This email is: [ ] actionable [ ] fyi [x] social
124 Response needed: [ ] yes [x] up to you [ ] no
125 Time-sensitive: [ ] immediate [ ] soon [x] none

Replies

Subject Author
Re: [Bulk] Re: [gentoo-user] Re: Anyone switched to eudev yet? Michael Mol <mikemol@×××××.com>