[MONGOCRYPT-600] Cannot install mongodb-client-encryption npm dependency on Alpine Created: 18/Oct/23 Updated: 08/Dec/23 |
|
| Status: | Blocked |
| Project: | Libmongocrypt |
| Component/s: | Node bindings |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Inga L | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
How to reproduce: on clean Alpine Edge x86_64 system, install `nodejs`, `npm`, `python3`, `gcc`, `g++`, `make` and `krb5-dev` packages (all are needed to build other mongodb node packages, and at least some of them needed to build `mongodb-client-encryption`). Then, in a fresh clean directory, do `npm init` and `npm add mongodb-client-encryption`. Expected result: everything installs without any errors. Actual result: ``` mongo-scratchpad:~/projects/tmp-mongo$ npm add mongodb-client-encryption ``` System info: ``` mongo-scratchpad:~/projects/tmp-mongo$ uname -a ``` — Additional notes: in `node_modules/mongodb-client-encryption/addon`, `mongocrypt.cc` does `#include "mongocrypt.h"`; `mongocrypt.h` does `#include <mongocrypt/mongocrypt.h>`. There is no `mongocrypt/mongocrypt.h` on my system. Perhaps I should install `libmongocrypt` dev package somehow first, but package readme https://www.npmjs.com/package/mongodb-client-encryption does not mention any prerequisites, and there are no `mongocrypt` files in any packages in Alpine repository. Trying to find online how to install libmongocrypt produces the link to https://www.mongodb.com/docs/manual/core/queryable-encryption/reference/libmongocrypt/ , but this makes it seem that Alpine is not supported by libmongocrypt. Yet the npm package readme does not mention that. The npm package readme does mention that for development (not for ordinary use) one is supposed to run the following command: `bash ./etc/build-static.sh`. Yet there is no `etc` directory in npm package; and in `node-v6.0.0` branch of `libmongocrypt` github repository, there is no `build-static.sh` in `etc` directory. |
| Comments |
| Comment by Angus Ryer [ 08/Dec/23 ] |
|
Created a related ticket: https://jira.mongodb.org/browse/MONGOCRYPT-609 |
| Comment by Angus Ryer [ 07/Dec/23 ] |
|
I'm getting identical behaviour attempting to deploy an encryption-enabled node client to my Amazon Linux 2023 EC2 instance at the `npm i mongodb-client-encryption` step. Now I'm attempting to install the `libmongocrypt` library on my instance in order to provide the header file indicated in the error but, as stated by the OP regarding Alpine Linux, the MongoDB docs that describe how to do so] do not provide the repository source URL and data to add to the `yum` repo sources list for Amazon Linux 2023, only Amazon Linux 2013.3 and AL2. The existing S3 bucket (https://libmongocrypt.s3.amazonaws.com/) only contains debian packages, no RPMs. It does look like it's gotten closer to being added as part of MONGOCRYPT-580, however. Maybe it just hasn't been packaged and upload to S3, but I cannot find a JIRA ticket related to this. As the OP mentions too, there is no `etc` folder nor bash script available to run that comes from the `mongodb-client-encryption`.
|
| Comment by Inga L [ 30/Oct/23 ] |
|
Also related: (The reason I ran into this issue was not because I wanted to use explicit encryption on Alpine, but because I tried to set up a Compass dev environment.) |