mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Bash version
@ 2015-10-26 23:22 Erwin Rol
  2015-10-30  8:15 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Erwin Rol @ 2015-10-26 23:22 UTC (permalink / raw)
  To: ptxdist

Hello,

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?

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.

here a quick link to the commit;

http://git.pengutronix.de/?p=ptxdist.git;a=commit;h=0ab42164bd294970997ac8d9111ca19fea72b56f

TIA,

Erwin


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Bash version
  2015-10-26 23:22 [ptxdist] Bash version Erwin Rol
@ 2015-10-30  8:15 ` Michael Olbrich
  2015-11-02 10:43   ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2015-10-30  8:15 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Bash version
  2015-10-30  8:15 ` Michael Olbrich
@ 2015-11-02 10:43   ` Michael Olbrich
  2016-05-10  7:52     ` Gieseler, Christian
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2015-11-02 10:43 UTC (permalink / raw)
  To: ptxdist

On Fri, Oct 30, 2015 at 09:15:15AM +0100, Michael Olbrich wrote:
> 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 just did some tests with bash 4.1 and this actually seems to work. I
don't remember why we chose 4.2. Maybe it was just the version we tested
and since that's in Debian old-stable I didn't test anything else.

Can you change the check and see if it still works? This code is always
called during startup.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Bash version
  2015-11-02 10:43   ` Michael Olbrich
@ 2016-05-10  7:52     ` Gieseler, Christian
  0 siblings, 0 replies; 4+ messages in thread
From: Gieseler, Christian @ 2016-05-10  7:52 UTC (permalink / raw)
  To: ptxdist


> -----Ursprüngliche Nachricht-----
> Von: ptxdist [mailto:ptxdist-bounces@pengutronix.de] Im Auftrag von
> Michael Olbrich
> Gesendet: Montag, 2. November 2015 11:43
> An: ptxdist@pengutronix.de
> Betreff: Re: [ptxdist] Bash version
> 
> On Fri, Oct 30, 2015 at 09:15:15AM +0100, Michael Olbrich wrote:
> > 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 just did some tests with bash 4.1 and this actually seems to work. I
> don't remember why we chose 4.2. Maybe it was just the version we tested
> and since that's in Debian old-stable I didn't test anything else.
> 
> Can you change the check and see if it still works? This code is always
> called during startup.

I have disabled the version check since my Centos 6 also had bash 4.1 and it works. But every now and then the build process is stuck. Interrupting with CTRL-C returns a timout  at  exec {readfd}< "${fifo}".

After updating to bash 4.3 I have not seen this issue any more. Maybe this was the reason you are checking for version 4.2 and above.
Best Regards
Christian Gieseler

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-10  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26 23:22 [ptxdist] Bash version Erwin Rol
2015-10-30  8:15 ` Michael Olbrich
2015-11-02 10:43   ` Michael Olbrich
2016-05-10  7:52     ` Gieseler, Christian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox