cURL / Mailing Lists / curl-users / Single Mail

curl-users

Building on Redhat 5.2, and a problem with -z

From: David West <dhw_at_thedance.net>
Date: Wed, 10 Jan 2001 13:07:06 -0500

Building on Redhat 5.2:

The suggestion to provide a dummy autoconf which only responds to -v
works if one also provides a dummy autoheader which responds to -v with
the same message that the dummy autoconf gives (just symlink the dummy
autoheader to the dummy autoconf). This trick enabled me to build
7.5.1 and later 7.5.2 on Redhat 5.2. Thanks, Daniel. Suggestion: the
curl distribution should provide and use these dummies, since using real
local autoconf and autoheader can (as here) cause unobvious build fails.
Here are mine:

----start of autoconf----
#!/bin/bash
#fake autoconf for building curl
if [ "$1" = "--version" ]
then echo "Autoconf version 2.13"
fi
----end of autoconf----

[~/tmp]$ ls -lt ../bin/auto*
lrwxrwxrwx 1 dhw 202 8 Dec 24 14:32 ../bin/autoheader -> autoconf
-rwxr-xr-x 1 dhw 202 108 Dec 24 14:24 ../bin/autoconf

Problem with -z:

On my Slackware machine (kernel 2.0.36, libc5), -z appeared to work
properly at the end of Dec 2000, but appears not to work properly now
(yes, all machines involved agree that the year is 2001, and more or less
agree on the time, see below :-)) The situation is similar on the remote
Redhat machine.

I tested 7.5.2 with the following script:
----start of file testcurl---
#!/bin/bash
{
curl -V
echo measure clock skew
date
touch timestamp
echo upload timestamp
curl -T timestamp -# ftp://myname:mypasswd@myremotehost.org/tmp/
echo download remote dir
curl -# ftp://myname:mypasswd@myremotehost.org/tmp/ | grep -e timestamp -e mirror.log
echo test -z option
ls -l mirror.log
curl -z timestamp -# -O ftp://myname:mypasswd@myremotehost.org/tmp/mirror.log
ls -l mirror.log
} | tee /dev/tty 2>&1 > test-curl.log
strace -o curl-strace-log curl -z timestamp -# ftp://myname:mypasswd@myremotehost.org/tmp/mirror.log
----end of file testcurl--

here is the output:
----start of file test-curl.log---
curl 7.5.2 (i586-pc-linux-gnu) libcurl 7.5.2
measure clock skew
Wed Jan 10 12:33:45 EST 2001
upload timestamp
download remote dir
-rw-r--r-- 1 dhw 202 1734 Jan 10 06:17 mirror.log
-rw-r--r-- 1 dhw 202 0 Jan 10 12:19 timestamp
test -z option
-rw-r--r-- 1 root root 1734 Jan 10 12:33 mirror.log
----end of file test-curl.log---

As you can see, the remote file mirror.log was downloaded even though it was
not newer than the local timestamp, even allowing for 14 minutes of clock skew.
Either this is a bug, or I've missed something ... I'll go through the (large)
strace output when I have more time.

-David
Received on 2001-01-10