Gentoo Archives: gentoo-dev

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