Bug 1171898

Summary: maven_depmap.py: Generate ownership on mavenpomdir subdirectories
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: javapackages-toolsAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: rawhideCC: mat.booth, mizdebsk, msimacek, msrb
Target Milestone: ---Keywords: FutureFeature, Upstream, VerifiedUpstream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.5.0-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-09 08:54:22 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 Orion Poplawski 2014-12-08 21:21:08 UTC
Description of problem:

maven_depmap.py does not record the directory that a pom is installed into, resulting in lots of unowned directories in /usr/share/maven-poms:

file /usr/share/maven-poms/slf4j is not owned by any package
file /usr/share/maven-poms/sonatype-oss-parent is not owned by any package
file /usr/share/maven-poms/spice-parent is not owned by any package

Version-Release number of selected component (if applicable):
javapackages-tools-4.2.0-8.fc22.noarch

Comment 1 Orion Poplawski 2014-12-08 21:23:50 UTC
Generated .mfiles:

%attr(0644,root,root) /usr/share/maven-metadata/sonatype-oss-parent.xml
%attr(0644,root,root) /usr/share/maven-poms/sonatype-oss-parent/oss-parent.pom

need a:

%dir /usr/share/maven-poms/sonatype-oss-parent

not sure the %attr() is really necessary.  Without it you could just do:

/usr/share/maven-poms/sonatype-oss-parent/

Comment 2 Mikolaj Izdebski 2014-12-14 21:07:46 UTC
I will consider this for next javapackages release.

Comment 3 Michal Srb 2015-01-05 15:22:02 UTC
I think this may be just a misunderstanding. maven_depmap.py is only used from within %add_maven_depmap macro, i.e. it's only being called on already manually installed artifacts. Since package maintainer had to manually create the subdirectories, I think it's up to him/her to decide which (sub)packages should own them. maven_depmap.py doesn't have enough information to make the decision.


(In reply to Orion Poplawski from comment #0)
> 
> file /usr/share/maven-poms/slf4j is not owned by any package
> file /usr/share/maven-poms/sonatype-oss-parent is not owned by any package
> file /usr/share/maven-poms/spice-parent is not owned by any package
> 

I looked and it seems that none of these packages call maven_depmap.py. All of them use %mvn_install, which means that xmvn-install is responsible for generating .mfiles in this case. This looks like a bug in XMvn and it should be addressed there, if possible.

Comment 4 Orion Poplawski 2015-01-05 15:26:11 UTC
Whoever generates the .mfiles list has the info and should generate the proper ownership.  The guidelines indicate that using .mfiles is all that is necessary.

Comment 5 Mikolaj Izdebski 2015-01-05 15:37:33 UTC
I'll try to make this feature available in Fedora 22, but I need to clear some things with FPC first.

Comment 6 Mikolaj Izdebski 2015-03-16 12:09:54 UTC
Implemented upstream. This will be available in F23+

Comment 7 Mikolaj Izdebski 2015-03-16 12:27:43 UTC
Verified upstream using javapackages-tools-4.5.0-0.39.git6d94451
Now %dir directives are generated for every subdirectory of javadir, jnidir or mavenpomdir.

Comment 8 Mikolaj Izdebski 2015-04-09 08:54:22 UTC
I believe that this feature is included in javapackages-tools-4.5.0-1,
which is available in Fedora Rawhide, so I am closing this bug now.

The build which includes the feature can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=627008

Comment 9 Orion Poplawski 2015-04-10 21:18:18 UTC
Looks good, thanks!