summaryrefslogtreecommitdiffstats
path: root/pki/scripts
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
commita4682ceae6774956461edd03b2485bbacea445f4 (patch)
tree94c475a125441da63101738220ce3972cf37db61 /pki/scripts
parent0c775428675d2cb1be9551f84e6b741ca813f77e (diff)
downloadpki-a4682ceae6774956461edd03b2485bbacea445f4.tar.gz
pki-a4682ceae6774956461edd03b2485bbacea445f4.tar.xz
pki-a4682ceae6774956461edd03b2485bbacea445f4.zip
Bugzilla Bug #688225 - (dogtagIPAv2.1) TRACKER: of the Dogtag fixes for freeIPA 2.1IPA_v2_RHEL_6_2_20111003
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/tags/IPA_v2_RHEL_6_2_20111003@2252 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/scripts')
-rwxr-xr-xpki/scripts/compose_dogtag_pki_theme_packages197
-rw-r--r--pki/scripts/compose_functions196
-rwxr-xr-xpki/scripts/compose_ipa_pki_theme_packages218
-rwxr-xr-xpki/scripts/compose_pki_console_packages208
-rwxr-xr-xpki/scripts/compose_pki_core_packages208
-rwxr-xr-xpki/scripts/compose_pki_kra_packages208
-rwxr-xr-xpki/scripts/compose_pki_migrate_packages208
-rwxr-xr-xpki/scripts/compose_pki_ocsp_packages208
-rwxr-xr-xpki/scripts/compose_pki_ra_packages208
-rwxr-xr-xpki/scripts/compose_pki_tks_packages208
-rwxr-xr-xpki/scripts/compose_pki_tps_packages208
-rwxr-xr-xpki/scripts/pki_patch_maker113
12 files changed, 2388 insertions, 0 deletions
diff --git a/pki/scripts/compose_dogtag_pki_theme_packages b/pki/scripts/compose_dogtag_pki_theme_packages
new file mode 100755
index 000000000..057b1df22
--- /dev/null
+++ b/pki/scripts/compose_dogtag_pki_theme_packages
@@ -0,0 +1,197 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'dogtag-pki' name and version information
+##
+
+DOGTAG_PKI_THEME="dogtag-pki-theme"
+DOGTAG_PKI_THEME_VERSION="9.0.1"
+
+
+##
+## Establish the SOURCE files/directories of the 'dogtag-pki' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${DOGTAG_PKI_THEME}.spec"
+PKI_COMPONENT_LIST="common-ui ca-ui kra-ui ocsp-ui tks-ui ra-ui tps-ui console-ui"
+
+
+##
+## Establish the TARGET files/directories of the 'dogtag-pki' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+DOGTAG_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+DOGTAG_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+DOGTAG_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+DOGTAG_PKI_THEME_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+DOGTAG_PKI_THEME_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+DOGTAG_PKI_THEME_TARBALL="${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}.tar.gz"
+DOGTAG_PKI_THEME_SPEC_FILE="${DOGTAG_PKI_THEME_SPECS_DIR}/${DOGTAG_PKI_THEME}.spec"
+DOGTAG_PKI_THEME_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${DOGTAG_PKI_THEME}"
+DOGTAG_PKI_THEME_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${DOGTAG_PKI_THEME}.spec"
+
+DOGTAG_PKI_THEME_STAGING_DIR="${PKI_PACKAGES}/staging"
+DOGTAG_PKI_THEME_DIR="${DOGTAG_PKI_THEME_STAGING_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}"
+DOGTAG_PKI_THEME_DOGTAG_DIR="${DOGTAG_PKI_THEME_DIR}/dogtag"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+
+##
+## Always create 'dogtag-pki' package directories
+##
+
+mkdir -p ${DOGTAG_PKI_THEME_BUILD_DIR}
+mkdir -p ${DOGTAG_PKI_THEME_RPMS_DIR}
+mkdir -p ${DOGTAG_PKI_THEME_SOURCES_DIR}
+mkdir -p ${DOGTAG_PKI_THEME_SPECS_DIR}
+mkdir -p ${DOGTAG_PKI_THEME_SRPMS_DIR}
+
+
+##
+## Always start with new 'dogtag-pki' package files
+##
+
+rm -rf ${DOGTAG_PKI_THEME_BUILD_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}
+rm -f ${DOGTAG_PKI_THEME_RPMS_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}*.rpm
+rm -f ${DOGTAG_PKI_THEME_SOURCES_DIR}/${DOGTAG_PKI_THEME_TARBALL}
+rm -f ${DOGTAG_PKI_THEME_SPEC_FILE}
+rm -f ${DOGTAG_PKI_THEME_SRPMS_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}*.rpm
+
+
+##
+## Copy a new 'dogtag-pki' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${DOGTAG_PKI_THEME_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${DOGTAG_PKI_THEME_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'dogtag-pki' staging directory
+ ##
+
+ rm -rf ${DOGTAG_PKI_THEME_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'dogtag-pki' tarball, construct a staging area
+ ## consisting of the 'dogtag-pki' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${DOGTAG_PKI_THEME_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${DOGTAG_PKI_THEME_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${DOGTAG_PKI_THEME_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${DOGTAG_PKI_THEME_DOGTAG_DIR}
+ cd ${PKI_DOGTAG_DIR}
+ cp -p ${PKI_DOGTAG_MANIFEST} ${DOGTAG_PKI_THEME_DOGTAG_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name config-ext -prune -o \
+ -name *.spec -prune -o \
+ -name *.swp -prune -o \
+ -name build.xml -prune -o \
+ -name build_dogtag -prune -o \
+ -print | cpio -pdum ${DOGTAG_PKI_THEME_DOGTAG_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./common-ui/shared/admin/console/config
+ ## * ./ra-ui/shared/docroot/ra/admin/console/config
+ ## * ./tps-ui/shared/docroot/tps/admin/console/config
+ ##
+
+ rm -rf ${DOGTAG_PKI_THEME_DOGTAG_DIR}/*/config
+
+
+ ##
+ ## Create the 'dogtag-pki' tarball
+ ##
+
+ mkdir -p ${DOGTAG_PKI_THEME_SOURCES_DIR}
+ cd ${DOGTAG_PKI_THEME_STAGING_DIR}
+ gtar -zcvf ${DOGTAG_PKI_THEME_TARBALL} \
+ "${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERSION}" > /dev/null 2>&1
+ mv ${DOGTAG_PKI_THEME_TARBALL} ${DOGTAG_PKI_THEME_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${DOGTAG_PKI_THEME_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'dogtag-pki' package script
+##
+
+rm -rf ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT}
+printf "${DOGTAG_PKI_THEME_PACKAGE_COMMAND}\n\n" >> ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT}
+chmod 775 ${DOGTAG_PKI_THEME_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${DOGTAG_PKI_THEME} | tee package_${DOGTAG_PKI_THEME}.log 2>&1
+
diff --git a/pki/scripts/compose_functions b/pki/scripts/compose_functions
new file mode 100644
index 000000000..ac03bc32a
--- /dev/null
+++ b/pki/scripts/compose_functions
@@ -0,0 +1,196 @@
+##
+## Obtain various platform information
+##
+
+OS=`uname`
+if [ "${OS}" != "Linux" ] ; then
+ printf "'$0' is ONLY available on '${OS}'!\n"
+ exit 255
+fi
+
+PLATFORM=`uname -p`
+if [ "${PLATFORM}" = "i686" ] ; then
+ ARCHITECTURE="32-bit"
+elif [ "${PLATFORM}" = "x86_64" ] ; then
+ ARCHITECTURE="64-bit"
+else
+ printf "'$0' is ONLY available on 'i686' or 'x86_64' platforms!\n"
+ exit 255
+fi
+
+if [ -f "/etc/redhat-release" ] ; then
+ DISTRIBUTION=`cat /etc/redhat-release | cut -c1-7`
+ DIST_VERSION=`cat /etc/redhat-release | tr -d [:alpha:][:blank:][\(\)]`
+ if [ "${DISTRIBUTION}" = "Fedora " ] ; then
+ MESSAGE="[built for ${ARCHITECTURE} Fedora ${DIST_VERSION}]"
+ elif [ "${DISTRIBUTION}" = "Red Hat" ] ; then
+ MESSAGE="[built for ${ARCHITECTURE} Red Hat ${DIST_VERSION}]"
+ else
+ printf "'$0' is ONLY available on 'Fedora' or 'Red Hat' "
+ printf "distributions!\n"
+ exit 255
+ fi
+else
+ printf "'$0' is ONLY available on 'Fedora' or 'Red Hat' distributions!\n"
+ exit 255
+fi
+
+
+##
+## Establish various shared variables
+##
+
+PKI_DIR="pki"
+export PKI_DIR
+
+PKI_BASE_DIR="${PKI_DIR}/base"
+export PKI_BASE_DIR
+
+PKI_DOGTAG_DIR="${PKI_DIR}/dogtag"
+export PKI_DOGTAG_DIR
+
+PKI_PATCHES_DIR="${PKI_DIR}/patches"
+export PKI_PATCHES_DIR
+
+PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake"
+export PKI_FILE_LIST
+
+PKI_CMAKE_DIR="cmake"
+export PKI_CMAKE_DIR
+
+PKI_BASE_MANIFEST="CMakeLists.txt"
+export PKI_BASE_MANIFEST
+
+PKI_DOGTAG_MANIFEST="CMakeLists.txt"
+export PKI_DOGTAG_MANIFEST
+
+
+##
+## Usage statement
+##
+
+Usage()
+{
+ printf "\n"
+ printf "Usage: $0 <target>\n\n"
+ printf " where <target> is one of the following:\n\n"
+ printf " srpm - produces tarball, spec, and SRPM\n"
+ printf " [suitable for use by 'mock']\n\n"
+ printf " rpms - produces tarball, spec, SRPM, and\n"
+ printf " RPMS(S)\n"
+ printf " ${MESSAGE}\n\n"
+ printf " patched_srpm - copies tarball, patches, and spec\n"
+ printf " to produce an SRPM\n"
+ printf " [suitable for use by 'mock']\n\n"
+ printf " patched_rpms - copies tarball, patches, and spec\n"
+ printf " to produce an SRPM and RPM(s)\n"
+ printf " ${MESSAGE}\n\n"
+}
+
+
+##
+## Copy Specified Source Tarball and Patches to SOURCES
+##
+Retrieve_Source_Tarball_and_Patches()
+{
+ if [ $# -ne 3 ] ; then
+ Usage
+ exit 255
+ fi
+
+ SPECFILE=$1
+ PATCHES_DIR=$2
+ TARGET_DIR=$3
+
+ if [ ! -f ${SPECFILE} ] ; then
+ printf "ERROR: '${SPECFILE}' is missing!\n\n"
+ Usage
+ exit 255
+ elif [ ! -d ${PATCHES_DIR} ] ; then
+ printf "ERROR: '${PATCHES_DIR}' does NOT exist!\n\n"
+ Usage
+ exit 255
+ elif [ ! -d ${TARGET_DIR} ] ; then
+ printf "ERROR: '${TARGET_DIR}' does NOT exist!\n\n"
+ Usage
+ exit 255
+ fi
+
+ component_name_marker="Name"
+ component_version_marker="Version"
+ component_tarball_marker="Source"
+ component_patch_marker="Patch"
+
+ component_name=""
+ component_version=""
+ component_tarball=""
+ component_patch=""
+
+ exec < ${SPECFILE}
+ while read line; do
+ entry=`echo $line | cut -d: -f 1`
+ if [ "${entry:0:4}" = "${component_name_marker}" ] ; then
+ component_name=`echo $line | cut -d' ' -f 2`
+ elif [ "${entry:0:7}" = "${component_version_marker}" ] ; then
+ component_version=`echo $line | cut -d' ' -f 2`
+ elif [ "${entry:0:6}" = "${component_tarball_marker}" ] ; then
+ value=`echo $line | cut -d' ' -f 2`
+ component_tarball=`echo $value | sed -e "s/\%{name}/${component_name}/g" -e "s/\%{version}/${component_version}/g"`
+ wget -q -O ${TARGET_DIR}/`basename ${component_tarball}` ${component_tarball}
+ if [ $? -ne 0 ] ; then
+ printf "ERROR: Failed to download '${component_tarball}'!\n\n"
+ Usage
+ exit 255
+ elif [ ! -f ${TARGET_DIR}/`basename ${component_tarball}` ] ; then
+ printf "ERROR: Failed to save '${TARGET_DIR}/`basename ${component_tarball}`'!\n\n"
+ Usage
+ exit 255
+ fi
+ elif [ "${entry:0:5}" = "${component_patch_marker}" ] ; then
+ value=`echo $line | cut -d' ' -f 2`
+ component_patch=`echo $value | sed -e "s/\%{name}/${component_name}/g" -e "s/\%{version}/${component_version}/g"`
+ if [ -f ${PATCHES_DIR}/${component_patch} ] ; then
+ cp -p ${PATCHES_DIR}/${component_patch} ${TARGET_DIR}
+ if [ ! -f ${TARGET_DIR}/${component_patch} ] ; then
+ printf "ERROR: Failed to copy '${component_patch}'!\n\n"
+ Usage
+ exit 255
+ fi
+ else
+ printf "ERROR: Failed to find '${component_patch}'!\n\n"
+ Usage
+ exit 255
+ fi
+ fi
+ done
+}
+
+
+##
+## Check for command line argument validity
+##
+
+if [ $# -ne 1 ] ; then
+ Usage
+ exit 255
+fi
+
+if [ $1 = "srpm" ] ; then
+ RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -bs"
+ USE_PATCH_FILES=0
+elif [ $1 = "patched_srpm" ] ; then
+ RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -bs"
+ USE_PATCH_FILES=1
+elif [ $1 = "rpms" ] ; then
+ RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -ba"
+ USE_PATCH_FILES=0
+elif [ $1 = "patched_rpms" ] ; then
+ RPMBUILD_CMD="rpmbuild --define \"_topdir \`pwd\`\" -ba"
+ USE_PATCH_FILES=1
+else
+ Usage
+ exit 255
+fi
+export RPMBUILD_CMD
+
+
diff --git a/pki/scripts/compose_ipa_pki_theme_packages b/pki/scripts/compose_ipa_pki_theme_packages
new file mode 100755
index 000000000..43d1ccc41
--- /dev/null
+++ b/pki/scripts/compose_ipa_pki_theme_packages
@@ -0,0 +1,218 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'ipa-pki' name and version information
+##
+
+IPA_PKI_THEME="ipa-pki-theme"
+IPA_PKI_THEME_VERSION="9.0.3"
+
+
+##
+## Establish the SOURCE files/directories of the 'ipa-pki' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${IPA_PKI_THEME}.spec"
+PKI_COMPONENT_LIST="common-ui ca-ui"
+
+
+##
+## Establish the TARGET files/directories of the 'ipa-pki' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+IPA_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+IPA_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+IPA_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+IPA_PKI_THEME_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+IPA_PKI_THEME_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+IPA_PKI_THEME_TARBALL="${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}.tar.gz"
+IPA_PKI_THEME_SPEC_FILE="${IPA_PKI_THEME_SPECS_DIR}/${IPA_PKI_THEME}.spec"
+IPA_PKI_THEME_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${IPA_PKI_THEME}"
+IPA_PKI_THEME_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${IPA_PKI_THEME}.spec"
+
+IPA_PKI_THEME_STAGING_DIR="${PKI_PACKAGES}/staging"
+IPA_PKI_THEME_DIR="${IPA_PKI_THEME_STAGING_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}"
+IPA_PKI_THEME_DOGTAG_DIR="${IPA_PKI_THEME_DIR}/dogtag"
+IPA_PKI_THEME_DOGTAG_SUBDIR="${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}/dogtag"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'ipa-pki' package directories
+##
+
+mkdir -p ${IPA_PKI_THEME_BUILD_DIR}
+mkdir -p ${IPA_PKI_THEME_RPMS_DIR}
+mkdir -p ${IPA_PKI_THEME_SOURCES_DIR}
+mkdir -p ${IPA_PKI_THEME_SPECS_DIR}
+mkdir -p ${IPA_PKI_THEME_SRPMS_DIR}
+
+
+##
+## Always start with new 'ipa-pki' package files
+##
+
+rm -rf ${IPA_PKI_THEME_BUILD_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}
+rm -f ${IPA_PKI_THEME_RPMS_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}*.rpm
+rm -f ${IPA_PKI_THEME_SOURCES_DIR}/${IPA_PKI_THEME_TARBALL}
+rm -f ${IPA_PKI_THEME_SPEC_FILE}
+rm -f ${IPA_PKI_THEME_SRPMS_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}*.rpm
+
+
+##
+## Copy a new 'ipa-pki' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${IPA_PKI_THEME_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${IPA_PKI_THEME_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'ipa-pki' staging directory
+ ##
+
+ rm -rf ${IPA_PKI_THEME_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'ipa-pki' tarball, construct a staging area
+ ## consisting of the 'ipa-pki' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${IPA_PKI_THEME_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${IPA_PKI_THEME_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${IPA_PKI_THEME_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${IPA_PKI_THEME_DOGTAG_DIR}
+ cd ${PKI_DOGTAG_DIR}
+ cp -p ${PKI_DOGTAG_MANIFEST} ${IPA_PKI_THEME_DOGTAG_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name config-ext -prune -o \
+ -name *.spec -prune -o \
+ -name *.swp -prune -o \
+ -name build.xml -prune -o \
+ -name build_dogtag -prune -o \
+ -print | cpio -pdum ${IPA_PKI_THEME_DOGTAG_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./common-ui/shared/admin/console/config
+ ## * ./ra-ui/shared/docroot/ra/admin/console/config (N/A 'ipa-pki')
+ ## * ./tps-ui/shared/docroot/tps/admin/console/config (N/A 'ipa-pki')
+ ##
+
+ rm -rf ${IPA_PKI_THEME_DOGTAG_DIR}/*/config
+
+
+ ##
+ ## Create the 'ipa-pki' tarball
+ ##
+
+ mkdir -p ${IPA_PKI_THEME_SOURCES_DIR}
+ cd ${IPA_PKI_THEME_STAGING_DIR}
+ # Remove all '*.htm*' web pages and 'Dogtag-specific' graphics
+ # Map 'Dogtag' color '#225580' to black
+ # Map 'Dogtag' color '#4f52b5' to black
+ # Map 'DCS' text to 'XXX'
+ # Map 'dogtag' text to 'XXXXXX'
+ # Map 'Dogtag' text to 'XXXXXX'
+ # Map 'DOGTAG' text to 'XXXXXX'
+ # Map 'Fedora' text to 'XXXXXX'
+ # Map 'FEDORA' text to 'XXXXXX'
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -name "favicon.ico" -print -or \
+ -name "*.htm" -print -or \
+ -name "*.html" -print -or \
+ -name "logo_header.gif" -print | xargs rm ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/#225580/#000000/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/#4f52b5/#000000/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/DCS/XXX/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/dogtag/XXXXXX/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/Dogtag/XXXXXX/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/DOGTAG/XXXXXX/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/Fedora/XXXXXX/g' {} \; ;
+ find ${IPA_PKI_THEME_DOGTAG_SUBDIR} -type f -exec sed -i 's/FEDORA/XXXXXX/g' {} \;
+ gtar -zcvf ${IPA_PKI_THEME_TARBALL} \
+ "${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}" > /dev/null 2>&1
+ mv ${IPA_PKI_THEME_TARBALL} ${IPA_PKI_THEME_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${IPA_PKI_THEME_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'ipa-pki' package script
+##
+
+rm -rf ${IPA_PKI_THEME_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${IPA_PKI_THEME_PACKAGE_SCRIPT}
+printf "${IPA_PKI_THEME_PACKAGE_COMMAND}\n\n" >> ${IPA_PKI_THEME_PACKAGE_SCRIPT}
+chmod 775 ${IPA_PKI_THEME_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${IPA_PKI_THEME} | tee package_${IPA_PKI_THEME}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_console_packages b/pki/scripts/compose_pki_console_packages
new file mode 100755
index 000000000..293a30ff7
--- /dev/null
+++ b/pki/scripts/compose_pki_console_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-console' name and version information
+##
+
+PKI_CONSOLE="pki-console"
+PKI_CONSOLE_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-console' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_CONSOLE}.spec"
+PKI_COMPONENT_LIST="console"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-console' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_CONSOLE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_CONSOLE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_CONSOLE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_CONSOLE_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_CONSOLE_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_CONSOLE_TARBALL="${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}.tar.gz"
+PKI_CONSOLE_SPEC_FILE="${PKI_CONSOLE_SPECS_DIR}/${PKI_CONSOLE}.spec"
+PKI_CONSOLE_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_CONSOLE}"
+PKI_CONSOLE_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_CONSOLE}.spec"
+
+PKI_CONSOLE_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_CONSOLE_DIR="${PKI_CONSOLE_STAGING_DIR}/${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}"
+PKI_CONSOLE_BASE_DIR="${PKI_CONSOLE_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-console' package directories
+##
+
+mkdir -p ${PKI_CONSOLE_BUILD_DIR}
+mkdir -p ${PKI_CONSOLE_RPMS_DIR}
+mkdir -p ${PKI_CONSOLE_SOURCES_DIR}
+mkdir -p ${PKI_CONSOLE_SPECS_DIR}
+mkdir -p ${PKI_CONSOLE_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-console' package files
+##
+
+rm -rf ${PKI_CONSOLE_BUILD_DIR}/${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}
+rm -f ${PKI_CONSOLE_RPMS_DIR}/${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}*.rpm
+rm -f ${PKI_CONSOLE_SOURCES_DIR}/${PKI_CONSOLE_TARBALL}
+rm -f ${PKI_CONSOLE_SPEC_FILE}
+rm -f ${PKI_CONSOLE_SRPMS_DIR}/${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-console' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_CONSOLE_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_CONSOLE_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-console' staging directory
+ ##
+
+ rm -rf ${PKI_CONSOLE_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-console' tarball, construct a staging area
+ ## consisting of the 'pki-console' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_CONSOLE_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_CONSOLE_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_CONSOLE_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_CONSOLE_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_CONSOLE_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_CONSOLE_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-console')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-console')
+ ##
+
+ rm -rf ${PKI_CONSOLE_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-console' tarball
+ ##
+
+ mkdir -p ${PKI_CONSOLE_SOURCES_DIR}
+ cd ${PKI_CONSOLE_STAGING_DIR}
+ gtar -zcvf ${PKI_CONSOLE_TARBALL} \
+ "${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}" > /dev/null 2>&1
+ mv ${PKI_CONSOLE_TARBALL} ${PKI_CONSOLE_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_CONSOLE_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-console' package script
+##
+
+rm -rf ${PKI_CONSOLE_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_CONSOLE_PACKAGE_SCRIPT}
+printf "${PKI_CONSOLE_PACKAGE_COMMAND}\n\n" >> ${PKI_CONSOLE_PACKAGE_SCRIPT}
+chmod 775 ${PKI_CONSOLE_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_CONSOLE} | tee package_${PKI_CONSOLE}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_core_packages b/pki/scripts/compose_pki_core_packages
new file mode 100755
index 000000000..c517f6f9b
--- /dev/null
+++ b/pki/scripts/compose_pki_core_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-core' name and version information
+##
+
+PKI_CORE="pki-core"
+PKI_CORE_VERSION="9.0.3"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-core' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_CORE}.spec"
+PKI_COMPONENT_LIST="setup symkey native-tools util java-tools common selinux ca silent"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-core' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_CORE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_CORE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_CORE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_CORE_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_CORE_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_CORE_TARBALL="${PKI_CORE}-${PKI_CORE_VERSION}.tar.gz"
+PKI_CORE_SPEC_FILE="${PKI_CORE_SPECS_DIR}/${PKI_CORE}.spec"
+PKI_CORE_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_CORE}"
+PKI_CORE_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_CORE}.spec"
+
+PKI_CORE_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_CORE_DIR="${PKI_CORE_STAGING_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}"
+PKI_CORE_BASE_DIR="${PKI_CORE_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-core' package directories
+##
+
+mkdir -p ${PKI_CORE_BUILD_DIR}
+mkdir -p ${PKI_CORE_RPMS_DIR}
+mkdir -p ${PKI_CORE_SOURCES_DIR}
+mkdir -p ${PKI_CORE_SPECS_DIR}
+mkdir -p ${PKI_CORE_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-core' package files
+##
+
+rm -rf ${PKI_CORE_BUILD_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}
+rm -f ${PKI_CORE_RPMS_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}*.rpm
+rm -f ${PKI_CORE_SOURCES_DIR}/${PKI_CORE_TARBALL}
+rm -f ${PKI_CORE_SPEC_FILE}
+rm -f ${PKI_CORE_SRPMS_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-core' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_CORE_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_CORE_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-core' staging directory
+ ##
+
+ rm -rf ${PKI_CORE_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-core' tarball, construct a staging area
+ ## consisting of the 'pki-core' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_CORE_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_CORE_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_CORE_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_CORE_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_CORE_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_CORE_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-core')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-core')
+ ##
+
+ rm -rf ${PKI_CORE_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-core' tarball
+ ##
+
+ mkdir -p ${PKI_CORE_SOURCES_DIR}
+ cd ${PKI_CORE_STAGING_DIR}
+ gtar -zcvf ${PKI_CORE_TARBALL} \
+ "${PKI_CORE}-${PKI_CORE_VERSION}" > /dev/null 2>&1
+ mv ${PKI_CORE_TARBALL} ${PKI_CORE_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_CORE_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-core' package script
+##
+
+rm -rf ${PKI_CORE_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_CORE_PACKAGE_SCRIPT}
+printf "${PKI_CORE_PACKAGE_COMMAND}\n\n" >> ${PKI_CORE_PACKAGE_SCRIPT}
+chmod 775 ${PKI_CORE_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_CORE} | tee package_${PKI_CORE}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_kra_packages b/pki/scripts/compose_pki_kra_packages
new file mode 100755
index 000000000..3a7605fd8
--- /dev/null
+++ b/pki/scripts/compose_pki_kra_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-kra' name and version information
+##
+
+PKI_KRA="pki-kra"
+PKI_KRA_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-kra' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_KRA}.spec"
+PKI_COMPONENT_LIST="kra"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-kra' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_KRA_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_KRA_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_KRA_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_KRA_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_KRA_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_KRA_TARBALL="${PKI_KRA}-${PKI_KRA_VERSION}.tar.gz"
+PKI_KRA_SPEC_FILE="${PKI_KRA_SPECS_DIR}/${PKI_KRA}.spec"
+PKI_KRA_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_KRA}"
+PKI_KRA_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_KRA}.spec"
+
+PKI_KRA_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_KRA_DIR="${PKI_KRA_STAGING_DIR}/${PKI_KRA}-${PKI_KRA_VERSION}"
+PKI_KRA_BASE_DIR="${PKI_KRA_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-kra' package directories
+##
+
+mkdir -p ${PKI_KRA_BUILD_DIR}
+mkdir -p ${PKI_KRA_RPMS_DIR}
+mkdir -p ${PKI_KRA_SOURCES_DIR}
+mkdir -p ${PKI_KRA_SPECS_DIR}
+mkdir -p ${PKI_KRA_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-kra' package files
+##
+
+rm -rf ${PKI_KRA_BUILD_DIR}/${PKI_KRA}-${PKI_KRA_VERSION}
+rm -f ${PKI_KRA_RPMS_DIR}/${PKI_KRA}-${PKI_KRA_VERSION}*.rpm
+rm -f ${PKI_KRA_SOURCES_DIR}/${PKI_KRA_TARBALL}
+rm -f ${PKI_KRA_SPEC_FILE}
+rm -f ${PKI_KRA_SRPMS_DIR}/${PKI_KRA}-${PKI_KRA_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-kra' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_KRA_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_KRA_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-kra' staging directory
+ ##
+
+ rm -rf ${PKI_KRA_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-kra' tarball, construct a staging area
+ ## consisting of the 'pki-kra' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_KRA_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_KRA_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_KRA_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_KRA_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_KRA_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_KRA_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-kra')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-kra')
+ ##
+
+ rm -rf ${PKI_KRA_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-kra' tarball
+ ##
+
+ mkdir -p ${PKI_KRA_SOURCES_DIR}
+ cd ${PKI_KRA_STAGING_DIR}
+ gtar -zcvf ${PKI_KRA_TARBALL} \
+ "${PKI_KRA}-${PKI_KRA_VERSION}" > /dev/null 2>&1
+ mv ${PKI_KRA_TARBALL} ${PKI_KRA_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_KRA_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-kra' package script
+##
+
+rm -rf ${PKI_KRA_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_KRA_PACKAGE_SCRIPT}
+printf "${PKI_KRA_PACKAGE_COMMAND}\n\n" >> ${PKI_KRA_PACKAGE_SCRIPT}
+chmod 775 ${PKI_KRA_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_KRA} | tee package_${PKI_KRA}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_migrate_packages b/pki/scripts/compose_pki_migrate_packages
new file mode 100755
index 000000000..570592311
--- /dev/null
+++ b/pki/scripts/compose_pki_migrate_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-migrate' name and version information
+##
+
+PKI_MIGRATE="pki-migrate"
+PKI_MIGRATE_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-migrate' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_MIGRATE}.spec"
+PKI_COMPONENT_LIST="migrate"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-migrate' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_MIGRATE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_MIGRATE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_MIGRATE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_MIGRATE_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_MIGRATE_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_MIGRATE_TARBALL="${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}.tar.gz"
+PKI_MIGRATE_SPEC_FILE="${PKI_MIGRATE_SPECS_DIR}/${PKI_MIGRATE}.spec"
+PKI_MIGRATE_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_MIGRATE}"
+PKI_MIGRATE_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_MIGRATE}.spec"
+
+PKI_MIGRATE_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_MIGRATE_DIR="${PKI_MIGRATE_STAGING_DIR}/${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}"
+PKI_MIGRATE_BASE_DIR="${PKI_MIGRATE_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-migrate' package directories
+##
+
+mkdir -p ${PKI_MIGRATE_BUILD_DIR}
+mkdir -p ${PKI_MIGRATE_RPMS_DIR}
+mkdir -p ${PKI_MIGRATE_SOURCES_DIR}
+mkdir -p ${PKI_MIGRATE_SPECS_DIR}
+mkdir -p ${PKI_MIGRATE_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-migrate' package files
+##
+
+rm -rf ${PKI_MIGRATE_BUILD_DIR}/${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}
+rm -f ${PKI_MIGRATE_RPMS_DIR}/${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}*.rpm
+rm -f ${PKI_MIGRATE_SOURCES_DIR}/${PKI_MIGRATE_TARBALL}
+rm -f ${PKI_MIGRATE_SPEC_FILE}
+rm -f ${PKI_MIGRATE_SRPMS_DIR}/${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-migrate' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_MIGRATE_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_MIGRATE_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-migrate' staging directory
+ ##
+
+ rm -rf ${PKI_MIGRATE_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-migrate' tarball, construct a staging area
+ ## consisting of the 'pki-migrate' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_MIGRATE_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_MIGRATE_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_MIGRATE_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_MIGRATE_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_MIGRATE_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_MIGRATE_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-migrate')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-migrate')
+ ##
+
+ rm -rf ${PKI_MIGRATE_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-migrate' tarball
+ ##
+
+ mkdir -p ${PKI_MIGRATE_SOURCES_DIR}
+ cd ${PKI_MIGRATE_STAGING_DIR}
+ gtar -zcvf ${PKI_MIGRATE_TARBALL} \
+ "${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}" > /dev/null 2>&1
+ mv ${PKI_MIGRATE_TARBALL} ${PKI_MIGRATE_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_MIGRATE_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-migrate' package script
+##
+
+rm -rf ${PKI_MIGRATE_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_MIGRATE_PACKAGE_SCRIPT}
+printf "${PKI_MIGRATE_PACKAGE_COMMAND}\n\n" >> ${PKI_MIGRATE_PACKAGE_SCRIPT}
+chmod 775 ${PKI_MIGRATE_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_MIGRATE} | tee package_${PKI_MIGRATE}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_ocsp_packages b/pki/scripts/compose_pki_ocsp_packages
new file mode 100755
index 000000000..74da856e2
--- /dev/null
+++ b/pki/scripts/compose_pki_ocsp_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-ocsp' name and version information
+##
+
+PKI_OCSP="pki-ocsp"
+PKI_OCSP_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-ocsp' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_OCSP}.spec"
+PKI_COMPONENT_LIST="ocsp"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-ocsp' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_OCSP_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_OCSP_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_OCSP_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_OCSP_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_OCSP_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_OCSP_TARBALL="${PKI_OCSP}-${PKI_OCSP_VERSION}.tar.gz"
+PKI_OCSP_SPEC_FILE="${PKI_OCSP_SPECS_DIR}/${PKI_OCSP}.spec"
+PKI_OCSP_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_OCSP}"
+PKI_OCSP_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_OCSP}.spec"
+
+PKI_OCSP_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_OCSP_DIR="${PKI_OCSP_STAGING_DIR}/${PKI_OCSP}-${PKI_OCSP_VERSION}"
+PKI_OCSP_BASE_DIR="${PKI_OCSP_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-ocsp' package directories
+##
+
+mkdir -p ${PKI_OCSP_BUILD_DIR}
+mkdir -p ${PKI_OCSP_RPMS_DIR}
+mkdir -p ${PKI_OCSP_SOURCES_DIR}
+mkdir -p ${PKI_OCSP_SPECS_DIR}
+mkdir -p ${PKI_OCSP_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-ocsp' package files
+##
+
+rm -rf ${PKI_OCSP_BUILD_DIR}/${PKI_OCSP}-${PKI_OCSP_VERSION}
+rm -f ${PKI_OCSP_RPMS_DIR}/${PKI_OCSP}-${PKI_OCSP_VERSION}*.rpm
+rm -f ${PKI_OCSP_SOURCES_DIR}/${PKI_OCSP_TARBALL}
+rm -f ${PKI_OCSP_SPEC_FILE}
+rm -f ${PKI_OCSP_SRPMS_DIR}/${PKI_OCSP}-${PKI_OCSP_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-ocsp' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_OCSP_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_OCSP_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-ocsp' staging directory
+ ##
+
+ rm -rf ${PKI_OCSP_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-ocsp' tarball, construct a staging area
+ ## consisting of the 'pki-ocsp' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_OCSP_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_OCSP_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_OCSP_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_OCSP_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_OCSP_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_OCSP_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-ocsp')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-ocsp')
+ ##
+
+ rm -rf ${PKI_OCSP_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-ocsp' tarball
+ ##
+
+ mkdir -p ${PKI_OCSP_SOURCES_DIR}
+ cd ${PKI_OCSP_STAGING_DIR}
+ gtar -zcvf ${PKI_OCSP_TARBALL} \
+ "${PKI_OCSP}-${PKI_OCSP_VERSION}" > /dev/null 2>&1
+ mv ${PKI_OCSP_TARBALL} ${PKI_OCSP_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_OCSP_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-ocsp' package script
+##
+
+rm -rf ${PKI_OCSP_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_OCSP_PACKAGE_SCRIPT}
+printf "${PKI_OCSP_PACKAGE_COMMAND}\n\n" >> ${PKI_OCSP_PACKAGE_SCRIPT}
+chmod 775 ${PKI_OCSP_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_OCSP} | tee package_${PKI_OCSP}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_ra_packages b/pki/scripts/compose_pki_ra_packages
new file mode 100755
index 000000000..7d34a032b
--- /dev/null
+++ b/pki/scripts/compose_pki_ra_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-ra' name and version information
+##
+
+PKI_RA="pki-ra"
+PKI_RA_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-ra' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_RA}.spec"
+PKI_COMPONENT_LIST="ra"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-ra' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_RA_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_RA_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_RA_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_RA_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_RA_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_RA_TARBALL="${PKI_RA}-${PKI_RA_VERSION}.tar.gz"
+PKI_RA_SPEC_FILE="${PKI_RA_SPECS_DIR}/${PKI_RA}.spec"
+PKI_RA_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_RA}"
+PKI_RA_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_RA}.spec"
+
+PKI_RA_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_RA_DIR="${PKI_RA_STAGING_DIR}/${PKI_RA}-${PKI_RA_VERSION}"
+PKI_RA_BASE_DIR="${PKI_RA_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-ra' package directories
+##
+
+mkdir -p ${PKI_RA_BUILD_DIR}
+mkdir -p ${PKI_RA_RPMS_DIR}
+mkdir -p ${PKI_RA_SOURCES_DIR}
+mkdir -p ${PKI_RA_SPECS_DIR}
+mkdir -p ${PKI_RA_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-ra' package files
+##
+
+rm -rf ${PKI_RA_BUILD_DIR}/${PKI_RA}-${PKI_RA_VERSION}
+rm -f ${PKI_RA_RPMS_DIR}/${PKI_RA}-${PKI_RA_VERSION}*.rpm
+rm -f ${PKI_RA_SOURCES_DIR}/${PKI_RA_TARBALL}
+rm -f ${PKI_RA_SPEC_FILE}
+rm -f ${PKI_RA_SRPMS_DIR}/${PKI_RA}-${PKI_RA_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-ra' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_RA_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_RA_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-ra' staging directory
+ ##
+
+ rm -rf ${PKI_RA_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-ra' tarball, construct a staging area
+ ## consisting of the 'pki-ra' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_RA_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_RA_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_RA_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_RA_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_RA_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_RA_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-ra')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-ra')
+ ##
+
+ rm -rf ${PKI_RA_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-ra' tarball
+ ##
+
+ mkdir -p ${PKI_RA_SOURCES_DIR}
+ cd ${PKI_RA_STAGING_DIR}
+ gtar -zcvf ${PKI_RA_TARBALL} \
+ "${PKI_RA}-${PKI_RA_VERSION}" > /dev/null 2>&1
+ mv ${PKI_RA_TARBALL} ${PKI_RA_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_RA_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-ra' package script
+##
+
+rm -rf ${PKI_RA_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_RA_PACKAGE_SCRIPT}
+printf "${PKI_RA_PACKAGE_COMMAND}\n\n" >> ${PKI_RA_PACKAGE_SCRIPT}
+chmod 775 ${PKI_RA_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_RA} | tee package_${PKI_RA}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_tks_packages b/pki/scripts/compose_pki_tks_packages
new file mode 100755
index 000000000..aa59dab31
--- /dev/null
+++ b/pki/scripts/compose_pki_tks_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-tks' name and version information
+##
+
+PKI_TKS="pki-tks"
+PKI_TKS_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-tks' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_TKS}.spec"
+PKI_COMPONENT_LIST="tks"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-tks' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_TKS_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_TKS_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_TKS_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_TKS_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_TKS_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_TKS_TARBALL="${PKI_TKS}-${PKI_TKS_VERSION}.tar.gz"
+PKI_TKS_SPEC_FILE="${PKI_TKS_SPECS_DIR}/${PKI_TKS}.spec"
+PKI_TKS_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_TKS}"
+PKI_TKS_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_TKS}.spec"
+
+PKI_TKS_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_TKS_DIR="${PKI_TKS_STAGING_DIR}/${PKI_TKS}-${PKI_TKS_VERSION}"
+PKI_TKS_BASE_DIR="${PKI_TKS_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-tks' package directories
+##
+
+mkdir -p ${PKI_TKS_BUILD_DIR}
+mkdir -p ${PKI_TKS_RPMS_DIR}
+mkdir -p ${PKI_TKS_SOURCES_DIR}
+mkdir -p ${PKI_TKS_SPECS_DIR}
+mkdir -p ${PKI_TKS_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-tks' package files
+##
+
+rm -rf ${PKI_TKS_BUILD_DIR}/${PKI_TKS}-${PKI_TKS_VERSION}
+rm -f ${PKI_TKS_RPMS_DIR}/${PKI_TKS}-${PKI_TKS_VERSION}*.rpm
+rm -f ${PKI_TKS_SOURCES_DIR}/${PKI_TKS_TARBALL}
+rm -f ${PKI_TKS_SPEC_FILE}
+rm -f ${PKI_TKS_SRPMS_DIR}/${PKI_TKS}-${PKI_TKS_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-tks' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_TKS_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_TKS_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-tks' staging directory
+ ##
+
+ rm -rf ${PKI_TKS_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-tks' tarball, construct a staging area
+ ## consisting of the 'pki-tks' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_TKS_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_TKS_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_TKS_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_TKS_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_TKS_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_TKS_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-tks')
+ ## * ./tps/forms/tps/admin/console/config (N/A 'pki-tks')
+ ##
+
+ rm -rf ${PKI_TKS_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-tks' tarball
+ ##
+
+ mkdir -p ${PKI_TKS_SOURCES_DIR}
+ cd ${PKI_TKS_STAGING_DIR}
+ gtar -zcvf ${PKI_TKS_TARBALL} \
+ "${PKI_TKS}-${PKI_TKS_VERSION}" > /dev/null 2>&1
+ mv ${PKI_TKS_TARBALL} ${PKI_TKS_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_TKS_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-tks' package script
+##
+
+rm -rf ${PKI_TKS_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_TKS_PACKAGE_SCRIPT}
+printf "${PKI_TKS_PACKAGE_COMMAND}\n\n" >> ${PKI_TKS_PACKAGE_SCRIPT}
+chmod 775 ${PKI_TKS_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_TKS} | tee package_${PKI_TKS}.log 2>&1
+
diff --git a/pki/scripts/compose_pki_tps_packages b/pki/scripts/compose_pki_tps_packages
new file mode 100755
index 000000000..daba0d4b7
--- /dev/null
+++ b/pki/scripts/compose_pki_tps_packages
@@ -0,0 +1,208 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# (C) 2010 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+##
+## Include common 'compose' functions
+##
+
+COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
+
+
+## Always switch into the base directory three levels
+## above this shell script prior to executing it so
+## that all of its output is written to this directory
+
+cd `dirname $0`/../..
+
+
+##
+## Retrieve the name of this base directory
+##
+
+PKI_PWD=`pwd`
+
+
+##
+## Establish the 'pki-tps' name and version information
+##
+
+PKI_TPS="pki-tps"
+PKI_TPS_VERSION="9.0.0"
+
+
+##
+## Establish the SOURCE files/directories of the 'pki-tps' source directory
+##
+
+PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_TPS}.spec"
+PKI_COMPONENT_LIST="tps"
+
+
+##
+## Establish the TARGET files/directories of the 'pki-tps' source/spec files
+##
+
+PKI_PACKAGES="${PKI_PWD}/packages"
+PKI_TPS_BUILD_DIR="${PKI_PACKAGES}/BUILD"
+PKI_TPS_RPMS_DIR="${PKI_PACKAGES}/RPMS"
+PKI_TPS_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
+PKI_TPS_SPECS_DIR="${PKI_PACKAGES}/SPECS"
+PKI_TPS_SRPMS_DIR="${PKI_PACKAGES}/SRPMS"
+
+PKI_TPS_TARBALL="${PKI_TPS}-${PKI_TPS_VERSION}.tar.gz"
+PKI_TPS_SPEC_FILE="${PKI_TPS_SPECS_DIR}/${PKI_TPS}.spec"
+PKI_TPS_PACKAGE_SCRIPT="${PKI_PACKAGES}/package_${PKI_TPS}"
+PKI_TPS_PACKAGE_COMMAND="${RPMBUILD_CMD} SPECS/${PKI_TPS}.spec"
+
+PKI_TPS_STAGING_DIR="${PKI_PACKAGES}/staging"
+PKI_TPS_DIR="${PKI_TPS_STAGING_DIR}/${PKI_TPS}-${PKI_TPS_VERSION}"
+PKI_TPS_BASE_DIR="${PKI_TPS_DIR}/base"
+
+
+##
+## Always create a top-level 'packages' directory
+##
+
+mkdir -p ${PKI_PACKAGES}
+
+
+##
+## Always create 'pki-tps' package directories
+##
+
+mkdir -p ${PKI_TPS_BUILD_DIR}
+mkdir -p ${PKI_TPS_RPMS_DIR}
+mkdir -p ${PKI_TPS_SOURCES_DIR}
+mkdir -p ${PKI_TPS_SPECS_DIR}
+mkdir -p ${PKI_TPS_SRPMS_DIR}
+
+
+##
+## Always start with new 'pki-tps' package files
+##
+
+rm -rf ${PKI_TPS_BUILD_DIR}/${PKI_TPS}-${PKI_TPS_VERSION}
+rm -f ${PKI_TPS_RPMS_DIR}/${PKI_TPS}-${PKI_TPS_VERSION}*.rpm
+rm -f ${PKI_TPS_SOURCES_DIR}/${PKI_TPS_TARBALL}
+rm -f ${PKI_TPS_SPEC_FILE}
+rm -f ${PKI_TPS_SRPMS_DIR}/${PKI_TPS}-${PKI_TPS_VERSION}*.rpm
+
+
+##
+## Copy a new 'pki-tps' spec file from the
+## current contents of the PKI working repository
+##
+
+cp -p ${PKI_SPECS_FILE} ${PKI_TPS_SPECS_DIR}
+
+
+if [ ${USE_PATCH_FILES} -eq 1 ] ; then
+ Retrieve_Source_Tarball_and_Patches ${PKI_SPECS_FILE} ${PKI_PATCHES_DIR} ${PKI_TPS_SOURCES_DIR}
+else
+ ##
+ ## Always start with a new 'pki-tps' staging directory
+ ##
+
+ rm -rf ${PKI_TPS_STAGING_DIR}
+
+
+ ##
+ ## To generate the 'pki-tps' tarball, construct a staging area
+ ## consisting of the 'pki-tps' source components from the
+ ## current contents of the PKI working repository
+ ##
+
+ mkdir -p ${PKI_TPS_DIR}
+ cd ${PKI_DIR}
+ for file in "${PKI_FILE_LIST}" ;
+ do
+ cp -p ${file} ${PKI_TPS_DIR}
+ done
+ find ${PKI_CMAKE_DIR} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -print | cpio -pdum ${PKI_TPS_DIR} > /dev/null 2>&1
+ cd - > /dev/null 2>&1
+
+ mkdir -p ${PKI_TPS_BASE_DIR}
+ cd ${PKI_BASE_DIR}
+ cp -p ${PKI_BASE_MANIFEST} ${PKI_TPS_BASE_DIR}
+ for component in "${PKI_COMPONENT_LIST}" ;
+ do
+ find ${component} \
+ -name .svn -prune -o \
+ -name *.swp -prune -o \
+ -name Makefile.am -prune -o \
+ -name Makefile.in -prune -o \
+ -name aclocal.m4 -prune -o \
+ -name autogen.sh -prune -o \
+ -name build.xml -prune -o \
+ -name compile -prune -o \
+ -name config.guess -prune -o \
+ -name config.h.in -prune -o \
+ -name config.sub -prune -o \
+ -name configure -prune -o \
+ -name configure.ac -prune -o \
+ -name depcomp -prune -o \
+ -name install-sh -prune -o \
+ -name ltmain.sh -prune -o \
+ -name m4 -prune -o \
+ -name missing -prune -o \
+ -name setup_package -prune -o \
+ -print | cpio -pdum ${PKI_TPS_BASE_DIR} > /dev/null 2>&1
+ done
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Due to the following lower-level 'config' subdirectories,
+ ## INDEPENDENTLY remove ALL top-level 'config' directories:
+ ##
+ ## * ./console/src/com/netscape/admin/certsrv/config (N/A 'pki-tps')
+ ## * ./tps/forms/tps/admin/console/config
+ ##
+
+ rm -rf ${PKI_TPS_BASE_DIR}/*/config
+
+
+ ##
+ ## Create the 'pki-tps' tarball
+ ##
+
+ mkdir -p ${PKI_TPS_SOURCES_DIR}
+ cd ${PKI_TPS_STAGING_DIR}
+ gtar -zcvf ${PKI_TPS_TARBALL} \
+ "${PKI_TPS}-${PKI_TPS_VERSION}" > /dev/null 2>&1
+ mv ${PKI_TPS_TARBALL} ${PKI_TPS_SOURCES_DIR}
+ cd - > /dev/null 2>&1
+
+
+ ##
+ ## Always remove the PKI staging area
+ ##
+
+ rm -rf ${PKI_TPS_STAGING_DIR}
+fi
+
+
+##
+## Always generate a fresh 'pki-tps' package script
+##
+
+rm -rf ${PKI_TPS_PACKAGE_SCRIPT}
+printf "#!/bin/bash\n\n" > ${PKI_TPS_PACKAGE_SCRIPT}
+printf "${PKI_TPS_PACKAGE_COMMAND}\n\n" >> ${PKI_TPS_PACKAGE_SCRIPT}
+chmod 775 ${PKI_TPS_PACKAGE_SCRIPT}
+
+
+##
+## Automatically invoke RPM/SRPM creation
+##
+
+cd ${PKI_PACKAGES} ;
+bash ./package_${PKI_TPS} | tee package_${PKI_TPS}.log 2>&1
+
diff --git a/pki/scripts/pki_patch_maker b/pki/scripts/pki_patch_maker
new file mode 100755
index 000000000..08e8aacd8
--- /dev/null
+++ b/pki/scripts/pki_patch_maker
@@ -0,0 +1,113 @@
+#!/bin/bash
+## BEGIN COPYRIGHT BLOCK
+## (C) 2011 Red Hat, Inc.
+## All rights reserved.
+## END COPYRIGHT BLOCK
+
+## This shell script must always be executed in the base
+## directory located one level above this shell script
+cd `dirname $0`/..
+
+
+##
+## Usage statement
+##
+
+Usage()
+{
+ printf "\n"
+ printf "Usage: $0 <startrev> <endrev> <srpm> <basever>\n\n"
+ printf " where:\n\n"
+ printf " <startrev> is the starting SVN revision\n\n"
+ printf " <endrev> is the ending SVN revision\n\n"
+ printf " <srpm> is one of the following:\n\n"
+ printf " ipa-pki-theme\n"
+ printf " pki-core\n\n"
+ printf " <basever> is the version of the specified <srpm>\n"
+ printf "\n"
+ printf "IMPORTANT: Successful use of this script relies upon separation\n"
+ printf " of 'pki-core' and 'ipa-pki-theme' check-ins. All\n"
+ printf " patch files automatically produced by this script\n"
+ printf " should be applied and tested thoroughly before\n"
+ printf " being accepted as proper patches.\n\n"
+}
+
+
+##
+## Identify source associated with srpm
+##
+IPA_PKI_THEME="dogtag/ca-ui dogtag/common-ui"
+PKI_CORE="base/ca base/common base/java-tools base/native-tools base/selinux base/setup base/silent base/symkey base/util"
+
+
+##
+## Check for command line argument validity
+##
+
+if [ $# -ne 4 ] ; then
+ printf "ERROR: Insufficent parameters!\n"
+ Usage
+ exit 255
+fi
+
+startrev=$1
+endrev=$2
+srpm=$3
+basever=$4
+
+if [ ${srpm} == "pki-core" ]; then
+ source=${PKI_CORE}
+elif [ ${srpm} == "ipa-pki-theme" ]; then
+ source=${IPA_PKI_THEME}
+else
+ printf "ERROR: Invalid <srpm> specified!\n"
+ Usage
+ exit 255
+fi
+
+if [ ${startrev} -ge ${endrev} ]; then
+ printf "ERROR: <startrev> must be less than <endrev>!\n"
+ Usage
+ exit 255
+fi
+
+
+##
+## Always establish a new working directory
+##
+workingdir=/tmp/pki_patch_maker
+if [ ! -e ${workingdir} ]; then
+ mkdir ${workingdir}
+fi
+rm -rf ${workingdir}/${srpm}
+mkdir ${workingdir}/${srpm}
+
+
+##
+## Process specified SVN revision numbers
+##
+for i in ${source}
+do
+ svn log -q -r${startrev}:${endrev} $i |grep "^r"|awk '{print $1}'|sed 's/r//' >> ${workingdir}/${srpm}/revnos
+done
+
+cat ${workingdir}/${srpm}/revnos |sort |uniq > ${workingdir}/${srpm}/revnos2
+
+
+##
+## Generate patches for the specified SRPM based upon SVN revision numbers
+##
+while read rev0
+do
+ svn diff -c $rev0 --diff-cmd /usr/bin/diff -x "-Nurb" > ${workingdir}/${srpm}/${srpm}-${basever}-r${rev0}.patch
+done < ${workingdir}/${srpm}/revnos2
+
+
+##
+## Generate sample changelog messages associated with these patches
+##
+while read rev0
+do
+ echo `svn log -r $rev0 |grep -i "Resolves"`, $rev0 >> ${workingdir}/${srpm}/changelog
+done < ${workingdir}/${srpm}/revnos2
+