Hullo...
At the bottom of this email I've pasted a clipping from my build log,
beginning with the line "make test", where the failure occurs.
I duplicate this by plugging my iBook into ethernet at work, then
unplugging it and using airport with dhcp-served addresses in 10.1.x.x
(with no associated hostnames), then running "fink rebuild libwww-pm".
To sum-up: compile is fine; build intermittently fails at test sections
via "make test" in the build script; some tests fail depending upon
whether my iBook has a valid hostname. Failure is in a configure script
in OS X, not in the package, but package could protect itself by
incorporating a workaround.
More detail:
some test scripts in libwww-pm-5.64-2 try to access a temporary http
server at http://<hostname>:<some port>. If hostname is invalid, these
scripts die.
I think the fault is in a stock OS X configure script on my iBook. I'll
describe it, and I'd be grateful to know if anyone else experiences this.
If I unplug the ethernet cable from my iBook and go sit outside, connected
via airport, my hostname becomes invalid. My hostname should change
appropriately on switching net-connections, in my case from
131.215.133.183 in the wall socket,
where nslookup gives dhcp-133.183.caltech.edu
to
10.1.239.248 via airport,
which has no host name,
so hostname should become 10.1.239.248
or maybe localhost?
This should be handled by the scipt
/System/Library/SystemConfiguration/Kicker.bundle/Resources/set-hostname
which fails, at least for me, by leaving the old hostname set.
a workaround: I can reboot. On boot, the hostname is left as localhost
if set-hostname can't figure it out.
Or I can give the command
$ sudo hostname <my_ip_address>
before running "fink rebuild libwww-pm".
better workaround: correctly set the hostname.
below is a version of set-hostname that gives a valid if not ideal
hostname. I don't like rewriting configure scripts, so perhaps it would
be better if the build script for libwww-pm does something similar to
temporarily reset the hostname, then set it back, or somesuch:
#!/bin/sh
#
# set-hostname
#
. /etc/hostconfig
if [ ! "${HOSTNAME:=-AUTOMATIC-}" = "-AUTOMATIC-" ] ; then
exit 1
fi
primary=$(netstat -rn | sed -n 's/default [ ]*[^ ]*[ ]*[^ ]*[ ]*[^ ]*[ ]*[^ ]*[ ]*\([^
]*\)[ ]*[^ ]*/\1/p')
if [ "${primary}" = "" ] ; then
logger setting hostname to "localhost"
hostname "localhost"
exit 0
fi
host=$(ipconfig getoption "${primary}" host_name)
if [ "${host}" = "" ]; then
ifconfig ${primary} inet 2>/dev/null | sed -n
'/169\.254/d;/127\.0\.0\.1/d;/0\.0\.0\.0/d;s/^.*inet \([0-9\.]*\) netmask.*/\1/p' |
while read ip_address
do
host=$(nslookup ${ip_address} 2>/dev/null | sed -n 's/Name: [ ]*\([^
]*\)$/\1/p')
logger DEBUG ip_address "${ip_address}"
if [ ! "${host}" = "" ] ; then
break;
elif [ ! "${ip_address}" = "" ] ; then
host=${ip_address};
break;
else
host="localhost"
fi
done
fi
if [ ! "${host}" = "" ]; then
logger setting hostname to "${host}"
hostname "${host}"
fi
exit 0
#
# end of set-hostname
#
***
thanks for reading. below is the relevant section from my build log of
libwww-pm. I may have unknowingly blasted my iBook in some way, such that
nobody else can duplicate the problem, in which case this email is bunk...
Merry Christmas -- Kaben.
***
.
.
.
make test
/usr/bin/perl t/TEST 0
base/common-req.....ok
base/cookies........ok
base/date...........ok
base/headers-auth...ok
base/headers-etag...ok
base/headers-util...ok
base/headers........ok
base/http...........ok
base/listing........ok
base/mediatypes.....ok
base/message........ok
base/negotiate......ok
base/response.......ok
base/status.........ok
base/ua.............ok
html/form...........ok
robot/rules-dbm.....ok
robot/rules.........ok
robot/ua............HTTP Server terminated
FAILED tests 1-3, 5, 7
Failed 5/7 tests, 28.57% okay
local/autoload......ok
local/get...........ok
local/http..........HTTP Server terminated
Can't call method "is_redirect" on an undefined value at local/http.t line 188,
<DAEMON> line 1.
dubious
Test returned status 22 (wstat 5632, 0x1600)
DIED. FAILED tests 1-18
Failed 18/18 tests, 0.00% okay
local/protosub......ok
live/activestate....ok
live/jigsaw-auth-b..ok
live/jigsaw-auth-d..ok
live/jigsaw-chunk...ok
live/jigsaw-md5.....ok
live/jigsaw-neg.....ok
live/jigsaw-te......ok
live/validator......ok
Failed Test Status Wstat Total Fail Failed List of failed
-------------------------------------------------------------------------------
local/http.t 22 5632 18 18 100.00% 1-18
robot/ua.t 7 5 71.43% 1-3, 5, 7
Failed 2/31 test scripts, 93.55% okay. 23/322 subtests failed, 92.86% okay.
make: *** [test] Error 45
### failed, exit code 2
Failed: compiling libwww-pm-5.64-2 failed
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel