Bug 1001254

Summary: gluegen2 : duplicate documentation files / potentially conflicting
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: gluegen2Assignee: Clément DAVID <c.david86>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: c.david86
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gluegen2-2.0.2-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 05:49:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Schwendt 2013-08-26 19:56:23 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]

[...]

=> gluegen2-2.0-0.11.rc12.fc20.src.rpm
=> gluegen2-doc-2.0-0.11.rc12.fc20.noarch in fedora-development-i386
  File conflict with: gluegen2-2.0-0.11.rc12.fc20.i686
     /usr/share/doc/gluegen2/LICENSE.txt
     /usr/share/doc/gluegen2/example1/function.c
     /usr/share/doc/gluegen2/example1/function.cfg
     /usr/share/doc/gluegen2/example1/function.h
     /usr/share/doc/gluegen2/example1/gen.sh
     /usr/share/doc/gluegen2/example2/function.c
     /usr/share/doc/gluegen2/example2/function.cfg
     /usr/share/doc/gluegen2/example2/function.h
     /usr/share/doc/gluegen2/example2/gen.sh
     /usr/share/doc/gluegen2/example3/function.cfg
     /usr/share/doc/gluegen2/example3/function.h
     /usr/share/doc/gluegen2/example3/gen.sh
     /usr/share/doc/gluegen2/example4/function.c
     /usr/share/doc/gluegen2/example4/function.cfg
     /usr/share/doc/gluegen2/example4/function.h
     /usr/share/doc/gluegen2/example4/gen.sh
     /usr/share/doc/gluegen2/example5/function.c
     /usr/share/doc/gluegen2/example5/function.cfg
     /usr/share/doc/gluegen2/example5/function.h
     /usr/share/doc/gluegen2/example5/gen.sh
     /usr/share/doc/gluegen2/example6/function.cfg
     /usr/share/doc/gluegen2/example6/function.h
     /usr/share/doc/gluegen2/example6/gen.sh
     /usr/share/doc/gluegen2/example7/function.cfg
     /usr/share/doc/gluegen2/example7/function.h
     /usr/share/doc/gluegen2/example7/gen.sh
     /usr/share/doc/gluegen2/index.html

=> gluegen2-2.0-0.11.rc12.fc20.src.rpm
=> gluegen2-2.0-0.11.rc12.fc20.i686 in fedora-development-i386
  File conflict with: gluegen2-doc-2.0-0.11.rc12.fc20.noarch
     /usr/share/doc/gluegen2/LICENSE.txt
     /usr/share/doc/gluegen2/example1/function.c
     /usr/share/doc/gluegen2/example1/function.cfg
     /usr/share/doc/gluegen2/example1/function.h
     /usr/share/doc/gluegen2/example1/gen.sh
     /usr/share/doc/gluegen2/example2/function.c
     /usr/share/doc/gluegen2/example2/function.cfg
     /usr/share/doc/gluegen2/example2/function.h
     /usr/share/doc/gluegen2/example2/gen.sh
     /usr/share/doc/gluegen2/example3/function.cfg
     /usr/share/doc/gluegen2/example3/function.h
     /usr/share/doc/gluegen2/example3/gen.sh
     /usr/share/doc/gluegen2/example4/function.c
     /usr/share/doc/gluegen2/example4/function.cfg
     /usr/share/doc/gluegen2/example4/function.h
     /usr/share/doc/gluegen2/example4/gen.sh
     /usr/share/doc/gluegen2/example5/function.c
     /usr/share/doc/gluegen2/example5/function.cfg
     /usr/share/doc/gluegen2/example5/function.h
     /usr/share/doc/gluegen2/example5/gen.sh
     /usr/share/doc/gluegen2/example6/function.cfg
     /usr/share/doc/gluegen2/example6/function.h
     /usr/share/doc/gluegen2/example6/gen.sh
     /usr/share/doc/gluegen2/example7/function.cfg
     /usr/share/doc/gluegen2/example7/function.h
     /usr/share/doc/gluegen2/example7/gen.sh
     /usr/share/doc/gluegen2/index.html

Comment 1 Michael Schwendt 2013-12-18 13:29:04 UTC
I see there has been an update in koji without addressing this issue.

Removing from tracker ticket, since the docdir is non-versioned at least.


> %global baserelease 1

This will become problematic for rpmdev-bumpspec. See bug 1043269. There are other packages that define multiple/distinct Release tag values for subpackages, and the script needs to bump a spec file in multiple places. rpmdev-bumpspec isn't able to recognise that this %baserelease is used to define %pkg_release which in turn is used to define %release. Too much macro-usage for just a single Release tag.


> Name:           gluegen2
> Group:          Development/Libraries

Base library packages typically are in group "System Environment/Libraries".


> %files doc
> %doc LICENSE.txt
> %{_docdir}/%{name}

This single %_docdir path entry is the culprit. It refers to the directory created and added by the base package:

  %files
  %doc LICENSE.txt

It would be easy to fix, if you can live with the -doc subpackage installing the files into %{_docdir/%{name}-doc/ instead using %doc magic or during %install and with full paths.

Comment 2 Fedora Update System 2014-01-08 08:24:09 UTC
gluegen2-2.0.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gluegen2-2.0.2-2.fc20

Comment 3 Clément DAVID 2014-01-08 08:41:25 UTC
I fixed all buggy items on this update however I kept "Development/Libraries" as a group. It is the preferred one (at least on my system) :

$ rpmquery --queryformat '%{group}\n' -f /usr/share/java/*.jar |sort |uniq -c 
      1 Applications/Databases
      2 Applications/Internet
      1 Applications/Multimedia
      4 Applications/Text
      1 Development/Documentation
      2 Development/Java
      1 Development/Languages
    176 Development/Libraries
      5 Development/Libraries/Java
     17 Development/Tools
      1 file /usr/share/java/servlet.jar is not owned by any package
     10 System Environment/Libraries
      8 Text Processing/Markup/XML
     12 Unspecified

Comment 4 Michael Schwendt 2014-01-08 10:54:57 UTC
No hard feelings about the Group tag. ;)

It is optional nowadays anyway. A growing number of packagers don't specify it anymore, also because there is no complete and official list of groups.

Just notice that it's a wide-spread packaging mistake to put Java runtime packages in Group "Development/Libraries", and that's why those packages you've queried are a misleading example. 

However, gluegen2 is a corner-case. It doesn't store files in /usr/share/java, it doesn't contain an executable in /usr/bin, it contains runtime libs/jars and therefore it may be seen as a development tool or build-time libs.

$ rpmls -p gluegen2-2.0.2-2.fc20.x86_64.rpm 
-rw-r--r--  /usr/lib/java/gluegen2-rt.jar
drwxr-xr-x  /usr/lib64/gluegen2
lrwxrwxrwx  /usr/lib64/gluegen2/gluegen2-rt.jar
-rwxr-xr-x  /usr/lib64/gluegen2/libgluegen2-rt.so
-rw-r--r--  /usr/share/doc/gluegen2/LICENSE.txt
-rw-r--r--  /usr/share/maven-fragments/gluegen2
-rw-r--r--  /usr/share/maven-poms/JPP-gluegen2-rt.pom

Comment 5 Fedora Update System 2014-01-09 07:42:05 UTC
Package gluegen2-2.0.2-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gluegen2-2.0.2-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0469/gluegen2-2.0.2-2.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-01-21 05:49:18 UTC
gluegen2-2.0.2-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.