Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rethinkdb: 2.3.6 -> 2.4.0, fix #87828

Merged
merged 3 commits into from Aug 21, 2020
Merged

rethinkdb: 2.3.6 -> 2.4.0, fix #87828

merged 3 commits into from Aug 21, 2020

Conversation

matthias-t
Copy link
Contributor

@matthias-t matthias-t commented May 14, 2020

Motivation for this change

The rethinkdb package for the RethinkDB database server fails to build and is marked as broken. The python2.pkgs.rethinkdb package for the python client errors because of a missing dependency. This fixes the two packages. Please see the commit messages for details.

Also, I changed the license meta fields as the codebase was relicensed to Apache 2.0 after ownership was transferred to the Linux foundation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@matthias-t matthias-t changed the title Fix RethinkDB build rethinkdb: 2.3.6 -> 2.4.0, fix May 21, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/164

@matthias-t matthias-t mentioned this pull request May 26, 2020
10 tasks
pkgs/development/python-modules/rethinkdb/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/rethinkdb/default.nix Outdated Show resolved Hide resolved
sha256 = "05nagixlwnq3x7441fhll5vs70pxppbsciw8qjqp660bdb5m4jm1";
})
];
patches = [ ./v8-no-snapshot.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind adding a comment about why this patch is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that suffice? I'm not certain how exactly RethinkDB uses V8 or why the snapshots segfault. When I removed the failing patch, which originally disabled V8 snapshots, I noticed that making V8 snapshots would still segfault the build, so I adapted it for the most recent version of RethinkDB, upon which the build succeeded. But I'm unsure I understand what's going on. The commit message of the original patch is "Workaround for building V8 with GCC 6.2".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could ask @pbogdan? 26ebbac

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated PR mentions this issue upstream rethinkdb/rethinkdb#5757, which was closed with mandating CXX=clang++.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this builds perfectly using clangStdenv, so the latest commit switches to that. Let me know if for some reason you prefer using GCC with the patch.

@matthias-t matthias-t force-pushed the rethinkdb branch 2 times, most recently from 4066837 to ecf94fc Compare May 29, 2020 10:07
@ghost
Copy link

ghost commented Aug 20, 2020

Is there anything blocking this PR ? Would be nice to have rethinkdb back for the 20.09 ?

@jonringer
Copy link
Contributor

Is there anything blocking this PR ? Would be nice to have rethinkdb back for the 20.09 ?

It's at 2.4.7 in staging

[06:20:45] jon@jon-desktop /home/jon/projects/nixpkgs (staging)
$ nix-build -A python3Packages.rethinkdb
these paths will be fetched (0.19 MiB download, 1.06 MiB unpacked):
  /nix/store/n4v4gpql8jyan744ag96vsmrdcvvrln5-python3.8-rethinkdb-2.4.7
copying path '/nix/store/n4v4gpql8jyan744ag96vsmrdcvvrln5-python3.8-rethinkdb-2.4.7' from 'https://cache.nixos.org'...
/nix/store/n4v4gpql8jyan744ag96vsmrdcvvrln5-python3.8-rethinkdb-2.4.7

@jonringer
Copy link
Contributor

closing PR

@jonringer jonringer closed this Aug 21, 2020
@matthias-t
Copy link
Contributor Author

matthias-t commented Aug 21, 2020

The python package is only the client.

@ghost
Copy link

ghost commented Aug 21, 2020

@jonringer I believe @matthias-t is right and the one in staging you're referring to is indeed the client.

@jonringer jonringer reopened this Aug 21, 2020
@jonringer
Copy link
Contributor

I apologize, just looked at the conflicts.

If you wouldn't mind updating the other package, I will review it.

Add missing dependency on `setuptools`, reflect changed license.
Update patch that prevents making V8 snapshots, as those segfault.

Fix build by building only the database server. Other make targets fetch
dependencies at build time and this behaviour cannot be overriden.
Therefore, the clients and web interface are no longer built. See
rethinkdb/rethinkdb#6867.
@matthias-t
Copy link
Contributor Author

@jonringer okay, I'm done.

And remove patch working around a GCC bug.
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind squashing the two rethinkdb commits?

I see both of them as being a "fix"

pkgs/servers/nosql/rethinkdb/default.nix Show resolved Hide resolved
@matthias-t
Copy link
Contributor Author

matthias-t commented Aug 21, 2020

The first commit introduces a patch to make the server compile using GCC which is deleted again in the second commit. It seems reasonable to me to keep it in the history in case we have to switch back or someone wants to build with GCC for some other reason.

@jonringer
Copy link
Contributor

jonringer commented Aug 21, 2020

The first commit introduces a patch to make the server compile using GCC which is deleted again in the second commit. It seems reasonable to me to keep it in the history in case we have to switch back or someone wants to build with GCC for some other reason.

I guess that could be useful in cases with git bisect

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 87828 1

4 packages built:
- python27Packages.rethinkdb
- python37Packages.rethinkdb
- python38Packages.rethinkdb
- rethinkdb

@jonringer jonringer merged commit 9b2769b into NixOS:master Aug 21, 2020
@matthias-t matthias-t deleted the rethinkdb branch August 22, 2020 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants