use Data::Dumper;
my $svn = "/usr/bin/svn";
-my $cp = "/bin/cp";
+my $cp = "/usr/bin/rsync";
my $dpkgsource = "/usr/bin/dpkg-source";
my $cowpoke = "/usr/bin/cowpoke";
my $rsync = "/usr/bin/rsync";
my $debsign = "/usr/bin/debsign";
my @debsign_opts = ();
-my @cowpoke_opts = qw(--dpkg-opts='-sa');
+my @cowpoke_opts = ();
my @orig_compression_types = qw(bz2 gz lzma xz);
my $buildhost = "wowbagger.internal.michaelhowe.org";
if ( -d ".svn" ){
@exportcmd = ( $svn, 'export', $path, "$exportdir/export" );
} else {
- @exportcmd = ( $cp, "-a", $path, "$exportdir/export" );
+ @exportcmd = ( $cp, "--exclude=.git", "-a", $path, "$exportdir/export" );
}
}
}
foreach my $file ( @origfiles ){
# should only copy one?
- my @cpcmd = ( $cp, "-a", $file, $exportdir );
+ my @cpcmd = ( $cp, "-a", "-L", $file, $exportdir );
print "Running `@cpcmd`\n";
system( @cpcmd ) == 0
or die "Could not run copy command: $!";
my @cowpokecmd = ( $cowpoke, $archcmds, $distcmds, @cowpoke_opts, $dscfile );
print "Running @cowpokecmd";
-system( @cowpokecmd ) == 0
- or die "Could not run cowpoke: $!";
+unless ( system( @cowpokecmd ) == 0 ){
+ warn "Cowpoke failed: $!\n";
+ unlink("cowssh_it");
+ exit 1;
+}
if( $local_outputdir ){
if( ! -d $local_outputdir ){
$local_outputdir = tempdir( DIR => $workingdir );
}
-my @rsynccmd = ( $rsync, "-az", "$buildhost:$remote_outputdir/", "$local_outputdir/" );
+my @rsynccmd = ( $rsync, "--copy-links", "-az", "$buildhost:$remote_outputdir/", "$local_outputdir/" );
print "Running @rsynccmd\n";
system( @rsynccmd ) == 0
or die "Could not run rsync: $!";
foreach my $changefile ( @changefiles ){
my @debsigncmd = ( $debsign, @debsign_opts, $changefile );
+ print "Signing $changefile\n";
system( @debsigncmd ) == 0
or warn "Could not sign changes file $changefile: $!";
}