svn commit: r447030 - in head: . net-p2p/bitcoin net-p2p/bitcoin-daemon net-p2p/bitcoin/files

Li-Wen Hsu lwhsu at FreeBSD.org
Tue Aug 1 16:45:34 UTC 2017


Author: lwhsu
Date: Tue Aug  1 16:45:32 2017
New Revision: 447030
URL: https://svnweb.freebsd.org/changeset/ports/447030

Log:
  - 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 at bitmark.com>
  Approved by:	<robbak at robbak.com> (maintainer)

Modified:
  head/UPDATING
  head/net-p2p/bitcoin-daemon/Makefile
  head/net-p2p/bitcoin/Makefile
  head/net-p2p/bitcoin/files/bitcoind.in

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Aug  1 16:45:06 2017	(r447029)
+++ head/UPDATING	Tue Aug  1 16:45:32 2017	(r447030)
@@ -6,6 +6,14 @@ You should get into the habit of checking this file fo
 you update your ports collection, before attempting any port upgrades.
 
 20170729:
+  AFFECTS: users of net-p2p/bitcoin
+  AUTHOR: lwhsu at FreeBSD.org
+
+  Bitcoin data directory has been changed from /var/db/bitcoind to
+  /var/db/bitcoin.  Users of previous versions may want to migrate data to
+  new location or specify bitcoind_data.
+
+20170729:
   AFFECTS: users of mail/mailscanner
   AUTHOR: crees at FreeBSD.org
 

Modified: head/net-p2p/bitcoin-daemon/Makefile
==============================================================================
--- head/net-p2p/bitcoin-daemon/Makefile	Tue Aug  1 16:45:06 2017	(r447029)
+++ head/net-p2p/bitcoin-daemon/Makefile	Tue Aug  1 16:45:32 2017	(r447030)
@@ -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 arc
 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 \
@@ -23,5 +26,8 @@ CONFIGURE_ARGS=	--with-daemon \
 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"

Modified: head/net-p2p/bitcoin/Makefile
==============================================================================
--- head/net-p2p/bitcoin/Makefile	Tue Aug  1 16:45:06 2017	(r447029)
+++ head/net-p2p/bitcoin/Makefile	Tue Aug  1 16:45:32 2017	(r447030)
@@ -4,7 +4,7 @@
 PORTNAME=	bitcoin
 PORTVERSION=	0.12.1
 DISTVERSIONPREFIX=	v
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	net-p2p finance
 
 MAINTAINER=	robbak at robbak.com

Modified: head/net-p2p/bitcoin/files/bitcoind.in
==============================================================================
--- head/net-p2p/bitcoin/files/bitcoind.in	Tue Aug  1 16:45:06 2017	(r447029)
+++ head/net-p2p/bitcoin/files/bitcoind.in	Tue Aug  1 16:45:32 2017	(r447030)
@@ -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
 }
 


More information about the svn-ports-all mailing list