libmongocrypt packaged as a Ruby gem
APACHE-2.0 License
Edit lib/libmongocrypt_helper/version.rb
and:
LIBMONGOCRYPT_VERSION
constant to the version oflibmongocrypt
that you want to package.VERSION
constant to the version of the helper, which islibmongocrypt
version as described below.libmongocrypt
fromext/libmongocrypt/libmongocrypt
.etc/update-sbom.sh
gem build *.gemspec && gem install libmongocrypt-helper-VERSION.gem
.Ruby gems have a relatively primitive versioning system where any non-numeric
version component causes the version to be interpreted as a pre-release.
For example, a scheme like 1.0p1
where "p1" stands for the first package
of the 1.0 version of some library doesn't work.
To work around this, libmongocrypt helper is versioned as X.0.Y
where
X
is the version of libmongocrypt
that is being packaged and Y
is
the package version plus 1000. Thus, the first package for libmongocrypt
1.5.2 would have the helper version of 1.5.2.0.1001, and if that version
of libmongocrypt
needs to be repackaged for any reason, the next helper
version would be 1.5.2.0.1002, and so on.
Starting package versions from 1001 makes it easy to identify the package
revision vs the libmongocrypt
version.
libmongocrypt
can be built while linking to the operating system's
crypto libraries (i.e. OpenSSL) or not. If libmongocrypt
is not linked
to the operating system's crypto libraries, a crypto implementation must be
provided at runtime, which the Ruby MongoDB driver does.