Bug 1166156 - Some OSGI requires/provides not found
Summary: Some OSGI requires/provides not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-20 13:32 UTC by Paul Howarth
Modified: 2015-01-19 06:33 UTC (History)
4 users (show)

Fixed In Version: 4.1.0-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-19 06:33:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch (846 bytes, patch)
2014-11-27 16:41 UTC, Mat Booth
no flags Details | Diff

Description Paul Howarth 2014-11-20 13:32:32 UTC
I am building my own local package of the Oracle Java JDK, and get a dependency error when trying to install the -devel package when it's built on F-21 (x86_64) with the new OSGI dependencies:

Error: Package: java-1.7.0-oracle-devel-1.7.0.72-1.0.cf.x86_64 (/java-1.7.0-oracle-devel-1.7.0.72-1.0.cf.x86_64)
           Requires: osgi(com.jrockit.mc.rjmx)

I have tracked this down to the OSGI dependency generator not processing the MANIFEST.MF file that declares this, and the reason for that is that the installed path for the file is under neither %{_datadir} nor %{_libdir} but /usr/lib/jvm.

I suggest the following change to osgi.attr:

--- old/usr/lib/rpm/fileattrs/osgi.attr
+++ new/usr/lib/rpm/fileattrs/osgi.attr
 %__osgi_provides_opts	%{_builddir}/%{?buildsubdir}
 %__osgi_requires	%{_rpmconfigdir}/osgi.req
 %__osgi_requires_opts	%{_builddir}/%{?buildsubdir}
-%__osgi_path	^(.*\\.jar$|((%{_libdir}|%{_datadir}).*/MANIFEST.MF))
+%__osgi_path	^(.*\\.jar$|.*/META-INF/MANIFEST\\.MF$)

This would be more in line with the javapackages.common.osgi python module, which has:

def open_manifest(path):
    mf = None
    if path.endswith("META-INF/MANIFEST.MF"):
        mf = open(path, "rb")

Comment 1 Mikolaj Izdebski 2014-11-20 15:16:02 UTC
This is already fixed upstream: https://github.com/mizdebsk/javapackages/commit/c134f44f

Comment 2 Paul Howarth 2014-11-20 15:20:34 UTC
Is this likely to find its way into Fedora any time soon?

Comment 3 Mikolaj Izdebski 2014-11-20 15:25:31 UTC
I've commited further improvement to the pattern used: https://github.com/mizdebsk/javapackages/commit/4bdba501

(In reply to Paul Howarth from comment #2)
> Is this likely to find its way into Fedora any time soon?

I will prepare an update tomorrow.

Comment 4 Mikolaj Izdebski 2014-11-21 05:18:37 UTC
Fixed in javapackages-tools-4.1.0-4

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

Comment 6 Fedora Update System 2014-11-22 20:20:31 UTC
Package javapackages-tools-4.1.0-4.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-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15584/javapackages-tools-4.1.0-4.fc21
then log in and leave karma (feedback).

Comment 7 Mat Booth 2014-11-27 16:40:37 UTC
Hmm, this change seems to break generating osgi provides for dir-shaped eclipse bundles such as those that might be found in /usr/lib64/eclipse

Please see the attached patch for a suggested fix

Comment 8 Mat Booth 2014-11-27 16:41:17 UTC
Created attachment 962184 [details]
Proposed patch

Comment 9 Mikolaj Izdebski 2014-11-28 11:31:37 UTC
Fixed in javapackages-tools-4.1.0-7

Comment 10 Fedora Update System 2014-12-06 09:56:50 UTC
javapackages-tools-4.1.0-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Mat Booth 2014-12-07 14:40:33 UTC
What happened here?

javapackages-tools-4.1.0-4.fc21 was unpushed, no?

Comment 12 Mat Booth 2014-12-07 14:42:36 UTC
Is it possible to submit javapackages-tools-4.1.0-7.fc21 as an update?

Comment 13 Mikolaj Izdebski 2015-01-12 14:22:41 UTC
Fixed in javapackages-tools-4.1.0-7

Comment 14 Mikolaj Izdebski 2015-01-19 06:33:41 UTC
I believe that this bug is fixed in javapackages-tools-4.1.0-7,
which is available in updates for 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=596077


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