Skip to content

Commit 57b2b94

Browse files
committed
(Debian packaging) CDRIVER-3809 build mongo-c-driver with libmongocrypt
1 parent 2076fec commit 57b2b94

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.evergreen/debian_package_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export DEBOOTSTRAP_DIR=`pwd`/debootstrap.git
4444
sudo -E ./debootstrap.git/debootstrap unstable ./unstable-chroot/ http://cdn-aws.deb.debian.org/debian
4545
cp -a mongoc ./unstable-chroot/tmp/
4646
sudo chroot ./unstable-chroot /bin/bash -c "(set -o xtrace && \
47-
apt-get install -y build-essential git-buildpackage fakeroot debhelper cmake libssl-dev pkg-config python3-sphinx zlib1g-dev libicu-dev libsasl2-dev libsnappy-dev libzstd-dev && \
47+
apt-get install -y build-essential git-buildpackage fakeroot debhelper cmake libssl-dev pkg-config python3-sphinx zlib1g-dev libicu-dev libsasl2-dev libsnappy-dev libzstd-dev libmongocrypt-dev && \
4848
cd /tmp/mongoc && \
4949
git clean -fdx && \
5050
git reset --hard HEAD && \

debian/README.source

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,25 @@ embedded copy of source code from another package, the upstream source is
55
modified to remove the bundled zlib sources. This is accomplished by using the
66
--git-prebuild option of git-buildpackage to handle generation of the upstream
77
tarball without the embedded code. See debian/gbp.conf for details.
8+
9+
================================================================================
10+
11+
With the introduction of libmongocrypt to Debian (#968995), the mongo-c-driver
12+
package can now build libmongoc with Client-Side Field Level Encryption support.
13+
However, libmongocrypt requires libbson-dev in order to build. To prevent an
14+
unresolvable Build-Depend cycle, the support for libmongocrypt in the
15+
mongo-c-driver source package can be disabled by building with the
16+
pkg.mongo-c-driver.no-libmongocrypt build profile. Note that when this build
17+
profile is active that only libbson packages are created, as the build profile
18+
concept requires that "a binary package must contain the exact same content for
19+
all profiles with which it builds including no activated profile at all".
20+
(Consult https://wiki.debian.org/BuildProfileSpec for more information on how
21+
build profiles work in Debian.)
22+
23+
When bootstrapping a new architecture or otherwise starting with a situation
24+
where neither the mongo-c-driver nor the libmongocrypt source packages have been
25+
built yet, first use the pkg.mongo-c-driver.no-libmongocrypt build profile to
26+
build the mongo-c-driver source package. Once that is done the libmongocrypt
27+
source package can be built and once the libmongocrypt source package has been
28+
built then the mongo-c-driver source package can be built with no build profile
29+
to produce a complete set of libbson and libmongoc packages.

debian/control

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Build-Depends: debhelper (>= 11),
99
libssl-dev,
1010
pkg-config,
1111
python3-sphinx,
12+
libmongocrypt-dev <!pkg.mongo-c-driver.no-libmongocrypt>,
1213
zlib1g-dev,
1314
libicu-dev,
1415
libsasl2-dev,
@@ -23,8 +24,10 @@ Vcs-Browser: https://github.com/mongodb/mongo-c-driver/tree/master
2324
Package: libmongoc-dev
2425
Section: libdevel
2526
Architecture: any
27+
Build-Profiles: <!pkg.mongo-c-driver.no-libmongocrypt>
2628
Depends: libmongoc-1.0-0 (= ${binary:Version}),
2729
libbson-dev (= ${binary:Version}),
30+
libmongocrypt-dev,
2831
libssl-dev,
2932
zlib1g-dev,
3033
libsnappy-dev,
@@ -40,6 +43,7 @@ Description: MongoDB C client library - dev files
4043

4144
Package: libmongoc-1.0-0
4245
Architecture: any
46+
Build-Profiles: <!pkg.mongo-c-driver.no-libmongocrypt>
4347
Depends: ${misc:Depends},
4448
${shlibs:Depends}
4549
Description: MongoDB C client library - runtime files
@@ -52,6 +56,7 @@ Description: MongoDB C client library - runtime files
5256
Package: libmongoc-doc
5357
Section: doc
5458
Architecture: all
59+
Build-Profiles: <!pkg.mongo-c-driver.no-libmongocrypt>
5560
Depends: ${misc:Depends}
5661
Description: MongoDB C client library - documentation
5762
libmongoc is the officially supported MongoDB client library for C

0 commit comments

Comments
 (0)