Java port questions (Re: ActiveMQ port submission)

Dan Ports dports at ambulatoryclam.net
Wed Jan 13 17:10:45 PST 2010


On Thu, Jan 14, 2010 at 01:14:40AM +0100, Jann R??der wrote:
> Hi,
> somebody created a port for ActiveMQ:
> http://trac.macports.org/ticket/23143 . The port however has the problem
> that non-root users cannot run it since it wants to write to
> /opt/local/share/java/activemq . I told the submitter that he has to
> install a config file so that the port works out of the box for non-root
> users and doesn't write to /opt/local/share/java/activemq. What is the
> official policy for such things? Do ports have to work out of the box?

I submitted that portfile, so feel compelled to respond -- but note
that I have no real familiarity with ActiveMQ other than offering to
help write a portfile.

Being a Java-based port, it brought up a few other issues that I didn't
have a good answer to. I tried to resolve them based on a (highly
scientific) study of some other random Java ports. But it's probably
worth clarifying policy on these:

- ActiveMQ has both a source and binary distribution. Which should we
  use? I went with the binary not just out of simple laziness but also
  because it depended on some Java packages that we didn't already have
  ports for. (I guess that'd be a more sophisticated form of laziness.)
  I found a bunch of ports of each type: source or binary installs.

If going with a binary install, then:

- the binary install is designed to be run out of its directory, so the
  port puts a bunch of stuff in
  /opt/local/share/java/activemq. I agree with Jann that some of it really
  doesn't belong there, including apparently logfiles. But I'm not
  entirely clear on what should be moved and where.

- the binary distribution includes all of its library dependencies, 
  leading to a bunch of jar files in
  /opt/local/share/java/activemq/lib. Some are also provided by ports,
  like commons-*. Should we do something about that? I was pretty
  troubled by the duplication, but they *are* included in the binary
  dist, and the activemq folks told me they were worried about version
  mismatches with already-installed libraries. 

  Note that some other ports (I think maven is one?) also wind up
  installing some of the same libraries so there is a danger we'll wind
  up with a bunch of copies.

- I originally put in a dependency on bin:java:kaffe, but Jann pointed
  out that this is silly since Java has been included in OS X at least
  as far back as I can remember. A lot of other ports have this same
  dependency. What's up with that? Should they be changed?

Dan

-- 
Dan R. K. Ports              MIT CSAIL                http://drkp.net/


More information about the macports-dev mailing list