aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2017-08-02 00:45:32 +0800
committerlwhsu <lwhsu@FreeBSD.org>2017-08-02 00:45:32 +0800
commitae4d5da3ede7cbfcb8bac5db301b4093ff531ba1 (patch)
treecd42b5654657230c51bab1c5481568068575f3fe /net-p2p
parent2adca215975494b181f8210046bc69a151c6b256 (diff)
downloadfreebsd-ports-gnome-ae4d5da3ede7cbfcb8bac5db301b4093ff531ba1.tar.gz
freebsd-ports-gnome-ae4d5da3ede7cbfcb8bac5db301b4093ff531ba1.tar.zst
freebsd-ports-gnome-ae4d5da3ede7cbfcb8bac5db301b4093ff531ba1.zip
- net-p2p/bitcoin: fix path error in startup script files/bitcoin.in also
removes reliance on unnecessary cli script. - net-p2p/bitcoin-daemon: create the user/group for the daemon to use also install a sample configuration file. With these two patches a "pkg install bitcoin-daemon" followed by "service start bitcoind" will be sufficient to run as a non-privileged user and automatically connect to bitcoin live network; using /var/db/bitcoin to store blockchain data. PR: 215059 Submitted by: Christopher Hall <hsw@bitmark.com> Approved by: <robbak@robbak.com> (maintainer)
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/bitcoin-daemon/Makefile8
-rw-r--r--net-p2p/bitcoin/Makefile2
-rw-r--r--net-p2p/bitcoin/files/bitcoind.in7
3 files changed, 11 insertions, 6 deletions
diff --git a/net-p2p/bitcoin-daemon/Makefile b/net-p2p/bitcoin-daemon/Makefile
index 95e32bf0a629..bc08adba22f2 100644
--- a/net-p2p/bitcoin-daemon/Makefile
+++ b/net-p2p/bitcoin-daemon/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
MASTERDIR= ${.CURDIR}/../bitcoin
-PORTREVISION= 6
+PORTREVISION= 7
PKGNAMESUFFIX= -daemon
COMMENT= Virtual Peer-to-Peer Currency (Daemon)
@@ -14,6 +14,9 @@ ONLY_FOR_ARCHS_REASON= does not support big-endian architectures
OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET ZMQ
OPTIONS_DEFAULT= HARDENING UPNP WALLET
+USERS= bitcoin
+GROUPS= bitcoin
+
CONFIGURE_ARGS= --with-daemon \
--without-gui \
--without-libs \
@@ -24,4 +27,7 @@ PLIST_FILES= bin/bitcoind
USE_RC_SUBR= bitcoind
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/contrib/debian/examples/bitcoin.conf ${STAGEDIR}${PREFIX}/etc/bitcoin.conf.sample
+
.include "${MASTERDIR}/Makefile"
diff --git a/net-p2p/bitcoin/Makefile b/net-p2p/bitcoin/Makefile
index 3088411d85a3..49a0efe5090c 100644
--- a/net-p2p/bitcoin/Makefile
+++ b/net-p2p/bitcoin/Makefile
@@ -4,7 +4,7 @@
PORTNAME= bitcoin
PORTVERSION= 0.12.1
DISTVERSIONPREFIX= v
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= net-p2p finance
MAINTAINER= robbak@robbak.com
diff --git a/net-p2p/bitcoin/files/bitcoind.in b/net-p2p/bitcoin/files/bitcoind.in
index 45bc454c171d..e620d9dcc4fb 100644
--- a/net-p2p/bitcoin/files/bitcoind.in
+++ b/net-p2p/bitcoin/files/bitcoind.in
@@ -12,7 +12,7 @@
# bitcoind_user (str) Set to "bitcoin" by default.
# bitcoind_group (str) Set to "bitcoin" by default.
# bitcoind_conf (str) Set to "%%PREFIX%%/etc/bitcoind.conf" by default.
-# bitcoind_data (str) Set to "/var/lib/bitcoind" by default.
+# bitcoind_data (str) Set to "/var/lib/bitcoin" by default.
# bitcoindlimits_enable (bool) Set to "NO" by default.
# Set it to "YES" to enable bitcoindlimits
# bitcoindlimits_args Set to "-e -U ${bitcoind_user}" by default
@@ -32,7 +32,6 @@ status_cmd="bitcoind_status"
stop_cmd="bitcoind_stop"
stop_postcmd="bitcoind_wait"
command="%%PREFIX%%/bin/bitcoind"
-cli_command="%%PREFIX%%/bin/bitcoin-cli"
daemon_command="/usr/sbin/daemon"
#pidfile="/var/run/${name}.pid"
extra_commands="configtest"
@@ -45,7 +44,7 @@ load_rc_config ${name}
: ${bitcoind_user:="bitcoin"}
: ${bitcoind_group:="bitcoin"}
-: ${bitcoind_data_dir:="/var/db/bitcoind"}
+: ${bitcoind_data_dir:="/var/db/bitcoin"}
: ${bitcoind_config_file:="%%PREFIX%%/etc/bitcoin.conf"}
: ${bitcoindlimits_args:="-e -U ${bitcoind_user}"}
@@ -134,7 +133,7 @@ bitcoind_stop()
echo "Bitcoind is not running"
return 1
else
- ${cli_command} -conf="${bitcoind_config_file}" -datadir="${bitcoind_data_dir}" stop
+ kill ${pid}
fi
}