From 948afc37be88c2e5aed04cf5481e8f1f285a7384 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Aug 01 2024 16:35:24 +0000 Subject: Revert "Recommend avoiding macros in file depenencies" This reverts commit 35d89f0f3ff118359f1fef1c328570a944e0ddf8. Expanding `%{_bindir}` does not help with deciding, where some specific tool comes from. Paths must always be taken with care. --- diff --git a/guidelines/modules/ROOT/pages/RPMMacros.adoc b/guidelines/modules/ROOT/pages/RPMMacros.adoc index 124cd28..25e1e6e 100644 --- a/guidelines/modules/ROOT/pages/RPMMacros.adoc +++ b/guidelines/modules/ROOT/pages/RPMMacros.adoc @@ -31,7 +31,7 @@ $ rpm --define "test Hello, World!" --eval "%{test}" Hello, World! .... -[#macros_installation] + == Macros for paths set and used by build systems The macros for build system invocations diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index eb1aac9..4d6c0d9 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -843,13 +843,6 @@ to express the dependency on that directory existing, not on any other functionality of any other package that might provide that directory. -When declaring file and directory dependencies, -xref:RPMMacros.adoc#macros_installation[installation path macros] like `+%{_bindir}+` -MUST NOT be used. -`+%{_bindir}+` of the package that provides `+sometool+` -may be different from `+%{_bindir}+` of a package that requires `+sometool+`. -In such case, `+BuildRequires: %{_bindir}/sometool+` does not work as expected. - === Explicit Requires Explicit Requires are Requires added manually by the packager in the spec file.