Changeset 588 for trunk/tools


Ignore:
Timestamp:
May 29, 2006, 11:47:20 AM (13 years ago)
Author:
bcornec
Message:

merge -r 560:587 $SVN_M/branches/stable

Location:
trunk/tools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/build2pkg

    r561 r588  
    4848
    4949export pkg=""
     50echo "Working under $TOPBUILDDIR"
    5051cd $TOPBUILDDIR
    5152
     
    6667        pkg="$pkg $pkg1"
    6768
    68         echo "Generating $p RPMS"
    6969        log=/tmp/$p-rpm.log
    7070
     
    7575            ln -sf $src SOURCES/
    7676        fi
     77        echo "Generating $p RPMS"
    7778        cd SPECS
    7879        tar xfz $src $pv/distributions/$ddir/$p.spec
     
    8687        fi
    8788        cd ..
    88     elif [  _"$dtype" = _"gentoo" ]; then
    89         echo "Gentoo"
     89    elif [  _"$dtype" = _"ebuild" ]; then
    9090        log=/tmp/$p-gentoo.log
    9191        ln -sf $src .
    92         tar xfz $src $pv/distributions/$ddir/$pv-r$TAG.ebuild
     92        tar xfz $src $pv/distributions/$ddir/$p-${VER}-r$TAG.ebuild
     93        if [ _"`grep $TOPBUILDDIR/portage /etc/make.conf`" = _"" ]; then
     94            echo "Adding $TOPBUILDDIR/portage to /etc/make.conf"
     95            echo "PORTDIR_OVERLAY=\"$TOPBUILDDIR/portage\"" >> /etc/make.conf
     96        fi
    9397
    94         ebuild $pv/distributions/$ddir/$pv-r$TAG.ebuild
     98        mkdir -p ${TOPBUILDDIR}/portage/sys-apps/$p
     99        mv $pv/distributions/$ddir/$p-${VER}-r$TAG.ebuild ${TOPBUILDDIR}/portage/sys-apps/$p
     100        rm -rf $pv
     101
     102        cd ${TOPBUILDDIR}/portage/sys-apps/$p
     103        ebuild $p-${VER}-r$TAG.ebuild digest 2> $log 1> $log
    95104        if [ $? != 0 ]; then
    96105            cat $log
    97106            status=-1
    98107        fi
    99         rm -rf $pv
     108        ebuild $p-${VER}-r$TAG.ebuild unpack 2>> $log 1>> $log
     109        if [ $? != 0 ]; then
     110            cat $log
     111            status=-1
     112        fi
     113        ebuild $p-${VER}-r$TAG.ebuild compile 2>> $log 1>> $log
     114        if [ $? != 0 ]; then
     115            cat $log
     116            status=-1
     117        fi
     118        #ebuild $p-${VER}-r$TAG.ebuild install 2>> $log 1>> $log
     119        if [ $? != 0 ]; then
     120            cat $log
     121            status=-1
     122        fi
     123    elif [  _"$dtype" = _"deb" ]; then
     124        log=/tmp/$p-deb.log
     125        cd $TOPBUILDDIR
     126        tar xfz $src
     127        cd ${pv}*
     128        ln -s distributions/debian debian
     129        # update debian/changelog
     130        pkg-buildpackage -us -uc -rfakeroot
     131        # Et voila !
    100132    else
    101133        echo "Unknown"
  • trunk/tools/build2qemu

    r561 r588  
    66#
    77
    8 if [ _"$1" == _"" ]; then
    9     echo "Syntax: build2qemu [version-tag [vm1]..|vmx]] )"
    10     exit -1
     8#if [ _"$1" == _"" ]; then
     9    #echo "Syntax: build2qemu [version-tag [vm1]..|vmx]] )"
     10    #exit -1
     11#fi
     12
     13# Syntax: build2qemu [version-tag [vm1]..|vmx]]
     14
     15umask 022
     16dname=`dirname $0`
     17prem=`echo $dname |cut -c1`
     18if [ ${prem} == "/" ]; then
     19    export TOOLHOME=$dname
     20else
     21    export TOOLHOME=${PWD}/$dname
    1122fi
     23
    1224
    1325. $TOOLHOME/common-env
     
    3143fi
    3244
    33 
     45mkdir -p $TMP
    3446cat > $TMP/mkmondo << EOF
    3547#!/bin/bash
     
    4052export TOOLHOME=$TOOLHOME
    4153
    42 \$TOOLHOME/build2pkg
    43 \$TOOLHOME/mkdeliv
     54$TOOLHOME/build2pkg $LAST
     55#$TOOLHOME/mkdeliv
    4456EOF
    4557chmod 755 $TMP/mkmondo
    4658
    4759cd $TOOLHOME/..
    48 tar cvfz $TMP/mkmondo.tar.gz $TOOLHOME/tools $TMP/mkmondo $TOPDIR/${VER}-$TAG
     60tar cfz $TMP/mkmondo.tar.gz $TOOLHOME $TMP/mkmondo $TOPDIR/${VER}-$TAG
    4961
    5062for m in $VMS; do
     
    5264    if [ ! -f /users/qemu/$m.qemu ]; then
    5365            echo "VM unaccessible. Verify NFS mount"
     66            rm -rf $TMP
    5467            exit -1
    5568    fi
    5669    ps auxww | grep qemu | grep -v grep | grep -q /users/qemu/$m.qemu
     70    export sp=2222
    5771    if [ $? -ne 0 ]; then
    5872        # Virtual machine alreday started
     
    6276    fi
    6377    scp -P $sp $TMP/mkmondo.tar.gz bruno@localhost:
    64     ssh -p $sp bruno@localhost "cd / ; tar xvfz $TMP/mkmondo.tar.gz ; $TMP/mkmondo" | tee $TMP/mkvm.log
     78    ssh -p $sp bruno@localhost "cd / ; tar xfz ~bruno/mkmondo.tar.gz ; $TMP/mkmondo " | tee $TMP/mkvm.log
     79    #ssh -p $sp bruno@localhost "cd / ; tar xfz ~bruno/mkmondo.tar.gz ; $TMP/mkmondo ; rm -f $TMP" | tee $TMP/mkvm.log
    6580    if [ $vmp -eq 1 ]; then
    6681        ssh -p $sp root@localhost "halt -p"
     
    7287    fi
    7388done
     89
     90# Should be removed at the end
     91rm -rf $TMP
  • trunk/tools/common-env

    r561 r588  
    1010export TOPDIR=${BASE}/build
    1111mkdir -p ${TOPDIR}
    12 export TMP=${BASE}/tmp
    13 mkdir -p ${TMP}
     12export TMPDIR=
     13export TMP=`mktemp -d -p /tmp`
  • trunk/tools/distro-env

    r561 r588  
    4343        export ddir="gentoo"
    4444        export dver=`awk '{print $5}' /etc/gentoo-release | cut -d. -f1-2`
     45    elif [ -e /etc/debian_version ]; then
     46        export ddir="debian"
     47        export dver=`cat /etc/debian_version`
     48        # Debian assigns release names only once a release actually happens.
     49        # Debian does not distinguish between testing and unstable because
     50        # unstable today is what testing will be in about ten days time. So,
     51        # in case we encounter "tesing/unstable", we assume unstable, i.e. sid.
     52        # Note that for released versions, the numeric version will be contained
     53        # in debian_version, e.g. on a sarge system, the value will be '3.1'.
     54        if [ $dver = "testing/unstable" ]; then
     55            export dver = "sid"
     56        fi
    4557    else
    4658        export ddir="unknown"
     
    112124    fi
    113125    mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD}
     126elif [ _"$dtype" = _"ebuild" ]; then
     127    export TOPBUILDDIR=${BASE}/build
     128    mkdir -p ${TOPBUILDDIR}/portage
    114129fi
  • trunk/tools/livwww

    r561 r588  
    4747
    4848. $TOOLHOME/common-env
     49. $TOOLHOME/svn-env
    4950
    5051cd ${BASE}/svn
  • trunk/tools/mkqemu

    r561 r588  
    1414
    1515ipvm=10.0.2.15
    16 sp=2222
    1716
    1817qemu -m 256 $QEMUOPT -redir tcp:${sp}:${ipvm}:22 /users/qemu/$m.qemu
  • trunk/tools/qemu-vm.txt

    r537 r588  
    4444
    4545su - bruno
    46 mkdir -p mondo/tmp RPMS/BUILD RPMS/RPMS/i386 RPMS/RPMS/noarch RPMS/SOURCES RPMS/SPECS RPMS/SRPMS RPMS/tmp SRPMS tmp
     46mkdir -p mondo/tmp build
    4747cat > ~bruno/.rpmmacros << EOF
    48 %_topdir    /home/bruno/RPMS
     48%_topdir    /home/bruno/build
    4949%_tmppath   %{_topdir}/tmp
    50 %packager   Bruno Cornec <bruno@HyPer-Linux.org>
     50%packager   Bruno Cornec <bruno@mondorescue.org>
    5151EOF
    5252cat > ~bruno/.rpmrc << EOF
     
    6666svn.berlios.de,195.37.77.137 ssh-dss AAAAB3NzaC1kc3MAAACBAKouB77l1f4FgdP6DjLOgq5RKuGYm3zMJlM4WHcKzWnPuErZW4Omxk1CO0JojDNj/bjxz/95blWbdonEcAo0v71GcZbECFDsJdgVbZM+yxLHKOF4S5uHkiJ+LMawFcRoCGAochowoP9jUfLVAzyT1q3dbvmL43YO3FDvD+mCKTbZAAAAFQCWs/2nOqvitE/CyOCa81sadnzsPQAAAIBrgWRs2VN6jAtX1eUxPwtkJWX886DkiBwdEgtUwDW8RJJCFU6+zjNwFZ8VcjeA7OCFKmZqoD8ABojMMtB53VoXXRzp5PtWgJEMpCLOhHbAA6nLR+Zu9zV8rFHsrjvR17ZgmA8q1dZRqqvZSyzsoP4KdW7f9nD2SjFEVhjHfIsQmwAAAIEAoDlEoGO/lc8XkvNW7G8/rybzETG0cepONVKThYufP5Z2FdGj9a1TYc2Gaw2DygM20Ohwj1RW8aeRE/jYbEm4unM6IFYeLvCbDeeCCHCiCJmw/Pj2ityB5uPTat4Yn28FCd4eP5LyQq2EHz6bPA0LzpNJKwto4naIMsDpET1GNH0=
    6767EOF
    68 cat >> ~/.bash_profile << EOF
    69 export SVN_SSH="ssh -l bcornec"
    70 export SVN_M=svn+ssh://bcornec@svn.berlios.de/svnroot/repos/mondorescue/
    71 export SVN_EDITOR=vim
    72 EOF
    73 source ~/.bash_profile
    7468
    7569rebuild paquets necessaires mondo:
     
    8579root:
    8680rpm -ivh ~bruno/RPMS/RPMS/i386/afio-[0-9]* ~bruno/RPMS/RPMS/i386/buffer-[0-9]*
     81
     82pour gentoo
     83chown bruno /etc/make.conf
     84bruno in portage group
  • trunk/tools/svn2build

    r561 r588  
    9797        elif [ "$dtype" = "ebuild" ]; then
    9898            m4 /tmp/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/$ddir/$p-$v-r$TAG.ebuild
     99        elif [ "$dtype" = "deb" ]; then
     100            # To be developped
     101            m4 /tmp/mondorescue.mc $dest/distributions/$dfam/$p > /dev/null
    99102        else
    100103            echo "Unknown Build"
     
    121124    if [ _"`echo $p | grep -v kernel | grep mindi`" != _"" ]; then
    122125        v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
    123         if [ ! -d mondo-doc-$v1 ]; then
     126        if [ ! -d mondo-doc-$v1-$TAG ]; then
    124127            echo "mondo-doc should be created before $p"
    125128            exit -1
    126129        fi
    127         (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$dest)
     130        (cd mondo-doc-$v1-$TAG ; make -f Makefile.man install-$p INSTALLDIR=../$dest)
    128131        rm -f $dest/rootfs/sbin/parted2fdisk-ia64
    129132    fi
    130133    if [ "`echo $p | grep -v doc | grep  mondo`" != "" ]; then
    131134        v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
    132         if [ ! -d mondo-doc-$v1 ]; then
     135        if [ ! -d mondo-doc-$v1-$TAG ]; then
    133136            echo "mondo-doc should be created before $p"
    134137            exit -1
    135138        fi
    136         (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$dest/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$dest/docs/man)
     139        (cd mondo-doc-$v1-$TAG ; make -f Makefile.howto install INSTALLDIR=../$dest/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$dest/docs/man)
    137140        (cd $dest ; echo "Bootstraping mondo ... " ; ./bootstrap)
    138141    fi
Note: See TracChangeset for help on using the changeset viewer.