use Carp qw(&carp);
my $start=time();
-my $gdbcvsbare=$ENV{"HOME"}."/redhat/gdb-cvs-bare";
-my $binutilscvsbare=$ENV{"HOME"}."/redhat/binutils-cvs-bare";
+my $gdbcvsmaster=$ENV{"HOME"}."/redhat/gdb-cvs-master";
+my $binutilscvsmaster=$ENV{"HOME"}."/redhat/binutils-cvs-master";
my $archermaster=$ENV{"HOME"}."/redhat/archer-master";
my $fedoracvsroot=q{:pserver:anonymous:@cvs.fedoraproject.org:/cvs/pkgs};
+#Unknown host cvs.devel.redhat.com.
+#my $rhelcvsroot=q{:pserver:anonymous:@cvs.devel.redhat.com:/cvs/dist};
my $rhelcvsroot=q{:pserver:anonymous:@192.168.67.2:3401/cvs/dist};
my $arch_i386=qr{(?:x86|i\d86|ia32)}io;
my $arch_x86_64=qr{(?:x8664|x86_64|em64t)}io;
my $branch;
# FIXME: Connect make paralellization to the children.
my $distrojobs;
+my $gdbcvspie;
die if !GetOptions(
"i|userid=s"=>\$userid,
"force"=>\$force,
"D|distrojobs=s"=>\$distrojobs,
"configure=s"=>\$configure,
"branch=s"=>\$branch,
+ "gdbcvspie"=>\$gdbcvspie,
);
$component and ($component=~m{^(?:(?:fedora|rhel)(?:gdb|binutils|glibc)|gdbcvs|binutilscvs|archer-.*|/home/.*)$} or die "-c|--component required to be: fedoragdb|rhelgdb|fedorabinutils|rhelbinutils|fedoraglibc|rhelglibc|gdbcvs|binutilscvs|archer-*|/home/*");
$component and $component=~m{^/home/} and (-f "$component/gdb/gdbtypes.c" or die "$component/gdb/gdbtypes.c not found");
} else {
die "--branch currently unsupported for non-CVS sources" if $branch;
}
+!$gdbcvspie or $component eq "gdbcvs" or die "--gdbcvspie requires -c gdbcvs";
@target and ($srcrpm or $component=~/^(?:fedora|rhel)/) and die "--target is available only for baretestsuite modes";
my %target;
do { error "Duplicate target: $_\n" if $target{$_}++; } for @target;
$dir="$basedir/$id";
last if ! -e $dir;
}
-spawn "rm -rf $dir" if -d $dir && $force && defined $userid;
+spawn "chmod -R u+w $dir; rm -rf $dir" if -d $dir && $force && defined $userid;
error "Directory not free: $dir" if !$id || !$dir || -e $dir;
print STDERR "ID = $id | dir = $dir\n";
error "No distros specified" if !@distrouse;
my %dump=(
"path"=>$path,
"component"=>$component,
+ "branch"=>$branch,
"srcrpm"=>$srcrpm,
"file"=>join("\n",@file),
"configure"=>$configure,
+ "gdbcvspie"=>$gdbcvspie,
);
while (my($name,$val)=each(%dump)) {
next if !$val;
if ($component=~/^(gdb|binutils)cvs$/) {
my $which=$1;
- my $cvsbare=$which eq "gdb" ? $gdbcvsbare : $binutilscvsbare;
- if (-d $cvsbare) {
- spawn "cp -a $cvsbare $builddir/src; cd $builddir/src; cvs update $cvsbranch";
+ my $cvsmaster=$which eq "gdb" ? $gdbcvsmaster : $binutilscvsmaster;
+ if (-d $cvsmaster) {
+ spawn "cp -a $cvsmaster $builddir/src; cd $builddir/src; cvs update $cvsbranch";
} else {
spawn "cd $builddir; cvs -q -z3 -d :pserver:anoncvs:\@sourceware.org:/cvs/src co $cvsbranch $which";
}
} else {
my @check=($distro=~/-x86_64/ ? qw(-m64 -m32) : -m32);
@check=map("check//unix/$_",@check);
- @check=map({($_,"$_/-fPIE/-pie");} @check);
+ @check=map({($_,"$_/-fPIE/-pie");} @check) if $gdbcvspie;
# for i in ".join(" ",@check).";do orphanripper make -k \$i || :;done
- mockrun "cd $baretestsuite; $errs1; errs2; cd gdb; ulimit -c unlimited; orphanripper make -k ".join(" ",@check)." || :; mkdir $out; ".q{for t in sum log;do for file in testsuite*/gdb.$t;do suffix="${file#testsuite.unix.}"; suffix="${suffix%/gdb.$t}"; ln $file}." $out/gdb-$distro".q{$suffix.$t || :; done; done;};
+ mockrun "cd $baretestsuite; $errs1; errs2; cd gdb; ulimit -c unlimited; orphanripper make -k ".join(" ",@check)." || :; mkdir $out; ".q{for t in sum log;do for file in testsuite*/gdb.$t;do suffix="${file#testsuite.unix.}"; suffix="${suffix%/gdb.$t}"; ln $file}." $out/gdb".q{$suffix.$t || :; done; done;};
}
# gdbunpack does:
# perl -i -pe 's{\Q'"$HOME"'\E/.*?/build/[^/]*/}{}g' "$base"/*