View | Details | Raw Unified | Return to bug 226501 | Differences between
and this patch

Collapse All | Expand All

(-)GIDs (-1 / +1 lines)
Lines 722-728 Link Here
722
bitcoin:*:779:
722
bitcoin:*:779:
723
zetacoin:*:780:
723
zetacoin:*:780:
724
monero:*:781:
724
monero:*:781:
725
# free: 782
725
blackcoin:*:782:
726
# free: 783
726
# free: 783
727
# free: 784
727
# free: 784
728
# free: 785
728
# free: 785
(-)UIDs (-1 / +1 lines)
Lines 728-734 Link Here
728
bitcoin:*:779:779::0:0:bitcoin Daemon:/var/db/bitcoin:/usr/sbin/nologin
728
bitcoin:*:779:779::0:0:bitcoin Daemon:/var/db/bitcoin:/usr/sbin/nologin
729
zetacoin:*:780:780::0:0:ZetaCoin Daemon:/nonexistent:/usr/sbin/nologin
729
zetacoin:*:780:780::0:0:ZetaCoin Daemon:/nonexistent:/usr/sbin/nologin
730
monero:*:781:781::0:0:Monero Daemon:/var/db/monero:/usr/sbin/nologin
730
monero:*:781:781::0:0:Monero Daemon:/var/db/monero:/usr/sbin/nologin
731
# free: 782
731
blackcoin:*:782:782::0:0:BlackCoin Daemon:/var/db/blackcoin:/usr/sbin/nologin
732
# free: 783
732
# free: 783
733
# free: 784
733
# free: 784
734
# free: 785
734
# free: 785
(-)net-p2p/blackcoind/Makefile (+44 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	blackcoind
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	1.2.5
6
CATEGORIES=	net-p2p finance
7
8
MAINTAINER=	krzysztof.jurewicz@gmail.com
9
COMMENT=	First 100% PoS cryptocurrency with fair distribution (no GUI)
10
11
LICENSE=	MIT
12
LICENSE_FILE=	${WRKSRC}/COPYING
13
14
LIB_DEPENDS=	libboost_system.so:devel/boost-libs\
15
		libdb_cxx-4.8.so:databases/db48\
16
		libminiupnpc.so:net/miniupnpc
17
18
USES=		bdb:48 gmake ssl
19
USE_GITHUB=	yes
20
GH_ACCOUNT=	CoinBlack
21
GH_PROJECT=	blackcoin
22
23
MAKEFILE=	makefile.bsd
24
BUILD_WRKSRC=	${WRKSRC}/src
25
INSTALL_WRKSRC=	${WRKSRC}/src
26
INSTALL_TARGET=	install-strip
27
USE_RC_SUBR=	blackcoind
28
SUB_FILES=	pkg-message
29
PLIST_FILES=	bin/blackcoind\
30
		etc/blackcoin.conf.sample
31
32
USERS=		blackcoin
33
GROUPS=		blackcoin
34
MAKE_ENV=	BDB_INCLUDE_PATH=${BDB_INCLUDE_DIR}\
35
		BDB_LIB_PATH=${BDB_LIB_DIR}\
36
		BOOST_INCLUDE_PATH=${LOCALBASE}/include\
37
		BOOST_LIB_PATH=${LOCALBASE}/lib
38
NO_INSTALL=	yes
39
40
do-install:
41
	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/blackcoind ${STAGEDIR}${PREFIX}/bin/blackcoind
42
	${INSTALL_DATA} ${FILESDIR}/blackcoin.conf.sample ${STAGEDIR}${PREFIX}/etc/blackcoin.conf.sample
43
44
.include <bsd.port.mk>
(-)net-p2p/blackcoind/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1520637414
2
SHA256 (CoinBlack-blackcoin-v1.2.5_GH0.tar.gz) = a3421d2760efcdd488be26a08c11713ff499ef94aba012bb6ceee402b311030e
3
SIZE (CoinBlack-blackcoin-v1.2.5_GH0.tar.gz) = 2499468
(-)net-p2p/blackcoind/files/blackcoin.conf.sample (+4 lines)
Line 0 Link Here
1
rpcuser = user
2
# Put a strong password below.
3
# rpcpassword = not-a-secret
4
rpcallowip = 127.0.0.1
(-)net-p2p/blackcoind/files/blackcoind.in (+171 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
# PROVIDE: blackcoind
5
# REQUIRE: LOGIN cleanvar
6
# KEYWORD: shutdown
7
8
#
9
# Add the following lines to /etc/rc.conf to enable :
10
# blackcoind_enable (bool):	Set to "NO" by default.
11
#				Set it to "YES" to enable blackcoind
12
# blackcoind_user (str)		Set to "blackcoin" by default.
13
# blackcoind_group (str)	Set to "blackcoin" by default.
14
# blackcoind_conf (str)		Set to "%%PREFIX%%/etc/blackcoind.conf" by default.
15
# blackcoind_data_dir (str)	Set to "/var/db/blackcoin" by default.
16
# blackcoindlimits_enable (bool)	Set to "NO" by default.
17
#				Set it to "YES" to enable blackcoindlimits
18
# blackcoindlimits_args		Set to "-e -U ${blackcoind_user}" by default
19
20
21
. /etc/rc.subr
22
23
name="blackcoind"
24
rcvar=blackcoind_enable
25
26
start_precmd="blackcoind_precmd"
27
start_cmd="blackcoind_start"
28
restart_precmd="blackcoind_checkconfig"
29
reload_precmd="blackcoind_checkconfig"
30
configtest_cmd="blackcoind_checkconfig"
31
status_cmd="blackcoind_status"
32
stop_cmd="blackcoind_stop"
33
stop_postcmd="blackcoind_wait"
34
command="%%PREFIX%%/bin/blackcoind"
35
daemon_command="/usr/sbin/daemon"
36
extra_commands="configtest"
37
38
39
: ${blackcoind_enable:="NO"}
40
: ${blackcoindlimits_enable:="NO"}
41
42
load_rc_config ${name}
43
44
: ${blackcoind_user:="blackcoin"}
45
: ${blackcoind_group:="blackcoin"}
46
: ${blackcoind_data_dir:="/var/db/blackcoin"}
47
: ${blackcoind_config_file:="%%PREFIX%%/etc/blackcoin.conf"}
48
: ${blackcoindlimits_args:="-e -U ${blackcoind_user}"}
49
50
# set up dependant variables
51
procname="${command}"
52
pidfile="${blackcoind_data_dir}/blackcoind.pid"
53
required_files="${blackcoind_config_file}"
54
55
blackcoind_checkconfig()
56
{
57
    echo "Performing sanity check on blackcoind configuration:"
58
    if [ ! -d "${blackcoind_data_dir}" ]
59
    then
60
	echo "Missing data directory: ${blackcoind_data_dir}"
61
	exit 1
62
    fi
63
64
    if [ ! -f "${blackcoind_config_file}" ]
65
    then
66
	echo "Missing configuration file: ${blackcoind_config_file}"
67
	exit 1
68
    fi
69
    if [ ! -x "${command}" ]
70
    then
71
	echo "Missing executable: ${command}"
72
	exit 1
73
    fi
74
    return 0
75
}
76
77
blackcoind_cleanup()
78
{
79
    rm -f "${pidfile}"
80
}
81
82
blackcoind_precmd()
83
{
84
    blackcoind_checkconfig
85
86
    pid=$(check_pidfile "${pidfile}" "${procname}")
87
    if [ -z "${pid}" ]
88
    then
89
	echo "blackcoind is not running"
90
	rm -f "${pidfile}"
91
    fi
92
93
    if checkyesno blackcoindlimits_enable
94
    then
95
	eval $(/usr/bin/limits ${blackcoindlimits_args}) 2>/dev/null
96
    else
97
	return 0
98
    fi
99
}
100
101
blackcoind_status()
102
{
103
    local pid
104
    pid=$(check_pidfile "${pidfile}" "${procname}")
105
    if [ -z "${pid}" ]
106
    then
107
	echo "blackcoind is not running"
108
	return 1
109
    else
110
	echo "blackcoind running, pid: ${pid}"
111
    fi
112
}
113
114
blackcoind_start()
115
{
116
    echo "Starting blackcoind:"
117
    cd "${blackcoind_data_dir}" || return 1
118
    ${daemon_command} -u "${blackcoind_user}" -p "${pidfile}" \
119
		      ${command} \
120
		      -conf="${blackcoind_config_file}" \
121
		      -datadir="${blackcoind_data_dir}" \
122
		      2> "${blackcoind_data_dir}/blackcoind.stderr" \
123
		      > "${blackcoind_data_dir}/blackcoind.stdout"
124
}
125
126
blackcoind_stop()
127
{
128
    echo "Stopping blackcoind:"
129
    pid=$(check_pidfile "${pidfile}" "${procname}")
130
    if [ -z "${pid}" ]
131
    then
132
	echo "blackcoind is not running"
133
	return 1
134
    else
135
	kill ${pid}
136
    fi
137
}
138
139
blackcoind_wait()
140
{
141
    local n=60
142
    echo "Waiting for blackcoind shutdown:"
143
    while :
144
    do
145
	printf '.'
146
	pid=$(check_pidfile "${pidfile}" "${procname}")
147
	if [ -z "${pid}" ]
148
	then
149
	    printf '\n'
150
	    break
151
	fi
152
	sleep 1
153
	n=$((${n} - 1))
154
	if [ ${n} -eq 0 -a -f "${pidfile}" ]
155
	then
156
	    printf "\nForce shutdown"
157
	    kill -9 $(cat "${pidfile}")
158
	    for n in 1 2 3
159
	    do
160
		printf '.'
161
		sleep 1
162
	    done
163
	    printf '\n'
164
	    break
165
	fi
166
    done
167
    rm -f "${pidfile}"
168
    echo "Shutdown complete"
169
}
170
171
run_rc_command "$1"
(-)net-p2p/blackcoind/files/patch-src_makefile.bsd (+27 lines)
Line 0 Link Here
1
--- src/makefile.bsd.orig	2018-01-21 08:35:38 UTC
2
+++ src/makefile.bsd
3
@@ -24,6 +24,7 @@ endif
4
 # for boost 1.37, add -mt to the boost libraries
5
 LIBS += \
6
  -Wl,-B$(LMODE) \
7
+   -l boost_chrono$(BOOST_LIB_SUFFIX) \
8
    -l boost_system$(BOOST_LIB_SUFFIX) \
9
    -l boost_filesystem$(BOOST_LIB_SUFFIX) \
10
    -l boost_program_options$(BOOST_LIB_SUFFIX) \
11
@@ -44,7 +45,6 @@ endif
12
 LIBS+= \
13
  -Wl,-B$(LMODE2) \
14
    -l z \
15
-   -l dl \
16
    -l pthread
17
 
18
 
19
@@ -149,7 +149,7 @@ DEFS += $(addprefix -I,$(CURDIR)/leveldb
20
 DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
21
 OBJS += obj/txdb-leveldb.o
22
 leveldb/libleveldb.a:
23
-	@echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..;
24
+	@echo "Building LevelDB ..."; cd leveldb && gmake libleveldb.a libmemenv.a && cd ..;
25
 obj/txdb-leveldb.o: leveldb/libleveldb.a
26
 
27
 # auto-generated dependencies:
(-)net-p2p/blackcoind/files/patch-src_pbkdf2.cpp (+19 lines)
Line 0 Link Here
1
--- src/pbkdf2.cpp.orig	2018-01-21 08:35:38 UTC
2
+++ src/pbkdf2.cpp
3
@@ -3,6 +3,7 @@
4
 #include <string.h>
5
 #include "pbkdf2.h"
6
 
7
+#ifndef __FreeBSD__
8
 static inline uint32_t
9
 be32dec(const void *pp)
10
 {
11
@@ -22,7 +23,7 @@ be32enc(void *pp, uint32_t x)
12
     p[1] = (x >> 16) & 0xff;
13
     p[0] = (x >> 24) & 0xff;
14
 }
15
-
16
+#endif
17
 
18
 
19
 /* Initialize an HMAC-SHA256 operation with the given key. */
(-)net-p2p/blackcoind/files/patch-src_rpcclient.cpp (+11 lines)
Line 0 Link Here
1
--- src/rpcclient.cpp.orig	2018-06-13 17:54:06 UTC
2
+++ src/rpcclient.cpp
3
@@ -41,7 +41,7 @@ Object CallRPC(const string& strMethod, 
4
     // Connect to localhost
5
     bool fUseSSL = GetBoolArg("-rpcssl", false);
6
     asio::io_service io_service;
7
-    ssl::context context(io_service, ssl::context::sslv23);
8
+    ssl::context context(ssl::context::sslv23);
9
     context.set_options(ssl::context::no_sslv2);
10
     asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
11
     SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
(-)net-p2p/blackcoind/files/patch-src_rpcserver.cpp (+62 lines)
Line 0 Link Here
1
--- src/rpcserver.cpp.orig	2018-06-13 17:58:14 UTC
2
+++ src/rpcserver.cpp
3
@@ -417,8 +417,8 @@ private:
4
 void ServiceConnection(AcceptedConnection *conn);
5
 
6
 // Forward declaration required for RPCListen
7
-template <typename Protocol, typename SocketAcceptorService>
8
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
9
+template <typename Protocol>
10
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
11
                              ssl::context& context,
12
                              bool fUseSSL,
13
                              AcceptedConnection* conn,
14
@@ -427,8 +427,8 @@ static void RPCAcceptHandler(boost::shar
15
 /**
16
  * Sets up I/O resources to accept and handle a new connection.
17
  */
18
-template <typename Protocol, typename SocketAcceptorService>
19
-static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
20
+template <typename Protocol>
21
+static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
22
                    ssl::context& context,
23
                    const bool fUseSSL)
24
 {
25
@@ -438,7 +438,7 @@ static void RPCListen(boost::shared_ptr<
26
     acceptor->async_accept(
27
             conn->sslStream.lowest_layer(),
28
             conn->peer,
29
-            boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>,
30
+            boost::bind(&RPCAcceptHandler<Protocol>,
31
                 acceptor,
32
                 boost::ref(context),
33
                 fUseSSL,
34
@@ -450,8 +450,8 @@ static void RPCListen(boost::shared_ptr<
35
 /**
36
  * Accept and handle incoming connection.
37
  */
38
-template <typename Protocol, typename SocketAcceptorService>
39
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
40
+template <typename Protocol>
41
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
42
                              ssl::context& context,
43
                              const bool fUseSSL,
44
                              AcceptedConnection* conn,
45
@@ -520,7 +520,7 @@ void StartRPCThreads()
46
 
47
     assert(rpc_io_service == NULL);
48
     rpc_io_service = new asio::io_service();
49
-    rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23);
50
+    rpc_ssl_context = new ssl::context(ssl::context::sslv23);
51
 
52
     const bool fUseSSL = GetBoolArg("-rpcssl", false);
53
 
54
@@ -539,7 +539,7 @@ void StartRPCThreads()
55
         else LogPrintf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string());
56
 
57
         string strCiphers = GetArg("-rpcsslciphers", "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH");
58
-        SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
59
+        SSL_CTX_set_cipher_list(rpc_ssl_context->native_handle(), strCiphers.c_str());
60
     }
61
 
62
     // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
(-)net-p2p/blackcoind/files/pkg-message.in (+6 lines)
Line 0 Link Here
1
If you want to run blackcoind as a service, you must create a
2
configuration file at %%PREFIX%%/etc/blackcoin.conf. You may use
3
%%PREFIX%%/etc/blackcoin.conf.sample as a basis. Then add the
4
following line to /etc/rc.conf:
5
6
blackcoind_enable="YES"
(-)net-p2p/blackcoind/pkg-descr (+7 lines)
Line 0 Link Here
1
BlackCoin is the first cryptocurrency based 100% on the proof of stake
2
security algorithm with fair distribution (no entity privileged).
3
4
This port includes blackcoind - the daemon and CLI binary (no GUI)
5
compiled from the original codebase (BlackCoin Core).
6
7
WWW: https://blackcoin.co

Return to bug 226501