From 6134caca9de31f6add96bd6825e755a951e64b4a Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Sat, 18 Aug 2012 00:40:52 -0500
Subject: [PATCH] Merged pki-native-tools and pki-java-tools.

The pki-native-tools and pki-java-tools have been merged into
pki-tools and pki-server will depend on it. Since pki-ra and
pki-tps depends on pki-server they automatically depends on
pki-tools as well.

Ticket #295
---
 base/setup/pki                |   4 +-
 base/silent/scripts/pkisilent |   2 +-
 scripts/build_dogtag_pki      |   5 +-
 specs/dogtag-pki.spec         |   8 ++-
 specs/pki-core.spec           | 156 +++++++++++++++++++-----------------------
 specs/pki-ra.spec             |   8 ++-
 specs/pki-tps.spec            |   8 ++-
 7 files changed, 91 insertions(+), 100 deletions(-)

diff --git a/base/setup/pki b/base/setup/pki
index 598d8f310fdaf1dc8f544dca3aae1955d888e366..4b9432fa03674e01ab8d8749190b8b8e6af53787 100755
--- a/base/setup/pki
+++ b/base/setup/pki
@@ -33,8 +33,8 @@ my $libpath="";
 sub invalid_architecture()
 {
     print "\n";
-    print "ERROR:  pkisilent does not execute on this architecture\n";
-    print "ERROR:  check to make sure pki-native-tools package is installed!\n";
+    print "ERROR:  pki does not execute on this architecture\n";
+    print "ERROR:  check to make sure pki-tools package is installed!\n";
     print "\n";
 }
 
diff --git a/base/silent/scripts/pkisilent b/base/silent/scripts/pkisilent
index c5be67855d4b2dc43223d0db74faaf5e8ee641de..e9b154437a2de6cec54f1ea97cf99f80522645aa 100755
--- a/base/silent/scripts/pkisilent
+++ b/base/silent/scripts/pkisilent
@@ -34,7 +34,7 @@ sub invalid_architecture()
 {
     print "\n";
     print "ERROR:  pkisilent does not execute on this architecture\n";
-    print "ERROR:  check to make sure pki-native-tools package is installed!\n";
+    print "ERROR:  check to make sure pki-tools package is installed!\n";
     print "\n";
 }
 
diff --git a/scripts/build_dogtag_pki b/scripts/build_dogtag_pki
index 73fbf696d0436aead38a4aabbcb2db8aa6a5d60a..ce6c02236aea12158977deca1f9c370610b767ea 100755
--- a/scripts/build_dogtag_pki
+++ b/scripts/build_dogtag_pki
@@ -129,10 +129,9 @@ PKI_CONSOLE_THEME=${PKI_FLAVOR}-pki-console-theme${RPM_EXT}
 # Establish PKI core package names
 PKI_SETUP=pki-setup${RPM_EXT}
 PKI_SYMKEY=pki-symkey${RPM_EXT}
-PKI_NATIVE_TOOLS=pki-native-tools${RPM_EXT}
 PKI_BASE=pki-base${RPM_EXT}
 PKI_UTIL_JAVADOC=pki-util-javadoc${RPM_EXT}
-PKI_JAVA_TOOLS=pki-java-tools${RPM_EXT}
+PKI_TOOLS=pki-tools${RPM_EXT}
 PKI_JAVA_TOOLS_JAVADOC=pki-java-tools-javadoc${RPM_EXT}
 PKI_SERVER=pki-server${RPM_EXT}
 PKI_COMMON_JAVADOC=pki-common-javadoc${RPM_EXT}
@@ -175,7 +174,7 @@ cd ${PKI_CORE_PACKAGES_DIR}/${RPM_DIR}
 mkdir -p ${PKI_CORE_PACKAGES_DIR}/${RPM_DIR}/${COMBINED}
 cp -p ${NOARCH}/*.rpm ${PKI_ARCH}/*.rpm ${PKI_CORE_PACKAGES_DIR}/${RPM_DIR}/${COMBINED}
 cd ${PKI_CORE_PACKAGES_DIR}/${RPM_DIR}/${COMBINED}
-${PKI_SUDO} ${YUM_EXE} ${YUM_EXE_OPTIONS} ${PKI_SETUP} ${PKI_SYMKEY} ${PKI_NATIVE_TOOLS} ${PKI_BASE} ${PKI_UTIL_JAVADOC} ${PKI_JAVA_TOOLS} ${PKI_JAVA_TOOLS_JAVADOC} ${PKI_SERVER} ${PKI_COMMON_JAVADOC} ${PKI_SELINUX} ${PKI_CA} ${PKI_KRA} ${PKI_OCSP} ${PKI_TKS} ${PKI_SILENT}
+${PKI_SUDO} ${YUM_EXE} ${YUM_EXE_OPTIONS} ${PKI_SETUP} ${PKI_SYMKEY} ${PKI_BASE} ${PKI_UTIL_JAVADOC} ${PKI_TOOLS} ${PKI_JAVA_TOOLS_JAVADOC} ${PKI_SERVER} ${PKI_COMMON_JAVADOC} ${PKI_SELINUX} ${PKI_CA} ${PKI_KRA} ${PKI_OCSP} ${PKI_TKS} ${PKI_SILENT}
 
 # Compose and install 'pki-ra' packages
 cd ${PKI_PWD}
diff --git a/specs/dogtag-pki.spec b/specs/dogtag-pki.spec
index d93904e4746232d99f739e197b83b99ce1d7a3ff..3b5254dc2351cece99cde4309a552e6170d3ddfa 100644
--- a/specs/dogtag-pki.spec
+++ b/specs/dogtag-pki.spec
@@ -8,7 +8,7 @@
 Summary:          Dogtag Public Key Infrastructure (PKI) Suite
 Name:             dogtag-pki
 Version:          10.0.0
-Release:          %{?relprefix}7%{?prerel}%{?dist}
+Release:          %{?relprefix}8%{?prerel}%{?dist}
 # The entire source code is GPLv2 except for 'pki-tps' which is LGPLv2
 License:          GPLv2 and LGPLv2
 URL:              http://pki.fedoraproject.org/
@@ -97,8 +97,7 @@ Requires:         dogtag-pki-tps-theme >= %{dogtag_pki_theme_version}
 # of ALL Dogtag PKI core packages
 Requires:         pki-ca >= %{pki_core_version}
 Requires:         pki-server >= %{pki_core_version}
-Requires:         pki-java-tools >= %{pki_core_version}
-Requires:         pki-native-tools >= %{pki_core_version}
+Requires:         pki-tools >= %{pki_core_version}
 Requires:         pki-selinux >= %{pki_core_version}
 Requires:         pki-setup >= %{pki_core_version}
 Requires:         pki-silent >= %{pki_core_version}
@@ -198,6 +197,9 @@ rm -rf %{buildroot}
 %doc README
 
 %changelog
+* Wed Aug 22 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.8.a1
+- Replaced pki-native-tools and pki-java-tools with pki-tools
+
 * Wed Aug 22 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.7.a1
 - Replaced pki-util, pki-deploy, pki-common with pki-base and pki-server
 
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index 90b265a856a3269c99630dd5748791e7d22f582d..195feadacdb76e170274cda3dc7c4a53d099cbab 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -14,7 +14,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 
 Name:             pki-core
 Version:          10.0.0
-Release:          %{?relprefix}24%{?prerel}%{?dist}
+Release:          %{?relprefix}25%{?prerel}%{?dist}
 Summary:          Certificate System - PKI Core Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -119,12 +119,11 @@ PKI Core contains ALL top-level java-based Tomcat PKI components:      \
                                                                        \
   * pki-setup                                                          \
   * pki-symkey                                                         \
-  * pki-native-tools                                                   \
   * pki-util-javadoc                                                   \
-  * pki-java-tools                                                     \
   * pki-java-tools-javadoc                                             \
   * pki-base                                                           \
   * pki-common-javadoc                                                 \
+  * pki-tools                                                   \
   * pki-selinux                                                        \
   * pki-server                                                         \
   * pki-ca                                                             \
@@ -143,7 +142,7 @@ For deployment purposes, PKI Core contains fundamental packages        \
 required by BOTH native-based Apache AND java-based Tomcat             \
 Certificate System instances consisting of the following components:   \
                                                                        \
-  * pki-native-tools                                                   \
+  * pki-tools                                                          \
   * pki-selinux                                                        \
   * pki-setup                                                          \
   * pki-silent (required for IPA deployments; optional otherwise)      \
@@ -153,8 +152,8 @@ required ONLY by ALL java-based Tomcat Certificate System instances:   \
                                                                        \
   * pki-symkey                                                         \
   * pki-base                                                           \
+  * pki-tools                                                          \
   * pki-server                                                         \
-  * pki-java-tools                                                     \
                                                                        \
 PKI Core also includes the following components:                       \
                                                                        \
@@ -221,23 +220,6 @@ This package is a part of the PKI Core used by the Certificate System.
 %{overview}
 
 
-%package -n       pki-native-tools
-Summary:          Certificate System - Native Tools
-Group:            System Environment/Base
-
-Requires:         openldap-clients
-Requires:         nss
-Requires:         nss-tools
-
-%description -n   pki-native-tools
-These platform-dependent PKI executables are used to help make
-Certificate System into a more complete and robust PKI solution.
-
-This package is a part of the PKI Core used by the Certificate System.
-
-%{overview}
-
-
 %package -n       pki-util-javadoc
 Summary:          Certificate System - PKI Utility Framework Javadocs
 Group:            Documentation
@@ -253,30 +235,6 @@ This package is a part of the PKI Core used by the Certificate System.
 %{overview}
 
 
-%package -n       pki-java-tools
-Summary:          Certificate System - PKI Java-Based Tools
-Group:            System Environment/Base
-
-BuildArch:        noarch
-
-Requires:         java >= 1:1.6.0
-Requires:         pki-native-tools = %{version}-%{release}
-Requires:         pki-base = %{version}-%{release}
-%if 0%{?fedora} >= 16
-Requires:         jpackage-utils >= 0:1.7.5-10
-%else
-Requires:         jpackage-utils
-%endif
-
-%description -n   pki-java-tools
-These platform-independent PKI executables are used to help make
-Certificate System into a more complete and robust PKI solution.
-
-This package is a part of the PKI Core used by the Certificate System.
-
-%{overview}
-
-
 %package -n       pki-java-tools-javadoc
 Summary:          Certificate System - PKI Java-Based Tools Javadocs
 Group:            Documentation
@@ -367,6 +325,33 @@ This package is a part of the PKI Core used by the Certificate System.
 %{overview}
 
 
+%package -n       pki-tools
+Summary:          Certificate System - PKI Tools
+Group:            System Environment/Base
+
+Obsoletes:        pki-native-tools < %{version}-%{release}
+Obsoletes:        pki-java-tools < %{version}-%{release}
+
+Requires:         openldap-clients
+Requires:         nss
+Requires:         nss-tools
+Requires:         java >= 1:1.6.0
+Requires:         pki-base = %{version}-%{release}
+%if 0%{?fedora} >= 16
+Requires:         jpackage-utils >= 0:1.7.5-10
+%else
+Requires:         jpackage-utils
+%endif
+
+%description -n   pki-tools
+This package contains PKI executables that can be used to help make
+Certificate System into a more complete and robust PKI solution.
+
+This package is a part of the PKI Core used by the Certificate System.
+
+%{overview}
+
+
 %package -n       pki-server
 Summary:          Certificate System - PKI Server Framework
 Group:            System Environment/Base
@@ -376,6 +361,7 @@ BuildArch:        noarch
 Obsoletes:        pki-deploy < %{version}-%{release}
 
 Requires:         pki-base = %{version}-%{release}
+Requires:         pki-tools = %{version}-%{release}
 Requires:         pki-selinux = %{version}-%{release}
 %if 0%{?fedora} >= 18
 Requires(post):   systemd-units
@@ -1123,7 +1109,41 @@ fi
 %{_libdir}/symkey/
 
 
-%files -n pki-native-tools
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
+%files -n pki-util-javadoc
+%defattr(-,root,root,-)
+%{_javadocdir}/pki-util-%{version}/
+%endif
+
+
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
+%files -n pki-java-tools-javadoc
+%defattr(-,root,root,-)
+%{_javadocdir}/pki-java-tools-%{version}/
+%endif
+
+
+%files -n pki-base
+%defattr(-,root,root,-)
+%doc base/common/LICENSE
+%dir %{_javadir}/pki
+%{_javadir}/pki/pki-cmsutil-%{version}.jar
+%{_javadir}/pki/pki-cmsutil.jar
+%{_javadir}/pki/pki-nsutil-%{version}.jar
+%{_javadir}/pki/pki-nsutil.jar
+%{_javadir}/pki/pki-certsrv-%{version}.jar
+%{_javadir}/pki/pki-certsrv.jar
+%{_javadir}/pki/pki-client-%{version}.jar
+%{_javadir}/pki/pki-client.jar
+
+%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
+%files -n pki-common-javadoc
+%defattr(-,root,root,-)
+%{_javadocdir}/pki-common-%{version}/
+%endif
+
+
+%files -n pki-tools
 %defattr(-,root,root,-)
 %doc base/native-tools/LICENSE base/native-tools/doc/README
 %{_bindir}/p7tool
@@ -1133,18 +1153,6 @@ fi
 %{_bindir}/tkstool
 %dir %{_datadir}/pki
 %{_datadir}/pki/native-tools/
-
-
-%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
-%files -n pki-util-javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/pki-util-%{version}/
-%endif
-
-
-%files -n pki-java-tools
-%defattr(-,root,root,-)
-%doc base/java-tools/LICENSE
 %{_bindir}/AtoB
 %{_bindir}/AuditVerify
 %{_bindir}/BtoA
@@ -1169,32 +1177,6 @@ fi
 %{_javadir}/pki/pki-tools.jar
 %{_datadir}/pki/java-tools/
 
-%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
-%files -n pki-java-tools-javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/pki-java-tools-%{version}/
-%endif
-
-
-%files -n pki-base
-%defattr(-,root,root,-)
-%doc base/common/LICENSE
-%dir %{_javadir}/pki
-%{_javadir}/pki/pki-cmsutil-%{version}.jar
-%{_javadir}/pki/pki-cmsutil.jar
-%{_javadir}/pki/pki-nsutil-%{version}.jar
-%{_javadir}/pki/pki-nsutil.jar
-%{_javadir}/pki/pki-certsrv-%{version}.jar
-%{_javadir}/pki/pki-certsrv.jar
-%{_javadir}/pki/pki-client-%{version}.jar
-%{_javadir}/pki/pki-client.jar
-
-%if %{?_without_javadoc:0}%{!?_without_javadoc:1}
-%files -n pki-common-javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/pki-common-%{version}/
-%endif
-
 
 %files -n pki-server
 %defattr(-,root,root,-)
@@ -1392,6 +1374,10 @@ fi
 
 
 %changelog
+* Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.25.a1
+- Merged pki-native-tools and pki-java-tools into pki-tools.
+- Modified pki-server to depend on pki-tools.
+
 * Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.24.a1
 - Split pki-common into pki-base and pki-server.
 - Merged pki-util into pki-base.
diff --git a/specs/pki-ra.spec b/specs/pki-ra.spec
index b212007cbd9237e91ec2f0b098928fce0e4d33a2..26483332eef95ec3558fdcb0f801551d5f8c3910 100644
--- a/specs/pki-ra.spec
+++ b/specs/pki-ra.spec
@@ -7,7 +7,7 @@
 
 Name:             pki-ra
 Version:          10.0.0
-Release:          %{?relprefix}4%{?prerel}%{?dist}
+Release:          %{?relprefix}5%{?prerel}%{?dist}
 Summary:          Certificate System - Registration Authority
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -30,7 +30,6 @@ Requires:         mod_nss >= 1.0.8
 Requires:         mod_perl >= 1.99_16
 Requires:         mod_revocator >= 1.0.3
 Requires:         pki-server >= 10.0.0
-Requires:         pki-native-tools >= 10.0.0
 Requires:         pki-ra-theme >= 10.0.0
 Requires:         pki-setup
 Requires:         perl-DBD-SQLite
@@ -67,7 +66,7 @@ For deployment purposes, an RA requires the following components from the PKI
 Core package:
 
   * pki-setup
-  * pki-native-tools
+  * pki-tools
   * pki-selinux
 
 and can also make use of the following optional components from the PKI Core
@@ -244,6 +243,9 @@ fi
 
 
 %changelog
+* Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.5.a1
+- Removed direct dependency on 'pki-native-tools'.
+
 * Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.4.a1
 - Replaced 'pki-deploy' with 'pki-server'.
 
diff --git a/specs/pki-tps.spec b/specs/pki-tps.spec
index 16f88d74e2fe6b48971d6d4e85ae2d980dd4160e..abf7fa3ae99555ffee008fcb8c19969da0be68d4 100644
--- a/specs/pki-tps.spec
+++ b/specs/pki-tps.spec
@@ -7,7 +7,7 @@
 
 Name:             pki-tps
 Version:          10.0.0
-Release:          %{?relprefix}4%{?prerel}%{?dist}
+Release:          %{?relprefix}5%{?prerel}%{?dist}
 Summary:          Certificate System - Token Processing System
 URL:              http://pki.fedoraproject.org/
 License:          LGPLv2
@@ -39,7 +39,6 @@ Requires:         mod_revocator
 Requires:         openldap-clients
 Requires:         perl-Mozilla-LDAP
 Requires:         pki-server >= 10.0.0
-Requires:         pki-native-tools >= 10.0.0
 Requires:         pki-setup
 Requires:         pki-tps-theme >= 10.0.0
 
@@ -80,7 +79,7 @@ For deployment purposes, a TPS requires the following components from the \
 PKI Core package:                                                         \
                                                                           \
   * pki-setup                                                             \
-  * pki-native-tools                                                      \
+  * pki-tools                                                      \
   * pki-selinux                                                           \
                                                                           \
 and can also make use of the following optional components from the       \
@@ -279,6 +278,9 @@ fi
 
 
 %changelog
+* Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.5.a1
+- Removed direct dependency on 'pki-native-tools'.
+
 * Mon Aug 20 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.4.a1
 - Replaced 'pki-deploy' with 'pki-server'.
 
-- 
1.7.11.2

