Bug 127033 - net/rabbitmq port install glitches
Summary: net/rabbitmq port install glitches
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 01:10 UTC by bp
Modified: 2008-09-03 17:00 UTC (History)
0 users

See Also:


Attachments
file.diff (12.57 KB, patch)
2008-09-02 01:10 UTC, bp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bp 2008-09-02 01:10:02 UTC
I've noticed a couple things in installation of the net/rabbitmq port that don't seem quite right...

The port Makefile contains this line:

----
MAKE_ENV+=      TARGET_DIR="${PREFIX}/lib/erlang/lib/rabbitmq-${PORTVERSION}" SBIN_DIR="${PREFIX}/sbin/"
----

but I believe the TARGET_DIR should end with "rabbitmq_server-${PORTVERSION}", having the "_server" bit gives you something that matches what the rabbitmq install docs recommend, and allow you to build the rabbitmq-erlang-client more easily.

The other issue is that the rabbitmq daemon doesn't start automatically when a jail that it's installed in starts (or presumably a machine boots) - it seems that "/usr/local" is not in the path at this point, so the rc.d/rabbitmq script doesn't find the "/usr/local/sbin/rabbitmq-server" script, which also doesn't find "/usr/local/bin/erl"

Fix: I've attached a patch to the port that seems to fix these problems.

Patch attached with submission follows:
How-To-Repeat: Try building the RabbitMQ erlang client, it errors out with

----
src/amqp_channel.erl:28: can't find include lib "rabbitmq_server/include/rabbit.hrl"
src/amqp_channel.erl:29: can't find include lib "rabbitmq_server/include/rabbit_framing.hrl"
----

Install rabbitmq and enable in your rc.conf, reboot machine or jail and see that it doesn't start automatically.  It starts fine by hand though because when you're logged into a shell, you usually have /usr/local/s?bin in your path.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-02 03:10:45 UTC
Maintainer of net/rabbitmq,

Please note that PR ports/127033 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/127033

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-02 03:10:46 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Phillip N. 2008-09-02 14:13:53 UTC
I was about to send a very similar update.
Looks good, thanks!
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2008-09-02 17:26:45 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2008-09-02 22:14:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 6 Dmitry Marakasov 2008-09-03 03:04:25 UTC
* amdmi3@FreeBSD.org (amdmi3@FreeBSD.org) wrote:
> Synopsis: net/rabbitmq port install glitches
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=127033
Does

@${MKDIR} /var/log/rabbitmq /var/db/rabbitmq/mnesia ${PREFIX}/etc/rabbitmq

really need to be in post-patch? I'd move it to post-install instead to
make tinderbox happy (or else it complains that directories that existet
pre `make install' were remove after `make deinstall'). Also I've added
@exec mkdir -p for those dirs in pkg-plist, or else those dirs will not
be created on package (not port) installation.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru
Comment 7 Dmitry Marakasov freebsd_committer freebsd_triage 2008-09-03 03:04:32 UTC
State Changed
From-To: open->feedback

Awaiting maintainer's feedback.
Comment 8 bp 2008-09-03 05:48:40 UTC
I don't think there's any reason those directories have to be created 
post-patch instead of post-install.

Another way to go that might even be better would be to create them in 
the rc.d/rabbitmq script if they don't exist when the daemon starts.

     Barry
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2008-09-03 16:51:13 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!
Comment 10 dfilter service freebsd_committer freebsd_triage 2008-09-03 16:51:19 UTC
amdmi3      2008-09-03 15:51:10 UTC

  FreeBSD ports repository

  Modified files:
    net/rabbitmq         Makefile pkg-plist 
    net/rabbitmq/files   rabbitmq.in 
  Log:
  - Change rabbitmq to rabbitmq_server in TARGET_DIR to match rabbitmq install docs recommendation
  - Fix rcscript
  - Create var/etc dirs on package installation and correctly dirrmtry them on deinstallation
  
  PR:             127033
  Submitted by:   Barry Pederson <bp at barryp dot org>
  Approved by:    "Phillip N." <pneumann at gmail dot com> (maintainer)
  
  Revision  Changes    Path
  1.3       +6 -3      ports/net/rabbitmq/Makefile
  1.2       +3 -2      ports/net/rabbitmq/files/rabbitmq.in
  1.3       +90 -86    ports/net/rabbitmq/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"