From 2bc90a6463ae591ed134955485da0596c2fe958b Mon Sep 17 00:00:00 2001 From: Carl George Date: Feb 03 2022 00:52:03 +0000 Subject: Adapt Python's explicit lists guidance to the main guidelines --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 2bb4f9e..5ec0896 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -2574,6 +2574,27 @@ The %defattr directive in the %files list SHOULD ONLY be used when setting a non-default value, or to reset to the default value after having set a non-default value. +=== Explicit lists + +Packagers *SHOULD NOT* simply glob everything under a shared directory. + +In particular, the following *SHOULD NOT* be used in `+%files+`: + +* `+%{_bindir}/*+` +* `+%{_datadir}/*+` +* `+%{_includedir}/*+` +* `+%{_mandir}/*+` +* `+%{_docdir}/*+` + +This rule serves as a check against common mistakes +which are otherwise hard to detect. +It does limit some possibilities for automation. + +The most common mistake this rule prevents is upstream adding new commands in `+%{_bindir}/*+`. +You should always check such changes for +https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_common_conflicting_files_cases_and_solutions[conflicts], +and keep the list of such files explicit and auditable. + == Users and Groups Some packages require or benefit from