Commit 119bb02a authored by Bernd Schubert's avatar Bernd Schubert

package build: use version from 'fhgfs-version'

Add a new file 'fhgfs-version', which sets the current version
and other shell exports. Further version string updates should
be done in this script. This script is then sourced by all
rpm and deb build scripts
Also update
fhgfs_auto_package/make-debs.sh
fhgfs_auto_package/make-rpms.sh
and remove the old svn complete-repo-style-checkout build support.
parent ea5b3be1
#!/bin/bash
# set the fhgfs version to be used by shell scripts, so it has to be
# sourcable
# default values and supposed to be set before tagging a version
version="master"
release_str=`date +%F|tr - .`.`date +%T| tr -d :`
# those will be used in scripts and can be overridden on the shell
# by "export VER='my_new_version' and 'export RELEASE_STR="-releaseXYZ"'
VER=${VER:-$version}
RELEASE_STR=${RELEASE_STR:-$release_str}
FHGFS_VERSION="${VER}-${RELEASE_STR}"
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-admon"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,9 +3,7 @@
NAME=fhgfs-admon
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
echo $VER
echo $RELEASE_STR
......
......@@ -2,8 +2,7 @@
set -e
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../fhgfs-version
packages="fhgfs_client_module fhgfs_admon fhgfs_storage fhgfs_utils fhgfs_client_opentk_module \
fhgfs_helperd fhgfs_meta fhgfs_mgmtd fhgfs_opentk_lib fhgfs_common_package"
......@@ -13,9 +12,8 @@ the_usage()
echo >&2
echo "usage: `basename $0` [-p] [-s release-string ] [-v buildversion]" >&2
echo " -d Dry-Run, only print the exports"
echo " -p Run as complete project checkout with a different directory structure"
echo " -s Release string. Default is to use the current date"
echo " -v Build for this buildversion (tag), defaults to trunk"
echo " -v (main) version string"
echo
echo >&2
}
......@@ -33,25 +31,17 @@ run_cmd()
fi
}
VERSION="trunk"
PROJECT_CHECK_OUT=0
DRY_RUN=0
while getopts "dps:v:" opt; do
while getopts "ds:v:" opt; do
case $opt in
d)
DRY_RUN=1
;;
p)
PROJECT_CHECK_OUT=1
;;
s)
RELEASE_STR="$OPTARG"
;;
v)
VER="$OPTARG"
VERSION="$OPTARG" # just for detection if manually overwritten
;;
:)
echo "Option -$OPTARG requires an argument." >&2
......@@ -70,11 +60,10 @@ done
# specific tag
VER=`echo $VER | sed -e "s/-${RELEASE_STR}//g"`
if [ "$VERSION" != "trunk" ]; then
VERSION="${VER}-${RELEASE_STR}"
fi
echo
run_cmd "export VER=$VER"
run_cmd "export RELEASE_STR=$RELEASE_STR"
echo
opentk="fhgfs_opentk_lib"
common="fhgfs_common"
......@@ -82,27 +71,6 @@ common="fhgfs_common"
pushd `dirname $0`/../
ROOT=`pwd`
if [ $PROJECT_CHECK_OUT -eq 1 ]; then
if [ "$VERSION" = "trunk" ]; then
EXTRA_DIR="trunk"
else
EXTRA_DIR="tags/$VERSION"
fi
run_cmd "export WITHOUT_OPENTK=1"
run_cmd "export FHGFS_CLIENT_OPENTK_PATH=${ROOT}/fhgfs_client_opentk_module/$EXTRA_DIR"
run_cmd "export FHGFS_OPENTK_PATH=${ROOT}/fhgfs_opentk_lib/$EXTRA_DIR"
run_cmd "export FHGFS_COMMON_PATH=${ROOT}/fhgfs_common/$EXTRA_DIR"
run_cmd "export FHGFS_ONLINE_CFG_PATH=${ROOT}/fhgfs_online_cfg/$EXTRA_DIR"
run_cmd "export FHGFS_SETUP_PATH=${ROOT}/fhgfs_setup/$EXTRA_DIR"
run_cmd "export FHGFS_FSCK_PATH=${ROOT}/fhgfs_fsck/$EXTRA_DIR"
run_cmd "export ADMON_GUI_PATH=${ROOT}/fhgfs_admon_gui/$EXTRA_DIR/fhgfs_admon_GUI"
run_cmd "export VER=$VER"
run_cmd "export RELEASE_STR=$RELEASE_STR"
run_cmd "export ADMON_GUI_EXTERNAL_JAR_PATH=$ADMON_GUI_EXTERNAL_JAR_PATH"
fi
if [ $DRY_RUN -eq 1 ]; then
exit 0
fi
......
......@@ -4,8 +4,7 @@ set -e
DATE=`date +%F|tr - .`.`date +%T| tr -d :`
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../fhgfs-version
packages="fhgfs_opentk_lib fhgfs_admon fhgfs_utils fhgfs_client_module fhgfs_client_opentk_module \
......@@ -17,9 +16,8 @@ the_usage()
echo >&2
echo "usage: `basename $0` [-p] [-s release-string ] [-v buildversion]" >&2
echo " -d Dry-Run, only print the exports"
echo " -p Run as complete project checkout with a different directory structure"
echo " -s Release string. Default is to use the current date"
echo " -v Build for this buildversion (tag), defaults to trunk"
echo " -v (main) version string"
echo
echo >&2
}
......@@ -39,23 +37,17 @@ run_cmd()
VERSION="trunk"
PROJECT_CHECK_OUT=0
DRY_RUN=0
while getopts "dps:v:" opt; do
while getopts "ds:v:" opt; do
case $opt in
d)
DRY_RUN=1
;;
p)
PROJECT_CHECK_OUT=1
;;
s)
export RELEASE_STR="$OPTARG"
;;
v)
VER="$OPTARG"
VERSION=$OPTARG # just for detection if manually overwritten
;;
:)
echo "Option -$OPTARG requires an argument." >&2
......@@ -74,40 +66,21 @@ done
# specific tag
VER=`echo $VER | sed -e "s/-${RELEASE_STR}//g"`
echo
run_cmd "export VER=$VER"
run_cmd "export RELEASE_STR=$RELEASE_STR"
echo
common="fhgfs_common"
opentk="fhgfs_opentk_lib"
pushd `dirname $0`/../
ROOT=`pwd`
if [ $PROJECT_CHECK_OUT -eq 1 ]; then
if [ "$VERSION" = "trunk" ]; then
EXTRA_DIR="trunk"
else
EXTRA_DIR="tags/$VERSION"
fi
run_cmd "export WITHOUT_OPENTK=1"
run_cmd "export FHGFS_CLIENT_OPENTK_PATH=${ROOT}/fhgfs_client_opentk_module/$EXTRA_DIR"
run_cmd "export FHGFS_OPENTK_PATH=${ROOT}/fhgfs_opentk_lib/$EXTRA_DIR"
run_cmd "export FHGFS_COMMON_PATH=${ROOT}/fhgfs_common/$EXTRA_DIR"
run_cmd "export FHGFS_ONLINE_CFG_PATH=${ROOT}/fhgfs_online_cfg/$EXTRA_DIR"
run_cmd "export FHGFS_SETUP_PATH=${ROOT}/fhgfs_setup/$EXTRA_DIR"
run_cmd "export FHGFS_FSCK_PATH=${ROOT}/fhgfs_fsck/$EXTRA_DIR"
run_cmd "export ADMON_GUI_PATH=${ROOT}/fhgfs_admon_gui/$EXTRA_DIR/fhgfs_admon_GUI"
run_cmd "export VER=$VER"
run_cmd "export RELEASE_STR=$RELEASE_STR"
run_cmd "export ADMON_GUI_EXTERNAL_JAR_PATH=$ADMON_GUI_EXTERNAL_JAR_PATH"
fi
if [ $DRY_RUN -eq 1 ]; then
exit 0
fi
if [ "$VERSION" != "trunk" ]; then
VERSION="${VER}-${RELEASE_STR}"
fi
RPMDIR="/tmp/fhgfs_rpms-${DATE}/"
mkdir -p $RPMDIR
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-client"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_CLIENT_OPENTK_PATH=${FHGFS_CLIENT_OPENTK_PATH:-"../../fhgfs_client_opentk_module"}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-client
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-client-opentk-src"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-client-opentk-src
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-common"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-common
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-helperd"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-helperd
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-meta"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-meta
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-mgmtd"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-mgmtd
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-opentk-lib"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-opentk-lib
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-storage"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-storage
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-upgrade"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-upgrade
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
......@@ -4,11 +4,7 @@ set -e
NAME="fhgfs-utils"
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
#CODENAME=`lsb_release -c -s`
DEBIAN_VERSION=`lsb_release -r -s | sed -e 's/\..*$//'`
FHGFS_VERSION="${VER}-${RELEASE_STR}"
source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
......
......@@ -3,8 +3,7 @@
NAME=fhgfs-utils
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
source ../../fhgfs-version
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment