Skip to content

chore: Change /bin/bash shebang to be env based#12834

Merged
aakoshh merged 2 commits intomasterfrom
af/bash-shebang
Mar 22, 2025
Merged

chore: Change /bin/bash shebang to be env based#12834
aakoshh merged 2 commits intomasterfrom
af/bash-shebang

Conversation

@aakoshh
Copy link
Copy Markdown
Contributor

@aakoshh aakoshh commented Mar 18, 2025

Changes #!/bin/bash in scripts into #!/usr/bin/env bash, to be more cross platform.

Why?

I was just trying to test initialising noir-repo on my Mac, because I wanted to avoid having to delete it on the mainframe, however the version of bash shipped with MacOS is 3.2, and it doesn't have all the options that the ci3 scripts assume, which caused failures. I have the latest bash installed via Homebrew, but the scripts are coded to use the one in /bin, which is the old version and cannot be updated.

$ hash=$(./noir/bootstrap.sh hash)
/Users/aakoshh/Work/aztec/aztec-packages/ci3/source_options: line 9: shopt: globstar: invalid shell option name
$ shopt
...
globskipdots   	on
globstar       	off
gnu_errfmt     	off
...
$ echo $SHELL
/opt/homebrew/bin/bash
$ /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
$ /opt/homebrew/bin/bash --version
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
$ /bin/bash
$ shopt
...
force_fignore  	on
gnu_errfmt     	off
histappend     	off
...

@aakoshh aakoshh requested a review from charlielye as a code owner March 18, 2025 10:28
@aakoshh aakoshh requested review from TomAFrench, charlielye and ludamad and removed request for charlielye March 18, 2025 10:29
@aakoshh aakoshh merged commit 7843a67 into master Mar 22, 2025
9 checks passed
@aakoshh aakoshh deleted the af/bash-shebang branch March 22, 2025 22:36
PhilWindle pushed a commit that referenced this pull request Mar 24, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
Changes `#!/bin/bash` in scripts into `#!/usr/bin/env bash`, to be more
cross platform.

### Why?

I was just trying to test initialising `noir-repo` on my Mac, because I
wanted to avoid having to delete it on the mainframe, however the
version of `bash` shipped with MacOS is 3.2, and it doesn't have all the
options that the `ci3` scripts assume, which caused failures. I have the
latest `bash` installed via Homebrew, but the scripts are coded to use
the one in `/bin`, which is the old version and cannot be updated.

```console
$ hash=$(./noir/bootstrap.sh hash)
/Users/aakoshh/Work/aztec/aztec-packages/ci3/source_options: line 9: shopt: globstar: invalid shell option name
$ shopt
...
globskipdots   	on
globstar       	off
gnu_errfmt     	off
...
$ echo $SHELL
/opt/homebrew/bin/bash
$ /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
$ /opt/homebrew/bin/bash --version
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
$ /bin/bash
$ shopt
...
force_fignore  	on
gnu_errfmt     	off
histappend     	off
...
```
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
Changes `#!/bin/bash` in scripts into `#!/usr/bin/env bash`, to be more
cross platform.

### Why?

I was just trying to test initialising `noir-repo` on my Mac, because I
wanted to avoid having to delete it on the mainframe, however the
version of `bash` shipped with MacOS is 3.2, and it doesn't have all the
options that the `ci3` scripts assume, which caused failures. I have the
latest `bash` installed via Homebrew, but the scripts are coded to use
the one in `/bin`, which is the old version and cannot be updated.

```console
$ hash=$(./noir/bootstrap.sh hash)
/Users/aakoshh/Work/aztec/aztec-packages/ci3/source_options: line 9: shopt: globstar: invalid shell option name
$ shopt
...
globskipdots   	on
globstar       	off
gnu_errfmt     	off
...
$ echo $SHELL
/opt/homebrew/bin/bash
$ /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
$ /opt/homebrew/bin/bash --version
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
$ /bin/bash
$ shopt
...
force_fignore  	on
gnu_errfmt     	off
histappend     	off
...
```
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants