Re: Package request: fswatch

2017-02-13 Thread Brian Inglis
On Mon, 13 Feb 2017 12:30:29 -0800, Gerald Burns wrote:
> Excuse me for being a total noob, but I'm unsure of how to reply to a
> mailing list.

Just Reply to List if your email client offers that, otherwise use Reply 
and specify the list email address as in your original post.

> Regarding xtail being the same as fswatch, I believe they are
> different. It sounds like xtail lets you physically see changes with
> your eyeballs, where as fswatch is the watcher and can notify other
> programs when changes occur.

Gives you the name and content so you have more info to decide what you 
want to do.

> In my particular scenario we have written a little script that uses
> fswatch to monitor a directory, and when any changes occur they are
> rsync'd to a remote server.

For that use case, fswatch may be a better choice.
You could just run an rsync command regularly in a cron job.

> Thanks, and sorry again if this is bad etiquette.
> https://cygwin.com/ml/cygwin/2017-02/msg00171.html

Breaks proper thread message header references.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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: can setup.exe uninstall all X11 packages automatically?

2017-02-13 Thread Brian Inglis
On 2017-02-13 14:19, Hans-Bernhard Bröker wrote:
> Am 13.02.2017 um 18:56 schrieb Leo Lagos:
> 
>> I executed setup.exe, tried to do this with just one check (uninstall
>> x11-org-server, I think I did), but it only uninstalled that package
>> alone!
>>
>> I expected setup.exe to be smart enough to tell me "if you uninstall
>> this X package, these others W, Y, Z,etc., will also be
>> uninstalled"... but no...
>>
>> So, is setup.exe smart enough to do this? Or do I have to know exactly
>> which packages to uninstall, one by one??? :(
> 
> Got to the "Category" view, find the X11 category, single-click the
> circle-of-arrows icon a couple times until it reads: Uninstall. You
> may have to blanket-uninstall some other categories, too (KDE, Xfce,
> GNOME, LXDE, ...) for this to work. GO.

Beat me to it! 

You may want to inspect the individual entries to be Uninstalled and 
check some of those to Keep e.g. fonts, other not strictly X packages.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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: [ANNOUNCEMENT] Updated: dash-0.5.8-3

2017-02-13 Thread Thomas Wolff

Am 31.01.2017 um 16:32 schrieb Corinna Vinschen:

On Jan 31 16:01, Houder wrote:

On Tue, 31 Jan 2017 14:16:16, Corinna Vinschen wrote:

[snip]


I'm not quite sure yet but apparently the problem is in the handling of
VERASE in the termios implementation.  In cooked mode it fills a char
buffer with what has been typed.  The code doesn't know if the bytes in
the buffer are UTF-8 chars or just random bytes.  So VERASE erases
exactly one byte, which means, in case of UTF-8 chars it only erases the
last byte of of a mulitbyte character.

...

Ok, here's what happens on Linux:  The termios code support a flag
IUTF8.  This flag determines if the termios code checks for UTF8
characters in the input when performing an ERASE.  It checks if the
IUTF8 flag is set and if so, it checks in a loop if the just erased byte
is a UTF-8 continuation character.  If so, it erases another byte.

Agreed. One byte or more, depending on the "character" ... (which is
not a problem in case of UTF-8 encoding -- continuation bit).

Of course, the terminal driver must receive the characters encoded in UTF-8.

...

... It's the termios implementation
inside Cygwin.  I created a patch introducing the IUTF8 flag as on Linux
as well as a code snippet trying to remove entire utf-8 characters from
the input if the IUTF8 flag is set.  And it's set now by default since
we default to UTF-8 anyway.

Thomas, you may want to check for the IUTF8 flag in upcoming mintty
versions and unset it if character set configured in the mintty options
dialog is != UTF-8.
So the flag is always set initially? Also on Linux? Does it (on Linux) 
also have an effect for non-UTF-8 multibyte encodings?
And cannot the Cygwin DLL set the flag to match the locale setting when 
it was invoked?
I can (and will if appropriate) handle the flag in mintty as needed, but 
what if someone calls LC_ALL=.other_encoding dash later within the 
terminal session? I guess the more consistent solution would be to 
handle this in the cygwin DLL.

--
Thomas

--
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: can setup.exe uninstall all X11 packages automatically?

2017-02-13 Thread Hans-Bernhard Bröker

Am 13.02.2017 um 18:56 schrieb Leo Lagos:


I executed setup.exe, tried to do this with just one check (uninstall
x11-org-server, I think I did), but it only uninstalled that package
alone!

I expected setup.exe to be smart enough to tell me "if you uninstall
this X package, these others W, Y, Z,etc., will also be
uninstalled"... but no...

So, is setup.exe smart enough to do this? Or do I have to know exactly
which packages to uninstall, one by one??? :(


Got to the "Category" view, find the X11 category, single-click the 
circle-of-arrows icon a couple times until it reads: Uninstall.  You may 
have to blanket-uninstall some other categories, too (KDE, Xfce, GNOME, 
LXDE, ...) for this to work.  GO.




--
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



[ANNOUNCEMENT] Updated: wget-1.19.1-1

2017-02-13 Thread Eric Blake (cygwin)
A new release of wget, 1.19.1-1, will be available soon for download
from your favorite mirror, leaving 1.19-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

--
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.19.1-1

2017-02-13 Thread Eric Blake (cygwin)
A new release of wget, 1.19.1-1, will be available soon for download
from your favorite mirror, leaving 1.19-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



[ANNOUNCEMENT] Updated: libreadline7-7.0.3-3, libreadline-devel-7.0.3-3

2017-02-13 Thread Eric Blake (cygwin)
A new release of readline, 7.0.3-3, has been uploaded and will soon
reach a mirror near you.  The previous version is now 7.0.1-2 (which was
experimental, but never current; but the only difference from 7.0.1-1
was handling of pselect which is now fixed in cygwin 2.7.0-1).

NEWS:
=
This is a rebuild to fold in two new official upstream patches, and to
build against newer cygwin1.dll that fixes handling of alt-numkeypad
extended character entry in a windows console.

Remember, you must not have any bash or /bin/sh instances running when
you upgrade the readline package.  This release requires cygwin-2.7.0-1
or later.  See also the upstream documentation in /usr/share/doc/readline/.

DESCRIPTION:

The readline library will read a line from the terminal and return it,
allowing the user to edit the line with emacs or vi editing keys.  It
also allows a history feature, for editing previous entries, making
command line interfaces easier-to-use and more intuitive.

libreadline7 provides the .dlls needed for readline and history
expansion for dynamic linking in other programs, including bash and gdb;
it is required for a minimal cygwin installation. libreadline-devel
provides the documentation and the static libraries required for static
linking; you should only need it if you plan on compiling an application
that links with -lreadline or -lhistory.

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
'libreadline7' in the 'Base' category (it should already be selected),
or 'libreadline-devel' in the 'Devel' 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 readline package maintainer

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

--
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: libreadline7-7.0.3-3, libreadline-devel-7.0.3-3

2017-02-13 Thread Eric Blake (cygwin)
A new release of readline, 7.0.3-3, has been uploaded and will soon
reach a mirror near you.  The previous version is now 7.0.1-2 (which was
experimental, but never current; but the only difference from 7.0.1-1
was handling of pselect which is now fixed in cygwin 2.7.0-1).

NEWS:
=
This is a rebuild to fold in two new official upstream patches, and to
build against newer cygwin1.dll that fixes handling of alt-numkeypad
extended character entry in a windows console.

Remember, you must not have any bash or /bin/sh instances running when
you upgrade the readline package.  This release requires cygwin-2.7.0-1
or later.  See also the upstream documentation in /usr/share/doc/readline/.

DESCRIPTION:

The readline library will read a line from the terminal and return it,
allowing the user to edit the line with emacs or vi editing keys.  It
also allows a history feature, for editing previous entries, making
command line interfaces easier-to-use and more intuitive.

libreadline7 provides the .dlls needed for readline and history
expansion for dynamic linking in other programs, including bash and gdb;
it is required for a minimal cygwin installation. libreadline-devel
provides the documentation and the static libraries required for static
linking; you should only need it if you plan on compiling an application
that links with -lreadline or -lhistory.

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
'libreadline7' in the 'Base' category (it should already be selected),
or 'libreadline-devel' in the 'Devel' 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 readline package maintainer

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



[ANNOUNCEMENT] Re: Updated: coreutils-8.26-2

2017-02-13 Thread Eric Blake (cygwin)
On 02/03/2017 01:46 PM, Eric Blake (cygwin) wrote:
> A new release of coreutils, 8.26-2, has been uploaded, and will be
> available soon from your favorite mirror.  The new release is
> experimental, and REQUIRES the use of the experimental cygwin-2.7.0-0.1
> (or better) release; the current version remains 8.26-1 for
> compatibility with the current stable cygwin dll; once the next cygwin
> release occurs, I will promote 8.26-2 to current with another
> announcement email.

Now that cygwin 2.7.0-1 is available, I've promoted coreutils 8.26-2 to
current.

-- 
Eric Blake
volunteer cygwin coreutils package maintainer

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

--
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: Updated: coreutils-8.26-2

2017-02-13 Thread Eric Blake (cygwin)
On 02/03/2017 01:46 PM, Eric Blake (cygwin) wrote:
> A new release of coreutils, 8.26-2, has been uploaded, and will be
> available soon from your favorite mirror.  The new release is
> experimental, and REQUIRES the use of the experimental cygwin-2.7.0-0.1
> (or better) release; the current version remains 8.26-1 for
> compatibility with the current stable cygwin dll; once the next cygwin
> release occurs, I will promote 8.26-2 to current with another
> announcement email.

Now that cygwin 2.7.0-1 is available, I've promoted coreutils 8.26-2 to
current.

-- 
Eric Blake
volunteer cygwin coreutils package maintainer

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


Re: cygpath -w converts relative paths to absolute windows paths

2017-02-13 Thread Thomas Wolff

Am 13.02.2017 um 16:16 schrieb Corinna Vinschen:

On Feb 12 18:38, Thomas Wolff wrote:

Am 12.02.2017 um 12:23 schrieb Corinna Vinschen:

On Feb  7 14:35, Roger Qiu wrote:

Hi,

I've found that `cygpath --windows '../` will give back an absolute windows
path.

I thought this would only happen if you provide the `--absolute` flag, or
when the path is a special cygwin path.

But this occurs just for normal directories.

I have come across a situation where I need to convert ntfs symlinks to unix
symlinks and back. Sometimes these symlinks have relative paths them. Now by
using cygpath --windows, I get back absolute paths, which means the
integrity of the symlink isn't preserved.

Can `cygpath --windows '../directory'` give back `..\directory` for paths
aren't special cygwin paths? These relative backslashes are supported in
Windows right now.

Not easily.  All paths are evaluated as absolute paths inside Cygwin.
The result of the path conversion is always an absolute path. A relative
path is generated from there by checking if the path prefix in POSIX
notation is identical to the current working directory.  If not, the
path stays absolute.  Naturally, if you use a "..", the resulting path
does not match the CWD anymore, so you're out.

How about converting getcwd(), too, and comparing that?

Converting to what?  And how's that different from what I describe above?
I was looking at path.cc, function mkrelpath, and (without tracing 
anything) assumed this would be the relevant function and had the 
impression that, when comparing path_prefix_p (cwd_win32, path, ...), 
path might be "normalized" (resolving links and folding ".." components) 
while cwd_win32 might not. If that's the case, it might be sufficient to 
"normalize" cwd_win32 as well.



Btw., did you see https://cygwin.com/ml/cygwin/2017-01/msg00404.html?

No, I hadn't, sorry. Will respond there.
--
Thomas

--
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: [ANNOUNCEMENT] Updated [test]: sed-4.4-1

2017-02-13 Thread Eric Blake
On 02/12/2017 05:32 AM, Corinna Vinschen wrote:
> I understand the desire but it's s a pretty tricky problem.  awk is
> used to manipulate text input in the first place so it treats all
> input, files as well as stdin, as text.  So, shall we drop this
> behaviour for files only?  Or for stdin as well?  How many existing
> setups are bound to fail after a change?

I think part of the confusion is that POSIX states that awk behavior is
only well-defined on "text files" - but that is the POSIX definition of
a text file (no invalid characters in multibyte encoding, no over-long
lines, no NUL bytes, trailing newline), and not strictly related to the
Windows definition of text file (one with CRLF line endings).  But
remember, just because POSIX says that awk is only required to be
well-behaved on text files does not mean that awk cannot be usefully
used on non-text files, and anything we do that silently converts binary
data into corrupted text, when a binary mount was requested, gets in the
way of that usage pattern.

As long as we aren't using fopen("rb") to force binary mode, but rather
just fopen("r") to let the mount mode rule, we should be okay for any
file that we open.  As for stdin, ideally stdin is either from a file
(where the shell opened it according to mount mode) or from a pipeline
(where presumably the other end of the pipe opened the file in the
correct mount mode, or where the user can inject a d2u into the pipeline
if they want CR stripped).

Yes, it means that any existing users that were lazily relying on the
forced text mode to automatically strip CRs will now have to fix their
scripts to add a d2u invocation, but I already hit some of that fallout
when I changed bash to quit forcing text mode.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1

2017-02-13 Thread Eric Blake
On 02/13/2017 09:53 AM, cyg Simple wrote:
> On 2/13/2017 9:14 AM, Nellis, Kenneth (Conduent) wrote:
>> From: Steven Penny  
>>> Perhaps I am missing something, but cant all that be said about Sed too? I
>>> just cant see a situation where we are justified changing one and not the
>>> other. They should either both strip carriage returns or neither.
>>
>> How about grep?
>>
>> $ printf 'hello\r\nworld\r\n' | grep hello | od -An -tcx1
>>h   e   l   l   o  \n
>>   68  65  6c  6c  6f  0a
>> $
>>
>> Are there others?
>>
>> (BTW, I support the change.)
>>
> 
> All pipe handles should be binary or at least an option to make it that
> way.  The file handles should be bound to the mounted mode.

I'm in favor of reducing special cases of FORCED text mode. It's great
on text mounts, but text mounts are discouraged for a reason (slower
computing, surprising results when seeking), and I recently patched bash
to quit forcing text mode (bash 4.3.42-4).

Pipes are indeed binary mode by default (and should stay that way), so
even if you have a long pipeline chain:

cmd1 < file_in | cmd2 | cmd3 | cmd4 > file_out

if file_in and file_out are mounted on text mounts, then cmd1 won't see
any carriage returns, so neither will cmd2, cmd3, or cmd4, and finally
cmd4 writes in text mode back to file_out.

But when you are operating on a binary mount, and WANT carriage returns
to be preserved, forcing a text mount at any point in the chain corrupts
all later points in the chain.

There's a big difference between using "rt" to force text mode (which is
what I killed in this sed release), using "rb" to force binary mode
(which is what I use in tar, because tar MUST preserve binary data), and
using "r" (which is what sed now uses) to let the mount point decide
whether CR are important.

So I'd be in favor of a patch to awk dropping forced text mode on binary
mounts.

And I'll look into fixing grep to quit misbehaving as well.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


can setup.exe uninstall all X11 packages automatically?

2017-02-13 Thread Leo Lagos
Hi,

I want to remove all X11 related since it's no longer something I really use.

I executed setup.exe, tried to do this with just one check (uninstall
x11-org-server, I think I did), but it only uninstalled that package
alone!

I expected setup.exe to be smart enough to tell me "if you uninstall
this X package, these others W, Y, Z,etc., will also be
uninstalled"... but no...

So, is setup.exe smart enough to do this? Or do I have to know exactly
which packages to uninstall, one by one??? :(

Regards,

--
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: cygpath

2017-02-13 Thread Nellis, Kenneth (Conduent)
From: Andrey Repin 
> See 
> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars

This reference says:

> All of the above characters, except for the backslash, are converted to 
> special UNICODE characters in the range 0xf000 to 0xf0ff (the "Private 
> use area") when creating or accessing files.

It does not say *how* they are converted. In fact, by observation, 
they appear to be converted by having 0xF000 added to their code points.
Perhaps this text could be updated accordingly.

I propose the following:

> All of the above characters, except for the backslash, are converted to 
> special UNICODE characters in the range 0xf000 to 0xf0ff (the "Private 
> use area") when creating or accessing files by adding 0xf000 to the
> forbidden characters' code points.

--Ken Nellis


Re: Package request: fswatch

2017-02-13 Thread Brian Inglis
On 2017-02-13 08:02, Andrew Schulman wrote:
>> It looks like back in Sept. of 2015 fswatch added Windows support:
>> https://github.com/emcrisostomo/fswatch
>> I wondered if anyone would like to take a stab at adding fswatch
>> to cygwin (since I'm totally new to it).
> Seems useful, and builds OOTB in Cygwin. It's limited in Windows in
> that it will only (recursively) watch directories, not files, and
> unfortunately the app doesn't warn you about that if you give it a
> file path instead of a directory path - it just does nothing. Still
> interesting.

Duplicates xtail which is a well known sysadmin tool used to watch a 
bunch of logs or files at once and works on directories and files 
(apt is alias for apt-cyg): 

$ apt show xtail
xtail
sdesc: "Extended tail that also works on truncated files and directories"
ldesc: "Watch the growth of files. It's like running a tail -f on
a bunch of files at once. It notices if a file is
truncated and starts from the beginning. You can specify
both filenames and directories on the command line. If
you specify a directory, it watches all the files in that
directory. It will notice when new files are created (and
start watching them) or when old files are deleted (and
stop watching them)."
category: Utils
requires: cygwin
version: 2.1-1
install: x86_64/release/xtail/xtail-2.1-1.tar.xz 31844 ...
source: x86_64/release/xtail/xtail-2.1-1-src.tar.xz 97960 ...

Windows console command openfiles /query /v shows open files.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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: [ANNOUNCEMENT] Updated [test]: sed-4.4-1

2017-02-13 Thread cyg Simple
On 2/13/2017 9:14 AM, Nellis, Kenneth (Conduent) wrote:
> From: Steven Penny  
>> Perhaps I am missing something, but cant all that be said about Sed too? I
>> just cant see a situation where we are justified changing one and not the
>> other. They should either both strip carriage returns or neither.
> 
> How about grep?
> 
> $ printf 'hello\r\nworld\r\n' | grep hello | od -An -tcx1
>h   e   l   l   o  \n
>   68  65  6c  6c  6f  0a
> $
> 
> Are there others?
> 
> (BTW, I support the change.)
> 

All pipe handles should be binary or at least an option to make it that
way.  The file handles should be bound to the mounted mode.

-- 
cyg Simple

--
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: cygpath -w converts relative paths to absolute windows paths

2017-02-13 Thread Corinna Vinschen
On Feb 12 18:38, Thomas Wolff wrote:
> Am 12.02.2017 um 12:23 schrieb Corinna Vinschen:
> > On Feb  7 14:35, Roger Qiu wrote:
> > > Hi,
> > > 
> > > I've found that `cygpath --windows '../` will give back an absolute 
> > > windows
> > > path.
> > > 
> > > I thought this would only happen if you provide the `--absolute` flag, or
> > > when the path is a special cygwin path.
> > > 
> > > But this occurs just for normal directories.
> > > 
> > > I have come across a situation where I need to convert ntfs symlinks to 
> > > unix
> > > symlinks and back. Sometimes these symlinks have relative paths them. Now 
> > > by
> > > using cygpath --windows, I get back absolute paths, which means the
> > > integrity of the symlink isn't preserved.
> > > 
> > > Can `cygpath --windows '../directory'` give back `..\directory` for paths
> > > aren't special cygwin paths? These relative backslashes are supported in
> > > Windows right now.
> > Not easily.  All paths are evaluated as absolute paths inside Cygwin.
> > The result of the path conversion is always an absolute path. A relative
> > path is generated from there by checking if the path prefix in POSIX
> > notation is identical to the current working directory.  If not, the
> > path stays absolute.  Naturally, if you use a "..", the resulting path
> > does not match the CWD anymore, so you're out.
> How about converting getcwd(), too, and comparing that?

Converting to what?  And how's that different from what I describe above?

Btw., did you see https://cygwin.com/ml/cygwin/2017-01/msg00404.html?


Thanks,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: Package request: fswatch

2017-02-13 Thread Andrew Schulman
> It looks like back in Sept. of 2015 fswatch added Windows support:
> https://github.com/emcrisostomo/fswatch
> 
> I wondered if anyone would like to take a stab at adding fswatch to
> cygwin (since I'm totally new to it).

Seems useful, and builds OOTB in Cygwin. It's limited in Windows in that it will
only (recursively) watch directories, not files, and unfortunately the app
doesn't warn you about that if you give it a file path instead of a directory
path - it just does nothing. Still interesting.


--
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: [ANNOUNCEMENT] Updated [test]: sed-4.4-1

2017-02-13 Thread Nellis, Kenneth (Conduent)
From: Steven Penny  
> Perhaps I am missing something, but cant all that be said about Sed too? I
> just cant see a situation where we are justified changing one and not the
> other. They should either both strip carriage returns or neither.

How about grep?

$ printf 'hello\r\nworld\r\n' | grep hello | od -An -tcx1
   h   e   l   l   o  \n
  68  65  6c  6c  6f  0a
$

Are there others?

(BTW, I support the change.)

--Ken Nellis

--
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



Package request: fswatch

2017-02-13 Thread Gerald Burns
It looks like back in Sept. of 2015 fswatch added Windows support:
https://github.com/emcrisostomo/fswatch

I wondered if anyone would like to take a stab at adding fswatch to
cygwin (since I'm totally new to it).

--
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