dracut icon indicating copy to clipboard operation
dracut copied to clipboard

Spaces inside configuration options do not work

Open mikroskeem opened this issue 4 years ago • 6 comments

My computer requires a firmware file which contains a space in its name. Unfortunately I cannot work around that very easily. Dracut does not seem to handle spaces in file names at all, even when I try to escape them using a backslash.

I propose that Dracut should switch to using bash arrays (since Dracut seems to hard depend on Bash anyway). mkinitcpio, which is only viable alternative to me for now, fixed (I am not aware whether this was done because someone ran into similar issue, or just because it's better practice) this using arrays

Perhaps mkinitcpio's changes could be used as an inspiration :-)

#720 is very likely the result of poor space handling as well.


Details

With following configuration (also tried adding ' or " with backslashes, removing \ and other combinations of those):

install_items+=" /usr/lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro15,1.txt "

I'm generating my image using sudo ./dracut.sh --force /boot/initramfs-linux-mbp.img command ( commit 3b869230a08088a4f51d5bde8d5cfc8497779815 ; or Arch Linux dracut 050-1 package ) and I'm ending up with this:

dracut: *** Installing kernel module dependencies done ***
dracut-install: ERROR: installing '/usr/lib/firmware/brcm/brcmfmac4364-pcie.Apple\'
dracut-install: ERROR: installing 'Inc.-MacBookPro15,1.txt'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.5YyWiK/initramfs -a /usr/lib/firmware/brcm/brcmfmac4364-pcie.Apple\ Inc.-MacBookPro15,1.txt

Dracut ran with --debug: https://gist.github.com/mikroskeem/4fae6b0072c5aa664acdcdd781873d73

mikroskeem avatar Jul 18 '20 23:07 mikroskeem

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

stale[bot] avatar Dec 16 '20 15:12 stale[bot]

This is still an issue.

mikroskeem avatar Dec 16 '20 15:12 mikroskeem

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

stale[bot] avatar Jan 15 '21 16:01 stale[bot]

This is still an issue.

mikroskeem avatar Jan 15 '21 16:01 mikroskeem

@mikroskeem could you test if this is still an issue with the 52 release?

johannbg avatar Feb 23 '21 14:02 johannbg

@mikroskeem dont bother testing this, we have found the culprit and this will be fixed in a later release

johannbg avatar Feb 23 '21 15:02 johannbg

Is this still an issue with the latest dracut?

johannbg avatar Dec 22 '22 11:12 johannbg