Changeset 553


Ignore:
Timestamp:
May 18, 2006, 12:40:32 AM (13 years ago)
Author:
bcornec
Message:

Build process in 3 steps:

svn2build creates tar files from SVN (works mostly)
build2pkg creates packages from tar files (works mostly)
build2qemu (has to be created from mkqemu) will create packages for all supported virtuel machines

Location:
branches/stable
Files:
2 added
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo-doc/distributions/rpm/mondo-doc.spec

    r543 r553  
    33#
    44
    5 %define name    mondo-doc
    6 %define version VVV
    7 %define mrel    RRR
    85# if mandriva official build (rpm --with is_official)
    96%{?is_official:%define rel %{mkrel} %{mrel}}%{!?is_official:%define rel %{mrel}}
    10 %define src     SSS
    11 %define grp     GRP
    12 %define addreq  DDD
    13 %define rel     %{mrel}
     7%define rel     RRR
    148
    159Summary:    Documentation for Mondo Rescue
    1610Summary(fr):    Documentation pour Mondo Rescue
    1711
    18 Name:       %{name}
    19 Version:    %{version}
     12Name:       mondo-doc
     13Version:    VVV
    2014Release:    %{rel}
    2115License:    GPL
    22 Group:      %{grp}
     16Group:      GRP
    2317Url:        http://www.mondorescue.org
    24 Source:     %{src}
     18Source:     SSS
    2519BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    2620BuildRequires:  docbook-utils
    27 Epoch:      %(echo EEE | cut -d- -f1 | sed "s~M~~")
    28 OBS
    2921
    3022%description
  • branches/stable/mondo/configure.in

    r543 r553  
    11dnl Autoconfigure file for Mondo Rescue v2.0x
    2 dnl Mondo by Hugo Rabson
     2dnl Mondo by Mondo dev team
    33dnl This script by Joshua Oreman
    44dnl
  • branches/stable/mondo/distributions/mandriva/spec.m4

    r550 r553  
    77dnl GRP is replaced by the RPM group of apps
    88define(`GRP', `Archiving/Backup')dnl
    9 dnl OBS is replaced vy what is being obsoleted
     9dnl OBS is replaced with what is being obsoleted
    1010define(`OBS', `Obsoletes:   libmondo <= 2.04
    1111Provides:   libmondo')dnl
  • branches/stable/tools/mkqemu

    r543 r553  
    33# $Id$
    44#
    5 # Script allowing mondo packages production on various distributions with qemu
     5# Script build packages on various distributions with qemu
    66#
    77
    88if [ _"$1" == _"" ]; then
    9     echo "Syntax: mkqemu [mondo version] ([vm].. )"
     9    echo "Syntax: build2qemu [version-tag [vm1]..|vmx]] )"
    1010    exit -1
    1111fi
    1212
    13 if [ _"$2" == _"" ]; then
    14     export SVN_VM="mdk101 mdk102 mdv2006 rh73 rh9 fc4 fc5 rhel3 rhel4 suse10 sles9 debian31 slackware102 gentoo"
     13. $TOOLHOME/common-env
     14. $TOOLHOME/distro-env
     15
     16# We need to get $VER and $TAG
     17if [ "$1" = "" ]; then
     18    LAST=`cat ${TOPDIR}/LAST`
    1519else
    16     export SVN_VM="$2"
     20    LAST=$1
     21    shift
     22fi
     23VER=`echo $LAST | cut -d- -f1`
     24TAG=`echo $LAST | cut -d- -f2`
     25echo "Working on ${VER}-$TAG"
     26
     27if [ _"$1" == _"" ]; then
     28    VM=`cat ${TOOLHOME}/DISTROS`
     29    VMS=""
     30    for $v in $VM; do
     31        VMS="$VMS `echo $VM | cut -d_ -f1`"
     32    done
     33else
     34    export VMS="$1"
    1735fi
    1836
    19 cat > /tmp/mkmondo << EOF
     37
     38cat > $TMP/mkmondo << EOF
    2039#!/bin/bash
    2140
    22 export SVN_HOME=\$HOME/mondo/svn/branches
    23 export SVN_SSH="ssh -l bcornec"
    24 export SVN_EDITOR=vim
    2541export LANG="C"
    2642export LANGUAGE="C"
    2743export LC_ALL="C"
     44export TOOLHOME=$TOOLHOME
    2845
    29 if [ -d \$SVN_HOME/$1 ]; then
    30     cd \$SVN_HOME/$1
    31     svn up
    32     if [ \$? != 0 ]; then
    33             echo "Verify SVN installation"
    34             exit -1
    35     fi
    36 else
    37     mkdir -p \$SVN_HOME
    38     cd \$SVN_HOME
    39     svn co svn+ssh://bcornec@svn.berlios.de/svnroot/repos/mondorescue/branches/$1 $1
    40     if [ \$? != 0 ]; then
    41             echo "Verify SVN installation"
    42             exit -1
    43     fi
    44 fi
    45 echo \$SVN_VM | grep -q "debian"
    46 if [ \$? -eq 0 ]; then
    47     \$SVN_HOME/$1/tools/mkdeb < /dev/null
    48 else
    49     echo \$SVN_VM | grep -q "slack"
    50     if [ \$? -eq 0 ]; then
    51         \$SVN_HOME/$1/tools/mkslack < /dev/null
    52     else
    53         echo \$SVN_VM | grep -q "gentoo"
    54         if [ \$? -eq 0 ]; then
    55             \$SVN_HOME/$1/tools/mkemerge < /dev/null
    56         else
    57             \$SVN_HOME/$1/tools/mkrpm < /dev/null
    58         fi
    59     fi
    60 fi
    61 \$SVN_HOME/$1/tools/mkdeliv
     46\$TOOLHOME/build2pkg
     47\$TOOLHOME/mkdeliv
    6248EOF
     49chmod 755 $TMP/mkmondo
    6350
    6451ipvm=10.0.2.15
    6552sp=2222
    6653
    67 for m in $SVN_VM; do
     54cd $TOOLHOME/..
     55tar cvfz $TMP/mkmondo.tar.gz $TOOLHOME/tools $TMP/mkmondo $TOPDIR/${VER}-$TAG
     56
     57for m in $VMS; do
    6858    vmp=0
    6959    if [ ! -f /users/vmplayer/$m.qemu ]; then
     
    7868        sleep 300
    7969    fi
    80     scp -P $sp /tmp/mkmondo bruno@localhost:
    81     ssh -p $sp bruno@localhost "chmod 755 ./mkmondo ; ./mkmondo" | tee /tmp/mkvm.log
     70    scp -P $sp $TMP/mkmondo.tar.gz bruno@localhost:
     71    ssh -p $sp bruno@localhost "cd / ; tar xvfz $TMP/mkmondo.tar.gz ; $TMP/mkmondo" | tee $TMP/mkvm.log
    8272    if [ $vmp -eq 1 ]; then
    8373        ssh -p $sp root@localhost "halt -p"
  • branches/stable/tools/svn-env

    r550 r553  
    77
    88export SVNBRANCH="branches/`cat ${TOOLHOME}/../mondo/VERSION`"
    9 export MINDI_VER=`cat ${BASE}/svn/${SVNBRANCH}/mindi/VERSION`
    10 export MONDO_VER=`cat ${BASE}/svn/${SVNBRANCH}/mondo/VERSION`
     9export VER=`cat ${BASE}/svn/${SVNBRANCH}/mondo/VERSION`
    1110
    1211# To be safe for SVN commands
    13 cd $TOOLHOME/..
    14 export REVISION=`svnversion .`
     12export REVISION=`(cd $TOOLHOME/.. ; svnversion .)`
    1513export TAG=`cat ${TOOLHOME}/TAG`
  • branches/stable/tools/svn2build

    r551 r553  
    1919. ./svn-env
    2020
    21 mkdir -p ${TOPDIR}/SOURCES
     21DEST=${TOPDIR}/${VER}-$TAG
     22mkdir -p $DEST
    2223
    2324if [ "$1" = "" ]; then
     
    3132fi
    3233
    33 
     34# Make it safe for SVN commands
    3435cd ${BASE}/svn
    3536
     
    3738    v=`cat ${SVNBRANCH}/$p/VERSION`
    3839    echo "Management of $p $v-$REVISION"
    39     rm -fr $p-$v
    40     svn export ${SVNBRANCH}/$p $p-$v
    41     echo "$REVISION" > $p-$v/REVISION
     40    dest="$p-$v-$TAG"
     41    rm -fr $dest
     42    svn export ${SVNBRANCH}/$p $dest
     43    echo "$REVISION" > $dest/REVISION
    4244    echo "Generating SVN log file ..."
    43     svn log -v ${SVNBRANCH}/$p > $p-$v/svn.log
     45    svn log -v ${SVNBRANCH}/$p > $dest/svn.log
    4446
    4547    for d in `cat ${TOOLHOME}/DISTROS`; do
    46         ddir=`echo $d | cut -d_ -f1`
    47         dver=`echo $d | cut -d_ -f2`
     48        export ddir=`echo $d | cut -d_ -f1`
     49        export dver=`echo $d | cut -d_ -f2`
    4850        echo "Generating build files for $ddir ($dver)"
    49         if [ $ddir = "debian" ]; then
    50             dfam="debian"
    51             dtype="deb"
    52             suf=".${dfam}${dver}"
    53             BUILDDIR=${TOPDIR}/debian
    54         elif [ $ddir = "gentoo" ]; then
    55             dfam="gentoo"
    56             dtype="ebuild"
    57             suf=".${ddir}${dver}"
    58             BUILDDIR=${TOPDIR}/ebuild
    59         elif [ $ddir = "slackware" ]; then
    60             dfam="slack"
    61             dtype="tgz"
    62             suf=".${dfam}${dver}"
    63             BUILDDIR=${TOPDIR}/slack
    64         elif [ $ddir = "sles" -o $ddir = "suse" ]; then
    65             dfam="suse"
    66             dtype="rpm"
    67             suf=".${ddir}${dver}"
    68             BUILDDIR=${TOPDIR}/SPECS
    69         elif [ $ddir = "fedora" -o $ddir = "redhat" -o $ddir = "rhel" ]; then
    70             dfam="redhat"
    71             dtype="rpm"
    72             dver=`echo ${dver} | sed "s/\.//"`
    73             if [ $ddir = "fedora" ]; then
    74                 suf=".fc${dver}"
    75             elif [ $ddir = "redhat" ]; then
    76                 suf=".rh${dver}"
    77             else
    78                 suf=".rhel${dver}"
    79             fi
    80             BUILDDIR=${TOPDIR}/SPECS
    81         elif [ $ddir = "mandrake" -o $ddir = "mandriva" ]; then
    82             dfam="mandriva"
    83             dtype="rpm"
    84             suf=".`echo $dver | sed 's/\.//'`mdk"
    85             BUILDDIR=${TOPDIR}/SPECS
    86         else
    87             dfam="unknown"
    88             dtype="unknown"
    89             BUILDDIR=${TOPDIR}/SPECS
    90             suf="unknown"
    91         fi
     51        . $TOOLHOME/distro-env
    9252
    9353        # Create conf file dir
     
    10161EOF
    10262
    103         mkdir -p $p-$v/distributions/$ddir
    104         if [ $dtype = "rpm" ]; then
    105             if [ -f $p-$v/distributions/$ddir/spec.m4 ]; then
    106                 inc=$p-$v/distributions/$ddir/spec.m4
    107             elif [ -f $p-$v/distributions/$dfam/spec.m4 ]; then
    108                 inc=$p-$v/distributions/$dfam/spec.m4
     63        mkdir -p $dest/distributions/$ddir
     64        if [ "$dtype" = "rpm" ]; then
     65            if [ -f $dest/distributions/$ddir/spec.m4 ]; then
     66                inc=$dest/distributions/$ddir/spec.m4
     67            elif [ -f $dest/distributions/$dfam/spec.m4 ]; then
     68                inc=$dest/distributions/$dfam/spec.m4
    10969            else
    11070                echo "Unable to build the RPM specfile for this distro. Please report to authors"
     
    11272            fi
    11373            echo "Using $inc customization to build SPEC file"
    114             m4 /tmp/mondorescue.mc $inc $p-$v/distributions/rpm/$p.spec > $p-$v/distributions/$ddir/$p.spec
     74            m4 /tmp/mondorescue.mc $inc $dest/distributions/rpm/$p.spec > $dest/distributions/$ddir/$p.spec
    11575
    116             if [ -f $p-$v/distributions/$ddir/changelog ]; then
    117                 log=$p-$v/distributions/$ddir/changelog
    118             elif [ -f $p-$v/distributions/$dfam/changelog ]; then
    119                 log=$p-$v/distributions/$dfam/changelog
     76            if [ -f $dest/distributions/$ddir/changelog ]; then
     77                log=$dest/distributions/$ddir/changelog
     78            elif [ -f $dest/distributions/$dfam/changelog ]; then
     79                log=$dest/distributions/$dfam/changelog
    12080            else
    12181                echo "Unable to build RPM changelog for this distro. Please report to authors"
     
    12585            echo "Using $log customization to build changelog file"
    12686            ddate=`LANG=C ; date "+%a %b %d %Y"`
    127             cat > $p-$v/distributions/$ddir/$p.changelog.new << EOF
     87            cat > $dest/distributions/$ddir/$p.changelog.new << EOF
    12888* $ddate Bruno Cornec <bruno@mondorescue.org> VVV-RRR
    12989- Updated to VVV-r${REVISION}
    13090
    13191EOF
    132             cat $log >> $p-$v/distributions/$ddir/$p.changelog.new
    133             m4 /tmp/mondorescue.mc $p-$v/distributions/$ddir/$p.changelog.new > $p-$v/distributions/$ddir/$p.changelog
    134             rm -f $p-$v/distributions/$ddir/$p.changelog.new
     92            cat $log >> $dest/distributions/$ddir/$p.changelog.new
     93            m4 /tmp/mondorescue.mc $dest/distributions/$ddir/$p.changelog.new > $dest/distributions/$ddir/$p.changelog
     94            rm -f $dest/distributions/$ddir/$p.changelog.new
    13595
    136         elif [ $dtype = "ebuild" ]; then
     96        elif [ "$dtype" = "ebuild" ]; then
    13797            echo "Gentoo Build"
    13898        else
     
    142102
    143103    if [ _"`echo $p | grep mondo-doc`" != _"" ]; then
    144         cd ${p}-${v}
     104        cd $dest
    145105        for f in mondorescue-howto.sgml *8; do
    146106            m4 /tmp/mondorescue.mc $f > ${f}.new
     
    164124            exit -1
    165125        fi
    166         (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v)
    167         rm -f $p-$v/rootfs/sbin/parted2fdisk-ia64
     126        (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$dest)
     127        rm -f $dest/rootfs/sbin/parted2fdisk-ia64
    168128    fi
    169129    if [ "`echo $p | grep -v doc | grep  mondo`" != "" ]; then
     
    173133            exit -1
    174134        fi
    175         (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$p-$v/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v/docs/man)
    176         (cd $p-$v ; echo "Bootstraping mondo ... " ; ./bootstrap)
     135        (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$dest/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$dest/docs/man)
     136        (cd $dest ; echo "Bootstraping mondo ... " ; ./bootstrap)
    177137    fi
    178138
    179139    # Finally creates the tar files
    180140    echo "Creating $p tar files"
    181     tar cfhz ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.gz $p-$v
    182     gzip -cd ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.gz | bzip2 -c3 > ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2
    183     #tar cfhj ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2 $p-$v
     141    tar cfhz ${DEST}/$p-$v-$TAG.tar.gz $dest
     142    #gzip -cd ${DEST}/$p-$v-$TAG.tar.gz | bzip2 -c3 > ${DEST}/$p-$v-$TAG.tar.bz2
     143    #tar cfhj ${DEST}/$p-$v-$TAG.tar.bz2 $dest
    184144done
    185145
    186146rm -f /tmp/mondorescue.mc
     147
     148echo "Version delivered :"
     149echo "-------------------"
     150echo "${VER}-$TAG"
     151echo "-------------------"
     152echo "${VER}-$TAG" > ${TOPDIR}/LAST
     153exit 0
Note: See TracChangeset for help on using the changeset viewer.