Michael Weber wrote:
> Anthony G. Basile wrote:
> > Now I'm confused because gentoo-sources is gentoo specific.  It
> > contains stuff that we need in gentoo but other distros do not
> > need, like our end-to-end support for certain xattr namespaces.  If
> > you remove these then we must either 1) maintain a userland which
> > is not in line with other distros or 2) give up on critical
> > features we want in gentoo, like markings on elf object in
> > user.pax.flags and certain caps, as well as in the future
> > preserving selinux labels through emerge.  Upstream will not accept
> > them because of "who needs that crap" and we can't give them up 
> > without loosing core functionality.  Feel free to review those
> > patches but don't ask us to drop them from gentoo-sources because
> > their not in upstream.

Indeed. Every distro has their own kernel patches, and to all sorts of
software. That's why we use it, since things are integrated, and in
Gentoo we get as close to upstream as possible, while still useful.

> What about a check-kernel-config-for-gentoo-compliance script for
> starterts?
> 
> I manage a handfull of kernel configs over some years (laptop vs.
> server, graphics, firewalling capabilities) and was always tempted to
> write an script to check if the config meets a certain set of
> requirements. I think of "xattr", "selinux", "gentoo-boot" and so on,

That makes sense.

> that can be expanded by users demand, like, "CONFIG_CMDLINE should
> include" and "CONFIG_DEFAULT_HOSTNAME=x" and "all iptables target on".
Something like this?
$KBUILD_SRC=${1:-.}
# default user check function
usr_config_check(){
        :
}
user_script=$KBUILD_SRC/gentoo-user-check

if [ -f $user_script ]; then
        # allow user to override settings
        . "$user_script" || die "unable to source user script: $user_script"
fi
..main script..
usr_config_check "$VERSION" "$PATCHLEVEL" etc.. || die "failed user check"
..cleanup..
exit 0

> An additional make target in gentoo-sources could the warn about any
> missing feature, and ask for "yes" or wait some seconds.
> (I remember reaging some funny note about my kernel supporting x32 but
> by userland not, like that kernel build would run on that userland)

Yeah, if it ran after config, it could do simple checks at least, to begin
with. Looking at linux/Makefile, we could just add:
 $(Q)gentoo-check-config "$KBUILD_SRC"
 after: $(Q)$(MAKE) $(build)=scripts/kconfig $@
..in config. I'm not sure if you'd need it for %config case as well; I
don't see the need in the context of overall sanity checks.

It would be useful though, to check for required things like {DEV,}TMPFS

-- 
#friendly-coders -- We're friendly, but we're not /that/ friendly ;-)

Reply via email to