Ignore:
Timestamp:
Apr 15, 2007, 11:07:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • build2pkg now install pkgs at the end
  • mkisof and cdrecord now should be part of each VM
  • pkg2test launches mondoarchive in a VM to create a test backup env
  • test2qemu tests the restore of the previous backup inside an empty VM
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/pkg2test

    r1285 r1306  
    1919. $TOOLHOME/distro-env
    2020
    21 # We need to get $VER and $TAG
    22 if [ "$1" = "" ]; then
    23     LAST=`cat ${TOPDIR}/LAST`
    24 else
    25     LAST=$1
    26     shift
    27 fi
    28 VER=`echo $LAST | cut -d- -f1`
    29 TAG=`echo $LAST | cut -d- -f2`
    30 echo "Working on ${VER}-$TAG"
    31    
    32 if [ "$1" = "" ]; then
    33     c="mondo-doc mindi mindi-busybox mondo"
    34 else
    35     if [ "$1" = "all" ]; then
    36         c="mindi-kernel mondo-doc mindi mindi-busybox mondo"
    37     else
    38         c="$*"
    39     fi
    40 fi
    41 
    42 export pkg=""
    43 echo "Working under $TOPBUILDDIR"
    44 cd $TOPBUILDDIR
    45 
    46 spkg=""
    47 pkg=""
    48 
    49 for p in $c; do
    50     # s= stable; t = trunk; 1-9 = official version
    51     src=${TOPDIR}/${VER}-$TAG/$p-[1-9st]*.tar.gz
    52     pv=`basename $src .tar.gz`
    53     tar -xz -C $MONDOTMP -f $src $pv/TAG
    54     tag=`cat $MONDOTMP/$pv/TAG`
    55     if [  _"$dtype" = _"rpm" ]; then
    56         if [ _"$p" = _"mondo-doc" ] || [ _"$p" = _"mindi" ]; then
    57             ar="noarch"
    58         else
    59             ar=$ARCH
    60         fi
    61         pkg="$pkg ${TOPBUILDDIR}/RPMS/${ar}/$pv-${tag}${suf}.${ar}.rpm"
    62         spkg="$spkg ${TOPBUILDDIR}/SRPMS/$pv-${tag}${suf}.src.rpm"
    63     elif [  _"$dtype" = "_deb" ]; then
    64         pkg="$pkg ${TOPBUILDDIR}/$p_*.deb"
    65         spkg="$spkg ${TOPBUILDDIR}/$p_*.dsc ${TOPBUILDDIR}/$p_*.tar.gz"
    66     elif [  _"$dtype" = "_ebuild" ]; then
    67         spkg="$spkg ${TOPBUILDDIR}/portage/sys-apps/$p/$pv.ebuild"
    68         pkg="$pkg /usr/portage/packages/All/$pv.tbz2"
    69     elif [  _"$dfam" = _"slackware" ]; then
    70         pkg="$pkg ${TOPBUILDDIR}/build-$p/$pv-*-${tag}mr.tgz"
    71     fi
    72 done
    73 
    74 echo "Packages installation"
    75 if [  _"$dtype" = _"rpm" ]; then
    76     sudo rpm -Uvh ${pkg}
    77 elif [  _"$dtype" = "_deb" ]; then
    78     sudo dpkg -i ${pkg}
    79 elif [  _"$dtype" = "_ebuild" ]; then
    80     sudo blabla ${pkg}
    81 elif [  _"$dfam" = _"slackware" ]; then
    82     sudo pkginstall ${pkg}
    83 fi
    8421cat > $MONDOTMP/test-mondo << EOF
    8522#!/bin/bash
    8623
    8724h=test-mondo
    88 mkdir -p /mondo/tmp-\$h /mondo/scratch-\$h
    8925mkdir -p /users/svg
    9026mount flecha.home.musique-ancienne.org:/users/svg /users/svg
    91 /usr/sbin/mondoarchive -n flecha.home.musique-ancienne.org:/users/svg -G -F -N -O -E "/usr/doc /home /users /var/log" -d images -s 4300m -T /mondo/tmp-\$h -S /mondo/scratch-\$h -p \$h
     27mkdir -p /users/svg/mondo/tmp-\$h /users/svg/mondo/scratch-\$h
     28/usr/sbin/mondoarchive -n flecha.home.musique-ancienne.org:/users/svg -G -F -N -O -E "/usr/share/doc /usr/src /home /users /var/log" -d mondo/images -s 4300m -T /users/svg/mondo/tmp-\$h -S /users/svg/mondo/scratch-\$h -p \$h-\$ddir_\$dver
    9229umount /users/svg
    9330EOF
Note: See TracChangeset for help on using the changeset viewer.