-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4680 Remove ENABLE_ICU option and related code #1342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we vendor the RPM spec file, and as a result we avoid directly modifying it. The correct way to modify it for our builds is to carry the desired changes in spec.patch
. I recommend that you make the following changes (to restore the spec file and then move your proposed changes to the patch):
diff --git a/.evergreen/etc/mongo-c-driver.spec b/.evergreen/etc/mongo-c-driver.spec
index aec5a5010..230b4fc11 100644
--- a/.evergreen/etc/mongo-c-driver.spec
+++ b/.evergreen/etc/mongo-c-driver.spec
@@ -37,6 +37,7 @@ BuildRequires: openssl-devel
BuildRequires: pkgconfig(libsasl2)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(snappy)
+BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(libzstd)
%if %{with tests}
BuildRequires: mongodb-server
@@ -122,6 +123,7 @@ Documentation: http://mongoc.org/libbson/%{version}/
-DENABLE_SSL:STRING=OPENSSL \
-DENABLE_SASL:STRING=CYRUS \
-DENABLE_MONGODB_AWS_AUTH:STRING=ON \
+ -DENABLE_ICU:STRING=ON \
-DENABLE_AUTOMATIC_INIT_AND_CLEANUP:BOOL=OFF \
-DENABLE_CRYPTO_SYSTEM_PROFILE:BOOL=ON \
-DENABLE_MAN_PAGES:BOOL=ON \
diff --git a/.evergreen/etc/spec.patch b/.evergreen/etc/spec.patch
index 18fe23281..ee110274c 100644
--- a/.evergreen/etc/spec.patch
+++ b/.evergreen/etc/spec.patch
@@ -1,6 +1,6 @@
---- mongo-c-driver.spec.orig 2021-11-04 16:34:50.350572049 -0400
-+++ mongo-c-driver.spec 2021-11-04 16:37:54.962271319 -0400
-@@ -10,17 +10,17 @@
+--- mongo-c-driver.spec.orig 2023-07-17 14:42:52.236247070 -0400
++++ mongo-c-driver.spec 2023-07-17 14:43:16.572305452 -0400
+@@ -10,7 +10,7 @@
%global gh_project mongo-c-driver
%global libname libmongoc
%global libver 1.0
@@ -9,9 +9,7 @@
#global up_prever rc0
# disabled as require a MongoDB server
%bcond_with tests
-
- # disable for bootstrap (libmongocrypt needs libbson)
- %bcond_without libmongocrypt
+@@ -20,7 +20,7 @@
Name: mongo-c-driver
Summary: Client library written in C for MongoDB
@@ -20,3 +18,19 @@
Release: 1%{?dist}
# See THIRD_PARTY_NOTICES
License: Apache-2.0 AND ISC AND MIT AND Zlib
+@@ -37,7 +37,6 @@
+ BuildRequires: pkgconfig(libsasl2)
+ BuildRequires: pkgconfig(zlib)
+ BuildRequires: pkgconfig(snappy)
+-BuildRequires: pkgconfig(icu-uc)
+ BuildRequires: pkgconfig(libzstd)
+ %if %{with tests}
+ BuildRequires: mongodb-server
+@@ -123,7 +122,6 @@
+ -DENABLE_SSL:STRING=OPENSSL \
+ -DENABLE_SASL:STRING=CYRUS \
+ -DENABLE_MONGODB_AWS_AUTH:STRING=ON \
+- -DENABLE_ICU:STRING=ON \
+ -DENABLE_AUTOMATIC_INIT_AND_CLEANUP:BOOL=OFF \
+ -DENABLE_CRYPTO_SYSTEM_PROFILE:BOOL=ON \
+ -DENABLE_MAN_PAGES:BOOL=ON \
Additionally, I recommend emailing the RPM maintainer, Remi, whenever the next release is made that incorporates this change (I'm guessing that will be 1.25.0) to let him know that ICU stuff can be dropped. You could also include the changes that you are proposing to the spec file in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, I recommend emailing the RPM maintainer, Remi, whenever the next release is made that incorporates this change (I'm guessing that will be 1.25.0) to let him know that ICU stuff can be dropped. You could also include the changes that you are proposing to the spec file in this PR.
I suggest adding this to the top of the NEWS file to serve as a reminder for the 1.25.0 release. The 1.25.0 release is not yet planned:
libmongoc 1.25.0 (Unreleased)
=============================
Improvements:
* Remove optional dependency of libicu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Remove these paragraphs from authentication.rst:
Since libicu is no longer a concern to users, I think mention of SASLPrep is unnecessary. |
Summary
This PR will remove any references to the now unused ICU dependency.
Background
#1317 implemented SASLprep natively, removing the need for the heavyweight and sometimes problematic ICU library. As such, we can remove all code related to this library, which will allow users to have
sha-256
encryption without downloading an external dependency.What's New
CMakeLists.txt
#ifdef
s) in the driver