Browse Source

basecoin rpm package fix with show_validator

pull/1943/head
Greg Szabo 8 years ago
parent
commit
c30893d867
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      devops/rpmbuild/spectemplates/basecoin.spec

+ 2
- 3
devops/rpmbuild/spectemplates/basecoin.spec View File

@ -11,7 +11,6 @@ Packager: Greg Szabo
Requires: tendermint >= 0.10.0
Provides: basecli
Requires(pre): /sbin/useradd
Requires(post): %{__python}
%description
Basecoin is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins.
@ -52,7 +51,7 @@ cd %{name}-%{version}
%post
test ! -f %{_sysconfdir}/%{name}/priv_validator.json && tendermint gen_validator > %{_sysconfdir}/%{name}/priv_validator.json && %{__chmod} 0400 %{_sysconfdir}/%{name}/priv_validator.json && %{__chown} %{name}.%{name} %{_sysconfdir}/%{name}/priv_validator.json
test ! -f %{_sysconfdir}/%{name}/tendermint/priv_validator.json && tendermint gen_validator > %{_sysconfdir}/%{name}/tendermint/priv_validator.json && %{__chmod} 0400 %{_sysconfdir}/%{name}/tendermint/priv_validator.json && %{__chown} %{name}.%{name} %{_sysconfdir}/%{name}/tendermint/priv_validator.json
tendermint_pubkey=`%{__python} -uc "import json ; print json.loads(open('%{_sysconfdir}/%{name}/tendermint/priv_validator.json').read())['pub_key']['data']"`
tendermint_pubkey="`tendermint show_validator --home /etc/ethermint/tendermint --log_level error`"
test ! -f %{_sysconfdir}/%{name}/tendermint/genesis.json && %{__cat} << EOF > %{_sysconfdir}/%{name}/tendermint/genesis.json
{
"genesis_time": "2017-06-10T03:37:03Z",
@ -60,7 +59,7 @@ test ! -f %{_sysconfdir}/%{name}/tendermint/genesis.json && %{__cat} << EOF > %{
"validators":
[
{
"pub_key":{"type":"ed25519","data":"$tendermint_pubkey"},
"pub_key": $tendermint_pubkey,
"amount":10,
"name":"my_testchain_node"
}


Loading…
Cancel
Save