From 843c151dce3f202496271283f097a94688b3d354 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 27 Oct 2011 17:07:38 +0000 Subject: [PATCH] 2011-10-27 Ramon Novoa * build_src.sh: Create symlinks needed to build RPM packages. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5090 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- extras/ChangeLog | 4 ++++ extras/build_src.sh | 26 +++++++++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/extras/ChangeLog b/extras/ChangeLog index 58ab54b327..0fa48fbe4f 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -1,3 +1,7 @@ +2011-10-27 Ramon Novoa + + * build_src.sh: Create symlinks needed to build RPM packages. + 2011-10-27 Ramon Novoa * build_src.sh: Include build number in tarballs for nightly builds. diff --git a/extras/build_src.sh b/extras/build_src.sh index 9eaf696313..7aa8435f99 100755 --- a/extras/build_src.sh +++ b/extras/build_src.sh @@ -8,7 +8,9 @@ KEYGEN_VERSION=$(grep "%define version" $CODEHOME_ENT/updatemanager/keygen/pando # Add build string for nightly builds if [ "$1" == "nightly" ]; then - VERSION="$VERSION-$BUILD" + LOCAL_VERSION="$VERSION-$BUILD" +else + LOCAL_VERSION=$VERSION fi if [ ! -d $RPMHOME/SOURCES ]; then @@ -18,25 +20,35 @@ fi echo "Creating source tarballs in $RPMHOME/SOURCES" # Console -cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz --exclude \.svn --exclude config.php --exclude enterprise pandora_console || exit 1 +cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_console-$LOCAL_VERSION.tar.gz --exclude \.svn --exclude config.php --exclude enterprise pandora_console || exit 1 # Server -cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz --exclude \.svn pandora_server || exit 1 +cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_server-$LOCAL_VERSION.tar.gz --exclude \.svn pandora_server || exit 1 # Linux agent -cd $CODEHOME/pandora_agents/shellscript && tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz --exclude \.svn --exclude nohup linux || exit 1 +cd $CODEHOME/pandora_agents/shellscript && tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$LOCAL_VERSION.tar.gz --exclude \.svn --exclude nohup linux || exit 1 # Unix agent -cd $CODEHOME/pandora_agents && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$VERSION.tar.gz --exclude \.svn --exclude nohup --exclude NT4 unix || exit 1 +cd $CODEHOME/pandora_agents && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$LOCAL_VERSION.tar.gz --exclude \.svn --exclude nohup --exclude NT4 unix || exit 1 # Enterprise console -cd $CODEHOME_ENT/pandora/trunk/pandora_console && tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz --exclude \.svn enterprise/* || exit 1 +cd $CODEHOME_ENT/pandora/trunk/pandora_console && tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$LOCAL_VERSION.tar.gz --exclude \.svn enterprise/* || exit 1 # Enterprise server -cd $CODEHOME_ENT/pandora/trunk/pandora_server/ && tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz --exclude \.svn PandoraFMS-Enterprise || exit 1 +cd $CODEHOME_ENT/pandora/trunk/pandora_server/ && tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$LOCAL_VERSION.tar.gz --exclude \.svn PandoraFMS-Enterprise || exit 1 # Updatemanager keygen cd $CODEHOME_ENT/updatemanager/keygen && tar cvzf $RPMHOME/SOURCES/pandorafms_keygen-$KEYGEN_VERSION.tar.gz --exclude .svn --exclude keygen --exclude keygen.i386.static --exclude pandora_keygen.spec pandora || exit 1 +# Create symlinks needed to build RPM packages +if [ "$1" == "nightly" ]; then + ln -s $RPMHOME/SOURCES/pandorafms_console-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz || exit 1 + ln -s $RPMHOME/SOURCES/pandorafms_server-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz || exit 1 + ln -s $RPMHOME/SOURCES/pandorafms_agent-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz || exit 1 + ln -s $RPMHOME/SOURCES/pandorafms_agent_unix-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_agent_unix-$VERSION.tar.gz || exit 1 + ln -s $RPMHOME/SOURCES/pandorafms_console_enterprise-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz || exit 1 + ln -s $RPMHOME/SOURCES/pandorafms_server_enterprise-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz || exit 1 +fi + exit 0