Created attachment 391308 [details, diff] genkernel.conf patch Hello, The currently supplied /etc/genkernel.conf file has quite a few inconsistencies that could use some cleanup. It's almost random whether the commented example for an option matches the default setting, or is opposite the default setting. I've fixed these where possible, although some defaults are arch-specific or the default is blank but an example non-blank setting is helpful... I've left those examples intact. I have also fixed some minor inconsistencies in wording & formatting, and converted everything to use yes/no for bools, rather than a random mix of yes/no 1/0 etc. If there's any question why something was changed, please let me know... as far as I know, none of these changes should affect the out-of-the-box genkernel behavior. I'm hoping these changes will make it a little easier to configure, without having to wade through the source to see what an option's REAL default is. Thanks!
I don't want this comment removed: Default is "no" because genkernel is used in # catalyst and stage building. Are you sure these hunks are right? If they need a 1 or 0 then are you sure yes and no are also acceptable? -#POSTCLEAR="1" +#POSTCLEAR="no" -#UNIONFS="1" +#UNIONFS="no" -#KERNEL_SOURCES="0" +#KERNEL_SOURCES="yes" -#BUILD_STATIC="1" +#BUILD_STATIC="no" -#GENZIMAGE="1" +#GENZIMAGE="no" -#ALLRAMDISKMODULES="1" -#RAMDISKMODULES="0" +#ALLRAMDISKMODULES="no" +#RAMDISKMODULES="yes" -#INTEGRATED_INITRAMFS="1" +#INTEGRATED_INITRAMFS="no" -#NETBOOT="1" +#NETBOOT="no" Is this a path or a file it wants? It reads like it wants a path to drop a file, not a specific filename. -#KERNCACHE="/path/to/file" +#KERNCACHE="/path/to/file.bz2"
Thanks for looking over this, I definitely want to make sure all these changes get a second look. (In reply to Rick Farina (Zero_Chaos) from comment #1) > I don't want this comment removed: > > Default is "no" because genkernel is used in > # catalyst and stage building. > > Are you sure these hunks are right? If they need a 1 or 0 then are you sure > yes and no are also acceptable? > > -#POSTCLEAR="1" > +#POSTCLEAR="no" > > -#UNIONFS="1" > +#UNIONFS="no" > > -#KERNEL_SOURCES="0" > +#KERNEL_SOURCES="yes" > > -#BUILD_STATIC="1" > +#BUILD_STATIC="no" > > -#GENZIMAGE="1" > +#GENZIMAGE="no" > > -#ALLRAMDISKMODULES="1" > -#RAMDISKMODULES="0" > +#ALLRAMDISKMODULES="no" > +#RAMDISKMODULES="yes" > > -#INTEGRATED_INITRAMFS="1" > +#INTEGRATED_INITRAMFS="no" > > -#NETBOOT="1" > +#NETBOOT="no" Good catch. The first few of these I looked at, and in general most boolean options in genkernel.conf, do use isTrue() from gen_funcs.sh to test (so can accept true, yes, t, y, or 1, all case insensitive). But a few of them compare directly to "1". Another patch will be needed to fix these cases, but I do believe it should be done. I'll try to get this patch ready soon. > > Is this a path or a file it wants? It reads like it wants a path to drop a > file, not a specific filename. > > -#KERNCACHE="/path/to/file" > +#KERNCACHE="/path/to/file.bz2" This is definitely the output tbz2 filename, passed as a direct argument to tar -jcpf or tar -xjf. I made this change to be more consistent with the other examples in this file, but I bet the change will go the other way once we have configurable compression.
Created attachment 391394 [details, diff] genkernel-check-bools-with-isTrue.patch This patch should fix the few cases where genkernel functions were testing directly against 1/0 rather than using the isTrue function
(In reply to Rick Farina (Zero_Chaos) from comment #1) > I don't want this comment removed: > > Default is "no" because genkernel is used in > # catalyst and stage building. > I was just looking at this bug again today and realized I didn't address this point. This config file comment is not accurate. The default is yes.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6454b9ed43325149f3ccb3bab35a42b745d0369b commit 6454b9ed43325149f3ccb3bab35a42b745d0369b Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-03-23 00:47:17 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-03-23 08:05:33 +0000 Convert all remaining options to yes/no values and use isTrue for consistency Closes: https://bugs.gentoo.org/532084 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_bootloader.sh | 6 +- gen_cmdline.sh | 90 ++++++++++++++-------------- gen_configkernel.sh | 26 ++++---- gen_determineargs.sh | 12 ++-- gen_funcs.sh | 16 ++--- gen_initramfs.sh | 18 +++--- gen_moddeps.sh | 2 +- gen_package.sh | 20 +++---- genkernel | 66 ++++++++++----------- genkernel.conf | 163 ++++++++++++++++++++++++++------------------------- 10 files changed, 211 insertions(+), 208 deletions(-)