This is a FreeBSD port of ArangoDB 3.2.8. ArangoDB is a production ready highly available Multi-Model NoSQL database
Details
- Reviewers
lifanov mat - Group Reviewers
Ports Committers - Commits
- rP454616: new port: databases/arangodb32
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Hi and welcome to FreeBSD!
Please exclude the dot files from this review (.arcconfig, .gitignore, .gitattributes).
Please reorder and space out sections in the main Makefile (https://www.freebsd.org/doc/en/books/porters-handbook/book.html#porting-order).
Please include a pkg-plist with this submission.
Please address inline comments as well.
Usually when adding a new port, you should run "portlint -A" from "portlint" package and make sure that the output is clean.
databases/arangodb32/Makefile | ||
---|---|---|
3 | Please make "32" a suffix. | |
10 | If you make "32" a suffix, GH_ACCOUNT, GH_PROJECT, and GH_TAGNAME variables can go away. | |
13 | The comment needs to be more informative. | |
28 | Try to fix files before they hit STAGEDIR if you can. Also, these can be combined: ${REINPLACE_CMD} -e 's|/usr/local/var/lib|/var/db|g' ${STAGEDIR}/usr/local/etc/arangodb3/*.conf | |
databases/arangodb32/pkg-descr | ||
5 | The website redirects to https://www.arangodb.com/, so please use this for WWW. |
How did you generate pkg-plist? The files listed in it are already relative to LOCALBASE and @dir should only specify directories that are empty.
The "make makeplist" target should generate a pkg-plist close to what you want, so then you need to review it and make any manual changes you need.
I see that this piece of software bundles a few things already available as ports: v8, boost, curl, etc. It is preferable to not rely on bundled dependencies.
There is a summary why bundled libraries are bad here, but this applies to all dependencies in general:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/bundled-libs.html
Is it possible to unbundle some or all of these things?
databases/arangodb32/pkg-descr | ||
---|---|---|
2 | How about this line, taken from Github summary? ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions. |
Could you also try running "make stage-qa" and "make check-orphans" please and make sure these are clean?
====> Running Q/A tests (stage-qa) Warning: port uses /usr/local/var instead of /var
===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%DATADIR%%3/js/server/modules/@arangodb/foxx/legacy/controller.js Error: Orphaned: %%DATADIR%%3/js/server/modules/@arangodb/foxx/legacy/query.js Error: Orphaned: %%DATADIR%%3/js/server/modules/@arangodb/foxx/legacy/swaggerDocs.js Error: Orphaned: @dir share/man/man1 Error: Orphaned: @dir share/man/man8 Error: Orphaned: @dir var/lib/arangodb3 Error: Orphaned: @dir var/lib/arangodb3-apps Error: Orphaned: @dir var/log/arangodb3 ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. *** Error code 1
I had done it manually, it has been a long while since I submitted my previous FreeBSD port, I wasn't aware of these shortcuts, thanks for pointing them out!
I see that this piece of software bundles a few things already available as ports: v8, boost, curl, etc. It is preferable to not rely on bundled dependencies.
There is a summary why bundled libraries are bad here, but this applies to all dependencies in general:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/bundled-libs.htmlIs it possible to unbundle some or all of these things?
Sadly ArangoDB has a very opinionated CMake configuration, it's far from ideal, I know. For instance it links against specific bits of the V8 library that are linked in a different fashion from the FreeBSD V8 port. On the upside all 3rd party dependencies bundled with Arango are statically linked into it so they don't pollute the global namespace.
The only way as far as I can tell to get rid of in-tree dependencies is to rewrite a good chunk of the CMake files. I'd rather get the port up and running and more eyes and testers on it and then work with ArangoDB on making their build system more flexible and FreeBSD friendly.
I can see in the build system that some components are hard to decouple.
Try decoupling what you can, like boost or libcurl.
Other than that, fix the plist and don't compress man pages and we can move on to more testing.
databases/arangodb32/Makefile | ||
---|---|---|
20 | This list is short enough to go on one line. I tested this and I can confirm that bundled v8 doesn't build with ninja. | |
41 | The ports system already compresses man pages on install, so you should not do this. |
There is an inconvenient add_subdirectory(3rdParty) that bundles everything unconditionally, is it OK if we leave that for now while we work with ArangoDB on untangling it?
Other than that, fix the plist and don't compress man pages and we can move on to more testing.
I will submit a new patch shortly that does not explicitly compress man pages. Other than that I think the plist looks good, unless I am missing the obvious (check-plist/check-orphans return successfully).
Thanks!
databases/arangodb32/Makefile | ||
---|---|---|
23 | This should happen earlier, see Chapter 14. Order of Variables in Port Makefiles. |
databases/arangodb32/Makefile | ||
---|---|---|
16 | I found it strange that this needed git to build, so I tried removing it. Turns out it does not need git at all, so you can remove this. It does, however, need Python 2, you'll have to add python:2.7 to the USES line below. | |
21–22 | When using cmake, it us usually better to use the type when setting a variable, it avoids mistakes and typos. Here: -DUSE_JEMALLOC:BOOL=false -DUSE_BACKTRACE:BOOL=true -DBASE_LD_FLAGS:STRING=... |
This looks pretty good, but %%DATADIR%%3 and %%DOCSDIR%%3 in pkg-plist should really be directories.
Can you consider configuring these to match the port name or maybe swithing the portname to arangodb3?
I'm not sure I understand what you mean - should I replace them with the actual final value - e.g. /usr/local/share, or add @dir entries for them to pkg-plist?
As for the renaming bit I was thinking of following the mongodbXY port convention and eventually add an arangodb33 port that is set to conflict with the arangodb32 port. Thoughts?
Thanks!
The directory that gets installed is /usr/local/share/arangodb3, which suggests that PORTNAME should be agangodb3?
There are several other places where arangodb3 name gets used. Example:
: ${arangod_dbpath="/var/db/arangodb3"} : ${arangod_logpath="/var/log/arangodb3"} : ${arangod_apppath="/var/db/arangodb3-apps"}
As for the renaming bit I was thinking of following the mongodbXY port convention and eventually add an arangodb33 port that is set to conflict with the arangodb32 port. Thoughts?
Versioning it like mongodbXY is a good idea in general, but it is useful if the two versions are incompatible or require special upgrade/migration steps (like postgresql).
Another consideration is how long do you expect people to run arangodb 3.2 once 3.3 is realeased.
Thanks!
This doesn't build for me:
/work/stage/usr/local/share/arangodb/js/server/bootstrap/coordinator-database.js CMake Error at cmake_install.cmake:87 (file): file INSTALL cannot find "/usr/home/lifanov/src/svn/freebsd/ports/head/databases/arangodb32/work/.build/var/log/arangodb3". gmake[1]: *** [Makefile:99: install/strip] Error 1
OK, this works now and looks pretty good.
Can you consider making some configuration files @sample?
https://www.freebsd.org/doc/en/books/porters-handbook/book.html#plist-config
There are two steps to it:
- install the file with .sample suffix (like arangod.conf.sample)
- list it with @sample in pkg-plist:
@sample %%ETCDIR%%/arangod.conf.sample
When pkg installs a package with @sample entries, these get copied to the correct location if the files are missing
and then the user can modify the configuration files without causing checksum mismatches and without the files
being clobbered on package update.
I re-tested it and the port looks good now.
Would you like me to commit it?
Is there a Bugzilla issue for it?
Thank you for your help thus far, it's been awesome! If you wouldn't mind committing the port, that would also be great. Here is the Bugzilla issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223240