Gentoo Archives: gentoo-dev

From: Mike Pagano <mpagano@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Guidance on adding kernel config checks to ebuilds
Date: Mon, 27 Sep 2021 16:23:47
Message-Id: 21b73b7f-5b20-9ad1-e630-b07ddd378683@gentoo.org
In Reply to: [gentoo-dev] Guidance on adding kernel config checks to ebuilds by Mike Gilbert
1 On 9/27/21 12:10 PM, Mike Gilbert wrote:
2 > I'm looking to solicit opinions on when it is appropriate for an
3 > ebuild to check for kernel config options using linux-info.eclass. I
4 > don't think we have any guidelines documented, instead leaving it up
5 > to the "common sense" of package maintainers.
6 >
7 > Adding linux-info calls to pkg_pretend or pkg_setup causes slowdowns
8 > when running emerge, so we should do so only when there is a
9 > compensating benefit. It doesn't make sense to check for kernel
10 > options that are very commonly enabled. But what is "very common"?
11 >
12 > An obvious example would be CONFIG_INET, which controls IPv4 support
13 > in the kernel. It does not make sense to check for that in every
14 > package that uses AF_INET sockets.
15 >
16 > A less obvious example: a user filed a bug against net-misc/dhcpcd
17 > today asking that we check for CONFIG_PACKET [1]. My first thought was
18 > "why would you ever disable that?". The option description even says
19 > "if unsure, say Y". However, I suppose it is technically possible to
20 > run a Linux system with it disabled.
21 >
22 > I think a reasonable rule of thumb would be to assume we can rely on
23 > options that are enabled by "make defconfig". If the user chooses to
24 > disable them, they are responsible for anything that breaks.
25 >
26 > Thoughts?
27 >
28 > [1] https://bugs.gentoo.org/815064
29 >
30
31 The challenge I see is that these config checks head off bugs and issues without our intervention.
32
33 We as kernel maintainers depend on ebuild maintainers to check these things so they don't become "kernel bugs" to figure out.
34
35 > Adding linux-info calls to pkg_pretend or pkg_setup causes slowdowns
36 > when running emerge, so we should do so only when there is a
37 > compensating benefit.
38
39 Is this a significant slowdown? Do you have any numbers?

Replies