New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: Fix bash path in shebangs #16494
Conversation
CC @wjw , who's done a lot of work on Ceph portability |
qa/workunits/cephtool/test.sh
Outdated
# -*- mode:shell-script; tab-width:8; sh-basic-offset:2; indent-tabs-mode:t -*- | ||
# vim: ts=8 sw=8 ft=bash smarttab | ||
|
||
source $(dirname $0)/../ceph-helpers.sh | ||
|
||
set -e | ||
set -ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers
This change silences the -x on the ceph-helpers.sh, not sure you want to change behaviour in such an invasive patch.
src/test/encoding/check-generated.sh
Outdated
@@ -1,4 +1,4 @@ | |||
#!/bin/bash -e | |||
#!/usr/bin/env bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers
Missing -e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, not. There's already a redundant "set -e" on line 8
src/test/encoding/readable.sh
Outdated
@@ -1,4 +1,4 @@ | |||
#!/bin/bash -e | |||
#!/usr/bin/env bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers
Missing -e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, there's already a redundant set -e
on line 9
On 22-7-2017 01:01, Alan Somers wrote:
CC @wjw <https://github.com/wjw> , who's done a lot of work on Ceph
portability
Hi Alan,
Welcome to ceph-dev, lets see if we can get BlueStore into FreeBSD...
Big patch to kick off with, but lets see how we fare.
Could you amend your PR text with:
prefix the title with a category of what your change.
I would probably here use: "scripts:"
Copy the text in commit also in the text of the PR.
You already managed to get a merge conflict in:
qa/workunits/mon/workloadgen.sh
Which is going to happen more often because of the number of files
modified. Normally I chose to make smaller PRs because they tend to get
accepted earlier. Large PRs just take a long time because they also need
to run thru QA and bigger patches run larger chance of errors or conflicts,
Not sure if you already found:
./SubmittingPatches.rst
…--WjW
|
It turns out that some submodules also use /bin/bash shebangs. So I'm reverting the changes I made to README.FreeBSD. But the other changes are still good. |
jenkins retest please |
@asomers |
96c6323
to
d02bdf3
Compare
@@ -14,7 +14,8 @@ | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU Library Public License for more details. | |||
# | |||
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh | |||
set -x | |||
source $CEPH_ROOT/qa/workunits/ceph-helpers.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers
You are moving code back to workunits, were a few commits back things got moved to standalone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grahh, missed one. I'll fix it.
@@ -1,4 +1,4 @@ | |||
#!/bin/bash -x | |||
#!/usr/bin/env bash | |||
|
|||
set -e | |||
set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers
Why not join them on one line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I could do that too.
qa/workunits/fs/quota/quota.sh
Outdated
@@ -1,4 +1,4 @@ | |||
#!/bin/bash | |||
#!/usr/bin/env bash | |||
|
|||
set -e | |||
set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asomers Dito, unless you only want to change what really needs to change.
@tchaikov |
/bin/bash is a Linuxism. Other operating systems install bash to different paths. Use /usr/bin/env in shebangs to find bash. Signed-off-by: Alan Somers <asomers@gmail.com>
retest this please |
@@ -1,4 +1,4 @@ | |||
#! /bin/bash | |||
#! /usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think systemd is used by Linux only. so this change is not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tchaikov
I happy to say it is Linux only...
The amount of unexpected irritation I hear from my colleague makes me a content init user.
@tchaikov ok to merge? |
/bin/bash is a Linuxism. Other operating systems install bash to
different paths. Use /usr/bin/env in shebangs to find bash.