Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

riak 1.4.0 #21186

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions Library/Formula/riak.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,27 @@ class Riak < Formula
homepage 'http://wiki.basho.com/Riak.html'

if Hardware.is_64_bit? and not build.build_32_bit?
url 'http://s3.amazonaws.com/downloads.basho.com/riak/1.3/1.3.1/osx/10.6/riak-1.3.1-osx-x86_64.tar.gz'
version '1.3.1-x86_64'
sha256 'e7b4db2273ef3fc0ba76f37468ff040d94a9bdac90ed129e226e483b19451414'
else
url 'http://s3.amazonaws.com/downloads.basho.com/riak/1.3/1.3.1/osx/10.6/riak-1.3.1-osx-i386.tar.gz'
version '1.3.1-i386'
sha256 '1169ddcbc1a613c734f3df7350b416e84c667faaae73b647d2fa696aa45bc085'
url 'http://s3.amazonaws.com/downloads.basho.com/riak/1.4/1.4.0/osx/10.8/riak-1.4.0-OSX-x86_64.tar.gz'
version '1.4.0-x86_64'
sha256 '4830b9e00b520b8494264017bfc2ff10753fd51b9e013bafd3054e29e5be1443'
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This conditional needs to be removed; it's not OK to print stuff in the DSL section of the formula, as that means it will be printed every time this formula is loaded on 32-bit systems. The depends_on :arch => :x86_64 tells Homebrew to print an appropriate warning and disallow installing on such platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed. Sending a new pull request...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you cancel this pull request so I can send a new one? It won't let me send while this is open.

Copy link
Member

Choose a reason for hiding this comment

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

You can force-push back to the same branch and the current pull request will be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nevermind. I didn't realize that the pull request would update with subsequent commits to the files included. Neat :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Need to remove the *entire* conditional (i.e don't wrap these attributes in an if statement at all); it doesn't serve any purpose unless the package provides both 32- and 64-bit versions.


skip_clean 'libexec'
depends_on :arch => :x86_64

option '32-bit'
# patch scripts to work with homebrew symlinking
def patches
[
"https://gist.github.com/erbmicha/5970803/raw", # env.sh patch
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the other approach of just hardcoding the Homebrew path instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was designed to work for all symlinking, not just homebrew. This way Basho can use it in their build process for other products.

On Jul 13, 2013, at 9:50 AM, Adam Vandenberg [email protected] wrote:

In Library/Formula/riak.rb:

  • option '32-bit'
  • patch scripts to work with homebrew symlinking

  • def patches
  • [
  •  "https://gist.github.com/erbmicha/5970803/raw", # env.sh patch
    
    I like the other approach of just hardcoding the Homebrew path instead.


Reply to this email directly or view it on GitHub.

Copy link
Contributor

Choose a reason for hiding this comment

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

When they accept it upstream then we won't need a patch, but in the meantime, the approach used in the other riak 1.4.0 submission has a smaller footprint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If by "they" you mean Basho, then you are correct, but I've been told that won't be until the next release and then the formula will be updated accordingly.

On Jul 13, 2013, at 12:04 PM, Adam Vandenberg [email protected] wrote:

In Library/Formula/riak.rb:

  • option '32-bit'
  • patch scripts to work with homebrew symlinking

  • def patches
  • [
  •  "https://gist.github.com/erbmicha/5970803/raw", # env.sh patch
    
    When they accept it upstream then we won't need a patch, but in the meantime, the approach used in the other riak 1.4.0 submission has a smaller footprint.


Reply to this email directly or view it on GitHub.

"https://gist.github.com/erbmicha/5970790/raw", # riak patch
"https://gist.github.com/erbmicha/5972538/raw", # search-cmd patch
"https://gist.github.com/erbmicha/5972526/raw", # riak-admin patch
"https://gist.github.com/erbmicha/5972531/raw", # riak-debug patch
]
end

def install
libexec.install Dir['*']

# The scripts don't dereference symlinks correctly.
# Help them find stuff in libexec. - @adamv
inreplace Dir["#{libexec}/bin/*"] do |s|
s.change_make_var! "RUNNER_SCRIPT_DIR", "#{libexec}/bin"
end

prefix.install Dir['*']
rm Dir.glob("#{bin}/*.orig") # get rid of the patch backups before symlinking to bin
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove files before installing.

bin.install_symlink Dir["#{libexec}/bin/*"]
end
end