BSD support #90

merged 3 commits into from May 11, 2012

7 participants


Don't use /bin/bash in the shebang, use /bin/sh (and add a crazy workaround for Solaris' /bin/sh not actually being a POSIX shell).


+1, if it passes b_e


Works ok for us on

uname -mrs
FreeBSD 8.1-RELEASE i386

At least about the shebang script, it looks OK to me.

(I changed it to /usr/local/bin/bash when I tested, but this is not recommended because for FreeBSD bash is only a Port and not with the OS distribution.)


What about using env to locate bash - that is typically how to ensure portability.


For FreeBSD and other BSD-derived OSes, bash is not installed as a part of the distributions. So shebang of #!/usr/bin/env bash does not work anyway.
If there were anything critical in the script needed something only bash could do, the usage of bash would be justified, but I think that's not the case for this pull-request.


True, but the Makefile for the port can just add

RUN_DEPENDS=    bash:${PORTSDIR}/shells/bash

I think adding a bash dependency to the FreeBSD Port Makefile does not solve the fundamental issues of bash dependencies, though it is surely a workaround for the time being. The question is whether we have to require Riak to install bash or not. And not all people want to install Riak from the source code.

FYI, on FreeBSD Port for Erlang (lang/erlang), bash is not a requirement. And I think it shouldn't be.


The bash dependency is pointless and should/will be removed, I just haven't had the time to reverify that the change doesn't break anything.


Confirming a successful build and test using the following port Makefile and patch:

Note the post-build: target, which blanket replaces /bin/bash references with /bin/sh refs with no other modifications.

./riak console output:

All ./riak and ./riak-admin commands seem to work.

The patch in the gist above is for code already committed but didn't make it into 1.1.2 so shouldn't be required in the port for long

Port is based on draco2002 original work at

Only work left is to add a pkg_plist, install /rel/* bits to appropriate system locations and get an RC script in.


+1, tested that everything still works on Solaris, Fedora, Ubuntu

@Vagabond Vagabond merged commit b2d4198 into master May 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment