Added package for DASH node (mainnet and testnet)

This commit is contained in:
Jakub Matys 2018-06-08 11:34:50 +02:00
parent 76be70d4cf
commit 12e201b3db
20 changed files with 250 additions and 1 deletions

View File

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

View File

@ -0,0 +1,14 @@
DASH_VERSION := 0.12.2
DASH_BUILD := .3
all:
wget https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}${DASH_BUILD}/dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz
tar -xf dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz
mv dashcore-${DASH_VERSION} dash
rm dash/bin/dash-qt
rm dash/bin/test_dash
clean:
rm -rf dash
rm -f dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz

View File

@ -0,0 +1,20 @@
daemon=1
server=1
nolisten=1
rpcuser=rpc
rpcpassword=rpc
rpcport=8033
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubhashtx=tcp://127.0.0.1:38333
zmqpubhashblock=tcp://127.0.0.1:38333
zmqpubrawblock=tcp://127.0.0.1:38333
zmqpubrawtx=tcp://127.0.0.1:38333
mempoolexpiry=72
rpcworkqueue=1100
maxmempool=2000
dbcache=1000

View File

@ -0,0 +1,20 @@
daemon=1
server=1
testnet=1
nolisten=1
rpcuser=rpc
rpcpassword=rpc
rpcport=18033
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubhashtx=tcp://127.0.0.1:48333
zmqpubhashblock=tcp://127.0.0.1:48333
zmqpubrawblock=tcp://127.0.0.1:48333
zmqpubrawtx=tcp://127.0.0.1:48333
rpcworkqueue=1100
maxmempool=2000
dbcache=1000

View File

@ -0,0 +1,5 @@
dash (0.12.2-satoshilabs1) unstable; urgency=medium
* Initial build
-- Jakub Matys <jakub.matys@satoshilabs.com> Fri, 08 Jun 2018 11:27:03 +0200

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,16 @@
Source: dash
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: dash
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged dash server
Package: dash-testnet
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged dash server

View File

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

View File

@ -0,0 +1 @@
/opt/coins/data/dash_testnet/backend

View File

@ -0,0 +1,2 @@
dash/* /opt/coins/nodes/dash_testnet
dash_testnet.conf /opt/coins/nodes/dash_testnet

View File

@ -0,0 +1,10 @@
/opt/coins/data/dash_testnet/backend/testnet3/debug.log
/opt/coins/data/dash_testnet/backend/testnet3/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 dash &> /dev/null
then
useradd --system -M -U dash -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/dash_testnet/backend)" != "dash" ]
then
chown -R dash:dash /opt/coins/data/dash_testnet/backend
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 dash-testnet.service
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/dash_testnet/dash_testnet.conf
[Unit]
Description=DASH daemon (testnet)
After=network.target
[Service]
ExecStart=/opt/coins/nodes/dash_testnet/bin/dashd -datadir=/opt/coins/data/dash_testnet/backend -conf=/opt/coins/nodes/dash_testnet/dash_testnet.conf -pid=/run/dashd/dash_testnet.pid
# Creates /run/dashd owned by dash
RuntimeDirectory=dashd
User=dash
Type=forking
PIDFile=/run/dashd/dash_testnet.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 @@
/opt/coins/nodes/dash/dash.conf

View File

@ -0,0 +1 @@
/opt/coins/data/dash/backend

View File

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

View File

@ -0,0 +1,10 @@
/opt/coins/data/dash/backend/debug.log
/opt/coins/data/dash/backend/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 dash &> /dev/null
then
useradd --system -M -U dash -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/dash/backend)" != "dash" ]
then
chown -R dash:dash /opt/coins/data/dash/backend
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 dash.service
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/dash/dash.conf
[Unit]
Description=DASH daemon (mainnet)
After=network.target
[Service]
ExecStart=/opt/coins/nodes/dash/bin/dashd -datadir=/opt/coins/data/dash/backend -conf=/opt/coins/nodes/dash/dash.conf -pid=/run/dashd/dash.pid
# Creates /run/dashd owned by dash
RuntimeDirectory=dashd
User=dash
Type=forking
PIDFile=/run/dashd/dash.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,11 @@
#!/usr/bin/make -f
DH_VERBOSE = 1
%:
dh $@ --with=systemd
override_dh_systemd_start:
dh_systemd_start --no-start
override_dh_installinit: