Gentoo Archives: gentoo-dev

From: "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Proper distribution integration of kernel *-sources, patches and configuration.
Date: Mon, 01 Jul 2013 16:18:30
Message-Id: 51D1AC39.8070008@gentoo.org
In Reply to: [gentoo-dev] Proper distribution integration of kernel *-sources, patches and configuration. by Tom Wijsman
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 07/01/2013 10:41 AM, Tom Wijsman wrote:
5 > Hello
6 >
7 >
8 > Please reply to gentoo-dev in case ML daemon changes Reply-To.
9 >
10 >
11 > ### TL; DR ###
12 >
13 > By introducing feature patches which menu options are disabled by
14 > default to genpatches, we can deduplicate *-sources maintainers as well
15 > as large groups of users work. By introducing a distribution section
16 > in the menuconfig, we can provide options that enable minimal Gentoo
17 > requirements by default (DEVTMPFS, making Gentoo systems bootable since
18 > an udev release a long time ago) and other distribution stuff.
19 >
20 >
21 > ### Proper distribution integration of kernel *-sources, patches ... ###
22 >
23 > Gentoo is a distribution; but what is a distribution that doesn't
24 > properly integrate what it provides, but instead expects its users to
25 > do so, needlessly duplicating work amongst its maintainers and users.
26 >
27 > Let's say I want genpatches, aufs and TuxOnIce; closest candidates:
28 >
29 > - sys-kernel/aufs-sources: genpatches, aufs
30 > - sys-kernel/pf-sources: genpatches, CK, BFQ, BFQ, TuxOnIce, UKSM
31 > - sys-kernel/tuxonice-sources: genpatches, TuxOnIce
32 >
33 > What do I do? Take one (eg. aufs) and apply the other (eg. TuxOnIce)?
34 > What if I want to add another common patchset to it? Hardened perhaps?
35
36 Some patches are reasonably easy to combine, such as genpatches and
37 aufs. Some patches are difficult to combine, such as hardened and *.
38 When you combine hardened patches and aufs (for example) you need extra
39 patches. I would be THRILLED to see the number of sources cut down, but
40 hardened-sources must be it's own thing (that said, I'll personally
41 maintain the aufs patches for hardened if they wanted to add a USE=aufs
42 flag).
43 >
44 > You can see, some of these sources (like pf-sources) already attempt to
45 > do so; with pf-sources in mind, why do we even have ck-sources,
46 > tuxonice-sources in the Portage tree? Just to duplicate work?
47 >
48 > I think we should trim down on the amount of *-sources and combine
49 > multiple patches into genpatches. Take an example of geek-sources
50 > which does all this without a problem; I don't really like the approach
51 > with USE flags used there, as the menuconfig can just cover that.
52 >
53 > https://github.com/init6/init_6/wiki/geek-sources
54 >
55 > What does a patch introducing new features really do? Or rather, what
56 > should it do when we add it? Let me summarize:
57 >
58 > 1) The features should be disabled by default.
59 > 2) These feature should depend on a non-vanilla / experimental option.
60 If users want a vanilla kernel, they want vanilla-sources. Nothing
61 about that should change. I don't feel that it would be honest to add a
62 vanilla use flag to gentoo-sources as in no reality are those vanilla.
63
64 Thanks,
65 Zero
66
67 > 3) The patch should not affect the build by default.
68 > 4) The user can optionally enable the feature.
69 >
70 > So, in genpatches, since 3.9.7, BFQ was added to try this out (except
71 > 2.). Ensured it to be disabled by default, did not affect the build for
72 > anyone that does not enable it and the users have been enabling and
73 > using it on their own. So, does it differentiate more from vanilla? No.
74 >
75 > This helps users as well as maintainers to not have to apply BFQ on
76 > their own, they simply have to tick a config option and they are set.
77 > If all patches that introduce new features are added in this fashion,
78 > it spares large groups of users from having to do this on their own; we
79 > can also deduplicate the work in the Portage tree this way.
80 >
81 >
82 > ### ... and configuration. ###
83 >
84 > This problem is not only visible for patches, but also in the config.
85 >
86 > Meet CONFIG_DEVTMPFS; forget to enable it, greet a failing boot. We're
87 > telling users to enable it in some places, in the handbook it's a single
88 > line you must read, on the Wiki it's kind of missing unless you are
89 > luckily on the right page, on the Quick Install book it is missing too.
90 >
91 > So, we are currently providing a configuration that expects anyone to
92 > enable CONFIG_DEVTMPFS. But you have to remember that it need to make
93 > sure you read about it or enable it from the udev upgrade a while ago
94 > if you decide to start from a fresh config or are installing without
95 > that handbook you kind of have memorized.
96 >
97 > Searching for CONFIG_DEVTMPFS in the forums and #gentoo logs shows that
98 > this is quite often suggested as a fix and quite often actually fixes
99 > an user's boot. Why duplicate telling users to do that if we can do it?
100 >
101 > There are a small set of other variables in this nature, mostly *TMPFS*.
102 >
103 > This is why I think it would be handy to add a Gentoo section to the
104 > kernel, along the lines as described by Linus.
105 >
106 > https://lkml.org/lkml/2012/7/13/369
107 >
108 > The same goes for asking the user to enable configuration options in the
109 > kernel, why can't we just tell him to enable all option that toggles
110 > support for the user. For example; in the Gentoo section, there would be
111 > a "Init System Support" under which you can toggle an option to support
112 > the minimal requirements for some init system.
113 >
114 > Feedback is very welcome.
115 >
116 > P.S.: Not everything in this mail has been acked by the kernel lead;
117 > only some thoughts, I was suggested to take this to ML for discussion.
118 > The usage of the word 'we' in this mail is therefore hypothetical.
119 >
120 >
121 > ### F.A.Q. ###
122 >
123 > Q: I don't want feature X? Please don't add the patch!
124 >
125 > A: It's optional, don't enable it in your menu config.
126 >
127 > Q: What about my stable server? I really don't want to run this stuff!
128 >
129 > A: These options would depend on !CONFIG_VANILLA or CONFIG_EXPERIMENTAL
130 > which would be disabled by default, therefore if you keep this option
131 > the way it is on your stable server; it won't affect you.
132 >
133 > In other words, genpatches stay as stable as before; unless you
134 > explicitly toggle options that intentionally make it unstable.
135 >
136 > Q: Genpatches used to be minimal, would it gain weight?
137 >
138 > A: If you don't enable those options, it would be as minimal as before;
139 > this gives the user the choice between minimal and fat.
140 >
141 > Q: What about patches that fail to build / run?
142 >
143 > A: For testing kernels (~), we would do our best to make them work but
144 > there could be occasions where we will have to cut them; this is no
145 > different from how the kernel herd has been handling this before, we
146 > have already dropped fbcondecor in the past when it was broken and
147 > the current new branch 3.10 does not support deblob yet.
148 >
149 > For stable kernels, which are near the EOL of a branch; if the
150 > feature isn't still there yet then it means that its author is
151 > simply no longer working on it, this is no different from when the
152 > patch would be in another *-sources or manually applied by the user.
153 >
154 > If you are unaware of how upstream releases work, just note that
155 > the major patch between 3.9.8 and 3.10.0 introduces a lot more
156 > changes are applied than the minor patch between 3.9 and 3.9.8;
157 > therefore, we prefer to stabilize 3.9.8 or a later 3.9 kernel than
158 > stabilizing 3.10.0. You can see this pattern in history; the
159 > previous three have been 3.6.11, 3.7.10 and 3.8.13.
160 >
161 > Q: Can't you do something about those build and runtime failures?
162 > I like to run testing, but I don't want breaks half of the time.
163 >
164 > A: To cover this, live ebuilds help, 3.10.9999 and 3.9999 and 9999;
165 > the earlier ones tracking the stable queues, whereas the last one
166 > tracking the upstream rc kernel. This way we can notice what fails
167 > in advance and make it working by the time it reaches testing (~).
168 >
169 > That being said, it is to be expected that things are not always
170 > fine very early in a branch; it's why those kernels are never stable.
171 >
172 > Q: What about kernel bugs, how would you know the user enabled them?
173 >
174 > A: We expect the .config to be provided, which we can run a sanity
175 > check on; it's much more handy if we are aware of these patches than
176 > that we have to figure out the user applies it on their own.
177 >
178 > Q: Are documentation / infrastructure / eclass changes necessary?
179 >
180 > A: The kernel project documentation has to be updated to reflect this;
181 > no infrastructure or eclass changes are needed, since this is all
182 > done through patches in genpatches. (Sub directories supported afaik)
183 >
184 > Q: Does this affect kernel stabilization or QA?
185 >
186 > A: No, experimental features (which would include these optional
187 > features) have historically never been looked at by the arch teams;
188 > if you can remember, there used to be an CONFIG_EXPERIMENTAL option
189 > in the kernel to cover this. For example, you can find yourself
190 > running some pretty unstable code if you use 3.8.13 and enable
191 > Nouveau reclocking and power management; there are some options in
192 > the menuconfig that follow this nature.
193 >
194 > As there would be less *-sources as a consequence; less has to be
195 > taken into consideration for stabilization, this is why most
196 > *-sources are currently unstable, because we don't have the
197 > resources to be stabilizing them all.
198 >
199 > For QA, I don't really see a problem.
200 >
201 > Q: So, would this make vanilla-sources the new gentoo-sources?
202 >
203 > A: No, vanilla-sources undergoes some changes to more closely reflect
204 > the upstream kernels; as a consequence, it would no longer have
205 > stable kernels and older versions will drop more often. You can read
206 > this request and the resulting discussion at the following link.
207 >
208 > http://thread.gmane.org/gmane.linux.gentoo.kernel/697
209 >
210 > The kernel lead summarized a part of this.
211 >
212 > http://thread.gmane.org/gmane.linux.gentoo.kernel/697/focus=730
213 >
214 > Q: Is this a one man army comedy show?
215 >
216 > A: One man army comedy shows work, see geek-sources; if you want to
217 > look at some examples of what a one man army can do, the following
218 > link is a good read to go through.
219 >
220 > http://www.bennorthrop.com/Essays/2013/pair-programming-my-personal-nightmare.php
221 >
222 > But joking aside; no, we are not.
223 >
224 > We are at least with two on the kernel herd and a third developer is
225 > likely to join in the near future; on top of that, other people are
226 > welcome and I think it would be nice to see maintainers from
227 > *-sources jump in to help along. genpatches isn't hard to maintain.
228 >
229 > Since we're no longer a one man army, we can do more.
230 >
231
232 -----BEGIN PGP SIGNATURE-----
233 Version: GnuPG v2.0.19 (GNU/Linux)
234 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
235
236 iQIcBAEBAgAGBQJR0aw5AAoJEKXdFCfdEflKc+AQAKGa7v+beI5x6oBFoMCri4xM
237 pVX3jNdjtqidNg9Kyg5yMtoUl2WW6jJp8nIgd+gLeJ+8aNg1G/L94Jc4iRIHw8TH
238 Rv1oTafAa7Xc76ZxOvNHJMQNjTV+DtTsGuAKD0KAeEOJ6ld+wwS55D26NGXYAe0i
239 J1wPR7ndDHscBQQCGS+S4qAgHvfLaVq6wu7oQaGi9CTBTT1AtlmhkbBTH2qHTBJX
240 ZV98+hqiLBto6A42FmmZbqEooFWMGtcoJzlZNYCZduQ6uODPy30vt55dhh2OKsZW
241 5FCmUNdiekY8KRFWlYfcVFPAsrKVCutba/PEZunm9WwZ1Z9AoVz8WzBBLQU6b30P
242 vAzkUeTfET+y/NnKcuEO7j7CRXXm3+IjbNRPJ8qh5KiEiq1QfyxiOvZBQe08PhdP
243 i2Hxau6RhGeHVedyv9quImxBwNTdBgdJjuLlEP6cPBRMUb9HNqa0YNdsZ8CYu8I3
244 6rbL3pbUJmzhUUsbgV5nFdIZOlKWHOICzOuwKnR8T9OklWhI12gZUEePfYvk2Rl1
245 v5pYsse25O2FduNu24bwDI8qnUvtfEsqLpr9y5z0e94BX0FUR1wITb8Zp4KsKzo3
246 +R9nzQFqe9cF544Pt1Bp1ljpXEfXQl05aYEWEBFttkLSxHxMNtv2lHFh4C3Q9NNm
247 s4P30hArFvTeCo4OIfOd
248 =+mZ8
249 -----END PGP SIGNATURE-----

Replies