DPDK patches and discussions
 help / color / mirror / Atom feed
From: alan somers <asomers@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] Fix bash path in shebangs
Date: Mon, 31 Jul 2017 09:11:11 -0600	[thread overview]
Message-ID: <CAOtMX2gdV-Ry3U1PZEuAOHaC1DAU2-EDGWRu8g2xCsQvi7-ZqA@mail.gmail.com> (raw)
In-Reply-To: <20170728092800.GA24312@bricha3-MOBL3.ger.corp.intel.com>

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

  reply	other threads:[~2017-07-31 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-27 20:41 asomers
2017-07-28  9:28 ` Bruce Richardson
2017-07-31 15:11   ` alan somers [this message]
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

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=CAOtMX2gdV-Ry3U1PZEuAOHaC1DAU2-EDGWRu8g2xCsQvi7-ZqA@mail.gmail.com \
    --to=asomers@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).