Bug 665388

Summary: jakarta-* jars have been renamed to apache-*, pkicreate fails Fedora 14 and above
Product: [Retired] Dogtag Certificate System Reporter: John Dennis <jdennis>
Component: Installer (pkicreate/pkiremove)Assignee: RHCS Maintainers <rhcs-maint>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: urgent Docs Contact:
Priority: low    
Version: 9.0CC: alee, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:03:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 541012    
Attachments:
Description Flags
setup pki instance jars by searching the installed jars
none
setup pki instance jars by searching the installed jars
none
setup pki instance jars by searching the installed jars alee: review+

Description John Dennis 2010-12-23 14:37:37 UTC
Starting with Fedora 14 jars and classes which were named jakarata have been renamed to apache. We need to detect the flavour of the Java installation and adjust the names we use in pkicreate when setting up the links to the jars.

We may also need to adjust any BuildRequires, Requires in our spec files and/or CMakeLists.txt which reference the affected jars.

We seem to be fortunate in that we do not appear to reference any jakarta class via an import in our Java code, therefore this seems to be a jar rename issue only.

The Fedora rename work is tracked by this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=588764

Comment 1 John Dennis 2010-12-29 04:52:53 UTC
Created attachment 471031 [details]
setup pki instance jars by searching the installed jars

This patch does 3 fundamental things:

1) Adds a utility to find the path to a jar (find_jar)

2) Sets up the pki instance jars by calling find_jar() instead of hard coding their expected location.

3) Conditions the commons-logging and commons-lang jar depending on whether apache-commons is found, else falls back to jakarta-commons

In addition the patch organizes the jar variables, jar setup, etc. by alphabetical jar name so things are consistent and easier to find in the source code.

Comment 2 John Dennis 2010-12-29 05:06:32 UTC
Created attachment 471032 [details]
setup pki instance jars by searching the installed jars

updated patch to check return values

Comment 3 John Dennis 2010-12-29 06:44:34 UTC
Created attachment 471034 [details]
setup pki instance jars by searching the installed jars

Fix the jar search path order, the pki directory should come first giving it highest precedence.

Comment 4 John Dennis 2011-01-04 13:17:06 UTC
Sending        setup/pkicommon.pm
Sending        setup/pkicreate
Transmitting file data ..
Committed revision 1684.