Bug 826776 - Patch for log4j to change OSGi Bundle-SymbolicName to org.apache.log4j
Summary: Patch for log4j to change OSGi Bundle-SymbolicName to org.apache.log4j
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: log4j (Show other bugs)
(Show other bugs)
Version: 17
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-30 23:49 UTC by Gerard Ryan
Modified: 2012-06-26 21:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-26 21:31:35 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
0001-Fix-OSGi-bundle-generation-in-pom.xml.patch (3.07 KB, patch)
2012-05-30 23:49 UTC, Gerard Ryan
no flags Details | Diff

Description Gerard Ryan 2012-05-30 23:49:23 UTC
Created attachment 587876 [details]
0001-Fix-OSGi-bundle-generation-in-pom.xml.patch

Description of problem:

META-INF/MANIFEST.MF has a couple of problems:

In the Import-Package section, it tries to import some packages that it provides. It also tries to import some packages that are not provided by any other package in fedora. Some of these are set to optional, but eclipse-pdebuild fails with an unsatisfied import message for each. In any case, the pom for 1.2.17 [0] no longer tries to import these packages.

There's also the Bundle-SymbolicName. It's set to log4j (probably from either groupId or ArtifactId in pom), but there are some parts of eclipse-wtp-webservices that I'm trying to build, that are looking for org.apache.log4j, which leads me to believe that that's what it should be.

Description of patch:
Git formatted patch, patching git://pkgs.fedoraproject.org/log4j (I'm assuming that that's a good way to submit patches? I've done 826327 and 826147 the same way)

[0] http://search.maven.org/remotecontent?filepath=log4j/log4j/1.2.17/log4j-1.2.17.pom

Comment 1 Stanislav Ochotnicky 2012-05-31 09:51:04 UTC
Hmm, I'll look into updating log4j to 1.2.17 at least in rawhide, depending on the compatibility possibly as an update to F17.

That will fix your problem partially, however I am not sure I can help with the Bundle-Symbolicname. I agree that's what it should be, but upstream produces jars with that name set to "log4j". There is an upstream bug[1] about this, but I'd not be too eager to patch our log4j before upstream accepts that patch. It's been a while since any action on that bug, so it might be a good idea to poke them.

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=49932

Comment 2 Gerard Ryan 2012-05-31 13:27:58 UTC
I'm assuming you've poked them then: the bug was updated today, with the changes accepted. The Bundle-SymbolicName has been changed in upstream trunk[0] (not in 1.2.17[1] yet though).

[0] http://svn.apache.org/viewvc/logging/log4j/trunk/pom.xml?view=markup
[1] http://svn.apache.org/viewvc/logging/log4j/tags/v1_2_17/pom.xml?view=markup

Thanks!

Comment 3 Stanislav Ochotnicky 2012-05-31 13:49:41 UTC
Haha, I would love to get credit for that one :-) Perhaps a coincidence? 

I am fine to fix symbolic name to a new one in trunk now even for F17 in case we can't update. I couldn't find any package using osgi(log4j) so this seems safe to do. Any new users will just have to be modified for new symbolic name in the worst case (an upstreamable change in any case).

New log4j needs a some new dependencies so I might decide to go ahead and just change the symbolicname and fix the manifest for now. Will try to keep you posted

Comment 4 Stanislav Ochotnicky 2012-06-04 09:18:54 UTC
I've built this for rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4124960

It's a little bit different from your patch, since we do have javax.jms implementation already in Fedora (geronimo-jms). It might need an OSGI bundle metadata, but that's for another bug I guess. But bundle name is fixed. If this is going to be satisfactory we can probably backport to F17. If not, we can work on it in rawhide until it's ready.

Comment 5 Gerard Ryan 2012-06-13 23:45:16 UTC
This works for me in rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4160159


So, for f17, should we be looking at just applying the patch to the current 1.2.16 or backport 1.2.17? Either one will be fine for my purposes anyway. I tried to build from your rawhide spec into f17 locally but I wasn't very successful with it!

Comment 6 Fedora Update System 2012-06-15 13:11:24 UTC
log4j-1.2.17-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/log4j-1.2.17-2.fc17

Comment 7 Fedora Update System 2012-06-15 23:54:23 UTC
Package log4j-1.2.17-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing log4j-1.2.17-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9511/log4j-1.2.17-2.fc17
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-06-26 21:31:35 UTC
log4j-1.2.17-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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