Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 783945 - catalyst-9999 genkernel callback array escape issues
Summary: catalyst-9999 genkernel callback array escape issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-18 23:42 UTC by nic
Modified: 2021-07-19 07:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gk_callback_opts as a string instead of array (genkernel-callback-array.patch,653 bytes, patch)
2021-04-18 23:43 UTC, nic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nic 2021-04-18 23:42:04 UTC
There appears to be an escape issue with catalyst-9999 ${gk_callback_opts[@]} when building livecd-stage2 targets which define boot packages

It's acting like a double-quote is being prefixed (unable to confirm), closing the --callback argument and genkernel the switch instead of the emerge callback command







Reproducible: Always

Actual Results:  
# ERROR: Unknown option '-qN'!

Expected Results:  
I found that using a string vs array[@] allowed catalyst-9999 to run genkernel cleanly. Which is the previous catalyst-3.0.17 logic

https://github.com/gentoo/catalyst/commit/e5855beff25ac9315c1dfe5466bb4b0bb2240fa6

boot/kernel/gentoo/packages:
    sys-fs/zfs
Comment 1 nic 2021-04-18 23:43:59 UTC
Created attachment 700635 [details, diff]
gk_callback_opts as a string instead of array
Comment 2 Matt Turner gentoo-dev 2021-06-12 18:32:51 UTC
Ugh, I expect you're exactly right. This is a perfect example of why doing anything non-trivial in bash is bad.

Can you give me your Signed-off-by: GivenName FamilyName <username@email.com> tag, as required by https://www.gentoo.org/glep/glep-0076.html ?

I understand it's a pretty small addition and likely not copyrightable. I just don't want Gentoo's pedantic lawyering-types to harass me.

Thanks!
Comment 3 nic 2021-06-19 15:34:45 UTC
Hello Matt- Thank you.

Signed-off-by: Nic Boet <nic@boet.cc>
Comment 5 Larry the Git Cow gentoo-dev 2021-07-19 07:01:26 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/releng.git/commit/?id=233c2db1fcd3f8907dbc83e96dce96c859ab4183

commit 233c2db1fcd3f8907dbc83e96dce96c859ab4183
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-07-19 01:56:34 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-07-19 03:03:00 +0000

    releases/specs/ppc/ppc64le/installcd: tune stage2 file
    
    use full templated path to Kconfigs.
    also add extra fs to installcds.
    consolidate genkernel args.
    fix typo.
    
    Bug: https://bugs.gentoo.org/783945
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 releases/specs/ppc/ppc64le/installcd-stage2-minimal.spec | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)