Bug 10296 - make allnoconfig enables CONFIG_FEATURE_SEAMLESS_GZ and CONFIG_LONG_OPTS
Summary: make allnoconfig enables CONFIG_FEATURE_SEAMLESS_GZ and CONFIG_LONG_OPTS
Status: REOPENED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.27.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-06 13:56 UTC by Joonas Lahtinen
Modified: 2021-01-26 21:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Lahtinen 2017-09-06 13:56:04 UTC
'make allnoconfig' enables options CONFIG_FEATURE_SEAMLESS_GZ and CONFIG_LONG_OPTS for no obvious reason.

'make menuconfig' can be started and both options disabled.

The problem is that sym_is_changable() returns false for those two options in 'scripts/kconfig/symbol.c', obviously something goes wrong when resolving the dependencies. For some reason menuconfig seems to know better?

This is rather annoying when trying to automate a really minimal build through use of 'make KCONFIG_ALLCONFIG=my-busybox-config allnoconfig'.

This is reproducible both on 1.27.2 and master.
Comment 1 Denys Vlasenko 2017-09-07 12:41:17 UTC
Fixed in git, thanks.
Comment 2 Explorer09 2017-09-08 14:05:09 UTC
Did this bug also happens with Linux kernel's configuration system? I would like to see the patch cherry-picked from upstream, rather than an ad-hoc solution for our own only.
Comment 3 fedora.dm0 2018-01-13 22:41:42 UTC
The fix commit seems to break the use case in the initial report for me.

If I run "make allnoconfig KCONFIG_ALLCONFIG=busybox.config" with 1.28.0, none of the booleans set in busybox.config are applied.  E.g. with the following contents of busybox.config, the resulting config sets strings like CONFIG_EXTRA_CFLAGS but not CONFIG_SLEEP, CONFIG_REBOOT, etc.  Reverting 0b1c62934215a08351a80977c7cf8e9346683a1e fixes it again (although it continues to have the issue in this bug).  Am I doing something incorrectly?

CONFIG_STATIC=y
CONFIG_EXTRA_CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches"
CONFIG_EXTRA_LDFLAGS="-Wl,-z,relro"
CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_SLEEP=y
CONFIG_LOADKMAP=y
CONFIG_POWEROFF=y
CONFIG_REBOOT=y
CONFIG_FINDFS=y
CONFIG_MOUNT=y
CONFIG_VOLUMEID=y
CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_FAT=y
CONFIG_IFCONFIG=y
CONFIG_ROUTE=y
CONFIG_UDHCPC=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_ASH=y
CONFIG_ASH_BASH_COMPAT=y
CONFIG_ASH_ECHO=y
CONFIG_ASH_TEST=y
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_FEATURE_SH_MATH=y
CONFIG_SH_IS_NONE=y
Comment 4 Denys Vlasenko 2018-01-17 15:52:37 UTC
(In reply to fedora.dm0 from comment #3)
> "make allnoconfig KCONFIG_ALLCONFIG=busybox.config"

I don't even know what that is supposed to accomplish.
Comment 5 Alexei Colin 2019-03-13 22:20:45 UTC
(In reply to Denys Vlasenko from comment #4)
> > "make allnoconfig KCONFIG_ALLCONFIG=busybox.config"

> I don't even know what that is supposed to accomplish.

make allnoconfig KCONFIG_ALLCONFIG="configfile" is supposed to generate a .config where a symbol is enabled if it or its dependee is enabled in configfile. The code for this use case is in conf.c:

    case set_no:
        case set_mod:
        case set_yes:
        case set_random:
                name = getenv("KCONFIG_ALLCONFIG");
                if (name && !stat(name, &tmpstat)) {
                        conf_read_simple(name);
                        break;
                }
 
KCONFIG_ALLCONFIG allows overriding a default filename that would otherwise be read (with the same purpose of setting symbols in .config): {allno,allyes,...}.config.

0b1c62934215a08351a80977c7cf8e9346683a1e breaks this usecase.

This regression breaks miniconf [1,2,3,4] which assumes that if you pass a file identical to .config to KCONFIG_ALLCONFIG, then the above command will generate .config with the same contents (a noop).

Is there a way to fix the original issue without breaking KCONFIG_ALLCONFIG? Thank you.

[1] http://landley.net/hg/aboriginal/file/c8293b3ab81f/more/miniconfig.sh
[2] http://landley.net/aboriginal/FAQ.html#dev_miniconfig
[3] https://lwn.net/Articles/161086/
[4] http://lists.uclibc.org/pipermail/uclibc/2007-March/017612.html
Comment 6 alt.j2-4o4s2yon 2021-01-26 21:47:51 UTC
i just spent 2 hours tracing my failed attempts to update busybox from 1.27.2 to anything more recent to this "fix".

as fedora.dm0 points out, the fix actually breaks the usecase pointed out in the OP's comment, namely: make KCONFIG_ALLCONFIG=my-busybox-config allnoconfig

purpose of it being to set anything to off that's not enabled in the provided config file.

please revert.