Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628876 - dev-util/rebar-3.14.4 version bump
Summary: dev-util/rebar-3.14.4 version bump
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Depends on:
Blocks: 626260
  Show dependency tree
Reported: 2017-08-25 03:20 UTC by R030t1
Modified: 2021-05-24 17:08 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description R030t1 2017-08-25 03:20:50 UTC
The versions of rebar in portage are very out of date and are deprecated. The referenced package may need to be removed from the tree, the updated version is now called rebar3.
Comment 1 Mira Ressel 2017-11-15 22:02:40 UTC
IMHO, rebar3 should be added as a new package. If you're interested, please get in touch with proxy-maint!

I'm dropping maintainership of dev-util/rebar and don't have time for rebar3, either, so I'm closing this.
Comment 2 Jonas Stein gentoo-dev 2017-11-16 10:15:25 UTC
Why do you think rebar3 should be added as a new package?

I think we can leave this open unless there is a reason why we do not want this package in the tree in general.

Interested users may try to prepare an ebuild in the mean time.
Here is, how other distributions do it

Is dev-util/rebar-2.x still usable?

@R030t1 are you using this software and are you able to prepare an ebuild?
Comment 3 Ștefan Talpalaru 2018-07-03 17:21:50 UTC
dev-util/rebar3-3.6.1 and a corresponding "rebar3" eclass are available in my overlay:

It's important to note that it's not a drop-in replacement for rebar-2.x. I tried to use it that way and it failed to compile a recent
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-22 21:36:55 UTC
Stefan, how do you handle deps? Doesn't bootstrap try to fetch any deps?
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-22 21:38:56 UTC
I've looked briefly at boostrap and rebar.config. Deps:


We cannot fetch stuff in src_compile or src_prepare.
Comment 6 Ștefan Talpalaru 2018-10-22 21:48:01 UTC
It does. It fetches, compiles, links and packages those deps in the resulting "rebar3" binary that is actually a zip file with a three-line script header calling "escript".

Run "unzip -l rebar3" to see the listing.
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-24 21:59:48 UTC
I don't think it's acceptable. Perhaps the easiest way would be to go with rebar3-bin. They do publish rebar3 binary, don't they?
Comment 8 Ștefan Talpalaru 2018-10-24 22:13:17 UTC
Yes, they do:

It looks like the same zip archive you get when building from source (if using the same Erlang version to generate the bytecode).
Comment 9 Larry the Git Cow gentoo-dev 2018-10-24 22:27:28 UTC
The bug has been referenced in the following commit(s):

commit 1efa3958413cda09142e12371e54032a9c442e17
Author:     Amadeusz Piotr Żołnowski <>
AuthorDate: 2018-10-24 22:23:19 +0000
Commit:     Amadeusz Piotr Żołnowski <>
CommitDate: 2018-10-24 22:26:59 +0000

    dev-lang/rebar-bin: Add new package
    Fetch and install prebuilt binary as it's way easier than building this
    from source.
    Signed-off-by: Amadeusz Piotr Żołnowski <>

 dev-util/rebar-bin/Manifest               |  1 +
 dev-util/rebar-bin/metadata.xml           | 28 ++++++++++++++++++++++++++++
 dev-util/rebar-bin/rebar-bin-3.6.2.ebuild | 31 +++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+)
Comment 10 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-24 22:31:20 UTC
OK, next thing would be to update eclass. I see the way that user of eclass defines REBAR_VERSION=2 or REBAR_VERSION=3 and erebar function uses either rebar or rebar3 depending on value of this variable.
Comment 11 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-24 22:35:25 UTC
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index f2a620fd8979..cbae1905af91 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -42,6 +42,11 @@ DEPEND="${RDEPEND}
 # Relative path to .app.src description file.
+# Which version of rebar to use: 2 or 3. Default is 2.
 # @FUNCTION: get_erl_libs
 # @RETURN: the path to Erlang lib directory
@@ -105,7 +110,11 @@ erebar() {
        (( $# > 0 )) || die "erebar: at least one target is required"
        local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
-       rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
+       case "$REBAR_VERSION" in
+               2) rebar -v skip_deps=true "$@" || die -n "rebar $@ failed" ;;
+               3) rebar3 -v skip_deps=true "$@" || die -n "rebar3 $@ failed" ;;
+       esac
 # @FUNCTION: rebar_fix_include_path
Comment 12 Ștefan Talpalaru 2018-10-24 22:41:23 UTC
Sounds good. Don't forget to change it to "[[ -d ebin ]] && doins -r ebin" in rebar_src_install() because that dir is optional with rebar3.

You also need to change the injected DEPEND.
Comment 13 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-24 22:44:18 UTC
It compiles into some _build subdirectory, at least dev-erlang/meck. src_install phase will need some changes as well. I'll have a look few days later. Feel free to investigate in the meantime.
Comment 14 Amadeusz Żołnowski (RETIRED) gentoo-dev 2018-10-24 22:45:32 UTC
Yes, that's a start, only. Feel free to provide a patch, as I need to park this for few days.
Comment 15 Anna Tikhomirova 2019-08-16 12:19:56 UTC
(In reply to Amadeusz Żołnowski from comment #5)
> We cannot fetch stuff in src_compile or src_prepare.

(In reply to Amadeusz Żołnowski from comment #7)
> I don't think it's acceptable. Perhaps the easiest way would be to go with
> rebar3-bin.

Using rebar binary is not enough to avoid fetching stuff in src_compile or src_prepare.

When running `rebar3 compile` to compile a package, rebar fetches and compiles necessary plugins first, and then it compiles the package.

I don't have any ideas on how to handle rebar plugins. They can't be installed system-wide.
Comment 16 Anna Tikhomirova 2019-08-16 13:05:17 UTC
BTW the latest version now is 3.11.1.
Comment 17 John Helmert III gentoo-dev Security 2021-03-19 14:33:09 UTC
Doesn't seem Hanno ever maintained this package.. assigning to m-n and changing version to latest.