From dcea63f194c5f8b1421e2716a44f2f4b408b20dc Mon Sep 17 00:00:00 2001 From: James Antill Date: Oct 20 2022 17:03:12 +0000 Subject: Port the merge from: https://pagure.io/packaging-committee/pull-request/1045 From: Jason Tibbitts This extends the existing mention of macro forms of system executables. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 408aa4e..2b33adc 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -2007,11 +2007,20 @@ use either a hard-coded path or a macro, not a combination of the two. * %\{_libdir} must always be used for binary libraries due to multi-lib, you may not substitute a hard-coded path. -Macro forms of system executables SHOULD NOT be used -except when there is a need to allow the location -of those executables to be configurable. -For example, `+rm+` should be used in preference to `+%{__rm}+`, -but `+%{__python3}+` is acceptable. +Macros with names beginning with underscores +are generally considered to be implementation details internal to RPM +and its associated macro packages +and SHOULD NOT be referenced in specfiles +except to set their values in order to influence RPM behavior. +This implies that macro forms of system executables SHOULD NOT be used. +For example, `+rm+` should be used in preference to `+%{__rm}+`. +However, in some cases needed data are simply not provided +under names which are not prefixed with underscores. +If that is the case, the macro named with leading underscores MAY be used. +Authors of macro packages are encouraged +to avoid using leading underscores +when naming macros which are intended to be used in specfiles +(as opposed to being set). Having macros in a Source: or Patch: line is a matter of style. Some people enjoy the ready readability of a source line without macros.