From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112035 invoked by alias); 7 Jun 2017 17:23:34 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 111629 invoked by uid 89); 7 Jun 2017 17:23:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1314, dear, Dear, H*c:application X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jun 2017 17:23:32 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 579F4C04B31F; Wed, 7 Jun 2017 17:23:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 579F4C04B31F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 579F4C04B31F Received: from [10.10.122.114] (ovpn-122-114.rdu2.redhat.com [10.10.122.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3A59171F9; Wed, 7 Jun 2017 17:23:34 +0000 (UTC) Subject: Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts To: cygwin@cygwin.com, michael.soegtrop@intel.com References: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: Date: Wed, 07 Jun 2017 17:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2euMpSWrEreoAa18ipWkxomA0Mju36D70" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00044.txt.bz2 --2euMpSWrEreoAa18ipWkxomA0Mju36D70 Content-Type: multipart/mixed; boundary="f1PXNDcf4twEwCM9e7r97KbhMVSmtGCBw"; protected-headers="v1" From: Eric Blake To: cygwin@cygwin.com, michael.soegtrop@intel.com Message-ID: Subject: Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts References: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> --f1PXNDcf4twEwCM9e7r97KbhMVSmtGCBw Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-length: 1243 On 06/07/2017 11:23 AM, Soegtrop, Michael wrote: > Dear Cygwin Team, >=20 > in the latest version of cygwin with sed-4.4-1.tar.bz2 the behavior of se= d regarding handling CR-LF sequences changed. And the change was documented (don't you read the release notes?) https://cygwin.com/ml/cygwin-announce/2017-02/msg00036.html > I would say that the documented behavior in both versions is that they re= place CR-LF with LF, No, the documented behavior is that CR-LF is converted to LF only for text-mounted files; but pipelines are default binary-mounted. If you want to strip CR from a pipeline, then make it explicit. > var=3D$( prog | sed .) Rewrite that to var=3D$( prog | tr -d '\r' | sed .) > Is this considered a bug in sed 4.4-1 or is the old behavior and the -b o= ption considered deprecated and it was just forgotten to remove the documen= tation for the -b option? The -b option still works (forcing binary mode when you otherwise have a text mount); what changed was that the default behavior of pipelines is now binary instead of text, as binary is a better default mode for Linux compatibility. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --f1PXNDcf4twEwCM9e7r97KbhMVSmtGCBw-- --2euMpSWrEreoAa18ipWkxomA0Mju36D70 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJZODaWAAoJEKeha0olJ0NqHf0H+wbKA9a5bxcrs/yL+S2Qi4vg B0pXckQhVwo59Vh9MQamRb7b0UFTvZTANheKLfDLgJlBxYp5BPyODut54n8rfGuJ 0ikS0+r9XUqLPjdrICUMgPfTKjaVgGRwCow2OLmwqZy3CELksS9iS28hdT9sTwuO aBSLCCklufQtffOwKPxuebAy0dSAp50o4k9fbGVkU55uitCW58Nsebeb+gitj+l6 EnCdapLpwx0KQ63nScRHWjDvC27UfRK4zfrKrL3erAw8woeZUPDt5SJpXfEW4F4j g9BaQfoUaJHNCmv7W1skEENVgmDmBUatiJ2G0+H3IU7aq7Xb2GrJTEOcOJwWZFY= =YeBW -----END PGP SIGNATURE----- --2euMpSWrEreoAa18ipWkxomA0Mju36D70--