Bug 1333509

Summary: clash when the same file listed as both %license and %doc
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <jpokorny>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: jorton, jzeleny, novyjindrich, packaging-team-maint, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-22 11:42:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pokorný [poki] 2016-05-05 17:04:54 UTC
1. have spec file %license-marking file that is in ${_pkgdocdir}:

> %license %{_pkgdocdir}/COPYING

NOTE: no warning is emitted (-> possibly bad I.)

2. such file is listed with both --docfiles and --licencefiles queries
   as expected (-> OK)

3. when package is installed using --excludedocs, the file in question
   is missing (-> possibly bad II.)


Expected solution is either:

  make rpmbuild complain about such possibly harmful duality
  so as to fix possibly bad I.

or:

  make rpm --install --excludedocs exclude only files not listed
  in any other auxiliary list (such as license files, any other?)
  so as to fix possibly bad II.
  

Related: [bug 1314865 comment 7].

Comment 1 Jan Pokorný [poki] 2016-05-05 17:09:50 UTC
I should have said "minimal expected solution", as the two proposed
changes in the behavior can indeed be combined.

Comment 2 Jan Kurik 2016-07-26 04:53:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 3 Panu Matilainen 2016-10-11 08:43:18 UTC
Fixed upstream, mostly: https://github.com/rpm-software-management/rpm/commit/7d76713adbb0bef1ba0bc85373761bb061b8324a

It was always the intention to allow a file to be both %doc and %license etc, it just ... lets say, got lost somewhere in translation.

Comment 4 Panu Matilainen 2017-08-22 11:42:50 UTC
Fixed in rawhide/F27 now as of rpm >= 4.13.90.