This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 728959 - Unpackaged files check does not check %{buildroot}%{_docdir}/%{name}-%{version}
Unpackaged files check does not check %{buildroot}%{_docdir}/%{name}-%{version}
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
20
Unspecified Unspecified
high Severity low
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
: 1078760 1105790 1116373 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-08 09:36 EDT by Paul Howarth
Modified: 2015-04-24 05:28 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-04-17 08:47:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample spec file demonstrating the problem (464 bytes, text/plain)
2011-08-08 09:37 EDT, Paul Howarth
no flags Details

  None (edit)
Description Paul Howarth 2011-08-08 09:36:17 EDT
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
Comment 1 Paul Howarth 2011-08-08 09:37:08 EDT
Created attachment 517217 [details]
Sample spec file demonstrating the problem
Comment 2 Fedora Admin XMLRPC Client 2012-04-13 19:07:02 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Fedora Admin XMLRPC Client 2012-04-13 19:10:37 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Fedora End Of Life 2013-04-03 12:46:33 EDT
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
Comment 5 Panu Matilainen 2014-03-25 06:28:43 EDT
*** Bug 1078760 has been marked as a duplicate of this bug. ***
Comment 6 Miroslav Suchý 2014-03-26 04:00:11 EDT
Note that it have consequences for -doc subpackages as stated in bug 1078760. Therefore raising priority.

Confirmed on F20.
Comment 7 Panu Matilainen 2014-03-26 04:36:35 EDT
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.
Comment 8 Miroslav Suchý 2014-06-09 04:37:51 EDT
*** Bug 1105790 has been marked as a duplicate of this bug. ***
Comment 9 Miroslav Suchý 2014-09-05 05:35:25 EDT
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.
Comment 10 Ľuboš Kardoš 2015-04-17 08:47:20 EDT
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.
Comment 11 Ľuboš Kardoš 2015-04-17 08:48:19 EDT
*** Bug 1116373 has been marked as a duplicate of this bug. ***
Comment 12 Panu Matilainen 2015-04-20 06:07:36 EDT
Ľuboš, that change breaks common %doc usages, for a reproducer try rebuilding the Fedora rpm package for example.
Comment 13 Ľuboš Kardoš 2015-04-20 09:29:10 EDT
(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
Comment 14 Panu Matilainen 2015-04-21 07:19:09 EDT
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 :)
Comment 15 Ľuboš Kardoš 2015-04-24 05:28:10 EDT
(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

Note You need to log in before you can comment on or make changes to this bug.