Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594834 - sys-kernel/dracut-044 with apps-shells/bash-4.4: /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh: line 13: warning: command substitution: ignored null byte in input
Summary: sys-kernel/dracut-044 with apps-shells/bash-4.4: /usr/lib/dracut/modules.d/90...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL: https://github.com/dracutdevs/dracut/...
Whiteboard:
Keywords:
Depends on:
Blocks: 595276
  Show dependency tree
 
Reported: 2016-09-22 21:27 UTC by Duane Griffin
Modified: 2017-02-09 18:48 UTC (History)
9 users (show)

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


Attachments
dracut-044-bash-4.4.patch (dracut-044.patch,2.99 KB, patch)
2016-09-27 14:24 UTC, Alexander Tsoy
Details | Diff
Revised patch that also fixes 90kernel-network-modules (044-0001-fix-bash-44-bug.patch,3.86 KB, patch)
2016-09-27 23:35 UTC, Duane Griffin
Details | Diff
dracut-044-bash-4.4.patch (900-dracut-044-bash4.4.patch,4.92 KB, patch)
2016-09-27 23:55 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duane Griffin 2016-09-22 21:27:37 UTC
When running under bash 4.4 sys-kernel/dracut-044 has a bug that causes the warning:

/usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh: line 13: warning: command substitution: ignored null byte in input

...to repeat many times. See the referenced dracut issue and a similar but unrelated bug in openrc.
Comment 1 Alexander Tsoy 2016-09-26 08:03:43 UTC
Will be fixed in the next release. We should add a blocker for now.

Upstream changes are too massive to backport and probably relies on other commits:
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=794b2d2c753489635b922457a5ccb06669f37268
Comment 2 Alexander Tsoy 2016-09-27 14:24:23 UTC
Created attachment 448124 [details, diff]
dracut-044-bash-4.4.patch

On the other hand this should be easy to fix. Can somebody test attached patch?
Comment 3 Duane Griffin 2016-09-27 23:34:42 UTC
That patch is not quite sufficient: 90kernel-network-modules/module-setup.sh also has the same bug. I'll attach a revised patch that also fixes that and that works for me locally. There may still be problems with other modules that I am not including (and hence not testing), though.
Comment 4 Duane Griffin 2016-09-27 23:35:44 UTC
Created attachment 448176 [details, diff]
Revised patch that also fixes 90kernel-network-modules
Comment 5 Alexander Tsoy 2016-09-27 23:55:39 UTC
Created attachment 448180 [details, diff]
dracut-044-bash-4.4.patch

Also fix 50drm
Comment 6 Maciej Piechotka 2016-11-09 18:26:08 UTC
Could dracut conflict with bash 4.4 until it is fixed? Yes, I know that I can mask on local system but masks tend to remain even after fix as I forgot to remove them.
Comment 7 Tiziano Müller (RETIRED) gentoo-dev 2016-11-19 10:35:16 UTC
(In reply to Maciej Piechotka from comment #6)
> Could dracut conflict with bash 4.4 until it is fixed? Yes, I know that I
> can mask on local system but masks tend to remain even after fix as I forgot
> to remove them.

simply put the patch from above in /etc/portage/patches/sys-kernel/dracut-044-r1/ and re-install dracut (works also with paludis), see https://wiki.gentoo.org/wiki//etc/portage/patches
Comment 8 kfm 2016-11-22 16:06:30 UTC
(In reply to Maciej Piechotka from comment #6)
> Could dracut conflict with bash 4.4 until it is fixed? Yes, I know that I
> can mask on local system but masks tend to remain even after fix as I forgot
> to remove them.

Note that, as of 4.4_p2, bash will emit a warning no more than once for each command substitution, rather than for every single NUL byte encountered during a substitution.

Discarding NUL bytes has always been a property of command substitution in bash. The only difference is that bash now warns about it, on the valid basis that it may be a code smell. As long as dracut does not capture, redirect, match against or - in any way - care about STDERR in any context where the warning is produced, these warnings have no impact other than to alarm or irritate users.

In short, making dracut conflict with any version of bash would likely be an overreaction. But if it were to do so, it would make sense to block ~app-shells/bash-4.4 in particular. This atom covers the only versions that will ever be in portage that do not have a bound on the number of NUL byte warnings printed within a substitution, namely 4.4 and 4.4-r1.
Comment 9 Martin Mokrejš 2016-12-08 20:02:06 UTC
So I hit this as well. Please install a temporary blocker so that dracut prevents bash-4.4 on Gentoo. Or bring a patch from https://github.com/dracutdevs/dracut/commit/cc81672cefae136fff760a907d23d27c64539741 reference in the github issue.
Comment 10 Patrick McLean gentoo-dev 2017-02-09 18:48:11 UTC
Fixed in sys-kernel/dracut-044-r2

Also added a blocker against bash-4.4 in sys-kernel/dracut-044-r1