Bug 272180 - [NEW PORT] databases/compass v1.43.0: Powerful GUI for MongoDB
Summary: [NEW PORT] databases/compass v1.43.0: Powerful GUI for MongoDB
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ronald Klop
URL: https://github.com/mongodb-js/compass...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-24 11:44 UTC by Hiroo Ono
Modified: 2024-08-24 10:52 UTC (History)
1 user (show)

See Also:


Attachments
add databases/compass. (217.27 KB, patch)
2023-06-24 11:44 UTC, Hiroo Ono
no flags Details | Diff
MongoDB compass 1.43.0 (173.05 KB, patch)
2024-05-31 16:32 UTC, Hiroo Ono
no flags Details | Diff
MongoDB compass 1.43.0 (removed needless part) (164.61 KB, patch)
2024-05-31 16:40 UTC, Hiroo Ono
no flags Details | Diff
try to specify eslint version with mongodb-client-encryption installation (1022 bytes, patch)
2024-06-11 10:36 UTC, Hiroo Ono
no flags Details | Diff
databases/compass port rev5 (163.54 KB, patch)
2024-07-09 08:42 UTC, Hiroo Ono
no flags Details | Diff
compass 1.43.0 port rev5 (163.54 KB, patch)
2024-07-09 13:27 UTC, Hiroo Ono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroo Ono 2023-06-24 11:44:56 UTC
Created attachment 242963 [details]
add databases/compass.

This is the port of MongoDB Compass https://www.mongodb.com/products/compass , The GUI for MongoDB.
It is the port of an electron application, so it caches sources for npm, yarn, node-gyp and cargo in the post-fetch section, and build them in pre-build and do-build section.
It is not the latest version, because it took some time for me to finish it and the version up pace is quite high. (I started when the latest was 1.35-beta 4, and when I made it for 1.36.1, the latest version was 1.38.0.) I will try to catch up the latest version as soon as possible, but please consider committing this version first.
Comment 1 Matthew Seaman freebsd_committer freebsd_triage 2023-06-25 21:36:20 UTC
Unfortunately I can't do test builds on this: I'm getting build failures for rust and llvm15.  Back to the pool, I guess.
Comment 2 Ronald Klop freebsd_committer freebsd_triage 2024-05-16 10:01:26 UTC
I tried compiling this on my RPI4. Electron29 timed out after about a week of compiling. I probably should have given it 4 instead of 2 CPUs. :-)
I'm not sure when I have time to look at this again.
Comment 3 Hiroo Ono 2024-05-31 16:32:37 UTC
Created attachment 251119 [details]
MongoDB compass 1.43.0

Updated the patch to compass 1.43.0.

As it depends on electron and rust, it takes time to build the dependency.
Comment 4 Hiroo Ono 2024-05-31 16:40:42 UTC
Created attachment 251120 [details]
MongoDB compass 1.43.0 (removed needless part)
Comment 5 Ronald Klop freebsd_committer freebsd_triage 2024-06-11 09:55:09 UTC
I started building this on aarch64.
I needed to change ONLY_FOR_ARCHS "arm64" to "aarch64" in the Makefile.

After increasing the MAX_FILES in poudriere.conf a lot I'm now stuck on this error.

[00:33:27] npm error Could not resolve dependency:
[00:33:27] npm error peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0
[00:33:27] npm error node_modules/@typescript-eslint/parser
[00:33:27] npm error   peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/eslint-plugin@6.21.0
[00:33:27] npm error   node_modules/@typescript-eslint/eslint-plugin
[00:33:27] npm error     dev @typescript-eslint/eslint-plugin@"^6.3.0" from the root project

See [1] for full log.

[1] https://june24:T0nB$jEKu@jail14.thuis.klop.ws/data/freebsd14-custom/2024-06-09_18h18m23s/logs/errors/compass-1.43.0.log
Comment 6 Hiroo Ono 2024-06-11 10:36:46 UTC
Created attachment 251388 [details]
try to specify eslint version with mongodb-client-encryption installation
Comment 7 Hiroo Ono 2024-06-11 10:41:18 UTC
(In reply to Ronald Klop from comment #5)
The log says it cannot determine the version of eslint from mongodb-client-encryption's package.json. I am not sure, but would you like to try attachment 251388 [details] on top of the Makefile of the port to see if anything changes?

Also, there should be a point where it builds FreeBSD binary and npm pack it. I will look into that script to see if it works with arm64.
Comment 8 Hiroo Ono 2024-07-09 08:42:58 UTC
Created attachment 251947 [details]
databases/compass port rev5

Updated the port. This addresses 2 things and there is an additional information.

1. ONLY_FOR_ARCHS is now for amd64 and arm64.
  patch and build method for @napi-rs/cli should work with arm64 in theory, but I could not test it.

2. [00:33:27] npm error Could not resolve dependency:
  There are at least 3 npm package dependency problem. I addressed them by patching package.json of mongodb-client-encryption package. 

3. currently, this port needs MAX_FILES_compass=16384 line in poudriere.conf.
  This comes from npm feature (or bug).
  cf. https://github.com/npm/cli/issues/4783
  I made a pull request to solve this problem. https://github.com/npm/cli/pull/7631
  But, until it is merged and comes down to ports, we need the MAX_FILES setting in poudriere.conf.
Comment 9 Ronald Klop freebsd_committer freebsd_triage 2024-07-09 09:57:09 UTC
(In reply to Hiroo Ono from comment #8)
Hi. The name arm64 does not exist. It is spelled 'aarch64'.
ONLY_FOR_ARCHS=	amd64 arm64
should be
ONLY_FOR_ARCHS=	aarch64 amd64

I will test your new version on my RPI4/aarch64 after my current test build of mongodb50 is finished.
Comment 10 Hiroo Ono 2024-07-09 13:27:19 UTC
Created attachment 251950 [details]
compass 1.43.0 port rev5

Sorry, corrected arm64 to aarch64.
Comment 11 Ronald Klop freebsd_committer freebsd_triage 2024-07-22 09:48:03 UTC
I'm sorry, but compilation of compass on aarch64 failed again.

See poudriere:
https://july24:Je0LSHM3pqpjO3@jail14.thuis.klop.ws/build.html?mastername=freebsd14-custom&build=2024-07-16_21h36m00s
And build log:
https://july24:Je0LSHM3pqpjO3@jail14.thuis.klop.ws/data/freebsd14-custom/2024-07-16_21h36m00s/logs/compass-1.43.0.log

[00:33:59] npm error code ERESOLVE
[00:33:59] npm error ERESOLVE unable to resolve dependency tree
[00:33:59] npm error
[00:33:59] npm error While resolving: mongodb-client-encryption@6.0.0
[00:33:59] npm error Found: eslint@undefined
[00:33:59] npm error node_modules/eslint
[00:33:59] npm error   dev eslint@"^8.0.0" from the root project
[00:33:59] npm error
[00:33:59] npm error Could not resolve dependency:
[00:33:59] npm error peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0
[00:33:59] npm error node_modules/@typescript-eslint/parser
[00:33:59] npm error   peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/eslint-plugin@6.21.0
[00:33:59] npm error   node_modules/@typescript-eslint/eslint-plugin
[00:33:59] npm error     dev @typescript-eslint/eslint-plugin@"^6.3.0" from the root project

If I have the time I will try to start a build on amd64 tonight. I just need one reproducible build to commit the port.
Comment 12 Hiroo Ono 2024-07-22 22:41:25 UTC
(In reply to Ronald Klop from comment #11)
It is like --strict-peer-deps=true option is given to npm install (though the default is false). Maybe, I should have tried --strict-peer-deps=false before trying to tweak versions in package.json.
There should be Raspberry Pi 3 somewhere in my house. I will try to set up the aarch64 install to test aarch64 build.
Comment 13 Ronald Klop freebsd_committer freebsd_triage 2024-07-23 11:33:13 UTC
The poudriere build on amd64 succeeded for me. I don't understand yet why it does not build on aarch64.

I'm inclined to commit the port after a last check later today. And would than advice to open a new issue to track fixing the aarch64 build if it fails on the official build servers also.
Comment 14 commit-hook freebsd_committer freebsd_triage 2024-07-23 11:46:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=500a61f19f4294c12faac37a0c8ca4a4e544c9db

commit 500a61f19f4294c12faac37a0c8ca4a4e544c9db
Author:     Hiroo Ono <hiroo.ono+freebsd@gmail.com>
AuthorDate: 2024-07-23 08:09:30 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-07-23 11:45:10 +0000

    databases/compass: Powerful GUI for MongoDB (v1.43.0)

    New port.

    https://www.mongodb.com/products/tools/compass
    https://github.com/mongodb-js/compass

    PR: 272180

 databases/Makefile                                 |    1 +
 databases/compass/Makefile (new)                   |  514 +++++
 databases/compass/distinfo (new)                   |   41 +
 .../compass/files/electron-packager.patch (new)    |   57 +
 databases/compass/files/fs-xattr.patch (new)       |  157 ++
 .../compass/files/kerberos-heimdal.patch (new)     |   82 +
 databases/compass/files/kerberos.patch (new)       |   54 +
 .../files/mongodb-client-encryption.patch (new)    |   11 +
 .../compass/files/mongodb-compass.desktop (new)    |   12 +
 .../compass/files/mongodb-js-zstd.patch (new)      |  133 ++
 databases/compass/files/napi-cli.patch (new)       |  129 ++
 databases/compass/files/os-dns-native.patch (new)  |   12 +
 .../compass/files/package-additional.list (new)    |    2 +
 databases/compass/files/package-compass.list (new) | 2260 ++++++++++++++++++++
 databases/compass/files/package-confecc.list (new) |    2 +
 databases/compass/files/package-confwcc.list (new) |   25 +
 databases/compass/files/package-fsxattr.list (new) |  104 +
 .../compass/files/package-gypcache.list (new)      |   15 +
 .../compass/files/package-kerberos.list (new)      |  608 ++++++
 .../compass/files/package-mongoclienc.list (new)   |   42 +
 .../compass/files/package-osdnsnative.list (new)   |   13 +
 .../compass/files/package-prebuild.list (new)      |   36 +
 ...igs_webpack-config-compass_src_loaders.ts (new) |   26 +
 .../compass/files/patch-package-lock.json (new)    |  476 +++++
 ...h-packages_compass-e2e-tests_package.json (new) |   20 +
 .../patch-packages_compass_package.json (new)      |   19 +
 .../files/patch-packages_hadron-build_cli.js (new) |   12 +
 ...packages_hadron-build_commands_release.js (new) |   32 +
 ...patch-packages_hadron-build_lib_target.js (new) |   26 +
 .../patch-packages_hadron-build_lib_zip.js (new)   |   14 +
 .../files/patch-scripts_check-docs-link.js (new)   |   13 +
 databases/compass/files/xattr.h (new)              |   40 +
 databases/compass/files/xattr_api.c (new)          |  229 ++
 databases/compass/pkg-descr (new)                  |    4 +
 databases/compass/pkg-plist (new)                  |  176 ++
 35 files changed, 5397 insertions(+)
Comment 15 Mark Linimon freebsd_committer freebsd_triage 2024-08-24 10:52:18 UTC
^Triage: committed 2024-07-23.