Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: "Paweł Hajdan, Jr." <phajdan.jr@g.o>
Subject: linux-info.eclass: check_extra_config requires a configured kernel
Date: Fri, 04 Nov 2011 13:59:14 +0100
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_EXISTS_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_EXISTS_DONE}"
    if [[ ${config_required} == 0 ]]; then
        return 0
    else
        die "unable to check for required kernel options"
    fi
fi

Thoughts?

Attachment:
signature.asc (OpenPGP digital signature)
Replies:
Re: linux-info.eclass: check_extra_config requires a configured kernel
-- Robin H. Johnson
Re: linux-info.eclass: check_extra_config requires a configured kernel
-- Mike Gilbert
Re: linux-info.eclass: check_extra_config requires a configured kernel
-- Patrick Lauer
Re: linux-info.eclass: check_extra_config requires a configured kernel
-- Fabio Erculiani
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
recovering from corrupted vdb
Next by thread:
Re: linux-info.eclass: check_extra_config requires a configured kernel
Previous by date:
Re: Rotating oversized ChangeLog files
Next by date:
Re: linux-info.eclass: check_extra_config requires a configured kernel


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.