Re: cmp (or echo) bug?

2015-12-28 Thread David Balažic
It is irrelevant how it is implemented. The command means "compare the
output of those two commands" and the only correct result is "they
differ on byte 5".

It is clearly a bug.

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



Compilation continuously increases (non) paged pool memory usage

2015-12-28 Thread xnor

Hello,

I've noticed on my system (Windows 10, Cygwin64) that a simple 
./configure && make of a typical project increases the memory usage, 
both paged and non-paged pool.


After the configure/make is done this memory continues to be used. In 
task manager memory usage will therefore slowly grow, depending on the 
projects by up to several GB.


What is leaking here? Is it Windows' fault or Cygwin's?


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



Re: cmp (or echo) bug?

2015-12-28 Thread David Balažic
I tried it in zsh (32 bit cygwin) and there it works correctly:

$  cmp  <(echo echo1)  <(echo echo2)
/tmp/zshirbIJ1 /tmp/zshDsdZep differ: byte 5, line 1

So it seems the bug is in bash.

Regards,
David


On 26 December 2015 at 13:49, Ismail Donmez  wrote:
> Hi,
>
> David Balažic  gmail.com> writes:
>
>> In Cygwin terminal (bash) I typed:
>>
>> cmp  <(echo echo1)  <(echo echo2)
>
> I suspect its a bash bug since it works fine with zsh (tested 64bit only).

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



Re: cmp (or echo) bug?

2015-12-28 Thread Michael Enright
On Mon, Dec 28, 2015 at 9:08 AM, David Balažic wrote:
> I tried it in zsh (32 bit cygwin) and there it works correctly:
>
> $  cmp  <(echo echo1)  <(echo echo2)
> /tmp/zshirbIJ1 /tmp/zshDsdZep differ: byte 5, line 1
>
> So it seems the bug is in bash.
>
A different conclusion is also supportable: That the two pipe
mechanisms have different edge-case behavior, resulting in different
outcomes for the command depending on which pipe type is used..

I tried this on 32-bit cygwin, Windows 7/64:
$ cmp <(for i in 1 2 3 4 5; do echo echo$i; done) <(for i in 1 2 3 4
6; do echo echo$i; done)
/dev/fd/63 /dev/fd/62 differ: byte 29, line 5

Your output from zsh shows named pipes are in use. "man zshexpn" says
that zsh can use anonymous pipes, yet it chose not to in your case. In
my case bash chose to use anonymous pipes, even though "man bash" says
it may use named pipes.

The man pages for these shells describe essentially the same syntax
and mechanisms for this process substitution mechanism. What is not
defined:
1) How do commands such as my for loop command or your simple echo
command provide output properly so that EOF isn't detected spuriously
2) How do programs such as cmp or diff read from their input in such a
way that they are not fooled by a file status that might appear to be
EOF but isn't.
3) Crystalline clarity as to when the shell prefers one pipe type to
another, at least not to this reader, and not that it matters.

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



Re: has anyone used Cygwin as a build system for android?

2015-12-28 Thread René Berber
On 12/28/2015 2:12 PM, Kenneth Wolcott wrote:

>   I'm considering using Cygwin as a build system for android.  I'm
> totally new at this.  What would I need that Cygwin itself does not
> provide?  I know I need an Android SDK and an Android NDK (I have to
> build/link C/C++ with Java too).  I assume that I will need Oracle
> Java.
> 
>   Is this doable?  I'm trying to build android on Mac and Linux as
> preferable alternates.

Nvidia's TADP used to ship Cygwin (and mess up an existing Cygwin
installation) to use some basic Unix commands, and the shell.

I think they stopped installing and using Cygwin.  Probably they just
ship the commands, and maybe a shell, ported to native Windows.

The main part of that Android development environment is Eclipse
customized with SDK, NDK, and a few other things.

That answers the "is doable?" question.  With or without Cygwin its
doable, its just the user's preference (a little bit Unix-like, or
not... anyway you'll configure Eclipse one way or another).
-- 
René Berber



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



Updated: wget-1.17.1-1

2015-12-28 Thread Eric Blake (cygwin)
A new release of wget, 1.17.1-1, will be available soon for download
from your favorite mirror, leaving 1.16.3-1 as previous.

NEWS:
=
This is a new upstream release. See also the package documentation in
/usr/share/doc/wget/.

DESCRIPTION:

GNU Wget is a file retrieval utility which can use either the HTTP,
HTTPS, or FTP protocols. Wget features include the ability to work in
the background while you're logged out, recursive retrieval of
directories, file name wildcard matching, remote file timestamp storage
and comparison, use of Rest with FTP servers and Range with HTTP servers
to retrieve files over slow or unstable connections, support for Proxy
servers, and configurability.

UPDATE:
===
To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page. This downloads setup.exe to your
system. Save it and run setup, answer the questions and pick up 'wget'
from the 'Web' category.

DOWNLOAD:
=
Note that downloads from cygwin.com aren't allowed due to bandwidth
limitations.  This means that you will need to find a mirror which has
this update, please choose the one nearest to you:
http://cygwin.com/mirrors.html

QUESTIONS:
==
If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

-- 
Eric Blake
volunteer cygwin wget package maintainer

For more details on this list (including unsubscription), see:
http://sourceware.org/lists.html




signature.asc
Description: OpenPGP digital signature


[ANNOUNCEMENT] Updated: wget-1.17.1-1

2015-12-28 Thread Eric Blake (cygwin)
A new release of wget, 1.17.1-1, will be available soon for download
from your favorite mirror, leaving 1.16.3-1 as previous.

NEWS:
=
This is a new upstream release. See also the package documentation in
/usr/share/doc/wget/.

DESCRIPTION:

GNU Wget is a file retrieval utility which can use either the HTTP,
HTTPS, or FTP protocols. Wget features include the ability to work in
the background while you're logged out, recursive retrieval of
directories, file name wildcard matching, remote file timestamp storage
and comparison, use of Rest with FTP servers and Range with HTTP servers
to retrieve files over slow or unstable connections, support for Proxy
servers, and configurability.

UPDATE:
===
To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page. This downloads setup.exe to your
system. Save it and run setup, answer the questions and pick up 'wget'
from the 'Web' category.

DOWNLOAD:
=
Note that downloads from cygwin.com aren't allowed due to bandwidth
limitations.  This means that you will need to find a mirror which has
this update, please choose the one nearest to you:
http://cygwin.com/mirrors.html

QUESTIONS:
==
If you want to make a point or ask a question the Cygwin mailing list is
the appropriate place.

-- 
Eric Blake
volunteer cygwin wget package maintainer

For more details on this list (including unsubscription), see:
http://sourceware.org/lists.html




signature.asc
Description: OpenPGP digital signature


has anyone used Cygwin as a build system for android?

2015-12-28 Thread Kenneth Wolcott
Hi;

  I'm considering using Cygwin as a build system for android.  I'm
totally new at this.  What would I need that Cygwin itself does not
provide?  I know I need an Android SDK and an Android NDK (I have to
build/link C/C++ with Java too).  I assume that I will need Oracle
Java.

  Is this doable?  I'm trying to build android on Mac and Linux as
preferable alternates.

Thanks,
Ken Wolcott

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



texinfo package question

2015-12-28 Thread lloyd.wood
shouldn't the texinfo package be a dependency that gets pulled in for the 
texinfo-tex package?

It doesn't seem to be (on 64-bit cygwin).

thanks
 
Lloyd Wood
http://www.geomview.org/

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



Re: cmp (or echo) bug?

2015-12-28 Thread Andrey Repin
Greetings, David Balažic!

> It is irrelevant how it is implemented. The command means "compare the
> output of those two commands" and the only correct result is "they
> differ on byte 5".

> It is clearly a bug.

I wouldn't be so hastily jumping to conclusions, if I were you.


-- 
With best regards,
Andrey Repin
Tuesday, December 29, 2015 07:39:06

Sorry for my terrible english...

Re: Issues in utmp/utmpx headers

2015-12-28 Thread Brian Inglis
> > David Lee  gmail.com> writes:
> >> While trying to port bsdgames to Cygwin I spotted the following issues:
> >> (1) In /usr/include/utmpx.h, utmpxname() is declared a void function.
> >> Should it return int?
> >> (2) In /usr/include/sys/utmp.h, utmpname() is declared a void
> >> function. Should it return int?
> >> (3) _PATH_UTMPX is not defined in any system headers.

> On 28 December 2015 at 03:02, Brian Inglis
>  systematicsw.ab.ca> wrote:
> > Search packages for missing files e.g.
> > https://cygwin.com/cgi-bin2/package-grep.cgi?grep=utmp.h=x86_64
> > brings up package cygwin-devel and cygwin32.
> > Download and run setup and select cygwin-devel to install the headers and
> > libraries.

David Lee  gmail.com> writes:
> The issue isn't missing, not-installed packages. The issues are (1)
> some function declaration seem wrong; and (2) a constant is missing.

Pardon my reading comprehension bork! 

The utmpname implementation in newlib-cygwin/winsup/cygwin/syscalls.cc
could probably be improved to: avoid a memory leak; return -1 if 
strdup fails, zero otherwise; default the path if a null pointer or string
argument is passed. 
That would also fix utmpxname which is an alias.
Such a change would have little likely impact on downstream apps, but could
produce warnings about ignoring return values. 

Unfortunately there appears to be no standard defined names to access the
default file name although GNU and Cygwin provide UTMP_FILE and UTMPX_FILE;
GNU also provide UTMP_FILENAME and UTMPX_FILENAME. 
_PATH_UTMP and _PATH_UTMPX are implementation reserved names which may or
may not be provided, though adding the latter in paths.h would be trivial. 

As the developers say, patches always welcome. 



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



sshd - ssh-host-config uses incorrect username for setup‏

2015-12-28 Thread Brian Mc George
Hi,

I am using EC2 and need to automate the configuration of sshd
 at instance launch. If I manually rdp into the machine and execute:
ssh-host-config --yes --privileged --user cyg_server --pwd ${PASSWORD}

it will work correctly.

However,
If
 I use user data (lets you execute powershell commands on instance 
start) it will fail. It will also fail if I try execute the command 
using winrm (the windows equivalent of ssh). 

If I rdp into the machine and execute it manually then the cygwin name will be 
'cyg_server'
If I try automate it the cygwin name is +'cyg_server'
It then cannot find the cyg_server account and fails.

How can I work around this? Even if it just uses SYSTEM as the account I just 
need it to work.

Here is the log when I try use the aforementioned method:

[1;32m*** Info:[0;0m Generating missing SSH host keys
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
[1;32m*** Info:[0;0m Creating default /etc/ssh_config file
[1;32m*** Info:[0;0m Creating default /etc/sshd_config file
[1;32m*** Info:[0;0m StrictModes is set to 'yes' by default.
[1;32m*** Info:[0;0m This is the recommended setting, but it requires that the 
POSIX
[1;32m*** Info:[0;0m permissions of the user's home directory, the user's .ssh
[1;32m*** Info:[0;0m directory, and the user's ssh key files are tight so that
[1;32m*** Info:[0;0m only the user has write permissions.
[1;32m*** Info:[0;0m On the other hand, StrictModes don't work well with default
[1;32m*** Info:[0;0m Windows permissions of a home directory mounted with the
[1;32m*** Info:[0;0m 'noacl' option, and they don't work at all if the home
[1;32m*** Info:[0;0m directory is on a FAT or FAT32 partition.
[1;35m*** Query:[0;0m Should StrictModes be used? (yes/no) yes
[1;32m*** Info:[0;0m Privilege separation is set to 'sandbox' by default since
[1;32m*** Info:[0;0m OpenSSH 6.1. This is unsupported by Cygwin and has to be 
set
[1;32m*** Info:[0;0m to 'yes' or 'no'.
[1;32m*** Info:[0;0m However, using privilege separation requires a 
non-privileged account
[1;32m*** Info:[0;0m called 'sshd'.
[1;32m*** Info:[0;0m For more info on privilege separation read 
/usr/share/doc/openssh/README.privsep.
[1;35m*** Query:[0;0m Should privilege separation be used? (yes/no) yes
[1;32m*** Info:[0;0m Note that creating a new user requires that the current 
account have
[1;32m*** Info:[0;0m Administrator privileges. Should this script attempt to 
create a
[1;35m*** Query:[0;0m new local account 'sshd'? (yes/no) yes
[1;32m*** Info:[0;0m Updating /etc/sshd_config file
[1;35m*** Query:[0;0m Do you want to install sshd as a service?
[1;35m*** Query:[0;0m (Say "no" if it is already installed as a service) 
(yes/no) yes
[1;35m*** Query:[0;0m Enter the value of CYGWIN for the daemon: []
[1;32m*** Info:[0;0m On Windows Server 2003, Windows Vista, and above, the
[1;32m*** Info:[0;0m SYSTEM account cannot setuid to other users -- a capability
[1;32m*** Info:[0;0m sshd requires. You need to have or to create a privileged
[1;32m*** Info:[0;0m account. This script will help you do so.
[1;32m*** Info:[0;0m It's not possible to use the LocalSystem account for 
services
[1;32m*** Info:[0;0m that can change the user id without an explicit password
[1;32m*** Info:[0;0m (such as passwordless logins [e.g. public key 
authentication]
[1;32m*** Info:[0;0m via sshd) when having to create the user token from 
scratch.
[1;32m*** Info:[0;0m For more information on this requirement, see
[1;32m*** Info:[0;0m https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
[1;32m*** Info:[0;0m If you want to enable that functionality, it's required to 
create
[1;32m*** Info:[0;0m a new account with special privileges (unless such an 
account
[1;32m*** Info:[0;0m already exists). This account is then used to run these 
special
[1;32m*** Info:[0;0m servers.
[1;32m*** Info:[0;0m Note that creating a new user requires that the current 
account
[1;32m*** Info:[0;0m have Administrator privileges itself.
[1;32m*** Info:[0;0m This script plans to use 'cyg_server'.
[1;32m*** Info:[0;0m 'cyg_server' will only be used by registered services.
[1;35m***
 Query:[0;0m Create new privileged user account 
'WIN-FII6OQ85EQF\cyg_server' (Cygwin name: 
'win-fii6oq85eqf+cyg_server')? (yes/no) yes
[1;32m*** Info:[0;0m User 'win-fii6oq85eqf+cyg_server' has been created with 
password 'XXX'.
[1;32m*** Info:[0;0m If you change the password, please remember also to change 
the
[1;32m*** Info:[0;0m password for the installed services which use (or will 
soon use)
[1;32m*** Info:[0;0m the 'win-fii6oq85eqf+cyg_server' account.
passwd: unknown user win-fii6oq85eqf+cyg_server
[1;33m*** Warning:[0;0m Setting password expiry for user 
'win-fii6oq85eqf+cyg_server' failed!
[1;33m*** Warning:[0;0m Please check that password never expires or set it to 
your needs.
No user or group 'win-fii6oq85eqf+cyg_server' known.
[1;33m*** Warning:[0;0m Assigning the appropriate privileges to user 
'win-fii6oq85eqf+cyg_server' failed!
[1;31m*** ERROR:[0;0m