Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 762379 - =sys-boot/refind-0.12.0-r1: emake invocation vs arguments with spaces (make: *** No rule to make target 'ext2_gnuefi'. Stop.)
Summary: =sys-boot/refind-0.12.0-r1: emake invocation vs arguments with spaces (make: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Stéphane Veyret
URL:
Whiteboard:
Keywords: PATCH
: 764854 (view as bug list)
Depends on:
Blocks: bash-5.1
  Show dependency tree
 
Reported: 2020-12-29 08:45 UTC by Greg Turner
Modified: 2021-01-10 18:30 UTC (History)
4 users (show)

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


Attachments
Possible fix to #762379 (sys-boot_refind-0.12.0-r1_ebuild_argument_spillage.patch,635 bytes, patch)
2020-12-29 08:49 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2020-12-29 08:45:23 UTC
The way the current refind ebuild shuffles around the list of filesystems does word-splitting on strings meant to stay together.  So, in my case, the emake invocation in src_compile looks like:

emake 'ARCH=x86_64' 'CC=x86_64-pc-linux-gnu-gcc' 'AS=x86_64-pc-linux-gnu-as' 'LD=x86_64-pc-linux-gnu-ld' 'AR=x86_64-pc-linux-gnu-ar' 'RANLIB=x86_64-pc-linux-gnu-ranlib' 'OBJCOPY=x86_64-pc-linux-gnu-objcopy' 'GNUEFILIB=/usr/lib64' 'EFILIB=/usr/lib64' 'EFICRT0=/usr/lib64' 'EDK2BASE=' 'EDK2_DRIVER_BASENAMES=btrfs_gnuefi' 'ext2_gnuefi' 'ext4_gnuefi' 'iso9660_gnuefi' 'ntfs_gnuefi' 'FILESYSTEMS=btrfs_gnuefi' 'ext2_gnuefi' 'ext4_gnuefi' 'iso9660_gnuefi' 'ntfs_gnuefi' 'FILESYSTEMS_GNUEFI=btrfs_gnuefi' 'ext2_gnuefi' 'ext4_gnuefi' 'iso9660_gnuefi' 'ntfs_gnuefi' all_gnuefi

whereas the obviously intended (and presumably correct) invocation (see ebuild starting @ line 68) is:

emake 'ARCH=x86_64' 'CC=x86_64-pc-linux-gnu-gcc' 'AS=x86_64-pc-linux-gnu-as' 'LD=x86_64-pc-linux-gnu-ld' 'AR=x86_64-pc-linux-gnu-ar' 'RANLIB=x86_64-pc-linux-gnu-ranlib' 'OBJCOPY=x86_64-pc-linux-gnu-objcopy' 'GNUEFILIB=/usr/lib64' 'EFILIB=/usr/lib64' 'EFICRT0=/usr/lib64' 'EDK2BASE=' 'EDK2_DRIVER_BASENAMES=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' 'FILESYSTEMS=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' 'FILESYSTEMS_GNUEFI=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' all_gnuefi
make -j20 -l7 ARCH=x86_64 CC=x86_64-pc-linux-gnu-gcc AS=x86_64-pc-linux-gnu-as LD=x86_64-pc-linux-gnu-ld AR=x86_64-pc-linux-gnu-ar RANLIB=x86_64-pc-linux-gnu-ranlib OBJCOPY=x86_64-pc-linux-gnu-objcopy GNUEFILIB=/usr/lib64 EFILIB=/usr/lib64 EFICRT0=/usr/lib64 EDK2BASE= 'EDK2_DRIVER_BASENAMES=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' 'FILESYSTEMS=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' 'FILESYSTEMS_GNUEFI=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi' all_gnuefi


Reproducible: Always

Steps to Reproduce:
USE="btrfs ext2" emerge =sys-boot/refind-0.12.0-r1

Actual Results:  
MAKEOPTS=-j1 FEATURES=-ccache USE="btrfs ext2" ebuild /usr/portage/sys-boot/refind/refind-0.12.0-r1.ebuild clean compile
 * refind-src-0.12.0.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                               [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking refind-src-0.12.0.tar.gz to /var/tmp/portage/sys-boot/refind-0.12.0-r1/work
>>> Source unpacked in /var/tmp/portage/sys-boot/refind-0.12.0-r1/work
>>> Preparing source in /var/tmp/portage/sys-boot/refind-0.12.0-r1/work/refind-0.12.0 ...
 * Applying makefile.patch ...                                                                                                                                                                                                                        [ ok ]
 * Applying refind-0.12.0-gcc10.patch ...                                                                                                                                                                                                             [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-boot/refind-0.12.0-r1/work/refind-0.12.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-boot/refind-0.12.0-r1/work/refind-0.12.0 ...
make -j1 ARCH=x86_64 CC=x86_64-pc-linux-gnu-gcc AS=x86_64-pc-linux-gnu-as LD=x86_64-pc-linux-gnu-ld AR=x86_64-pc-linux-gnu-ar RANLIB=x86_64-pc-linux-gnu-ranlib OBJCOPY=x86_64-pc-linux-gnu-objcopy GNUEFILIB=/usr/lib64 EFILIB=/usr/lib64 EFICRT0=/usr/lib64 EDK2BASE= EDK2_DRIVER_BASENAMES=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi FILESYSTEMS=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi FILESYSTEMS_GNUEFI=btrfs_gnuefi ext2_gnuefi ext4_gnuefi iso9660_gnuefi ntfs_gnuefi all_gnuefi 
make: *** No rule to make target 'ext2_gnuefi'.  Stop.
 * ERROR: sys-boot/refind-0.12.0-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/refind-0.12.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/refind-0.12.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-boot/refind-0.12.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/refind-0.12.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/refind-0.12.0-r1/work/refind-0.12.0'
 * S: '/var/tmp/portage/sys-boot/refind-0.12.0-r1/work/refind-0.12.0'

Expected Results:  
enlightenment and free candy

Don't "@" me bro... see patch forthcoming ;)
Comment 1 Greg Turner 2020-12-29 08:49:20 UTC
Created attachment 680140 [details, diff]
Possible fix to #762379

"${foo[@]}" -> "${foo[*]}" so we don't turn emake arguments with spaces into multiple arguments
Comment 2 Sam James archtester gentoo-dev Security 2020-12-29 08:49:53 UTC
This is possibly/probably related to the new Bash (5.1) which changed behaviour (possibly fixing a bug).
Comment 3 Stéphane Veyret 2020-12-31 14:52:05 UTC
Hey Greg !

Thank you for submitting this issue, and the patch. Would you like to make a PR on GitHub? I can do it myself if you prefer, but the change will then be under my name when you did the job…
Comment 4 Greg Turner 2020-12-31 18:54:34 UTC
Sure, can do.
Comment 5 Greg Turner 2021-01-01 07:08:08 UTC
OK, after various technical difficulties I'm ready to give up and suggest you do the deed, Stéphane.

Sorry, it's been ages since I've put in a gentoo PR and a number of new conventions have crystallized.  Nothing wrong with wiki---just would rather take my time figuring out some .gnupg technicalities and other new best practices you probably know like the back of your hand.

Otherwise I'm probably rushing to screw up a PR that will need correction while an unknown number of gentooers mask or overlay, waiting for this trivial patch.  I can figure stuff out on my own time and forgo this tiny smidgen of glory :)
Comment 6 Stéphane Veyret 2021-01-01 16:10:14 UTC
No problem, Greg, I’ll do it. I’m rather busy at the moment, but will try to find a bit of time in the coming days.
Comment 7 Sam James archtester gentoo-dev Security 2021-01-10 18:13:18 UTC
*** Bug 764854 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2021-01-10 18:30:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ea14599e99ef09450ea4abd40a1a4de598ce109

commit 8ea14599e99ef09450ea4abd40a1a4de598ce109
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-01-10 18:29:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-01-10 18:30:00 +0000

    sys-boot/refind: fix build with Bash 5.1
    
    Reported-by: Greg Turner <gmt@be-evil.net>
    Closes: https://bugs.gentoo.org/762379
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-boot/refind/refind-0.11.4.ebuild    | 8 ++++----
 sys-boot/refind/refind-0.12.0-r1.ebuild | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)