Merge branch 'ethereum'
Build scripts for ethereum mainnet/ropsten backend debian packages
This commit is contained in:
commit
8fa6f032ef
@ -137,13 +137,14 @@ The data are separated to different column families:
|
|||||||
| dash | 9033 | 9133 | 8033 | 38333 |
|
| dash | 9033 | 9133 | 8033 | 38333 |
|
||||||
| ltc | 9034 | 9134 | 8034 | 38334 |
|
| ltc | 9034 | 9134 | 8034 | 38334 |
|
||||||
| btg | 9035 | 9135 | 8035 | 38335 |
|
| btg | 9035 | 9135 | 8035 | 38335 |
|
||||||
| eth | 9036 | 9136 | 8036 | |
|
| eth | 9036 | 9136 | 8036 | 38336* |
|
||||||
| etc | 9037 | 9137 | 8037 | |
|
| etc | 9037 | 9137 | 8037 | |
|
||||||
| xem | 9038 | 9138 | 8038 | 38336 |
|
| xem | 9038 | 9138 | 8038 | 38336 |
|
||||||
| btc-testnet | 19030 | 19130 | 18030 | 48330 |
|
| btc-testnet | 19030 | 19130 | 18030 | 48330 |
|
||||||
| bch-testnet | 19031 | 19131 | 18031 | 48331 |
|
| bch-testnet | 19031 | 19131 | 18031 | 48331 |
|
||||||
| zec-testnet | 19032 | 19132 | 18032 | 48332 |
|
| zec-testnet | 19032 | 19132 | 18032 | 48332 |
|
||||||
| eth-testnet | 19036 | 19136 | 18036 | |
|
| eth-ropsten | 19036 | 19136 | 18036 | 48333* |
|
||||||
|
\* geth listens on this port, however not as zmq service
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
TARGETS = bitcoin zcash bcash
|
TARGETS = bitcoin zcash bcash ethereum
|
||||||
IMAGE = blockbook-backend-build-deb
|
IMAGE = blockbook-backend-build-deb
|
||||||
NO_CACHE = false
|
NO_CACHE = false
|
||||||
|
|
||||||
|
|||||||
10
contrib/backends/ethereum/Makefile
Normal file
10
contrib/backends/ethereum/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
GETH_VERSION := 1.8.10-eae63c51
|
||||||
|
|
||||||
|
all:
|
||||||
|
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-${GETH_VERSION}.tar.gz
|
||||||
|
tar -xf geth-linux-amd64-${GETH_VERSION}.tar.gz
|
||||||
|
mv geth-linux-amd64-${GETH_VERSION} ethereum
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf ethereum
|
||||||
|
rm -f geth-linux-amd64-${GETH_VERSION}.tar.gz*
|
||||||
5
contrib/backends/ethereum/debian/changelog
Normal file
5
contrib/backends/ethereum/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ethereum (1.8.10-satoshilabs1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial build
|
||||||
|
|
||||||
|
-- Martin Bohm <martin.bohm@satoshilabs.com> Thu, 31 May 2018 11:12:13 +0200
|
||||||
1
contrib/backends/ethereum/debian/compat
Normal file
1
contrib/backends/ethereum/debian/compat
Normal file
@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
16
contrib/backends/ethereum/debian/control
Normal file
16
contrib/backends/ethereum/debian/control
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Source: ethereum
|
||||||
|
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: ethereum-eth
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||||
|
Description: Satoshilabs packaged ethereum geth server
|
||||||
|
|
||||||
|
Package: ethereum-ropsten
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||||
|
Description: Satoshilabs packaged ethereum geth server
|
||||||
1
contrib/backends/ethereum/debian/ethereum-eth.dirs
Normal file
1
contrib/backends/ethereum/debian/ethereum-eth.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/data/eth/eth
|
||||||
1
contrib/backends/ethereum/debian/ethereum-eth.install
Normal file
1
contrib/backends/ethereum/debian/ethereum-eth.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
ethereum/* /opt/coins/nodes/ethereum/eth
|
||||||
9
contrib/backends/ethereum/debian/ethereum-eth.logrotate
Normal file
9
contrib/backends/ethereum/debian/ethereum-eth.logrotate
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/opt/coins/data/eth/eth/eth.log
|
||||||
|
{
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
copytruncate
|
||||||
|
}
|
||||||
20
contrib/backends/ethereum/debian/ethereum-eth.postinst
Normal file
20
contrib/backends/ethereum/debian/ethereum-eth.postinst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u ethereum &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U ethereum -s /bin/false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(stat -c '%U' /opt/coins/data/eth/eth)" != "ethereum" ]
|
||||||
|
then
|
||||||
|
chown -R ethereum:ethereum /opt/coins/data/eth/eth
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
42
contrib/backends/ethereum/debian/ethereum-eth.service
Normal file
42
contrib/backends/ethereum/debian/ethereum-eth.service
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# 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 ethereum-eth.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Ethereum daemon (mainnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/sh -c '/opt/coins/nodes/ethereum/eth/geth --ipcdisable --syncmode full --cache 1024 --datadir /opt/coins/data/eth/eth --port 38336 --ws --wsaddr 0.0.0.0 --wsport 8036 --wsorigins * 2>>/opt/coins/data/eth/eth/eth.log'
|
||||||
|
User=ethereum
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
WorkingDirectory=/opt/coins/nodes/ethereum/eth
|
||||||
|
|
||||||
|
# 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
|
||||||
1
contrib/backends/ethereum/debian/ethereum-ropsten.dirs
Normal file
1
contrib/backends/ethereum/debian/ethereum-ropsten.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
/opt/coins/data/eth-ropsten/eth
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ethereum/* /opt/coins/nodes/ethereum/eth-ropsten
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
/opt/coins/data/eth/eth-ropsten/eth.log
|
||||||
|
{
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
copytruncate
|
||||||
|
}
|
||||||
20
contrib/backends/ethereum/debian/ethereum-ropsten.postinst
Normal file
20
contrib/backends/ethereum/debian/ethereum-ropsten.postinst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u ethereum &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U ethereum -s /bin/false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(stat -c '%U' /opt/coins/data/eth-ropsten/eth)" != "ethereum" ]
|
||||||
|
then
|
||||||
|
chown -R ethereum:ethereum /opt/coins/data/eth-ropsten/eth
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
42
contrib/backends/ethereum/debian/ethereum-ropsten.service
Normal file
42
contrib/backends/ethereum/debian/ethereum-ropsten.service
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# 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 ethereum-ropsten.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Ethereum daemon (ropsten testnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/sh -c '/opt/coins/nodes/ethereum/eth-ropsten/geth --ipcdisable --testnet --cache 1024 --datadir /opt/coins/data/eth-ropsten/eth --port 48333 --ws --wsaddr 0.0.0.0 --wsport 18036 --wsorigins * 2>>/opt/coins/data/eth-ropsten/eth/eth.log'
|
||||||
|
User=ethereum
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
WorkingDirectory=/opt/coins/nodes/ethereum/eth-ropsten/
|
||||||
|
|
||||||
|
# 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
|
||||||
13
contrib/backends/ethereum/debian/rules
Executable file
13
contrib/backends/ethereum/debian/rules
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DH_VERBOSE = 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with=systemd
|
||||||
|
|
||||||
|
override_dh_strip:
|
||||||
|
|
||||||
|
override_dh_systemd_start:
|
||||||
|
dh_systemd_start --no-start
|
||||||
|
|
||||||
|
override_dh_installinit:
|
||||||
Loading…
Reference in New Issue
Block a user