From b6af7e78d82749bcb40d570436541a1ed5e3b1e3 Mon Sep 17 00:00:00 2001 From: Greg Szabo Date: Wed, 26 Jul 2017 21:39:48 +0000 Subject: [PATCH] build process fix: tendermint folder permission --- build/basecoin/DEBIAN/postinst | 1 + build/ethermint/DEBIAN/postinst | 2 ++ build/gaia/DEBIAN/postinst | 3 +++ build/spectemplates/basecoin.spec | 2 ++ build/spectemplates/ethermint.spec | 3 +++ build/spectemplates/gaia.spec | 2 ++ build/spectemplates/trackomatron.spec | 2 ++ build/trackomatron/DEBIAN/postinst | 3 +++ 8 files changed, 18 insertions(+) diff --git a/build/basecoin/DEBIAN/postinst b/build/basecoin/DEBIAN/postinst index 8c9e169f..a8dd0c15 100644 --- a/build/basecoin/DEBIAN/postinst +++ b/build/basecoin/DEBIAN/postinst @@ -25,6 +25,7 @@ case "$1" in #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 sudo -Hu basecoin tendermint init --home /etc/basecoin/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 + chmod 755 /etc/basecoin/tendermint systemctl daemon-reload ;; diff --git a/build/ethermint/DEBIAN/postinst b/build/ethermint/DEBIAN/postinst index add853ab..0e0fc286 100644 --- a/build/ethermint/DEBIAN/postinst +++ b/build/ethermint/DEBIAN/postinst @@ -28,6 +28,8 @@ case "$1" in sudo -Hu ethermint /usr/bin/ethermint --datadir /etc/ethermint init /etc/ethermint/genesis.json sudo -Hu ethermint tendermint init --home /etc/ethermint/tendermint + chmod 755 /etc/ethermint/tendermint + systemctl daemon-reload ;; diff --git a/build/gaia/DEBIAN/postinst b/build/gaia/DEBIAN/postinst index 7d9bd7c5..ee6c7e85 100644 --- a/build/gaia/DEBIAN/postinst +++ b/build/gaia/DEBIAN/postinst @@ -25,6 +25,9 @@ case "$1" in #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 sudo -Hu gaia tendermint init --home /etc/gaia/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 + + chmod 755 /etc/gaia/tendermint + systemctl daemon-reload ;; diff --git a/build/spectemplates/basecoin.spec b/build/spectemplates/basecoin.spec index addbf714..57dd2356 100644 --- a/build/spectemplates/basecoin.spec +++ b/build/spectemplates/basecoin.spec @@ -39,6 +39,8 @@ sudo -Hu %{name} basecoin init --home %{_sysconfdir}/%{name} 2B24DEE236476230016 sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 +chmod 755 %{_sysconfdir}/%{name}/tendermint + #Temporary until https://github.com/tendermint/basecoin/issues/123 rm -f %{_sysconfdir}/%{name}/key.json rm -f %{_sysconfdir}/%{name}/key2.json diff --git a/build/spectemplates/ethermint.spec b/build/spectemplates/ethermint.spec index 9d059821..3f2eaa54 100644 --- a/build/spectemplates/ethermint.spec +++ b/build/spectemplates/ethermint.spec @@ -35,6 +35,9 @@ cd %{name}-%{version}-%{release} %post sudo -Hu %{name} %{_bindir}/%{name} --datadir %{_sysconfdir}/%{name} init %{_sysconfdir}/%{name}/genesis.json sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint + +chmod 755 %{_sysconfdir}/%{name}/tendermint + systemctl daemon-reload %preun diff --git a/build/spectemplates/gaia.spec b/build/spectemplates/gaia.spec index 2ab976b2..abc4e036 100644 --- a/build/spectemplates/gaia.spec +++ b/build/spectemplates/gaia.spec @@ -38,6 +38,8 @@ sudo -Hu %{name} gaia init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF1 sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 +chmod 755 %{_sysconfdir}/%{name}/tendermint + #Temporary until https://github.com/tendermint/basecoin/issues/123 rm -f %{_sysconfdir}/%{name}/key.json rm -f %{_sysconfdir}/%{name}/key2.json diff --git a/build/spectemplates/trackomatron.spec b/build/spectemplates/trackomatron.spec index 3a339667..a159c981 100644 --- a/build/spectemplates/trackomatron.spec +++ b/build/spectemplates/trackomatron.spec @@ -38,6 +38,8 @@ sudo -Hu %{name} tracko init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168D sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 +chmod 755 %{_sysconfdir}/%{name}/tendermint + #Temporary until https://github.com/tendermint/basecoin/issues/123 rm -f %{_sysconfdir}/%{name}/key.json rm -f %{_sysconfdir}/%{name}/key2.json diff --git a/build/trackomatron/DEBIAN/postinst b/build/trackomatron/DEBIAN/postinst index 0297f196..3599616e 100644 --- a/build/trackomatron/DEBIAN/postinst +++ b/build/trackomatron/DEBIAN/postinst @@ -25,6 +25,9 @@ case "$1" in #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124 sudo -Hu trackomatron tendermint init --home /etc/trackomatron/tendermint #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542 + + chmod 755 /etc/trackomatron/tendermint + systemctl daemon-reload ;;