FreeBSD Bugzilla – Attachment 199456 Details for
Bug 230698
databases/mongodb34: Fails to build with OpenSSL 1.1.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP/experimental: fixes more errors
mongo34.openssl.diff (text/plain), 11.37 KB, created by
Ronald Klop
on 2018-11-22 19:36:24 UTC
(
hide
)
Description:
WIP/experimental: fixes more errors
Filename:
MIME Type:
Creator:
Ronald Klop
Created:
2018-11-22 19:36:24 UTC
Size:
11.37 KB
patch
obsolete
>diff -Nur ./Makefile /home/builder/mongodb34/Makefile >--- ./Makefile 2018-11-10 11:09:48.000000000 +0100 >+++ /home/builder/mongodb34/Makefile 2018-11-19 19:10:50.394245000 +0100 >@@ -56,6 +56,7 @@ > > SSL_USES= ssl > SSL_MAKE_ARGS= --ssl >+SSL_CXXFLAGS+= -DOPENSSL_NO_SSL2 > > .include <bsd.port.options.mk> > >diff -Nur ./files/patch-SConstruct /home/builder/mongodb34/files/patch-SConstruct >--- ./files/patch-SConstruct 2017-10-03 15:24:11.000000000 +0200 >+++ /home/builder/mongodb34/files/patch-SConstruct 2018-11-22 20:22:52.689788000 +0100 >@@ -1,6 +1,6 @@ >---- SConstruct.orig 2017-06-08 16:11:03 UTC >+--- SConstruct.orig 2018-07-02 04:44:42 UTC > +++ SConstruct >-@@ -929,9 +929,9 @@ if has_option('variables-help'): >+@@ -936,9 +936,9 @@ if has_option('variables-help'): > print env_vars.GenerateHelpText(env) > Exit(0) > >@@ -13,7 +13,7 @@ > > def set_config_header_define(env, varname, varval = 1): > env['CONFIG_HEADER_DEFINES'][varname] = varval >-@@ -1550,7 +1550,7 @@ if env.TargetOSIs('posix'): >+@@ -1557,7 +1557,7 @@ if env.TargetOSIs('posix'): > # If runtime hardening is requested, then build anything > # destined for an executable with the necessary flags for PIE. > env.AppendUnique( >@@ -22,7 +22,7 @@ > PROGLINKFLAGS=['-pie'], > ) > >-@@ -1564,7 +1564,7 @@ if env.TargetOSIs('posix'): >+@@ -1571,7 +1571,7 @@ if env.TargetOSIs('posix'): > "-Wno-unknown-pragmas", > "-Winvalid-pch"] ) > # env.Append( " -Wconversion" ) TODO: this doesn't really work yet >@@ -31,7 +31,7 @@ > if not has_option("disable-warnings-as-errors"): > env.Append( CCFLAGS=["-Werror"] ) > >-@@ -1592,19 +1592,19 @@ if env.TargetOSIs('posix'): >+@@ -1599,19 +1599,19 @@ if env.TargetOSIs('posix'): > env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) > env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) > >@@ -61,7 +61,7 @@ > > mmapv1 = False > if get_option('mmapv1') == 'auto': >-@@ -2461,7 +2461,7 @@ def doConfigure(myenv): >+@@ -2468,7 +2468,7 @@ def doConfigure(myenv): > }} > """.format(storage_class) > context.Message('Checking for storage class {0} '.format(storage_class)) >diff -Nur ./files/patch-src_mongo_db_repl_oplog__fetcher.cpp /home/builder/mongodb34/files/patch-src_mongo_db_repl_oplog__fetcher.cpp >--- ./files/patch-src_mongo_db_repl_oplog__fetcher.cpp 2018-02-02 10:55:51.000000000 +0100 >+++ /home/builder/mongodb34/files/patch-src_mongo_db_repl_oplog__fetcher.cpp 2018-11-22 20:22:52.702394000 +0100 >@@ -1,9 +1,9 @@ > https://jira.mongodb.org/browse/SERVER-32516 > https://github.com/mongodb/mongo/commit/3c34eda8d8a3 > >---- src/mongo/db/repl/oplog_fetcher.cpp.orig 2017-09-07 19:28:48 UTC >+--- src/mongo/db/repl/oplog_fetcher.cpp.orig 2018-07-02 04:44:42 UTC > +++ src/mongo/db/repl/oplog_fetcher.cpp >-@@ -265,7 +265,7 @@ StatusWith<boost::optional<rpc::OplogQueryMetadata>> p >+@@ -275,7 +275,7 @@ StatusWith<boost::optional<rpc::OplogQueryMetadata>> p > if (!metadataResult.isOK()) { > return metadataResult.getStatus(); > } >diff -Nur ./files/patch-src_mongo_util_net_ssl__manager.cpp /home/builder/mongodb34/files/patch-src_mongo_util_net_ssl__manager.cpp >--- ./files/patch-src_mongo_util_net_ssl__manager.cpp 2018-07-08 16:29:28.000000000 +0200 >+++ /home/builder/mongodb34/files/patch-src_mongo_util_net_ssl__manager.cpp 2018-11-22 20:22:52.705903000 +0100 >@@ -1,6 +1,6 @@ >---- src/mongo/util/net/ssl_manager.cpp.orig 2017-06-08 16:11:03 UTC >+--- src/mongo/util/net/ssl_manager.cpp.orig 2018-07-02 04:44:42 UTC > +++ src/mongo/util/net/ssl_manager.cpp >-@@ -125,7 +125,7 @@ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ASN1_SEQUE >+@@ -152,7 +152,7 @@ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ASN1_SEQUE > #endif // MONGO_CONFIG_NEEDS_ASN1_ANY_DEFINITIONS > // clang-format on > >diff -Nur ./files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_detail_impl_engine.ipp /home/builder/mongodb34/files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_detail_impl_engine.ipp >--- ./files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_detail_impl_engine.ipp 1970-01-01 01:00:00.000000000 +0100 >+++ /home/builder/mongodb34/files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_detail_impl_engine.ipp 2018-11-22 20:31:06.899570000 +0100 >@@ -0,0 +1,41 @@ >+--- src/third_party/asio-asio-1-11-0/asio/include/asio/ssl/detail/impl/engine.ipp.orig 2018-11-22 19:29:49 UTC >++++ src/third_party/asio-asio-1-11-0/asio/include/asio/ssl/detail/impl/engine.ipp >+@@ -198,23 +198,37 @@ const asio::error_code& engine::map_error_code( >+ // If there's data yet to be read, it's an error. >+ if (BIO_wpending(ext_bio_)) >+ { >++#ifdef SSL_R_SHORT_READ >+ ec = asio::error_code( >+ ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ), >+ asio::error::get_ssl_category()); >++#else >++ int sys_error = static_cast<int>(::ERR_get_error()); >++ ec = asio::error_code( >++ sys_error, >++ asio::error::get_ssl_category()); >++#endif >+ return ec; >+ } >+ >+ // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the >+ // underlying transport is passed through. >+- if (ssl_ && ssl_->version == SSL2_VERSION) >++ if (ssl_ && SSL_version(ssl_) == SSL2_VERSION) >+ return ec; >+ >+ // Otherwise, the peer should have negotiated a proper shutdown. >+ if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0) >+ { >++#ifdef SSL_R_SHORT_READ >+ ec = asio::error_code( >+ ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ), >+ asio::error::get_ssl_category()); >++#else >++ int sys_error = static_cast<int>(::ERR_get_error()); >++ ec = asio::error_code( >++ sys_error, >++ asio::error::get_ssl_category()); >++#endif >+ } >+ >+ return ec; >diff -Nur ./files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_impl_context.ipp /home/builder/mongodb34/files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_impl_context.ipp >--- ./files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_impl_context.ipp 1970-01-01 01:00:00.000000000 +0100 >+++ /home/builder/mongodb34/files/patch-src_third__party_asio-asio-1-11-0_asio_include_asio_ssl_impl_context.ipp 2018-11-22 20:31:06.902227000 +0100 >@@ -0,0 +1,90 @@ >+--- src/third_party/asio-asio-1-11-0/asio/include/asio/ssl/impl/context.ipp.orig 2018-11-22 19:30:49 UTC >++++ src/third_party/asio-asio-1-11-0/asio/include/asio/ssl/impl/context.ipp >+@@ -192,13 +192,13 @@ context::~context() >+ { >+ if (handle_) >+ { >+- if (handle_->default_passwd_callback_userdata) >++ if (SSL_CTX_get_default_passwd_cb_userdata(handle_)) >+ { >+ detail::password_callback_base* callback = >+ static_cast<detail::password_callback_base*>( >+- handle_->default_passwd_callback_userdata); >++ SSL_CTX_get_default_passwd_cb_userdata(handle_)); >+ delete callback; >+- handle_->default_passwd_callback_userdata = 0; >++ SSL_CTX_set_default_passwd_cb_userdata(handle_, 0); >+ } >+ >+ if (SSL_CTX_get_app_data(handle_)) >+@@ -530,8 +530,8 @@ asio::error_code context::use_certificate_chain( >+ { >+ x509_cleanup cert = { >+ ::PEM_read_bio_X509_AUX(bio.p, 0, >+- handle_->default_passwd_callback, >+- handle_->default_passwd_callback_userdata) }; >++ SSL_CTX_get_default_passwd_cb(handle_), >++ SSL_CTX_get_default_passwd_cb_userdata(handle_)) }; >+ if (!cert.p) >+ { >+ ec = asio::error_code(ERR_R_PEM_LIB, >+@@ -548,15 +548,17 @@ asio::error_code context::use_certificate_chain( >+ return ec; >+ } >+ >+- if (handle_->extra_certs) >++ STACK_OF(X509) *extra_certs; >++ SSL_CTX_get_extra_chain_certs_only(handle_, &extra_certs); >++ if (extra_certs) >+ { >+- ::sk_X509_pop_free(handle_->extra_certs, X509_free); >+- handle_->extra_certs = 0; >++ ::sk_X509_pop_free(extra_certs, X509_free); >++ SSL_CTX_clear_extra_chain_certs(handle_); >+ } >+ >+ while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0, >+- handle_->default_passwd_callback, >+- handle_->default_passwd_callback_userdata)) >++ SSL_CTX_get_default_passwd_cb(handle_), >++ SSL_CTX_get_default_passwd_cb_userdata(handle_))) >+ { >+ if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert)) >+ { >+@@ -632,8 +634,8 @@ asio::error_code context::use_private_key( >+ break; >+ case context_base::pem: >+ evp_private_key.p = ::PEM_read_bio_PrivateKey( >+- bio.p, 0, handle_->default_passwd_callback, >+- handle_->default_passwd_callback_userdata); >++ bio.p, 0, SSL_CTX_get_default_passwd_cb(handle_), >++ SSL_CTX_get_default_passwd_cb_userdata(handle_)); >+ break; >+ default: >+ { >+@@ -691,8 +693,8 @@ asio::error_code context::use_rsa_private_key( >+ break; >+ case context_base::pem: >+ rsa_private_key.p = ::PEM_read_bio_RSAPrivateKey( >+- bio.p, 0, handle_->default_passwd_callback, >+- handle_->default_passwd_callback_userdata); >++ bio.p, 0, SSL_CTX_get_default_passwd_cb(handle_), >++ SSL_CTX_get_default_passwd_cb_userdata(handle_)); >+ break; >+ default: >+ { >+@@ -911,11 +913,11 @@ int context::verify_callback_function(int preverified, >+ asio::error_code context::do_set_password_callback( >+ detail::password_callback_base* callback, asio::error_code& ec) >+ { >+- if (handle_->default_passwd_callback_userdata) >++ if (SSL_CTX_get_default_passwd_cb_userdata(handle_)) >+ delete static_cast<detail::password_callback_base*>( >+- handle_->default_passwd_callback_userdata); >++ SSL_CTX_get_default_passwd_cb_userdata(handle_)); >+ >+- handle_->default_passwd_callback_userdata = callback; >++ SSL_CTX_set_default_passwd_cb_userdata(handle_, callback); >+ >+ SSL_CTX_set_default_passwd_cb(handle_, &context::password_callback_function); >+ >diff -Nur ./files/patch-src_third__party_yaml-cpp-0.5.3_include_yaml-cpp_node_detail_iterator.h /home/builder/mongodb34/files/patch-src_third__party_yaml-cpp-0.5.3_include_yaml-cpp_node_detail_iterator.h >--- ./files/patch-src_third__party_yaml-cpp-0.5.3_include_yaml-cpp_node_detail_iterator.h 1970-01-01 01:00:00.000000000 +0100 >+++ /home/builder/mongodb34/files/patch-src_third__party_yaml-cpp-0.5.3_include_yaml-cpp_node_detail_iterator.h 2018-11-22 20:22:52.932657000 +0100 >@@ -0,0 +1,24 @@ >+In file included from src/third_party/yaml-cpp-0.5.3/src/convert.cpp:3: >+In file included from src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/convert.h:17: >+In file included from src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/impl.h:11: >+In file included from src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/iterator.h:13: >+src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/detail/iterator.h:48:54: error: no member named 'next' in namespace 'boost' >+ void increment() { this->base_reference() = boost::next(this->base()); } >+ ~~~~~~~^ >+ >+--- src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/detail/iterator.h.orig 2018-07-02 04:44:42 UTC >++++ src/third_party/yaml-cpp-0.5.3/include/yaml-cpp/node/detail/iterator.h >+@@ -11,7 +11,13 @@ >+ #include "yaml-cpp/node/ptr.h" >+ #include "yaml-cpp/node/detail/node_iterator.h" >+ #include <boost/iterator/iterator_adaptor.hpp> >++ >++#include <boost/version.hpp> >++#if BOOST_VERSION < 106700 >+ #include <boost/utility.hpp> >++#else >++#include <boost/next_prior.hpp> >++#endif >+ >+ namespace YAML { >+ namespace detail {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230698
:
199330
|
199456
|
199458
|
199541