>From 5f81c12b15dbd2a17fb24108a85b14dca44f124d Mon Sep 17 00:00:00 2001
From: Ade Lee <alee@redhat.com>
Date: Wed, 30 Oct 2013 17:03:15 -0400
Subject: [PATCH] Added new link for resteasy dependency

    Resteasy 2.3.5 uses apache-commons-io.  Not having a link to
    this jar results in IPA replica installs failing.

    Resolves: rhbz 1024679
---
 base/common/shared/conf/pki.policy            | 4 ++++
 base/java-tools/pki                           | 1 +
 base/server/etc/default.cfg                   | 2 ++
 base/server/scripts/operations                | 1 +
 base/server/src/scriptlets/instance_layout.py | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/base/common/shared/conf/pki.policy b/base/common/shared/conf/pki.policy
index 52e3d7fe1b8cbe8646dcb1fa96a137c2a8232c07..df9157e70fc6ccedc6f2e775110b33ba528b3615 100644
--- a/base/common/shared/conf/pki.policy
+++ b/base/common/shared/conf/pki.policy
@@ -46,6 +46,10 @@ grant codeBase "file:/usr/share/java/apache-commons-collections.jar" {
         permission java.security.AllPermission;
 };
 
+grant codeBase "file:/usr/share/java/apache-commons-io.jar" {
+        permission java.security.AllPermission;
+};
+
 grant codeBase "file:/usr/share/java/apache-commons-lang.jar" {
         permission java.security.AllPermission;
 };
diff --git a/base/java-tools/pki b/base/java-tools/pki
index b7d9bfe26beb5a4e27fe794f2f54669cd7cca555..582162010932abed82fe6c929b235f3603b3cddd 100755
--- a/base/java-tools/pki
+++ b/base/java-tools/pki
@@ -80,6 +80,7 @@ $ENV{CLASSPATH} = "/usr/share/java/${PRODUCT}/pki-certsrv.jar:"
                 . "/usr/share/java/${PRODUCT}/pki-tools.jar:"
                 . "/usr/share/java/apache-commons-cli.jar:"
                 . "/usr/share/java/apache-commons-codec.jar:"
+                . "/usr/share/java/apache-commons-io.jar:"
                 . "/usr/share/java/apache-commons-lang.jar:"
                 . "/usr/share/java/apache-commons-logging.jar:"
                 . "/usr/share/java/commons-httpclient.jar:"
diff --git a/base/server/etc/default.cfg b/base/server/etc/default.cfg
index f4ad2becdae535c0a52cd75e77b0aebdc8f3405f..8559b4255c9e9e939cb5e090903d5cae8005c63f 100644
--- a/base/server/etc/default.cfg
+++ b/base/server/etc/default.cfg
@@ -275,6 +275,7 @@ pki_nsutil_jar_link=%(pki_tomcat_webapps_subsystem_webinf_lib_path)s/pki-nsutil.
 pki_jss_jar=%(jni_jar_dir)s/jss4.jar
 pki_symkey_jar=%(jni_jar_dir)s/symkey.jar
 pki_apache_commons_collections_jar=/usr/share/java/apache-commons-collections.jar
+pki_apache_commons_io_jar=/usr/share/java/apache-commons-io.jar
 pki_apache_commons_lang_jar=/usr/share/java/apache-commons-lang.jar
 pki_apache_commons_logging_jar=/usr/share/java/apache-commons-logging.jar
 pki_commons_codec_jar=/usr/share/java/commons-codec.jar
@@ -304,6 +305,7 @@ pki_xml_commons_resolver_jar=/usr/share/java/xml-commons-resolver.jar
 pki_jss_jar_link=%(pki_tomcat_common_lib_path)s/jss4.jar
 pki_symkey_jar_link=%(pki_tomcat_common_lib_path)s/symkey.jar
 pki_apache_commons_collections_jar_link=%(pki_tomcat_common_lib_path)s/apache-commons-collections.jar
+pki_apache_commons_io_jar_link=%(pki_tomcat_common_lib_path)s/apache-commons-io.jar
 pki_apache_commons_lang_jar_link=%(pki_tomcat_common_lib_path)s/apache-commons-lang.jar
 pki_apache_commons_logging_jar_link=%(pki_tomcat_common_lib_path)s/apache-commons-logging.jar
 pki_commons_codec_jar_link=%(pki_tomcat_common_lib_path)s/apache-commons-codec.jar
diff --git a/base/server/scripts/operations b/base/server/scripts/operations
index 8a703d659af844506b3cc1ede76b5fb664c12f21..df89ea6561da4322621c69912426f13a1fe0baff 100644
--- a/base/server/scripts/operations
+++ b/base/server/scripts/operations
@@ -1197,6 +1197,7 @@ verify_symlinks()
     common_jar_symlinks=(
         [apache-commons-codec.jar]=${java_dir}/commons-codec.jar
         [apache-commons-collections.jar]=${java_dir}/apache-commons-collections.jar
+        [apache-commons-io.jar]=${java_dir}/apache-commons-io.jar
         [apache-commons-lang.jar]=${java_dir}/apache-commons-lang.jar
         [apache-commons-logging.jar]=${java_dir}/apache-commons-logging.jar
         [httpclient.jar]=${java_dir}/httpcomponents/httpclient.jar
diff --git a/base/server/src/scriptlets/instance_layout.py b/base/server/src/scriptlets/instance_layout.py
index 07ae03e9a00c3466cdfe23410f1ebe0259c89847..1f75de793093ade7ae21535ccf7dba2498a180b7 100644
--- a/base/server/src/scriptlets/instance_layout.py
+++ b/base/server/src/scriptlets/instance_layout.py
@@ -88,6 +88,8 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             # establish Tomcat instance common lib jar symbolic links
             util.symlink.create(master['pki_apache_commons_collections_jar'],
                 master['pki_apache_commons_collections_jar_link'])
+            util.symlink.create(master['pki_apache_commons_io_jar'],
+                master['pki_apache_commons_io_jar_link'])
             util.symlink.create(master['pki_apache_commons_lang_jar'],
                 master['pki_apache_commons_lang_jar_link'])
             util.symlink.create(master['pki_apache_commons_logging_jar'],
-- 
1.8.1.4

