Add namecoin backend package

This commit is contained in:
Martin Boehm 2018-06-18 17:36:55 +02:00
parent 7b19bf7312
commit 65b8f9dfdf
13 changed files with 142 additions and 1 deletions

View File

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

View File

@ -0,0 +1,13 @@
NAMECOIN_VERSION := 0.13.99
all:
wget https://namecoin.org/files/namecoin-core-${NAMECOIN_VERSION}-name-tab-beta1-notreproduced/namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz
tar -xf namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz
mv namecoin-${NAMECOIN_VERSION} namecoin
rm namecoin/bin/namecoin-qt
rm namecoin/bin/test_namecoin*
clean:
rm -rf namecoin
rm -f namecoin-${NAMECOIN_VERSION}-x86_64-linux-gnu.tar.gz

View File

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

View File

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

View File

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

View File

@ -0,0 +1,10 @@
/opt/coins/data/namecoin/backend/debug.log
/opt/coins/data/namecoin/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 namecoin &> /dev/null
then
useradd --system -M -U namecoin -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/namecoin/backend)" != "namecoin" ]
then
chown -R namecoin:namecoin /opt/coins/data/namecoin/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 namecoin.service
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/namecoin/namecoin.conf
[Unit]
Description=Namecoin daemon (mainnet)
After=network.target
[Service]
ExecStart=/opt/coins/nodes/namecoin/bin/namecoind -datadir=/opt/coins/data/namecoin/backend -conf=/opt/coins/nodes/namecoin/namecoin.conf -pid=/run/namecoind/namecoin.pid
# Creates /run/namecoind owned by namecoin
RuntimeDirectory=namecoind
User=namecoin
Type=forking
PIDFile=/run/namecoind/namecoin.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 @@
namecoin (0.13.99-satoshilabs1) unstable; urgency=medium
* Initial build
-- Martin Bohm <martin.bohm@satoshilabs.com> Mon, 18 Jun 2018 11:12:13 +0200

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,11 @@
Source: namecoin
Section: satoshilabs
Priority: optional
Maintainer: martin.bohm@satoshilabs.com
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
Standards-Version: 3.9.5
Package: backend-namecoin
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged namecoin 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:

View File

@ -0,0 +1,19 @@
daemon=1
server=1
nolisten=1
rpcuser=rpc
rpcpassword=rpc
rpcport=8039
txindex=1
whitelist=127.0.0.1
upnp=0
discover=0
zmqpubhashtx=tcp://127.0.0.1:38339
zmqpubhashblock=tcp://127.0.0.1:38339
rpcworkqueue=1100
maxmempool=2000
dbcache=1000