Hot fix for fixing bad genesis file on 2.1.5 install#1553
Merged
algojohnlee merged 3 commits intoalgorand:masterfrom Sep 24, 2020
Merged
Hot fix for fixing bad genesis file on 2.1.5 install#1553algojohnlee merged 3 commits intoalgorand:masterfrom
algojohnlee merged 3 commits intoalgorand:masterfrom
Conversation
onetechnical
requested changes
Sep 24, 2020
Contributor
onetechnical
left a comment
There was a problem hiding this comment.
The logic looks okay, but can you verify the shebang change requirement?
onetechnical
previously approved these changes
Sep 24, 2020
Contributor
tsachiherman
left a comment
There was a problem hiding this comment.
Overall looks good. Few ideas for better error handling.
| if [ "$1" = "configure" ]; then | ||
| if [ -f /var/lib/algorand/genesis.json-2.1.5-patch ]; then | ||
| # 2.1.5 bug fix - restore user-modified genesis.json | ||
| mv /var/lib/algorand/genesis.json-2.1.5-patch /var/lib/algorand/genesis.json |
Contributor
There was a problem hiding this comment.
maybe
mv -f /var/lib/algorand/genesis.json-2.1.5-patch /var/lib/algorand/genesis.json
to avoid files modes that won't permit writing ?
| # Filter out `algorand-indexer` and `algorand-devtools` packages, they are allowed to be | ||
| # installed alongside other `algorand` packages. | ||
| INSTALLED_PKG=$(grep -v -e algorand-indexer -e algorand-devtools <<< "$PKG_INFO" | awk '{print $1}') | ||
| ALGO_MD5=$(md5sum /var/lib/algorand/genesis.json | awk '{print $1}') |
Contributor
There was a problem hiding this comment.
since you're using pipes, consider using set -o pipefail
Contributor
There was a problem hiding this comment.
and then, use export BASHOPTS to export that to the subshell.
onetechnical
approved these changes
Sep 24, 2020
Contributor
onetechnical
left a comment
There was a problem hiding this comment.
Still looks good to me!
Contributor
|
Tests unrelated to changes here, and Tsachi's changes addressed, merging. |
algojohnlee
added a commit
that referenced
this pull request
Sep 24, 2020
Hot fix for fixing bad genesis file on 2.1.5 install (#1553)
tsachiherman
pushed a commit
to tsachiherman/go-algorand
that referenced
this pull request
Jul 7, 2021
tsachiherman
pushed a commit
to tsachiherman/go-algorand
that referenced
this pull request
Jul 7, 2021
tsachiherman
pushed a commit
to tsachiherman/go-algorand
that referenced
this pull request
Jul 7, 2021
…ta2.1.6 Hot fix for fixing bad genesis file on 2.1.5 install (algorand#1553)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This tests the following scenarios:
Test Plan
Build package locally and run through each of the tests outlined above.