Description of problem: When a spec file lists "%doc FILE" in its %files section, rpmbuild adds not just FILE to the package, but also the whole %_pkgdocdir directory with all its contents. Example spec file: Name: testdoc Version: 1 Release: 1%{?dist} Summary: test for spec file doc directive License: BSD %description Test for the behavior of the doc directive %prep echo "BSD" > COPYING %build %install mkdir -p %{buildroot}/%{_datadir}/doc/testdoc echo "Hello" > %{buildroot}/%{_datadir}/doc/testdoc/readme.txt %files %doc COPYING %changelog * Fri Jul 04 2014 Michal Schmidt <mschmidt> 1-1 - first version Version-Release number of selected component (if applicable): rpm-4.11.2-2.fc20.x86_64 How reproducible: always Steps to Reproduce: 1. rpmbuild -bb testdoc.spec 2. rpm -qlp testdoc-1-1.fc20.x86_64.rpm Actual results: It lists the following package contents: /usr/share/doc/testdoc /usr/share/doc/testdoc/COPYING /usr/share/doc/testdoc/readme.txt Expected results: I did not expect readme.txt to be packaged. Additional info: I noticed this because of hitting a file conflict between dbus-1.6.12-9.fc20.x86_64 and dbus-doc-1.6.12-9.fc20.noarch, where all the documentation files are accidentally included in the main dbus package too even though the author clearly only wanted to have the COPYING file there. This may be expected behavior, but it is not obvious.
Yup... see bug 728959, whose dupe this mostly/effectively is, and also bug 1113236 and bug 1113233 revolve around the same issue.
*** This bug has been marked as a duplicate of bug 728959 ***