From 76404e86a1ba103f14a1118c2ba1fea8c5e9942d Mon Sep 17 00:00:00 2001 From: mharmsen Date: Fri, 28 Nov 2008 21:52:41 +0000 Subject: Bugzilla Bug #445402: Renamed "*linux*" files to "*dogtag*" and removed directories as necessary in the new "pki/dogtag/" directory. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@151 c9f7a03b-bd48-0410-a16d-cbbf54688b0b --- pki/dogtag/ca-ui/build_dogtag | 38 +++ pki/dogtag/ca-ui/build_linux | 38 --- pki/dogtag/ca-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ca-ui/config/product.xml | 305 -------------------- pki/dogtag/ca-ui/config/release.xml | 86 ------ pki/dogtag/ca/build_dogtag | 38 +++ pki/dogtag/ca/build_linux | 38 --- pki/dogtag/ca/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ca/config/product.xml | 305 -------------------- pki/dogtag/ca/config/release.xml | 86 ------ pki/dogtag/common-ui/build_dogtag | 38 +++ pki/dogtag/common-ui/build_linux | 38 --- pki/dogtag/common-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/common-ui/config/product.xml | 305 -------------------- pki/dogtag/common-ui/config/release.xml | 86 ------ pki/dogtag/common/build_dogtag | 38 +++ pki/dogtag/common/build_linux | 38 --- pki/dogtag/common/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/common/config/product.xml | 305 -------------------- pki/dogtag/common/config/release.xml | 86 ------ pki/dogtag/config-ext/build_dogtag_pki | 318 +++++++++++++++++++++ pki/dogtag/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/console-ui/build_dogtag | 38 +++ pki/dogtag/console-ui/build_linux | 38 --- pki/dogtag/console-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/console-ui/config/product.xml | 305 -------------------- pki/dogtag/console-ui/config/release.xml | 86 ------ pki/dogtag/console/build_dogtag | 38 +++ pki/dogtag/console/build_linux | 38 --- pki/dogtag/console/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/console/config/product.xml | 305 -------------------- pki/dogtag/console/config/release.xml | 86 ------ pki/dogtag/java-tools/build_dogtag | 38 +++ pki/dogtag/java-tools/build_linux | 38 --- pki/dogtag/java-tools/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/java-tools/config/product.xml | 305 -------------------- pki/dogtag/java-tools/config/release.xml | 86 ------ pki/dogtag/kra-ui/build_dogtag | 38 +++ pki/dogtag/kra-ui/build_linux | 38 --- pki/dogtag/kra-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/kra-ui/config/product.xml | 305 -------------------- pki/dogtag/kra-ui/config/release.xml | 86 ------ pki/dogtag/kra/build_dogtag | 38 +++ pki/dogtag/kra/build_linux | 38 --- pki/dogtag/kra/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/kra/config/product.xml | 305 -------------------- pki/dogtag/kra/config/release.xml | 86 ------ pki/dogtag/manage/build_dogtag | 38 +++ pki/dogtag/manage/build_linux | 38 --- pki/dogtag/manage/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/manage/config/product.xml | 305 -------------------- pki/dogtag/manage/config/release.xml | 86 ------ pki/dogtag/migrate/build_dogtag | 38 +++ pki/dogtag/migrate/build_linux | 38 --- pki/dogtag/migrate/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/migrate/config/product.xml | 305 -------------------- pki/dogtag/migrate/config/release.xml | 86 ------ pki/dogtag/native-tools/build_dogtag | 38 +++ pki/dogtag/native-tools/build_linux | 38 --- pki/dogtag/native-tools/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/native-tools/config/product.xml | 305 -------------------- pki/dogtag/native-tools/config/release.xml | 86 ------ pki/dogtag/ocsp-ui/build_dogtag | 38 +++ pki/dogtag/ocsp-ui/build_linux | 38 --- pki/dogtag/ocsp-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ocsp-ui/config/product.xml | 305 -------------------- pki/dogtag/ocsp-ui/config/release.xml | 86 ------ pki/dogtag/ocsp/build_dogtag | 38 +++ pki/dogtag/ocsp/build_linux | 38 --- pki/dogtag/ocsp/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ocsp/config/product.xml | 305 -------------------- pki/dogtag/ocsp/config/release.xml | 86 ------ pki/dogtag/osutil/build_dogtag | 38 +++ pki/dogtag/osutil/build_linux | 38 --- pki/dogtag/osutil/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/osutil/config/product.xml | 305 -------------------- pki/dogtag/osutil/config/release.xml | 86 ------ pki/dogtag/ra-ui/build_dogtag | 38 +++ pki/dogtag/ra-ui/build_linux | 38 --- pki/dogtag/ra-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ra-ui/config/product.xml | 305 -------------------- pki/dogtag/ra-ui/config/release.xml | 86 ------ pki/dogtag/ra/build_dogtag | 38 +++ pki/dogtag/ra/build_linux | 38 --- pki/dogtag/ra/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/ra/config/product.xml | 305 -------------------- pki/dogtag/ra/config/release.xml | 86 ------ .../scripts/dogtag_svn_external_properties_db | 2 + .../scripts/linux_svn_external_properties_db | 2 - .../scripts/set_dogtag_SVN_external_properties | 48 ++++ .../scripts/set_linux_SVN_external_properties | 48 ---- pki/dogtag/setup/build_dogtag | 38 +++ pki/dogtag/setup/build_linux | 38 --- pki/dogtag/setup/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/setup/config/product.xml | 305 -------------------- pki/dogtag/setup/config/release.xml | 86 ------ pki/dogtag/silent/build_dogtag | 38 +++ pki/dogtag/silent/build_linux | 38 --- pki/dogtag/silent/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/silent/config/product.xml | 305 -------------------- pki/dogtag/silent/config/release.xml | 86 ------ pki/dogtag/symkey/build_dogtag | 38 +++ pki/dogtag/symkey/build_linux | 38 --- pki/dogtag/symkey/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/symkey/config/product.xml | 305 -------------------- pki/dogtag/symkey/config/release.xml | 86 ------ pki/dogtag/tks-ui/build_dogtag | 38 +++ pki/dogtag/tks-ui/build_linux | 38 --- pki/dogtag/tks-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/tks-ui/config/product.xml | 305 -------------------- pki/dogtag/tks-ui/config/release.xml | 86 ------ pki/dogtag/tks/build_dogtag | 38 +++ pki/dogtag/tks/build_linux | 38 --- pki/dogtag/tks/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/tks/config/product.xml | 305 -------------------- pki/dogtag/tks/config/release.xml | 86 ------ pki/dogtag/tps-ui/build_dogtag | 39 +++ pki/dogtag/tps-ui/build_linux | 39 --- pki/dogtag/tps-ui/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/tps-ui/config/product.xml | 305 -------------------- pki/dogtag/tps-ui/config/release.xml | 86 ------ pki/dogtag/tps/build_dogtag | 39 +++ pki/dogtag/tps/build_linux | 39 --- pki/dogtag/tps/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/tps/config/product.xml | 305 -------------------- pki/dogtag/tps/config/release.xml | 86 ------ pki/dogtag/util/build_dogtag | 38 +++ pki/dogtag/util/build_linux | 38 --- pki/dogtag/util/config-ext/build_linux_pki | 318 --------------------- pki/dogtag/util/config/product.xml | 305 -------------------- pki/dogtag/util/config/release.xml | 86 ------ 131 files changed, 1320 insertions(+), 19045 deletions(-) create mode 100755 pki/dogtag/ca-ui/build_dogtag delete mode 100755 pki/dogtag/ca-ui/build_linux delete mode 100755 pki/dogtag/ca-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ca-ui/config/product.xml delete mode 100644 pki/dogtag/ca-ui/config/release.xml create mode 100755 pki/dogtag/ca/build_dogtag delete mode 100755 pki/dogtag/ca/build_linux delete mode 100755 pki/dogtag/ca/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ca/config/product.xml delete mode 100644 pki/dogtag/ca/config/release.xml create mode 100755 pki/dogtag/common-ui/build_dogtag delete mode 100755 pki/dogtag/common-ui/build_linux delete mode 100755 pki/dogtag/common-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/common-ui/config/product.xml delete mode 100644 pki/dogtag/common-ui/config/release.xml create mode 100755 pki/dogtag/common/build_dogtag delete mode 100755 pki/dogtag/common/build_linux delete mode 100755 pki/dogtag/common/config-ext/build_linux_pki delete mode 100644 pki/dogtag/common/config/product.xml delete mode 100644 pki/dogtag/common/config/release.xml create mode 100755 pki/dogtag/config-ext/build_dogtag_pki delete mode 100755 pki/dogtag/config-ext/build_linux_pki create mode 100755 pki/dogtag/console-ui/build_dogtag delete mode 100755 pki/dogtag/console-ui/build_linux delete mode 100755 pki/dogtag/console-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/console-ui/config/product.xml delete mode 100644 pki/dogtag/console-ui/config/release.xml create mode 100755 pki/dogtag/console/build_dogtag delete mode 100755 pki/dogtag/console/build_linux delete mode 100755 pki/dogtag/console/config-ext/build_linux_pki delete mode 100644 pki/dogtag/console/config/product.xml delete mode 100644 pki/dogtag/console/config/release.xml create mode 100755 pki/dogtag/java-tools/build_dogtag delete mode 100755 pki/dogtag/java-tools/build_linux delete mode 100755 pki/dogtag/java-tools/config-ext/build_linux_pki delete mode 100644 pki/dogtag/java-tools/config/product.xml delete mode 100644 pki/dogtag/java-tools/config/release.xml create mode 100755 pki/dogtag/kra-ui/build_dogtag delete mode 100755 pki/dogtag/kra-ui/build_linux delete mode 100755 pki/dogtag/kra-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/kra-ui/config/product.xml delete mode 100644 pki/dogtag/kra-ui/config/release.xml create mode 100755 pki/dogtag/kra/build_dogtag delete mode 100755 pki/dogtag/kra/build_linux delete mode 100755 pki/dogtag/kra/config-ext/build_linux_pki delete mode 100644 pki/dogtag/kra/config/product.xml delete mode 100644 pki/dogtag/kra/config/release.xml create mode 100755 pki/dogtag/manage/build_dogtag delete mode 100755 pki/dogtag/manage/build_linux delete mode 100755 pki/dogtag/manage/config-ext/build_linux_pki delete mode 100644 pki/dogtag/manage/config/product.xml delete mode 100644 pki/dogtag/manage/config/release.xml create mode 100755 pki/dogtag/migrate/build_dogtag delete mode 100755 pki/dogtag/migrate/build_linux delete mode 100755 pki/dogtag/migrate/config-ext/build_linux_pki delete mode 100644 pki/dogtag/migrate/config/product.xml delete mode 100644 pki/dogtag/migrate/config/release.xml create mode 100755 pki/dogtag/native-tools/build_dogtag delete mode 100755 pki/dogtag/native-tools/build_linux delete mode 100755 pki/dogtag/native-tools/config-ext/build_linux_pki delete mode 100644 pki/dogtag/native-tools/config/product.xml delete mode 100644 pki/dogtag/native-tools/config/release.xml create mode 100755 pki/dogtag/ocsp-ui/build_dogtag delete mode 100755 pki/dogtag/ocsp-ui/build_linux delete mode 100755 pki/dogtag/ocsp-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ocsp-ui/config/product.xml delete mode 100644 pki/dogtag/ocsp-ui/config/release.xml create mode 100755 pki/dogtag/ocsp/build_dogtag delete mode 100755 pki/dogtag/ocsp/build_linux delete mode 100755 pki/dogtag/ocsp/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ocsp/config/product.xml delete mode 100644 pki/dogtag/ocsp/config/release.xml create mode 100755 pki/dogtag/osutil/build_dogtag delete mode 100755 pki/dogtag/osutil/build_linux delete mode 100755 pki/dogtag/osutil/config-ext/build_linux_pki delete mode 100644 pki/dogtag/osutil/config/product.xml delete mode 100644 pki/dogtag/osutil/config/release.xml create mode 100755 pki/dogtag/ra-ui/build_dogtag delete mode 100755 pki/dogtag/ra-ui/build_linux delete mode 100755 pki/dogtag/ra-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ra-ui/config/product.xml delete mode 100644 pki/dogtag/ra-ui/config/release.xml create mode 100755 pki/dogtag/ra/build_dogtag delete mode 100755 pki/dogtag/ra/build_linux delete mode 100755 pki/dogtag/ra/config-ext/build_linux_pki delete mode 100644 pki/dogtag/ra/config/product.xml delete mode 100644 pki/dogtag/ra/config/release.xml create mode 100644 pki/dogtag/scripts/dogtag_svn_external_properties_db delete mode 100644 pki/dogtag/scripts/linux_svn_external_properties_db create mode 100755 pki/dogtag/scripts/set_dogtag_SVN_external_properties delete mode 100755 pki/dogtag/scripts/set_linux_SVN_external_properties create mode 100755 pki/dogtag/setup/build_dogtag delete mode 100755 pki/dogtag/setup/build_linux delete mode 100755 pki/dogtag/setup/config-ext/build_linux_pki delete mode 100644 pki/dogtag/setup/config/product.xml delete mode 100644 pki/dogtag/setup/config/release.xml create mode 100755 pki/dogtag/silent/build_dogtag delete mode 100755 pki/dogtag/silent/build_linux delete mode 100755 pki/dogtag/silent/config-ext/build_linux_pki delete mode 100644 pki/dogtag/silent/config/product.xml delete mode 100644 pki/dogtag/silent/config/release.xml create mode 100755 pki/dogtag/symkey/build_dogtag delete mode 100755 pki/dogtag/symkey/build_linux delete mode 100755 pki/dogtag/symkey/config-ext/build_linux_pki delete mode 100644 pki/dogtag/symkey/config/product.xml delete mode 100644 pki/dogtag/symkey/config/release.xml create mode 100755 pki/dogtag/tks-ui/build_dogtag delete mode 100755 pki/dogtag/tks-ui/build_linux delete mode 100755 pki/dogtag/tks-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/tks-ui/config/product.xml delete mode 100644 pki/dogtag/tks-ui/config/release.xml create mode 100755 pki/dogtag/tks/build_dogtag delete mode 100755 pki/dogtag/tks/build_linux delete mode 100755 pki/dogtag/tks/config-ext/build_linux_pki delete mode 100644 pki/dogtag/tks/config/product.xml delete mode 100644 pki/dogtag/tks/config/release.xml create mode 100755 pki/dogtag/tps-ui/build_dogtag delete mode 100755 pki/dogtag/tps-ui/build_linux delete mode 100755 pki/dogtag/tps-ui/config-ext/build_linux_pki delete mode 100644 pki/dogtag/tps-ui/config/product.xml delete mode 100644 pki/dogtag/tps-ui/config/release.xml create mode 100755 pki/dogtag/tps/build_dogtag delete mode 100755 pki/dogtag/tps/build_linux delete mode 100755 pki/dogtag/tps/config-ext/build_linux_pki delete mode 100644 pki/dogtag/tps/config/product.xml delete mode 100644 pki/dogtag/tps/config/release.xml create mode 100755 pki/dogtag/util/build_dogtag delete mode 100755 pki/dogtag/util/build_linux delete mode 100755 pki/dogtag/util/config-ext/build_linux_pki delete mode 100644 pki/dogtag/util/config/product.xml delete mode 100644 pki/dogtag/util/config/release.xml diff --git a/pki/dogtag/ca-ui/build_dogtag b/pki/dogtag/ca-ui/build_dogtag new file mode 100755 index 000000000..337fbb3fd --- /dev/null +++ b/pki/dogtag/ca-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ca-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ca-ui/build_linux b/pki/dogtag/ca-ui/build_linux deleted file mode 100755 index 337fbb3fd..000000000 --- a/pki/dogtag/ca-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ca-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ca-ui/config-ext/build_linux_pki b/pki/dogtag/ca-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ca-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ca-ui/config/product.xml b/pki/dogtag/ca-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ca-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ca-ui/config/release.xml b/pki/dogtag/ca-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ca-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ca/build_dogtag b/pki/dogtag/ca/build_dogtag new file mode 100755 index 000000000..6be41e5e1 --- /dev/null +++ b/pki/dogtag/ca/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ca.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ca/build_linux b/pki/dogtag/ca/build_linux deleted file mode 100755 index 6be41e5e1..000000000 --- a/pki/dogtag/ca/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ca.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ca/config-ext/build_linux_pki b/pki/dogtag/ca/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ca/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ca/config/product.xml b/pki/dogtag/ca/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ca/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ca/config/release.xml b/pki/dogtag/ca/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ca/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/common-ui/build_dogtag b/pki/dogtag/common-ui/build_dogtag new file mode 100755 index 000000000..10a6bc982 --- /dev/null +++ b/pki/dogtag/common-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-common-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/common-ui/build_linux b/pki/dogtag/common-ui/build_linux deleted file mode 100755 index 10a6bc982..000000000 --- a/pki/dogtag/common-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-common-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/common-ui/config-ext/build_linux_pki b/pki/dogtag/common-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/common-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/common-ui/config/product.xml b/pki/dogtag/common-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/common-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/common-ui/config/release.xml b/pki/dogtag/common-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/common-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/common/build_dogtag b/pki/dogtag/common/build_dogtag new file mode 100755 index 000000000..51618a126 --- /dev/null +++ b/pki/dogtag/common/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-common.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/common/build_linux b/pki/dogtag/common/build_linux deleted file mode 100755 index 51618a126..000000000 --- a/pki/dogtag/common/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-common.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/common/config-ext/build_linux_pki b/pki/dogtag/common/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/common/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/common/config/product.xml b/pki/dogtag/common/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/common/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/common/config/release.xml b/pki/dogtag/common/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/common/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/config-ext/build_dogtag_pki b/pki/dogtag/config-ext/build_dogtag_pki new file mode 100755 index 000000000..d9ea91e8c --- /dev/null +++ b/pki/dogtag/config-ext/build_dogtag_pki @@ -0,0 +1,318 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory above this +# shared shell script prior to executing it so that +# all of its output is written to this directory +cd `dirname $0`/.. + +# Set pre-defined variables +# +# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. +# Variables prefixed with "PKI" are defined in this shared script. +# Variables containing no prefix are reserved for the generated script. +# +PKI_ABORT_SCRIPT="false" +PKI_BASEDIR="../../.." +PKI_BUILD_XML=build.xml +PKI_DIR=pki +PKI_LINUX_DIR=linux +PKI_RELEASE_DIR=release +PKI_RELEASE_SCRIPT=release +PKI_SHARED_SCRIPT=`basename $0` +PKI_SRC_DIR=base + +# Check the values of the passed-in environment variables +if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then + printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" + PKI_ABORT_SCRIPT="true" +fi +if [ "${LINUX_COMPONENT}" == "" ]; then + printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" + PKI_ABORT_SCRIPT="true" +fi +if [ "${LINUX_SPECFILE}" == "" ]; then + printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" + PKI_ABORT_SCRIPT="true" +fi +if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then + printf "\n" + printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " + printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" + printf "which defines ALL environment variables prefixed by 'LINUX'!\n" + exit 255 +fi + +# Compute remaining variables by assigning their values from the specfile +PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" +PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` +PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` +PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` +if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then + PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" + PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" + PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" +elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then + PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" + PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" + PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" +else + PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" + PKI_PRODUCT_NAME="${PKI_PRODUCT}" + PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" +fi +PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" +PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" + +# Always check that local source code for this PKI component is available +if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then + printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" + printf " '${PKI_SOURCE_CODE_URL}'\n\n" + printf "to:\n\n" + printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" + exit 255 +fi + +# Define awk scripts +check_targets=' +BEGIN { + success = "false"; +} + +{ + while( getline < FILENAME > 0 ) { + if( substr( $0, 0, 80 ) ~ "target name" ) { + start = substr( $0, + match( $0, "\"" ) + 1 ); + target = substr( start, + start, + match( start, "\"" ) - 1 ); + if( build_target == target ) { + success = "true"; + } + } + } +} + +END { + printf( "%s", success ); +}' + +display_targets='{ + while( getline < FILENAME > 0 ) { + if( substr( $0, 0, 80 ) ~ "target name" ) { + start = substr( $0, + match( $0, "\"" ) + 1 ); + target = substr( start, + start, + match( start, "\"" ) - 1 ); + } + if( substr( $0, 0, 80 ) ~ "description" ) { + start = substr( $0, + match( $0, "\"" ) + 1 ); + description[target] = substr( start, + start, + match( start, "\"" ) - 1 ); + printf( "'%20s' %s\n", target, description[target] ); + } + } +}' + +# Provide a usage function +usage() { + if [ $# -gt 0 ] ; then + echo + echo "$1" + fi + echo + echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" + echo + echo " where [target] is one of the optional values:" + echo + echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" + awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} + echo + exit 255 +} + +# Verify that the appropriate number of +# command-line parameters have been entered +# and that a valid target has been specified +if [ $# -eq 0 ] ; then + RELEASE_TARGET=main + BUILD_TARGET="" +elif [ $# -eq 1 ] ; then + if [ "$1" == "help" ]; then + usage + else + SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` + if [ "${SUCCESS}" == "false" ]; then + usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" + else + RELEASE_TARGET=local + BUILD_TARGET="$1" + fi + fi +elif [ $# -gt 1 ] ; then + usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" +fi + +# This script may ONLY be run on Linux! +PKI_OS=`uname` +if [ "${PKI_OS}" != "Linux" ]; then + printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" + exit 255 +fi + +# Always start with a new release root directory +rm -rf ${PKI_RELEASE_ROOT} +mkdir -p ${PKI_RELEASE_ROOT} + +# Copy the source code to the release root +cd ${PKI_BASEDIR} +find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 +cd - > /dev/null 2>&1 + +# Remove unused files +rm -rf ${PKI_RELEASE_ROOT}/build_* +rm -rf ${PKI_RELEASE_ROOT}/*.spec +if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then + rm -rf ${PKI_RELEASE_ROOT}/config-ext +fi + +# Create the default spec file +cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec + +# Use bash-specific syntax to create the default build script +cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT +#!/bin/bash + +##################################################################### +### DO NOT EDIT! This script has been automatically generated! ### +##################################################################### + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd \`dirname \$0\` + +# Set pre-defined variables +BUILD_SCRIPT=\`basename \$0\` +BUILD_XML=${PKI_BUILD_XML} +SPECFILE=${PKI_PRODUCT_NAME}.spec + +# Define awk scripts +check_targets=' +BEGIN { + success = "false"; +} + +{ + while( getline < FILENAME > 0 ) { + if( substr( \$0, 0, 80 ) ~ "target name" ) { + start = substr( \$0, + match( \$0, "\"" ) + 1 ); + target = substr( start, + start, + match( start, "\"" ) - 1 ); + if( build_target == target ) { + success = "true"; + } + } + } +} + +END { + printf( "%s", success ); +}' + +display_targets='{ + while( getline < FILENAME > 0 ) { + if( substr( \$0, 0, 80 ) ~ "target name" ) { + start = substr( \$0, + match( \$0, "\"" ) + 1 ); + target = substr( start, + start, + match( start, "\"" ) - 1 ); + } + if( substr( \$0, 0, 80 ) ~ "description" ) { + start = substr( \$0, + match( \$0, "\"" ) + 1 ); + description[target] = substr( start, + start, + match( start, "\"" ) - 1 ); + printf( "'%20s' %s\n", target, description[target] ); + } + } +}' + +# Provide a usage function +usage() { + if [ \$# -gt 0 ] ; then + echo + echo "\$1" + fi + echo + echo "Usage: \${BUILD_SCRIPT} [target]" + echo + echo " where [target] is one of the optional values:" + echo + echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" + awk "\$display_targets" \${BUILD_XML} + echo + exit 255 +} + +# Verify that the appropriate number of +# command-line parameters have been entered +# and that a valid target has been specified +if [ \$# -eq 0 ] ; then + RELEASE_TARGET=main + BUILD_TARGET=main +elif [ \$# -eq 1 ] ; then + if [ "\$1" == "help" ]; then + usage + else + SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` + if [ "\${SUCCESS}" == "false" ]; then + usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" + else + RELEASE_TARGET=local + BUILD_TARGET="\$1" + fi + fi +elif [ \$# -gt 1 ] ; then + usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" +fi + +# This script may ONLY be run on Linux! +OS=\`uname\` +if [ "\${OS}" != "Linux" ]; then + printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" + exit 255 +fi + +ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} + +END_OF_SCRIPT +chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} + +cd ${PKI_RELEASE_ROOT} +./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} + diff --git a/pki/dogtag/config-ext/build_linux_pki b/pki/dogtag/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/console-ui/build_dogtag b/pki/dogtag/console-ui/build_dogtag new file mode 100755 index 000000000..bbcd0a6a4 --- /dev/null +++ b/pki/dogtag/console-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-console-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/console-ui/build_linux b/pki/dogtag/console-ui/build_linux deleted file mode 100755 index bbcd0a6a4..000000000 --- a/pki/dogtag/console-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-console-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/console-ui/config-ext/build_linux_pki b/pki/dogtag/console-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/console-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/console-ui/config/product.xml b/pki/dogtag/console-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/console-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/console-ui/config/release.xml b/pki/dogtag/console-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/console-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/console/build_dogtag b/pki/dogtag/console/build_dogtag new file mode 100755 index 000000000..9700d8321 --- /dev/null +++ b/pki/dogtag/console/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-console.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/console/build_linux b/pki/dogtag/console/build_linux deleted file mode 100755 index 9700d8321..000000000 --- a/pki/dogtag/console/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-console.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/console/config-ext/build_linux_pki b/pki/dogtag/console/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/console/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/console/config/product.xml b/pki/dogtag/console/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/console/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/console/config/release.xml b/pki/dogtag/console/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/console/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/java-tools/build_dogtag b/pki/dogtag/java-tools/build_dogtag new file mode 100755 index 000000000..3eaf7df2f --- /dev/null +++ b/pki/dogtag/java-tools/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-java-tools.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/java-tools/build_linux b/pki/dogtag/java-tools/build_linux deleted file mode 100755 index 3eaf7df2f..000000000 --- a/pki/dogtag/java-tools/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-java-tools.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/java-tools/config-ext/build_linux_pki b/pki/dogtag/java-tools/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/java-tools/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/java-tools/config/product.xml b/pki/dogtag/java-tools/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/java-tools/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/java-tools/config/release.xml b/pki/dogtag/java-tools/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/java-tools/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/kra-ui/build_dogtag b/pki/dogtag/kra-ui/build_dogtag new file mode 100755 index 000000000..c934ba268 --- /dev/null +++ b/pki/dogtag/kra-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-kra-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/kra-ui/build_linux b/pki/dogtag/kra-ui/build_linux deleted file mode 100755 index c934ba268..000000000 --- a/pki/dogtag/kra-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-kra-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/kra-ui/config-ext/build_linux_pki b/pki/dogtag/kra-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/kra-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/kra-ui/config/product.xml b/pki/dogtag/kra-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/kra-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/kra-ui/config/release.xml b/pki/dogtag/kra-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/kra-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/kra/build_dogtag b/pki/dogtag/kra/build_dogtag new file mode 100755 index 000000000..016383c11 --- /dev/null +++ b/pki/dogtag/kra/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-kra.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/kra/build_linux b/pki/dogtag/kra/build_linux deleted file mode 100755 index 016383c11..000000000 --- a/pki/dogtag/kra/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-kra.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/kra/config-ext/build_linux_pki b/pki/dogtag/kra/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/kra/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/kra/config/product.xml b/pki/dogtag/kra/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/kra/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/kra/config/release.xml b/pki/dogtag/kra/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/kra/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/manage/build_dogtag b/pki/dogtag/manage/build_dogtag new file mode 100755 index 000000000..4e79895db --- /dev/null +++ b/pki/dogtag/manage/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-manage.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/manage/build_linux b/pki/dogtag/manage/build_linux deleted file mode 100755 index 4e79895db..000000000 --- a/pki/dogtag/manage/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-manage.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/manage/config-ext/build_linux_pki b/pki/dogtag/manage/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/manage/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/manage/config/product.xml b/pki/dogtag/manage/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/manage/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/manage/config/release.xml b/pki/dogtag/manage/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/manage/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/migrate/build_dogtag b/pki/dogtag/migrate/build_dogtag new file mode 100755 index 000000000..4bc21a648 --- /dev/null +++ b/pki/dogtag/migrate/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-migrate.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/migrate/build_linux b/pki/dogtag/migrate/build_linux deleted file mode 100755 index 4bc21a648..000000000 --- a/pki/dogtag/migrate/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-migrate.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/migrate/config-ext/build_linux_pki b/pki/dogtag/migrate/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/migrate/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/migrate/config/product.xml b/pki/dogtag/migrate/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/migrate/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/migrate/config/release.xml b/pki/dogtag/migrate/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/migrate/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/native-tools/build_dogtag b/pki/dogtag/native-tools/build_dogtag new file mode 100755 index 000000000..65861b388 --- /dev/null +++ b/pki/dogtag/native-tools/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-native-tools.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/native-tools/build_linux b/pki/dogtag/native-tools/build_linux deleted file mode 100755 index 65861b388..000000000 --- a/pki/dogtag/native-tools/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-native-tools.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/native-tools/config-ext/build_linux_pki b/pki/dogtag/native-tools/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/native-tools/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/native-tools/config/product.xml b/pki/dogtag/native-tools/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/native-tools/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/native-tools/config/release.xml b/pki/dogtag/native-tools/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/native-tools/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ocsp-ui/build_dogtag b/pki/dogtag/ocsp-ui/build_dogtag new file mode 100755 index 000000000..8b4629672 --- /dev/null +++ b/pki/dogtag/ocsp-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ocsp-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ocsp-ui/build_linux b/pki/dogtag/ocsp-ui/build_linux deleted file mode 100755 index 8b4629672..000000000 --- a/pki/dogtag/ocsp-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ocsp-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ocsp-ui/config-ext/build_linux_pki b/pki/dogtag/ocsp-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ocsp-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ocsp-ui/config/product.xml b/pki/dogtag/ocsp-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ocsp-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ocsp-ui/config/release.xml b/pki/dogtag/ocsp-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ocsp-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ocsp/build_dogtag b/pki/dogtag/ocsp/build_dogtag new file mode 100755 index 000000000..698dde47c --- /dev/null +++ b/pki/dogtag/ocsp/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ocsp.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ocsp/build_linux b/pki/dogtag/ocsp/build_linux deleted file mode 100755 index 698dde47c..000000000 --- a/pki/dogtag/ocsp/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ocsp.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ocsp/config-ext/build_linux_pki b/pki/dogtag/ocsp/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ocsp/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ocsp/config/product.xml b/pki/dogtag/ocsp/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ocsp/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ocsp/config/release.xml b/pki/dogtag/ocsp/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ocsp/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/osutil/build_dogtag b/pki/dogtag/osutil/build_dogtag new file mode 100755 index 000000000..2f98316d8 --- /dev/null +++ b/pki/dogtag/osutil/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="osutil.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/osutil/build_linux b/pki/dogtag/osutil/build_linux deleted file mode 100755 index 2f98316d8..000000000 --- a/pki/dogtag/osutil/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="osutil.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/osutil/config-ext/build_linux_pki b/pki/dogtag/osutil/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/osutil/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/osutil/config/product.xml b/pki/dogtag/osutil/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/osutil/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/osutil/config/release.xml b/pki/dogtag/osutil/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/osutil/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ra-ui/build_dogtag b/pki/dogtag/ra-ui/build_dogtag new file mode 100755 index 000000000..f330d94fb --- /dev/null +++ b/pki/dogtag/ra-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ra-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ra-ui/build_linux b/pki/dogtag/ra-ui/build_linux deleted file mode 100755 index f330d94fb..000000000 --- a/pki/dogtag/ra-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ra-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ra-ui/config-ext/build_linux_pki b/pki/dogtag/ra-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ra-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ra-ui/config/product.xml b/pki/dogtag/ra-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ra-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ra-ui/config/release.xml b/pki/dogtag/ra-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ra-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ra/build_dogtag b/pki/dogtag/ra/build_dogtag new file mode 100755 index 000000000..8b9c03b57 --- /dev/null +++ b/pki/dogtag/ra/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-ra.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/ra/build_linux b/pki/dogtag/ra/build_linux deleted file mode 100755 index 8b9c03b57..000000000 --- a/pki/dogtag/ra/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-ra.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/ra/config-ext/build_linux_pki b/pki/dogtag/ra/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/ra/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/ra/config/product.xml b/pki/dogtag/ra/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/ra/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/ra/config/release.xml b/pki/dogtag/ra/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/ra/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/scripts/dogtag_svn_external_properties_db b/pki/dogtag/scripts/dogtag_svn_external_properties_db new file mode 100644 index 000000000..f73b03339 --- /dev/null +++ b/pki/dogtag/scripts/dogtag_svn_external_properties_db @@ -0,0 +1,2 @@ +config https://pki-svn.fedora.redhat.com/svn/pki/trunk/pki/base/config +config-ext https://pki-svn.fedora.redhat.com/svn/pki/trunk/pki/linux/config-ext diff --git a/pki/dogtag/scripts/linux_svn_external_properties_db b/pki/dogtag/scripts/linux_svn_external_properties_db deleted file mode 100644 index f73b03339..000000000 --- a/pki/dogtag/scripts/linux_svn_external_properties_db +++ /dev/null @@ -1,2 +0,0 @@ -config https://pki-svn.fedora.redhat.com/svn/pki/trunk/pki/base/config -config-ext https://pki-svn.fedora.redhat.com/svn/pki/trunk/pki/linux/config-ext diff --git a/pki/dogtag/scripts/set_dogtag_SVN_external_properties b/pki/dogtag/scripts/set_dogtag_SVN_external_properties new file mode 100755 index 000000000..902f0b9eb --- /dev/null +++ b/pki/dogtag/scripts/set_dogtag_SVN_external_properties @@ -0,0 +1,48 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# (C) 2008 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into this base directory +# prior to script execution so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the name of this base directory +PKI_PWD=`pwd` + +# Name and location of the SVN external properties DB. +SVN_EXTERNAL_PROPERTIES_DB_LOCATION="${PKI_PWD}" +SVN_EXTERNAL_PROPERTIES_DB_NAME="linux_svn_external_properties_db" +SVN_EXTERNAL_PROPERTIES_DB="${SVN_EXTERNAL_PROPERTIES_DB_LOCATION}/${SVN_EXTERNAL_PROPERTIES_DB_NAME}" + +# Always make sure that the SVN external properties DB exists. +if [ ! -f ${SVN_EXTERNAL_PROPERTIES_DB} ]; then + printf "The SVN external properties DB called '${SVN_EXTERNAL_PROPERTIES_DB}' does NOT exist!\n" + exit 255; +fi + +# Specify the location and a list of the SVN components that +# require these SVN external properties to be updated. +SVN_COMPONENTS_LOCATION="${PKI_PWD}/.." +SVN_COMPONENTS="ca ca-ui common common-ui console console-ui java-tools kra kra-ui manage migrate native-tools ocsp ocsp-ui osutil ra ra-ui setup silent symkey tks tks-ui tps tps-ui util" + +# Change directory to the location of all of these components, +# and execute the defined SVN external property changes. +cd ${SVN_COMPONENTS_LOCATION} +for SVN_COMPONENT in ${SVN_COMPONENTS} ; do + if [ -d "${SVN_COMPONENTS_LOCATION}/${SVN_COMPONENT}" ]; then + printf "Setting external SVN properties for the component called '${SVN_COMPONENT}' . . .\n" + cd "${SVN_COMPONENT}" + svn propset svn:externals -F "${SVN_EXTERNAL_PROPERTIES_DB}" . + svn propget svn:externals . + svn update + cd .. + else + printf "The component called '${SVN_COMPONENTS_LOCATION}/${SVN_COMPONENT}' does NOT exist!\n" + fi +done + +exit 0; + diff --git a/pki/dogtag/scripts/set_linux_SVN_external_properties b/pki/dogtag/scripts/set_linux_SVN_external_properties deleted file mode 100755 index 902f0b9eb..000000000 --- a/pki/dogtag/scripts/set_linux_SVN_external_properties +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# (C) 2008 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into this base directory -# prior to script execution so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the name of this base directory -PKI_PWD=`pwd` - -# Name and location of the SVN external properties DB. -SVN_EXTERNAL_PROPERTIES_DB_LOCATION="${PKI_PWD}" -SVN_EXTERNAL_PROPERTIES_DB_NAME="linux_svn_external_properties_db" -SVN_EXTERNAL_PROPERTIES_DB="${SVN_EXTERNAL_PROPERTIES_DB_LOCATION}/${SVN_EXTERNAL_PROPERTIES_DB_NAME}" - -# Always make sure that the SVN external properties DB exists. -if [ ! -f ${SVN_EXTERNAL_PROPERTIES_DB} ]; then - printf "The SVN external properties DB called '${SVN_EXTERNAL_PROPERTIES_DB}' does NOT exist!\n" - exit 255; -fi - -# Specify the location and a list of the SVN components that -# require these SVN external properties to be updated. -SVN_COMPONENTS_LOCATION="${PKI_PWD}/.." -SVN_COMPONENTS="ca ca-ui common common-ui console console-ui java-tools kra kra-ui manage migrate native-tools ocsp ocsp-ui osutil ra ra-ui setup silent symkey tks tks-ui tps tps-ui util" - -# Change directory to the location of all of these components, -# and execute the defined SVN external property changes. -cd ${SVN_COMPONENTS_LOCATION} -for SVN_COMPONENT in ${SVN_COMPONENTS} ; do - if [ -d "${SVN_COMPONENTS_LOCATION}/${SVN_COMPONENT}" ]; then - printf "Setting external SVN properties for the component called '${SVN_COMPONENT}' . . .\n" - cd "${SVN_COMPONENT}" - svn propset svn:externals -F "${SVN_EXTERNAL_PROPERTIES_DB}" . - svn propget svn:externals . - svn update - cd .. - else - printf "The component called '${SVN_COMPONENTS_LOCATION}/${SVN_COMPONENT}' does NOT exist!\n" - fi -done - -exit 0; - diff --git a/pki/dogtag/setup/build_dogtag b/pki/dogtag/setup/build_dogtag new file mode 100755 index 000000000..84726f767 --- /dev/null +++ b/pki/dogtag/setup/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-setup.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/setup/build_linux b/pki/dogtag/setup/build_linux deleted file mode 100755 index 84726f767..000000000 --- a/pki/dogtag/setup/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-setup.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/setup/config-ext/build_linux_pki b/pki/dogtag/setup/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/setup/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/setup/config/product.xml b/pki/dogtag/setup/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/setup/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/setup/config/release.xml b/pki/dogtag/setup/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/setup/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/silent/build_dogtag b/pki/dogtag/silent/build_dogtag new file mode 100755 index 000000000..4405ed28d --- /dev/null +++ b/pki/dogtag/silent/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-silent.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/silent/build_linux b/pki/dogtag/silent/build_linux deleted file mode 100755 index 4405ed28d..000000000 --- a/pki/dogtag/silent/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-silent.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/silent/config-ext/build_linux_pki b/pki/dogtag/silent/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/silent/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/silent/config/product.xml b/pki/dogtag/silent/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/silent/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/silent/config/release.xml b/pki/dogtag/silent/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/silent/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/symkey/build_dogtag b/pki/dogtag/symkey/build_dogtag new file mode 100755 index 000000000..845692d6a --- /dev/null +++ b/pki/dogtag/symkey/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="symkey.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/symkey/build_linux b/pki/dogtag/symkey/build_linux deleted file mode 100755 index 845692d6a..000000000 --- a/pki/dogtag/symkey/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="symkey.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/symkey/config-ext/build_linux_pki b/pki/dogtag/symkey/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/symkey/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/symkey/config/product.xml b/pki/dogtag/symkey/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/symkey/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/symkey/config/release.xml b/pki/dogtag/symkey/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/symkey/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tks-ui/build_dogtag b/pki/dogtag/tks-ui/build_dogtag new file mode 100755 index 000000000..2d85d3c90 --- /dev/null +++ b/pki/dogtag/tks-ui/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-tks-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/tks-ui/build_linux b/pki/dogtag/tks-ui/build_linux deleted file mode 100755 index 2d85d3c90..000000000 --- a/pki/dogtag/tks-ui/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-tks-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/tks-ui/config-ext/build_linux_pki b/pki/dogtag/tks-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/tks-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/tks-ui/config/product.xml b/pki/dogtag/tks-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/tks-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tks-ui/config/release.xml b/pki/dogtag/tks-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/tks-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tks/build_dogtag b/pki/dogtag/tks/build_dogtag new file mode 100755 index 000000000..91e2b581f --- /dev/null +++ b/pki/dogtag/tks/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-tks.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/tks/build_linux b/pki/dogtag/tks/build_linux deleted file mode 100755 index 91e2b581f..000000000 --- a/pki/dogtag/tks/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-tks.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/tks/config-ext/build_linux_pki b/pki/dogtag/tks/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/tks/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/tks/config/product.xml b/pki/dogtag/tks/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/tks/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tks/config/release.xml b/pki/dogtag/tks/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/tks/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tps-ui/build_dogtag b/pki/dogtag/tps-ui/build_dogtag new file mode 100755 index 000000000..428562e99 --- /dev/null +++ b/pki/dogtag/tps-ui/build_dogtag @@ -0,0 +1,39 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301 USA +# +# Copyright (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-tps-ui.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/tps-ui/build_linux b/pki/dogtag/tps-ui/build_linux deleted file mode 100755 index 428562e99..000000000 --- a/pki/dogtag/tps-ui/build_linux +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -# -# Copyright (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-tps-ui.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/tps-ui/config-ext/build_linux_pki b/pki/dogtag/tps-ui/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/tps-ui/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/tps-ui/config/product.xml b/pki/dogtag/tps-ui/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/tps-ui/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tps-ui/config/release.xml b/pki/dogtag/tps-ui/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/tps-ui/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tps/build_dogtag b/pki/dogtag/tps/build_dogtag new file mode 100755 index 000000000..fa3f9c958 --- /dev/null +++ b/pki/dogtag/tps/build_dogtag @@ -0,0 +1,39 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-tps.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/tps/build_linux b/pki/dogtag/tps/build_linux deleted file mode 100755 index fa3f9c958..000000000 --- a/pki/dogtag/tps/build_linux +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-tps.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/tps/config-ext/build_linux_pki b/pki/dogtag/tps/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/tps/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/tps/config/product.xml b/pki/dogtag/tps/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/tps/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/tps/config/release.xml b/pki/dogtag/tps/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/tps/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/util/build_dogtag b/pki/dogtag/util/build_dogtag new file mode 100755 index 000000000..4a33825cd --- /dev/null +++ b/pki/dogtag/util/build_dogtag @@ -0,0 +1,38 @@ +#!/bin/bash +# BEGIN COPYRIGHT BLOCK +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# (C) 2007 Red Hat, Inc. +# All rights reserved. +# END COPYRIGHT BLOCK + +# Always switch into the base directory of this +# shell script prior to executing it so that all +# of its output is written to this directory +cd `dirname $0` + +# Retrieve the directory name housing this component +PWD=`pwd` + +# Set Linux component-specific environment variables +LINUX_BUILD_SCRIPT=`basename $0` +export LINUX_BUILD_SCRIPT +LINUX_COMPONENT=`basename ${PWD}` +export LINUX_COMPONENT +LINUX_SPECFILE="pki-util.spec" +export LINUX_SPECFILE + +# Invoke the shared Linux PKI build script +config-ext/build_linux_pki $@ + diff --git a/pki/dogtag/util/build_linux b/pki/dogtag/util/build_linux deleted file mode 100755 index 4a33825cd..000000000 --- a/pki/dogtag/util/build_linux +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd `dirname $0` - -# Retrieve the directory name housing this component -PWD=`pwd` - -# Set Linux component-specific environment variables -LINUX_BUILD_SCRIPT=`basename $0` -export LINUX_BUILD_SCRIPT -LINUX_COMPONENT=`basename ${PWD}` -export LINUX_COMPONENT -LINUX_SPECFILE="pki-util.spec" -export LINUX_SPECFILE - -# Invoke the shared Linux PKI build script -config-ext/build_linux_pki $@ - diff --git a/pki/dogtag/util/config-ext/build_linux_pki b/pki/dogtag/util/config-ext/build_linux_pki deleted file mode 100755 index d9ea91e8c..000000000 --- a/pki/dogtag/util/config-ext/build_linux_pki +++ /dev/null @@ -1,318 +0,0 @@ -#!/bin/bash -# BEGIN COPYRIGHT BLOCK -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# (C) 2007 Red Hat, Inc. -# All rights reserved. -# END COPYRIGHT BLOCK - -# Always switch into the base directory above this -# shared shell script prior to executing it so that -# all of its output is written to this directory -cd `dirname $0`/.. - -# Set pre-defined variables -# -# NOTE: Variables prefixed with "LINUX" are defined in the invoking script. -# Variables prefixed with "PKI" are defined in this shared script. -# Variables containing no prefix are reserved for the generated script. -# -PKI_ABORT_SCRIPT="false" -PKI_BASEDIR="../../.." -PKI_BUILD_XML=build.xml -PKI_DIR=pki -PKI_LINUX_DIR=linux -PKI_RELEASE_DIR=release -PKI_RELEASE_SCRIPT=release -PKI_SHARED_SCRIPT=`basename $0` -PKI_SRC_DIR=base - -# Check the values of the passed-in environment variables -if [ "${LINUX_BUILD_SCRIPT}" == "" ]; then - printf "ERROR: The 'LINUX_BUILD_SCRIPT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_COMPONENT}" == "" ]; then - printf "ERROR: The 'LINUX_COMPONENT' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${LINUX_SPECFILE}" == "" ]; then - printf "ERROR: The 'LINUX_SPECFILE' environment variable is undefined!\n" - PKI_ABORT_SCRIPT="true" -fi -if [ "${PKI_ABORT_SCRIPT}" == "true" ]; then - printf "\n" - printf "The '${PKI_SHARED_SCRIPT}' shared build script MUST be invoked by " - printf "a\nPKI component-specific build script (e. g. - '${LINUX_BUILD_SCRIPT}')\n" - printf "which defines ALL environment variables prefixed by 'LINUX'!\n" - exit 255 -fi - -# Compute remaining variables by assigning their values from the specfile -PKI_SOURCE_CODE_URL="https://pki-svn.fedora.redhat.com/svn/pki/trunk/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -PKI_PRODUCT_UI_PREFIX=`grep " base_ui_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT_PREFIX=`grep " base_prefix" ${LINUX_SPECFILE} | awk '{ print $3; }'` -PKI_PRODUCT=`grep " base_component" ${LINUX_SPECFILE} | awk '{ print $3; }'` -if [ "${PKI_PRODUCT_UI_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_LINUX_DIR}/${LINUX_COMPONENT}" -elif [ "${PKI_PRODUCT_PREFIX}" != "" ]; then - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT_PREFIX}-${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -else - PKI_PRODUCT_BUILD_XML="${PKI_BASEDIR}/${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}/${PKI_BUILD_XML}" - PKI_PRODUCT_NAME="${PKI_PRODUCT}" - PKI_PRODUCT_SOURCE_PATH="${PKI_DIR}/${PKI_SRC_DIR}/${LINUX_COMPONENT}" -fi -PKI_RELEASE_ROOT="${PKI_BASEDIR}/${PKI_RELEASE_DIR}/${PKI_PRODUCT_SOURCE_PATH}" -PKI_SOURCE_CODE_LOCAL_REPOSITORY="`pwd`/${PKI_BASEDIR}/${PKI_PRODUCT_SOURCE_PATH}" - -# Always check that local source code for this PKI component is available -if [ ! -d "${PKI_SOURCE_CODE_LOCAL_REPOSITORY}" ]; then - printf "Please checkout the '${LINUX_COMPONENT}' source code from:\n\n" - printf " '${PKI_SOURCE_CODE_URL}'\n\n" - printf "to:\n\n" - printf " '${PKI_SOURCE_CODE_LOCAL_REPOSITORY}'\n\n" - exit 255 -fi - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( $0, 0, 80 ) ~ "target name" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( $0, 0, 80 ) ~ "description" ) { - start = substr( $0, - match( $0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ $# -gt 0 ] ; then - echo - echo "$1" - fi - echo - echo "Usage: ${LINUX_BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "$display_targets" ${PKI_PRODUCT_BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ $# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET="" -elif [ $# -eq 1 ] ; then - if [ "$1" == "help" ]; then - usage - else - SUCCESS=`awk -v build_target=$1 "$check_targets" ${PKI_PRODUCT_BUILD_XML}` - if [ "${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="$1" - fi - fi -elif [ $# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -PKI_OS=`uname` -if [ "${PKI_OS}" != "Linux" ]; then - printf "The '${LINUX_BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -# Always start with a new release root directory -rm -rf ${PKI_RELEASE_ROOT} -mkdir -p ${PKI_RELEASE_ROOT} - -# Copy the source code to the release root -cd ${PKI_BASEDIR} -find ${PKI_PRODUCT_SOURCE_PATH} -name .svn -prune -o -name *.swp -prune -o -print | cpio -pdum ${PKI_RELEASE_DIR} > /dev/null 2>&1 -cd - > /dev/null 2>&1 - -# Remove unused files -rm -rf ${PKI_RELEASE_ROOT}/build_* -rm -rf ${PKI_RELEASE_ROOT}/*.spec -if [ -d ${PKI_RELEASE_ROOT}/config-ext ]; then - rm -rf ${PKI_RELEASE_ROOT}/config-ext -fi - -# Create the default spec file -cp ${LINUX_SPECFILE} ${PKI_RELEASE_ROOT}/${PKI_PRODUCT_NAME}.spec - -# Use bash-specific syntax to create the default build script -cat >> ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} << END_OF_SCRIPT -#!/bin/bash - -##################################################################### -### DO NOT EDIT! This script has been automatically generated! ### -##################################################################### - -# Always switch into the base directory of this -# shell script prior to executing it so that all -# of its output is written to this directory -cd \`dirname \$0\` - -# Set pre-defined variables -BUILD_SCRIPT=\`basename \$0\` -BUILD_XML=${PKI_BUILD_XML} -SPECFILE=${PKI_PRODUCT_NAME}.spec - -# Define awk scripts -check_targets=' -BEGIN { - success = "false"; -} - -{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - if( build_target == target ) { - success = "true"; - } - } - } -} - -END { - printf( "%s", success ); -}' - -display_targets='{ - while( getline < FILENAME > 0 ) { - if( substr( \$0, 0, 80 ) ~ "target name" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - target = substr( start, - start, - match( start, "\"" ) - 1 ); - } - if( substr( \$0, 0, 80 ) ~ "description" ) { - start = substr( \$0, - match( \$0, "\"" ) + 1 ); - description[target] = substr( start, - start, - match( start, "\"" ) - 1 ); - printf( "'%20s' %s\n", target, description[target] ); - } - } -}' - -# Provide a usage function -usage() { - if [ \$# -gt 0 ] ; then - echo - echo "\$1" - fi - echo - echo "Usage: \${BUILD_SCRIPT} [target]" - echo - echo " where [target] is one of the optional values:" - echo - echo " help --> display '${PKI_PRODUCT_NAME}' usage statement" - awk "\$display_targets" \${BUILD_XML} - echo - exit 255 -} - -# Verify that the appropriate number of -# command-line parameters have been entered -# and that a valid target has been specified -if [ \$# -eq 0 ] ; then - RELEASE_TARGET=main - BUILD_TARGET=main -elif [ \$# -eq 1 ] ; then - if [ "\$1" == "help" ]; then - usage - else - SUCCESS=\`awk -v build_target=\$1 "\$check_targets" \${BUILD_XML}\` - if [ "\${SUCCESS}" == "false" ]; then - usage "ERROR: Invalid target '\$1' specified for '${PKI_PRODUCT_NAME}'!" - else - RELEASE_TARGET=local - BUILD_TARGET="\$1" - fi - fi -elif [ \$# -gt 1 ] ; then - usage "ERROR: Too many parameters specified for '${PKI_PRODUCT_NAME}'!" -fi - -# This script may ONLY be run on Linux! -OS=\`uname\` -if [ "\${OS}" != "Linux" ]; then - printf "The '\${BUILD_SCRIPT}' script is ONLY executable on a 'Linux' machine!\n" - exit 255 -fi - -ant -f config/release.xml -Dbasedir=. -Dspecfile=\${SPECFILE} -Dtarget=\${BUILD_TARGET} \${RELEASE_TARGET} - -END_OF_SCRIPT -chmod 00755 ${PKI_RELEASE_ROOT}/${PKI_RELEASE_SCRIPT} - -cd ${PKI_RELEASE_ROOT} -./${PKI_RELEASE_SCRIPT} ${BUILD_TARGET} - diff --git a/pki/dogtag/util/config/product.xml b/pki/dogtag/util/config/product.xml deleted file mode 100644 index 33caf48ed..000000000 --- a/pki/dogtag/util/config/product.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pki/dogtag/util/config/release.xml b/pki/dogtag/util/config/release.xml deleted file mode 100644 index fc43aaeb7..000000000 --- a/pki/dogtag/util/config/release.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit