diff options
author | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2008-11-28 21:52:41 +0000 |
---|---|---|
committer | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2008-11-28 21:52:41 +0000 |
commit | 76404e86a1ba103f14a1118c2ba1fea8c5e9942d (patch) | |
tree | 0e34aaac031009c21d4531889bc3e1e323f0316c /pki/dogtag | |
parent | 659f08562d1f0485361a75c7028950c7e9c2a3d3 (diff) | |
download | pki-76404e86a1ba103f14a1118c2ba1fea8c5e9942d.tar.gz pki-76404e86a1ba103f14a1118c2ba1fea8c5e9942d.tar.xz pki-76404e86a1ba103f14a1118c2ba1fea8c5e9942d.zip |
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
Diffstat (limited to 'pki/dogtag')
103 files changed, 0 insertions, 17725 deletions
diff --git a/pki/dogtag/ca-ui/build_linux b/pki/dogtag/ca-ui/build_dogtag index 337fbb3fd..337fbb3fd 100755 --- a/pki/dogtag/ca-ui/build_linux +++ b/pki/dogtag/ca-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ca/build_linux b/pki/dogtag/ca/build_dogtag index 6be41e5e1..6be41e5e1 100755 --- a/pki/dogtag/ca/build_linux +++ b/pki/dogtag/ca/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/common-ui/build_linux b/pki/dogtag/common-ui/build_dogtag index 10a6bc982..10a6bc982 100755 --- a/pki/dogtag/common-ui/build_linux +++ b/pki/dogtag/common-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/common/build_linux b/pki/dogtag/common/build_dogtag index 51618a126..51618a126 100755 --- a/pki/dogtag/common/build_linux +++ b/pki/dogtag/common/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ca-ui/config-ext/build_linux_pki b/pki/dogtag/config-ext/build_dogtag_pki index d9ea91e8c..d9ea91e8c 100755 --- a/pki/dogtag/ca-ui/config-ext/build_linux_pki +++ b/pki/dogtag/config-ext/build_dogtag_pki 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_linux b/pki/dogtag/console-ui/build_dogtag index bbcd0a6a4..bbcd0a6a4 100755 --- a/pki/dogtag/console-ui/build_linux +++ b/pki/dogtag/console-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/console/build_linux b/pki/dogtag/console/build_dogtag index 9700d8321..9700d8321 100755 --- a/pki/dogtag/console/build_linux +++ b/pki/dogtag/console/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/java-tools/build_linux b/pki/dogtag/java-tools/build_dogtag index 3eaf7df2f..3eaf7df2f 100755 --- a/pki/dogtag/java-tools/build_linux +++ b/pki/dogtag/java-tools/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/kra-ui/build_linux b/pki/dogtag/kra-ui/build_dogtag index c934ba268..c934ba268 100755 --- a/pki/dogtag/kra-ui/build_linux +++ b/pki/dogtag/kra-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/kra/build_linux b/pki/dogtag/kra/build_dogtag index 016383c11..016383c11 100755 --- a/pki/dogtag/kra/build_linux +++ b/pki/dogtag/kra/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/manage/build_linux b/pki/dogtag/manage/build_dogtag index 4e79895db..4e79895db 100755 --- a/pki/dogtag/manage/build_linux +++ b/pki/dogtag/manage/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/migrate/build_linux b/pki/dogtag/migrate/build_dogtag index 4bc21a648..4bc21a648 100755 --- a/pki/dogtag/migrate/build_linux +++ b/pki/dogtag/migrate/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/native-tools/build_linux b/pki/dogtag/native-tools/build_dogtag index 65861b388..65861b388 100755 --- a/pki/dogtag/native-tools/build_linux +++ b/pki/dogtag/native-tools/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ocsp-ui/build_linux b/pki/dogtag/ocsp-ui/build_dogtag index 8b4629672..8b4629672 100755 --- a/pki/dogtag/ocsp-ui/build_linux +++ b/pki/dogtag/ocsp-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ocsp/build_linux b/pki/dogtag/ocsp/build_dogtag index 698dde47c..698dde47c 100755 --- a/pki/dogtag/ocsp/build_linux +++ b/pki/dogtag/ocsp/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/osutil/build_linux b/pki/dogtag/osutil/build_dogtag index 2f98316d8..2f98316d8 100755 --- a/pki/dogtag/osutil/build_linux +++ b/pki/dogtag/osutil/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ra-ui/build_linux b/pki/dogtag/ra-ui/build_dogtag index f330d94fb..f330d94fb 100755 --- a/pki/dogtag/ra-ui/build_linux +++ b/pki/dogtag/ra-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/ra/build_linux b/pki/dogtag/ra/build_dogtag index 8b9c03b57..8b9c03b57 100755 --- a/pki/dogtag/ra/build_linux +++ b/pki/dogtag/ra/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/scripts/linux_svn_external_properties_db b/pki/dogtag/scripts/dogtag_svn_external_properties_db index f73b03339..f73b03339 100644 --- a/pki/dogtag/scripts/linux_svn_external_properties_db +++ b/pki/dogtag/scripts/dogtag_svn_external_properties_db diff --git a/pki/dogtag/scripts/set_linux_SVN_external_properties b/pki/dogtag/scripts/set_dogtag_SVN_external_properties index 902f0b9eb..902f0b9eb 100755 --- a/pki/dogtag/scripts/set_linux_SVN_external_properties +++ b/pki/dogtag/scripts/set_dogtag_SVN_external_properties diff --git a/pki/dogtag/setup/build_linux b/pki/dogtag/setup/build_dogtag index 84726f767..84726f767 100755 --- a/pki/dogtag/setup/build_linux +++ b/pki/dogtag/setup/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/silent/build_linux b/pki/dogtag/silent/build_dogtag index 4405ed28d..4405ed28d 100755 --- a/pki/dogtag/silent/build_linux +++ b/pki/dogtag/silent/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/symkey/build_linux b/pki/dogtag/symkey/build_dogtag index 845692d6a..845692d6a 100755 --- a/pki/dogtag/symkey/build_linux +++ b/pki/dogtag/symkey/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/tks-ui/build_linux b/pki/dogtag/tks-ui/build_dogtag index 2d85d3c90..2d85d3c90 100755 --- a/pki/dogtag/tks-ui/build_linux +++ b/pki/dogtag/tks-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/tks/build_linux b/pki/dogtag/tks/build_dogtag index 91e2b581f..91e2b581f 100755 --- a/pki/dogtag/tks/build_linux +++ b/pki/dogtag/tks/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/tps-ui/build_linux b/pki/dogtag/tps-ui/build_dogtag index 428562e99..428562e99 100755 --- a/pki/dogtag/tps-ui/build_linux +++ b/pki/dogtag/tps-ui/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/tps/build_linux b/pki/dogtag/tps/build_dogtag index fa3f9c958..fa3f9c958 100755 --- a/pki/dogtag/tps/build_linux +++ b/pki/dogtag/tps/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - diff --git a/pki/dogtag/util/build_linux b/pki/dogtag/util/build_dogtag index 4a33825cd..4a33825cd 100755 --- a/pki/dogtag/util/build_linux +++ b/pki/dogtag/util/build_dogtag 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="product.xml" default="main" basedir="."> - - <!-- Set up properties based upon the user's default Ant configuration --> - <property file=".ant.properties"/> - <property file="${user.home}/.ant.properties"/> - <property environment="env"/> - - - <!-- Check for required properties passed-in via the build scripts --> - <fail message="The '-Dspecfile=SPECFILE' property MUST always be specified!" - unless="specfile"/> - - - <!-- Set up optional properties passed-in via the build scripts --> - <property name="basedir" value=""/> - <property name="dirsec" value=""/> - <property name="target" value=""/> - - - <!-- Set up properties obtained from the spec file --> - <exec executable="perl" - failonerror="true" - outputproperty="Name"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_product\s+(.*)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="spec.product.ui.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_ui_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product.prefix"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_prefix\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <exec executable="perl" - failonerror="true" - outputproperty="product"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_component\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - <!-- if "spec.product.ui.prefix" is "" or "linux", --> - <!-- set "product.ui.prefix" to ""; otherwise --> - <!-- set "product.ui.prefix" to "spec.product.ui.prefix" --> - <condition property="product.ui.prefix" - value="" - else="${spec.product.ui.prefix}"> - <or> - <equals arg1="${spec.product.ui.prefix}" - arg2=""/> - <equals arg1="${spec.product.ui.prefix}" - arg2="linux"/> - </or> - </condition> - - <!-- "product.name" is of the form "x-y-z" --> - <condition property="product.name" - value="${product.ui.prefix}-${product.prefix}-${product}"> - <not> - <equals arg1="${product.ui.prefix}" - arg2=""/> - </not> - </condition> - - <!-- "product.name" is of the form "x-y" --> - <condition property="product.name" - value="${product.prefix}-${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <not> - <equals arg1="${product.prefix}" - arg2=""/> - </not> - </and> - </condition> - - <!-- "product.name" is of the form "x" --> - <condition property="product.name" - value="${product}"> - <and> - <equals arg1="${product.ui.prefix}" - arg2=""/> - <equals arg1="${product.prefix}" - arg2=""/> - </and> - </condition> - - <exec executable="perl" - failonerror="true" - outputproperty="version"> - <arg value="-ne"/> - <arg value="print $1 if /%define base_version\s+(\S+)/"/> - <arg value="${specfile}"/> - </exec> - - - <!-- Set up architecture-dependent properties --> - <exec executable="uname" - failonerror="true" - outputproperty="arch"> - <arg line="-i"/> - </exec> - - <!-- Set up architecture-independent properties --> - <property name="jar.home" value="/usr/share/java"/> - <property name="pki-jar.home" value="${jar.home}/${product.prefix}"/> - <property name="jni-jar.home" value="/usr/lib/java"/> - - <!-- Set up properties that control various build options --> - <property name="debug" value="true"/> - <property name="chmod.fail" value="true"/> - <property name="chmod.maxparallel" value="250"/> - <property name="deprecation" value="false"/> - <property name="optimize" value="true"/> - - - <!-- Set up properties related to the source tree --> - <property name="docs.dir" value="docs"/> - <property name="lib.dir" value="lib"/> - <property name="src.dir" value="src"/> - <property name="test.dir" value="test"/> - <property name="etc.dir" value="${src.dir}/etc"/> - <property name="script.dir" value="${src.dir}/script"/> - - - <!-- Set up properties for the release area --> - <property name="release.root" value="."/> - - - <!-- Set up properties for the build area --> - <property name="build.dir" value="build"/> - <property name="bootstrap.dir" value="bootstrap"/> - <property name="build.jars" value="${build.dir}/jars"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.lib" value="${build.dir}/lib"/> - <property name="build.javadocs" value="${build.dir}/javadocs"/> - <property name="build.tests" value="${build.dir}/testcases"/> - <property name="build.tests.javadocs" value="${build.dir}/javadocs.test/"/> - <property name="manifest.tmp" value="${build.dir}/optional.manifest"/> - - - <!-- Set up properties for the distribution area --> - <property name="dist.name" value="${product.name}-${version}"/> - <property name="dist.base" value="dist"/> - <property name="dist.base.source" value="${dist.base}/source"/> - <property name="dist.base.binaries" value="${dist.base}/binary"/> - <property name="dist.dir" value="dist"/> - <property name="dist.bin" value="${dist.dir}/bin"/> - <property name="dist.lib" value="${dist.dir}/lib"/> - <property name="dist.docs" value="${dist.dir}/docs"/> - <property name="dist.etc" value="${dist.dir}/etc"/> - <property name="src.dist.name" value="${product.name}-${version}"/> - <property name="src.dist.dir" value="dist-src"/> - <property name="src.dist.src" value="${src.dist.dir}/src"/> - <property name="src.dist.docs" value="${src.dist.dir}/docs"/> - <property name="src.dist.lib" value="${src.dist.dir}/lib"/> - - - <!-- Set up properties for log messages --> - <property name="begin.clean.log.message" - value="Removing '${product.name}' component directories ..."/> - <property name="empty.clean.log.message" - value="Nothing to do!"/> - <property name="end.clean.log.message" - value="Completed removing '${product.name}' component directories."/> - <property name="begin.download.log.message" - value="Downloading '${product.name}' dependent components ..."/> - <property name="empty.download.log.message" - value="Nothing to do!"/> - <property name="end.download.log.message" - value="Completed downloading '${product.name}' dependent components."/> - <property name="begin.compile.java.log.message" - value="Compiling '${product.name}' java code from '${src.dir}' into '${build.classes}' ..."/> - <property name="empty.compile.java.log.message" - value="Nothing to do!"/> - <property name="end.compile.java.log.message" - value="Completed compiling '${product.name}' java code from '${src.dir}' into '${build.classes}'."/> - <property name="begin.build.jars.log.message" - value="Generating '${product.name}' jar files ..."/> - <property name="empty.build.jars.log.message" - value="Nothing to do!"/> - <property name="end.build.jars.log.message" - value="Completed generating '${product.name}' jar files."/> - <property name="begin.build.jni.headers.log.message" - value="Generating '${product.name}' java header files ..."/> - <property name="empty.build.jni.headers.log.message" - value="Nothing to do!"/> - <property name="end.build.jni.headers.log.message" - value="Completed generating '${product.name}' java header files."/> - <property name="notify.build.log.message" - value="Built classes, jars, and jni headers for the '${product.name}' component."/> - <property name="begin.compile.junit.tests.log.message" - value="Compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}' ..."/> - <property name="empty.compile.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.compile.junit.tests.log.message" - value="Completed compiling '${product.name}' junit tests from '${test.dir}' into '${build.tests}'."/> - <property name="begin.run.junit.tests.log.message" - value="Executing '${product.name}' tests ..."/> - <property name="empty.run.junit.tests.log.message" - value="Nothing to do!"/> - <property name="end.run.junit.tests.log.message" - value="Completed executing '${product.name}' tests."/> - <property name="notify.verify.log.message" - value="Verified the '${product.name}' component."/> - <property name="begin.clean.javadocs.log.message" - value="Removing '${product.name}' javadocs directory ..."/> - <property name="empty.clean.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.clean.javadocs.log.message" - value="Completed removing '${product.name}' javadocs directory."/> - <property name="begin.compose.javadocs.log.message" - value="Composing '${product.name}' javadocs ..."/> - <property name="empty.compose.javadocs.log.message" - value="Nothing to do!"/> - <property name="end.compose.javadocs.log.message" - value="Completed composing '${product.name}' javadocs."/> - <property name="notify.document.log.message" - value="Documented '${product.name}' javadocs."/> - <property name="begin.distribute.binaries.log.message" - value="Creating '${product.name}' binary distributions ..."/> - <property name="begin.binary.wrappers.log.message" - value=" Creating '${product.name}' binary wrappers ..."/> - <property name="empty.binary.wrappers.log.message" - value=" Nothing to do!"/> - <property name="end.binary.wrappers.log.message" - value=" Completed creating '${product.name}' binary wrappers."/> - <property name="begin.binary.zip.log.message" - value=" Creating '${product.name}' binary zip files ..."/> - <property name="empty.binary.zip.log.message" - value=" Nothing to do!"/> - <property name="end.binary.zip.log.message" - value=" Completed creating '${product.name}' binary zip files."/> - <property name="begin.binary.tar.log.message" - value=" Creating '${product.name}' binary tar files ..."/> - <property name="empty.binary.tar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.tar.log.message" - value=" Completed creating '${product.name}' binary tar files."/> - <property name="begin.binary.gtar.log.message" - value=" Creating '${product.name}' binary gzip files ..."/> - <property name="empty.binary.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.binary.gtar.log.message" - value=" Completed creating '${product.name}' binary gzip files."/> - <property name="end.distribute.binaries.log.message" - value="Completed creating '${product.name}' binary distributions."/> - <property name="begin.distribute.source.log.message" - value="Creating '${product.name}' source distributions ..."/> - <property name="begin.source.zip.log.message" - value=" Creating '${product.name}' source zip files ..."/> - <property name="empty.source.zip.log.message" - value=" Nothing to do!"/> - <property name="end.source.zip.log.message" - value=" Completed creating '${product.name}' source zip files."/> - <property name="begin.source.tar.log.message" - value=" Creating '${product.name}' source tar files ..."/> - <property name="empty.source.tar.log.message" - value=" Nothing to do!"/> - <property name="end.source.tar.log.message" - value=" Completed creating '${product.name}' source tar files."/> - <property name="begin.source.gtar.log.message" - value=" Creating '${product.name}' source gzip files ..."/> - <property name="empty.source.gtar.log.message" - value=" Nothing to do!"/> - <property name="end.source.gtar.log.message" - value=" Completed creating '${product.name}' source gzip files."/> - <property name="end.distribute.source.log.message" - value="Completed creating '${product.name}' source distributions."/> - <property name="notify.distribute.log.message" - value="Distributed '${product.name}' distribution packages."/> - <property name="notify.main.log.message" - value="Built, verified, documented, and distributed a fresh '${product.name}' component."/> - -</project> - 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 @@ -<!-- ### 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. - - Copyright (C) 2007 Red Hat, Inc. - All rights reserved. - ### END COPYRIGHT BLOCK ### --> -<project name="release.xml" default="main" basedir="${basedir}"> - - <echo message="Importing shared properties ..."/> - <import file="product.xml"/> - <import file="product-ext.xml" optional="true"/> - <import file="release-ext.xml" optional="true"/> - <echo message="Completed importing shared properties."/> - - - <target name="local" - depends="" - description="--> Generate this target locally"> - <echo message="Generating the '${product.name}' target locally ..."/> - <exec executable="ant" dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="${target}"/> - </exec> - <echo message="Completed generating the '${product.name}' target locally."/> - </target> - - - <target name="main" - depends="" - description="--> Generate component RPMS and SRPMS"> - <echo message="Generating '${product.name}' RPMS and SRPMS ..."/> - - <exec executable="pwd" - failonerror="true" - outputproperty="top.dir"/> - <echo message="Established the '${top.dir}' top-level directory."/> - - <echo message="Creating the '${product.name}' source distribution ..."/> - <exec executable="ant" - dir="${release.root}"> - <arg value="-Dspecfile=${product.name}.spec"/> - <arg value="-Ddirsec=${dirsec}"/> - <arg value="distribute_source"/> - </exec> - <echo message="Completed creating the '${product.name}' source distribution."/> - - <echo message="Creating '${product.name}' RPM directories ..."/> - <mkdir dir="${release.root}/dist/rpmpkg"/> - <mkdir dir="${release.root}/dist/rpmpkg/SOURCES"/> - <mkdir dir="${release.root}/dist/rpmpkg/RPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SRPMS"/> - <mkdir dir="${release.root}/dist/rpmpkg/SPECS"/> - <mkdir dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed creating '${product.name}' RPM directories."/> - - <echo message="Building '${product.name}' RPMS and SRPMS ..."/> - <exec executable="rpmbuild" - dir="${release.root}"> - <arg value="--define"/> - <arg value="_topdir ${top.dir}/${release.root}/dist/rpmpkg"/> - <arg value="-ta"/> - <arg value="${top.dir}/${release.root}/dist/source/${product.name}-${version}.tar.gz"/> - </exec> - <echo message="Completed building '${product.name}' RPMS and SRPMS."/> - - <echo message="Removing various '${product.name}' RPM directories and files ..."/> - <delete dir="${release.root}/dist/rpmpkg/BUILD"/> - <echo message="Completed removing various '${product.name}' RPM directories and files."/> - - <echo message="Completed generating '${product.name}' RPMS and SRPMS."/> - </target> - -</project> - |