From: Jan Stancek <jstancek@xxxxxxxxxx> redhat/kernel.spec: fix file listed twice warning for "kernel" subdir Address the warnings like: File listed twice: /lib/modules/6.11.0-0.rc0.66ebbdfdeb09.10.test.el10.x86_64/kernel Signed-off-by: Jan Stancek <jstancek@xxxxxxxxxx> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -2696,7 +2696,10 @@ BuildKernel() { sed -i %{?zipsed} $absolute_file_list %endif # add also dir for the case when there are no kmods - echo "%dir /lib/modules/$KernelVer/$module_subdir" >> $absolute_file_list + # "kernel" subdir is covered in %files section, skip it here + if [ "$module_subdir" != "kernel" ]; then + echo "%dir /lib/modules/$KernelVer/$module_subdir" >> $absolute_file_list + fi if [ "$add_all_dirs" -eq 1 ]; then (cd $RPM_BUILD_ROOT; find lib/modules/$KernelVer/kernel -mindepth 1 -type d | sort -n) > ../module-dirs.list -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3291 -- _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue