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
Fold geocouch in to couchdb formula #475
Conversation
@@ -68,6 +77,52 @@ def install | |||
(var/"run/couchdb").mkpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to put these (var/...).mkpath
in post_install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to post_install
.
👍 |
0a4048d
to
44e14a3
Compare
44e14a3
to
f68a780
Compare
depends_on "spidermonkey" | ||
depends_on "icu4c" | ||
depends_on "erlang" | ||
depends_on "curl" if MacOS.version <= :leopard | ||
|
||
resource "geocouch" do | ||
url "https://codeload.github.com/couchbase/geocouch/tar.gz/couchdb1.3.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer GitHub archive rather than codeload
URLs. We should probably add an audit for that. Also, do we not have a tagged release we can use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this formula, the archive URL was redirecting to this one. If I didn't replace it for the resource
usage, I was getting a SHA mismatch error.
I'll try the archive URL again; maybe it was something I was doing wrong locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that may be some weirdness using a branch tarball.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's cleaner to use a git checkout, branch and revision. It breaks our audit rule about using tags and revisions together but it should prevent the checksum breaking every time they push a new commit in that branch at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on checkout and revision if upstream don't provide tags we can use 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might have been a transient issue or mistake on my part. The GitHub archive link is working again. Switched back to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think using the branch and revision is a better idea, personally. It's not a "real" archive tarball as such, and if they push another commit to that branch we'll get a checksum failure again. Just seems like unnecessary future hassle for something we can prevent today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Switched to using git with branch/revision instead of the branch tarball.
Amended to remove Most of the other feedback makes sense; will address that too. |
@@ -78,13 +133,68 @@ def post_install | |||
end | |||
end | |||
|
|||
def caveats; <<-EOS.undent | |||
def caveats | |||
str = <<-EOS.undent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoying nit but we tend to use a simple s
rather than str
for caveats like these across formulae.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
f68a780
to
d466f9c
Compare
7e8a4f6
to
682fc95
Compare
Updated to address most of the feedback. Seems ready: it builds and passes test, though I wish we had a better test for the geocouch part. |
<true/> | ||
</dict> | ||
</plist> | ||
To see these instructions again, just run 'brew info couchdb'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can probably kill all these geocouch
caveats; they either aren't Homebrew specific or apply to most Homebrew formulae.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True: the port 5984 is a couchdb default, and the rest is brew
's normal functioning, now that we've folded geocouch in as an option and it's not doing the sandbox-violating cross-formula install. Removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I killed all the remaining caveats, too, since they were just instructions on how to test couchdb, and that should go in, well, the test
definition. Converted them to actual test
steps so now there's no caveats, and the test does more checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This is looking good; almost there. |
209693a
to
e8b029c
Compare
Test failed on Mavericks only. Which is weird, because that's what I tested it on locally, and it worked fine. Didn't try it under
|
@apjanke Any news on this? Would be great to get it merged in, even if restricted to Yosemite and above. |
e8b029c
to
96a78a9
Compare
Fixes issues with couchdb/geocouch's installation model not working with Homebrew sandboxing. Closes Homebrew#436 Fixes Homebrew#471
96a78a9
to
87bd094
Compare
I took another look at this, and I don't even know why it ran the test the way it did. Here's the failing test message.
But the current test code isn't even matching against a version number; it's matching against
Maybe it was something weird with the Mavericks test-bot's state. I amended this PR with a couple audit fixes and rebased on master. That'll kick off another test run and we'll see if the failure is repeatable. |
It passed this time. I'm going to tentatively chalk that previous failure up to some odd state on the Mavericks test bot. Look okay to merge now? |
👍 |
Checklist
brew audit --strict --online <formula>
(where<formula>
is the name of the formula you're submitting)?brew install <formula>
?References
Closes #436
Fixes #471
Fixes "geocouch" item in #342
Description
Fixes issues with couchdb/geocouch's installation model not working under Homebrew sandboxing.
This makes
geocouch
an option of thecouchdb
formula instead of its own separate formula, because couchdb/geocouch's installation model really wants some of those files to be under couchdb's installation hierarchy.Leaves a placeholder
geocouch
formula around. This is so users with an existinggeocouch
installation will have easy access to the caveats when it stops working and they're wondering what happened. Also so abrew update; brew upgrade
results in removal of the oldgeocouch
files, which may conflict with a new geocouch-enabledcouchdb
installation.The
geocouch
option is off by default because GeoCouch is considered "experimental" (from what I can see while Googling) and is of lower quality/stability than CouchDB itself, so we probably don't want it on by default. Otherwise, I would have made it recommended, to provide continuity for existing users ofgeocouch
, who would have then automatically picked it up in the upgrade to the nextcouchdb
version at the same timegeocouch
became a placeholder or disappeared.The
geocouch
placeholder formula can be boneyarded after a few months, once all GeoCouch users are likely to have gone through an upgrade cycle.Testing
I'm not sure this actually works, because I couldn't find a simple way to test the GeoCouch components of CouchDB. The GeoCouch readme says to just run the test suite. But that won't really catch it, because if the installation didn't work, then the GeoCouch tests might not have been properly added to the CouchDB test suite, and you wouldn't really be testing it.
Is there a GeoCouch user who can explain how to do a "Hello World" exercising the GeoCouch extension?