[ANN] membase homebrew forumla

32 views
Skip to first unread message

Jesse Newland

unread,
Aug 17, 2010, 5:19:59 PM8/17/10
to membase
I've been hacking on a membase homebrew [1] formula off and on for the
past few weeks, and finally have something that's largely workable:

http://github.com/jnewland/homebrew/blob/membase/Library/Formula/membase.rb

If you're unfamiliar with homebrew, it's a simple OS X package
management system written in Ruby. Having an easy way to install
membase on OS X was critical for us, as our entire dev team uses OS X
and needs a local copy of membase running for development.

If any of you are running on OS X and using membase, I'd appreciate it
you could give this forumla a try before I submit it for inclusion in
homebrew proper. You can pull from my fork and install membase via
homebrew like so:

gem install hub
cd `brew --prefix`
hub pull jnewland membase
brew install membase

Please let me know if you run into any problems with this, or have any
suggestions! One known kludge is the installation of the python
management scripts outside of PATH [2]. I don't have a ton of Python
experience, so if any Pythonistas out there have suggestions for how
to properly install these, please chime in!

1: http://github.com/mxcl/homebrew
2: http://github.com/jnewland/homebrew/blob/membase/Library/Formula/membase.rb#L133-136

- Jesse

---
Jesse Newland
jnew...@gmail.com
http://twitter.com/jnewland

Paul

unread,
Aug 18, 2010, 6:31:11 PM8/18/10
to membase
Jesse is a rockstar.

That is all.

- Paul

On Aug 17, 4:19 pm, Jesse Newland <jnewl...@gmail.com> wrote:
> I've been hacking on a membase homebrew [1] formula off and on for the
> past few weeks, and finally have something that's largely workable:
>
> http://github.com/jnewland/homebrew/blob/membase/Library/Formula/memb...
>
> If you're unfamiliar with homebrew, it's a simple OS X package
> management system written in Ruby. Having an easy way to install
> membase on OS X was critical for us, as our entire dev team uses OS X
> and needs a local copy of membase running for development.
>
> If any of you are running on OS X and using membase, I'd appreciate it
> you could give this forumla a try before I submit it for inclusion in
> homebrew proper. You can pull from my fork and install membase via
> homebrew like so:
>
>     gem install hub
>     cd `brew --prefix`
>     hub pull jnewland membase
>     brew install membase
>
> Please let me know if you run into any problems with this, or have any
> suggestions! One known kludge is the installation of the python
> management scripts outside of PATH [2]. I don't have a ton of Python
> experience, so if any Pythonistas out there have suggestions for how
> to properly install these, please chime in!
>
> 1:http://github.com/mxcl/homebrew
> 2:http://github.com/jnewland/homebrew/blob/membase/Library/Formula/memb...
>
> - Jesse
>
> ---
> Jesse Newland
> jnewl...@gmail.comhttp://twitter.com/jnewland

Geoffrey Dagley

unread,
Aug 19, 2010, 2:16:10 AM8/19/10
to membase
I had problems with the hub gem, so I ended up just adding the remote
repository and checking out the membase branch.

cd `brew --prefix`
git remote add -f jnewland git://github.com/jnewland/homebrew.git
git checkout membase
brew install membase

It then complained about needing to install a sprockets gem:

gem install sprockets

Another attempt at installing membase:

brew install membase

I got a complaint that the existing memcached I had installed would
conflict. Is it possible to move this check to the beginning? It took
a while to download and install everything, then I got this warning
and had to restart the 'brew install membase' It went faster the
second time, of course.

brew uninstall memcached
brew uninstall moxi

brew install membase

Complete! Awesome!

ns_server

I am up and running!!!

Just to make sure I am using the right brew scripts.

cd `brew --prefix`
git co master


Thanks Jesse.

On Aug 17, 4:19 pm, Jesse Newland <jnewl...@gmail.com> wrote:
> I've been hacking on a membase homebrew [1] formula off and on for the
> past few weeks, and finally have something that's largely workable:
>
> http://github.com/jnewland/homebrew/blob/membase/Library/Formula/memb...
>
> If you're unfamiliar with homebrew, it's a simple OS X package
> management system written in Ruby. Having an easy way to install
> membase on OS X was critical for us, as our entire dev team uses OS X
> and needs a local copy of membase running for development.
>
> If any of you are running on OS X and using membase, I'd appreciate it
> you could give this forumla a try before I submit it for inclusion in
> homebrew proper. You can pull from my fork and install membase via
> homebrew like so:
>
>     gem install hub
>     cd `brew --prefix`
>     hub pull jnewland membase
>     brew install membase
>
> Please let me know if you run into any problems with this, or have any
> suggestions! One known kludge is the installation of the python
> management scripts outside of PATH [2]. I don't have a ton of Python
> experience, so if any Pythonistas out there have suggestions for how
> to properly install these, please chime in!
>
> 1:http://github.com/mxcl/homebrew
> 2:http://github.com/jnewland/homebrew/blob/membase/Library/Formula/memb...
>
> - Jesse
>
> ---
> Jesse Newland
> jnewl...@gmail.comhttp://twitter.com/jnewland

James Phillips - Personal

unread,
Aug 19, 2010, 2:29:35 AM8/19/10
to mem...@googlegroups.com
this is awesome. would be cool to highlight this on the membase.org wiki.

Dustin

unread,
Aug 19, 2010, 2:45:45 AM8/19/10
to membase

I've been a bit slow to respond to this -- I tried it right when you
announced it. My response would've looked almost exactly as below
(eerily the same, I just didn't do the -f on the remote add and I
already had sprockets).

For whatever reason, 'hub' doesn't get installed for me anywhere. I
think the gem must just be broken. That, of course, doesn't matter
once it's pushed up to mainline.

Thanks so much for getting this going.

Matt Ingenthron

unread,
Aug 19, 2010, 3:59:14 AM8/19/10
to mem...@googlegroups.com
Hi Jesse,

This is excellent! Thanks so much for the effort.

Like the others, I had hub issues, but it otherwise worked well.

We want to migrate to more common .tar.gz distributions of the
components, rather than the big tarball. I think in that case, it
becomes something of a meta-brew-package? The components are the same
and the build args are the same, but it'd be a few different pieces.

I'm new to brew, so pardon me if it's a basic question.

Thanks,

- Matt


--
Matt Ingenthron
Software Engineer - NorthScale

Jesse Newland

unread,
Aug 19, 2010, 5:08:23 AM8/19/10
to membase
Thanks! Glad everyone was able to get this working, and sorry for the
hub confusion. I should have figured this was a git savvy crowd
anyway :).

The only thing I'd like to complete before submitting this to homebrew
proper is a launchd plist to make it possible to run ns_server in the
background and at startup. I should be able to get that going today
and submit a ticket for inclusion. Please let me know if anyone thinks
there are any other blockers!

A couple responses inline below:

On Aug 19, 2:16 am, Geoffrey Dagley <gdag...@gmail.com> wrote:
> I got a complaint that the existing memcached I had installed would
> conflict.  Is it possible to move this check to the beginning? It took
> a while to download and install everything, then I got this warning
> and had to restart the 'brew install membase'  It went faster the
> second time, of course.

This is as close to the beginning as it can be with brew right now. I
thought about writing a conflicts_with class method - basically the
opposite of depends_on - that would be processed at the same early
stage, but that's for another mailing list :).

On Aug 19, 3:59 am, Matt Ingenthron <m...@northscale.com> wrote:
> We want to migrate to more common .tar.gz distributions of the
> components, rather than the big tarball.  I think in that case, it
> becomes something of a meta-brew-package?  The components are the same
> and the build args are the same, but it'd be a few different pieces.

Yeah, it'll then become separate homebrew forumla for the individual
components, then one meta-forumla for membase that will depend on all
components and install the ns_server ebins and wrapper scripts. This
will require either updating the existing moxi and memcached forumla
to versions compatible with membase or providing temporary
membase_moxi and membase_memcached forumla until those are considered
stable. Until these new versions of memcached / moxi are considered
stable, I'll probably go with the membase_* approach. Please let me
know when you have tarballs in this style, and I'll get hackin'.

andreacfm

unread,
Aug 30, 2010, 4:28:00 AM8/30/10
to membase
Hi,

when homebrew attemp to install ns_server I get this error:

test -d ./tmp || mkdir ./tmp
(cd deps/menelaus && make all)
(cd deps/gen_smtp && make ebins)
git describe | sed s/-/_/g > ./tmp/version_num.tmp
test -d ebin || mkdir ebin
test -d deps/mochiweb/ebin || mkdir deps/mochiweb/ebin
erl -noinput +B -eval 'case make:all() of up_to_date -> halt(0);
error -> halt(1) end.'
(cd deps/mochiweb; make)
mkdir -p `dirname priv/public/js/all.js`
erl -make
`which sprocketize` -I priv/js priv/js/app.js >priv/public/js/all.js
/bin/sh: -I: command not found
make[1]: *** [priv/public/js/all.js] Error 127
make[1]: *** Waiting for unfinished jobs....
fatal: Not a git repository (or any of the parent directories): .git
test -d ebin || mkdir ebin
sed s/0.0.0/`cat ./tmp/version_num.tmp`/g src/ns_server.app.src > ebin/
ns_server.app
test -d ebin || mkdir ebin
erl -noinput +B -pa ./ebin ./deps/*/ebin ./deps/*/deps/*/ebin -eval
'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'


Any suggestion?

Andrea
> jnewl...@gmail.comhttp://twitter.com/jnewland

JD Maturen

unread,
Sep 1, 2010, 3:28:13 AM9/1/10
to mem...@googlegroups.com
Diff for 1.6.0beta3 http://gist.github.com/560361 wfm, ymmv®.

Jesse Newland

unread,
Sep 1, 2010, 8:15:28 AM9/1/10
to mem...@googlegroups.com
Thanks JD. I have some other projects brewing, so I won't be able todo any work on the membase homebrew forumla for the weeks.

- Jesse

Perry Krug

unread,
Sep 1, 2010, 10:42:08 AM9/1/10
to mem...@googlegroups.com
Thanks JD!

Perry
--
---------------
Perry Krug

Ben Thompson

unread,
Oct 13, 2010, 4:16:23 PM10/13/10
to membase
Diff for membase 1.6.0 community release http://gist.github.com/624628

Works for me when using jnewland homebrew membase, with updated
formula for gdbm. http://gist.github.com/624790

When I use mxcl homebrew master, the homebrew built erlang compiler
and membase 1.6.0 makefiles appear to disagree about erlang compiler
command line options.


On Sep 1, 12:28 am, JD Maturen <jdmatu...@gmail.com> wrote:
> Diff for 1.6.0beta3http://gist.github.com/560361wfm, ymmv®.

Sean Lynch

unread,
Oct 13, 2010, 7:05:03 PM10/13/10
to mem...@googlegroups.com
On Wed, Oct 13, 2010 at 1:16 PM, Ben Thompson <benjami...@gmail.com> wrote:
Diff for membase 1.6.0 community release http://gist.github.com/624628

Works for me when using jnewland homebrew membase, with updated
formula for gdbm. http://gist.github.com/624790

When I use mxcl homebrew master, the homebrew built erlang compiler
and membase 1.6.0 makefiles appear to disagree about erlang compiler
command line options.

We just made the same change for building under R14 earlier today. http://github.com/membase/ns_server/tree/70ad29bded4f3d9d5851f49470687dd6dac91eac.

Blame me for not being adventurous enough to try fixing it when Homebrew first decided to upgrade my Erlang :) (I re-linked R13B04 instead).


andreacfm

unread,
Oct 27, 2010, 2:50:46 AM10/27/10
to membase
I am getting this error:

==> Installing memcached
==> ./config/autorun.sh

Exit status: 1

http://github.com/mxcl/homebrew/blob/master/Library/Formula/membase.rb#L82

==> Environment
HOMEBREW_VERSION: 0.7
HEAD: 929ee17968619a619b36666188f65a4f0157bb2a
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.6.4
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/
1.8/usr/bin/ruby
Xcode: 3.2.3
GCC-4.0: build 5494
GCC-4.2: build 5664
LLVM: build 2326
MacPorts or Fink? false
X11 installed? true

==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j4
Error: Failure while executing: ./config/autorun.sh
Please report this bug at http://github.com/mxcl/homebrew/issues

Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.

Any suggestion?

Andrea

On Oct 14, 1:05 am, Sean Lynch <se...@literati.org> wrote:
> On Wed, Oct 13, 2010 at 1:16 PM, Ben Thompson <benjaminpea...@gmail.com>wrote:
>
> > Diff for membase 1.6.0 community releasehttp://gist.github.com/624628
>
> > Works for me when using jnewland homebrew membase, with updated
> > formula for gdbm.http://gist.github.com/624790
>
> > When I use mxcl homebrew master, the homebrew built erlang compiler
> > and membase 1.6.0 makefiles appear to disagree about erlang compiler
> > command line options.
>
> We just made the same change for building under R14 earlier today.http://github.com/membase/ns_server/tree/70ad29bded4f3d9d5851f4947068...
> .
Reply all
Reply to author
Forward
0 new messages