diff options
Diffstat (limited to 'pki')
-rwxr-xr-x | pki/scripts/compose_dogtag_pki_theme_packages | 152 | ||||
-rw-r--r-- | pki/scripts/compose_functions | 132 | ||||
-rwxr-xr-x | pki/scripts/compose_ipa_pki_theme_packages | 193 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_console_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_core_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_kra_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_migrate_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_ocsp_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_ra_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_tks_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/compose_pki_tps_packages | 175 | ||||
-rwxr-xr-x | pki/scripts/pki_patch_maker | 113 |
12 files changed, 1108 insertions, 882 deletions
diff --git a/pki/scripts/compose_dogtag_pki_theme_packages b/pki/scripts/compose_dogtag_pki_theme_packages index 634b4700..057b1df2 100755 --- a/pki/scripts/compose_dogtag_pki_theme_packages +++ b/pki/scripts/compose_dogtag_pki_theme_packages @@ -38,12 +38,7 @@ DOGTAG_PKI_THEME_VERSION="9.0.1" ## Establish the SOURCE files/directories of the 'dogtag-pki' source directory ## -PKI_DIR="pki" -PKI_DOGTAG_DIR="${PKI_DIR}/dogtag" PKI_SPECS_FILE="${PKI_DIR}/specs/${DOGTAG_PKI_THEME}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_DOGTAG_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="common-ui ca-ui kra-ui ocsp-ui tks-ui ra-ui tps-ui console-ui" @@ -75,6 +70,7 @@ DOGTAG_PKI_THEME_DOGTAG_DIR="${DOGTAG_PKI_THEME_DIR}/dogtag" mkdir -p ${PKI_PACKAGES} + ## ## Always create 'dogtag-pki' package directories ## @@ -105,77 +101,81 @@ rm -f ${DOGTAG_PKI_THEME_SRPMS_DIR}/${DOGTAG_PKI_THEME}-${DOGTAG_PKI_THEME_VERS cp -p ${PKI_SPECS_FILE} ${DOGTAG_PKI_THEME_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_functions b/pki/scripts/compose_functions index 5bd54ebb..ac03bc32 100644 --- a/pki/scripts/compose_functions +++ b/pki/scripts/compose_functions @@ -37,6 +37,35 @@ 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 ## @@ -45,10 +74,95 @@ 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 RPM(S)\n" - printf " ${MESSAGE}\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 } @@ -61,10 +175,18 @@ if [ $# -ne 1 ] ; then exit 255 fi -if [ $1 = "srpm" ] ; then +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 diff --git a/pki/scripts/compose_ipa_pki_theme_packages b/pki/scripts/compose_ipa_pki_theme_packages index 8ed362a4..43d1ccc4 100755 --- a/pki/scripts/compose_ipa_pki_theme_packages +++ b/pki/scripts/compose_ipa_pki_theme_packages @@ -38,12 +38,7 @@ IPA_PKI_THEME_VERSION="9.0.3" ## Establish the SOURCE files/directories of the 'ipa-pki' source directory ## -PKI_DIR="pki" -PKI_DOGTAG_DIR="${PKI_DIR}/dogtag" PKI_SPECS_FILE="${PKI_DIR}/specs/${IPA_PKI_THEME}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_DOGTAG_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="common-ui ca-ui" @@ -106,98 +101,102 @@ rm -f ${IPA_PKI_THEME_SRPMS_DIR}/${IPA_PKI_THEME}-${IPA_PKI_THEME_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${IPA_PKI_THEME_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_console_packages b/pki/scripts/compose_pki_console_packages index d1300811..293a30ff 100755 --- a/pki/scripts/compose_pki_console_packages +++ b/pki/scripts/compose_pki_console_packages @@ -38,12 +38,7 @@ PKI_CONSOLE_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-console' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_CONSOLE}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="console" @@ -105,89 +100,93 @@ rm -f ${PKI_CONSOLE_SRPMS_DIR}/${PKI_CONSOLE}-${PKI_CONSOLE_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_CONSOLE_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_core_packages b/pki/scripts/compose_pki_core_packages index 3c08f2ea..c517f6f9 100755 --- a/pki/scripts/compose_pki_core_packages +++ b/pki/scripts/compose_pki_core_packages @@ -38,12 +38,7 @@ PKI_CORE_VERSION="9.0.3" ## Establish the SOURCE files/directories of the 'pki-core' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_CORE}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="setup symkey native-tools util java-tools common selinux ca silent" @@ -105,89 +100,93 @@ rm -f ${PKI_CORE_SRPMS_DIR}/${PKI_CORE}-${PKI_CORE_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_CORE_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_kra_packages b/pki/scripts/compose_pki_kra_packages index 45e0a9f9..3a7605fd 100755 --- a/pki/scripts/compose_pki_kra_packages +++ b/pki/scripts/compose_pki_kra_packages @@ -38,12 +38,7 @@ PKI_KRA_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-kra' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_KRA}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="kra" @@ -105,89 +100,93 @@ rm -f ${PKI_KRA_SRPMS_DIR}/${PKI_KRA}-${PKI_KRA_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_KRA_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_migrate_packages b/pki/scripts/compose_pki_migrate_packages index ae19bdb3..57059231 100755 --- a/pki/scripts/compose_pki_migrate_packages +++ b/pki/scripts/compose_pki_migrate_packages @@ -38,12 +38,7 @@ PKI_MIGRATE_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-migrate' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_MIGRATE}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="migrate" @@ -105,89 +100,93 @@ rm -f ${PKI_MIGRATE_SRPMS_DIR}/${PKI_MIGRATE}-${PKI_MIGRATE_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_MIGRATE_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_ocsp_packages b/pki/scripts/compose_pki_ocsp_packages index a220bead..74da856e 100755 --- a/pki/scripts/compose_pki_ocsp_packages +++ b/pki/scripts/compose_pki_ocsp_packages @@ -38,12 +38,7 @@ PKI_OCSP_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-ocsp' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_OCSP}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="ocsp" @@ -105,89 +100,93 @@ rm -f ${PKI_OCSP_SRPMS_DIR}/${PKI_OCSP}-${PKI_OCSP_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_OCSP_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_ra_packages b/pki/scripts/compose_pki_ra_packages index 08576478..7d34a032 100755 --- a/pki/scripts/compose_pki_ra_packages +++ b/pki/scripts/compose_pki_ra_packages @@ -38,12 +38,7 @@ PKI_RA_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-ra' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_RA}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="ra" @@ -105,89 +100,93 @@ rm -f ${PKI_RA_SRPMS_DIR}/${PKI_RA}-${PKI_RA_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_RA_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_tks_packages b/pki/scripts/compose_pki_tks_packages index ea08e98a..aa59dab3 100755 --- a/pki/scripts/compose_pki_tks_packages +++ b/pki/scripts/compose_pki_tks_packages @@ -38,12 +38,7 @@ PKI_TKS_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-tks' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_TKS}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="tks" @@ -105,89 +100,93 @@ rm -f ${PKI_TKS_SRPMS_DIR}/${PKI_TKS}-${PKI_TKS_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_TKS_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/compose_pki_tps_packages b/pki/scripts/compose_pki_tps_packages index e6c4a6e7..daba0d4b 100755 --- a/pki/scripts/compose_pki_tps_packages +++ b/pki/scripts/compose_pki_tps_packages @@ -38,12 +38,7 @@ PKI_TPS_VERSION="9.0.0" ## Establish the SOURCE files/directories of the 'pki-tps' source directory ## -PKI_DIR="pki" -PKI_BASE_DIR="${PKI_DIR}/base" PKI_SPECS_FILE="${PKI_DIR}/specs/${PKI_TPS}.spec" -PKI_FILE_LIST="CMakeLists.txt COPYING CPackConfig.cmake ConfigureChecks.cmake DefineOptions.cmake README cmake_uninstall.cmake.in config.h.cmake" -PKI_CMAKE_DIR="cmake" -PKI_BASE_MANIFEST="CMakeLists.txt" PKI_COMPONENT_LIST="tps" @@ -105,89 +100,93 @@ rm -f ${PKI_TPS_SRPMS_DIR}/${PKI_TPS}-${PKI_TPS_VERSION}*.rpm cp -p ${PKI_SPECS_FILE} ${PKI_TPS_SPECS_DIR} -## -## 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} +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 ## diff --git a/pki/scripts/pki_patch_maker b/pki/scripts/pki_patch_maker new file mode 100755 index 00000000..08e8aacd --- /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 + |