Changeset 239 in ProjectBuilder for devel


Ignore:
Timestamp:
Oct 22, 2007, 4:01:27 PM (16 years ago)
Author:
Bruno Cornec
Message:

Attempt to fix port issues with VM
Some debian build fixes

Location:
devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r238 r239  
    292292            }
    293293        }
    294         print "$liste have been filtered\n";
     294        print $LOG "Files ".$liste."have been filtered\n";
    295295
    296296        # Archive dest dir
     
    534534    # Overwrite account value if passed as parameter
    535535    $mac = "$pbaccount\@$sshhost->{$ENV{'PBPROJ'}}" if (defined $pbaccount);
    536     $port = "$pbport" if (defined $pbport);
    537536    my $tdir;
    538537    my $bdir;
     
    549548        return;
    550549    }
     550    my $nport = $sshport->{$ENV{'PBPROJ'}};
     551    $nport = "$pbport" if (defined $pbport);
     552
    551553    # Remove a potential $ENV{'HOME'} as tdir should be relative to pb's home
    552554    $tdir =~ s|\$ENV.+\}/||;
    553555
    554     $port = $sshport->{$ENV{'PBPROJ'}};
    555556    my $tm = $vmtmout->{$ENV{'PBPROJ'}};
    556     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");
    557     pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $port $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");
    558     pb_system("ssh -q -p $port $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac  if needed");
     557    pb_system("ssh -q -p $nport $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");
     558    pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $nport $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");
     559    pb_system("ssh -q -p $nport $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac  if needed");
    559560    if ($cmt eq "VMs") {
    560561        # Get back info on pkg produced, compute their name and get them from the VM
    561         pb_system("scp -p -P $port $mac:$bdir/pbgen-$pbprojver-$pbprojtag $ENV{'PBBUILDDIR'} 2> /dev/null","Get package names in $bdir on $mac");
     562        pb_system("scp -p -P $nport $mac:$bdir/pbgen-$pbprojver-$pbprojtag $ENV{'PBBUILDDIR'} 2> /dev/null","Get package names in $bdir on $mac");
    562563        open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$pbprojver-$pbprojtag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$pbprojver-$pbprojtag";
    563564        my $src = <KEEP>;
     
    571572        foreach my $p (split(/ +/,$src)) {
    572573            my $j = basename($p);
    573             pb_system("scp -p -P $port $mac:\'$bdir/$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Package recovery of $j in $bdir from $mac");
     574            pb_system("scp -p -P $nport $mac:\'$bdir/$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Package recovery of $j in $bdir from $mac");
    574575            $made="$made $odir/$over/$j" if (($dtype ne "rpm") || ($j !~ /.src.rpm$/));
    575576        }
    576577        print KEEP "$made\n";
    577578        close(KEEP);
    578         pb_system("ssh -q -p $port $mac \"rm -rf $tdir $bdir\"","VM cleanup on $mac");
     579        pb_system("ssh -q -p $nport $mac \"rm -rf $tdir $bdir\"","VM cleanup on $mac");
    579580        if (! $vmexist) {
    580             pb_system("ssh -q -p $port $mac \"sudo /sbin/halt -p \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)");
     581            pb_system("ssh -q -p $nport $mac \"sudo /sbin/halt -p \"; sleep $tm ; echo \'if [ -d /proc/$vmpid ]; then kill -9 $vmpid; fi \' | bash ; sleep 10","VM $vm halt (pid $vmpid)");
    581582        }
    582583        pb_send2ssh("Packages","$odir"."_"."$over");
     
    623624        $ENV{'PBVMOPT'} = "";
    624625    }
    625     $vmport->{$ENV{'PBPROJ'}} = "$pbport" if (defined $pbport);
     626    my $nport = $vmport->{$ENV{'PBPROJ'}};
     627    $nport = "$pbport" if (defined $pbport);
    626628
    627629    my $cmd;
     
    649651            die "Unable to find VM $vmm";
    650652        }
    651         $cmd = "$vmcmd $ENV{'PBVMOPT'} -redir tcp:$vmport->{$ENV{'PBPROJ'}}:10.0.2.15:22 $vmm"
     653        $cmd = "$vmcmd $ENV{'PBVMOPT'} -redir tcp:$nport:10.0.2.15:22 $vmm"
    652654    } elsif ($vmtype eq "xen") {
    653655    } elsif ($vmtype eq "vmware") {
  • devel/pbconf/project-builder/deb/rules

    r238 r239  
    3232
    3333build-stamp: .touched
    34         dh_testdir
     34        dh_testdir
    3535
    36         # Add here commands to compile the package.
     36        # Add here commands to compile the package.
    3737        perl Makefile.PL
    3838        make
     
    4040
    4141clean:
    42         dh_testdir
     42        dh_testdir
    4343        dh_testroot
    4444        rm -f build-stamp
    4545
    46         # Add here commands to clean up after the build process.
    47         -$(MAKE) distclean
     46        # Add here commands to clean up after the build process.
     47        -$(MAKE) distclean
    4848
    49         dh_clean
     49        dh_clean
    5050
    5151install: build
    52         dh_testdir
    53         dh_testroot
    54         dh_clean -k
    55         dh_installdirs
     52        dh_testdir
     53        dh_testroot
     54        dh_clean -k
     55        dh_installdirs
    5656
    57         # Add here commands to install the package into debian/linuxcoe-sd
    58         $(MAKE) install DESTDIR=$(CURDIR)/debian/PBPKG
     57        # Add here commands to install the package into debian/linuxcoe-sd
     58        $(MAKE) install DESTDIR=$(CURDIR)/debian/PBPKG
    5959
    6060# Build architecture-independent files here.
     
    6464# Build architecture-dependent files here.
    6565binary-arch: build install
    66             dh_testdir
    67             dh_testroot
    68             dh_installchangelogs ChangeLog
    69             dh_installdocs
    70             dh_installexamples
    71                                             #       dh_install
    72                                             #       dh_installmenu
    73                                             #       dh_installdebconf
    74                                             #       dh_installlogrotate
    75                                             #       dh_installemacsen
    76                                             #       dh_installpam
    77                                             #       dh_installmime
    78                                             #       dh_python
    79                                             #       dh_installinit
    80                                             #       dh_installcron
    81                                             #       dh_installinfo
    82             dh_installman
    83                                             #dh_link usr/share/doc/linuxcoe-sd usr/share/doc/linuxcoe-sd-base
    84             dh_strip
    85             dh_compress
    86             dh_fixperms
     66            dh_testdir
     67            dh_testroot
     68            dh_installchangelogs ChangeLog
     69            dh_installdocs
     70            dh_installexamples
     71                #       dh_install
     72                #       dh_installmenu
     73                #       dh_installdebconf
     74                #       dh_installlogrotate
     75                #       dh_installemacsen
     76                #       dh_installpam
     77                #       dh_installmime
     78                #       dh_python
     79                #       dh_installinit
     80                #       dh_installcron
     81                #       dh_installinfo
     82            dh_installman
     83            dh_strip
     84            dh_compress
     85            dh_fixperms
    8786                                #       dh_perl
    8887                                #       dh_makeshlibs
    89             dh_installdeb
    90             dh_shlibdeps
    91             dh_gencontrol
    92             dh_md5sums
    93             dh_builddeb
     88            dh_installdeb
     89            dh_shlibdeps
     90            dh_gencontrol
     91            dh_md5sums
     92            dh_builddeb
    9493
    9594binary: binary-indep binary-arch
Note: See TracChangeset for help on using the changeset viewer.