-
Notifications
You must be signed in to change notification settings - Fork 527
Onetechnical/relstable2.1.6 #1552
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
Merged
algojohnlee
merged 7 commits into
algorand:rel/stable
from
onetechnical:onetechnical/relstable2.1.6
Sep 25, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8cb09a7
Bug fix - use DEFAULT_RELEASE_NETWORK genesis file in debian package …
onetechnical c7c3122
Update buildnum.dat
onetechnical 314a505
Merge pull request #1547 from onetechnical/onetechnical/relbeta2.1.6
algojohnlee 95d1af1
Merge branch 'rel/beta' into onetechnical/relstable2.1.6
onetechnical c241820
Hot fix for fixing bad genesis file on 2.1.5 install (#1553)
16287a9
Merge pull request #1554 from onetechnical/onetechnical/relbeta2.1.6
algojohnlee 20aeb09
Merge branch 'rel/beta' into onetechnical/relstable2.1.6
onetechnical File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 5 | ||
| 6 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,49 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
| set -eo pipefail | ||
| export BASHOPTS | ||
|
|
||
| PKG_NAME=@PKG_NAME@ | ||
|
|
||
| if [ "$1" != install ] | ||
| if [ "$1" = install ] | ||
| then | ||
| exit 0 | ||
| if dpkg-query --list 'algorand*' &> /dev/null | ||
| then | ||
| if PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed") | ||
| then | ||
| # 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}') | ||
|
|
||
| if [ -n "$INSTALLED_PKG" ] | ||
| then | ||
| echo -e "\nAlgorand does not currently support multi-distribution installations!\n\ | ||
| To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\ | ||
| sudo apt-get remove $INSTALLED_PKG\n\ | ||
| sudo apt-get install $PKG_NAME\n" | ||
| exit 1 | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| if dpkg-query --list 'algorand*' &> /dev/null | ||
| if [ "$1" = upgrade ] | ||
| then | ||
| if PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed") | ||
| if [ -f /var/lib/algorand/genesis.json ] | ||
| then | ||
| # 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}') | ||
| ALGO_TIMESTAMP=$(stat -c %Y /var/lib/algorand/genesis.json) | ||
|
|
||
| if [ -n "$INSTALLED_PKG" ] | ||
| if [ "$ALGO_MD5" = "9afc34b96a2c4a9f936870cd26ae7873" ] | ||
| then | ||
| echo -e "\nAlgorand does not currently support multi-distribution installations!\n\ | ||
| To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\ | ||
| sudo apt-get remove $INSTALLED_PKG\n\ | ||
| sudo apt-get install $PKG_NAME\n" | ||
| exit 1 | ||
| if [[ "$ALGO_TIMESTAMP" != 1600456830 || | ||
| ( "$ALGO_TIMESTAMP" = 1600456830 && ! -d /var/lib/algorand/mainnet-v1.0 ) ]] | ||
| then | ||
| # 2.1.5 bug fix - back up user-modified genesis.json to restore after conffiles | ||
| cp -p /var/lib/algorand/genesis.json /var/lib/algorand/genesis.json-2.1.5-patch | ||
| fi | ||
| fi | ||
|
|
||
| fi | ||
| fi | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
is this stuff checking that the last time the genesis file was edited is the right date and checksum?
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.
That timestamp is the timestamp of the 2.1.5 genesis files only, and we're using to check if the install was prior to or after 2.1.5.