Skip to content

Commit 9aa9099

Browse files
committed
Merge pull request #5677
d528025 Revert "rpc-tests: re-enable rpc-tests for Windows" (Wladimir J. van der Laan) 1e700c9 doc: update deps in build-unix.md after libevent (Wladimir J. van der Laan) 26c9b83 Move windows socket init to utility function (Wladimir J. van der Laan) 4be0b08 libevent: Windows reuseaddr workaround in depends (Cory Fields) 3a174cd Fix race condition between starting HTTP server thread and setting EventBase() (Wladimir J. van der Laan) 6d2bc22 Document options for new HTTP/RPC server in --help (Wladimir J. van der Laan) be33f3f Implement RPCTimerHandler for Qt RPC console (Wladimir J. van der Laan) 57d85d9 doc: mention SSL support dropped for RPC in release notes (Wladimir J. van der Laan) 40b556d evhttpd implementation (Wladimir J. van der Laan) ee2a42b tests: GET requests cannot have request body, use POST in rest.py (Wladimir J. van der Laan) 6e996d3 tests: fix qt payment test (Cory Fields) 3140ef9 build: build-system changes for libevent (Wladimir J. van der Laan) a9af234 libevent: add depends (Cory Fields) 6a21dd5 Remove rpc_boostasiotocnetaddr test (Wladimir J. van der Laan) 8f9301c qa: Remove -rpckeepalive tests from httpbasics (Wladimir J. van der Laan) 51fcfc0 doc: remove documentation for rpcssl (Wladimir J. van der Laan)
2 parents 4b437b2 + d528025 commit 9aa9099

38 files changed

+1502
-1153
lines changed

configure.ac

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,12 @@ if test x$use_pkgconfig = xyes; then
664664
if test x$use_qr != xno; then
665665
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
666666
fi
667+
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
668+
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
669+
if test x$TARGET_OS != xwindows; then
670+
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
671+
fi
672+
fi
667673
]
668674
)
669675
else
@@ -673,6 +679,14 @@ else
673679
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
674680
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
675681

682+
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
683+
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
684+
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
685+
if test x$TARGET_OS != xwindows; then
686+
AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing))
687+
fi
688+
fi
689+
676690
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
677691
if test x$use_qr != xno; then
678692
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])

contrib/bitcoind.bash-completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ _bitcoind() {
9696
esac
9797

9898
case "$cur" in
99-
-conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
99+
-conf=*|-pid=*|-loadblock=*|-wallet=*)
100100
cur="${cur#*=}"
101101
_filedir
102102
return 0

contrib/debian/examples/bitcoin.conf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@
9595
# running on another host using this option:
9696
#rpcconnect=127.0.0.1
9797

98-
# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
99-
# with Bitcoin -server or bitcoind
100-
#rpcssl=1
101-
102-
# OpenSSL settings used when rpcssl=1
103-
#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
104-
#rpcsslcertificatechainfile=server.cert
105-
#rpcsslprivatekeyfile=server.pem
106-
10798
# Transaction Fee Changes in 0.10.0
10899

109100
# Send transactions as zero-fee transactions if possible (default: 0)

contrib/debian/manpages/bitcoin-cli.1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ Listen for JSON\-RPC connections on <port> (default: 8332 or testnet: 18332).
3636
.TP
3737
\fB\-rpcconnect=\fR<ip>
3838
Send commands to node running on <ip> (default: 127.0.0.1).
39-
.TP
40-
\fB\-rpcssl\fR=\fI1\fR
41-
Use OpenSSL (https) for JSON\-RPC connections (see the Bitcoin Wiki for SSL setup instructions).
4239

4340
.SH "SEE ALSO"
4441
\fBbitcoind\fP, \fBbitcoin.conf\fP

contrib/debian/manpages/bitcoin-qt.1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,18 +178,6 @@ Set maximum block size in bytes (default: 250000)
178178
.HP
179179
\fB\-blockprioritysize=\fR<n> Set maximum size of high\-priority/low\-fee transactions in bytes (default: 27000)
180180
.PP
181-
SSL options: (see the Bitcoin Wiki for SSL setup instructions)
182-
.TP
183-
\fB\-rpcssl\fR
184-
Use OpenSSL (https) for JSON\-RPC connections
185-
.TP
186-
\fB\-rpcsslcertificatechainfile=\fR<file.cert>
187-
Server certificate file (default: server.cert)
188-
.TP
189-
\fB\-rpcsslprivatekeyfile=\fR<file.pem>
190-
Server private key (default: server.pem)
191-
.TP
192-
\fB\-rpcsslciphers=\fR<ciphers>
193181
Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
194182
.SS "UI options:"
195183
.TP

contrib/debian/manpages/bitcoin.conf.5

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,6 @@ Listen for RPC connections on this TCP port.
4646
\fBrpcconnect=\fR\fI'127.0.0.1'\fR
4747
You can use *bitcoin* or *bitcoind(1)* to send commands to *bitcoin*/*bitcoind(1)* running on another host using this option.
4848
.TP
49-
\fBrpcssl=\fR\fI'1'\fR
50-
Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate with *bitcoin* '\-server' or *bitcoind(1)*. Example of OpenSSL settings used when *rpcssl*='1':
51-
.TP
52-
\fB\-rpcsslciphers=\fR<ciphers>
53-
Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
54-
.TP
55-
\fBrpcsslcertificatechainfile=\fR\fI'server.cert'\fR
56-
.TP
57-
\fBrpcsslprivatekeyfile=\fR\fI'server.pem'\fR
58-
.TP
5949
.SH MISCELLANEOUS OPTIONS
6050
.TP
6151
\fBgen=\fR[\fI'0'\fR|\fI'1'\fR]

contrib/debian/manpages/bitcoind.1

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,6 @@ Allow JSON\-RPC connections from specified IP address
6262
.TP
6363
\fB\-rpcconnect=\fR<ip>
6464
Send commands to node running on <ip>
65-
.PP
66-
SSL options: (see the Bitcoin Wiki for SSL setup instructions)
67-
.TP
68-
\fB\-rpcssl\fR=\fI1\fR
69-
Use OpenSSL (https) for JSON\-RPC connections
70-
.TP
71-
\fB\-rpcsslcertificatchainfile=\fR<file.cert>
72-
Server certificate file (default: server.cert)
73-
.TP
74-
\fB\-rpcsslprivatekeyfile=\fR<file.pem>
75-
Server private key (default: server.pem)
76-
.TP
77-
\fB\-rpcsslciphers=\fR<ciphers>
78-
Acceptable ciphers (default: TLSv1+HIGH:\:!SSLv2:\:!aNULL:\:!eNULL:\:!AH:\:!3DES:\:@STRENGTH)
7965
.TP
8066
\-?
8167
This help message

depends/packages/libevent.mk

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package=libevent
2+
$(package)_version=2.0.22
3+
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.0.22-stable
4+
$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz
5+
$(package)_sha256_hash=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
6+
$(package)_patches=reuseaddr.patch
7+
8+
define $(package)_preprocess_cmds
9+
patch -p1 < $($(package)_patch_dir)/reuseaddr.patch
10+
endef
11+
12+
define $(package)_set_vars
13+
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
14+
$(package)_config_opts_release=--disable-debug-mode
15+
$(package)_config_opts_linux=--with-pic
16+
endef
17+
18+
define $(package)_config_cmds
19+
$($(package)_autoconf)
20+
endef
21+
22+
define $(package)_build_cmds
23+
$(MAKE)
24+
endef
25+
26+
define $(package)_stage_cmds
27+
$(MAKE) DESTDIR=$($(package)_staging_dir) install
28+
endef
29+
30+
define $(package)_postprocess_cmds
31+
endef

depends/packages/packages.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packages:=boost openssl
1+
packages:=boost openssl libevent
22
native_packages := native_ccache native_comparisontool
33

44
qt_native_packages = native_protobuf
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- old/evutil.c 2015-08-28 19:26:23.488765923 -0400
2+
+++ new/evutil.c 2015-08-28 19:27:41.392767019 -0400
3+
@@ -321,15 +321,16 @@
4+
int
5+
evutil_make_listen_socket_reuseable(evutil_socket_t sock)
6+
{
7+
-#ifndef WIN32
8+
int one = 1;
9+
+#ifndef WIN32
10+
/* REUSEADDR on Unix means, "don't hang on to this address after the
11+
* listener is closed." On Windows, though, it means "don't keep other
12+
* processes from binding to this address while we're using it. */
13+
return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &one,
14+
(ev_socklen_t)sizeof(one));
15+
#else
16+
- return 0;
17+
+ return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*) &one,
18+
+ (ev_socklen_t)sizeof(one));
19+
#endif
20+
}
21+

0 commit comments

Comments
 (0)