Bug 1472137 - dracut: /bin/dracut: line 1619: warning: command substitution: ignored null byte in input
Summary: dracut: /bin/dracut: line 1619: warning: command substitution: ignored null b...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 26
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-18 07:06 UTC by Stefan Assmann
Modified: 2017-08-14 21:52 UTC (History)
9 users (show)

Fixed In Version: dracut-046-2.git20170811.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-14 21:52:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stefan Assmann 2017-07-18 07:06:11 UTC
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 12:48:28 UTC
How can I suppress this message from bash?

Comment 2 Siteshwar Vashisht 2017-07-19 12:58:00 UTC
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 13:17:48 UTC
(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 09:14:35 UTC
(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 12:27:28 UTC
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 04:05:54 UTC
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 21:52:36 UTC
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.