Skip to content

Commit

Permalink
upgrade vendored mongo-c-driver 1.16.2 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen authored Mar 17, 2020
1 parent e5636eb commit e5a628a
Show file tree
Hide file tree
Showing 305 changed files with 8,608 additions and 2,297 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
^tests/testthat/specifications/source/(?!bson-).*$
^test.R$
^gridfs.rmd
^configure.log$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ src/Makevars
src/Makevars.bak
inst/doc
windows
configure.log
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,37 @@ matrix:
- dist: xenial
services: mongodb
r_check_args: '--run-donttest'
warnings_are_errors: true
- os: osx
brew_packages: openssl
before_install:
- brew unlink python #Python still broken in 2to3
- brew install mongodb
- brew services start mongodb
- brew tap mongodb/brew
- brew install mongodb-community
- brew services start mongodb-community
r_check_args: '--run-donttest'
warnings_are_errors: false #-Wno-deprecated-declarations
- os: osx
brew_packages: [email protected]
before_install: brew uninstall --ignore-dependencies openssl
env: PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
warnings_are_errors: false #-Wno-deprecated-declarations
env:
- PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
- MONGOLITE_USE_OPENSSL=1
- os: osx
brew_packages: libressl
before_install: brew uninstall --ignore-dependencies openssl [email protected]
env: PKG_CONFIG_PATH="/usr/local/opt/libressl/lib/pkgconfig"
warnings_are_errors: false #-Wno-deprecated-declarations
before_install: brew uninstall --ignore-dependencies [email protected]
env:
- PKG_CONFIG_PATH="/usr/local/opt/libressl/lib/pkgconfig"
- MONGOLITE_USE_OPENSSL=1
- os: osx
osx_image: xcode7.3
disable_homebrew: true
warnings_are_errors: false #-Wno-deprecated-declarations
before_install: sed -i.bak 's/-isysroot /-I/g' $(R RHOME)/etc/Makeconf
env: MONGOLITE_USE_OPENSSL=1
- os: osx
osx_image: xcode7.3
disable_homebrew: true
warnings_are_errors: false #-Wno-deprecated-declarations
before_install: sed -i.bak 's/-isysroot /-I/g' $(R RHOME)/etc/Makeconf
env: MONGOLITE_USE_OPENSSL=1

# Ignore warning about -Wno-deprecated-declarations
warnings_are_errors: false

addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ URL: https://github.com/jeroen/mongolite/ (devel)
http://mongoc.org/ (upstream)
BugReports: https://github.com/jeroen/mongolite/issues
SystemRequirements: OpenSSL, Cyrus SASL (aka libsasl2)
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
Roxygen: list(markdown = TRUE)
Suggests:
spelling,
Expand Down
5 changes: 4 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2.2
- Update vendored mongo-c-driver to v1.16.2

2.1
- Update vendored mongo-c-driver to v1.4.0
- Update vendored mongo-c-driver to v1.14.0
- MacOS now defaults to OSX native secure transport SSL instead of openssl

2.0.2
Expand Down
2 changes: 1 addition & 1 deletion R/mongo.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @return Upon success returns a pointer to a collection on the server.
#' The collection can be interfaced using the methods described below.
#' @examples # Connect to demo server
#' con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test")
#' con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test?retryWrites=false")
#' if(con$count() > 0) con$drop()
#' con$insert(mtcars)
#' stopifnot(con$count() == nrow(mtcars))
Expand Down
2 changes: 1 addition & 1 deletion cleanup
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
rm -f src/Makevars
rm -f src/Makevars configure.log
24 changes: 11 additions & 13 deletions configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Anticonf (tm) script by Jeroen Ooms (2019)
# Anticonf (tm) script by Jeroen Ooms (2020)
# This script will query 'pkg-config' for the required cflags and ldflags.
# If pkg-config is unavailable or does not find the library, try setting
# INCLUDE_DIR and LIB_DIR manually via e.g:
Expand All @@ -17,9 +17,8 @@ PKG_CONFIG_NAME="openssl"
PKG_DEB_NAME="libssl-dev, libsasl2-dev"
PKG_RPM_NAME="openssl-devel, cyrus-sasl-devel"
PKG_CSW_NAME="libssl_dev, sasl_dev"
PKG_BREW_NAME="openssl"
PKG_TEST_1="<openssl/evp.h>"
PKG_TEST_2="<sasl/sasl.h>"
PKG_BREW_NAME="[email protected]"
PKG_TEST_FILE="src/tests/dependencies.c"
SASL_LIBS="-lsasl2"

# Hack for solaris
Expand Down Expand Up @@ -77,13 +76,10 @@ CFLAGS=$(${R_HOME}/bin/R CMD config CFLAGS)
CPPFLAGS=$(${R_HOME}/bin/R CMD config CPPFLAGS)

# Test configuration
echo "#include $PKG_TEST_1" | ${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E -xc - >/dev/null 2>&1 || R_CONFIG_ERROR=1;
echo "#include $PKG_TEST_2" | ${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E -xc - >/dev/null 2>&1 || R_CONFIG_ERROR=1;

# Customize the error
if [ $R_CONFIG_ERROR ]; then
echo "------------------------- ANTICONF ERROR ---------------------------"
echo "Configuration failed because $PKG_CONFIG_NAME/sasl was not found. Try installing:"
${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E ${PKG_TEST_FILE} >/dev/null 2>configure.log
if [ $? -ne 0 ]; then
echo "-----------------------------[ ANTICONF ]-------------------------------"
echo "Configuration failed to find SASL or OpenSSL. Try installing:"
echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)"
echo " * rpm: $PKG_RPM_NAME (Fedora, CentOS, RHEL)"
echo " * csw: $PKG_CSW_NAME (Solaris)"
Expand All @@ -92,8 +88,10 @@ if [ $R_CONFIG_ERROR ]; then
echo "PATH and PKG_CONFIG_PATH contains a $PKG_CONFIG_NAME.pc file. If pkg-config"
echo "is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:"
echo "R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'"
echo "--------------------------------------------------------------------"
exit 1;
echo "---------------------------[ ERROR MESSAGE ]----------------------------"
cat configure.log
echo "------------------------------------------------------------------------"
exit 1
fi

# Feature test for 'sasl_client_done'
Expand Down
8 changes: 6 additions & 2 deletions man/gridfs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions man/mongo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/mongo_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions man/ssl_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ LIBMONGOC=mongoc/mongoc-array.o common/common-b64.o mongoc/mongoc-buffer.o \
mongoc/mongoc-opts.o mongoc/mongoc-opts-helpers.o \
mongoc/mongoc-cursor-cmd.o mongoc/mongoc-cursor-cmd-deprecated.o \
mongoc/mongoc-cursor-find.o mongoc/mongoc-cursor-find-cmd.o mongoc/mongoc-cursor-find-opquery.o \
mongoc/mongoc-cursor-legacy.o mongoc/mongoc-error.o
mongoc/mongoc-cursor-legacy.o mongoc/mongoc-error.o mongoc/mongoc-aggregate.o \
mongoc/mongoc-client-side-encryption.o mongoc/mongoc-cursor-change-stream.o mongoc/mongoc-change-stream.o

PKG_LIBS=-Lmongoc -lstatmongoc -Lbson -lstatbson @libs@ -lz
STATLIB = mongoc/libstatmongoc.a bson/libstatbson.a
Expand Down
3 changes: 2 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ LIBMONGOC=mongoc/mongoc-array.o common/common-b64.o mongoc/mongoc-buffer.o \
mongoc/mongoc-opts.o mongoc/mongoc-opts-helpers.o \
mongoc/mongoc-cursor-cmd.o mongoc/mongoc-cursor-cmd-deprecated.o \
mongoc/mongoc-cursor-find.o mongoc/mongoc-cursor-find-cmd.o mongoc/mongoc-cursor-find-opquery.o \
mongoc/mongoc-cursor-legacy.o mongoc/mongoc-error.o
mongoc/mongoc-cursor-legacy.o mongoc/mongoc-error.o mongoc/mongoc-aggregate.o \
mongoc/mongoc-client-side-encryption.o mongoc/mongoc-cursor-change-stream.o mongoc/mongoc-change-stream.o

ifeq "$(WIN)" "32"
LIBMONGOC += win32/ipv6.o
Expand Down
4 changes: 2 additions & 2 deletions src/bson/bcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

#include <stdio.h>

#include "bson/bcon.h"
#include "bson/bson-config.h"
#include "bcon.h"
#include "bson-config.h"

/* These stack manipulation macros are used to manage append recursion in
* bcon_append_ctx_va(). They take care of some awkward dereference rules (the
Expand Down
4 changes: 2 additions & 2 deletions src/bson/bcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @brief BCON (BSON C Object Notation) Declarations
*/

#include "bson/bson-prelude.h"
#include "bson-prelude.h"

/* Copyright 2009-2013 MongoDB, Inc.
*
Expand All @@ -23,7 +23,7 @@
#ifndef BCON_H_
#define BCON_H_

#include "bson/bson.h"
#include "bson.h"


BSON_BEGIN_DECLS
Expand Down
2 changes: 1 addition & 1 deletion src/bson/bson-atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/


#include "bson/bson-atomic.h"
#include "bson-atomic.h"


/*
Expand Down
8 changes: 4 additions & 4 deletions src/bson/bson-atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

#include "bson/bson-prelude.h"
#include "bson-prelude.h"


#ifndef BSON_ATOMIC_H
#define BSON_ATOMIC_H


#include "bson/bson-config.h"
#include "bson/bson-compat.h"
#include "bson/bson-macros.h"
#include "bson-config.h"
#include "bson-compat.h"
#include "bson-macros.h"


BSON_BEGIN_DECLS
Expand Down
6 changes: 3 additions & 3 deletions src/bson/bson-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
#endif


#include "bson/bson-config.h"
#include "bson/bson-compat.h"
#include "bson-config.h"
#include "bson-compat.h"


#if defined(BSON_HAVE_CLOCK_GETTIME)
#include <time.h>
#include <sys/time.h>
#endif

#include "bson/bson-clock.h"
#include "bson-clock.h"


/*
Expand Down
8 changes: 4 additions & 4 deletions src/bson/bson-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
* limitations under the License.
*/

#include "bson/bson-prelude.h"
#include "bson-prelude.h"


#ifndef BSON_CLOCK_H
#define BSON_CLOCK_H


#include "bson/bson-compat.h"
#include "bson/bson-macros.h"
#include "bson/bson-types.h"
#include "bson-compat.h"
#include "bson-macros.h"
#include "bson-types.h"


BSON_BEGIN_DECLS
Expand Down
8 changes: 4 additions & 4 deletions src/bson/bson-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "bson/bson-prelude.h"
#include "bson-prelude.h"


#ifndef BSON_COMPAT_H
Expand All @@ -31,8 +31,8 @@
#endif
#endif

#include "bson/bson-config.h"
#include "bson/bson-macros.h"
#include "bson-config.h"
#include "bson-macros.h"


#ifdef BSON_OS_WIN32
Expand Down Expand Up @@ -64,7 +64,7 @@
#endif


#include "bson/bson-macros.h"
#include "bson-macros.h"


#include <errno.h>
Expand Down
4 changes: 2 additions & 2 deletions src/bson/bson-context-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

#include "bson/bson-prelude.h"
#include "bson-prelude.h"


#ifndef BSON_CONTEXT_PRIVATE_H
#define BSON_CONTEXT_PRIVATE_H


#include "bson/bson-context.h"
#include "bson-context.h"
#include "common-thread-private.h"


Expand Down
Loading

0 comments on commit e5a628a

Please sign in to comment.