Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630314 - sys-kernel/genkernel-3.5.2.0: mdadm support incoherent
Summary: sys-kernel/genkernel-3.5.2.0: mdadm support incoherent
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-08 09:09 UTC by Patrick Lauer
Modified: 2017-11-18 21:32 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2017-09-08 09:09:19 UTC
localhost / # genkernel initramfs --no-mountboot --mdadm --no-zfs --no-btrfs --no-multipath
Error: --multipath requires sys-fs/mdadm
                 to be installed on the host system.

localhost / # genkernel --help | grep multi
        --multipath             Include Multipath support
        --no-multipath  Exclude Multipath support
                                overrides --firmware-dir. For multiple files,

localhost / # genkernel --version
3.5.2.0
Comment 1 Patrick Lauer gentoo-dev 2017-09-08 09:15:41 UTC
                --mdadm|--no-mdadm)
                        CMD_MDADM=`parse_optbool "$*"`
                        print_info 2 "CMD_MDADM: $CMD_MDADM"
                        if [ "$CMD_MDADM" = "1" -a ! -e /sbin/mdadm ]
                        then
                                echo 'Error: --multipath requires sys-fs/mdadm'
                                echo '           to be installed on the host system.'
                                exit 1
                        fi
                        ;;



... wat?
Comment 2 Patrick Lauer gentoo-dev 2017-09-08 09:22:07 UTC
                if [ -e '/sbin/mdadm' ] && LC_ALL="C" ldd /sbin/mdadm | grep -q 'not a dynamic executable' \
                && [ -e '/sbin/mdmon' ] && LC_ALL="C" ldd /sbin/mdmon | grep -q 'not a dynamic executable'
                then
                        print_info 1 '          MDADM: Adding support (using local static binaries /sbin/mdadm and /sbin/mdmon)...'
                        cp /sbin/mdadm /sbin/mdmon "${TEMP}/initramfs-mdadm-temp/sbin/" ||
                                gen_die 'Could not copy over mdadm!'
                else
                        print_info 1 '          MDADM: Adding support (compiling binaries)...'
                        compile_mdadm
                        /bin/tar -xpf "${MDADM_BINCACHE}" -C "${TEMP}/initramfs-mdadm-temp" ||
                                gen_die "Could not extract mdadm binary cache!";
                fi


So /sbin/mdadm may or may not be used anyway, and this check doesn't make any sense
Comment 3 Larry the Git Cow gentoo-dev 2017-11-18 21:32:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=de034a52625200a6ef0286540435f6c4bf55230c

commit de034a52625200a6ef0286540435f6c4bf55230c
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2017-11-18 21:28:21 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2017-11-18 21:28:21 +0000

    gen_cmdline: make --mdadm local binary requirement less strict
    
    Closes: https://bugs.gentoo.org/630314
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 gen_cmdline.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)