|
|
|
@ -47,7 +47,7 @@ Patch0: ethereum.patch
|
|
|
|
|
|
|
|
|
|
# build information |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20160101, go |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20160101 |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20160101, apg |
|
|
|
|
%if "%{with_private}" == "yes" && "%{with_bootnode}" == "yes" |
|
|
|
|
PreReq: ethereum-bootnode |
|
|
|
|
%endif |
|
|
|
@ -138,26 +138,28 @@ PreReq: ethereum-bootnode
|
|
|
|
|
$RPM_INSTALL_PREFIX/etc/ethereum/ethereum-geth.conf |
|
|
|
|
|
|
|
|
|
%if "%{with_private}" == "yes" |
|
|
|
|
# generate genesis block |
|
|
|
|
echo "Generating Private Ethereum Blockchain Genesis Block" | \ |
|
|
|
|
# generate local account |
|
|
|
|
echo "Generating Private Ethereum Blockchain Local Account" | \ |
|
|
|
|
%{l_rpmtool} msg -b -t notice |
|
|
|
|
su - %{l_rusr} -c \ |
|
|
|
|
"umask 0077; $RPM_INSTALL_PREFIX/bin/apg -n1 -a1 -m32 -x32 -M NCL \ |
|
|
|
|
>$RPM_INSTALL_PREFIX/etc/ethereum/ethereum-account.passwd" |
|
|
|
|
account=`su - %{l_rusr} -c \ |
|
|
|
|
"$RPM_INSTALL_PREFIX/bin/ethereum-geth \ |
|
|
|
|
--config $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-geth.conf \ |
|
|
|
|
init $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-genesis.json \ |
|
|
|
|
>>$RPM_INSTALL_PREFIX/var/ethereum/log/ethereum-geth.log 2>&1" |
|
|
|
|
account new \ |
|
|
|
|
--password $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-account.passwd" 2>&1 | \ |
|
|
|
|
egrep "^Address:" | sed -e 's;^Address: {\(.*\)}.*;\1;'` |
|
|
|
|
|
|
|
|
|
# generate local account |
|
|
|
|
echo "Generating Private Ethereum Blockchain Local Account" | \ |
|
|
|
|
# generate genesis block |
|
|
|
|
echo "Generating Private Ethereum Blockchain Genesis Block" | \ |
|
|
|
|
%{l_rpmtool} msg -b -t notice |
|
|
|
|
su - %{l_rusr} -c \ |
|
|
|
|
"$RPM_INSTALL_PREFIX/bin/apg -n1 -a1 -m32 -x32 -M NCL \ |
|
|
|
|
>$RPM_INSTALL_PREFIX/etc/ethereum/ethereum-account.passwd" |
|
|
|
|
%{l_shtool} subst -e "s;@account@;$account;" \ |
|
|
|
|
$RPM_INSTALL_PREFIX/etc/ethereum/ethereum-genesis.json |
|
|
|
|
su - %{l_rusr} -c \ |
|
|
|
|
"$RPM_INSTALL_PREFIX/bin/ethereum-geth \ |
|
|
|
|
--config $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-geth.conf \ |
|
|
|
|
account new \ |
|
|
|
|
--password $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-account.passwd \ |
|
|
|
|
init $RPM_INSTALL_PREFIX/etc/ethereum/ethereum-genesis.json \ |
|
|
|
|
>>$RPM_INSTALL_PREFIX/var/ethereum/log/ethereum-geth.log 2>&1" |
|
|
|
|
%endif |
|
|
|
|
elif [ $1 -eq 2 ]; then |
|
|
|
|