apache-karaf 2.3.6 (new formula)

Looks like the path finding in Karaf makes not possible.  Their scripts use this to find the script’s own path

    DIRNAME=`dirname "$0”`

and thereby divine the location of needed libraries.  This fails if the script is linked in /usr/local/bin.  Is there a workaround for this, or should I work with upstream to improve their script location finding?

-Drew

From: Jack Nagel <notifications@github.com>
Reply: Homebrew/homebrew <reply@reply.github.com>>
Date: September 10, 2014 at 2:07:15 AM
To: Homebrew/homebrew <homebrew@noreply.github.com>>
Cc: Drew Stephens <drew@dinomite.net>>
Subject:  Re: [homebrew] apache-karaf 2.3.6 (new formula) (#31767)  

In Library/Formula/apache-karaf.rb:

> @@ -0,0 +1,17 @@
> +require "formula"
> +
> +class ApacheKaraf < Formula
> +  homepage "http://karaf.apache.org"
> +  url "http://mirror.cogentco.com/pub/apache/karaf/2.3.6/apache-karaf-2.3.6.tar.gz"
> +  sha1 "9a54171ade3c3722a8385b916d9904038af8c13d"
> +
> +  def install
> +    libexec.install "bin", "data", "demos", "deploy", "etc", "lib", "system"
> +
> +    bin.env_script_all_files(libexec + 'bin', :KARAF_HOME => libexec)
We should probably link something in bin, otherwise this formula isn't all that useful. But I'm concerned about the generically-named executables:

$ ls $(brew --prefix ./apache-karaf.rb)/libexec/bin
admin  client karaf  setenv shell  start  status stop

We definitely don't want this to install executables named start, stop, status, etc. into the user's PATH.

We can do something like

bin.install_symlink "#{libexec}/bin/admin" => "karaf-admin"

but I don't know how this software is used, so that may or may not be useful.

—
Reply to this email directly or view it on GitHub.