Gentoo Archives: gentoo-dev

From: "Steven J. Long" <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: gentoo-checkconf script Re: Re: [gentoo-kernel] Proper distribution integration of kernel *-sources, patches and configuration.
Date: Wed, 03 Jul 2013 11:39:23
Message-Id: 20130703114059.GB9789@rathaus.eclipse.co.uk
In Reply to: gentoo-checkconf script Re: [gentoo-dev] Re: [gentoo-kernel] Proper distribution integration of kernel *-sources, patches and configuration. by Michael Weber
1 Michael Weber wrote:
2 > Anthony G. Basile wrote:
3 > > Now I'm confused because gentoo-sources is gentoo specific. It
4 > > contains stuff that we need in gentoo but other distros do not
5 > > need, like our end-to-end support for certain xattr namespaces. If
6 > > you remove these then we must either 1) maintain a userland which
7 > > is not in line with other distros or 2) give up on critical
8 > > features we want in gentoo, like markings on elf object in
9 > > user.pax.flags and certain caps, as well as in the future
10 > > preserving selinux labels through emerge. Upstream will not accept
11 > > them because of "who needs that crap" and we can't give them up
12 > > without loosing core functionality. Feel free to review those
13 > > patches but don't ask us to drop them from gentoo-sources because
14 > > their not in upstream.
15
16 Indeed. Every distro has their own kernel patches, and to all sorts of
17 software. That's why we use it, since things are integrated, and in
18 Gentoo we get as close to upstream as possible, while still useful.
19
20 > What about a check-kernel-config-for-gentoo-compliance script for
21 > starterts?
22 >
23 > I manage a handfull of kernel configs over some years (laptop vs.
24 > server, graphics, firewalling capabilities) and was always tempted to
25 > write an script to check if the config meets a certain set of
26 > requirements. I think of "xattr", "selinux", "gentoo-boot" and so on,
27
28 That makes sense.
29
30 > that can be expanded by users demand, like, "CONFIG_CMDLINE should
31 > include" and "CONFIG_DEFAULT_HOSTNAME=x" and "all iptables target on".
32 Something like this?
33 $KBUILD_SRC=${1:-.}
34 # default user check function
35 usr_config_check(){
36 :
37 }
38 user_script=$KBUILD_SRC/gentoo-user-check
39
40 if [ -f $user_script ]; then
41 # allow user to override settings
42 . "$user_script" || die "unable to source user script: $user_script"
43 fi
44 ..main script..
45 usr_config_check "$VERSION" "$PATCHLEVEL" etc.. || die "failed user check"
46 ..cleanup..
47 exit 0
48
49 > An additional make target in gentoo-sources could the warn about any
50 > missing feature, and ask for "yes" or wait some seconds.
51 > (I remember reaging some funny note about my kernel supporting x32 but
52 > by userland not, like that kernel build would run on that userland)
53
54 Yeah, if it ran after config, it could do simple checks at least, to begin
55 with. Looking at linux/Makefile, we could just add:
56 $(Q)gentoo-check-config "$KBUILD_SRC"
57 after: $(Q)$(MAKE) $(build)=scripts/kconfig $@
58 ..in config. I'm not sure if you'd need it for %config case as well; I
59 don't see the need in the context of overall sanity checks.
60
61 It would be useful though, to check for required things like {DEV,}TMPFS
62
63 --
64 #friendly-coders -- We're friendly, but we're not /that/ friendly ;-)