Added Bitcoin Cash node package

This commit is contained in:
Jakub Matys 2018-05-31 11:50:46 +02:00
parent 56a1711ff3
commit 0487bcb5e4
13 changed files with 140 additions and 1 deletions

View File

@ -1,4 +1,4 @@
TARGETS = bitcoin zcash bcash ethereum
TARGETS = bitcoin zcash bcash ethereum bgold
IMAGE = blockbook-backend-build-deb
NO_CACHE = false

View File

@ -0,0 +1,13 @@
BGOLD_VERSION := 0.15.0
BUILD_VERSION := .2
all:
wget https://github.com/BTCGPU/BTCGPU/releases/download/v${BGOLD_VERSION}${BUILD_VERSION}/bitcoin-gold-${BGOLD_VERSION}-x86_64-linux-gnu.tar.gz
tar -xf bitcoin-gold-${BGOLD_VERSION}-x86_64-linux-gnu.tar.gz
mv bitcoin-gold-${BGOLD_VERSION} bgold
rm bgold/bin/bitcoin-qt
rm bgold/bin/test_bitcoin
clean:
rm -rf bgold
rm -f bitcoin-gold-${BGOLD_VERSION}-x86_64-linux-gnu.tar.gz*

View File

@ -0,0 +1,17 @@
daemon=1
server=1
nolisten=1
rpcuser=rpc
rpcpassword=rpc
rpcport=8035
txindex=1
zmqpubhashtx=tcp://127.0.0.1:38335
zmqpubhashblock=tcp://127.0.0.1:38335
zmqpubrawblock=tcp://127.0.0.1:38335
zmqpubrawtx=tcp://127.0.0.1:38335
mempoolexpiry=72
rpcworkqueue=1100
maxmempool=2000
dbcache=1000

View File

@ -0,0 +1 @@
/opt/coins/nodes/bgold/btg/btg.conf

View File

@ -0,0 +1 @@
/opt/coins/data/btg/bgold

View File

@ -0,0 +1,2 @@
bgold/* /opt/coins/nodes/bgold/btg
btg.conf /opt/coins/nodes/bgold/btg

View File

@ -0,0 +1,10 @@
/opt/coins/data/btg/bgold/debug.log
/opt/coins/data/btg/bgold/db.log
{
rotate 7
daily
compress
missingok
notifempty
copytruncate
}

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u bgold &> /dev/null
then
useradd --system -M -U bgold -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/btg/bgold)" != "bgold" ]
then
chown -R bgold:bgold /opt/coins/data/btg/bgold
fi
;;
esac
#DEBHELPER#

View File

@ -0,0 +1,47 @@
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# options or overwrite existing ones then use
# $ systemctl edit bgold-btg.service
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/bgold/btg/btg.conf
[Unit]
Description=Bitcoin Cash daemon (mainnet)
After=network.target
[Service]
ExecStart=/opt/coins/nodes/bgold/btg/bin/bgoldd -datadir=/opt/coins/data/btg/bgold -conf=/opt/coins/nodes/bgold/btg/btg.conf -pid=/run/bgoldd/btg.pid
# Creates /run/bitcoind owned by bgold
RuntimeDirectory=bgoldd
User=bgold
Type=forking
PIDFile=/run/bgoldd/btg.pid
Restart=on-failure
# Resource limits
LimitNOFILE=500000
# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true
# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full
# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true
# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,5 @@
bgold (0.15.0-satoshilabs1) unstable; urgency=medium
* Initial build
-- Jakub Matys <jakub.matys@satoshilabs.com> Thu, 31 May 2018 11:46:34 +0200

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,11 @@
Source: bgold
Section: satoshilabs
Priority: optional
Maintainer: jakub.matys@satoshilabs.com
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
Standards-Version: 3.9.5
Package: bgold-btg
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged bitcoin-gold server

View File

@ -0,0 +1,11 @@
#!/usr/bin/make -f
DH_VERBOSE = 1
%:
dh $@ --with=systemd
override_dh_systemd_start:
dh_systemd_start --no-start
override_dh_installinit: