Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461870 - dev-db/rethinkdb - An open-source distributed [database] system
Summary: dev-db/rethinkdb - An open-source distributed [database] system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Default Assignee for New Packages
URL: http://github.com/rethinkdb/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-15 23:07 UTC by Cameron Tacklind
Modified: 2016-09-04 07:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
initial init.d file (file_461870.txt,1.17 KB, text/plain)
2013-03-15 23:07 UTC, Cameron Tacklind
Details
rethinkdb-1.8.0.ebuild (rethinkdb-1.8.0.ebuild,2.39 KB, text/plain)
2013-08-18 13:40 UTC, Erich Seifert
Details
rethinkdb-1.8.0.ebuild (rethinkdb-1.8.0.ebuild,3.62 KB, text/plain)
2013-08-18 19:07 UTC, Erich Seifert
Details
rethinkdb-1.8.1.ebuild (rethinkdb-1.8.1.ebuild,3.42 KB, text/plain)
2013-08-27 14:08 UTC, Erich Seifert
Details
rethinkdb-1.8.1.ebuild (rethinkdb-1.8.1.ebuild,3.43 KB, text/plain)
2013-09-05 10:06 UTC, Erich Seifert
Details
rethinkdb-1.9.0.ebuild (rethinkdb-1.9.0.ebuild,3.42 KB, text/plain)
2013-09-11 18:51 UTC, Erich Seifert
Details
rethinkdb-1.10.0.ebuild (rethinkdb-1.10.0.ebuild,3.64 KB, text/plain)
2013-10-01 14:03 UTC, Erich Seifert
Details
rethinkdb-1.11.0.ebuild (rethinkdb-1.11.0.ebuild,3.70 KB, text/plain)
2013-11-27 03:17 UTC, Erich Seifert
Details
ebuild that builds v8 'n stuff. (rethinkdb-1.11.3.ebuild,3.46 KB, text/plain)
2014-07-24 05:39 UTC, Patrick Lauer
Details
ebuild for rethinkdb-1.13.3 (rethinkdb-1.13.3.ebuild,1.15 KB, text/plain)
2014-08-04 06:37 UTC, Wang Bin
Details
rethinkdb-1.15.0_p1.ebuild (rethinkdb-1.15.0_p1.ebuild,3.45 KB, text/plain)
2014-09-26 17:22 UTC, Erich Seifert
Details
rethinkdb-1.15.0_p1.ebuild (rethinkdb-1.15.0_p1.ebuild,3.47 KB, text/plain)
2014-09-26 17:52 UTC, Erich Seifert
Details
rethinkdb.service (rethinkdb.service,261 bytes, text/plain)
2014-09-27 19:06 UTC, Erich Seifert
Details
rethinkdb.tmpfilesd (rethinkdb.tmpfilesd,43 bytes, text/plain)
2014-09-27 19:07 UTC, Erich Seifert
Details
rethinkdb-1.15.0_p1.ebuild (rethinkdb-1.15.0_p1.ebuild,3.48 KB, text/plain)
2014-09-27 19:12 UTC, Erich Seifert
Details
rethinkdb-1.16.0_p1.ebuild (rethinkdb-1.16.0_p1.ebuild,3.77 KB, text/plain)
2015-02-05 15:34 UTC, Erich Seifert
Details
ebuild for rethinkdb-2.0.0-1 (rethinkdb-2.0.0_p1.ebuild,3.71 KB, text/plain)
2015-04-16 02:46 UTC, Wang Bin
Details
rethinkdb-2.0.2.ebuild (rethinkdb-2.0.2.ebuild,3.73 KB, text/plain)
2015-06-09 15:54 UTC, Ilya Semenov
Details
rethinkdb-2.1.1.ebuild (rethinkdb-2.1.1.ebuild,3.72 KB, text/plain)
2015-08-15 14:04 UTC, Erich Seifert
Details
rethinkdb-2.2.5.ebuild (rethinkdb-2.2.5.ebuild,3.72 KB, text/plain)
2016-03-28 12:27 UTC, Erich Seifert
Details
rethinkdb-2.2.5.ebuild (rethinkdb-2.2.5.ebuild,3.71 KB, text/plain)
2016-03-28 14:56 UTC, Erich Seifert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Tacklind 2013-03-15 23:07:50 UTC
Created attachment 342186 [details]
initial init.d file

Rethinkdb is a very cool new database server. I would love to see an ebuild for it. In lieu of writing one immediately, I'm posting build/install instructions for gentoo with the hope that someone may pickup the torch. If I find the time, I will. I have an init.d already. (Yes, I know bugzilla doesn't use markdown...)

# Java currently required for build. This dep is going away soon.

emerge -uq virtual/jre

# Ensure node.js (and v8, which is not always a node.js dep) is installed.

emerge net-libs/nodejs dev-lang/v8 -uq

# 3 node packages are required. It is likely possible to build with these installed non-globally.

npm install -g less
npm install -g handlebars
## Apparently 1.5, 1.6 and 1.6.1 all ship with a bug that breaks things. This bug has been fixed in master, but not pushed to npm.
npm install -g coffee-script@1.4

# Static deps

## Rethink recommends statically linking a number of core libraries. It is possible to run `./configure` with `--static none` to remove this requirement.

echo dev-libs/protobuf static-libs >> /etc/portage/package.use
echo dev-util/google-perftools static-libs >> /etc/portage/package.use

### <dev-util/google-perftools-2 does not support static-libs. Unstable version 2.0 that supports USE="static-libs"
echo dev-util/google-perftools ~amd64 >> /etc/portage/package.keywords

emerge dev-libs/protobuf-c dev-util/google-perftools dev-libs/boost -uq

# Build

git clone git://github.com/rethinkdb/rethinkdb
cd rethinkdb

## If using recommended static libs:
./configure

## If static libs are undesired:
./configure --static none

make -j4

# Install

export BINDIR=/usr/bin
export WEBDIR=/usr/share/rethinkdb_web_assets
export DB_DIR=/var/lib/rethinkdb

## Don't forget sudo

cp build/release/rethinkdb ${BINDIR}/
cp -r build/release/rethinkdb_web_assets ${WEBDIR}

# Initial database setup (should be run during `emerge --config ...`)

## Run as user that will run daemon or fix premissions manually after

${BINDIR}/rethinkdb create --directory ${DB_DIR}

# Run manually

${BINDIR}/rethinkdb serve --directory ${DB_DIR}

# Init.d script

I've written a simple init.d script that picks sensible defaults if they are unset in the associated conf.d.

Currently, the only requirement before running is to create a log file with appropriate permissions:

```
export LOG=/var/log/rethinkdb.log

touch ${LOG}
chown rethinkdb: ${LOG}
```

However, if someone implemented #454914, this would be unnecessary.

# Migration from older versions

This is outside of the scope of this post. More info: http://github.com/rethinkdb/rethinkdb/tree/next/scripts/migration
Comment 1 Erich Seifert 2013-08-18 13:40:23 UTC
Created attachment 356370 [details]
rethinkdb-1.8.0.ebuild

Here's the ebuild for RethinkDB 1.8.0 and its Python driver module I'm using at the moment:
- Support for Ruby and JavaScript drivers is still missing. Ruby support would require a new ebuild for ruby_protobuf.
- There's no pkg_config step yet, so new databases have to be created manually.
- The ebuild uses the init.d script shipped with RethinkDB, which should probably be replaced.
Comment 2 Erich Seifert 2013-08-18 19:07:04 UTC
Created attachment 356392 [details]
rethinkdb-1.8.0.ebuild

Revised ebuild with pkg_config step to create a new instance via emerge --config rethinkdb
Comment 3 Erich Seifert 2013-08-27 14:08:31 UTC
Created attachment 357166 [details]
rethinkdb-1.8.1.ebuild

Updated ebuild for RethinkDB 1.8.1
Comment 4 Erich Seifert 2013-09-05 10:06:33 UTC
Created attachment 357904 [details]
rethinkdb-1.8.1.ebuild

Removed Java dependency from ebuild; it's not required to build RethinkDB >= 1.8.0
Comment 5 Erich Seifert 2013-09-11 18:51:21 UTC
Created attachment 358486 [details]
rethinkdb-1.9.0.ebuild

- Removed dependency on static libraries
- Updated to version 1.9.0
Comment 6 Erich Seifert 2013-10-01 14:03:42 UTC
Created attachment 359882 [details]
rethinkdb-1.10.0.ebuild

Version bump to RethinkDB 1.10.0:
- New dependency on sys-libs/ncurses (using sed to replace termcap by ncurses)
- Ebuild: Fixed usage of wrong path in config step
Comment 7 Erich Seifert 2013-11-27 03:17:05 UTC
Created attachment 364048 [details]
rethinkdb-1.11.0.ebuild

Version bump to RethinkDB 1.11.0:
- DEPENDENCIES file was removed from package
- Still depends on dev-lang/v8 (I'm not sure how to bundle v8 yet; see announcement of phasing it out as a shared lib)
Comment 8 Johan Bergström 2014-01-30 00:02:40 UTC
Why replace termcap with ncurses? The init script needs some love and should probably check/create that log file.
Comment 9 Erich Seifert 2014-01-30 12:25:48 UTC
As far as I can tell, termcap was removed from portage long time ago because it's unmaintained and there's no ebuild for it. ncurses provides support for the same functionality and was used as an alternative. It's also used by RethinkDB when building the Debian package. However, suggestions are welcome.
Comment 10 Johan Bergström 2014-02-26 10:16:14 UTC
Eric: Thanks for the recap. I thought I'd give this a go shortly. Hopefully I can find someone to proxy it for me/you/us as well.
Comment 11 Johan Bergström 2014-03-03 01:54:05 UTC
So, not having dev-lang/v8 in tree anymore will make this ebuild have to jump through hoops. Suggestions?
Comment 12 Patrick Lauer gentoo-dev 2014-07-24 05:39:44 UTC
Created attachment 381480 [details]
ebuild that builds v8 'n stuff.

A horrible hackery that doesn't fully work
Comment 13 Wang Bin 2014-08-04 06:37:04 UTC
Created attachment 382214 [details]
ebuild for rethinkdb-1.13.3

rethinkdb supported fetch v8 itself during configuration, I have successfully installed on my amd64 box, please check.
Comment 14 Wang Bin 2014-08-07 06:28:36 UTC
Etienne Laurin (@atnnn) told me from twitter:

"Since RethinkDB 1.13, v8 is bundled in the tgz. The --fetch v8 and --static v8 flags are not necessary."

I have tesed on my amd64 desktop, it emerged successfully, hope this will help.
Comment 15 Erich Seifert 2014-09-26 17:22:55 UTC
Created attachment 385552 [details]
rethinkdb-1.15.0_p1.ebuild

I updated my version of the ebuild to RethinkDB 1.15.0-1:

- Removed the ncurses patches from the ebuild because it's handled by RethingDB's build system now
- Added Python 3.3 and 3.4 slots for the Python driver
- Added stub comments for installation of systemd service files
- Stripped all Ruby stub comments
Comment 16 Erich Seifert 2014-09-26 17:52:37 UTC
Created attachment 385556 [details]
rethinkdb-1.15.0_p1.ebuild

RethinkDB 1.15.0-1:

- Added missing dependency on net-misc/curl
Comment 17 Erich Seifert 2014-09-27 19:06:56 UTC
Created attachment 385616 [details]
rethinkdb.service

systemd service file for RethinkDB
Comment 18 Erich Seifert 2014-09-27 19:07:47 UTC
Created attachment 385618 [details]
rethinkdb.tmpfilesd

systemd tmpfiles.d description for RethinkDB
Comment 19 Erich Seifert 2014-09-27 19:12:22 UTC
Created attachment 385622 [details]
rethinkdb-1.15.0_p1.ebuild

Updated ebuild for RethinkDB 1.15.0-1:
- systemd support. To start "mydb" instance: systemctl start rethinkdb@mydb
Comment 20 Erich Seifert 2015-02-05 15:34:24 UTC
Created attachment 395612 [details]
rethinkdb-1.16.0_p1.ebuild

Updated ebuild for RethinkDB 1.16.0-1:
- Added USE flags for different malloc implementations. Although not RethinkDB's default for Linux system malloc is used (for me this is the only implementation that let's RethinkDB compile correctly at the moment—needs more investigation)
- Added USE flags for docs
Comment 21 Wang Bin 2015-04-16 02:46:37 UTC
Created attachment 401298 [details]
ebuild for rethinkdb-2.0.0-1
Comment 22 Wang Bin 2015-04-16 02:54:47 UTC
Rethinkdb 2.0.0 was released on April 14, I have successfully installed on my amd64 desktop, the ebuild is based on Erich Seifert's 1.16.0 ebuild, with tiny modification:

 - Bash completion was removed in version 2.0.0, see https://github.com/rethinkdb/rethinkdb/issues/719

 - When compile with jemalloc, static-libs USE flag is required, https://github.com/rethinkdb/rethinkdb/issues/3741
Comment 23 Ilya Semenov 2015-06-09 15:54:08 UTC
Created attachment 404826 [details]
rethinkdb-2.0.2.ebuild

I tried to install rethinkdb 2.0.2 using the latest attached ebuild, but it failed with this error:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-db/rethinkdb-2.0.2/work/rethinkdb-2.0.2/build/external/icu_54.1/lib/libicuuc.a(putil.ao): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/lib64/libdl.so.2: error adding symbols: DSO missing from command line

I had to add LDFLAGS="-ld" to conf_opts to overcome this. Of course this is most probably not the proper way to fix it.
Comment 24 Erich Seifert 2015-08-15 14:04:56 UTC
Created attachment 409078 [details]
rethinkdb-2.1.1.ebuild

Version bump to RethinkDB 2.1.1. I didn't include the LDFLAGS workaround by Ilya because it compiles fine here without it.
Comment 25 Erich Seifert 2016-03-28 12:27:33 UTC
Created attachment 429166 [details]
rethinkdb-2.2.5.ebuild

Version bump to RethinkDB 2.2.5
Comment 26 Erich Seifert 2016-03-28 14:56:52 UTC
Created attachment 429180 [details]
rethinkdb-2.2.5.ebuild

Fixed a few QA warnings in the previous ebuild.
Comment 27 Erich Seifert 2016-09-03 18:16:29 UTC
dev-db/rethinkdb and dev-python/python-rethinkdb are in the portage tree now: http://www.ultrabug.fr/rethinkdb-on-gentoo-linux/
Comment 28 Ultrabug gentoo-dev 2016-09-04 07:23:44 UTC
Thanks everyone for your patience and help, I'm glad it's finally in tree ;)