From 0585d387fbe14b3eaaa05086c1731741305c4030 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 28 Nov 2013 00:43:57 -0800 Subject: [PATCH] delete unused build script on ubuntu and debian --- build-debianrepo | 241 ----------------------------------------------- build-debs-all | 88 ----------------- 2 files changed, 329 deletions(-) delete mode 100755 build-debianrepo delete mode 100755 build-debs-all diff --git a/build-debianrepo b/build-debianrepo deleted file mode 100755 index abfe57955..000000000 --- a/build-debianrepo +++ /dev/null @@ -1,241 +0,0 @@ -#!/bin/sh -# Update GSA Ubuntu Repositories or create a local repository -# -# Author: Leonardo Tonetto (tonetto@linux.vnet.ibm.com) -# Revisor: Arif Ali (aali@ocf.co.uk) -# -# After running this script, add the following line to -# /etc/apt/sources.list for local repository -# deb file:///xcat-core/ maverick main -# deb file:///xcat-dep/ maverick main -# - -# For the purpose of getting the distribution name - -# Supported distributions -dists="squeeze" - -a_flag= # automatic flag - only update if repo was updated -c_flag= # xcat-core (trunk-delvel) path -d_flag= # xcat-dep (trunk) path -local_flag= # build the repository localy - -while getopts 'c:d:u:p:l:a' OPTION -do - case $OPTION in - c) c_flag=1 - xcat_core_path="$OPTARG" - ;; - d) d_flag=1 - xcat_dep_path="$OPTARG" - ;; - l) local_flag=1 - local_repo_path="$OPTARG" - ;; - a) a_flag=1 - ;; - - ?) printf "Usage: %s -c [-d ] -l [-a]\n" $(basename $0) >&2 - echo "-a Automatic: update only if there's any update on repo" - exit 2 - ;; - esac -done -shift $(($OPTIND - 1)) - -if [ -z "$c_flag" -a -z "$d_flag" ] -then - printf "Usage: %s -c [-d ] { -l | [-u -p ] } [-a]\n" $(basename $0) >&2 - echo "-a Automatic: update only if there's any update on repo" - exit 2 -fi -if [ ! -d $xcat_core_path ] -then - printf "%s: No such directory\n" "$xcat_core_path" >&2 - exit 2 -fi - -if [ "$d_flag" ] -then - if [ ! -d $xcat_dep_path ] - then - printf "%s: No such directory\n" "$xcat_dep_path" >&2 - exit 2 - fi -fi - -if [ "$local_flag" ] -then - repo_xcat_core_path=$local_repo_path"/xcat-core" - repo_xcat_dep_path=$local_repo_path"/xcat-dep" -else - printf "Usage: %s -c [-d ] -l [-a]\n" $(basename $0) >&2 - echo "-a Automatic: update only if there's any update on repo" - exit 2 -fi - -if [ "$a_flag" ] -then - touch svcupdate.trace - SVCUP='svcupdate.trace' - svn update $xcat_core_path 1> $SVCUP 2>&1 - if ! grep 'Tree is up to date' $SVCUP - then - update_core=1 - else - update_core= - fi - rm -f $SVCUP -else - update_core=1 -fi -if [ "$c_flag" -a "$update_core" ] -then - echo "###############################" - echo "# Building xcat-core packages #" - echo "###############################" - - CMD_PATH=`pwd` - cd $xcat_core_path - ./build-debs-all "snap" "Nightly_Builds" - - echo "#################################" - echo "# Creating xcat-core repository #" - echo "#################################" - - if [ -d $repo_xcat_core_path ]; then - rm -rf $repo_xcat_core_path - fi - mkdir -p $repo_xcat_core_path/conf - - find . -iname '*.deb' -exec mv {} $repo_xcat_core_path \; - - rm -rf debs/ - cd $CMD_PATH - - rm -rf $repo_xcat_core_path/conf/distributions - - for dist in $dists; do - cat << __EOF__ >> $repo_xcat_core_path/conf/distributions -Origin: xCAT internal repository -Label: xcat-core bazaar repository -Codename: $dist -Architectures: amd64 -Components: main -Description: Repository automatically genereted conf - -__EOF__ - done - - cat << __EOF__ > $repo_xcat_core_path/conf/options -verbose -basedir . -__EOF__ - - for dist in $dists; do - for file in `ls $repo_xcat_core_path/*.deb`; do - reprepro -b $repo_xcat_core_path includedeb $dist $file; - done - done - - mv $xcat_core_path/latest_version $repo_xcat_core_path/xcat-core_latest-build - - cat << '__EOF__' > $repo_xcat_core_path/mklocalrepo.sh -codename=`lsb_release -a 2>null | grep Codename | awk '{print $2}'` -cd `dirname $0` -echo deb file://"`pwd`" $codename main > /etc/apt/sources.list.d/xcat-core.list -__EOF__ - - chmod 775 $repo_xcat_core_path/mklocalrepo.sh - rm -rf $repo_xcat_core_path/*.deb - - if [ -z "$local_flag" ] - then - echo "###############################" - echo "# Updating GSA xcat-core repo #" - echo "###############################" - lftp -e "mirror -R --delete-first $repo_xcat_core_path /projects/i/ipl-xcat/ubuntu/; exit;" -u $gsa_id,$gsa_passwd -p 22 sftp://ausgsa.ibm.com - fi ### if [ -z "$local_flag" ] -fi ### if [ "$a_flag" ] - -if [ "$a_flag" -a "$d_flag" ] -then - touch svcupdate.trace - SVCUP='svcupdate.trace' - svn update $xcat_dep_path 1> $SVCUP 2>&1 - if ! grep 'Tree is up to date' $SVCUP - then - update_dep=1 - else - update_dep= - fi - rm -f $SVCUP -else - update_dep=1 -fi -if [ "$d_flag" -a "$update_dep" ] -then - echo "##############################" - echo "# Building xcat-dep packages #" - echo "##############################" - - CMD_PATH=`pwd` - cd $xcat_dep_path - ./build-debs-all "snap" "Nightly_Builds" - - echo "################################" - echo "# Creating xcat-dep repository #" - echo "################################" - rm -rf $repo_xcat_dep_path - mkdir -p $repo_xcat_dep_path/conf - find $xcat_dep_path -iname '*.deb' -exec cp {} $repo_xcat_dep_path \; - - rm -rf $repo_xcat_core_path/conf/distributions - - for dist in $dists; do - cat << __EOF__ >> $repo_xcat_dep_path/conf/distributions -Origin: xCAT internal repository -Label: xcat-dep bazaar repository -Codename: $dist -Architectures: amd64 -Components: main -Description: Repository automatically genereted conf - -__EOF__ -done - - cat << __EOF__ > $repo_xcat_dep_path/conf/options -verbose -basedir . -__EOF__ - - for dist in $dists; do - for file in `ls $repo_xcat_dep_path/*.deb`; do - reprepro -b $repo_xcat_dep_path includedeb $dist $file; - done - done - - cat << '__EOF__' > $repo_xcat_dep_path/mklocalrepo.sh -codename=`lsb_release -a 2>null | grep Codename | awk '{print $2}'` -cd `dirname $0` -echo deb file://"`pwd`" $codename main > /etc/apt/sources.list.d/xcat-dep.list -__EOF__ - - chmod 775 $repo_xcat_dep_path/mklocalrepo.sh - rm -rf $repo_xcat_dep_path/*.deb - - if [ -z "$local_flag" ] - then - echo "##############################" - echo "# Updating GSA xcat-dep repo #" - echo "##############################" - lftp -e "mirror -R --delete-first $repo_xcat_dep_path /projects/i/ipl-xcat/ubuntu/; exit;" -u $gsa_id,$gsa_passwd -p 22 sftp://ausgsa.ibm.com - fi ### if [ -z "$local_flag" ] -fi ### if [ "$d_flag" -a "$a_flag"] - -if [ -z "$local_flag" ] # delete the temp repo after upload is done -then - rm -rf ./gsa-repo_temp -fi - -exit 0 diff --git a/build-debs-all b/build-debs-all deleted file mode 100755 index 1493c2657..000000000 --- a/build-debs-all +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -########### -# -# This script call makedeb and create the deb packages -# for xCAT -# -# Author: Leonardo Tonetto -# Revisor: Adalberto Medeiros -# Revisor2: Arif Ali -# -# Input: -# -# $1 is the build type/location -# $2 is the string added to the debian/changelog of each package -# -############ - -############## -# Get input -############## - -PKG_LOCATION=$1 # local | snap | alpha -if [ -z $PKG_LOCATION ]; then - PKG_LOCATION="local" -fi -BUILD_STRING=$2 -if [ -z $BUILD_STRING ]; then - BUILD_STRING="Personal Build" -fi -XCAT_VERSION=`cat Version` -TRUNK_REVISION=`svnversion | cut -d ":" -f1` -CUR_DATE=`date +%Y%m%d` -VERSION="${XCAT_VERSION}-${PKG_LOCATION}${CUR_DATE}" - -function makedeb { - SRC_ROOT=$1 - PKG_LOCATION=$2 - BUILD_STRING=$3 - VERSION=$4 - - # - # Make DEBs - # - # build perl-xCAT - deps are libsoap-lite-perl, libdigest-sha1-perl, libdbi-perl - # - - find $SRC_ROOT -maxdepth 2 -name debian -type d | while read DEBIAN_DIR - do - DIR=`echo ${DEBIAN_DIR} | sed -e 's/[/]debian$//'` - cd ${DIR} - dch -v $VERSION -b -c debian/changelog "$BUILD_STRING" - dpkg-buildpackage - cd - - RC=$? - if [ ${RC} -gt 0 ] - then - echo "Warning: ${DEBIAN_DIR} failed exit code ${RC}" - fi - done - - # - # Clean up - # - # Eliminate unnecessary directories and debian/files made by dpkg-buildpackage - - find $SRC_ROOT -maxdepth 3 -type d -name "xcat-*" | grep debian | xargs rm -rf - find $SRC_ROOT -maxdepth 3 -type f -name "files" | grep debian | xargs rm -f -} - -# build all debian packages -packages="xCAT-client xCAT-nbroot xCAT-nbroot2 perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-IBMhpc xCAT-rmc" - -for file in `echo $packages` -do - makedeb $file $PKG_LOCATION "$BUILD_STRING" $VERSION -done - -if [ -d debs ]; then - rm -rf debs -fi - -mkdir debs -mv xcat* debs/ -mv perl-xcat* debs/ - -echo $VERSION > latest_version - -exit 0