Bug 1166743 - xmvn: xmvn-install adds incorrect SCL namespace to metadata
Summary: xmvn: xmvn-install adds incorrect SCL namespace to metadata
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xmvn
Version: 21
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-21 15:48 UTC by Mat Booth
Modified: 2014-12-14 21:01 UTC (History)
3 users (show)

Fixed In Version: 2.0.1-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-14 21:01:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mat Booth 2014-11-21 15:48:44 UTC
When I build a java package inside an SCL on Fedora 21, the auto generated provides/requires do not have the SCL name prefix.

The package in question uses this idiom:

%build
%{?scl:scl enable %{scl} - << "EOF"}
%mvn_artifact pom.xml icu4j.jar
%{?scl:EOF}

%install
%{?scl:scl enable %{scl} - << "EOF"}
%mvn_install -J doc
%{?scl:EOF}

For example, see this SRPM: https://fedorapeople.org/~mbooth/copr/eclipse-mars-icu4j-54.1.1-4.fc21.1.src.rpm

When built inside an SCL, I get result:

$ rpm -q --provides -p noarch/eclipse-mars-icu4j-54.1.1-4.fc22.1.noarch.rpm
eclipse-mars-icu4j = 1:54.1.1-4.fc22.1
eclipse-mars-icu4j-eclipse = 1:54.1.1-4.fc22.1
mvn(com.ibm.icu:icu4j) = 54.1.1
mvn(com.ibm.icu:icu4j:pom:) = 54.1.1
osgi(com.ibm.icu) = 54.1.1
scl-package(eclipse-mars)

What I expect to see:

$ rpm -q --provides -p noarch/eclipse-mars-icu4j-54.1.1-4.fc22.1.noarch.rpm
eclipse-mars-icu4j = 1:54.1.1-4.fc22.1
eclipse-mars-icu4j-eclipse = 1:54.1.1-4.fc22.1
eclipse-mars-mvn(com.ibm.icu:icu4j) = 54.1.1
eclipse-mars-mvn(com.ibm.icu:icu4j:pom:) = 54.1.1
osgi(com.ibm.icu) = 54.1.1
scl-package(eclipse-mars)

Comment 1 Michal Srb 2014-11-24 08:21:39 UTC
Hmm... I always thought that it was responsibility of xmvn-install to provide all necessary information regarding SCLs. There is no <namespace> element in metadata, so there are no SCL requires/provides.

Nevertheless, fixing it javapackages shouldn't be difficult.

Comment 2 Mikolaj Izdebski 2014-11-24 08:30:03 UTC
(In reply to Michal Srb from comment #1)
> Hmm... I always thought that it was responsibility of xmvn-install to
> provide all necessary information regarding SCLs. There is no <namespace>
> element in metadata, so there are no SCL requires/provides.

The way it was supposed to be implemented: macros that define artifacts (i.e. %mvn_build, %mvn_artifacts and %add_maven_depmap) should add <namespace> elements to artifacts they define. xmvn-install copies namespace to package metadata, from where it is read by dependency generators. (This way different artifacts could even be installed in different SCLs.)

Currently only %mvn_build and %add_maven_depmap implement SCL detection. What is missing is SCL support in %mvn_artifact.

Comment 3 Mikolaj Izdebski 2014-11-24 08:34:43 UTC
(In reply to Mat Booth from comment #0)
> What I expect to see:
...
> osgi(com.ibm.icu) = 54.1.1

I would expect eclipse-mars-osgi(com.ibm.icu) = 54.1.1

The JAR should be present in Maven metadata with namespace "eclipse-mars", so OSGi dep generator should generate properly SCL-ized provides.

Comment 4 Fedora Update System 2014-11-24 11:24:17 UTC
javapackages-tools-4.1.0-5.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/javapackages-tools-4.1.0-5.fc21

Comment 5 Michal Srb 2014-11-24 11:31:13 UTC
The situation around SCL-ized OSGi provides/requires is a bit tricky and I need to think it through first. For example I don't see a reliable way of generating SCL-ized OSGi requires, because I have no obvious way of determining whether some particular R should be satisfied from base system, from same SCL or some other SCL.

Comment 6 Fedora Update System 2014-11-24 20:58:23 UTC
Package javapackages-tools-4.1.0-5.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing javapackages-tools-4.1.0-5.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15650/javapackages-tools-4.1.0-5.fc21
then log in and leave karma (feedback).

Comment 7 Mat Booth 2014-11-26 11:49:39 UTC
Hi, this still does not work for me. It's even worse in fact since now there is an exception:

http://paste.fedoraproject.org/154240/14170022/

Here is the excerpt from the spec file:

http://paste.fedoraproject.org/154241/00241914/

Comment 8 Mikolaj Izdebski 2014-11-26 13:58:23 UTC
Fixed in xmvn-2.0.1-3

Comment 9 Fedora Update System 2014-11-26 14:11:16 UTC
xmvn-2.0.1-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/xmvn-2.0.1-3.fc21

Comment 10 Mikolaj Izdebski 2014-11-28 05:24:53 UTC
Moving to QA for testing.

Comment 11 Fedora Update System 2014-12-06 10:29:57 UTC
xmvn-2.0.1-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Mikolaj Izdebski 2014-12-14 21:01:24 UTC
I believe that this bug is fixed in xmvn-2.0.1-3,
which is available in Fedora 21, so I am closing this bug now.

The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=595732


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