mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Bash version
Date: Fri, 30 Oct 2015 09:15:15 +0100	[thread overview]
Message-ID: <20151030081515.GB32176@pengutronix.de> (raw)
In-Reply-To: <562EB5C5.9090802@erwinrol.com>

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
ptxdist@pengutronix.de

  reply	other threads:[~2015-10-30  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 23:22 Erwin Rol
2015-10-30  8:15 ` Michael Olbrich [this message]
2015-11-02 10:43   ` Michael Olbrich
2016-05-10  7:52     ` Gieseler, Christian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151030081515.GB32176@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox