Description of problem: Prior to rpm 4.9.1, if there was a %doc entry in the %files list with a relative pathname, rpm would clear %{buildroot}%{_docdir}/%{name}-%{version} and then copy in the requested files. With rpm 4.9.1, this clearing does not happen and so any files already installed there during %install and not overwritten are still there in the built package. Moreover, the unpackaged files check does not detect them. This may result in unexpected files being included in built packages, and possibly additional dependencies as a result. Version-Release number of selected component (if applicable): rpm-4.9.1.1-1.fc17 How reproducible: Every time. Steps to Reproduce: 1. Build a package using the attached spec 2. rpm -qlp bugdemo-1.0-1.noarch.rpm Actual results: /usr/share/doc/bugdemo-1.0 /usr/share/doc/bugdemo-1.0/packaged /usr/share/doc/bugdemo-1.0/unpackaged Expected results: /usr/share/doc/bugdemo-1.0 /usr/share/doc/bugdemo-1.0/packaged
Created attachment 517217 [details] Sample spec file demonstrating the problem
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
*** Bug 1078760 has been marked as a duplicate of this bug. ***
Note that it have consequences for -doc subpackages as stated in bug 1078760. Therefore raising priority. Confirmed on F20.
Sure it has consequences, and apparently also made worse by the unversioned doc directory change. Problem is, the only "easy" thing to do is to revert back to the old behavior where the docdir is forced clean if %doc is used. And at this point there's likely more than a few packages depending in the new behavior.
*** Bug 1105790 has been marked as a duplicate of this bug. ***
Can you please give this little bit priority? This bug cause that lots of rpm packages have docfiles included and make resulting Fedora distribution bigger. Also this cause some confusions during Package Reviews.
Fixed upstream f16a522ca4be7090db5a3fc1a507e58a4d4946fd. Docdir is not cleaned but only files that are explicitly listed in spec are included in package. If docdir contain file not listed in spec file, then rpm complains about it as it does with any other not listed file.
*** Bug 1116373 has been marked as a duplicate of this bug. ***
Ľuboš, that change breaks common %doc usages, for a reproducer try rebuilding the Fedora rpm package for example.
(In reply to Panu Matilainen from comment #12) > Ľuboš, that change breaks common %doc usages, for a reproducer try > rebuilding the Fedora rpm package for example. Fixed in commit a817b246330780902eaed12633ce9282ef715fd9
Looks better, but I think there's still something fishy as "%doc foo/" (where foo is an actual directory) causes "File listed twice" warnings which were not there before these changes. Point really being, make sure you're handling all the crazy cases it supports due to being handled by "cp -r" underneath :)
(In reply to Panu Matilainen from comment #14) > Looks better, but I think there's still something fishy as "%doc foo/" > (where foo is an actual directory) causes "File listed twice" warnings which > were not there before these changes. Point really being, make sure you're > handling all the crazy cases it supports due to being handled by "cp -r" > underneath :) Next try in commit b52a5ca55722b0b5316cf8189b6caa285ba5c469