Add build for ethereum geth debian package

pull/7/head
Martin Boehm 2018-05-31 19:44:02 +02:00
parent e5171c7487
commit 3d61cd57c8
18 changed files with 192 additions and 2 deletions

View File

@ -130,13 +130,14 @@ The data are separated to different column families:
| dash | 9033 | 9133 | 8033 | 38333 |
| ltc | 9034 | 9134 | 8034 | 38334 |
| btg | 9035 | 9135 | 8035 | 38335 |
| eth | 9036 | 9136 | 8036 | |
| eth | 9036 | 9136 | 8036 | 38336* |
| etc | 9037 | 9137 | 8037 | |
| xem | 9038 | 9138 | 8038 | 38336 |
| btc-testnet | 19030 | 19130 | 18030 | 48330 |
| bch-testnet | 19031 | 19131 | 18031 | 48331 |
| 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

View 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*

View 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

View File

@ -0,0 +1 @@
9

View 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

View File

@ -0,0 +1 @@
/opt/coins/data/eth/eth

View File

@ -0,0 +1 @@
ethereum/* /opt/coins/nodes/ethereum/eth

View File

@ -0,0 +1,9 @@
/opt/coins/data/eth/eth/eth.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 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#

View 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 blockbook-eth.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/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

View File

@ -0,0 +1 @@
/opt/coins/data/eth-ropsten/eth

View File

@ -0,0 +1 @@
ethereum/* /opt/coins/nodes/ethereum/eth-ropsten

View File

@ -0,0 +1,9 @@
/opt/coins/data/eth/eth-ropsten/eth.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 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#

View 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 blockbook-eth-ropsten.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 --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/eth-ropsten/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

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: