Hi,

On Tue, Oct 27, 2015 at 12:22:45AM +0100, Erwin Rol wrote:
> since the commit 0ab42164bd294970997ac8d9111ca19fea72b56f the bash
> version needs to be 4.2 or newer. And this makes ptxdist unusable on
> Redhat 6 (which will only go EOL after 2020, so it is not exactly a
> death distro)
> 
> If I understand the commit, only one line of code in the whole of
> ptxdist wants bash 4.2.
> 
> 'exec {readfd}< "${fifo}"' in scripts/lib/ptxd_make_serialize.sh
> 
> Sadly I am not exactly a bash guru, but is there really no way to do
> this with an older bash?

I don't know. '${fifo}' is created with mkfifo and we need a readonly and a
writeonly file descriptor to pass to make.

Even Debian old-stable has bash 4.2 so I never tried to do something with
an older bash version.

> Redhat 6 has bash;
> GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
> 
> Replacing a shell (without changing /bin/bash) seems really hard because
> of all the #!/bin/bash that is used in ptxdist scripts.

Well, most 'scripts' are only sourced. I think we could change
SHELL=... in Toplevel.make and in ptxdist maybe something like this:

if [ "$(readlink ${PTXDIST_TOPDIR}/bin/bash)" != "${BASH}" ]; then
        exec ${PTXDIST_TOPDIR}/bin/bash "${0}" "${@}"
fi

Basically switch to a different bash version if needed.

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to