Bug 1297132 - RFE: Use the %__erlang_provides macro in the spec file
RFE: Use the %__erlang_provides macro in the spec file
Product: Fedora
Classification: Fedora
Component: erlang (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Peter Lemenkov
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-09 12:21 EST by Randy Barlow
Modified: 2016-03-16 07:24 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Randy Barlow 2016-01-09 12:21:04 EST
I noticed that there is a handy %__erlang_provides_requires macro in /usr/lib/rpm/macros.d/macros.erlang and attempted to use it on one of my packages. Unfortunately, this causes my package to depend on lots of Erlang built-ins and the erlang package doesn't mark itself as providing these built-ins. For example, when I use that macro in my erlang-oauth2 package, it fails to install like this:

$ sudo dnf install erlang-oauth2/results/erlang-oauth2-0.6.0-3.fc24.x86_64.rpm
Last metadata expiration check performed 1:57:49 ago on Sat Jan  9 10:17:18 2016.
Error: nothing provides erlang(application:get_env/2) needed by erlang-oauth2-0.6.0-3.fc24.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages)

In the meantime, I can work around this issue by using the correct Requires on my package but it would be a nice improvement if we could get that automatically working, especially since somebody took the time to write that fancy macro.
Comment 1 Peter Lemenkov 2016-02-28 12:32:10 EST
Initially erlang-rpm-macros was written for a very outdated RPM version (can't remember what was used in 2009), and it contains a lot of ugly workarounds and shortcomings. Fortunately RPM evolved significantly so a lot of these ugly things should just be trashed (which I did already, actually).

I;ve added a lot of fun stuff (automatic dependency picker), so starting from the next erlang-rpm-macros version we should really start using it.
Comment 2 Randy Barlow 2016-03-14 01:13:14 EDT
Hey Peter! I've enjoyed the new automatic dependency system you've developed. I'm happy to close this bug if you are. Thanks!
Comment 3 Peter Lemenkov 2016-03-16 07:24:11 EDT
(In reply to Randy Barlow from comment #2)
> Hey Peter! I've enjoyed the new automatic dependency system you've
> developed. I'm happy to close this bug if you are. Thanks!

We'd better keep it for a while since there is one missing piece - Erlang/OTP itself which doesn't use these macros (yet).

Note You need to log in before you can comment on or make changes to this bug.