FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 11-04-2011, 11:59 AM
"Paweł Hajdan, Jr."
 
Default linux-info.eclass: check_extra_config requires a configured kernel

check_extra_config requires a configured kernel
(/usr/src/linux/.config), while I think it should also be satisfied by
/proc/config.gz (i.e. just a way to verify the config, not necessarily
kernel built locally).

An example use case is www-client/chromium, which makes sure the kernel
will support its sandbox. It's generally a bad idea to run without full
sandboxing support (it can work without kernel support, just doesn't
prevent a compromised renderer from connecting to network or sending
signals to processes).

My suggestion is to replace the following code fregment:

if [[ ${config_required} == 0 ]]; then
# In the case where we don't require a .config, we can now bail out
# if the user has no .config as there is nothing to do. Otherwise
# code later will cause a failure due to missing .config.
if ! linux_config_exists; then
ewarn "Unable to check for the following kernel config options due"
ewarn "to absence of any configured kernel sources or compiled"
ewarn "config:"
for config in ${CONFIG_CHECK}; do
local_error="ERROR_${config#~}"
msg="${!local_error}"
if [[ "x${msg}" == "x" ]]; then
local_error="WARNING_${config#~}"
msg="${!local_error}"
fi
ewarn " - ${config#~}${msg:+ - }${msg}"
done
ewarn "You're on your own to make sure they are set if needed."
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXIST S_DONE}"
return 0
fi
else
require_configured_kernel
fi

With something more like this:

# In the case where we don't require a .config, we can now bail out
# if the user has no .config as there is nothing to do. Otherwise
# code later will cause a failure due to missing .config.
if ! linux_config_exists; then
ewarn "Unable to check for the following kernel config options due"
ewarn "to absence of any configured kernel sources or compiled"
ewarn "config:"
for config in ${CONFIG_CHECK}; do
local_error="ERROR_${config#~}"
msg="${!local_error}"
if [[ "x${msg}" == "x" ]]; then
local_error="WARNING_${config#~}"
msg="${!local_error}"
fi
ewarn " - ${config#~}${msg:+ - }${msg}"
done
ewarn "You're on your own to make sure they are set if needed."
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXIST S_DONE}"
if [[ ${config_required} == 0 ]]; then
return 0
else
die "unable to check for required kernel options"
fi
fi

Thoughts?
 
Old 11-04-2011, 12:13 PM
Fabio Erculiani
 
Default linux-info.eclass: check_extra_config requires a configured kernel

Anything using /proc/config.gz is broken.

For the following reasons:
1) could be not available (CONFIG not enabled)
2) doesn't reflect the kernel you're compiling against (chrooted env,
multiple kernels on the system, etc)

--
Fabio Erculiani
 
Old 11-04-2011, 12:23 PM
Patrick Lauer
 
Default linux-info.eclass: check_extra_config requires a configured kernel

On 11/04/11 13:59, "Paweł Hajdan, Jr." wrote:

check_extra_config requires a configured kernel
(/usr/src/linux/.config), while I think it should also be satisfied by
/proc/config.gz (i.e. just a way to verify the config, not necessarily
kernel built locally).

The running kernel is really irrelevant for those of us that build binpkgs.
/usr/src/linux is "more correct" in the case of binpkgs and most upgrade
scenarios where you don't reboot for a new kernel immediately.


It's hard to find a solution that is correct and works for everyone - at
least we've mostly got people to stop dying and only warn on a mismatch
there.
 

Thread Tools




All times are GMT. The time now is 08:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org