In Fedora 22 the Resteasy package has been split into several
subpackages. The pki-core.spec has been modified to depend on
more specific Resteasy packages which depend only on Jackson
1.x. The classpaths and various scripts have been modified to
remove unused references to Jackson 2.x.
https://fedorahosted.org/pki/ticket/1254
--
Endi S. Dewata
The upgrade script does not check that the OS is Fedora 22; I think
it should check before acting, or have I misunderstood?
Fraser
From 5c0cd8d87f33744ea13ebaa242dfe87721b8bcd9 Mon Sep 17 00:00:00
2001
From: "Endi S. Dewata" <edewata(a)redhat.com>
Date: Fri, 30 Jan 2015 15:49:27 -0500
Subject: [PATCH] Updated Resteasy and Jackson dependencies
In Fedora 22 the Resteasy package has been split into several
subpackages. The pki-core.spec has been modified to depend on
more specific Resteasy packages which depend only on Jackson
1.x. The classpaths and various scripts have been modified to
remove unused references to Jackson 2.x.
https://fedorahosted.org/pki/ticket/1254
---
.classpath | 6 ---
base/java-tools/bin/pki | 6 ---
base/server/etc/default.cfg | 6 ---
.../deployment/scriptlets/instance_layout.py | 30 -----------
base/server/scripts/operations | 12 -----
base/server/share/conf/pki.policy | 24 ---------
.../upgrade/10.2.2/03-RemoveDependencyOnJackson2 | 60 ++++++++++++++++++++++
scripts/compose_pki_test_package | 6 ---
specs/pki-core.spec | 13 ++++-
tests/dogtag/dev_java_tests/run_junit_tests.sh | 6 ---
10 files changed, 72 insertions(+), 97 deletions(-)
create mode 100755 base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
diff --git a/.classpath b/.classpath
index 2908ed019e6951bc14b8249f3b8d4af7643709b1..9886a5236a6a88398efe123efdc7688391a88279
100644
--- a/.classpath
+++ b/.classpath
@@ -30,15 +30,9 @@
<classpathentry kind="lib"
path="/usr/share/java/jakarta-commons-httpclient.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/junit.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/ldapjdk.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-annotations.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-core-asl.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-core.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-databind.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-jaxrs.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-mapper-asl.jar"/>
- <classpathentry kind="lib"
path="/usr/share/java/jackson-module-jaxb-annotations.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-mrbean.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-smile.jar"/>
<classpathentry kind="lib"
path="/usr/share/java/jackson/jackson-xc.jar"/>
diff --git a/base/java-tools/bin/pki b/base/java-tools/bin/pki
index 9fd757844c7f0205ec98d0ca88a7a5a013d9d63d..26fad16b1b215663b99da146d59ed7296a9474d1
100644
--- a/base/java-tools/bin/pki
+++ b/base/java-tools/bin/pki
@@ -66,18 +66,12 @@ def run_java_cli(args):
'/usr/share/java/commons-logging.jar',
'/usr/share/java/httpcomponents/httpclient.jar',
'/usr/share/java/httpcomponents/httpcore.jar',
- '/usr/share/java/jackson-annotations.jar',
- '/usr/share/java/jackson-core.jar',
- '/usr/share/java/jackson-databind.jar',
- '/usr/share/java/jackson-module-jaxb-annotations.jar',
'/usr/share/java/jackson/jackson-core-asl.jar',
'/usr/share/java/jackson/jackson-jaxrs.jar',
'/usr/share/java/jackson/jackson-mapper-asl.jar',
'/usr/share/java/jackson/jackson-mrbean.jar',
'/usr/share/java/jackson/jackson-smile.jar',
'/usr/share/java/jackson/jackson-xc.jar',
- '/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar',
-
'/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar',
'/usr/share/java/jaxb-api.jar',
'/usr/share/java/ldapjdk.jar',
'/usr/share/java/servlet.jar',
diff --git a/base/server/etc/default.cfg b/base/server/etc/default.cfg
index 98a3628572e78f71525a95cedd0e473be8a14d9d..d6b50218c971bcfa873189790167d14b4574745c
100644
--- a/base/server/etc/default.cfg
+++ b/base/server/etc/default.cfg
@@ -301,15 +301,9 @@ pki_tps_jar=/usr/share/java/pki/pki-tps.jar
pki_tps_jar_link=%(pki_tomcat_webapps_subsystem_webinf_lib_path)s/pki-tps.jar
# Jackson
-pki_jackson_annotations_jar=/usr/share/java/jackson-annotations.jar
pki_jackson_core_asl_jar=/usr/share/java/jackson/jackson-core-asl.jar
-pki_jackson_core_jar=/usr/share/java/jackson-core.jar
-pki_jackson_databind_jar=/usr/share/java/jackson-databind.jar
-pki_jackson_jaxrs_base_jar=/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar
pki_jackson_jaxrs_jar=/usr/share/java/jackson/jackson-jaxrs.jar
-pki_jackson_jaxrs_json_provider_jar=/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar
pki_jackson_mapper_asl_jar=/usr/share/java/jackson/jackson-mapper-asl.jar
-pki_jackson_module_jaxb_annotations_jar=/usr/share/java/jackson-module-jaxb-annotations.jar
pki_jackson_mrbean_jar=/usr/share/java/jackson/jackson-mrbean.jar
pki_jackson_smile_jar=/usr/share/java/jackson/jackson-smile.jar
pki_jackson_xc_jar=/usr/share/java/jackson/jackson-xc.jar
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
index 7d4ff3054de382ee65d4f912f0f1875b59af85b1..98efcd04f835350309d4c5c67fa641da5ad08f7a
100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -193,51 +193,21 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
# Jackson
deployer.symlink.create(
- deployer.mdict['pki_jackson_annotations_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-annotations.jar'))
- deployer.symlink.create(
deployer.mdict['pki_jackson_core_asl_jar'],
os.path.join(
deployer.mdict['pki_tomcat_common_lib_path'],
'jackson-core-asl.jar'))
deployer.symlink.create(
- deployer.mdict['pki_jackson_core_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-core.jar'))
- deployer.symlink.create(
- deployer.mdict['pki_jackson_databind_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-databind.jar'))
- deployer.symlink.create(
- deployer.mdict['pki_jackson_jaxrs_base_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-jaxrs-base.jar'))
- deployer.symlink.create(
deployer.mdict['pki_jackson_jaxrs_jar'],
os.path.join(
deployer.mdict['pki_tomcat_common_lib_path'],
'jackson-jaxrs.jar'))
deployer.symlink.create(
- deployer.mdict['pki_jackson_jaxrs_json_provider_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-jaxrs-json-provider.jar'))
- deployer.symlink.create(
deployer.mdict['pki_jackson_mapper_asl_jar'],
os.path.join(
deployer.mdict['pki_tomcat_common_lib_path'],
'jackson-mapper-asl.jar'))
deployer.symlink.create(
- deployer.mdict['pki_jackson_module_jaxb_annotations_jar'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_lib_path'],
- 'jackson-module-jaxb-annotations.jar'))
- deployer.symlink.create(
deployer.mdict['pki_jackson_mrbean_jar'],
os.path.join(
deployer.mdict['pki_tomcat_common_lib_path'],
diff --git a/base/server/scripts/operations b/base/server/scripts/operations
index 84511588f1e09017301f8615769e746374a3abee..000d32b1dd1df83df18f3ac22c6e7da31550d529
100644
--- a/base/server/scripts/operations
+++ b/base/server/scripts/operations
@@ -1218,15 +1218,9 @@ verify_symlinks()
[httpcore.jar]=${java_dir}/httpcomponents/httpcore.jar
[javassist.jar]=${java_dir}/javassist.jar
[jaxrs-api.jar]=${RESTEASY_LIB}/jaxrs-api.jar
- [jackson-annotations.jar]=${java_dir}/jackson-annotations.jar
[jackson-core-asl.jar]=${java_dir}/jackson/jackson-core-asl.jar
- [jackson-core.jar]=${java_dir}/jackson-core.jar
- [jackson-databind.jar]=${java_dir}/jackson-databind.jar
-
[jackson-jaxrs-base.jar]=${java_dir}/jackson-jaxrs-providers/jackson-jaxrs-base.jar
[jackson-jaxrs.jar]=${java_dir}/jackson/jackson-jaxrs.jar
-
[jackson-jaxrs-json-provider.jar]=${java_dir}/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar
[jackson-mapper-asl.jar]=${java_dir}/jackson/jackson-mapper-asl.jar
-
[jackson-module-jaxb-annotations.jar]=${java_dir}/jackson-module-jaxb-annotations.jar
[jackson-mrbean.jar]=${java_dir}/jackson/jackson-mrbean.jar
[jackson-smile.jar]=${java_dir}/jackson/jackson-smile.jar
[jackson-xc.jar]=${java_dir}/jackson/jackson-xc.jar
@@ -1255,15 +1249,9 @@ verify_symlinks()
[httpcore.jar]=${java_dir}/httpcore.jar
[javassist.jar]=${java_dir}/javassist.jar
[jaxrs-api.jar]=${RESTEASY_LIB}/jaxrs-api.jar
- [jackson-annotations.jar]=${java_dir}/jackson-annotations.jar
[jackson-core-asl.jar]=${java_dir}/jackson-core-asl.jar
- [jackson-core.jar]=${java_dir}/jackson-core.jar
- [jackson-databind.jar]=${java_dir}/jackson-databind.jar
- [jackson-jaxrs-base.jar]=${java_dir}/jackson-jaxrs-base.jar
[jackson-jaxrs.jar]=${java_dir}/jackson-jaxrs.jar
-
[jackson-jaxrs-json-provider.jar]=${java_dir}/jackson-jaxrs-json-provider.jar
[jackson-mapper-asl.jar]=${java_dir}/jackson-mapper-asl.jar
-
[jackson-module-jaxb-annotations.jar]=${java_dir}/jackson-module-jaxb-annotations.jar
[jackson-mrbean.jar]=${java_dir}/jackson-mrbean.jar
[jackson-smile.jar]=${java_dir}/jackson-smile.jar
[jackson-xc.jar]=${java_dir}/jackson-xc.jar
diff --git a/base/server/share/conf/pki.policy b/base/server/share/conf/pki.policy
index 6a1018825beba4c7af4732d17c750bb373dea3cf..9f1eeaab972ed4271bd6c34a97bdbb4de5a8a61f
100644
--- a/base/server/share/conf/pki.policy
+++ b/base/server/share/conf/pki.policy
@@ -98,42 +98,18 @@ grant codeBase "file:/usr/share/java/jboss-web.jar" {
permission java.security.AllPermission;
};
-grant codeBase "file:/usr/share/java/jackson-annotations.jar" {
- permission java.security.AllPermission;
-};
-
grant codeBase "file:/usr/share/java/jackson/jackson-core-asl.jar" {
permission java.security.AllPermission;
};
-grant codeBase "file:/usr/share/java/jackson-core.jar" {
- permission java.security.AllPermission;
-};
-
-grant codeBase "file:/usr/share/java/jackson-databind.jar" {
- permission java.security.AllPermission;
-};
-
-grant codeBase
"file:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar" {
- permission java.security.AllPermission;
-};
-
grant codeBase "file:/usr/share/java/jackson/jackson-jaxrs.jar" {
permission java.security.AllPermission;
};
-grant codeBase
"file:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar"
{
- permission java.security.AllPermission;
-};
-
grant codeBase "file:/usr/share/java/jackson/jackson-mapper-asl.jar" {
permission java.security.AllPermission;
};
-grant codeBase "file:/usr/share/java/jackson-module-jaxb-annotations.jar" {
- permission java.security.AllPermission;
-};
-
grant codeBase "file:/usr/share/java/jackson/jackson-mrbean.jar" {
permission java.security.AllPermission;
};
diff --git a/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
b/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
new file mode 100755
index 0000000000000000000000000000000000000000..520711c182f7bc1d303512fb275efbe9d762ea6a
--- /dev/null
+++ b/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+# Authors:
+# Endi S. Dewata <edewata(a)redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2015 Red Hat, Inc.
+# All rights reserved.
+#
+
+import os
+
+import pki.server.upgrade
+
+
+class RemoveDependencyOnJackson2(pki.server.upgrade.PKIServerUpgradeScriptlet):
+
+ def __init__(self):
+
+ self.message = 'Remove dependency on Jackson 2'
+
+ def upgrade_instance(self, instance):
+
+ # Tomcat common library
+ common_lib = os.path.join(instance.base_dir, 'common', 'lib')
+
+ # remove old links
+ link = os.path.join(common_lib, 'jackson-annotations.jar')
+ self.remove_link(link)
+
+ link = os.path.join(common_lib, 'jackson-core.jar')
+ self.remove_link(link)
+
+ link = os.path.join(common_lib, 'jackson-databind.jar')
+ self.remove_link(link)
+
+ link = os.path.join(common_lib, 'jackson-jaxrs-base.jar')
+ self.remove_link(link)
+
+ link = os.path.join(common_lib, 'jackson-jaxrs-json-provider.jar')
+ self.remove_link(link)
+
+ link = os.path.join(common_lib, 'jackson-module-jaxb-annotations.jar')
+ self.remove_link(link)
+
+ def remove_link(self, link):
+
+ self.backup(link)
+ os.remove(link)
diff --git a/scripts/compose_pki_test_package b/scripts/compose_pki_test_package
index 524706875abfdbc9ff805dac5c4f4fdcd109060f..b738c6e2b146f6a64bc070ab3758507c6bd83d3e
100755
--- a/scripts/compose_pki_test_package
+++ b/scripts/compose_pki_test_package
@@ -95,15 +95,9 @@ CLASSPATH=$CLASSPATH:`pwd`/src
CLASSPATH=$CLASSPATH:/usr/lib64/jss/jss4.jar
CLASSPATH=$CLASSPATH:/usr/share/java/httpcomponents/httpclient.jar
CLASSPATH=$CLASSPATH:/usr/share/java/httpcomponents/httpcore.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-annotations.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-core-asl.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-core.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-databind.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-jaxrs.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-mapper-asl.jar
-CLASSPATH=$CLASSPATH:/usr/share/java/jackson-module-jaxb-annotations.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-mrbean.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-smile.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-xc.jar
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index dbd5de62ea12f1a501bf64d7fedb307e840702cd..44ba18654f77af9ad6e292af774d42a6e199e194
100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -49,8 +49,19 @@ BuildRequires: resteasy-base-jaxrs >= 3.0.6-1
BuildRequires: resteasy-base-jaxrs-api >= 3.0.6-1
BuildRequires: resteasy-base-jackson-provider >= 3.0.6-1
%else
+%if 0%{?fedora} >= 22
+# Starting from Fedora 22, resteasy packages were split into
+# subpackages.
+BuildRequires: resteasy-atom-provider >= 3.0.6-7
+BuildRequires: resteasy-client >= 3.0.6-7
+BuildRequires: resteasy-jaxb-provider >= 3.0.6-7
+BuildRequires: resteasy-core >= 3.0.6-7
+BuildRequires: resteasy-jaxrs-api >= 3.0.6-7
+BuildRequires: resteasy-jackson-provider >= 3.0.6-7
+%else
BuildRequires: resteasy >= 3.0.6-2
%endif
+%endif
%if ! 0%{?rhel}
BuildRequires: pylint
@@ -226,7 +237,6 @@ Requires: apache-commons-logging
Requires: jakarta-commons-httpclient
Requires: java-headless >= 1:1.7.0
Requires: javassist
-Requires: jackson-jaxrs-json-provider
Requires: jpackage-utils >= 0:1.7.5-10
Requires: jss >= 4.2.6-35
Requires: ldapjdk
@@ -887,6 +897,7 @@ echo >> /var/log/pki/pki-server-upgrade-%{version}.log
2>&1
* Thu Jan 8 2015 Dogtag Team <pki-devel(a)redhat.com> 10.2.2-0.1
- Updated version number to 10.2.2-0.1
- Moved web application deployment locations.
+- Updated Resteasy and Jackson dependencies.
* Thu Jan 8 2015 Dogtag Team <pki-devel(a)redhat.com> 10.2.1-1
- Update release number for release build
diff --git a/tests/dogtag/dev_java_tests/run_junit_tests.sh
b/tests/dogtag/dev_java_tests/run_junit_tests.sh
index 60912af5c24d32c1fa19880cb9ab0ac686f300f5..2bc7a3d74ac9235d0233c5374edb031c844e6857
100644
--- a/tests/dogtag/dev_java_tests/run_junit_tests.sh
+++ b/tests/dogtag/dev_java_tests/run_junit_tests.sh
@@ -31,15 +31,9 @@ run_dev_junit_tests() {
CLASSPATH=$CLASSPATH:/usr/lib64/jss/jss4.jar
CLASSPATH=$CLASSPATH:/usr/share/java/httpcomponents/httpclient.jar
CLASSPATH=$CLASSPATH:/usr/share/java/httpcomponents/httpcore.jar
- CLASSPATH=$CLASSPATH:/usr/share/java/jackson-annotations.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-core-asl.jar
- CLASSPATH=$CLASSPATH:/usr/share/java/jackson-core.jar
- CLASSPATH=$CLASSPATH:/usr/share/java/jackson-databind.jar
- CLASSPATH=$CLASSPATH:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-base.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-jaxrs.jar
-
CLASSPATH=$CLASSPATH:/usr/share/java/jackson-jaxrs-providers/jackson-jaxrs-json-provider.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-mapper-asl.jar
- CLASSPATH=$CLASSPATH:/usr/share/java/jackson-module-jaxb-annotations.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-mrbean.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-smile.jar
CLASSPATH=$CLASSPATH:/usr/share/java/jackson/jackson-xc.jar
--
1.8.4.2