Re: Extra CR symbol from backticks on Cygwin 2.9.0

2017-09-11 Thread Nikolay Melekhin
Hi Eric,

Thanks! This option is what I am looking for.
However I cannot agree with you on bash behavior in Cygwin. Section of
command substitution in bash documentation says:

https://www.gnu.org/software/bash/manual/bash.html#Command-Substitution

"...with any trailing newlines deleted." That is why I expected that
bash should remove trailing newlines in command substitution results,
which are CRLF on Windows.
>From my point of view, bash in Cygwin should follow the same rule on
Linux and Windows: remove trailing newlines in command substitution.
So remove trailing CRLF on Windows.


Best regards,
Nikolay Melekhin

2017-09-12 1:00 GMT+03:00 Eric Blake :
> On 09/11/2017 04:27 PM, Nikolay Melekhin wrote:
>>
>> I'd expect that Cygwin must remove CRLF symbols from backtick results,
>
> You expected wrong - by default Cygwin does the same as Linux, which
> does NOT remove CR from command substitution (only LF).
>
>> but remove only LF symbol. It gets different results on Windows and
>> Linux. Result on Windows has additional CR symbol and for example
>> string comparision, which is working in Linux, fails in Windows.
>
> It is NOT a bug in Cygwin, but in your failure to sanitize your input.
> You'd get the same behavior on Linux if you pass in CR bytes.  That said,
>
>>
>> Is any kind of an option/setting which removes such CRs or it is a bug
>> in Cygwin?
>
> Read the release announcements: Cygwin bash DOES have an 'igncr' shell
> option (set -o igncr) that does exactly what you are asking for - it
> makes bash ignore CR characters in command substitutions and other places:
>
> https://cygwin.com/ml/cygwin-announce/2017-01/msg00047.html
>
> The option is not on by default, but exists because it is a common
> desire when you can't be bothered to otherwise sanitize CR out of your
> input stream.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.   +1-919-301-3266
> Virtualization:  qemu.org | libvirt.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



[ANNOUNCEMENT] emacs 25.3-1

2017-09-11 Thread Ken Brown
The following packages have been uploaded to the Cygwin distribution:

* emacs-25.3-1
* emacs-el-25.3-1
* emacs-X11-25.3-1
* emacs-w32-25.3-1

Emacs is a powerful, customizable, self-documenting, modeless text
editor.  Emacs contains special code editing features, a scripting
language (elisp), and the capability to read mail, news, and more
without leaving the editor.

This is an update to the latest upstream release.  It is an emergency
release to fix a security vulnerability.  See

  http://lists.gnu.org/archive/html/info-gnu-emacs/2017-09/msg0.html

for details.

CYGWIN NOTES


1. The emacs, emacs-w32, and emacs-X11 packages each provide an Emacs
   binary.  These are emacs-nox.exe, emacs-w32.exe, and emacs-X11.exe,
   respectively, in order of increasing priority.  The postinstall
   scripts use the 'alternatives' system to create a symlink
   /usr/bin/emacs that resolves to the highest-priority binary that
   you have installed.  Thus the command 'emacs' will start
   emacs-X11.exe if you've installed the emacs-X11 package; otherwise,
   it will start emacs-w32.exe if you've installed emacs-w32;
   otherwise, it will start emacs-nox.exe.  Similar remarks apply to
   emacsclient.

   If you have installed both emacs-w32 and emacs-X11 and prefer to
   give higher priority to emacs-w32, run the script

 /usr/bin/set-emacs-default-w32.sh

   You can later restore emacs-X11 as the default by running

 /usr/bin/set-emacs-default-X11.sh

2. Install emacs-X11 if you want to use the X11 GUI.  You can then
   type 'emacs&' in an xterm window, and emacs will start in a new
   window.

3. Install emacs-w32 if you want to use the native Windows GUI instead
   of X11.

4. If you use the Emacs Rmail library, consider installing Cygwin's
   mailutils package.  It provides a utility /usr/bin/movemail.exe
   that has more features and is more secure than the version provided
   by emacs (and installed under /usr/libexec/emacs).

   If you use the Emacs MH-E library, consider installing Cygwin's
   mailutils-mh package.  To use it, put the line

 (load "mailutils-mh")

   in your site-start.el or ~/.emacs file.

5. If you have sshd running and want to be able to run emacs-X11 from
   a remote machine, you need to enable X11 forwarding by adding the
   following line to /etc/sshd_config:

 X11Forwarding yes

   You might also need to have the cygserver service running.

6. The script /usr/bin/make-emacs-shortcut can be used to create a
   shortcut for starting emacs.  See
   /usr/share/doc/emacs/README.Cygwin for details.

Ken Brown
Cygwin's Emacs maintainer

--
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: Extra CR symbol from backticks on Cygwin 2.9.0

2017-09-11 Thread Eric Blake
On 09/11/2017 04:27 PM, Nikolay Melekhin wrote:
> 
> I'd expect that Cygwin must remove CRLF symbols from backtick results,

You expected wrong - by default Cygwin does the same as Linux, which
does NOT remove CR from command substitution (only LF).

> but remove only LF symbol. It gets different results on Windows and
> Linux. Result on Windows has additional CR symbol and for example
> string comparision, which is working in Linux, fails in Windows.

It is NOT a bug in Cygwin, but in your failure to sanitize your input.
You'd get the same behavior on Linux if you pass in CR bytes.  That said,

> 
> Is any kind of an option/setting which removes such CRs or it is a bug
> in Cygwin?

Read the release announcements: Cygwin bash DOES have an 'igncr' shell
option (set -o igncr) that does exactly what you are asking for - it
makes bash ignore CR characters in command substitutions and other places:

https://cygwin.com/ml/cygwin-announce/2017-01/msg00047.html

The option is not on by default, but exists because it is a common
desire when you can't be bothered to otherwise sanitize CR out of your
input stream.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature


Extra CR symbol from backticks on Cygwin 2.9.0

2017-09-11 Thread Nikolay Melekhin
Command line utilities in Windows add CRLF as new line symbol in an output.

For example:

echo "Windows"
TEST=`cmd /c "echo Win"`
echo " ${TEST} " | od -t x1
echo "CYGWIN"
TEST=`echo Win`
echo " ${TEST} " | od -t x1

Output:

Windows
000 20 57 69 6e 0d 20 0a
007
CYGWIN
000 20 57 69 6e 20 0a
006

I'd expect that Cygwin must remove CRLF symbols from backtick results,
but remove only LF symbol. It gets different results on Windows and
Linux. Result on Windows has additional CR symbol and for example
string comparision, which is working in Linux, fails in Windows.

Is any kind of an option/setting which removes such CRs or it is a bug
in Cygwin?


Best regards,
Nikolay Melekhin

--
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: Problems with building Perl modules after upgrade to g++ (GCC) 6.4.0

2017-09-11 Thread Jim Reisert AD1C
On Mon, Sep 11, 2017 at 11:51 AM, Achim Gratz wrote:

> Unless you know what you're doing and can navigate the inevitable
> obstacles, do not use cpan on Cygwin.

I have been building Perl packages for years without problems.  I use
WWW::Mechanize in several programs, and it has a lot of
pre-requisites.

>> SSLeay.xs:163:25: fatal error: openssl/err.h: No such file or directory
>>  #include 
>
> The most likely reason is that you do not have the *-devel package for
> openssl installed.

Missed that, thanks!


I don't know why Cygwin "upgraded" me from Perl 5.22 to Perl 5.24.  I
am building a new Cygwin installation from scratch (via setup) and it
has Perl 5.22 (as expected) and gcc 6.4.  I seem to remember this
problem happening in the not-too-distant past when gcc 6.x was
experimental, so I probably picked up the experimantal Perl 5.24 as
well.  I tried to roll back Perl from 5.24 -> 5.22 in my existing
Cygwin (non-experimental) installation but "perl --version" still
returned version 5.24

Anyway, I'll have a clean installation soon, I hope.

- Jim

-- 
Jim Reisert AD1C, , http://www.ad1c.us

--
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: Problems with building Perl modules after upgrade to g++ (GCC) 6.4.0

2017-09-11 Thread Achim Gratz
Jim Reisert AD1C writes:
> After upgrading to g++ (GCC) 6.4.0, I am being forced to
> reload/rebuild a bunch of Perl modules that had been working fine.  I
> had the same issue with GCC 6.3.  One module is particularly
> troublesome.  I have the openssl library installed.  This is with the
> 64-bit Cygwin.  I attached cygcheck.out

I don't know why that would be necessary or why the gcc update has
anything to do with it.

> # cpan install Net::SSLeay

Unless you know what you're doing and can navigate the inevitable
obstacles, do not use cpan on Cygwin.

> SSLeay.xs:163:25: fatal error: openssl/err.h: No such file or directory
>  #include 

The most likely reason is that you do not have the *-devel package for
openssl installed.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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: Problems with building Perl modules after upgrade to g++ (GCC) 6.4.0

2017-09-11 Thread Ken Brown

On 9/11/2017 12:33 PM, Jim Reisert AD1C wrote:

@INC contains:
/usr/lib/perl5/site_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/site_perl/5.24
/usr/lib/perl5/vendor_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/vendor_perl/5.24
/usr/lib/perl5/5.24/x86_64-cygwin-threads /usr/lib/perl5/5.24 .


It looks like you're using the test release of perl-5.24.  But the Perl 
modules in the Cygwin distro have been built for perl-5.22.  If you 
downgrade to perl-5.22.4-1, you should be OK.


Ken


--
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: Problems with building Perl modules after upgrade to g++ (GCC) 6.4.0

2017-09-11 Thread Jim Reisert AD1C
I now realize that Net::SSLeay and LWP::Protocol::https are both
pre-compiled modules that I can download from Cygwin.  But even after
re-installing LWP::Protocol::https, my Perl program still won't run:

Can't locate LWP/Protocol/https.pm in @INC (you may need to install
the LWP::Protocol::https module) (@INC contains:
/usr/lib/perl5/site_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/site_perl/5.24
/usr/lib/perl5/vendor_perl/5.24/x86_64-cygwin-threads
/usr/lib/perl5/vendor_perl/5.24
/usr/lib/perl5/5.24/x86_64-cygwin-threads /usr/lib/perl5/5.24 .) at
../scripts/QRZ_daily.pl line 17.

I don't know why it's not finding the module, and what this has to with gcc.

-- 
Jim Reisert AD1C, , http://www.ad1c.us

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



Problems with building Perl modules after upgrade to g++ (GCC) 6.4.0

2017-09-11 Thread Jim Reisert AD1C
After upgrading to g++ (GCC) 6.4.0, I am being forced to
reload/rebuild a bunch of Perl modules that had been working fine.  I
had the same issue with GCC 6.3.  One module is particularly
troublesome.  I have the openssl library installed.  This is with the
64-bit Cygwin.  I attached cygcheck.out

I would roll back to GCC 5.x but that doesn't appear to be an option in Setup.

# cpan install Net::SSLeay

Running Mkbootstrap for Net::SSLeay ()
chmod 644 "SSLeay.bs"
"/usr/bin/perl.exe" "-Iinc" "/usr/lib/perl5/5.24/ExtUtils/xsubpp"
-typemap "/usr/lib/perl5/5.24/ExtUtils/typemap" -typemap "typemap"
SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
gcc -c   -DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb
-O2 -pipe -Wimplicit-function-declaration
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.24.1-1
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.24.1=/usr/src/debug/perl-5.24.1-1
-fwrapv -fno-strict-aliasing -fstack-protector-strong
-D_FORTIFY_SOURCE=2 -DUSEIMPORTLIB -O3   -DVERSION=\"1.81\"
-DXS_VERSION=\"1.81\"
"-I/usr/lib/perl5/5.24/x86_64-cygwin-threads/CORE"   SSLeay.c
SSLeay.xs:163:25: fatal error: openssl/err.h: No such file or directory
 #include 
 ^
compilation terminated.
make: *** [Makefile:357: SSLeay.o] Error 1
  MIKEM/Net-SSLeay-1.81.tar.gz
  /usr/bin/make -- NOT OK

-- 
Jim Reisert AD1C, , http://www.ad1c.us


cygcheck.out
Description: Binary data

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