Fix/refactor bitcoind recipe, upgrade bitcoind to 0.21 #298

Merged
raucao merged 5 commits from chore/update_bitcoin-core into master 2021-01-28 15:26:32 +00:00
Showing only changes of commit 0d2a04f8ba - Show all commits

View File

@ -37,23 +37,25 @@ ark 'bitcoind' do
url "https://bitcoincore.org/bin/bitcoin-core-#{node['bitcoin']['version']}/bitcoin-#{node['bitcoin']['version']}.tar.gz" url "https://bitcoincore.org/bin/bitcoin-core-#{node['bitcoin']['version']}/bitcoin-#{node['bitcoin']['version']}.tar.gz"
checksum node['bitcoin']['checksum'] checksum node['bitcoin']['checksum']
action :put action :put
notifies :run, 'execute[compile_bitcoin-core_dependencies]', :immediately
end end
execute "Compile bitcoin-core dependencies" do execute "compile_bitcoin-core_dependencies" do
cwd "/usr/local/bitcoind/depends" cwd "/usr/local/bitcoind/depends"
command "make NO_QT=1" command "make NO_QT=1"
not_if { ::File.directory?("/usr/local/bitcoind/depends/x86_64-pc-linux-gnu") } action :nothing
notifies :run, 'bash[compile_bitcoin-core]', :immediately
end end
execute "Configure, compile bitcoin-core" do bash "compile_bitcoin-core" do
cwd "/usr/local/bitcoind" cwd "/usr/local/bitcoind"
# FIXME only executes first array item? code <<-EOH
command [ ./autogen.sh
"./autogen.sh", ./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu
"./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu", make
"make" EOH
] action :nothing
not_if { ::File.exist?("/usr/local/bitcoind/src/bitcoind") } notifies :restart, "systemd_unit[bitcoind.service]", :delayed
end end
link "/usr/local/bin/bitcoind" do link "/usr/local/bin/bitcoind" do