All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix bash path in shebangs
@ 2017-07-27 20:41 asomers
  2017-07-28  9:28 ` Bruce Richardson
  0 siblings, 1 reply; 13+ messages in thread
From: asomers @ 2017-07-27 20:41 UTC (permalink / raw)
  To: dev; +Cc: Alan Somers

From: Alan Somers <asomers@gmail.com>

"/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.

Signed-off-by: Alan Somers <asomers@gmail.com>
---
 examples/performance-thread/l3fwd-thread/test.sh | 2 +-
 usertools/dpdk-setup.sh                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
index b7718b622..eb1fe2dc2 100755
--- a/examples/performance-thread/l3fwd-thread/test.sh
+++ b/examples/performance-thread/l3fwd-thread/test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 case "$1" in
 
diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index c4fec5a63..ebf36f830 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 
 #   BSD LICENSE
 #
-- 
2.13.3

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-27 20:41 [PATCH] Fix bash path in shebangs asomers
@ 2017-07-28  9:28 ` Bruce Richardson
  2017-07-31 15:11   ` alan somers
  0 siblings, 1 reply; 13+ messages in thread
From: Bruce Richardson @ 2017-07-28  9:28 UTC (permalink / raw)
  To: asomers; +Cc: dev

On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
> From: Alan Somers <asomers@gmail.com>
> 
> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
> 
> Signed-off-by: Alan Somers <asomers@gmail.com>
> ---
>  examples/performance-thread/l3fwd-thread/test.sh | 2 +-
>  usertools/dpdk-setup.sh                          | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
> index b7718b622..eb1fe2dc2 100755
> --- a/examples/performance-thread/l3fwd-thread/test.sh
> +++ b/examples/performance-thread/l3fwd-thread/test.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  
>  case "$1" in
>  
This script doesn't look to be using any bash specific features to me,
so a better fix might be to change it to use /bin/sh rather than
requiring bash itself. [Needs testing, to check there isn't something
bash-specific hidden away, obviously]

> diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
> index c4fec5a63..ebf36f830 100755
> --- a/usertools/dpdk-setup.sh
> +++ b/usertools/dpdk-setup.sh
> @@ -1,4 +1,4 @@
> -#! /bin/bash
> +#! /usr/bin/env bash
>  
>  #   BSD LICENSE
>  #
> -- 
Not sure having this linux-specific is a problem for dpdk-setup.sh,
since I don't think large parts of that script work with BSD anyway,
e.g. it assumes a linux hugetlbfs filesystem for hugepage setup. Not
that there is any harm in making the change you suggest either.

/Bruce

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-28  9:28 ` Bruce Richardson
@ 2017-07-31 15:11   ` alan somers
  2017-07-31 15:22     ` Bruce Richardson
  0 siblings, 1 reply; 13+ messages in thread
From: alan somers @ 2017-07-31 15:11 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, Jul 28, 2017 at 3:28 AM, Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
>> From: Alan Somers <asomers@gmail.com>
>>
>> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>>
>> Signed-off-by: Alan Somers <asomers@gmail.com>
>> ---
>>  examples/performance-thread/l3fwd-thread/test.sh | 2 +-
>>  usertools/dpdk-setup.sh                          | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
>> index b7718b622..eb1fe2dc2 100755
>> --- a/examples/performance-thread/l3fwd-thread/test.sh
>> +++ b/examples/performance-thread/l3fwd-thread/test.sh
>> @@ -1,4 +1,4 @@
>> -#!/bin/bash
>> +#!/usr/bin/env bash
>>
>>  case "$1" in
>>
> This script doesn't look to be using any bash specific features to me,
> so a better fix might be to change it to use /bin/sh rather than
> requiring bash itself. [Needs testing, to check there isn't something
> bash-specific hidden away, obviously]

True.  Unfortunately, I can't test it right now because I can't get
DPDK to build on either Linux or FreeBSD, and I'm out of time to debug
the build failures for now.  Would you like me to resubmit the patch,
altered to use /bin/sh, without testing?

>
>> diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
>> index c4fec5a63..ebf36f830 100755
>> --- a/usertools/dpdk-setup.sh
>> +++ b/usertools/dpdk-setup.sh
>> @@ -1,4 +1,4 @@
>> -#! /bin/bash
>> +#! /usr/bin/env bash
>>
>>  #   BSD LICENSE
>>  #
>> --
> Not sure having this linux-specific is a problem for dpdk-setup.sh,
> since I don't think large parts of that script work with BSD anyway,
> e.g. it assumes a linux hugetlbfs filesystem for hugepage setup. Not
> that there is any harm in making the change you suggest either.

Yep, that's what I figured.

-Alan

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-31 15:11   ` alan somers
@ 2017-07-31 15:22     ` Bruce Richardson
  2017-07-31 16:18       ` alan somers
  0 siblings, 1 reply; 13+ messages in thread
From: Bruce Richardson @ 2017-07-31 15:22 UTC (permalink / raw)
  To: alan somers; +Cc: dev

On Mon, Jul 31, 2017 at 09:11:11AM -0600, alan somers wrote:
> On Fri, Jul 28, 2017 at 3:28 AM, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
> >> From: Alan Somers <asomers@gmail.com>
> >>
> >> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
> >>
> >> Signed-off-by: Alan Somers <asomers@gmail.com>
> >> ---
> >>  examples/performance-thread/l3fwd-thread/test.sh | 2 +-
> >>  usertools/dpdk-setup.sh                          | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
> >> index b7718b622..eb1fe2dc2 100755
> >> --- a/examples/performance-thread/l3fwd-thread/test.sh
> >> +++ b/examples/performance-thread/l3fwd-thread/test.sh
> >> @@ -1,4 +1,4 @@
> >> -#!/bin/bash
> >> +#!/usr/bin/env bash
> >>
> >>  case "$1" in
> >>
> > This script doesn't look to be using any bash specific features to me,
> > so a better fix might be to change it to use /bin/sh rather than
> > requiring bash itself. [Needs testing, to check there isn't something
> > bash-specific hidden away, obviously]
> 
> True.  Unfortunately, I can't test it right now because I can't get
> DPDK to build on either Linux or FreeBSD, and I'm out of time to debug
> the build failures for now.  Would you like me to resubmit the patch,
> altered to use /bin/sh, without testing?
> 
> >
I'm not sure it's that important a change that we need to rush into
doing so.

What difficulties are you having getting DPDK to build? Is it just
platform setup issues?

/Bruce

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-31 15:22     ` Bruce Richardson
@ 2017-07-31 16:18       ` alan somers
  2017-07-31 17:06         ` Wiles, Keith
  0 siblings, 1 reply; 13+ messages in thread
From: alan somers @ 2017-07-31 16:18 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Mon, Jul 31, 2017 at 9:22 AM, Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Mon, Jul 31, 2017 at 09:11:11AM -0600, alan somers wrote:
>> On Fri, Jul 28, 2017 at 3:28 AM, Bruce Richardson
>> <bruce.richardson@intel.com> wrote:
>> > On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
>> >> From: Alan Somers <asomers@gmail.com>
>> >>
>> >> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>> >>
>> >> Signed-off-by: Alan Somers <asomers@gmail.com>
>> >> ---
>> >>  examples/performance-thread/l3fwd-thread/test.sh | 2 +-
>> >>  usertools/dpdk-setup.sh                          | 2 +-
>> >>  2 files changed, 2 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
>> >> index b7718b622..eb1fe2dc2 100755
>> >> --- a/examples/performance-thread/l3fwd-thread/test.sh
>> >> +++ b/examples/performance-thread/l3fwd-thread/test.sh
>> >> @@ -1,4 +1,4 @@
>> >> -#!/bin/bash
>> >> +#!/usr/bin/env bash
>> >>
>> >>  case "$1" in
>> >>
>> > This script doesn't look to be using any bash specific features to me,
>> > so a better fix might be to change it to use /bin/sh rather than
>> > requiring bash itself. [Needs testing, to check there isn't something
>> > bash-specific hidden away, obviously]
>>
>> True.  Unfortunately, I can't test it right now because I can't get
>> DPDK to build on either Linux or FreeBSD, and I'm out of time to debug
>> the build failures for now.  Would you like me to resubmit the patch,
>> altered to use /bin/sh, without testing?
>>
>> >
> I'm not sure it's that important a change that we need to rush into
> doing so.
>
> What difficulties are you having getting DPDK to build? Is it just
> platform setup issues?

On Linux, I fail for lack of numa.h.  The docs say to install
libnuma-devel, but that package doesn't exist on my distro (Ubuntu
16.04).  On FreeBSD, I get this compile error
/usr/home/alans/freebsd/head/sys/vm/vm_phys.h:120:2: error: use of undeclared
      identifier 'vm_cnt'
        vm_cnt.v_free_count += adj;

On FreeBSD stable/11, I get a litany of errors, beginning with:
n file included from contigmem.c:49:
In file included from ./machine/bus.h:6:
In file included from ./x86/bus.h:1038:
In file included from ./machine/bus_dma.h:32:
./x86/bus_dma.h:43:1: error: static declaration of 'bus_dmamap_create' follows
      non-static declaration
bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
^
/usr/home/alans/freebsd/stable_11/sys/sys/bus_dma.h:262:5: note: previous
      declaration is here
int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp);

And on FreeBSD stable/10, I get a make error:
make[6]: "/usr/home/alans/freebsd/stable_10/sys/conf/kern.mk" line 43:
Malformed conditional (${MK_FORMAT_EXTENSIONS} == "no")

-Alan

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-31 16:18       ` alan somers
@ 2017-07-31 17:06         ` Wiles, Keith
  2017-07-31 19:08           ` alan somers
  0 siblings, 1 reply; 13+ messages in thread
From: Wiles, Keith @ 2017-07-31 17:06 UTC (permalink / raw)
  To: alan somers; +Cc: Richardson, Bruce, dev


> On Jul 31, 2017, at 11:18 AM, alan somers <asomers@gmail.com> wrote:
> 
> On Mon, Jul 31, 2017 at 9:22 AM, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
>> On Mon, Jul 31, 2017 at 09:11:11AM -0600, alan somers wrote:
>>> On Fri, Jul 28, 2017 at 3:28 AM, Bruce Richardson
>>> <bruce.richardson@intel.com> wrote:
>>>> On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
>>>>> From: Alan Somers <asomers@gmail.com>
>>>>> 
>>>>> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>>>>> 
>>>>> Signed-off-by: Alan Somers <asomers@gmail.com>
>>>>> ---
>>>>> examples/performance-thread/l3fwd-thread/test.sh | 2 +-
>>>>> usertools/dpdk-setup.sh                          | 2 +-
>>>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>>> 
>>>>> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
>>>>> index b7718b622..eb1fe2dc2 100755
>>>>> --- a/examples/performance-thread/l3fwd-thread/test.sh
>>>>> +++ b/examples/performance-thread/l3fwd-thread/test.sh
>>>>> @@ -1,4 +1,4 @@
>>>>> -#!/bin/bash
>>>>> +#!/usr/bin/env bash
>>>>> 
>>>>> case "$1" in
>>>>> 
>>>> This script doesn't look to be using any bash specific features to me,
>>>> so a better fix might be to change it to use /bin/sh rather than
>>>> requiring bash itself. [Needs testing, to check there isn't something
>>>> bash-specific hidden away, obviously]
>>> 
>>> True.  Unfortunately, I can't test it right now because I can't get
>>> DPDK to build on either Linux or FreeBSD, and I'm out of time to debug
>>> the build failures for now.  Would you like me to resubmit the patch,
>>> altered to use /bin/sh, without testing?
>>> 
>>>> 
>> I'm not sure it's that important a change that we need to rush into
>> doing so.
>> 
>> What difficulties are you having getting DPDK to build? Is it just
>> platform setup issues?
> 
> On Linux, I fail for lack of numa.h.  The docs say to install
> libnuma-devel, but that package doesn't exist on my distro (Ubuntu
> 16.04).  On FreeBSD, I get this compile error
> /usr/home/alans/freebsd/head/sys/vm/vm_phys.h:120:2: error: use of undeclared
>      identifier 'vm_cnt'
>        vm_cnt.v_free_count += adj;

On my Ubuntu 17.04 the package is called libnuma-dev 

> 
> On FreeBSD stable/11, I get a litany of errors, beginning with:
> n file included from contigmem.c:49:
> In file included from ./machine/bus.h:6:
> In file included from ./x86/bus.h:1038:
> In file included from ./machine/bus_dma.h:32:
> ./x86/bus_dma.h:43:1: error: static declaration of 'bus_dmamap_create' follows
>      non-static declaration
> bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
> ^
> /usr/home/alans/freebsd/stable_11/sys/sys/bus_dma.h:262:5: note: previous
>      declaration is here
> int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp);
> 
> And on FreeBSD stable/10, I get a make error:
> make[6]: "/usr/home/alans/freebsd/stable_10/sys/conf/kern.mk" line 43:
> Malformed conditional (${MK_FORMAT_EXTENSIONS} == "no")
> 
> -Alan

Regards,
Keith

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-31 17:06         ` Wiles, Keith
@ 2017-07-31 19:08           ` alan somers
  0 siblings, 0 replies; 13+ messages in thread
From: alan somers @ 2017-07-31 19:08 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: Richardson, Bruce, dev

On Mon, Jul 31, 2017 at 11:06 AM, Wiles, Keith <keith.wiles@intel.com> wrote:
>
>> On Jul 31, 2017, at 11:18 AM, alan somers <asomers@gmail.com> wrote:
>>
>> On Mon, Jul 31, 2017 at 9:22 AM, Bruce Richardson
>> <bruce.richardson@intel.com> wrote:
>>> On Mon, Jul 31, 2017 at 09:11:11AM -0600, alan somers wrote:
>>>> On Fri, Jul 28, 2017 at 3:28 AM, Bruce Richardson
>>>> <bruce.richardson@intel.com> wrote:
>>>>> On Thu, Jul 27, 2017 at 02:41:46PM -0600, asomers@gmail.com wrote:
>>>>>> From: Alan Somers <asomers@gmail.com>
>>>>>>
>>>>>> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>>>>>>
>>>>>> Signed-off-by: Alan Somers <asomers@gmail.com>
>>>>>> ---
>>>>>> examples/performance-thread/l3fwd-thread/test.sh | 2 +-
>>>>>> usertools/dpdk-setup.sh                          | 2 +-
>>>>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
>>>>>> index b7718b622..eb1fe2dc2 100755
>>>>>> --- a/examples/performance-thread/l3fwd-thread/test.sh
>>>>>> +++ b/examples/performance-thread/l3fwd-thread/test.sh
>>>>>> @@ -1,4 +1,4 @@
>>>>>> -#!/bin/bash
>>>>>> +#!/usr/bin/env bash
>>>>>>
>>>>>> case "$1" in
>>>>>>
>>>>> This script doesn't look to be using any bash specific features to me,
>>>>> so a better fix might be to change it to use /bin/sh rather than
>>>>> requiring bash itself. [Needs testing, to check there isn't something
>>>>> bash-specific hidden away, obviously]
>>>>
>>>> True.  Unfortunately, I can't test it right now because I can't get
>>>> DPDK to build on either Linux or FreeBSD, and I'm out of time to debug
>>>> the build failures for now.  Would you like me to resubmit the patch,
>>>> altered to use /bin/sh, without testing?
>>>>
>>>>>
>>> I'm not sure it's that important a change that we need to rush into
>>> doing so.
>>>
>>> What difficulties are you having getting DPDK to build? Is it just
>>> platform setup issues?
>>
>> On Linux, I fail for lack of numa.h.  The docs say to install
>> libnuma-devel, but that package doesn't exist on my distro (Ubuntu
>> 16.04).  On FreeBSD, I get this compile error
>> /usr/home/alans/freebsd/head/sys/vm/vm_phys.h:120:2: error: use of undeclared
>>      identifier 'vm_cnt'
>>        vm_cnt.v_free_count += adj;
>
> On my Ubuntu 17.04 the package is called libnuma-dev

Thanks.  That gets dpdk to build.  But the performance-thread
directory still doesn't.  I could dig futher, but I'm really out of
time for this task.  That's why I suggest just changing the shebang to
find bash from the PATH, rather than use a different shell entirely.

-alan

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

* Re: [PATCH] Fix bash path in shebangs
  2017-09-13 15:55       ` alan somers
@ 2017-09-13 16:51         ` Thomas Monjalon
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2017-09-13 16:51 UTC (permalink / raw)
  To: alan somers; +Cc: dev

13/09/2017 17:55, alan somers:
> On Wed, Sep 13, 2017 at 9:39 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> > 13/09/2017 16:35, alan somers:
> >> On Wed, Sep 13, 2017 at 3:37 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> >> > 27/07/2017 22:12, asomers@gmail.com:
> >> >> From: Alan Somers <asomers@gmail.com>
> >> >>
> >> >> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
> >> >
> >> > Why is it an issue?
> >> >
> >> > Can you run dpdk-setup.sh on a non-Linux system?
> >>
> >> Nope, because even dpdk-setup.sh assumes that bash is located at
> >> /bin/bash.  But "/usr/bin/env bash" works everywhere.
> >
> > No, I mean: can you run dpdk-setup.sh on a non-Linux system after your change?
> >
> > This script configures a Linux system, so I want to understand
> > what situation you are trying to fix.
> 
> I'm using Ceph, which imports DPDK whole (and several other 3rd party
> projects too).  I'm not sure which parts of these 3rd party projects
> Ceph is actually using, but it's easier to fix the bash path
> everywhere than to determine which places need it to be fixed.  And
> AFAIK it doesn't cause any problems on any modern Unix derivative.

If I understand well, you don't know which case it is fixing,
but you prefer the shebang being this way.

I am a bit reluctant to fix something if we don't know what is the bug.
Maybe it does not hurt, but there can be some drawbacks:
	- the chosen bash binary depends on the environment PATH
	- it makes impossible to add some options in the shebang

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

* Re: [PATCH] Fix bash path in shebangs
  2017-09-13 15:39     ` Thomas Monjalon
@ 2017-09-13 15:55       ` alan somers
  2017-09-13 16:51         ` Thomas Monjalon
  0 siblings, 1 reply; 13+ messages in thread
From: alan somers @ 2017-09-13 15:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Wed, Sep 13, 2017 at 9:39 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 13/09/2017 16:35, alan somers:
>> On Wed, Sep 13, 2017 at 3:37 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
>> > 27/07/2017 22:12, asomers@gmail.com:
>> >> From: Alan Somers <asomers@gmail.com>
>> >>
>> >> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>> >
>> > Why is it an issue?
>> >
>> > Can you run dpdk-setup.sh on a non-Linux system?
>>
>> Nope, because even dpdk-setup.sh assumes that bash is located at
>> /bin/bash.  But "/usr/bin/env bash" works everywhere.
>
> No, I mean: can you run dpdk-setup.sh on a non-Linux system after your change?
>
> This script configures a Linux system, so I want to understand
> what situation you are trying to fix.

I'm using Ceph, which imports DPDK whole (and several other 3rd party
projects too).  I'm not sure which parts of these 3rd party projects
Ceph is actually using, but it's easier to fix the bash path
everywhere than to determine which places need it to be fixed.  And
AFAIK it doesn't cause any problems on any modern Unix derivative.
-Alan

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

* Re: [PATCH] Fix bash path in shebangs
  2017-09-13 14:35   ` alan somers
@ 2017-09-13 15:39     ` Thomas Monjalon
  2017-09-13 15:55       ` alan somers
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2017-09-13 15:39 UTC (permalink / raw)
  To: alan somers; +Cc: dev

13/09/2017 16:35, alan somers:
> On Wed, Sep 13, 2017 at 3:37 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> > 27/07/2017 22:12, asomers@gmail.com:
> >> From: Alan Somers <asomers@gmail.com>
> >>
> >> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
> >
> > Why is it an issue?
> >
> > Can you run dpdk-setup.sh on a non-Linux system?
> 
> Nope, because even dpdk-setup.sh assumes that bash is located at
> /bin/bash.  But "/usr/bin/env bash" works everywhere.

No, I mean: can you run dpdk-setup.sh on a non-Linux system after your change?

This script configures a Linux system, so I want to understand
what situation you are trying to fix.

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

* Re: [PATCH] Fix bash path in shebangs
  2017-09-13  9:37 ` Thomas Monjalon
@ 2017-09-13 14:35   ` alan somers
  2017-09-13 15:39     ` Thomas Monjalon
  0 siblings, 1 reply; 13+ messages in thread
From: alan somers @ 2017-09-13 14:35 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Wed, Sep 13, 2017 at 3:37 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 27/07/2017 22:12, asomers@gmail.com:
>> From: Alan Somers <asomers@gmail.com>
>>
>> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.
>
> Why is it an issue?
>
> Can you run dpdk-setup.sh on a non-Linux system?
>

Nope, because even dpdk-setup.sh assumes that bash is located at
/bin/bash.  But "/usr/bin/env bash" works everywhere.

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

* Re: [PATCH] Fix bash path in shebangs
  2017-07-27 20:12 asomers
@ 2017-09-13  9:37 ` Thomas Monjalon
  2017-09-13 14:35   ` alan somers
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2017-09-13  9:37 UTC (permalink / raw)
  To: asomers; +Cc: dev

27/07/2017 22:12, asomers@gmail.com:
> From: Alan Somers <asomers@gmail.com>
> 
> "/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.

Why is it an issue?

Can you run dpdk-setup.sh on a non-Linux system?

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

* [PATCH] Fix bash path in shebangs
@ 2017-07-27 20:12 asomers
  2017-09-13  9:37 ` Thomas Monjalon
  0 siblings, 1 reply; 13+ messages in thread
From: asomers @ 2017-07-27 20:12 UTC (permalink / raw)
  To: dev; +Cc: Alan Somers

From: Alan Somers <asomers@gmail.com>

"/bin/bash" is a Linuxism.  "/usr/bin/env bash" is portable.

Signed-off-by Alan Somers <asomers@gmail.com>
---
 examples/performance-thread/l3fwd-thread/test.sh | 2 +-
 usertools/dpdk-setup.sh                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/test.sh b/examples/performance-thread/l3fwd-thread/test.sh
index b7718b622..eb1fe2dc2 100755
--- a/examples/performance-thread/l3fwd-thread/test.sh
+++ b/examples/performance-thread/l3fwd-thread/test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 case "$1" in
 
diff --git a/usertools/dpdk-setup.sh b/usertools/dpdk-setup.sh
index c4fec5a63..ebf36f830 100755
--- a/usertools/dpdk-setup.sh
+++ b/usertools/dpdk-setup.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /usr/bin/env bash
 
 #   BSD LICENSE
 #
-- 
2.13.3

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

end of thread, other threads:[~2017-09-13 16:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 20:41 [PATCH] Fix bash path in shebangs asomers
2017-07-28  9:28 ` Bruce Richardson
2017-07-31 15:11   ` alan somers
2017-07-31 15:22     ` Bruce Richardson
2017-07-31 16:18       ` alan somers
2017-07-31 17:06         ` Wiles, Keith
2017-07-31 19:08           ` alan somers
  -- strict thread matches above, loose matches on Subject: below --
2017-07-27 20:12 asomers
2017-09-13  9:37 ` Thomas Monjalon
2017-09-13 14:35   ` alan somers
2017-09-13 15:39     ` Thomas Monjalon
2017-09-13 15:55       ` alan somers
2017-09-13 16:51         ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.