Changeset 33


Ignore:
Timestamp:
Sep 29, 2005, 3:11:40 AM (14 years ago)
Author:
bcornec
Message:

Finer use of the release concept for tagging and delivery

Location:
trunk/tools
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/tools/mkdeliv

    r30 r33  
    22#
    33# Deliver RPMs packages and tgz files to BerliOS
     4#
     5# $Id$
     6#
    47
    5 . ./rpm-env
     8dname=`dirname $0`
     9prem=`echo $dname |cut -c1`
     10if [ ${prem} == "/" ]; then
     11        export TOOLHOME=$dname
     12else
     13    export TOOLHOME=${PWD}/$dname
     14fi
     15
     16. $TOOLHOME/rpm-env
    617
    718tgz=""
    819srpms=""
    920rpms=""
    10 ct=`date "+%Y%m%d"`
     21rev=`$TOOLHOME/mksvnversion`
    1122
    1223if [ "$1" = "" ]; then
     
    1627fi
    1728if [ "`echo $c | grep mindi`" != "" ]; then
    18     cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-${ct}.tgz
    19     tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-${ct}.tgz"
    20     rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-1.${ARCH}.rpm"
    21     srpms="$srpms ${TOPDIR}/SRPMS/mindi-${MINDI_VER}-1.src.rpm"
     29    cp -a ${TOPDIR}/SOURCES/mindi-${MINDI_VER}.tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz
     30    tgz="$tgz ${TOPDIR}/SOURCES/mindi-${MINDI_VER}-r${rev}.tgz"
     31    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}.${ARCH}.rpm"
     32    srpms="$srpms ${TOPDIR}/SRPMS/mindi-${MINDI_VER}-${rev}.src.rpm"
    2233fi
    2334if [ "`echo $c | grep  mondo`" != "" ]; then
    24     cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-${ct}.tgz
    25     tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-${ct}.tgz"
    26     rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-1.${ARCH}.rpm"
    27     srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-1.src.rpm"
     35    cp -a ${TOPDIR}/SOURCES/mondo-${MONDO_VER}.tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz
     36    tgz="$tgz ${TOPDIR}/SOURCES/mondo-${MONDO_VER}-r${rev}.tgz"
     37    rpms="$rpms ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}.${ARCH}.rpm"
     38    srpms="$srpms ${TOPDIR}/SRPMS/mondo-${MONDO_VER}-${rev}.src.rpm"
    2839fi
    2940scp -p ${tgz} ${SVNAUTH}:${DSTDIR}/TGZ
  • trunk/tools/mkrpm

    r30 r33  
    22#
    33# Creates RPMs packages from SVN repository for local tests
     4#
     5# $Id$
     6#
    47
    5 . ./rpm-env
     8dname=`dirname $0`
     9prem=`echo $dname |cut -c1`
     10if [ ${prem} == "/" ]; then
     11    export TOOLHOME=$dname
     12else
     13    export TOOLHOME=${PWD}/$dname
     14fi
     15
     16. $TOOLHOME/rpm-env
     17
     18rev=`$TOOLHOME/mksvnversion`
    619
    720if [ "$1" = "" ]; then
     
    2336    cp mindi-${MINDI_VER}/mindi.spec ${TOPDIR}/SPECS/mindi.spec
    2437    rm -f ${TMP}/mindi-*-root
    25     pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-1.${ARCH}.rpm"
     38    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mindi-${MINDI_VER}-${rev}.${ARCH}.rpm"
    2639    # ATTENTION: This could be dangerous for your setup
    2740    opt="rm -rf /usr/share/mindi ;"
     
    4255    cp mondo-${MONDO_VER}/mondo.spec ${TOPDIR}/SPECS/mondo.spec
    4356    rm -f ${TMP}/mondo-*-root
    44     pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-1.${ARCH}.rpm"
     57    pkg="$pkg ${TOPDIR}/RPMS/${ARCH}/mondo-${MONDO_VER}-${rev}.${ARCH}.rpm"
    4558fi
    4659cd ${TOPDIR}/SPECS
  • trunk/tools/mksvnversion

    r32 r33  
     1#!/bin/bash
    12########################################################
    23# $Id$
     
    56# on every build, record the working copy revision string
    67#
    7 echo -n 'const char* svn_version(void) { const char* SVN_Version = "' > svn_version.c
    8 svnversion -n .. >> svn_version.c
    9 echo '"; return SVN_Version; }'   >> svn_version.c
     8dname=`dirname $0`
     9prem=`echo $dname |cut -c1`
     10if [ ${prem} == "/" ]; then
     11    export TOOLHOME=$dname
     12else
     13    export TOOLHOME=${PWD}/$dname
     14fi
     15. $TOOLHOME/rpm-env
     16
     17#
     18# Create a .c file for mondo to link with and get
     19# the right build version from SVN
     20#
     21rel=`svnversion $TOOLHOME/..`
     22cat > $TOOLHOME/../mondo/svn_version.c << EOF
     23const char* svn_version(void) {
     24    const char* SVN_Version = "${rel}";
     25    return SVN_Version;
     26}"
     27EOF
     28
     29#
     30# Patches the file needing that release reference
     31#
     32perl -pi -e "s/^Release:.*$/Release:    ${rel}" $TOOLHOME/../*/*spec
     33
     34#
     35# return the release
     36#
     37echo ${rel}
  • trunk/tools/rpm-env

    r30 r33  
    22#
    33# Creates RPMs environment from SVN repository
     4#
     5# $Id$
     6#
    47
    58# Adapt to your needs
    6 export BASE=/bruno/mondo
     9export BASE=${HOME}/mondo
    710export SVNAUTH=bcornec@shell.berlios.de
    811export DSTDIR=/home/groups/ftp/pub/mondorescue
Note: See TracChangeset for help on using the changeset viewer.