Changeset 1306


Ignore:
Timestamp:
Apr 15, 2007, 11:07:54 PM (13 years ago)
Author:
bruno
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
Location:
branches/stable/tools
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/tools/build2pkg

    r1263 r1306  
    191191
    192192if [ $status = 0 ]; then
     193    echo "Installing packages as root"
    193194    if [  _"$dtype" = _"rpm" ]; then
    194         echo "Installing RPMS as root"
    195         sudo $opt rpm -Uvh --force $pkg
     195        sudo rpm -Uvh --force $pkg
     196    elif [  _"$dtype" = _"ebuild" ]; then
     197        sudo emerge $pkg
     198    elif [  _"$dtype" = _"deb" ]; then
     199        sudo dpkg -i $pkg
     200    elif [  _"$dtype" = _"port" ]; then
     201        sudo echo empty
     202    elif [  _"$dfam" = _"slackware" ]; then
     203        sudo installpkg $pkg
     204    else
     205        echo "No method to install those packages"
    196206    fi
    197207fi
  • 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
  • branches/stable/tools/qemu-vm.txt

    r1044 r1306  
    77# RPM based : urpmi, yum install, yast2
    88# Mandriva
    9 urpmi neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gvim/vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo
     9urpmi neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gvim/vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord
    1010
    1111#Fedora
    12 yum install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget gvim/vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch
     12yum install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget gvim/vim-X11 gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs
    1313
    1414
    1515# gentoo
    1616#Cf: http://wiki.xensource.com/xenwiki/QEMUGentoo
    17 emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue
     17emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue cdrecord mkisofs
    1818
    1919# Slackware
Note: See TracChangeset for help on using the changeset viewer.