• [gentoo-dev] [PATCH 1/1] linux-info.eclass: Add /proc/config.gz as a va

    From Mike Pagano@21:1/5 to All on Sun Jan 15 18:50:01 2023
    In the event that the linux src tree does not have
    a valid .config, check for /proc/config.gz

    Bug: https://bugs.gentoo.org/890720

    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
    ---
    eclass/linux-info.eclass | 12 ++++++++++--
    1 file changed, 10 insertions(+), 2 deletions(-)

    diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
    index 16ef69ebc..daedd758f 100644
    --- a/eclass/linux-info.eclass
    +++ b/eclass/linux-info.eclass
    @@ -301,10 +301,18 @@ linux_config_qa_check() {
    # @FUNCTION: linux_config_src_exists
    # @RETURN: true or false
    # @DESCRIPTION:
    -# It returns true if .config exists in a build directory otherwise false
    +# Returns true if either .config exists in a build directory or
    +# /proc/config.gz is found, otherwise returns false
    linux_config_src_exists() {
    export _LINUX_CONFIG_EXISTS_DONE=1
    - use kernel_linux && [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]] + if use kernel_linux; then
    + if [[ -n ${KV_OUT_DIR} && -s ${KV_OUT_DIR}/.config ]]; then
    + return 0
    + elif linux_config_bin_exists; then
    + return 0
    + fi
    + fi
    + return 1
    }

    # @FUNCTION: linux_config_bin_exists
    --
    2.38.2


    --
    Mike Pagano
    Gentoo Develop
  • From Oskari Pirhonen@21:1/5 to Mike Pagano on Sun Jan 15 21:10:01 2023
    On Sun, Jan 15, 2023 at 12:40:12 -0500, Mike Pagano wrote:
    In the event that the linux src tree does not have
    a valid .config, check for /proc/config.gz


    What about checking /boot/config-[version] as a backup as well? Since
    the standard `make install` for the kernel drops the config used to
    build into there too.

    - Oskari

    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCY8RbLwAKCRCp8he9GGIf Eb+FAQCwrNi/pqMDYDiAm+J0Eu8ltTFIxLmJR2v/l6s7jRO4AAEA1YbbZ8pL/kBa 2x+/B3eTvsH9CVXYs47+781EZxUgVAY=
    =FBAV
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Gilbert@21:1/5 to mpagano@gentoo.org on Sun Jan 15 21:20:02 2023
    On Sun, Jan 15, 2023 at 12:40 PM Mike Pagano <mpagano@gentoo.org> wrote:

    In the event that the linux src tree does not have
    a valid .config, check for /proc/config.gz

    Bug: https://bugs.gentoo.org/890720

    I think this is the wrong place to "fix" bug 890720.

    We already have a linux_config_exists function. This change would make
    that function redundant and removes the ability to check for only a
    valid .config in the kernel build directory.

    I think the check_config_extra function should be updated to not call require_configured_kernel.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Pagano@21:1/5 to Mike Gilbert on Sun Jan 15 21:30:01 2023
    On 1/15/23 15:16, Mike Gilbert wrote:
    On Sun, Jan 15, 2023 at 12:40 PM Mike Pagano <mpagano@gentoo.org> wrote:

    In the event that the linux src tree does not have
    a valid .config, check for /proc/config.gz

    Bug: https://bugs.gentoo.org/890720

    I think this is the wrong place to "fix" bug 890720.

    We already have a linux_config_exists function. This change would make
    that function redundant and removes the ability to check for only a
    valid .config in the kernel build directory.

    I think the check_config_extra function should be updated to not call require_configured_kernel.


    Yeah, I guess that does make sense. The CONFIGs are optional, why look for
    any config file ?

    --
    Mike Pagano
    Gentoo Developer - Kernel Project
    E-Mail : mpagano@gentoo.org
    GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
    Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)