Bug 271269 - net/rabbitmq unresolved PATH in rc script
Summary: net/rabbitmq unresolved PATH in rc script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-erlang (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-05 22:34 UTC by Miroslav Lachman
Modified: 2023-07-31 09:31 UTC (History)
2 users (show)

See Also:
dumbbell: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2023-05-05 22:34:06 UTC
Script rc.d/rabbitmq contains this line:
export PATH=/usr/local/lib/%%ERLANG_LIB%%/bin:$PATH

I think it should be resolved when the packages is built to something like this
export PATH=/usr/local/lib/erlang25/bin:$PATH
Comment 1 Miroslav Lachman 2023-07-29 09:04:51 UTC
Two version upgrades later but this bug is still there.
Can somebody fix it please?

I think the bug was introduced in this change
https://cgit.freebsd.org/ports/commit/net/rabbitmq/Makefile?id=c9033971719dc098b34276f11b8e5a5e22b966fd
Comment 2 Miroslav Lachman 2023-07-29 09:08:21 UTC
Added Dave Cottlehuber to Cc, because he was the committer of the change where ERLANG_LIB was changed to _ERLANG_LIB (prefixed with underscore) but files/rabbitmq.in was not adapted to this change.
Comment 3 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2023-07-31 09:14:14 UTC
Hi!

I'm looking into this problem. Sorry, I also missed that bug report so far.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-07-31 09:29:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eaf122aac00621177a187c6cc77629bcc2e11318

commit eaf122aac00621177a187c6cc77629bcc2e11318
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2023-07-31 09:22:33 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-07-31 09:27:57 +0000

    net/rabbitmq: Fix `rabbitmq` rc.d script to use `%%_ERLANG_LIB%%`

    [Why]
    In commit c9033971719dc098b34276f11b8e5a5e22b966fd, the variable was
    renamed from `ERLANG_LIB` to `_ERLANG_LIB`. However the rc.d script was
    not updated to reflect that change.

    Therefore the script didn't use the expected version of Erlang. This
    meant that it could use `lang/erlang` if it was installed (which could
    be incompatible) or not start at all.

    [How]
    The rc.d script is simply updated to use the new variable name. The port
    revision is bumped to note the change.

    PR:             271269
    Reported by:    Miroslav Lachman <000.fbsd@quip.cz>

 net/rabbitmq/Makefile          | 1 +
 net/rabbitmq/files/rabbitmq.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 5 Jean-Sébastien Pédron freebsd_committer freebsd_triage 2023-07-31 09:31:15 UTC
Fixed. Thank you for the report and analysis!