futimes fails on file open for read

2005-11-06 Thread Yitzchak Scott-Thoennes
The following gives:

futimes returned: -1 (Permission denied)

I'm told it succeeds on linux; is it even possible for it to work on
cygwin or am I SOL?

#include 
#include 
#include 
#include 
#include 
#include 

int main(int argc,char **argv)
{
   int fd, ret;
   struct timeval tv[2] = {{5, 0}, {5, 0}}; 

   if (system("touch foo") == -1) return 1;
   if ((fd = open("foo", O_RDONLY)) == -1) return 1;
   errno = 0;
   ret = futimes(fd, tv);
   printf("futimes returned: %d (%s)\n", ret, strerror(errno));
   return 0;
}

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: how to make a cygwin ftp mirror?

2005-11-06 Thread Linsong

Brian:
   Anyway, thanks a lot!

BR
Linsong

Brian Dessent wrote:


Linsong wrote:

 


  Now I want to make a ftp mirror of cygwin, but I am not very clear
how to do it.
   



http://sourceware.org/cygwin-apps/package-server.html

 


Is there any tools or script to make this process automatically?
   



rsync
lftp -c mirror
wget --mirror

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


 




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: how to make a cygwin ftp mirror?

2005-11-06 Thread Brian Dessent
Linsong wrote:

>Now I want to make a ftp mirror of cygwin, but I am not very clear
> how to do it.

http://sourceware.org/cygwin-apps/package-server.html

> Is there any tools or script to make this process automatically?

rsync
lftp -c mirror
wget --mirror

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



how to make a cygwin ftp mirror?

2005-11-06 Thread Linsong

Hi,
  Now I want to make a ftp mirror of cygwin, but I am not very clear 
how to do it. Is there any tools or script to make this process 
automatically? And I think there should be some tools to make the mirror 
site up to date. I google for this but found nothing useful.

  Any hint will be welcomed!

BR
Linsong

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Carl Karsten

[EMAIL PROTECTED]:/home/carl # man netselect
...
For each host, netselect figures out the approximate ping time  (though
   not  as accurately as ping does), the number of network "hops" to reach
   the target, and the percentage of ping requests that got  through  sucâ
   cessfully.  Then  netselect  calculates the "score" of each operational
   host based on these values.

[EMAIL PROTECTED]:/home/carl/temp # netselect -s 5 $(curl 
http://cygwin.com/mirrors.lst|awk -F\; '{print $2}')

  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  6349  100  63490 0  29371  0 --:--:-- --:--:-- --:--:-- 94761
   60 sourceware.mirrors.tds.net
   69 64.50.236.52
   72 64.50.236.52
   75 sourceware.mirrors.tds.net
   95 mirror.calvin.edu

Not sure why the IP, but just to be sure:

[EMAIL PROTECTED]:/home/carl # netselect ftp-ext.osuosl.org
   40 64.50.236.52

[EMAIL PROTECTED]:/home/carl # netselect cygwin.osuosl.org
   33 64.50.236.52

[EMAIL PROTECTED]:/home/carl # grep osuosl mirrors.lst
ftp://cygwin.osuosl.org/pub/cygwin;cygwin.osuosl.org;North America;Oregon
http://cygwin.osuosl.org;cygwin.osuosl.org;North America;Oregon

http://packages.debian.org/unstable/source/netselect

^Carl K

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Igor Pechtchanski
On Sun, 6 Nov 2005, Linda Walsh wrote:

> Brian Dessent wrote:
>
> > This, however is going to be rather fruitless.
> > [snip]
>
>Has "setup.exe" been modified to work from the local copy of the mirror
> list if the cygwin main site is down or unreachable (as recent or future
> network schisms might cause)?



> >  should be trivial to process with
> > sed/awk/perl/etc.
>
> Another option might be to store in a local file, the last max download
> speed associated with a given server.

This is a good idea, considering that one reason to switch mirrors would
be slow connection speed.  This way the connection speed information could
be cached for the mirrors that were accessed already.  I don't think we
ought to use the last max download speed, but some averaged metric would
work.  Combined with the ability to re-ping selected mirrors (as I
proposed), this should be pretty useful.

> I don't know if there is anyway for cygwin to determine line speed other
> than by time it takes to download the servers file from cygwin.com,
> which may not be a reliable indicator of connection speed.

I think you meant "download setup.bz2 from the mirror"...

> Too bad the development environment _seems_ difficult to set up.
> [snip]
> ...or it might have been trying to setup to do a cross-development
> environment...

Yes, that's most likely it.  The setup sources rely on having the w32api
headers (which ought to be installable on Linux), but I'm not sure the
configury is smart enough to pick up a cross-compiler without heavy
coaching through command-line options.  I haven't tried to do a cross
build, however, so the above is just a conjecture.

OTOH, other options could be Wine or VMWare -- Cygwin should run under
both.

The best way to improve Cygwin setup is to submit patches to it.  Every
little bit helps.  I hope you do get your environment into shape and start
contributing. :-)
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Linda Walsh


Brian Dessent wrote:


This, however is going to be rather fruitless.  The list of mirrors is
already checked frequently (at least daily) by automatic infrastructure
on the cygwin.com machine, and any mirror that is offline or is more
than 24 hours out of sync is automatically removed from the mirrors.lst
file.  So barring a local connectivity problem, if it's in the
mirrors.lst file (which is the same data as presented
) then it's guaranteed to be fresh and
online.


-
   Has "setup.exe" been modified to work from the local copy of the mirror
list if the cygwin main site is down or unreachable (as recent or future 
network

schisms might cause)?  Maybe an invocation option, or maybe a 4th option
on the download source page - "install from internet using locally 
cached servers
file (not recommended)."  


Or at least export the list so that a seperate utility could be used to pick a 
server.



 should be trivial to process with
sed/awk/perl/etc.


Another option might be to store in a local file, the last max download
speed associated with a given server.  This could be used to give a user
feedback about a slow link or give an estimate of the time it is likely
to take to download a set of packages.  If the user knows they have a
connection faster than 10k/s, they might try a different server next
time.  I don't know if there is anyway for cygwin to determine line speed
other than by time it takes to download the servers file from cygwin.com,
which may not be a reliable indicator of connection speed.  Probably more
hassle than anyone wants to deal with.  Too bad the development environment
_seems_ difficult to set up.  I'm sure it's not for someone who has
done it, but any time I've tried it, I've always stumbled into some
missing header, include or build tools that was "assumed" knowledge that
"anyone" doing this type of development would know -- or it might have
been trying to setup to do a cross-development environment, since
my Windows box is fairly slow (mobile P-III) vs. my headless linux
box w/dual P-III's at same clock and about 50% faster memory and 2x as
much physical memory.

My hacking days are limited now with some permanent RSI issues left over
from some deliberate managerial abuse at my previous job.

-l


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Christopher Faylor
On Sun, Nov 06, 2005 at 02:08:59PM -0800, Brian Dessent wrote:
>Carl Karsten wrote:
>
>> I meant what compiler is used.  I am used to things like InnoSetup, so I was
>> expecting something of that nature.
>
>It's built with gcc, just like Cygwin itself and every Cygwin package. 
>It is however a mingw application, and does not depend on cygwin1.dll
>for obvious reasons.  The build infratructure is the standard autoconf +
>automake environemnt.  Instructions for building are in the README file.
>
>> ftp://mirror.calvin.edu/cygwin;mirror.calvin.edu;North America;Michigan
>> 
>> Why isn't the "North America;Michigan" part displayed?
>
>I presume because it would take up more screen real-estate (setup used
>to be constricted to a very small window before it was resizeable) and
>because no one has yet coded it to do that.

i.e., WJM.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: BUG: alternatives

2005-11-06 Thread Christopher Faylor
On Sun, Nov 06, 2005 at 01:52:14PM -0500, Charles Wilson wrote:
>Christopher Faylor wrote:
>
>>A signal shouldn't cause a truncated read when retrieving data from
>>disk on cygwin or linux.
>
>ACK.
>
>>I think the only sane way to handle this is to put the read in a loop
>>and realloc the buffer as needed as long as the read continues to return
>>'>0'.
>
>Ok.
>
>>It's obviously pretty racy to get the size of the file and then expect that
>>you'll be able to read in exactly that many bytes.
>
>ACK.
>
>Revised patch attached.  I'm wondering, tho, about the advisability of 
>using alloca'ed (rather than malloc'ed) memory to hold the contents of a 
>file of unrestricted size.  Aren't there limits on the available space 
>within a single stack frame?  Does it make sense (is it legal) to alloca 
>40k or 50k or 500k? of memory?
>
>Granted, most /var/lib/alternatives files are going to be fairly small 
>(< 1k) but there's no guarantee of that...

I have mixed feelings about alloca, personally.  I use it all of the time but
it is always with some trepidation because, AFAIK, the failure condition for
alloca is a SEGV.  OTOH, it is very convenient.

In this case, however, I think you really want to use realloc.  You could even
rely on the fact that realloc(NULL, n) is equivalent to malloc(n).

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Brian Dessent
Brian Dessent wrote:

> Maybe a starting point would be a awk[1] script that lives in the
> base-files package that grabs mirrors.lst and downloads some relatively
> small package from every mirror, and generates a report.  That way, we
> could at least say "try running mirror-check.awk" when users have
> problems with mirrors, rather than just "play around until you find a
> mirror you like."

Here is a first stab at such a script.  It gets mirrors.lst and then downloads
setup.bz2 from each http mirror and reports the elapsed time.  It doesn't sort
the results or anything, but I just wanted to see if it was possible to do this
in gawk.

#!/usr/bin/awk -f

BEGIN {
CygwinSite = "/inet/tcp/0/cygwin.com/80"
MirrorsUrl = "http://cygwin.com/mirrors.lst";
RS = ORS = "\r\n\r\n"

print "GET " MirrorsUrl " HTTP/1.0" |& CygwinSite
CygwinSite |& getline Header
if (Header !~ /^HTTP\/1\.[10] 2[0-9][0-9]/) {
printf "Error fetching %s. Response was:\n%s\n", MirrorsUrl, Header
exit
}

RS = ORS = "\n"
while ((CygwinSite |& getline Mirror) > 0) {
split(Mirror, Fields, ";")
if (Fields[1] ~ /^http:\/\//) {

AwkFetch = "/bin/time /bin/awk 'BEGIN { site = \"/inet/tcp/0/" \
  Fields[2] "/80\"; RS = ORS = \"\\r\\n\\r\\n\"; print \"GET " \
  Fields[1] "/setup.bz2 HTTP/1.0\" |& site; while " \
  "((site |& getline) > 0); close (site); }' 2>&1"

while((AwkFetch | getline Output) > 0) {
if (match(Output, /([0-9]+:[0-9]+\.[0-9]+)elapsed/, Elap)) {
printf "Mirror %s (located in %s, %s) time %s\n", \
   Fields[2], Fields[4], Fields[3], Elap[1]
break
}
}
close(AwkFetch)
}
}
close(CygwinSite)
}

Obviously this is pretty rough (no ftp: support, assumes port :80 instead of
parsing it from the URL, etc.)  And it would be a lot prettier in perl or
something but the whole reason for this exercise was to see if it was possible
to write a script in pure awk that could do this.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Brian Dessent
Igor Pechtchanski wrote:

> Well, yes, if you put it that way.  However, there's a chicken-and-egg
> problem here, right?  As in "I want to download Cygwin fast" needs Cygwin
> to figure it out[*]?

Well, it's not hard to bootstrap yourself.  The base cygwin install is
currently 13.5MB to download, plus another 7.3MB if you want perl.  So,
even on a less than stellar mirror you should be able to get a working
Cygwin without having to wait terribly long, at which point you could
set out to find a better one.

But I agree that this misses the point.  It would be a nice feature to
have, and certainly would be welcomed by the users.  The problem of
course is that to do it well (not just a bunch of pings) takes some
design and thought, and most of all elbow grease.

Maybe a starting point would be a awk[1] script that lives in the
base-files package that grabs mirrors.lst and downloads some relatively
small package from every mirror, and generates a report.  That way, we
could at least say "try running mirror-check.awk" when users have
problems with mirrors, rather than just "play around until you find a
mirror you like."

Brian

[1] Written in awk (included in Base) so that there's no need to pull in
perl.  If I recall correctly GNU gawk has functions for doing TCP/IP
access.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



ieeefp.h: C++ guards

2005-11-06 Thread Yaakov S (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The ieeefp.h header does not contain C++ guards.  Is there a reason for
this?

This particularly affects C++ perl extensions, as perl.h includes
ieeefp.h, although I just ran across another, non-perl case where it
caused a compilation error.


Yaakov
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDboaIpiWmPGlmQSMRAl0SAJ9+HBmVmYkBje/4mdEAeCfbyw6MEQCfcrmR
SWJ+p86Up6wN1rK2IPyrxBc=
=m3Z2
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Igor Pechtchanski
On Sun, 6 Nov 2005, Brian Dessent wrote:

> Igor Pechtchanski wrote:
>
> > I disagree.  FWIW, keeping the local ping response time information for
> > mirrors and re-pinging on demand has been on my TODO list for a while.
> > The only thing I would strenuously object to is re-pinging the mirrors
> > automatically on every setup -- it's much better to let the user update
> > the mirror information (by adding a "Ping" button).  I don't recall if the
> > mirror list is sortable, actually -- if it isn't, it ought to be.  BTW,
> > now that setup is resizable, it would make sense to at least add the
> > location information from mirrors.lst to the mirror list dialog.
>
> Well there's fundamentally two different concepts going on here.
>
> A) Is the mirror online and fresh?  This is taken care of by the
> infrastructure at cygwin.com.
>
> B) Based on *my* connection, is the mirror fast?  This obviously is
> something that can only be measured by the end user.  However, ping is a
> really poor way to judge bandwidth.  One of the main reasons is that
> carrier grade routers do standard IP packet forwarding in hardware line
> cards (at full line rate) but they often punt things like ICMP and SNMP
> to be handled by the CPU which is much slower.  More at
> .  So a low
> ping doesn't correlate to high bandwidth, and vice versa.

Heh.  I should've quoted the "ping"...  What I meant by "ping" above is
some measure of the connection speed, not the actual ICMP packets.
Besides, doing ping in software requires an ICMP-compliant library.

> [snip more "ping" vs "connection speed" discussion]
>
> I would argue the only way to measure this is by manually experimenting
> with various mirrors and finding one from which you can download fast.
> This too could be automated by setup, but it is a lot harder than just
> measuring pings.  And you would want to do it in a way that doesn't
> cause abuse, i.e. you wouldn't want to always download a 1MB file from
> every mirror just to see which one is the fastest.

Yes, fully agreed.  That's why I'm waiting for a really large round tuit,
rather than doing something quick and dirty, but braindead.  However, the
"always" in your statement above isn't that bad, since it won't happen
unless a user chooses to perform that action.  I also vaguely recall
reading something about a standard bandwidth-test download that won't be
considered "abuse" (it probably would be much smaller than 1MB).  If
anyone recognizes what I'm talking about, I would appreciate a pointer in
private mail.

> Also, personally, I tend to find one mirror that I like and stick with
> it.  All the mirrors on the official list have the same set of packages
> so once you find a suitable mirror it makes no sense to then try others,
> unless you experience connection problems.  So I don't really see a need
> for adding a lot of automation to measuring bandwidth.

Picking that first mirror can be a hassle, too.  But even if you have a
mirror, it's nice to know what other options are available.  There is also
a question of server load...  Not everyone uses setup in the same way.

> > Yuk.  Then you'd need to pass this information to setup (not easy, as
> > setup actually grabs one from cygwin.com).  It's better to do this in
> > setup proper.
>
> Well again, I see it defined more as "I want to measure this once and
> find a suitable mirror, which I then select in setup" as opposed to "I
> will need ongoing measurements and rankings because I will be constantly
> selecting the best mirror."  From that perspective, you can write a
> simple perl script that downloads a package from each mirror in the list
> and tells you which one is the fastest - there's no need to communicate
> this back to setup.exe since you can just pick that mirror and be done
> with it.

Well, yes, if you put it that way.  However, there's a chicken-and-egg
problem here, right?  As in "I want to download Cygwin fast" needs Cygwin
to figure it out[*]?
Igor
[*] And I'm not even going to suggest using a non-Cygwin set of tools to
write that script...
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Brian Dessent
Carl Karsten wrote:

> I meant what compiler is used.  I am used to things like InnoSetup, so I was
> expecting something of that nature.

It's built with gcc, just like Cygwin itself and every Cygwin package. 
It is however a mingw application, and does not depend on cygwin1.dll
for obvious reasons.  The build infratructure is the standard autoconf +
automake environemnt.  Instructions for building are in the README file.

> ftp://mirror.calvin.edu/cygwin;mirror.calvin.edu;North America;Michigan
> 
> Why isn't the "North America;Michigan" part displayed?

I presume because it would take up more screen real-estate (setup used
to be constricted to a very small window before it was resizeable) and
because no one has yet coded it to do that.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Brian Dessent
Igor Pechtchanski wrote:

> I disagree.  FWIW, keeping the local ping response time information for
> mirrors and re-pinging on demand has been on my TODO list for a while.
> The only thing I would strenuously object to is re-pinging the mirrors
> automatically on every setup -- it's much better to let the user update
> the mirror information (by adding a "Ping" button).  I don't recall if the
> mirror list is sortable, actually -- if it isn't, it ought to be.  BTW,
> now that setup is resizable, it would make sense to at least add the
> location information from mirrors.lst to the mirror list dialog.

Well there's fundamentally two different concepts going on here.

A) Is the mirror online and fresh?  This is taken care of by the
infrastructure at cygwin.com.

B) Based on *my* connection, is the mirror fast?  This obviously is
something that can only be measured by the end user.  However, ping is a
really poor way to judge bandwidth.  One of the main reasons is that
carrier grade routers do standard IP packet forwarding in hardware line
cards (at full line rate) but they often punt things like ICMP and SNMP
to be handled by the CPU which is much slower.  More at
.  So a low
ping doesn't correlate to high bandwidth, and vice versa.

Another issue is ping doesn't measure anything about the kinds of
bandwidth caps that might be in place on the mirror.  You might be right
across the street from a mirror but if it has a 50kb/s per connection
throttle it's going to be a lot slower than one in, say, Sweden with
three times the ping but no caps.

I would argue the only way to measure this is by manually experimenting
with various mirrors and finding one from which you can download fast. 
This too could be automated by setup, but it is a lot harder than just
measuring pings.  And you would want to do it in a way that doesn't
cause abuse, i.e. you wouldn't want to always download a 1MB file from
every mirror just to see which one is the fastest.

Also, personally, I tend to find one mirror that I like and stick with
it.  All the mirrors on the official list have the same set of packages
so once you find a suitable mirror it makes no sense to then try others,
unless you experience connection problems.  So I don't really see a need
for adding a lot of automation to measuring bandwidth.

> Yuk.  Then you'd need to pass this information to setup (not easy, as
> setup actually grabs one from cygwin.com).  It's better to do this in
> setup proper.

Well again, I see it defined more as "I want to measure this once and
find a suitable mirror, which I then select in setup" as opposed to "I
will need ongoing measurements and rankings because I will be constantly
selecting the best mirror."  From that perspective, you can write a
simple perl script that downloads a package from each mirror in the list
and tells you which one is the fastest - there's no need to communicate
this back to setup.exe since you can just pick that mirror and be done
with it.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



How to run cygwin sshd as a domain user?

2005-11-06 Thread Xing Qiu

Hi,

I have successfully installed cygwin and its openssh package.  I followed 
the instruction about setting up sshd and it works as expected.


However this sshd service turns out to be a local service, which means I 
can't get access to the net printers and the net file folders in an ssh 
session.  So I wonder is there a way to run sshd as a domain user instead of 
the default, local user? BTW, if I use cygwin bash or cygwin xterm directly, 
I can access my net folder and net printer without any problem (I think the 
default cygwin user is a domain user).


I even tried to run /usr/sbin/sshd.exe by using my default domain user from 
a cygwin xterm, but then sshd refuse to run because of the permission of 
several files/dirs are not correct.


Thank you,
Xing

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



hosts.equiv rsh & SMB share access

2005-11-06 Thread Brian Ford
I know this isn't supposed to work unless the share is public.  I'm
not concerned about security and want to do exactly that.  I have done
it successfully under Samba by using share level security and setting
guest_ok for the sahre.  What I can't seem to figure out is how to do
it under Windows XP Professional.  I've tried simple file sharing read
only and full acesss, regular file sharing with all read privledges for
Everyone, etc.  Does anyone know how to do this?

Also:

$ rsh client
Last login: Sun Nov  6 14:48:18 from somehost
Fanfare!!!
You are successfully logged in to this server!!!

$ net use server\\share /USER:guest ""
System error 1312 has occurred.

A specified logon session does not exist. It may already have been
terminated.

but,

$ rsh client 'net use server\\share /USER:guest ""'
The command completed successfully.

Huh?

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Carl Karsten

Brian Dessent wrote:

Carl Karsten wrote:



What builds the setup.exe source?



Anyone who wants to.  If you mean who compiles the setup.exe binaries


I meant what compiler is used.  I am used to things like InnoSetup, so I was 
expecting something of that nature.




As to the location of the source, please read
.  Since you are the
second person who has asked this in the last week I have to wonder if
there is something about the website that's unclear.  Is there any
wording that could be made more clear to answer what I would hope would
be a simple question of "where is the source"?


For me, it wasn't the wording, but the path from http://cygwin.com to 
http://cygwin.com/setup.exe and then the setup gives the option to dl package 
sources, but not the setup.exe source.






I am interested in an option to prob all the servers and disable the ones that 
are
currently off line.  Maybe even do a traceroute and sort by number of hops.



This, however is going to be rather fruitless.  The list of mirrors is
already checked frequently (at least daily) by automatic infrastructure
on the cygwin.com machine, and any mirror that is offline or is more
than 24 hours out of sync is automatically removed from the mirrors.lst
file.  So barring a local connectivity problem, if it's in the
mirrors.lst file (which is the same data as presented
) then it's guaranteed to be fresh and
online.



I didn't realize it was retrieved at setup time.  good idea ;)

I still think it would be usefully to have a way to evaluate which server to use. 
 I did gentoo a few years ago, and it had something like that.  I'll dig around 
and see if I can figure out how to make use of it.





Or at least export the list so that a seperate utility could be used to pick a 
server.



 should be trivial to process with
sed/awk/perl/etc.


ftp://mirror.calvin.edu/cygwin;mirror.calvin.edu;North America;Michigan

Why isn't the "North America;Michigan" part displayed?

^Carl


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Igor Pechtchanski
On Sun, 6 Nov 2005, Brian Dessent wrote:

> Carl Karsten wrote:
>
> > What builds the setup.exe source?
>
> Anyone who wants to.  If you mean who compiles the setup.exe binaries
> that are on the mirrors, that would be the maintainers (currently Max
> Bowser and myself, although Igor helps so much he's a de facto
> maintainer.)

Thanks for that... :-)

> As to the location of the source, please read
> .  Since you are the
> second person who has asked this in the last week I have to wonder if
> there is something about the website that's unclear.  Is there any
> wording that could be made more clear to answer what I would hope would
> be a simple question of "where is the source"?

Perhaps we need a couple of FAQ entries for setup.exe and its source?

> > I am interested in an option to prob all the servers and disable the
> > ones that are currently off line.  Maybe even do a traceroute and sort
> > by number of hops.
>
> This, however is going to be rather fruitless.

I disagree.  FWIW, keeping the local ping response time information for
mirrors and re-pinging on demand has been on my TODO list for a while.
The only thing I would strenuously object to is re-pinging the mirrors
automatically on every setup -- it's much better to let the user update
the mirror information (by adding a "Ping" button).  I don't recall if the
mirror list is sortable, actually -- if it isn't, it ought to be.  BTW,
now that setup is resizable, it would make sense to at least add the
location information from mirrors.lst to the mirror list dialog.

> The list of mirrors is already checked frequently (at least daily) by
> automatic infrastructure on the cygwin.com machine, and any mirror that
> is offline or is more than 24 hours out of sync is automatically removed
> from the mirrors.lst file.

This works for dead mirrors, but doesn't do anything for (a) mirrors
explicitly added in the past, though Buzz's patch tries to address this,
and (b) mirrors that are up-to-date but across an extremely slow link from
the local machine.  I think the OP is actually asking for the ping
information w.r.t. the local machine.

> So barring a local connectivity problem, if it's in the mirrors.lst file
> (which is the same data as presented )
> then it's guaranteed to be fresh and online.

But that's the point.  Links differ.  I don't think the fact that some
mirror in the US is fast for me is going to mean that someone in, say, the
Philippines won't be better off with a local mirror.  Some countries also
have bandwidth restrictions for foreign connections, which could be termed
a "connectivity problem", but isn't something easy to work around.

Another problem is the sort order for the mirror list (the fact that
mirrors are sorted alphabetically has caused at least one good mirror --
archive.progeny.com -- to drop Cygwin, as people just picked the first
available one).  Sorting by ping time would be ideal.  Randomizing the
list (as apache does) is at least going to ensure a reasonable
distribution of hits on various mirrors.  As I said, I'm waiting for a
round tuit...

> > Or at least export the list so that a seperate utility could be used
> > to pick a server.
>
>  should be trivial to process with
> sed/awk/perl/etc.

Yuk.  Then you'd need to pass this information to setup (not easy, as
setup actually grabs one from cygwin.com).  It's better to do this in
setup proper.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Installer bug with symlinks

2005-11-06 Thread Joe Krahn
The installer can make a directory for new files even if there is 
already an existing directory symlink of the same name.


I discovered the problem when upgrading where I had a custom X11 build. 
I moved /usr/X11R6 to /usr/X11R6.dist, and made the symlink /usr/X11R6 
-> /usr/X11R6.build. When updating some packages with files in 
/usr/X11R6, I ended up with new files installed in /usr/X11R6 while the 
symlink name of the same name still existed.


Joe Krahn

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: error while installing cygwin

2005-11-06 Thread Larry Hall (Cygwin)

Abhinav Varshney wrote:

Hi,
I have been trying to install cygwin on my windows xp,
but while dowloading stuff from the website using
setup file it gives me an error saying "cygwin1.dll
not found" and then cygwin either doesnt work or
starts wid bash shell..how can i make it work?
Thanks in advance,



You're going to need to be allot more specific about
what the problem is before someone can help you.  Your
statements above are contradictory.  Cygwin's bash shell
will not start if 'cygwin1.dll' cannot be found and
'cygwin1.dll' will only not be found if you haven't
installed it, it's not in your path (which shouldn't
be a problem during installation), or possibly if
you're doing an upgrade rather than an install.  I
suggest you read and follow the problem reporting
guidelines at  if
you're still having problems.  That might help folks
on this list start to chip away at the issue(s) you're
seeing.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: where is setup.exe source?

2005-11-06 Thread Brian Dessent
Carl Karsten wrote:

> What builds the setup.exe source?

Anyone who wants to.  If you mean who compiles the setup.exe binaries
that are on the mirrors, that would be the maintainers (currently Max
Bowser and myself, although Igor helps so much he's a de facto
maintainer.)

As to the location of the source, please read
.  Since you are the
second person who has asked this in the last week I have to wonder if
there is something about the website that's unclear.  Is there any
wording that could be made more clear to answer what I would hope would
be a simple question of "where is the source"?

> I am interested in an option to prob all the servers and disable the ones 
> that are
> currently off line.  Maybe even do a traceroute and sort by number of hops.

This, however is going to be rather fruitless.  The list of mirrors is
already checked frequently (at least daily) by automatic infrastructure
on the cygwin.com machine, and any mirror that is offline or is more
than 24 hours out of sync is automatically removed from the mirrors.lst
file.  So barring a local connectivity problem, if it's in the
mirrors.lst file (which is the same data as presented
) then it's guaranteed to be fresh and
online.

> Or at least export the list so that a seperate utility could be used to pick 
> a server.

 should be trivial to process with
sed/awk/perl/etc.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: X Copy/Paste ?

2005-11-06 Thread Brian Dessent
Roy Wiseman wrote:

> A quick question, and I have a feeling this is asked
> regularly, but I couldn't find an answer on searching
> the forum.
> 
> How can I copy/paste to/from xterm to another xterm
> windows and also how can I copy/paste to/from an xterm
> window and a windows application like say notepad ?

Since this is a X11-related question it really belongs on the
cygwin-xfree (at) cygwin.com mailing list, where I've CC:d it.

The X11 clipboard and windows clipboard are integrated.  You don't have
to do anything special to copy/paste between them.  In rxvt and xterm,
selecting text with the mouse also selects it, so you can just Ctrl-V in
Notepad.  To paste in rxvt / xterm you normally use the middle mouse
button (which can sometimes be emulated on 2 button mice by pressing
both at the same time) or by pressing Shift-Insert.  You can find more
details in the manpages.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: bug report place

2005-11-06 Thread Brian Dessent
Carl Karsten wrote:

> Where should bugs be reported?

All discussion of the setup.exe program belongs on the cygwin-apps (at)
cygwin.com mailing list, including bug reports.

> Where should "potential" bugs be discussed?  as in, is this a bug:
> 
> setup-2.513-1-alpha.exe defaults the "Local Package Dir" to "C:\Program
> Files\Mozilla Firefox"

It should use the last specified value.  Check to see what
/etc/setup/last-cache contains, for that's what it should use.  If it
contains something different than what you are seeing then that's a bug.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: bug report place

2005-11-06 Thread Joe Smith


"Carl Karsten" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]




report this as a bug



http://cs.nyu.edu/~pechtcha/cygwin/setup-2.513-1-alpha.exe


Where should bugs be reported?
Please post bugs to this list, but be sure to read and follow the 
instructions found here: http://cygwin.com/problems.html 




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: BUG: alternatives

2005-11-06 Thread Brian Dessent
Charles Wilson wrote:

> Revised patch attached.  I'm wondering, tho, about the advisability of
> using alloca'ed (rather than malloc'ed) memory to hold the contents of a
> file of unrestricted size.  Aren't there limits on the available space
> within a single stack frame?  Does it make sense (is it legal) to alloca
> 40k or 50k or 500k? of memory?

It doesn't sound like the greatest idea in the world.  If you try to
alloca() more than what's available on the stack you get a SEGV or
similar, and there's no way to check for success/failure other than just
hoping that it doesn't happen, afaik.

On the other hand, as long as the program doesn't have a lot of
recursion 50k ought to be no problem at all.  I think the default on
win32 (-Wl,--stack) is 2MB, which of course not all of which would be
available but is still >> 50k.

So I guess it just depends on how much time you want to spend making
this "technically correct" in the face extremely large files, which
would seem pretty rare to me.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



where is setup.exe source?

2005-11-06 Thread Carl Karsten

What builds the setup.exe source?

I am interested in an option to prob all the servers and disable the ones that are 
currently off line.  Maybe even do a traceroute and sort by number of hops.


Or at least export the list so that a seperate utility could be used to pick a 
server.

^Carl K


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



bug report place

2005-11-06 Thread Carl Karsten
report this as a bug 



http://cs.nyu.edu/~pechtcha/cygwin/setup-2.513-1-alpha.exe


Where should bugs be reported?

Where should "potential" bugs be discussed?  as in, is this a bug:

setup-2.513-1-alpha.exe defaults the "Local Package Dir" to "C:\Program 
Files\Mozilla Firefox"


^Carl K


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



X Copy/Paste ?

2005-11-06 Thread Roy Wiseman

Hi,

A quick question, and I have a feeling this is asked
regularly, but I couldn't find an answer on searching
the forum.

How can I copy/paste to/from xterm to another xterm
windows and also how can I copy/paste to/from an xterm
window and a windows application like say notepad ?

Thanks !

Roy.




___ 
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: BUG: alternatives

2005-11-06 Thread Charles Wilson

It would help if I actually attached the patch.

Charles Wilson wrote:

Christopher Faylor wrote:


A signal shouldn't cause a truncated read when retrieving data from
disk on cygwin or linux.



ACK.


I think the only sane way to handle this is to put the read in a loop
and realloc the buffer as needed as long as the read continues to return
'>0'.



Ok.

It's obviously pretty racy to get the size of the file and then expect 
that

you'll be able to read in exactly that many bytes.



ACK.

Revised patch attached.  I'm wondering, tho, about the advisability of 
using alloca'ed (rather than malloc'ed) memory to hold the contents of a 
file of unrestricted size.  Aren't there limits on the available space 
within a single stack frame?  Does it make sense (is it legal) to alloca 
40k or 50k or 500k? of memory?


Granted, most /var/lib/alternatives files are going to be fairly small 
(< 1k) but there's no guarantee of that...


--
Chuck



diff -urN -x .build -x .inst -x .sinst -x .gmo -x .mo 
alternatives-1.3.20a-orig/alternatives.c alternatives-1.3.20a/alternatives.c
--- alternatives-1.3.20a-orig/alternatives.c2005-06-25 21:55:02.0 
-0400
+++ alternatives-1.3.20a/alternatives.c 2005-11-06 13:36:00.46875 -0500
@@ -16,6 +16,15 @@
 
 #defineFLAGS_TEST  (1 << 0)
 #defineFLAGS_VERBOSE   (1 << 1)
+#if defined(O_BINARY)
+# define _O_BINARY O_BINARY
+# define FOPEN_WRITE_MODE  "wb"
+# define FOPEN_READ_MODE   "rb"
+#else
+# define _O_BINARY 0
+# define FOPEN_WRITE_MODE  "w"
+# define FOPEN_READ_MODE   "r"
+#endif
 
 #define FL_TEST(flags) ((flags) & FLAGS_TEST)
 #define FL_VERBOSE(flags)   ((flags) & FLAGS_VERBOSE)
@@ -115,16 +124,30 @@
 
 char * parseLine(char ** buf) {
 char * start = *buf;
-char * end;
+char * end1 = *buf;
+char * end2;
 
 if (!*buf || !**buf) return NULL;
 
-end = strchr(start, '\n');
-if (!end) {
-   *buf = start + strlen(start);
-} else {
-   *buf = end + 1;
-   *end = '\0';
+while (*end1 && (*end1 != '\n') && (*end1 != '\r'))
+   end1++;
+
+end2 = end1;
+while (*end2 && (*end2 == '\r')) /* only walk past '\r', NOT '\n' */
+{
+   *end2 = '\0';
+   end2++;
+}
+
+/* ensures this parseLine() only consumes ONE '\n' */
+if (*end2 == '\n')
+{
+   *buf = end2 + 1;
+   *end2 = '\0';
+}
+else
+{
+   *buf = end2;
 }
 
 while (isspace(*start) && *start) start++;
@@ -139,6 +162,7 @@
 int i;
 struct stat sb;
 char * buf;
+char * bufp;
 char * end;
 char * line;
 struct {
@@ -147,6 +171,9 @@
 } * groups = NULL;
 int numGroups = 0;
 char linkBuf[1024];
+size_t curBufSz;
+size_t totalBytesRead;
+size_t numBytesRead;
 
 set->alts = NULL;
 set->numAlts = 0;
@@ -160,23 +187,44 @@
 if (FL_VERBOSE(flags))
printf(_("reading %s\n"), path);
 
-if ((fd = open(path, O_RDONLY)) < 0) {
+if ((fd = open(path, O_RDONLY | _O_BINARY)) < 0) {
if (errno == ENOENT) return 3;
fprintf(stderr, _("failed to open %s: %s\n"), path,
strerror(errno));
return 1;
 }
 
-fstat(fd, &sb);
-buf = alloca(sb.st_size + 1);
-if (read(fd, buf, sb.st_size) != sb.st_size) {
-   close(fd);
+curBufSz = 16;
+totalBytesRead = 0;
+buf = alloca(curBufSz + 1);
+bufp = buf + totalBytesRead;
+while ( (numBytesRead = read(fd, bufp, curBufSz - totalBytesRead)) > 0 )
+{
+   char* newBuf;
+   size_t newBufSz;
+
+   totalBytesRead += numBytesRead;
+
+   if (curBufSz < 4096)
+  newBufSz = curBufSz * 2;
+   else
+  newBufSz = curBufSz + 4096;
+
+   newBuf = alloca(newBufSz + 1);
+   memcpy(newBuf, buf, curBufSz);
+   curBufSz = newBufSz;
+   buf = newBuf; /* alloca'ed memory automatically reclaimed */
+   bufp = buf + totalBytesRead;
+}
+if (numBytesRead < 0)
+{
+close(fd);
fprintf(stderr, _("failed to read %s: %s\n"), path,
strerror(errno));
return 1;
 }
 close(fd);
-buf[sb.st_size] = '\0';
+buf[curBufSz] = '\0';
 
 line = parseLine(&buf);
 if (!line) {
@@ -414,7 +462,7 @@
 if (FL_TEST(flags))
fd = dup(1);
 else
-   fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644);
+   fd = open(path, O_RDWR | O_CREAT | O_EXCL | _O_BINARY, 0644);
 
 if (fd < 0) {
if (errno == EEXIST) 
@@ -425,7 +473,7 @@
return 1;
 }
 
-f = fdopen(fd, "w");
+f = fdopen(fd, FOPEN_WRITE_MODE); 
 fprintf(f, "%s\n", set->mode == AUTO ? "auto" : "manual");
 fprintf(f, "%s\n", set->alts[0].master.facility);
 for (i = 0; i < set->alts[0].numSlaves; i++) {

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   

Re: BUG: alternatives

2005-11-06 Thread Charles Wilson

Christopher Faylor wrote:


A signal shouldn't cause a truncated read when retrieving data from
disk on cygwin or linux.


ACK.


I think the only sane way to handle this is to put the read in a loop
and realloc the buffer as needed as long as the read continues to return
'>0'.


Ok.


It's obviously pretty racy to get the size of the file and then expect that
you'll be able to read in exactly that many bytes.


ACK.

Revised patch attached.  I'm wondering, tho, about the advisability of 
using alloca'ed (rather than malloc'ed) memory to hold the contents of a 
file of unrestricted size.  Aren't there limits on the available space 
within a single stack frame?  Does it make sense (is it legal) to alloca 
40k or 50k or 500k? of memory?


Granted, most /var/lib/alternatives files are going to be fairly small 
(< 1k) but there's no guarantee of that...


--
Chuck


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Old versions of setup.exe

2005-11-06 Thread Igor Pechtchanski
On Sun, 6 Nov 2005, Scott Cegielski wrote:

> Are older versions of setup.exe kept around?  Last time I installed
> cygwin, I also installed cygnome and it would crash setup using the
> current version at the time.  I had to finad version 2.340.2.5 of setup
> and use that.

Well, it stands to reason, then, to try the newest version of setup, not
embark on quests for older ones.  Why not try the latest snapshot[*] and,
only if that fails too, report this as a bug and grab an older version?

> Is there an archive of these versions somewhere?

If the newest snapshot doesn't work for you, you can try grabbing the one
you want from the "Cygwin Time Machine" (Google for it).  Note that
anything you get from there is unsupported on this list.
HTH,
Igor
[*] The snapshots are usually at .
However, in this case, the snapshot is temporarily residing at
.  I've Cc'd
the cygwin-apps list for the following request to the setup maintainer:
Brian, all the patches in that version are already in CVS.  Can we get
a new setup snapshot out, please?
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Some new data regarding "fork: resource temporarily unavailable"

2005-11-06 Thread David Arnstein
On Sun, Nov 06, 2005 at 10:44:37AM -0500, Volker Quetschke wrote:
> First of all, on this Win2k SP4 I don't see that behavior. Even when I start
> several "normal" Windows programs that value doesn't increase. (It's at 132
> here.)

Thank you for this data Mr. Quetschke. I will test two other machines
over the next few days and see if a pattern emerges.

I left my machine running all night. The count of handles for "System"
rose to 200,000+, so perhaps this statistic is not relevant. I'll keep
looking.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Missing directories in @INC with perl 5.8.7 and cygwin 1.5.18-1

2005-11-06 Thread Yitzchak Scott-Thoennes
On Sat, Nov 05, 2005 at 04:43:03AM +0100, Gerrit P. Haase wrote:
> [EMAIL PROTECTED] wrote:
> >
> >
> >
> >Hi,
> >
> >If PERL5LIB is set, perl searches for according version directories and
> >architecture specific directories.
> >If they are present they will be included in the @INC array.
> >
> >
> >Now I am faced with the problem that with perl 5.8.7 this does not work 
> >anymore!
> 
> There is a new feature in perl, if there is a the script
> $Config{siteperl}/sitecustomize.pl present it will be executed.  See
> http://search.cpan.org/~nwclark/perl-5.8.7/pod/perlrun.pod#%2Df how to 
> disable it or how it may help you until an update of perl with a
> workaround is released, from perlrun.pod:
> 
> -f
> 
> Disable executing $Config{siteperl}/sitecustomize.pl at startup.
> 
> Perl can be built so that it by default will try to execute 
> $Config{siteperl}/sitecustomize.pl at startup. This is a hook that 
> allows the sysadmin to customize how perl behaves. It can for instance 
> be used to add entries to the @INC array to make perl find modules in 
> non-standard locations.
> 
> 
> Maybe this feature is also the reason that it behaves different from 
> previous releases.

No, it's just a problem with the cygwin release.  S_incpush in perl.c
only looks for the full archname ("cygwin-thread-multi-64int") and
revision.patchlevel.subversion ("5.8.7") as subdirectories, but we are
setting things to make makemaker install modules using just 5.8 and
cygwin, even when a PREFIX is specified (not sure if this applies to
INSTALL_BASE as well).

Some changes to Configure are needed to make this cleaner.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: RXVT blurry fonts

2005-11-06 Thread Justin Grote

Brian Dessent wrote:

If you want the 'bold' attribute
to just affect a color change and not a font change, then you need to
specify with -fb or rxvt*boldFont that the bold font face name is the
same as the normal font face name, "Lucida Console-13" in your case. 


Great idea! I had actually thought of setting it to Lucida Console Bold, 
but for some reason I got to thinking the bold would throw off the 
fixed-width of the font, but it didn't. It looks great now. Thanks!


-Justin Grote

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Old versions of setup.exe

2005-11-06 Thread Scott Cegielski
Are older versions of setup.exe kept around?  Last time I installed 
cygwin, I also installed cygnome and it would crash setup using the 
current version at the time.  I had to finad version 2.340.2.5 of setup 
and use that.  Is there an archive of these versions somewhere?

Thanks

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Windows 98 + OpenSSH + cygwin

2005-11-06 Thread Brian Dessent
David Di Biase wrote:

> Well I did notice an error, like I mentioned, that it couldn't setup
> the service. What I'm worried about is if there was any process it
> might have skipped after it returned the error. Although at the end it
> did say "Configuration success, enjoy" or something like that.

I tested ssh-host-config on 98 and didn't get any error messages.  The
script contains logic to detect if running under 98 and behaive
correctly.  If you do get an error, that is a bug.  Please report the
full output of the script as well as uname -a if it in fact is trying to
install a service under 98.  (Although it does add 22/tcp to
\windows\services, the /etc/services-like file, but this is a different
meaning of 'services' entirely.)

> Also would you happen to know how to add the daemon to the run string
> (which is the best way and how). Like I said I'm not used to the 98
> structure, it's as if I stepped into a world of wonder :p

The easiest way is probably just to add a shortcut to sshd.exe to the
Startup folder.  You can try this though:

regtool set '\HKLM\Software\Microsoft\Windows\CurrentVersion\Run\sshd'
`cygpath -w /usr/sbin/sshd`

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Re: Windows 98 + OpenSSH + cygwin

2005-11-06 Thread David Di Biase
> Since 98 has no concept of a service or users you start sshd in the
> normal way.  After running ssh-host-config you should be able to just
> run /usr/sbin/sshd from a prompt - it will daemonize itself, you
> shouldn't have to use "&" or nohup etc.  That's pretty much it.  If you
> want it to automatically start you'll have to add it to the registry
> autorun key or to the startup group, or something along those lines.

Sounds like a plan.

> If you want to use password authentication you'll need to use the
> 'crypt' utility to set the second field in /etc/passwd to the desired
> hash.  Public-key auth should work the same as a normal NT or *nix
> system.

Naw, this is a closed network I doubt anyone would want to (or be able
to) get in. Plus I can always do that in the future.

> I have to say though that sshd with win98 is probably not extensively
> tested, so I wouldn't be surprised if you run into some issues.  Though
> it might work fine.  Security-wise though it's kind of like adding a
> deadbolt to a door made out of thin balsa wood.

Well I did notice an error, like I mentioned, that it couldn't setup
the service. What I'm worried about is if there was any process it
might have skipped after it returned the error. Although at the end it
did say "Configuration success, enjoy" or something like that.

Also would you happen to know how to add the daemon to the run string
(which is the best way and how). Like I said I'm not used to the 98
structure, it's as if I stepped into a world of wonder :p

Cheers,

--
David Di Biase
Spyral Productions Inc.
http://www.spyral-productions.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Some new data regarding "fork: resource temporarily unavailable"

2005-11-06 Thread Volker Quetschke

David Arnstein wrote:

Synopsis:
the "fork: resource temporarily unavailable" problem may be caused
by a large number of obsolete process handles.

Attached to this e-mail:
1.  cygcheck.out:
the output from "cygcheck -s -v -r"
2.  tempor.sh:
A bash shell script that causes the "fork: resource temporarily
unavailable" problem on my computer. This script searches for
identical files by brute force: it launches cmp.exe many times.

First, I ran the standard Windows Task Manager with a non-standard
column shown: handle count. I noticed something disturbing
immediately. There is a process (pseudo process?) named
"System." What I see on my computer is that for this process,
the handle count rises slowly but continuously. This occurs when
my computer is almost idle (I have several daemon type processes
running, so the machine is never completely idle). If I launch any
program, the handle count jumps up. After terminating the program,
the handle count does NOT reduce.


First of all, on this Win2k SP4 I don't see that behavior. Even when I start
several "normal" Windows programs that value doesn't increase. (It's at 132
here.)


Next, I launched "Process Explorer" which is distributed from
http://www.sysinternals.com. This program allows me to examine the
handles owned by the "System" process. What I found is that most of
the handles are Process handles. These handles have names of the form
 ()
where  is a three to five digit number.

I don't have them installed.


Finally, I ran the attached shell script "tempor.sh." Specifically, I
opened a Cygwin command window and, at the bash shell prompt, I typed
cd C:/Windows/System32
tempor.sh *

This caused tempor.sh to process 2,302 files. This in turn caused
tempor.sh to launch cmp.exe more than 2.5 million times.


[EMAIL PROTECTED] /cygdrive/c/WINNT/system32
$ ~/tempor.sh *
Will process 1858 files...


When tempor.sh started, the number of handles owned by the "System"
process was less than 10,000.  While tempor.sh was running, I
watched the status of the "System" process in the Windows Task
Manager. As expected, I saw the "handles" count for this process
rise continuously and rather quickly: very roughly, 30 units per
second. My computer's CPU was 50% to 75% busy at the time.

No, no change in the handles value here. Constantly at 132.


After many minutes, tempor.sh halted itself with the by-now familiar
message "fork: resource temporarily unavailable." The number of
handles owned by the "System" process was about 86,000.

It appears that Windows itself has a problem clearing out old
Process handles from some operating system table. It looks like a
problem not specific to Cygwin at all.  I admit that the evidence
I present is not conclusive. Nevertheless, the fact that there is
a boundlessly increasing allocation of a resource (process handles)
looks suspiciously like breakage to me.

Would someone please suggest a forum (or book) where I can pursue
this further. I would like to try to clear out the old handles,
the ones with names like
 ()
as referenced in "Process Explorer."


I usually hate the WFM messages, but I thought I mention it anyway ;)


Thank you for any suggestions!


Try a current snapshot. That propably won't help for your problem but
who knows?

  Volker

--
PGP/GPG key  (ID: 0x9F8A785D)  available  from  wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913  9E53 3D35 C9BA 9F8A 785D


signature.asc
Description: OpenPGP digital signature


Re: BUG: alternatives

2005-11-06 Thread Christopher Faylor
On Sun, Nov 06, 2005 at 12:50:11AM -0500, Charles Wilson wrote:
>Gary R. Van Sickle wrote:
>>I'm not sure the test is actually valid anyway.  IIRC (and I may not, POSIX
>>may prove me wrong here), there's no guarantee that read() will return the
>>number of bytes you requested, so at a minium to make this 100% correct
>>you'd have to do something like this:
>>
>>// Read entire file
>>while(read(...) != 0)
>>{
>>}
>>
>>// Check if there was a read() failure or if it just ran out of bytes to
>>read.
>>[...]
>
>From my reading of 
>http://www.opengroup.org/onlinepubs/007908799/xsh/read.html it appears 
>that, while read doesn't always return the number of bytes requested, 
>when it DOES return something other than numbytesrequested in THIS 
>particular application we want to flag an error, and bail.
>
>e.g. a signal was received, there weren't enough bytes ready (timeout? 
>disk hardware error?), or we prematurely reached EOF...

A signal shouldn't cause a truncated read when retrieving data from
disk on cygwin or linux.

I think the only sane way to handle this is to put the read in a loop
and realloc the buffer as needed as long as the read continues to return
> 0.

It's obviously pretty racy to get the size of the file and then expect that
you'll be able to read in exactly that many bytes.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/