[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 273 Added option to override compose work directory.



Currently the compose scripts always use a fixed work directory called
"packages" to do the build. To provide more flexibility, a new optional
parameter has been added to allow overriding the work directory.

--
Endi S. Dewata
From 0f75dfee5ca0bd2da2eadc01934132b6df5b9258 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata redhat com>
Date: Tue, 16 Jul 2013 17:26:21 -0400
Subject: [PATCH] Added option to override compose work directory.

Currently the compose scripts always use a fixed work directory called
"packages" to do the build. To provide more flexibility, a new optional
parameter has been added to allow overriding the work directory.
---
 scripts/compose_dogtag_pki_theme_packages | 7 ++++++-
 scripts/compose_functions                 | 3 ++-
 scripts/compose_ipa_pki_theme_packages    | 7 ++++++-
 scripts/compose_pki_console_packages      | 7 ++++++-
 scripts/compose_pki_core_packages         | 7 ++++++-
 scripts/compose_pki_migrate_packages      | 7 ++++++-
 scripts/compose_pki_ra_packages           | 7 ++++++-
 scripts/compose_pki_tps_packages          | 7 ++++++-
 8 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/scripts/compose_dogtag_pki_theme_packages b/scripts/compose_dogtag_pki_theme_packages
index d2e74d17ceb8609c597ec21dd76ce5570ec7f7cf..f340dbf9c6837e8390cd1de38f15e0cd87662df0 100755
--- a/scripts/compose_dogtag_pki_theme_packages
+++ b/scripts/compose_dogtag_pki_theme_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test common-ui ra-ui tps-ui console-ui"
 ## Establish the TARGET files/directories of the 'dogtag-pki' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 DOGTAG_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 DOGTAG_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 DOGTAG_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_functions b/scripts/compose_functions
index a6a8ed5b611026b25882d9bc77bd754b1f82ba78..7fbb941d698823714722eec98733b055acedd020 100644
--- a/scripts/compose_functions
+++ b/scripts/compose_functions
@@ -241,7 +241,7 @@ Fetch_Source_Tarball()
 ## Check for command line argument validity
 ##
 
-GETOPT=`getopt -o '' -l without-javadoc -n "$0" -- "$@"`
+GETOPT=`getopt -o '' -l without-javadoc,work-dir: -n "$0" -- "$@"`
 
 if [ $? != 0 ] ; then
     Usage
@@ -253,6 +253,7 @@ eval set -- "$GETOPT"
 while true ; do
     case "$1" in
         --without-javadoc) JAVADOC="--without javadoc" ; shift ;;
+        --work-dir) WORK_DIR="$2" ; shift 2 ;;
         --) shift ; break ;;
         *) echo "$0: unrecognized option '$1'" 1>&2 ; exit 255 ;;
     esac
diff --git a/scripts/compose_ipa_pki_theme_packages b/scripts/compose_ipa_pki_theme_packages
index 02ca483e17f18c6a98253ef1afc7d52f8ff24aaa..eac6cddd626bea9022160f993b7037c4af8559f9 100755
--- a/scripts/compose_ipa_pki_theme_packages
+++ b/scripts/compose_ipa_pki_theme_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="common-ui ca-ui"
 ## Establish the TARGET files/directories of the 'ipa-pki' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 IPA_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 IPA_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 IPA_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_console_packages b/scripts/compose_pki_console_packages
index 1e9939b7230abac420c9120cfaa03cc5c60340be..22f17d07dc40d1b5c000115410c41061a16ee08e 100755
--- a/scripts/compose_pki_console_packages
+++ b/scripts/compose_pki_console_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test console"
 ## Establish the TARGET files/directories of the 'pki-console' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 PKI_CONSOLE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 PKI_CONSOLE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 PKI_CONSOLE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_core_packages b/scripts/compose_pki_core_packages
index 78702b55116a239b241af887044b5bc28a7e27e2..99d480c31a1b2c565055f24940c2b15355a79b31 100755
--- a/scripts/compose_pki_core_packages
+++ b/scripts/compose_pki_core_packages
@@ -49,7 +49,12 @@ fi
 ## Establish the TARGET files/directories of the 'pki-core' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 PKI_CORE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 PKI_CORE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 PKI_CORE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_migrate_packages b/scripts/compose_pki_migrate_packages
index cf59f0174016d4d50afae0765cd0d35a17ea110e..f9bcaccb8292d029ffb2689dfc30cfa110168ec8 100755
--- a/scripts/compose_pki_migrate_packages
+++ b/scripts/compose_pki_migrate_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test migrate"
 ## Establish the TARGET files/directories of the 'pki-migrate' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 PKI_MIGRATE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 PKI_MIGRATE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 PKI_MIGRATE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_ra_packages b/scripts/compose_pki_ra_packages
index 3eae6f682378254922c054ecc4a02cc07c0908a8..0e93ee4e1688d8820af15d767134f8021550a114 100755
--- a/scripts/compose_pki_ra_packages
+++ b/scripts/compose_pki_ra_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="ra"
 ## Establish the TARGET files/directories of the 'pki-ra' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 PKI_RA_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 PKI_RA_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 PKI_RA_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_tps_packages b/scripts/compose_pki_tps_packages
index eb0706ceb830e8f2c2ac9e0e9d7f6a1d5b9ab68d..a23c52982472ede6494326404b303675f5fa1a12 100755
--- a/scripts/compose_pki_tps_packages
+++ b/scripts/compose_pki_tps_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="tps"
 ## Establish the TARGET files/directories of the 'pki-tps' source/spec files
 ##
 
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+    PKI_PACKAGES="$WORK_DIR"
+else
+    PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
 PKI_TPS_BUILD_DIR="${PKI_PACKAGES}/BUILD"
 PKI_TPS_RPMS_DIR="${PKI_PACKAGES}/RPMS"
 PKI_TPS_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]