Bug 1001273

Summary: realmd : duplicate documentation files / potentially conflicting
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: realmdAssignee: Stef Walter <stefw>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jhrozek, jrieden, stefw, ville.skytta
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: realmd-0.16.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-19 07:40:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 993551    
Attachments:
Description Flags
proposed spec changes/fixes none

Description Michael Schwendt 2013-08-26 20:04:38 UTC
Duplicate documentation files have been detected in the package
builds for Rawhide and Fedora 20. The likely cause is the unversioned
docdirs change in Fedora 20.

If your package %installs documentation files into %{_docdir}/%{name}/ to
store them in a subpackage, this now conflicts with using the %doc
macro in the base package. Since Fedora 20, the %doc macro installs into
the unversioned %{_docdir}/%{name}/ and includes everything in that
directory. One obvious fix is to decide between either using %doc or
installing into %{_docdir}/%{name}/ manually as explained in the
Packaging tricks Wiki section (for past dist releases and the versioned
docdir).

General discussion of this problem:
https://fedorahosted.org/fpc/ticket/338

Further information:
http://fedoraproject.org/wiki/Changes/UnversionedDocdirs
https://fedoraproject.org/wiki/Packaging_tricks#Installing_documentation:_2_paths

[semi-automated bug report]

[...]

=> realmd-0.14.5-1.fc20.src.rpm
=> realmd-devel-docs-0.14.5-1.fc20.i686 in fedora-development-i386
  File conflict with: realmd-0.14.5-1.fc20.i686
     /usr/share/doc/realmd/AUTHORS
     /usr/share/doc/realmd/COPYING
     /usr/share/doc/realmd/ChangeLog
     /usr/share/doc/realmd/NEWS
     /usr/share/doc/realmd/README
     /usr/share/doc/realmd/dbus-interface-raw.html
     /usr/share/doc/realmd/dbus-interface-reference.html
     /usr/share/doc/realmd/development.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Kerberos.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.KerberosMembership.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Provider.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Realm.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Service.html
     /usr/share/doc/realmd/gtk-doc.css
     /usr/share/doc/realmd/guide-active-directory-client.html
     /usr/share/doc/realmd/guide-active-directory-join.html
     /usr/share/doc/realmd/guide-active-directory-permit.html
     /usr/share/doc/realmd/guide-active-directory.html
     /usr/share/doc/realmd/guide-integration.html
     /usr/share/doc/realmd/guide-ipa-client.html
     /usr/share/doc/realmd/guide-ipa-join.html
     /usr/share/doc/realmd/guide-ipa-permit.html
     /usr/share/doc/realmd/guide-ipa.html
     /usr/share/doc/realmd/guide-kerberos.html
     /usr/share/doc/realmd/guide.html
     /usr/share/doc/realmd/home.png
     /usr/share/doc/realmd/index.html
     /usr/share/doc/realmd/index.sgml
     /usr/share/doc/realmd/left.png
     /usr/share/doc/realmd/realm-manual.html
     /usr/share/doc/realmd/realm.html
     /usr/share/doc/realmd/realmd-conf.html
     /usr/share/doc/realmd/realmd-docs.proc
     /usr/share/doc/realmd/right.png
     /usr/share/doc/realmd/style.css
     /usr/share/doc/realmd/up.png

=> realmd-0.14.5-1.fc20.src.rpm
=> realmd-0.14.5-1.fc20.i686 in fedora-development-i386
  File conflict with: realmd-devel-docs-0.14.5-1.fc20.i686
     /usr/share/doc/realmd/AUTHORS
     /usr/share/doc/realmd/COPYING
     /usr/share/doc/realmd/ChangeLog
     /usr/share/doc/realmd/NEWS
     /usr/share/doc/realmd/README
     /usr/share/doc/realmd/dbus-interface-raw.html
     /usr/share/doc/realmd/dbus-interface-reference.html
     /usr/share/doc/realmd/development.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Kerberos.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.KerberosMembership.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Provider.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Realm.html
     /usr/share/doc/realmd/gdbus-org.freedesktop.realmd.Service.html
     /usr/share/doc/realmd/gtk-doc.css
     /usr/share/doc/realmd/guide-active-directory-client.html
     /usr/share/doc/realmd/guide-active-directory-join.html
     /usr/share/doc/realmd/guide-active-directory-permit.html
     /usr/share/doc/realmd/guide-active-directory.html
     /usr/share/doc/realmd/guide-integration.html
     /usr/share/doc/realmd/guide-ipa-client.html
     /usr/share/doc/realmd/guide-ipa-join.html
     /usr/share/doc/realmd/guide-ipa-permit.html
     /usr/share/doc/realmd/guide-ipa.html
     /usr/share/doc/realmd/guide-kerberos.html
     /usr/share/doc/realmd/guide.html
     /usr/share/doc/realmd/home.png
     /usr/share/doc/realmd/index.html
     /usr/share/doc/realmd/index.sgml
     /usr/share/doc/realmd/left.png
     /usr/share/doc/realmd/realm-manual.html
     /usr/share/doc/realmd/realm.html
     /usr/share/doc/realmd/realmd-conf.html
     /usr/share/doc/realmd/realmd-docs.proc
     /usr/share/doc/realmd/right.png
     /usr/share/doc/realmd/style.css
     /usr/share/doc/realmd/up.png

Comment 1 Michael Schwendt 2013-12-15 16:32:38 UTC
Created attachment 836979 [details]
proposed spec changes/fixes

Comment 2 Jaroslav Reznik 2015-03-03 15:00:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Stef Walter 2015-04-14 11:50:22 UTC
These files have been moved to the realmd-devel-docs package.

Comment 4 Michael Schwendt 2015-04-14 13:39:26 UTC
Your builds in koji do not fix the issue, because you still mix %doc and %_pkgdocdir:

$ rpm -E %_pkgdocdir
%{_docdir}/%{name}

 | %files -f realmd.lang
 | %doc AUTHORS COPYING NEWS README

 | %files devel-docs
 | %doc %{_datadir}/doc/realmd/
 | %doc ChangeLog

Since the UnversionedDocdirs feature, default docdir for %doc is %{_docdir}/%{name} which is your %{_datadir}/doc/realmd, and that results in duplication of everything in that dir when using %doc.

The FPC has recently updated the guidelines, and it is forbidden now:

https://fedoraproject.org/wiki/Packaging:Guidelines#Documentation

| Marking a relative path with %doc in the %files section will cause RPM
| to copy the referenced file or directory from %_builddir to the proper#
| location for documentation. Files can also be placed in %_pkgdocdir, and
| the build scripts of the software being packaged may do this automatically
| when called in %install. However, mixing these methods is problematic and
| may result in duplicated or conflicting files, so use of %doc with relative
| paths and installation of files directly into %_pkgdocdir in the same source
| package is forbidden.

Comment 5 Ville Skyttä 2015-10-18 07:54:19 UTC
I believe this has been fixed by:

http://rpm.org/wiki/Releases/4.13.0
- Don't include not explicitly listed files from doc dir into package (#728959)