Citeren Bram <[EMAIL PROTECTED]>:
Quoting Abe Timmerman <[EMAIL PROTECTED]>:
Bram wrote:
Ran into a problem setting up smoking on one machine...
Configured the smoke to download sources via ftp.
The machine is behind a firewall which doesn't seem to be
configured properly for ftp.
It was able to connect but all other operations timed out.
When I ran:
cd /tmp
/opt/perl/libs/local/bin/smokecurrent.sh -Dcc="ccache /opt/gcc/bin/gcc430"
everything in /opt/perl/libs/local/bin got removed.
That is not good. I am so sorry!
I am looking into this matter, but cannot reproduce.
Patch that fixes this attached.
(No tests for it are added - can't come up with a good test case)
The problem was the cleanup part in FTPClient.pm.
The cleanup routine checks what files are in . and deletes them.
This works fine if at least one file is transfered (since that code
does a chdir) but if no files were transfered things gi boom, since .
is not the same as the ddir/localdir.
If you want to reproduce this then you need to establish a control
channel to an FTP server (port 21) but refuse a data channel (port 20).
I used:
iptables -A INPUT --proto tcp --sport ! 21 --source 204.244.102.6 -j REJECT
iptables -A OUTPUT --proto tcp --dport ! 21 --destination
204.244.102.6 -j REJECT
Where 204.244.102.6 is the address of the Activestate ftp server that
I used to sync with.
Kind regards,
Bram
diff -Naur old/Test-Smoke-1.32/lib/Test/Smoke/FTPClient.pm new/Test-Smoke-1.32/lib/Test/Smoke/FTPClient.pm
--- old/Test-Smoke-1.32/lib/Test/Smoke/FTPClient.pm 2008-01-05 12:39:10.000000000 +0100
+++ new/Test-Smoke-1.32/lib/Test/Smoke/FTPClient.pm 2008-06-03 23:09:25.000000000 +0200
@@ -294,6 +294,7 @@
}
}
if ( $cleanup ) {
+ chdir $localdir;
$verbose > 1 and print "Cleanup '$localdir'\n";
my %ok_file = map {
( clean_filename( $_->{name} ) => $_->{type} )