From 10b7e73736a3c0e086cf120713830e03898f6ea5 Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata <edewata@redhat.com>
Date: Mon, 24 Sep 2012 14:27:22 -0500
Subject: [PATCH] Merged pki-setup into pki-server.

The scripts to create and remove PKI instances have been moved from
pki-setup into pki-server package.

Ticket #336
---
 scripts/build_dogtag_pki |  7 ++---
 specs/dogtag-pki.spec    | 11 ++++----
 specs/pki-core.spec      | 66 ++++++++++++++++++------------------------------
 specs/pki-ra.spec        |  8 +++---
 specs/pki-tps.spec       |  8 +++---
 5 files changed, 43 insertions(+), 57 deletions(-)

diff --git a/scripts/build_dogtag_pki b/scripts/build_dogtag_pki
index ce6c02236aea12158977deca1f9c370610b767ea..5767f77b019aee9640a5014618995ac0d9962685 100755
--- a/scripts/build_dogtag_pki
+++ b/scripts/build_dogtag_pki
@@ -127,14 +127,11 @@ PKI_TPS_THEME=${PKI_FLAVOR}-pki-tps-theme${RPM_EXT}
 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_BASE=pki-base${RPM_EXT}
-PKI_UTIL_JAVADOC=pki-util-javadoc${RPM_EXT}
+PKI_JAVADOC=pki-javadoc${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}
 PKI_SELINUX=pki-selinux${RPM_EXT}
 PKI_CA=pki-ca${RPM_EXT}
 PKI_KRA=pki-kra${RPM_EXT}
@@ -174,7 +171,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_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}
+${PKI_SUDO} ${YUM_EXE} ${YUM_EXE_OPTIONS} ${PKI_SYMKEY} ${PKI_BASE} ${PKI_JAVADOC} ${PKI_TOOLS} ${PKI_SERVER} ${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 3b5254dc2351cece99cde4309a552e6170d3ddfa..698b079375d7819bc89d7b81ac41547580d6c432 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}8%{?prerel}%{?dist}
+Release:          %{?relprefix}9%{?prerel}%{?dist}
 # The entire source code is GPLv2 except for 'pki-tps' which is LGPLv2
 License:          GPLv2 and LGPLv2
 URL:              http://pki.fedoraproject.org/
@@ -99,16 +99,13 @@ Requires:         pki-ca >= %{pki_core_version}
 Requires:         pki-server >= %{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}
 Requires:         pki-symkey >= %{pki_core_version}
 Requires:         pki-base >= %{pki_core_version}
 
 # Make certain that this 'meta' package requires the latest version(s)
 # of ALL Dogtag PKI core javadocs
-Requires:         pki-common-javadoc >= %{pki_core_version}
-Requires:         pki-java-tools-javadoc >= %{pki_core_version}
-Requires:         pki-util-javadoc >= %{pki_core_version}
+Requires:         pki-javadoc >= %{pki_core_version}
 
 # Make certain that this 'meta' package requires the latest version(s)
 # of ALL other Dogtag PKI subsystems
@@ -197,6 +194,10 @@ rm -rf %{buildroot}
 %doc README
 
 %changelog
+* Mon Sep 24 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.9.a1
+- Merged pki-setup into pki-server
+- Fixed pki-javadoc dependency
+
 * 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
 
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index 158e14ed96c89cc87d163d35ce5a2cc07a2e96e9..cddb0ebcf3d0f2de76adfbf25ef975ceae7bde9f 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}33%{?prerel}%{?dist}
+Release:          %{?relprefix}34%{?prerel}%{?dist}
 Summary:          Certificate System - PKI Core Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -113,7 +113,6 @@ to manage enterprise Public Key Infrastructure (PKI) deployments.      \
                                                                        \
 PKI Core contains ALL top-level java-based Tomcat PKI components:      \
                                                                        \
-  * pki-setup                                                          \
   * pki-symkey                                                         \
   * pki-base                                                           \
   * pki-tools                                                          \
@@ -138,7 +137,6 @@ Certificate System instances consisting of the following components:   \
                                                                        \
   * pki-tools                                                          \
   * pki-selinux                                                        \
-  * pki-setup                                                          \
   * pki-silent (required for IPA deployments; optional otherwise)      \
                                                                        \
 Additionally, PKI Core contains the following fundamental packages     \
@@ -165,26 +163,6 @@ ONLY ONE of the following "Mutually-Exclusive" PKI Theme packages:     \
 %description %{overview}
 
 
-%package -n       pki-setup
-Summary:          Certificate System - PKI Instance Creation & Removal Scripts
-Group:            System Environment/Base
-
-BuildArch:        noarch
-
-Requires:         perl(File::Slurp)
-Requires:         perl(XML::LibXML)
-Requires:         perl-Crypt-SSLeay
-Requires:         policycoreutils
-Requires:         openldap-clients
-
-%description -n   pki-setup
-PKI setup scripts are used to create and remove instances from PKI deployments.
-
-This package is a part of the PKI Core used by the Certificate System.
-
-%{overview}
-
-
 %package -n       pki-symkey
 Summary:          Symmetric Key JNI Package
 Group:            System Environment/Libraries
@@ -301,7 +279,13 @@ Group:            System Environment/Base
 BuildArch:        noarch
 
 Obsoletes:        pki-deploy < %{version}-%{release}
+Obsoletes:        pki-setup < %{version}-%{release}
 
+Requires:         perl(File::Slurp)
+Requires:         perl(XML::LibXML)
+Requires:         perl-Crypt-SSLeay
+Requires:         policycoreutils
+Requires:         openldap-clients
 Requires:         jython >= 2.2.1
 Requires:         pki-common-theme >= 10.0.0
 Requires:         pki-base = %{version}-%{release}
@@ -1045,24 +1029,6 @@ fi
 ##        PKI deployment process
 %endif
 
-%files -n pki-setup
-%defattr(-,root,root,-)
-%doc base/setup/LICENSE
-%{_bindir}/pkicreate
-%{_bindir}/pkiremove
-%{_bindir}/pki-setup-proxy
-%dir %{_datadir}/pki
-%dir %{_datadir}/pki/scripts
-%{_datadir}/pki/scripts/pkicommon.pm
-%{_datadir}/pki/scripts/functions
-%{_datadir}/pki/scripts/pki_apache_initscript
-%dir %{_localstatedir}/lock/pki
-%dir %{_localstatedir}/run/pki
-%if 0%{?fedora} >= 16
-%{_bindir}/pkicontrol
-%endif
-
-
 %files -n pki-symkey
 %defattr(-,root,root,-)
 %doc base/symkey/LICENSE
@@ -1165,6 +1131,21 @@ fi
 %{_javadir}/pki/pki-tomcat.jar
 %dir %{_localstatedir}/lock/pki/tomcat
 %dir %{_localstatedir}/run/pki/tomcat
+%{_bindir}/pkicreate
+%{_bindir}/pkiremove
+%{_bindir}/pki-setup-proxy
+%dir %{_datadir}/pki
+%dir %{_datadir}/pki/scripts
+%{_datadir}/pki/scripts/pkicommon.pm
+%{_datadir}/pki/scripts/functions
+%{_datadir}/pki/scripts/pki_apache_initscript
+%dir %{_localstatedir}/lock/pki
+%dir %{_localstatedir}/run/pki
+%if 0%{?fedora} >= 16
+%{_bindir}/pkicontrol
+%endif
+
+
 
 %if 0%{?fedora} >= 15
 # Details:
@@ -1318,6 +1299,9 @@ fi
 
 
 %changelog
+* Mon Sep 24 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.34.a1
+- Merged pki-setup into pki-server
+
 * Thu Sep 13 2012 Ade Lee <alee@redhat.com> 10.0.0-0.33.a1
 - Added Conflicts for IPA 2.X
 - Added build requires for zip to work around mock problem
diff --git a/specs/pki-ra.spec b/specs/pki-ra.spec
index e0e81865d3ac1101c9a4d0620e45693a2b95a87f..5d5315538042dcace4f9327851277f81fd6a6d6b 100644
--- a/specs/pki-ra.spec
+++ b/specs/pki-ra.spec
@@ -7,7 +7,7 @@
 
 Name:             pki-ra
 Version:          10.0.0
-Release:          %{?relprefix}6%{?prerel}%{?dist}
+Release:          %{?relprefix}7%{?prerel}%{?dist}
 Summary:          Certificate System - Registration Authority
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -31,7 +31,6 @@ Requires:         mod_perl >= 1.99_16
 Requires:         mod_revocator >= 1.0.3
 Requires:         pki-server >= 10.0.0
 Requires:         pki-ra-theme >= 10.0.0
-Requires:         pki-setup
 Requires:         perl-DBD-SQLite
 Requires:         sqlite
 Requires:         /usr/sbin/sendmail
@@ -65,7 +64,7 @@ organization's PKI deployment.
 For deployment purposes, an RA requires the following components from the PKI
 Core package:
 
-  * pki-setup
+  * pki-server
   * pki-tools
   * pki-selinux
 
@@ -246,6 +245,9 @@ fi
 
 
 %changelog
+* Mon Sep 24 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.7.a1
+- Merged pki-setup into pki-server
+
 * Tue Sep 11 2012 Matthew Harmsen <mharmsen@redhat.com> 10.0.0-0.6.a1
 - TRAC Ticket #312 - Dogtag 10: Automatically restart any running instances
   upon RPM "update" . . .
diff --git a/specs/pki-tps.spec b/specs/pki-tps.spec
index 28035f295d28b41641b02fe0ba0ab177fc375384..967d2d9ab7558a4567a8442895a7e2a8dfb15d57 100644
--- a/specs/pki-tps.spec
+++ b/specs/pki-tps.spec
@@ -7,7 +7,7 @@
 
 Name:             pki-tps
 Version:          10.0.0
-Release:          %{?relprefix}6%{?prerel}%{?dist}
+Release:          %{?relprefix}7%{?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-setup
 Requires:         pki-tps-theme >= 10.0.0
 
 %if 0%{?fedora} >= 16
@@ -78,7 +77,7 @@ information about individual tokens.                                      \
 For deployment purposes, a TPS requires the following components from the \
 PKI Core package:                                                         \
                                                                           \
-  * pki-setup                                                             \
+  * pki-server                                                            \
   * pki-tools                                                             \
   * pki-selinux                                                           \
                                                                           \
@@ -281,6 +280,9 @@ fi
 
 
 %changelog
+* Mon Sep 24 2012 Endi S. Dewata <edewata@redhat.com> 10.0.0-0.7.a1
+- Merged pki-setup into pki-server
+
 * Tue Sep 11 2012 Matthew Harmsen <mharmsen@redhat.com> 10.0.0-0.6.a1
 - TRAC Ticket #312 - Dogtag 10: Automatically restart any running instances
   upon RPM "update" . . .
-- 
1.7.11.2

