Bug 1472137 - dracut: /bin/dracut: line 1619: warning: command substitution: ignored null byte in input
dracut: /bin/dracut: line 1619: warning: command substitution: ignored null b...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
26
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: dracut-maint-list
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-18 03:06 EDT by Stefan Assmann
Modified: 2017-08-14 17:52 EDT (History)
9 users (show)

See Also:
Fixed In Version: dracut-046-2.git20170811.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-14 17:52:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Assmann 2017-07-18 03:06:11 EDT
Description of problem:
dracut generates a log of warnings when doing "make install"

# make install
sh ./arch/x86/boot/install.sh 4.12.0+ arch/x86/boot/bzImage \
        System.map "/boot"
/bin/dracut: line 1619: warning: command substitution: ignored null byte in input
/bin/dracut: line 1619: warning: command substitution: ignored null byte in input
/bin/dracut: line 1619: warning: command substitution: ignored null byte in input
/bin/dracut: line 1619: warning: command substitution: ignored null byte in input
[...]

Version-Release number of selected component (if applicable):
dracut-044-183.fc26.x86_64

How reproducible:
always

Steps to Reproduce:
1. run "make install"
Comment 1 Harald Hoyer 2017-07-19 08:48:28 EDT
How can I suppress this message from bash?
Comment 2 Siteshwar Vashisht 2017-07-19 08:58:00 EDT
That will require us to recompile bash with condition here set to false [1]. This change was brought with bash-4.4, you can read previous discussion here[2].

[1] http://git.savannah.gnu.org/cgit/bash.git/tree/subst.c#n5966
[2] https://lists.gnu.org/archive/html/bug-bash/2017-04/msg00016.html
Comment 3 Kamil Dudka 2017-07-19 09:17:48 EDT
(In reply to Harald Hoyer from comment #1)
> How can I suppress this message from bash?

You can strip NUL bytes before passing them to bash' command substitution:

$ echo $(cat /proc/self/cmdline)
bash: warning: command substitution: ignored null byte in input
cat/proc/self/cmdline

$ echo $(cat /proc/self/cmdline | tr -d '\0')
cat/proc/self/cmdline

Nevertheless, the NUL bytes are ignored in both the cases.  If your original intention was to process them, you need to use a different shell that supports handling of embedded NUL bytes:

$ zsh -c 'print -l $(cat /proc/self/cmdline)'
cat
/proc/self/cmdline
Comment 4 Harald Hoyer 2017-07-21 05:14:35 EDT
(In reply to Kamil Dudka from comment #3)
> (In reply to Harald Hoyer from comment #1)
> > How can I suppress this message from bash?
> 
> You can strip NUL bytes before passing them to bash' command substitution:
> 


Alright, then I need dracut commit f0bfada399c2c3269de353be5af37224349839a0
Comment 5 Fedora Update System 2017-08-11 08:27:28 EDT
dracut-046-2.git20170811.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3c6d1e757b
Comment 6 Fedora Update System 2017-08-13 00:05:54 EDT
dracut-046-2.git20170811.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3c6d1e757b
Comment 7 Fedora Update System 2017-08-14 17:52:36 EDT
dracut-046-2.git20170811.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.