#21 False positives of "Possible unexpanded macro in: Requires: emacs(bin) >= %{_emacs_version}"
Closed: Fixed 5 years ago by kparal. Opened 5 years ago by scfc.

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).


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.)

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.

Metadata Update from @kparal:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata