shell.req fails on dracut.sh: builder@x86_64:/.in$ echo /usr/src/tmp/dracut-buildroot/usr/bin/dracut | /usr/lib/rpm/shell.req /usr/src/tmp/dracut-buildroot/usr/bin/dracut: line 1354: syntax error near unexpected token `newline' /usr/src/tmp/dracut-buildroot/usr/bin/dracut: line 1354: ` ID_FS_TYPE=$(get_fs_env "/dev/block/$1") && host_fs_types["$(readlink -f +"/dev/block/$1")"]="$ID_FS_TYPE"' shell.req: ERROR: /usr/src/tmp/dracut-buildroot/usr/bin/dracut: /bin/bash --rpm-requires failed This seem to be bash --rpm-requires bug. Reproducer: $ echo 'x["$(:)"]=y' | bash --rpm-requires executable(/etc/bashrc) executable(grep) function(group) bash: line 1: syntax error near unexpected token `newline' bash: line 1: `x["$(:)"]=y' $ When clean_simple_command() calls assignment() it calls yyparse().
The implementation of --rpm-requires is severely broken in bash4 because of internal bash changes between bash3 and bash4.