Packages related to Emacs (must) use the dependency Requires: emacs(bin) >= %{_emacs_version}. This macro is provided by /usr/lib/rpm/macros.d/macros.emacs as part of the emacs-common package indirectly referenced by BuildRequires: emacs. dist.rpmlint falsely reports all of these as "Possible unexpanded macro" (example, example, example).
Requires: emacs(bin) >= %{_emacs_version}
/usr/lib/rpm/macros.d/macros.emacs
emacs-common
BuildRequires: emacs
dist.rpmlint
I assume the problem is caused by the fact that we do not install the package in order to run rpmlint on it, we just provide all the source and binary rpms to it. Do I understand this correctly?
If this is the case, I'll add a note to dist.rpmlint documentation and recommend maintainers to whitelist such errors in this case. Or do you see a way how to fix this without installing the package (we can't do that at the moment)?
Yes and no. The macro is not provided by the package built (for example emacs-json-mode), but by its (indirect) build dependency emacs-common. (These types of false positives should also occur for other macros in /usr/lib/rpm/macros.d, but many of these files are probably already installed by default on the machines where dist.rpmlint is run.)
emacs-json-mode
/usr/lib/rpm/macros.d
If it is not possible to (temporarily) install the build dependences at the dist.rpmlint stage, recommending to whitelist such errors as you proposed is probably the way to go.
I have documented the problem here: https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Unexpanded_macros Thanks for reporting it.
Metadata Update from @kparal: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.