Changeset 158


Ignore:
Timestamp:
Sep 28, 2007, 12:59:44 AM (12 years ago)
Author:
bruno
Message:

Improves pbsetupqemu with pb build + pkg install

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r152 r158  
    428428    my $dir = shift || "sshdir";
    429429    my $port = shift || "sshport";
     430    my $cmd = "";
    430431
    431432    # Get list of packages to build
     
    453454
    454455        if (($cmt eq "Sources") || ($cmt eq "VMs")) {
    455             $src="$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz";
     456            $src = "$src $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz";
     457            $cmd = "$cmd ; ln -sf $pbpkg-$pbver.tar.gz $pbpkg-latest.tar.gz";
    456458        }
    457459    }
     
    504506
    505507    $port = $sshport->{$ENV{'PBPROJ'}};
    506     pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\' | bash\"","Preparing $tdir on $mac");
     508    pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\ ; $cmd' | bash\"","Preparing $tdir on $mac");
    507509    pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $port $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");
    508510    pb_system("ssh -q -p $port $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac  if needed");
  • devel/pb/contrib/pbsetupqemu

    r153 r158  
    3030su - pb -c "mkdir -p .ssh ; chmod 700 .ssh ; cp /tmp/pbkey .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys"
    3131rm -f /tmp/pbkey
     32
     33# Get and install pb
     34if [ -x /usr/bin/yum ]; then
     35    yum clean all
     36    yum install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-AppConfig
     37elif [-x /usr/sbin/urpmi ]; then
     38    urpmi neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord perl-AppConfig
     39elif [-x /usr/bin/apt-get ]; then
     40    apt-get install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man openssh-server dpkg-dev debian-builder dh-make fakeroot libnewt-dev libncurses5-dev
     41elif [ -x /usr/sbin/emerge ]; then
     42    emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue cdrecord mkisofs   
     43fi
     44
     45cat > /tmp/pbpatch << EOF
     46--- /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm.orig     2007-08-09 17:44:26.000000000 +0200
     47+++ /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm  2007-08-09 18:04:46.000000000 +0200
     48@@ -20,7 +20,7 @@
     49
     50 require 5.005;
     51
     52-use AppConfig;
     53+use AppConfig qw(:argcount);
     54 use AppConfig::State;
     55 use File::HomeDir;
     56
     57@@ -227,6 +227,11 @@
     58
     59                my $nargs = $state->_argcount($variable);
     60
     61+               # Fix a bug if the variable is a hash - 1 has been created as a key
     62+               if ($nargs eq AppConfig::ARGCOUNT_HASH) {
     63+                       delete $state->{ VARIABLE }->{ $variable }{1};
     64+               }
     65+
     66                # variables prefixed '-' are reset to their default values
     67                if ($flag eq '-') {
     68                    $state->_default($variable);
     69EOF
     70
     71# Patch AppConfig
     72grep -q 'Fix a bug if the variable is a hash' /usr/lib/perl5/vendor_perl/*/AppConfig/File.pm
     73if [ $? -ne 0 ]; then
     74    cd /usr/lib/perl5/vendor_perl/*/AppConfig
     75    patch -s -p1 < /tmp/pbpatch
     76    if [ $? -eq 0 ]; then
     77        rm -f /tmp/pbpatch
     78    fi
     79fi
     80
     81rm -rf project-builder-*
     82wget ftp://ftp.mondorescue.org/src/project-builder-latest.tar.gz
     83tar xvfz project-builder-latest.tar.gz
     84cd project-builder-*
     85perl Makefile.PL
     86make
     87make install
Note: See TracChangeset for help on using the changeset viewer.