JSON document database with HTTP API & scalable multi-master sync
Details
- Reviewers
jrm swills - Commits
- rP480279: databases/couchdb2: new port via PR#218844
- permits running couchdb 1.7.x and couchdb 2.x concurrently to support migrations
- improved first-run walk through
- no explicit dependencies on OTP version in port anymore
- provides a knob for switching Erlang/OTP releases at build time
- includes all inline documentation and fauxton for the moment
- manual testing including user creation and couch verify suite on
- poudriere bulk -t on 10.4, 11.1, 11.2 on amd64/i386 & 12.0-alpha1 amd64 OK
Diff Detail
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 18988 Build 18626: arc lint + arc unit
Event Timeline
poudriere testport warnings:
Warning: 'libexec/couchdb2/bin/couchjs' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'libexec/couchdb2/lib/khash-1.0.1/priv/khash.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP _CMD} Warning: 'libexec/couchdb2/lib/hyper-1.0/priv/hyper_carray.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${ STRIP_CMD} Warning: 'libexec/couchdb2/lib/couch-2.2.0/priv/couch_ejson_compare.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'libexec/couchdb2/lib/couch-2.2.0/priv/couch_icu_driver.so' is not stripped consider trying INSTALL_TARGET=install-strip or us ing ${STRIP_CMD} Warning: 'libexec/couchdb2/lib/couch-2.2.0/priv/couchjs' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_ CMD} Warning: 'libexec/couchdb2/lib/jiffy-0.14.11/priv/jiffy.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STR IP_CMD} Warning: 'libexec/couchdb2/lib/b64url-1.0.1/priv/b64url.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STR IP_CMD} Warning: 'libexec/couchdb2/lib/snappy-1.0.5/priv/snappy_nif.so' is not stripped consider trying INSTALL_TARGET=install-strip or using $ {STRIP_CMD}
databases/couchdb2/Makefile | ||
---|---|---|
23–24 | USES and USE_x block needs to move up to conform to Order of Variables in Port Makefiles in PH. | |
26–29 | These belong in the The Rest of the Variables block according to the PH. | |
81 | -f is already part of ${RM} |
databases/couchdb2/Makefile | ||
---|---|---|
16 | There is no rebar in the base system, so remove ${LOCALBASE}/bin/. | |
43–44 | OPTIONS_DEFAULT should be first. | |
59 | This should be post-patch. | |
71 | No need for the / here. | |
85 | Not sure why this change is needed, you have other occurrences of couchdb2 in the port, this one is no special. |
databases/couchdb2/Makefile | ||
---|---|---|
59 | done - but why is this better? |
- polish and reorder Makefile
- strip .so and binaries
- remove surplus duplicate files from distribution
How are you creating your revisions? On your feature branch are you doing arc diff --create master? I am not able to arc patch to test.
% arc patch D16819 INFO Base commit is not in local repository; trying to fetch. Created and checked out branch arcpatch-D16819. This diff is against commit ddb043f91328c0cc3101a1a98ad096fa408c7377, but the commit is nowhere in the working copy. Try to apply it against the current working copy state? (c7d35e8d90fc640e0c490652112cc5f60022c624) [Y/n] Checking patch databases/couchdb2/pkg-plist... error: databases/couchdb2/pkg-plist: does not exist in index Checking patch databases/couchdb2/files/pkg-message.in... error: databases/couchdb2/files/pkg-message.in: does not exist in index Checking patch databases/couchdb2/Makefile... error: databases/couchdb2/Makefile: does not exist in index Patch Failed! Usage Exception: Unable to apply patch!
seems the last patch is missing the intermediary commits. Here's a full diff via arc diff --preview --base git:upstream/master
databases/couchdb2/Makefile | ||
---|---|---|
32 | I think this qualifies under Keep related variables close together. For example, if using USE_GITHUB, always put the GH_* variables right after it. | |
55 | I think this qualifies under Keep related variables close together. For example, if using USE_GITHUB, always put the GH_* variables right after it. | |
95–97 | They are still not being stripped. Maybe this? | |
98 | @${MKDIR}.... mkdir is an exception that can be silenced here. |
databases/couchdb2/Makefile | ||
---|---|---|
55 | Now I'm confused. Last diff I understood these all needed to be moved down to the bottom. Its awkward in phab to see where you want to move those back to - where would that end up? back below USES? Lets see if the next diff gets it right. | |
95–97 | aaah I have STRIP= in my poudriere make.conf which is needed for dtrace support in erlang.. after wrapping that in a if .CURDIR.. endif I see these failures too during stage-qa, and my regex needs tweaking too. BTW is there a command to tell if a given binary hasn't been stripped (outside ports framework)? |
databases/couchdb2/Makefile | ||
---|---|---|
35 | shouldn-t docs be enabled by a DOCS option? | |
59 | It has nothing to do with better, it is semantically wrong. You are patching the file, which should always happen in the patch phase. The pre-configure target is in the configure phase, when you run commands to prepare the configuration, like re-generating a configure script, or whatever. | |
95 | Wouldn't -name '*.so' be enough? Are there any other .so files in there that, for some reason should not be stripped? | |
96 | -exec ${STRIP_CMD} {} + | |
98 | Extra $ at the end? |
databases/couchdb2/Makefile | ||
---|---|---|
22–25 | My interpretation of Chapter 15 of the PH, and specifically Start this section with defining USES, and then possible USE_x. Keep related variables close together. For example, if using USE_GITHUB, always put the GH_* variables right after it. is USES= cpe gmake libtool ncurses python:run shebangfix CPE_VENDOR= apache SHEBANG_FILES= rel/overlay/bin/couchup USE_RC_SUBR= couchdb2 but, to me, this is all small potatoes. @mat probably wrote that chapter, so maybe he can clarify. |
databases/couchdb2/Makefile | ||
---|---|---|
22–25 | Yeah, does not really matter. You can also add blank lines to let it breath a bit and be more readable. |
I've been messing around with DOCS option, I'm not at all sure if this is
correct nor working properly when DOCS knob is off vs on, but it does
at least "work" functionally at present via:
http://localhost:5984/_utils/docs/index.html
Couch actually serves up its documentation set directly from:
/usr/local/share/couchdb2/www/docs/*
It's also feasible to softlink that from /usr/local/share/doc/couchdb2
What's the best approach here?
databases/couchdb2/Makefile | ||
---|---|---|
35 | I need to look a bit more into this, might be tomorrow. I'm not sure whether my current patch is actually doing what I expected it to. Am I correct that running make DOCS= ... and make DOCS=1 ... is sufficient to test these options? Or is there a better way? | |
46–47 | I'd expected that OTP*_RUN_DEPENDS will have the OTP*_ part stripped, and then needs to be appended to the existing RUN_DEPENDS from earlier in the Makefile that includes the py-requests? | |
92 | It's going to WRKSRC, not STAGEDIR, and gets installed later. I don't think this needs changing. |
databases/couchdb2/Makefile | ||
---|---|---|
35 | I have no idea how that software works, or how to enable the building of the documentation in it, so I could not say how to hook it up in the port. | |
46–47 | I am not sure what you are saying. You use += when you are appending to a variable. Here, the variable does not exist before, so you do not need to append to it. | |
92 | Right, missed that bit. |
Working html DOCS install from perspective of couchdb2 user/admin however
I'm still not getting this to work correctly with PORTDOCS though
databases/couchdb2/pkg-plist | ||
---|---|---|
486–488 | This is wrong, it should be %%PORTDOCS%%. |
databases/couchdb2/pkg-plist | ||
---|---|---|
486–488 | per IRC the magical missing OPTIONS_DEFINE= DOCS was what was missing. grrr. |
PORTDOCS now seems to work as desired
poudriere bulk -t is happy on 10.4,11.1,11.2 amd64/i386 & 12.0a1 amd64
The layout of the HTML/WWW is confusing. Shouldn't we install DOCS to ${DOCSDIR} and not DATADIR? Should we install ${WRKSRC}/share/www to ${WWWDIR}?
databases/couchdb2: fix all the things
- sort SUB_LIST
- bump OTP releases
- use WWWDIR for runtime UI and also optional docs
- add inet6 http client support 1-liner from upstream
- placate portlint 2.18.4
I think this is ready to land now, I'll do the poudriere thing and report back if anything breaks.
databases/couchdb2/Makefile | ||
---|---|---|
22–25 | latest portlint doesn't like this; I've done this instead: USES= USE_RC_SUBR= CPE_VENDOR= SHEBANG_FILES= |
databases/couchdb2/Makefile | ||
---|---|---|
71 | BTW I've marked this as /done/ as the / is needed here, I assume its the final slash you referred to @mat ? make -V WRKDIR /tmp/usr/ports/databases/couchdb2/work ... make package ===> License APACHE20 BSD3CLAUSE ISCL WTFPL OFL11 accepted by the user ===> couchdb2-2.2.0 depends on file: /usr/local/sbin/pkg - found => apache-couchdb-2.2.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch https://www.apache.org/dist/couchdb/source/2.2.0/apache-couchdb-2.2.0.tar.gz apache-couchdb-2.2.0.tar.gz 16 MB 1472 kBps 11s ===> Fetching all distfiles required by couchdb2-2.2.0 for building ===> Extracting for couchdb2-2.2.0 => SHA256 Checksum OK for apache-couchdb-2.2.0.tar.gz. ===> Patching for couchdb2-2.2.0 ===> Applying FreeBSD patches for couchdb2-2.2.0 sed: /tmp/usr/ports/databases/couchdb2/work/apache-couchdb-2.2.0configure: No such file or directory *** Error code 1 |