summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD33
-rw-r--r--electrumx.conf24
-rw-r--r--electrumx.install114
-rw-r--r--electrumx.sysusers1
5 files changed, 33 insertions, 156 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5b794fe8a27..044af1ebcb2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,30 @@
pkgbase = electrumx
pkgdesc = Server implementation for the Electrum wallet
- pkgver = 1.11.0
+ pkgver = 1.12.0
pkgrel = 1
url = https://github.com/kyuupichan/electrumx
- install = electrumx.install
arch = any
license = MIT
makedepends = python-setuptools
depends = leveldb
depends = python>=3.6
- depends = python-aiorpcx>=0.15.0
- depends = python-aiorpcx<0.16.0
+ depends = python-aiorpcx>=0.18.1
+ depends = python-aiorpcx<0.19.0
depends = python-attrs
depends = python-plyvel
depends = python-pylru
depends = python-aiohttp>=3.3.0
optdepends = bitcoin-daemon: Bitcoin core headless P2P node
optdepends = electrum: Bitcoin thin client
- options = !emptydirs
backup = etc/electrumx/electrumx.conf
- backup = usr/lib/systemd/system/electrumx.service
- source = electrumx-1.11.0.tar.gz::https://codeload.github.com/kyuupichan/electrumx/tar.gz/1.11.0
+ source = electrumx-1.12.0.tar.gz::https://codeload.github.com/kyuupichan/electrumx/tar.gz/1.12.0
source = electrumx.conf
source = electrumx.service
- sha256sums = e6a234785951dd833a245b3e6e6e528a084869bd034e5a7067bb7b7ab608d739
- sha256sums = f6562ddc7850be7f01a7a2428028093546d4eff2d6f5750e41124d9488dac89c
+ source = electrumx.sysusers
+ sha256sums = a27e8f503feaaad17f8ce7ab13bb33428a468b6beb13e041706a069f541364f8
+ sha256sums = 5977f369d4a07024bcbd305c02e2130bba42fd93913224c4cd0f8f41525ad0ef
sha256sums = ece0696dc82e0159d9a266834e6e9e1e518caa68e6f145d262b291e1fc09d67e
+ sha256sums = 761a21723d21348d598be96655e6de4827b2fcff93270895303e82670e0532f1
pkgname = electrumx
diff --git a/PKGBUILD b/PKGBUILD
index 5be53472f88..2fbceb05346 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
# Contributer: Andy Weidenbaum <archbaum@gmail.com>
pkgname=electrumx
-pkgver=1.11.0
+pkgver=1.12.0
pkgrel=1
pkgdesc="Server implementation for the Electrum wallet"
arch=('any')
depends=('leveldb'
'python>=3.6'
- 'python-aiorpcx>=0.15.0' 'python-aiorpcx<0.16.0'
+ 'python-aiorpcx>=0.18.1' 'python-aiorpcx<0.19.0'
'python-attrs'
'python-plyvel'
'python-pylru'
@@ -19,48 +19,37 @@ optdepends=('bitcoin-daemon: Bitcoin core headless P2P node'
'electrum: Bitcoin thin client')
url="https://github.com/kyuupichan/electrumx"
license=('MIT')
-options=(!emptydirs)
source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/kyuupichan/$pkgname/tar.gz/$pkgver
'electrumx.conf'
- 'electrumx.service')
-sha256sums=('1fdcd39edbd4317aa13ffa56c1119f22312aaabdb5afa329da76b765cdaa6d88'
- 'f6562ddc7850be7f01a7a2428028093546d4eff2d6f5750e41124d9488dac89c'
- 'ece0696dc82e0159d9a266834e6e9e1e518caa68e6f145d262b291e1fc09d67e')
-backup=('etc/electrumx/electrumx.conf'
- 'usr/lib/systemd/system/electrumx.service')
-install=electrumx.install
+ 'electrumx.service'
+ 'electrumx.sysusers')
+sha256sums=('a27e8f503feaaad17f8ce7ab13bb33428a468b6beb13e041706a069f541364f8'
+ '5977f369d4a07024bcbd305c02e2130bba42fd93913224c4cd0f8f41525ad0ef'
+ 'ece0696dc82e0159d9a266834e6e9e1e518caa68e6f145d262b291e1fc09d67e'
+ '761a21723d21348d598be96655e6de4827b2fcff93270895303e82670e0532f1')
+backup=('etc/electrumx/electrumx.conf')
build() {
cd "$srcdir/$pkgname-$pkgver"
-
- msg2 'Building...'
python setup.py build
}
package() {
+ install -D -m 644 "$srcdir/electrumx.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+
cd "$srcdir/$pkgname-$pkgver"
- msg2 'Installing license...'
install -Dm 644 LICENCE -t "$pkgdir/usr/share/licenses/$pkgname"
- msg2 'Installing documentation...'
install -dm 755 "$pkgdir/usr/share/doc/$pkgname"
cp -dpr --no-preserve=ownership README.rst contrib docs/* "$pkgdir/usr/share/doc/$pkgname"
- msg2 'Making essential directories...'
- install -dm 700 "$pkgdir/etc/electrumx"
- install -dm 755 "$pkgdir/srv/electrumx"
-
- msg2 'Installing electrumx.conf...'
install -Dm 600 "$srcdir/electrumx.conf" -t "$pkgdir/etc/electrumx"
- msg2 'Installing electrumx.service...'
install -Dm 644 "$srcdir/electrumx.service" -t "$pkgdir/usr/lib/systemd/system"
- msg2 'Installing...'
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- msg2 'Renaming executables...'
mv "$pkgdir/usr/bin/electrumx_server" "$pkgdir/usr/bin/electrumx-server"
mv "$pkgdir/usr/bin/electrumx_rpc" "$pkgdir/usr/bin/electrumx-rpc"
mv "$pkgdir/usr/bin/electrumx_compact_history" "$pkgdir/usr/bin/electrumx-compact-history"
diff --git a/electrumx.conf b/electrumx.conf
index b82fd7ca355..85593acb774 100644
--- a/electrumx.conf
+++ b/electrumx.conf
@@ -23,23 +23,25 @@
#REQUIRED FOR PUBLIC VISIBILITY
- #listen on interface and ports (0.0.0.0 is any)
- HOST = 127.0.0.1
- TCP_PORT = 50001
- SSL_PORT = 50002
+ #Services to expose
+ #By default only expose unencrypted services
+ SERVICES = tcp://:50001,ws://:50003,rpc://
- #path to ssl cert and key for enabling ssl support
- SSL_CERTFILE = /etc/electrumx/server.cert
- SSL_KEYFILE = /etc/electrumx/server.pem
+ #For ssl support generate your own certificates and enable encrypted services
+ #SERVICES = tcp://:50001,ssl://:50002,ws://:50003,wss://:50004,rpc://
+
+ #Path to ssl cert and key for enabling ssl support
+ #See https://electrumx.readthedocs.io/en/latest/HOWTO.html#creating-a-self-signed-ssl-certificate
+ #SSL_CERTFILE = /etc/electrumx/server.cert
+ #SSL_KEYFILE = /etc/electrumx/server.pem
+
+ #Services to announce to peers
+ #REPORT_SERVICES =
#OPTIONAL VISIBILITY
#BANNER_FILE = /path/to/banner
#DONATION_ADDRESS =
- #REPORT_HOST = $HOST
- #REPORT_TCP_PORT = #defaults to TCP_PORT
- #REPORT_SSL_PORT = #defaults to SSL_PORT
- #RPC_PORT = 8000
#MISC
diff --git a/electrumx.install b/electrumx.install
deleted file mode 100644
index 2cbec72882e..00000000000
--- a/electrumx.install
+++ /dev/null
@@ -1,114 +0,0 @@
-_es_user=electrumx
-_es_group=electrumx
-
-post_install() {
- mkdir -p /etc/electrumx
- mkdir -p /srv/electrumx
- _mkuser
- _mkssl
- chown -R $_es_user:$_es_group /etc/electrumx /srv/electrumx
- printf "%b\n" "$ecsda"
-}
-
-post_upgrade() {
- _mkuser
- chown -R $_es_user:$_es_group /etc/electrumx /srv/electrumx
- printf "%b\n" "$ecsda"
-}
-
-post_remove() {
- _rmuser
- rm -rf /etc/electrumx /srv/electrumx
-}
-
-_mkssl() {
- echo -n "Enabling SSL..." # https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon
- openssl genrsa -out /etc/electrumx/server.pem 2048
- expect <<EOF | perl -ne 'print if /-----BEGIN\sCERTIFICATE-----/../-----END\sCERTIFICATE-----/' > /etc/electrumx/server.cert
- spawn openssl req -new -x509 -nodes -sha1 -days 3650 -key /etc/electrumx/server.pem
- expect "Country*" {
- send "\r"
- }
- expect "State*" {
- send "\r"
- }
- expect "Locality*" {
- send "\r"
- }
- expect "Organization*" {
- send "\r"
- }
- expect "Organizational*" {
- send "\r"
- }
- expect "Common*" {
- send "\r"
- }
- expect "Email*" {
- send "\r"
- }
- expect eof
-EOF
- echo "done"
-}
-
-_mkuser() {
- getent passwd $_es_user &>/dev/null || {
- echo -n "Creating electrumx user... "
- grep -E "^$_es_group:" /etc/group >/dev/null || groupadd $_es_group
- useradd -m -d /etc/electrumx -g $_es_group -s /usr/bin/nologin $_es_user
- echo "done"
- }
-}
-
-_rmuser() {
- echo -n "Removing electrumx user... "
- userdel -rf $_es_user 2>/dev/null
- echo "done"
-}
-
-read -d '' ecdsa <<'EOF'
-########################################################################
-########################################################################
-## ##
-## ElectrumX Server ##
-## ________________ ##
-## ##
-## To start electrumx: ##
-## ##
-## # systemctl start electrumx ##
-## ##
-## To communicate with electrumx as a normal user: ##
-## ##
-## $ electrumx-rpc -p 8000 <command> ##
-## ##
-## To connect to electrumx: ##
-## ##
-## $ electrum --server 127.0.0.1:50002:s --oneserver ##
-## ##
-## Config: /etc/electrumx/electrumx.conf ##
-## Database: /srv/electrumx ##
-## Documentation: /usr/share/doc/electrumx ##
-## ##
-## ##
-## ';,;:. ##
-## 'o' .;d. ##
-## K. :l ##
-## cl .O, ##
-## .c:cclc. ##
-## .;::;. .;ko,. ':::' .',,,. ##
-## .OMMMMMWo ,d,. .oo cXMMMMMX: do. .:d. ##
-## x MMMMMMMMxlX. kdoMMMMMMMMMoxl '0 ##
-## oMMMMMMMN;'K, .Oc;NMMMMMMMX,ld ;k ##
-## :0WMMNk. .cl;,;cl, 'kWMMMWx. :o:,';cc ##
-## .. .'. .oWc. .''. ##
-## 'oc;,;lo. ##
-## ,O. .0. ##
-## :k .0. ##
-## cl,...:o, ##
-## .,,,. ##
-## ##
-## ##
-########################################################################
-########################################################################
-EOF
diff --git a/electrumx.sysusers b/electrumx.sysusers
new file mode 100644
index 00000000000..1fd6186e368
--- /dev/null
+++ b/electrumx.sysusers
@@ -0,0 +1 @@
+u electrumx - "ElectrumX daemon" /srv/electrumx