Changeset 739 for trunk/dassbuild


Ignore:
Timestamp:
May 26, 2009, 1:34:34 PM (15 years ago)
Author:
joergs
Message:

changed from tar.bz2 to orig.tar.gz to be compatable with Debian, checks for OSC_LOCAL flag file

Location:
trunk/dassbuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dassbuild/svn_build_prepare.sh

    r736 r739  
    1111
    1212# TODO:
    13 #   needs force parameter for tar.bz2 creation
     13#   needs force parameter for tar.gz creation
    1414
    1515
     
    125125    if [ -r "SOURCES" ]; then
    126126        # create a tar file from the sources
    127         printf "creating $PACKAGE-$VERSION.tar.bz2: "
    128 
    129         if [ "$REBUILD" -o ! -r ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 ]; then
     127        SOURCE_ARCHIVE="$PACKAGE-$VERSION.orig.tar.gz"
     128        printf "creating $SOURCE_ARCHIVE: "
     129
     130        if [ "$REBUILD" -o ! -r ${BUILDTEMP}/src/${PACKAGE}/$SOURCE_ARCHIVE ]; then
    130131            rm -rf ${BUILDTEMP}/src/${PACKAGE}
    131132            mkdir -p ${BUILDTEMP}/src/${PACKAGE}
    132             tar cvjf ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 --files-from SOURCES --exclude .svn --exclude "*~"
     133            tar cvzf ${BUILDTEMP}/src/${PACKAGE}/$SOURCE_ARCHIVE --files-from SOURCES --exclude .svn --exclude "*~"
    133134        else
    134135            printf "already exists. Skipped\n"
    135             exit 1
     136            printf "  (${BUILDTEMP}/src/${PACKAGE}/$SOURCE_ARCHIVE)\n"
     137            # exit, but without error, so that the calling script will continue
     138            exit 0
    136139        fi
    137140    elif [ -r "SPECSOURCES" ]; then
  • trunk/dassbuild/svn_osc_build.sh

    r725 r739  
    1010#
    1111
     12# environment variables:
     13#   OSBS_PROJECT (e.g. home:dassit) or config file "OSC_PACKAGE" (e.g. home:dassit/dasscm)
     14
     15
    1216[ -z "$BUILD_USES_SVN" ] && BUILD_USES_SVN="yes"
    1317
     
    1620BUILDTEMP=$DEST_DIR/buildsrc/
    1721
    18 if [ ! -r OSC_PACKAGE ]; then
    19     echo "failed to read config file OSC_PACKAGE"
    20     exit 1
     22if [ -r OSC_LOCAL ]; then
     23    LOCAL_BUILD="yes"
    2124fi
    2225
    23 OSC_PACKAGE=`cat OSC_PACKAGE`
    2426
    2527svn_build_prepare.sh $*
     
    5860echo "Version: $VERSION"
    5961
     62#
     63# get the openSUSE build service project
     64#   check for file "OSC_PACKAGE" first,
     65#   if it is not found, use the variable OSBC_PROJECT
     66#
     67if [ -r OSC_PACKAGE ]; then
     68    OSC_PACKAGE=`cat OSC_PACKAGE`
     69elif [ "$OSBS_PROJECT" ]; then
     70    OSC_PACKAGE="$OSBS_PROJECT/$PACKAGE"
     71else
     72    OSC_PACKAGE="home:$BUILDUSER/$PACKAGE"
     73fi
     74
     75# remove double slashes (/)
     76OSC_PACKAGE=`sed 's|/[/]*|/|g' <<< $OSC_PACKAGE`
     77
    6078osc co $OSC_PACKAGE || {
    61     # error message already from osc
     79    echo
     80    echo 'An existing "openSUSE Build Service" project must be specified.'
     81    echo 'To specify it, use the config file OSC_PACKAGE or the environment variable OSBS_PROJECT'
    6282    exit 1
    6383}
     
    6686#cp -av $BUILDSRC_DIR/* $OSC_PACKAGE/.
    6787
    68 cd $OSC_PACKAGE
     88cd $OSC_PACKAGE || exit 1
    6989# rsync -a: -rlptgoD
    7090# but we don't want to check for timestamps
     
    7393rsync --checksum -r -v --delete $BUILDSRC_DIR/. . --exclude .osc
    7494
    75 # osc build DIST ARCH
    76 #osc add $FILELIST
    77 osc addremove
    78 osc commit -m "release $VERSION"
     95if [ "$LOCAL_BUILD" ]; then
     96    echo 'skipped. Use
     97# local build:
     98# osc repos | while read DIST ARCH; do osc build --no-verify $DIST $ARCH; done
     99# '
     100else
     101    osc addremove
     102    osc commit -m "release $VERSION"
     103fi
     104
Note: See TracChangeset for help on using the changeset viewer.