Skip to content

Commit dadb93f

Browse files
committed
Merge branch 'v1.14'
v1.14 pointed to libmongoc 1.14.2, which was released some time after the submodule target in the master branch (a dev commit before libmongoc 1.23.0). To resolve this conflict, the libmongoc submodule has been bumped to 1.23.0. Note: a libmongoc 1.23.1 tag also exists, but that bump can be done in a subsequent PHPC ticket related to the libmongoc changes therein. This also adds a section to CONTRIBUTING.md to provide guidance on resolving submodule merge conflicts.
2 parents 9ee4050 + e853c4c commit dadb93f

File tree

7 files changed

+36
-16
lines changed

7 files changed

+36
-16
lines changed

.evergreen/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,9 +1154,9 @@ axes:
11541154
display_name: libmongoc version
11551155
values:
11561156
- id: "lowest-supported"
1157-
display_name: "1.22.1"
1157+
display_name: "1.23.0"
11581158
variables:
1159-
LIBMONGOC_VERSION: "1.22.1"
1159+
LIBMONGOC_VERSION: "1.23.0"
11601160
- id: "upcoming-stable"
11611161
display_name: "1.23-dev"
11621162
variables:

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,23 @@ libmongoc, libbson, and libmongocrypt. If a new version of either library is
151151
available, the submodule and build configuration will need to be updated to
152152
reflect the new sources and/or package version.
153153

154+
### Resolving Submodule Conflicts When Merging Maintenance Branches
155+
156+
When merging a maintenance branch up to master, it is quite possible for there
157+
to be a submodule conflict (and in related files). Resolving a merge conflict
158+
should never result in downgrading a submodule to an older version. Rather, the
159+
submodule should be conservatively advanced and satisfy any requirements for
160+
incoming changes from the maintenance branch.
161+
162+
For example, the 1.14.2 release bumped libmongoc from 1.22.1 to 1.22.2. When
163+
merging v1.14 into master (1.15-dev), a conflict arose because the libmongoc
164+
submodule in master pointed to a 1.23-dev commit (before the 1.23.0 release).
165+
In this case, there were no particular requirements for incoming changes from
166+
the v1.14 branch and the libmongoc submodule was bumped to 1.23.0 even though
167+
a 1.23.1 tag also existed at the time. The bump to libmongoc 1.23.1 was left to
168+
another PHPC ticket in the 1.15.0 milestone, which actually depended on the
169+
libmongoc changes therein.
170+
154171
### Updating libmongoc and libbson
155172

156173
#### Update libmongoc submodule

config.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ if test "$PHP_MONGODB" != "no"; then
243243
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
244244
AC_MSG_CHECKING(for libbson)
245245
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libbson-1.0; then
246-
if $PKG_CONFIG libbson-1.0 --atleast-version 1.22.1; then
246+
if $PKG_CONFIG libbson-1.0 --atleast-version 1.23.0; then
247247
PHP_MONGODB_BSON_CFLAGS=`$PKG_CONFIG libbson-1.0 --cflags`
248248
PHP_MONGODB_BSON_LIBS=`$PKG_CONFIG libbson-1.0 --libs`
249249
PHP_MONGODB_BSON_VERSION=`$PKG_CONFIG libbson-1.0 --modversion`
250250
PHP_MONGODB_BSON_VERSION_STRING="System ($PHP_MONGODB_BSON_VERSION)"
251251
AC_MSG_RESULT(version $PHP_MONGODB_BSON_VERSION found)
252252
else
253-
AC_MSG_ERROR(system libbson must be upgraded to version >= 1.22.1)
253+
AC_MSG_ERROR(system libbson must be upgraded to version >= 1.23.0)
254254
fi
255255
else
256256
AC_MSG_ERROR(pkgconfig and libbson must be installed)
@@ -261,14 +261,14 @@ if test "$PHP_MONGODB" != "no"; then
261261

262262
AC_MSG_CHECKING(for libmongoc)
263263
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmongoc-1.0; then
264-
if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.22.1; then
264+
if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.23.0; then
265265
PHP_MONGODB_MONGOC_CFLAGS=`$PKG_CONFIG libmongoc-1.0 --cflags`
266266
PHP_MONGODB_MONGOC_LIBS=`$PKG_CONFIG libmongoc-1.0 --libs`
267267
PHP_MONGODB_MONGOC_VERSION=`$PKG_CONFIG libmongoc-1.0 --modversion`
268268
PHP_MONGODB_MONGOC_VERSION_STRING="System ($PHP_MONGODB_MONGOC_VERSION)"
269269
AC_MSG_RESULT(version $PHP_MONGODB_MONGOC_VERSION found)
270270
else
271-
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.22.1)
271+
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.23.0)
272272
fi
273273
else
274274
AC_MSG_ERROR(pkgconfig and libmongoc must be installed)

scripts/autotools/libmongoc/CheckResolv.m4

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
dnl Disable Windows DNSAPI
22
AC_SUBST(MONGOC_HAVE_DNSAPI, 0)
33

4-
need_libresolv="no"
4+
found_resolv="no"
55

66
old_LIBS="$LIBS"
7-
dnl On AIX, resolv functions are in libc.
8-
if test "x$os_aix" = "xno"; then
7+
8+
dnl Link libresolv for detection (note: on AIX, resolv functions are in libc)
9+
if test "$os_aix" != "yes"; then
910
LIBS="$LIBS -lresolv"
1011
fi
1112

@@ -28,6 +29,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2829
AC_SUBST(MONGOC_HAVE_RES_SEARCH, 0)
2930
AC_SUBST(MONGOC_HAVE_RES_NSEARCH, 1)
3031
32+
found_resolv="yes"
33+
3134
dnl We have res_nsearch. Call res_ndestroy (BSD/Mac) or res_nclose (Linux)?
3235
AC_MSG_CHECKING([for res_ndestroy])
3336
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@@ -82,9 +85,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
8285
]])], [
8386
AC_MSG_RESULT([yes])
8487
AC_SUBST(MONGOC_HAVE_RES_SEARCH, 1)
85-
if test "x$os_aix" = "xno"; then
86-
need_libresolv="yes"
87-
fi
88+
89+
found_resolv="yes"
8890
], [
8991
AC_MSG_RESULT([no])
9092
AC_SUBST(MONGOC_HAVE_RES_SEARCH, 0)
@@ -93,6 +95,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
9395

9496
LIBS="$old_LIBS"
9597

96-
AS_IF([test "$need_libresolv" = "yes"],[
98+
dnl Link libresolv if needed (note: on AIX, resolv functions are in libc)
99+
AS_IF([test "$found_resolv" = "yes" -a "$os_aix" != "yes"],[
97100
PHP_ADD_LIBRARY([resolv],,[MONGODB_SHARED_LIBADD])
98101
])

src/LIBMONGOC_VERSION_CURRENT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.1-20220829+git623d659f00
1+
1.23.0

tests/manager/manager-ctor-auto_encryption-error-004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ OK: Got MongoDB\Driver\Exception\EncryptionException
3535
A crypt_shared override path was specified [/not/found], but we failed to open a dynamic library at that location
3636

3737
OK: Got MongoDB\Driver\Exception\EncryptionException
38-
Option 'cryptSharedLibRequired' is 'true', but failed to load the crypt_shared runtime lib%r(r?)%rary
38+
Option 'cryptSharedLibRequired' is 'true', but failed to load the crypt_shared runtime library
3939

4040
string(7) "unknown"
4141
===DONE===

0 commit comments

Comments
 (0)