From MAILER-DAEMON Thu Oct 05 10:11:14 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e06rq-0007Vk-GW
	for mharc-coreutils@gnu.org; Thu, 05 Oct 2017 10:11:14 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58721)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rehman0074@gmail.com>) id 1e06nv-00045n-KS
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:07:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rehman0074@gmail.com>) id 1e06ns-0006Ew-06
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:07:11 -0400
Received: from mail-pg0-x236.google.com ([2607:f8b0:400e:c05::236]:45394)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <rehman0074@gmail.com>)
	id 1e06nr-0006Ee-O2
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:07:07 -0400
Received: by mail-pg0-x236.google.com with SMTP id b192so5220413pga.2
	for <coreutils@gnu.org>; Thu, 05 Oct 2017 07:07:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to; 
	bh=kv/dEjZwsziIpzNtxHn5VBZZd1x4vQi0IXVqxbvkGQ0=;
	b=pt1D3sBIUE9Q7FW43Z07Zgdg5K7dMDx+DNJC7EQZAEE3to3BdE/7ie3vVa1WtagLJ+
	lr8/qfN6wvMpiMgBbh4H0BIi1IiC70OcHNPsQn+A/7Ou6/l8va4vlQ6V5H4aY2Bd7lpG
	SiA5eNFkyTi/urm2d1sUK7Qv2Q3Z6i6q6UeVdD7RZmMMB72bTQ8ba1/o2kYWuIkkm74m
	Ikr+G/e8HNnqoMGSp4NRafABgkXiAi/OICESy/GGYNLkoEQbXtnAhp36oxDyKkXRwcED
	2RW21vE8P+BqLAtJy05QXLq0S13y5Y1FDghyo2Zwv43BSXOqLNiNqNnKircVHUApKLAB
	d32w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to;
	bh=kv/dEjZwsziIpzNtxHn5VBZZd1x4vQi0IXVqxbvkGQ0=;
	b=hrVDNACWf3p+3KzpwAOt4XbZUlid8imDlI0BqbeAMr4bHg7eu6NJnsTqIn2Q4CAflB
	RtvXiuPi62wFUN29pQOnVVQ0QfmsJARDjLhAJJujpmAcvi+Y3E9rzgGNhBZ6d2OxQRmX
	r9uZSykq6SbHv4qPVdg/jl6h7A9/O/KA//CgEDKVgpsBjYIZy6wjTKqp262zOdF8PAYp
	sXzPxiM+V4mK+lD8iIDUWrhQL5a0LsOGMRWc3nnwzN0l+8PF7VAaiQln/Yp3pKDPhMOI
	AS0cZrxSlM+gmnEzyYU+iDnNvyJkOXSlBaDBoxibPW0JpaCthqEbeRMTtVvBZuUYsbvM
	bd4w==
X-Gm-Message-State: AMCzsaVZN0ovIMOoKVWbr+XF/zGz2f2EgumStvGPP0Ee5sGxP+uE7Sgx
	7f6JZJRZV/AMB7ICVa87IhWF2O5DVjbOgprO4xw=
X-Google-Smtp-Source: AOwi7QBQCeHhNDLRU8QwiS+TGRzC2BvBGw0aWdBXmNy5QMcEuI/LBK2KMpRg1dFg4QOEHEGpvfZmNOZwl7+KWfkWq/U=
X-Received: by 10.98.77.66 with SMTP id a63mr12682633pfb.281.1507212426204;
	Thu, 05 Oct 2017 07:07:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.160.195 with HTTP; Thu, 5 Oct 2017 07:07:05 -0700 (PDT)
Received: by 10.100.160.195 with HTTP; Thu, 5 Oct 2017 07:07:05 -0700 (PDT)
In-Reply-To: <CAAGotp1OcURmWbbOHxifnSeyhOXfs7WXtu=zef1RYZ9w9__kRw@mail.gmail.com>
References: <CAAGotp2B7-4mvF94Q4mYYuq8FGSDnXTOG==T4mHB0H-XVJ+cDA@mail.gmail.com>
	<CAAGotp1OcURmWbbOHxifnSeyhOXfs7WXtu=zef1RYZ9w9__kRw@mail.gmail.com>
From: Abdur Rehman <rehman0074@gmail.com>
Date: Thu, 5 Oct 2017 19:07:05 +0500
Message-ID: <CAAGotp243VKVNrQPb7h4gmkiq082oyjA15vBKJHqZ0RYpcp5tA@mail.gmail.com>
Subject: gnu wireless device not detected
To: coreutils@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400e:c05::236
X-Mailman-Approved-At: Thu, 05 Oct 2017 10:11:12 -0400
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Oct 2017 14:07:15 -0000

hi

i am using gnu in mobile and gnu is not detecting mobile wifi device and
always says that please connect the device or install drivers kindly help

thanks

From MAILER-DAEMON Thu Oct 05 10:35:44 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e07FY-00022E-1b
	for mharc-coreutils@gnu.org; Thu, 05 Oct 2017 10:35:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1e07FQ-0001yA-FI
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:35:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1e07FM-0000hV-KT
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:35:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:57200)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1e07FM-0000gc-BU
	for coreutils@gnu.org; Thu, 05 Oct 2017 10:35:32 -0400
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
	[10.5.11.14])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id 6365F72AE1;
	Thu,  5 Oct 2017 14:35:31 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6365F72AE1
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.120.2] (ovpn-120-2.rdu2.redhat.com [10.10.120.2])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 708DA5D9C0;
	Thu,  5 Oct 2017 14:35:30 +0000 (UTC)
Subject: Re: gnu wireless device not detected
To: Abdur Rehman <rehman0074@gmail.com>, coreutils@gnu.org
References: <CAAGotp2B7-4mvF94Q4mYYuq8FGSDnXTOG==T4mHB0H-XVJ+cDA@mail.gmail.com>
	<CAAGotp1OcURmWbbOHxifnSeyhOXfs7WXtu=zef1RYZ9w9__kRw@mail.gmail.com>
	<CAAGotp243VKVNrQPb7h4gmkiq082oyjA15vBKJHqZ0RYpcp5tA@mail.gmail.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <03f741a8-9e6d-3316-56af-784a672b7fa0@redhat.com>
Date: Thu, 5 Oct 2017 09:35:29 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <CAAGotp243VKVNrQPb7h4gmkiq082oyjA15vBKJHqZ0RYpcp5tA@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="g67GInIMSiVSIA7Oi740rcVdVGMArCTWX"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.38]);
	Thu, 05 Oct 2017 14:35:31 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Oct 2017 14:35:42 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--g67GInIMSiVSIA7Oi740rcVdVGMArCTWX
From: Eric Blake <eblake@redhat.com>
To: Abdur Rehman <rehman0074@gmail.com>, coreutils@gnu.org
Message-ID: <03f741a8-9e6d-3316-56af-784a672b7fa0@redhat.com>
Subject: Re: gnu wireless device not detected
References: <CAAGotp2B7-4mvF94Q4mYYuq8FGSDnXTOG==T4mHB0H-XVJ+cDA@mail.gmail.com>
 <CAAGotp1OcURmWbbOHxifnSeyhOXfs7WXtu=zef1RYZ9w9__kRw@mail.gmail.com>
 <CAAGotp243VKVNrQPb7h4gmkiq082oyjA15vBKJHqZ0RYpcp5tA@mail.gmail.com>
In-Reply-To: <CAAGotp243VKVNrQPb7h4gmkiq082oyjA15vBKJHqZ0RYpcp5tA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 10/05/2017 09:07 AM, Abdur Rehman wrote:
> hi
>=20
> i am using gnu in mobile and gnu is not detecting mobile wifi device an=
d
> always says that please connect the device or install drivers kindly he=
lp

Thanks for the report; however, you've reached the coreutils list, which
does not have anything to do with wifi software.  You'll probably have
better response by contacting a user's group specific to your device, or
the authors of the software you are having difficulty with.

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


--g67GInIMSiVSIA7Oi740rcVdVGMArCTWX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlnWQzEACgkQp6FrSiUn
Q2qjIAf+K7Qr1oirABtkhq+11mWiuTmyDdQjD3RxdhBwv1ThxKqgjASgwtcxuWGu
5hnzv1RExf/PXirB/t18UrxRjqvvlxWFTgge9rouelAmJzUZxxXx3ZWA9AAs6CzZ
1yseyv96t6Te7rpAl7o1u45GimHL4EAPNwEftsxbFioce7w/7CamIJSTBNKHpLr5
bsNIrD8CTVshkYb1NI4YjliUkqO0E6/0SyTWh6ZLy+KbSm+HPGHl3YM2Ez4cWAAR
0PmPYLWCRGv+GFmVQhLnB9NmGNFaCT0jtoHBtB9kk5XMsy8SJDLYRuIDv3zCSClr
rqDgSC587xBLMXhsZkCSvA6/XFdcQQ==
=3RId
-----END PGP SIGNATURE-----

--g67GInIMSiVSIA7Oi740rcVdVGMArCTWX--


From MAILER-DAEMON Sun Oct 08 18:14:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e1Jpl-0004bW-H3
	for mharc-coreutils@gnu.org; Sun, 08 Oct 2017 18:14:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46071)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.pruitt@gmail.com>) id 1e1HIk-0006o9-3c
	for coreutils@gnu.org; Sun, 08 Oct 2017 15:31:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eric.pruitt@gmail.com>) id 1e1HIh-0007PU-0W
	for coreutils@gnu.org; Sun, 08 Oct 2017 15:31:50 -0400
Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:55087)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <eric.pruitt@gmail.com>)
	id 1e1HIg-0007Od-Rz
	for coreutils@gnu.org; Sun, 08 Oct 2017 15:31:46 -0400
Received: by mail-pf0-x235.google.com with SMTP id m28so6836385pfi.11
	for <coreutils@gnu.org>; Sun, 08 Oct 2017 12:31:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=date:from:to:subject:message-id:mime-version:content-disposition
	:pgp-key:user-agent;
	bh=sr+wxi5LC25+MN6/trxLGG+y7DUWt2o0S1eInbKLIGY=;
	b=BfdXQdbFIIDa898OejrggK3aaV+Vubr4eTPAKiBRgpCpfFOyg/Tiz3wG94Us/Mol6t
	jmB7SXgSZeZGJ3bGI1o2Uy3wS1EGr2aTrXOhB7tE1+kVR1IxzIPeD69sK129nAsZYrJy
	kb2E0UrPj3cNm/3mysOGzyYseRbbL8TY/Yf+Xzor2JhYNnnM+IWDczZnIgUmVT2gk4gQ
	OtmzAV5nxdI5j2wthWXO+SPhWtKRcO6G7iN3mTQOiEOGBg4x/J87OMBZ6xddNwuSnxgb
	J5T6fniB+bHO5xT9ZCBO8EI7D5oBOOEwNxA5z0lyIXHR1DjNexpYrsx1nTUkKAweK9Ck
	5Ibw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:date:from:to:subject:message-id:mime-version
	:content-disposition:pgp-key:user-agent;
	bh=sr+wxi5LC25+MN6/trxLGG+y7DUWt2o0S1eInbKLIGY=;
	b=hCwPaDb/NW9D+EEMu7JV03O1P2WPtiVgnWftjUsmEYp0Hqk/UOn9mGJnFVBV8kk2iC
	1dXHaxcq6Ch9mtOUyts031cyMPdBXUgFrSK4HHO0RX5NgxQOecnnAQTZSoJbdb0p49dK
	x7Hm6caNNq1MFgdUKmgeI0xxjq7hIzRT8hp7Ti7iWDaYJlrJMkqOwnHBZsnqaR1FaDzv
	k9itjLM89b5ccEju7Uwq/SJ432PHVp2YgKmapN3YqlyYxxmE8Ay+T4VdWZiwaR4uoCA2
	MnYxUxnItxkMPbpZHZUMMQL5z2ItMoPG5NdDl9fCcqGR/CMvRTLYYlK07oEv85rZuvhq
	5x4g==
X-Gm-Message-State: AMCzsaX9QovDwsXQXKdVsECmOsCNiy0+zTGBfrqImRsGO0j4d/fYt4hp
	kemlXRNYlFxhgWP30gRKlGc6pA==
X-Google-Smtp-Source: AOwi7QAMNpD7gLvgQz4fg6YYRsHYEsqfrnSvabkTbfm0Mdxi/pfO6JcxNL8VfihrlXIvyDrVPn9QJA==
X-Received: by 10.84.179.65 with SMTP id a59mr7510168plc.162.1507491105191;
	Sun, 08 Oct 2017 12:31:45 -0700 (PDT)
Received: from localhost ([76.126.215.179]) by smtp.gmail.com with ESMTPSA id
	q77sm8021826pfd.84.2017.10.08.12.31.44 for <coreutils@gnu.org>
	(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
	Sun, 08 Oct 2017 12:31:44 -0700 (PDT)
Date: Sun, 8 Oct 2017 12:31:43 -0700
From: Eric Pruitt <eric.pruitt@gmail.com>
To: coreutils@gnu.org
Subject: Would a patch adding color to cat(1) be accepted?
Message-ID: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
PGP-Key: https://www.codevat.com/pgp.asc#F8601B5D2511B4C3535232488DDDE2E6053692AB
User-Agent: NeoMutt/20170113 (1.7.2)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400e:c00::235
X-Mailman-Approved-At: Sun, 08 Oct 2017 18:14:03 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Oct 2017 19:31:51 -0000

I am going to modify cat(1) to add an option to embolden and / or color
symbols added by "--show-nonprinting", "--show-ends" and "--show-tabs".
Maintainers, is this a change you would be willing to merge into
Coreutils codebase? I ask because the manner & style I would use to
write a patch intended for my own use would differ from that of a change
intended for upstream, and I would like to avoid writing the patch twice
if there was some hope of it being accepted.

The implementation I currently have in mind would work much like
colorization in ls(1) and grep(1): a "--color" option would be added
that could be set to "always", "never" (default) or "auto"; user-defined
colors would be controlled by the "CAT_COLORS" environment variable
containing escape sequences used to color symbols associated with each
of the aforementioned command line flags; and when "CAT_COLORS" is
unset, the default escape sequence used by all three options would be
simply make the text bold. Using the same two-character convention used
by GREP_COLORS and LS_COLORS, the default value of of "CAT_COLORS" would
be "np=01:nl=01:tb=01"; "np" is short for "non-printing", "nl" is short
for newline a la "--show-ends" and "tb" is short for "tab."

I often find myself using xxd(1) after running "cat -A" to confirm some
characters are what I think they are. With the proposed feature, it
would be easier determine at a glance if certain characters are literal
values that appear in the original data or if they were added by cat(1).

Please let me know what you think,
Eric


From MAILER-DAEMON Tue Oct 10 04:43:30 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e1q8Q-00067D-G9
	for mharc-coreutils@gnu.org; Tue, 10 Oct 2017 04:43:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56521)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e1q8L-00064I-F5
	for coreutils@gnu.org; Tue, 10 Oct 2017 04:43:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e1q8I-0001Tu-An
	for coreutils@gnu.org; Tue, 10 Oct 2017 04:43:25 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:49386)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e1q8I-0001SP-4C
	for coreutils@gnu.org; Tue, 10 Oct 2017 04:43:22 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 1684694A0;
	Tue, 10 Oct 2017 09:43:18 +0100 (IST)
Subject: Re: Would a patch adding color to cat(1) be accepted?
To: Eric Pruitt <eric.pruitt@gmail.com>, coreutils@gnu.org
References: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
Date: Tue, 10 Oct 2017 01:43:16 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Oct 2017 08:43:29 -0000

On 08/10/17 12:31, Eric Pruitt wrote:
> I am going to modify cat(1) to add an option to embolden and / or color
> symbols added by "--show-nonprinting", "--show-ends" and "--show-tabs".
> Maintainers, is this a change you would be willing to merge into
> Coreutils codebase? I ask because the manner & style I would use to
> write a patch intended for my own use would differ from that of a chang=
e
> intended for upstream, and I would like to avoid writing the patch twic=
e
> if there was some hope of it being accepted.
>=20
> The implementation I currently have in mind would work much like
> colorization in ls(1) and grep(1): a "--color" option would be added
> that could be set to "always", "never" (default) or "auto"; user-define=
d
> colors would be controlled by the "CAT_COLORS" environment variable
> containing escape sequences used to color symbols associated with each
> of the aforementioned command line flags; and when "CAT_COLORS" is
> unset, the default escape sequence used by all three options would be
> simply make the text bold. Using the same two-character convention used
> by GREP_COLORS and LS_COLORS, the default value of of "CAT_COLORS" woul=
d
> be "np=3D01:nl=3D01:tb=3D01"; "np" is short for "non-printing", "nl" is=
 short
> for newline a la "--show-ends" and "tb" is short for "tab."
>=20
> I often find myself using xxd(1) after running "cat -A" to confirm some
> characters are what I think they are. With the proposed feature, it
> would be easier determine at a glance if certain characters are literal
> values that appear in the original data or if they were added by cat(1)=
.
>=20
> Please let me know what you think,
> Eric

This idea has some merit, though I'd prefer not to have
cat needing to deal with CAT_COLORS etc.
I wonder would it be possible to add an appropriate
filter to GNU highlight to support this?
One can also leverage existing tools to do what you want like:

  cat-A-color() {
    HLI=3D`tput smso`; RST=3D`tput sgr0`
    sed "s/$/$HLI\$$RST/" "$@" | less -EXRU
  }

cheers,
P=E1draig.


From MAILER-DAEMON Tue Oct 10 09:37:36 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e1uj2-0001jU-98
	for mharc-coreutils@gnu.org; Tue, 10 Oct 2017 09:37:36 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32820)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1e1uix-0001i3-Ei
	for coreutils@gnu.org; Tue, 10 Oct 2017 09:37:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1e1uit-0003WX-Hb
	for coreutils@gnu.org; Tue, 10 Oct 2017 09:37:31 -0400
Received: from mx1.redhat.com ([209.132.183.28]:34412)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1e1uit-0003W0-62
	for coreutils@gnu.org; Tue, 10 Oct 2017 09:37:27 -0400
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
	[10.5.11.13])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id 1E13D820EF;
	Tue, 10 Oct 2017 13:37:26 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1E13D820EF
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.122.223] (ovpn-122-223.rdu2.redhat.com [10.10.122.223])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 1E6B160630;
	Tue, 10 Oct 2017 13:37:24 +0000 (UTC)
Subject: Re: Would a patch adding color to cat(1) be accepted?
To: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>,
	Eric Pruitt <eric.pruitt@gmail.com>, coreutils@gnu.org
References: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
	<db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <e929a299-7faf-80a4-e956-95a0bd321aa8@redhat.com>
Date: Tue, 10 Oct 2017 08:37:24 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="aAKvrNxos8wj2ULxiCAOU6piOu3bF5V5k"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.26]);
	Tue, 10 Oct 2017 13:37:26 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Oct 2017 13:37:32 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--aAKvrNxos8wj2ULxiCAOU6piOu3bF5V5k
From: Eric Blake <eblake@redhat.com>
To: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>,
 Eric Pruitt <eric.pruitt@gmail.com>, coreutils@gnu.org
Message-ID: <e929a299-7faf-80a4-e956-95a0bd321aa8@redhat.com>
Subject: Re: Would a patch adding color to cat(1) be accepted?
References: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
 <db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
In-Reply-To: <db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 10/10/2017 03:43 AM, P=C3=A1draig Brady wrote:

> This idea has some merit, though I'd prefer not to have
> cat needing to deal with CAT_COLORS etc.

I also like the idea, but detest the environment variable.  When we
recently added coloring to 'diff' (see diffutils 3.4), we chose --color
to turn things on, but --palette to specify which colors to use rather
than an environment variable.

In fact, if we want to add 'cat --palette', it might be nice to retrofit
'ls --color --palette' where the command line takes precedence over the
environment variable LS_COLORS.

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


--aAKvrNxos8wj2ULxiCAOU6piOu3bF5V5k
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlnczRQACgkQp6FrSiUn
Q2pHzQf8CosEpxVgYJEFjWYBOOXPpNPROeGP4OMpmLfvwAjakmA4cvc1c5v23h8x
lp/40ueiPXpaN7oS2UOZm9FwWtumoguBPPCJis1bYlZWJQbaoWAtDI7fe42JHx73
sycZ2RMg+i5E7254YJfxordaWUyE2Syv6MVflbtUdgtbzkXzYhy8YhmMrhZt0RiC
d0JyHCF1c+KFEvQ7+wP9b0cvzEsf9KY7e/rWPESc6vM/KTGV6RMDLH4EaYKmNFLh
uiWUc5rGWBRb5Ku4kzvssB6ZXoByfaUCN2oQJHDBsk+Hmt1sMHN7ik1b/wpBI0eQ
6u4/1rhKjH29paY9Ke+A0rSCfi/AQQ==
=MZ6I
-----END PGP SIGNATURE-----

--aAKvrNxos8wj2ULxiCAOU6piOu3bF5V5k--


From MAILER-DAEMON Tue Oct 10 10:08:07 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e1vCZ-00058c-3V
	for mharc-coreutils@gnu.org; Tue, 10 Oct 2017 10:08:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43006)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <lsatenstein@yahoo.com>) id 1e1vCS-00052C-CW
	for coreutils@gnu.org; Tue, 10 Oct 2017 10:08:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <lsatenstein@yahoo.com>) id 1e1vCI-0006Sd-LT
	for coreutils@gnu.org; Tue, 10 Oct 2017 10:08:00 -0400
Received: from sonic302-48.consmr.mail.ne1.yahoo.com ([66.163.186.174]:40524)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <lsatenstein@yahoo.com>)
	id 1e1vCI-0006S6-Ct
	for coreutils@gnu.org; Tue, 10 Oct 2017 10:07:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
	t=1507644469; bh=GF6Gz1NHGvX2ruLSE9/UAMdblmqxmMJF9LO/ExmnZxk=;
	h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject;
	b=I6Tv51LO9/ngIbMq56y+sM+i9exj8rnv/8ToD1bwK+J1DusoKcp/eVWgoKqgPdC33/3Xml0/8n/UsSJ/2GNctYOR0NlmEApyDzdv+SOBsMfakj0MDlTz3BumR3YBZJrhAzx7suiQVP+QN3aTscPmoQlahCEr4IfhH61ky3MCyKzkr7RDcuggTFZVad41QsEAlp1ZVROPer8Raa/cDbavdUHZBtlDRWyoS/OH2ldZ5jcRZnemGghMuEyb3wL+4B5Zl5HFF+4VKB366/xq66M2cPHoP/RBwsTcdC2GI9ptgyGgpaCHEODX8xjM9PPvk37AV0cSff9ckEx7hBhqGohl+w==
X-YMail-OSG: YcukrLMVM1nhV5dTmT7NglWGgwQ34CZQc_sIj1vIwwN9iJRR4XRTejSr3vrFyXT
	2Sjc3xcuTBQBPI6IY8h5W.mY3xgzyRHKlDu6Hf166_War7d7fB91edSfQUrZczUuBbwG9k9Qak69
	UAQHt2ow0SWCAXcM6PpkaoaYYirWGhlvtVU0OJDmsQHMKkRcyT2rtEEgr1OxWLnysKnMOuz3rzwe
	hXDDvs7DGicISTzy7wpVQSGGXXAKWwvNKaJWF3LvLw.LcTsPk9Q5UjXLaRMgg_VLwWDcf9rIv_Nt
	GRn2Nc9heCFmcL6oKyn.Jratx2yAEJRnE0szlGKeijlGlOFp82vun73Kh6lXA5fk2Bd__mJIqUDJ
	jXiLf8v7ikdYaTHdyXKQa4e4xv6hsZfsy78BzakwfaDAm4FP0AMzIRGnDJ97aC8J.T_YgeCZwuG_
	q5si5GDai3gsplfDyExzeBZEw5HjtgGJCVA3UpuOVpTKv_6IutDnhDyzxRJZBKi04cDqGKBoc
Received: from sonic.gate.mail.ne1.yahoo.com by
	sonic302.consmr.mail.ne1.yahoo.com with HTTP;
	Tue, 10 Oct 2017 14:07:49 +0000
Date: Tue, 10 Oct 2017 14:03:42 +0000 (UTC)
From: Leslie S Satenstein <lsatenstein@yahoo.com>
Reply-To: Leslie S Satenstein <lsatenstein@yahoo.com>
To: Eric Blake <eblake@redhat.com>, 
	=?UTF-8?Q?P=C3=A1draig_Brady?= <P@draigBrady.com>, 
	Eric Pruitt <eric.pruitt@gmail.com>, 
	"coreutils@gnu.org" <coreutils@gnu.org>
Message-ID: <1770501935.4983006.1507644222302@mail.yahoo.com>
In-Reply-To: <e929a299-7faf-80a4-e956-95a0bd321aa8@redhat.com>
References: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
	<db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
	<e929a299-7faf-80a4-e956-95a0bd321aa8@redhat.com>
Subject: Re: Would a patch adding color to cat(1) be accepted?
MIME-Version: 1.0
X-Mailer: WebService/1.1.10668 YahooMailNeo Mozilla/5.0 (X11; Fedora;
	Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Content-Length: 1102
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 66.163.186.174
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Oct 2017 14:08:05 -0000

My RESPONSE
KISS
=C2=A0Regards=20
=C2=A0Leslie
 Leslie Satenstein
Montr=C3=A9al Qu=C3=A9bec, Canada



      From: Eric Blake <eblake@redhat.com>
 To: P=C3=A1draig Brady <P@draigBrady.com>; Eric Pruitt <eric.pruitt@gmail.=
com>; coreutils@gnu.org=20
 Sent: Tuesday, October 10, 2017 9:37 AM
 Subject: Re: Would a patch adding color to cat(1) be accepted?
  =20
On 10/10/2017 03:43 AM, P=C3=A1draig Brady wrote:

> This idea has some merit, though I'd prefer not to have
> cat needing to deal with CAT_COLORS etc.

I also like the idea, but detest the environment variable.=C2=A0 When we
recently added coloring to 'diff' (see diffutils 3.4), we chose --color
to turn things on, but --palette to specify which colors to use rather
than an environment variable.

In fact, if we want to add 'cat --palette', it might be nice to retrofit
'ls --color --palette' where the command line takes precedence over the
environment variable LS_COLORS.

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


  =20

From MAILER-DAEMON Tue Oct 10 11:21:51 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e1wLv-0000xh-Ek
	for mharc-coreutils@gnu.org; Tue, 10 Oct 2017 11:21:51 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40507)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <962-396-1872@kylheku.com>) id 1e1wLt-0000wD-BX
	for coreutils@gnu.org; Tue, 10 Oct 2017 11:21:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <962-396-1872@kylheku.com>) id 1e1wLo-0000H7-8b
	for coreutils@gnu.org; Tue, 10 Oct 2017 11:21:49 -0400
Received: from smtp-out-no.shaw.ca ([64.59.134.12]:43730)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <962-396-1872@kylheku.com>)
	id 1e1wLo-00007x-3c
	for coreutils@gnu.org; Tue, 10 Oct 2017 11:21:44 -0400
Received: from kylheku.com ([70.79.163.252]) by shaw.ca with SMTP
	id 1wLXevx0JM9gt1wLYeTdyZ; Tue, 10 Oct 2017 09:21:31 -0600
X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0
	a=95A0EdhkF1LMGt25d7h1IQ==:117 a=95A0EdhkF1LMGt25d7h1IQ==:17
	a=IkcTkHD0fZMA:10 a=SMorJkV_YP8A:10 a=02M-m0pO-4AA:10
	a=Z035PQA61eJFnSIpUg0A:9 a=QEXdDO2ut3YA:10
Received: from www-data by kylheku.com with local (Exim 4.72)
	(envelope-from <962-396-1872@kylheku.com>)
	id 1e1wLX-0005N2-0C; Tue, 10 Oct 2017 08:21:27 -0700
To: Leslie S Satenstein <lsatenstein@yahoo.com>
Subject: Re: Would a patch adding color to cat(1) be  =?UTF-8?Q?accepted=3F?=
X-PHP-Originating-Script: 501:rcmail.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: quoted-printable
Date: Tue, 10 Oct 2017 08:21:26 -0700
From: "Kaz Kylheku (Coreutils)" <962-396-1872@kylheku.com>
Cc: Eric Blake <eblake@redhat.com>, =?UTF-8?Q?P=C3=A1draig_Brady?=
	<P@draigbrady.com>, Eric Pruitt <eric.pruitt@gmail.com>, coreutils@gnu.org
In-Reply-To: <1770501935.4983006.1507644222302@mail.yahoo.com>
References: <20171008193142.zge7yz2nzu6cnfoo@sinister.lan.codevat.com>
	<db68d7cd-f5a4-5aa8-09b5-bbc80972f071@draigBrady.com>
	<e929a299-7faf-80a4-e956-95a0bd321aa8@redhat.com>
	<1770501935.4983006.1507644222302@mail.yahoo.com>
Message-ID: <41216400b4b2619f963dd9f4ac9cca78@mail.kylheku.com>
X-Sender: 962-396-1872@kylheku.com
User-Agent: Roundcube Webmail/0.9.2
X-CMAE-Envelope: MS4wfC4xpaBrR7DYN6IXNXec05NRI/Nkj8oLDxHghBJZRv2iSuzVqtrw/qGavrnjCkepq/K9cA50e6NieJPbNSJZgk6syvjwY1Dv0eNTLvrQne1nUDfWOyqt
	RArWaGQbTRjT3jvZbCnnlg2WdRkVHalPqsp0NpggCcsrMCYKSsXW9AaDYSdB4HPTy3PBaWHvWJF3eBqTvUsPcdeJRSggSJdp0FrMh+puVecpYv+WhZRwk69q
	5nPU6iMwO3Dpy4xmd9yW8eYqB1DIxT4NHyp7Pe3OI6w/SBCx5yrioHc+jGI3ogoS
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 64.59.134.12
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Oct 2017 15:21:50 -0000

On 10.10.2017 07:03, Leslie S Satenstein wrote:
> My RESPONSE
> KISS

Hey, why not? Next year, everyone's embedded system will have twice the=20
flash.

Then they can stop using BusyBox and switch to Coreutils with colorized=20
everything!



From MAILER-DAEMON Wed Oct 11 03:15:33 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2BEq-00054G-Qi
	for mharc-coreutils@gnu.org; Wed, 11 Oct 2017 03:15:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40983)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e2BEi-000505-Tt
	for coreutils@gnu.org; Wed, 11 Oct 2017 03:15:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e2BEe-00013p-PR
	for coreutils@gnu.org; Wed, 11 Oct 2017 03:15:24 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:49028)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>)
	id 1e2BEY-00010e-EJ; Wed, 11 Oct 2017 03:15:14 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id B4AB0990E;
	Wed, 11 Oct 2017 08:15:09 +0100 (IST)
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
To: =?UTF-8?B?5byg5L2zKOS5vui2iik=?= <qianyue.zj@alibaba-inc.com>
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
Cc: bug-gnulib@gnu.org, coreutils@gnu.org
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
Date: Wed, 11 Oct 2017 00:15:07 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <D603E203.81E%qianyue.zj@alibaba-inc.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 07:15:30 -0000

On 10/10/17 23:58, =E5=BC=A0=E4=BD=B3(=E4=B9=BE=E8=B6=8A) wrote:
> Hi,
>=20
> This is the review request for SM3 hash algorithm. SM3 hash algorithm i=
s
> already
> accepted and supported by TPM 2.0 spec. See page 284 in TPM 2.0 spec pa=
rt 1
> (https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-=
1-Ar
> chitecture-01.38.pdf)
>=20
> Currently, I only implement SM3 in gnulib. I will implement it in
> libgcrypt and
> openssl later.

>=20
> Plz refer to the following PRs for code review.
>=20
> - For the new gnulib module crypto/sm3
>   https://github.com/coreutils/gnulib/pull/3/commits
>=20
> - For the new program sm3sum
>   https://github.com/coreutils/coreutils/pull/12/commits

I see the GMssl fork of openssl on github.
Has any attempt been made to merge with that project?
I'm not sure how generally useful a sm3sum command would be TBH.
Being available in gnulib is more plausible,
though I'd like to see it in the more specific openssl library first.
Why the specific need for an sm3sum command?
BTW you'd need to assign copyright for this to be merged to gnulib/coreut=
ils.

thanks for taking the time to provide patches.

P=C3=A1draig


From MAILER-DAEMON Wed Oct 11 05:13:43 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2D5D-0001kl-1D
	for mharc-coreutils@gnu.org; Wed, 11 Oct 2017 05:13:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45161)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruno@clisp.org>) id 1e2D5B-0001jk-HF
	for coreutils@gnu.org; Wed, 11 Oct 2017 05:13:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bruno@clisp.org>) id 1e2D5A-0006dj-P4
	for coreutils@gnu.org; Wed, 11 Oct 2017 05:13:41 -0400
Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::9]:24855)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <bruno@clisp.org>)
	id 1e2D56-0006an-FT; Wed, 11 Oct 2017 05:13:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1507713214;
	s=domk; d=clisp.org;
	h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:
	In-Reply-To:Date:Subject:Cc:To:From;
	bh=Hv25TL+Ns2kfIdX3RMixSZRzFjaq37+5ZyNZFkrDb6o=;
	b=cZBGkOj8zPHvrXegcdDaQmK82wmp0s1h+GGd6kz3x0fGP59y2NyLhpQEsd8K3KDHUv
	y+Qv1fJqyI978KAmIyZSh7Ur40gIox5di+uAGCbSx7mlHMsMjBTnC3keyKc2HKj8GYgq
	Pm//GFALcofeoaVM8SGekblXZNmKvU1rrNOnI=
X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfxyPs=
X-RZG-CLASS-ID: mo00
Received: from bruno.haible.de
	(dslb-088-068-032-045.088.068.pools.vodafone-ip.de [88.68.32.45])
	by smtp.strato.de (RZmta 42.4 DYNA|AUTH)
	with ESMTPSA id x05fe8t9B9DQBog
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521
	ECDH bits, eq. 15360 bits RSA))
	(Client did not present a certificate);
	Wed, 11 Oct 2017 11:13:26 +0200 (CEST)
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: =?ISO-8859-1?Q?P=E1draig?= Brady <P@draigbrady.com>,
	=?utf-8?B?5byg5L2zKOS5vui2iik=?= <qianyue.zj@alibaba-inc.com>,
	coreutils@gnu.org
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
Date: Wed, 11 Oct 2017 11:13:25 +0200
Message-ID: <6473292.TjZuIb3LsK@omega>
User-Agent: KMail/5.1.3 (Linux/4.4.0-96-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a01:238:20a:202:5300::9
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 09:13:42 -0000

=E5=BC=A0=E4=BD=B3(=E4=B9=BE=E8=B6=8A) wrote:
> > Currently, I only implement SM3 in gnulib. I will implement it in
> > libgcrypt and
> > openssl later.

Yes, for a crypto algorjthm to be widely usable in GNU, it needs to be
available both in GNUTLS (via libgcrypt) and openssl.

P=C3=A1draig Brady wrote:
> Being available in gnulib is more plausible,
> though I'd like to see it in the more specific openssl library first.

Indeed, we don't have many crypto experts on the gnulib mailing lists.
Therefore, I too would like the crypto experts on the libgcrypt or openssl
mailing lists to evaluate the SM3 algorithm and your code first, before we
can accept it in gnulib.

Bruno



From MAILER-DAEMON Wed Oct 11 08:19:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2Fyb-0005vX-3O
	for mharc-coreutils@gnu.org; Wed, 11 Oct 2017 08:19:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50213)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2BxI-0002uX-RK
	for coreutils@gnu.org; Wed, 11 Oct 2017 04:01:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2BxD-0005Lo-D1
	for coreutils@gnu.org; Wed, 11 Oct 2017 04:01:28 -0400
Received: from out4440.biz.mail.alibaba.com ([47.88.44.40]:26713)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e2Bx4-0005Ed-RT; Wed, 11 Oct 2017 04:01:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1507708863;
	h=Date:Subject:From:To:Message-ID:Mime-version:Content-type; 
	bh=4T/76jXhdPrsYH5bwY1Ar7Wsgk1K/B3kNb/xtAI1AfU=;
	b=IaEaphlwJSxZuoT7dpWPQUbyEGnBGE3seWLiLDdGvp/dJ/y7WdeXte+HrVDY4rpDWH7v+4UdYUv1EDKJ3pLdM0vbMQ4Fw/tacAdmA3Xsj+Mx2TmSSUB06U433uyUJwsLTLZYj/AipMF8G9L7SfNmW+GAEa0ncOCPg8yZBUmXJAY=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R421e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03300;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=4; SR=0;
	TI=SMTPD_---.96.Pzpj_1507705093; 
Received: from 30.27.112.9(mailfrom:qianyue.zj@alibaba-inc.com ip:106.11.34.4)
	by smtp.aliyun-inc.com(127.0.0.1); Wed, 11 Oct 2017 14:58:15 +0800
User-Agent: Microsoft-MacOutlook/14.7.1.161129
Date: Wed, 11 Oct 2017 14:58:12 +0800
Subject: [PATCH] Implement SM3 hash algorithm in gnulib and the computing tool
	in coreutils.
From: "=?UTF-8?B?5byg5L2zKOS5vui2iik=?=" <qianyue.zj@alibaba-inc.com>
To: <P@draigBrady.com>
CC: <bug-gnulib@gnu.org>, <coreutils@gnu.org>,
	"=?UTF-8?B?5byg5L2zKOS5vui2iik=?=" <qianyue.zj@alibaba-inc.com>
Message-ID: <D603E203.81E%qianyue.zj@alibaba-inc.com>
Thread-Topic: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
Mime-version: 1.0
Content-type: text/plain;
	charset="US-ASCII"
Content-transfer-encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.40
X-Mailman-Approved-At: Wed, 11 Oct 2017 08:19:03 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 08:01:32 -0000

Hi,

This is the review request for SM3 hash algorithm. SM3 hash algorithm is
already
accepted and supported by TPM 2.0 spec. See page 284 in TPM 2.0 spec part 1
(https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Ar
chitecture-01.38.pdf)

Currently, I only implement SM3 in gnulib. I will implement it in
libgcrypt and
openssl later.

Plz refer to the following PRs for code review.

- For the new gnulib module crypto/sm3
  https://github.com/coreutils/gnulib/pull/3/commits

- For the new program sm3sum
  https://github.com/coreutils/coreutils/pull/12/commits

Thanks,
Jia




From MAILER-DAEMON Wed Oct 11 08:19:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2Fyb-0005vj-6z
	for mharc-coreutils@gnu.org; Wed, 11 Oct 2017 08:19:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60848)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2CWs-0005sD-Pp
	for coreutils@gnu.org; Wed, 11 Oct 2017 04:38:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2CWc-0000rl-PH
	for coreutils@gnu.org; Wed, 11 Oct 2017 04:38:14 -0400
Received: from out4434.biz.mail.alibaba.com ([47.88.44.34]:13124)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e2CVw-0000Cl-9Q; Wed, 11 Oct 2017 04:37:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1507711026;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; 
	bh=FDWrv4oVwXr0O20gSz+lMcrS4BKZGSLrUtmm6m4ri9g=;
	b=taXP9X69IQP2Dg/mys4Nfo7YCAbJfSwBWp8hwLcGrNWOc97pAjohdHponxmds8qVJyQhiBpcq1jUlJ9cZUWPTat3LY83K8YA6REItxt2U66q7KHNSEeDqPo5BfdFVmTopj5YNWJlJQjKT3upQ10V6besWxnXZ3nXvXHWvIyKLrU=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R181e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03306;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=3; SR=0;
	TI=SMTPD_---.961wwWm_1507709131; 
Received: from ali-6c96cfd98fb5.local(mailfrom:qianyue.zj@alibaba-inc.com
	ip:106.11.34.4) by smtp.aliyun-inc.com(127.0.0.1);
	Wed, 11 Oct 2017 16:05:31 +0800
Message-ID: <59DDD0CA.5020902@alibaba-inc.com>
Date: Wed, 11 Oct 2017 16:05:30 +0800
From: "=?UTF-8?B?5byg5L2zKOS5vui2iik=?=" <qianyue.zj@alibaba-inc.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;
	rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
CC: bug-gnulib@gnu.org, coreutils@gnu.org
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
In-Reply-To: <9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.34
X-Mailman-Approved-At: Wed, 11 Oct 2017 08:19:03 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 08:38:18 -0000



于 2017/10/11 下午3:15, Pádraig Brady 写道:
> On 10/10/17 23:58, 张佳(乾越) wrote:
>> Hi,
>>
>> This is the review request for SM3 hash algorithm. SM3 hash algorithm is
>> already
>> accepted and supported by TPM 2.0 spec. See page 284 in TPM 2.0 spec part 1
>> (https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Ar
>> chitecture-01.38.pdf)
>>
>> Currently, I only implement SM3 in gnulib. I will implement it in
>> libgcrypt and
>> openssl later.
>
>>
>> Plz refer to the following PRs for code review.
>>
>> - For the new gnulib module crypto/sm3
>>    https://github.com/coreutils/gnulib/pull/3/commits
>>
>> - For the new program sm3sum
>>    https://github.com/coreutils/coreutils/pull/12/commits
>
> I see the GMssl fork of openssl on github.
> Has any attempt been made to merge with that project?

I don't see GMssl keeps syncing up with the latest openssl so it is not
my goal.

> I'm not sure how generally useful a sm3sum command would be TBH.
> Being available in gnulib is more plausible,
> though I'd like to see it in the more specific openssl library first.

If this is the prerequisite to merge sm3sum and crypto/sm3, I'll do it
later. But technically it is fine to compile sm3sum program without
openssl.

> Why the specific need for an sm3sum command?

In some areas, SM3 algorithm is widely used, because SM3 algorithm has
additional strengthening features against sha256 at the cose of small
overhead increased.

> BTW you'd need to assign copyright for this to be merged to gnulib/coreutils.

No problem. Is there anything to do for this?

Thanks,
Jia

>
> thanks for taking the time to provide patches.
>
> Pádraig
>


From MAILER-DAEMON Wed Oct 11 08:19:05 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2Fyb-0005vq-CM
	for mharc-coreutils@gnu.org; Wed, 11 Oct 2017 08:19:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48199)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2DE9-0003ZP-6I
	for coreutils@gnu.org; Wed, 11 Oct 2017 05:22:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e2DE5-0004jb-EA
	for coreutils@gnu.org; Wed, 11 Oct 2017 05:22:57 -0400
Received: from out4440.biz.mail.alibaba.com ([47.88.44.40]:3842)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e2DE0-0004eh-Jj; Wed, 11 Oct 2017 05:22:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1507713759;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; 
	bh=gkUcahPTOdOi1XknzNu2YA7lFzHbcze7h8JwcMtYNms=;
	b=PxBUZX0oJAH5SmfMBEiFkgH8wwEzshBPAHs3dn8K+zEqK1/Zx1UHwvWRYgK3LTU7FTfRnk3dC9CcT+LKZoaBSMScmitaNvMg1XAoU244xafod7RBqFLgc0q9KUj7p7T61cFDb8CB7JBsbL/nvt0lMGCG341bXOmKtKGaA7tiPtM=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R121e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03294;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=4; SR=0;
	TI=SMTPD_---.967KSu6_1507713402; 
Received: from ali-6c96cfd98fb5.local(mailfrom:qianyue.zj@alibaba-inc.com
	ip:106.11.34.4) by smtp.aliyun-inc.com(127.0.0.1);
	Wed, 11 Oct 2017 17:16:42 +0800
Message-ID: <59DDE179.1000109@alibaba-inc.com>
Date: Wed, 11 Oct 2017 17:16:41 +0800
From: "=?UTF-8?B?5byg5L2zKOS5vui2iik=?=" <qianyue.zj@alibaba-inc.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;
	rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: Bruno Haible <bruno@clisp.org>, bug-gnulib@gnu.org
CC: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigbrady.com>, 
 coreutils@gnu.org
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
	<6473292.TjZuIb3LsK@omega>
In-Reply-To: <6473292.TjZuIb3LsK@omega>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.40
X-Mailman-Approved-At: Wed, 11 Oct 2017 08:19:04 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 09:22:58 -0000



于 2017/10/11 下午5:13, Bruno Haible 写道:
> 张佳(乾越) wrote:
>>> Currently, I only implement SM3 in gnulib. I will implement it in
>>> libgcrypt and
>>> openssl later.
>
> Yes, for a crypto algorjthm to be widely usable in GNU, it needs to be
> available both in GNUTLS (via libgcrypt) and openssl.
>
> Pádraig Brady wrote:
>> Being available in gnulib is more plausible,
>> though I'd like to see it in the more specific openssl library first.
>
> Indeed, we don't have many crypto experts on the gnulib mailing lists.
> Therefore, I too would like the crypto experts on the libgcrypt or openssl
> mailing lists to evaluate the SM3 algorithm and your code first, before we
> can accept it in gnulib.

This sounds like the prerequisite of merging crypto/sm3 and sm3sum right?

Thanks,
Jia

>
> Bruno
>


From MAILER-DAEMON Fri Oct 13 08:48:38 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e2zOI-0007pr-OW
	for mharc-coreutils@gnu.org; Fri, 13 Oct 2017 08:48:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58719)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ericcurtin17@gmail.com>) id 1e2xD0-0001W9-0u
	for coreutils@gnu.org; Fri, 13 Oct 2017 06:28:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ericcurtin17@gmail.com>) id 1e2xCz-0002mD-Aj
	for coreutils@gnu.org; Fri, 13 Oct 2017 06:28:50 -0400
Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:55238)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <ericcurtin17@gmail.com>)
	id 1e2xCz-0002ll-5v
	for coreutils@gnu.org; Fri, 13 Oct 2017 06:28:49 -0400
Received: by mail-io0-x230.google.com with SMTP id e89so765658ioi.11
	for <coreutils@gnu.org>; Fri, 13 Oct 2017 03:28:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:from:date:message-id:subject:to;
	bh=yW/fUWi63Ft87lEsQr7zPSl5CmmTLEnyA8k31ZPIUOE=;
	b=J/OaZOFqAcBzpem0HL7wAr0QLu+9oWmtD6O8qdvQsdHlqChYHRpD8kbViRnLpwqSDQ
	A3i/ghMfXDvlcFLG8QMeN7q1iPL2ERwzMMQewE8yAgYSzgFBkLrH3iwWcGw2mcCBGjDc
	rK9C/uW9j6JpBXb2YTUQv+it1RQCIx5pjaqZBZFkRO2SxKzAgi/eLBYwE9cweE9R34Wc
	rFZwTBzb1Viv+WZYck8jYPFEZZMeV/Vlf3UUKdJ12oaRAy6pvU3DuVh84YHRF+EgbQSp
	rf0WOs2iph86O5RliIUMt0dk9px8A60aUfijFkuo7r8uKkYm3cyq4jvQT7VchSjY3Now
	3fVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=yW/fUWi63Ft87lEsQr7zPSl5CmmTLEnyA8k31ZPIUOE=;
	b=dJegrYROjyJuNJblg1uAyLEg/B1Gvgyqg23EZtNeAH4+Fmg67VDQ1+5JwNrZWvIz6a
	uC70wYUSPyUtg/Rq+R/Qv3+Q78u8y9R1VO/fWldTwnlqBaULOagCrNB1aVj95qNW4Q+J
	XwCtA9h8miNu2Um8A05O2WqHKI6Lv/3yTtN4dZbmhb9tpcp1uTEXruZCmh9UiuXa7MzW
	YnYc5pTu8Qzq229GhaGVzpGKV+FA1o5qyzUr6XyIY+wS1rYFG5xkOYW5SPAIa50QYrO1
	cVlcKXdvUmEWgkkJINYuOzh5evnhkJWGQZ4QL3pZBfqs4T8gtI5RVx/nxGvpYMBKs6o4
	qrFA==
X-Gm-Message-State: AMCzsaXgiEvXE5vzKKe8xIomNMkDZMLLNO7L9Hi6JW/5mNKlxD1mnJKq
	jHx8tk40UJ8J3hVMG5FoP0cc6kIChVHSvi4pPUr0sw==
X-Google-Smtp-Source: AOwi7QBrT8psFns42Z0AVPrPBLnM6qO9JJhp4KUaS44FB+l5HS8/IQcoSMcie2pE1JAgPRFTLhH3j/kbhgrKxdEqMnk=
X-Received: by 10.107.133.151 with SMTP id p23mr1136106ioi.228.1507890528343; 
	Fri, 13 Oct 2017 03:28:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.2.106.31 with HTTP; Fri, 13 Oct 2017 03:28:47 -0700 (PDT)
From: Eric Curtin <ericcurtin17@gmail.com>
Date: Fri, 13 Oct 2017 11:28:47 +0100
Message-ID: <CANpvso698vBKO6QtyJKRYg61cWjHbGQMksYZwnpVBGAWW7P4bA@mail.gmail.com>
Subject: base85 would it be accepted
To: coreutils@gnu.org
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4001:c06::230
X-Mailman-Approved-At: Fri, 13 Oct 2017 08:48:37 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Oct 2017 10:28:50 -0000

Hi Guys,

I find base32 and base64 very useful in coreutils. If I wrote a base85
implementation in the same style would it be accepted? Just wondering,
don't want to waste my time submitting just in case.

Regards,

Eric


From MAILER-DAEMON Sat Oct 14 18:39:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e3V5Y-00028j-VB
	for mharc-coreutils@gnu.org; Sat, 14 Oct 2017 18:39:24 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37211)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3V5W-00028M-5O
	for coreutils@gnu.org; Sat, 14 Oct 2017 18:39:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3V5R-0000pE-Ao
	for coreutils@gnu.org; Sat, 14 Oct 2017 18:39:22 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:40964)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e3V5R-0000kw-4a
	for coreutils@gnu.org; Sat, 14 Oct 2017 18:39:17 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 21C03139;
	Sat, 14 Oct 2017 23:39:11 +0100 (IST)
Subject: Re: base85 would it be accepted
To: Eric Curtin <ericcurtin17@gmail.com>, coreutils@gnu.org
References: <CANpvso698vBKO6QtyJKRYg61cWjHbGQMksYZwnpVBGAWW7P4bA@mail.gmail.com>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <0361f28d-107b-e839-d289-8ad4dcdf0dbe@draigBrady.com>
Date: Sat, 14 Oct 2017 15:39:09 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <CANpvso698vBKO6QtyJKRYg61cWjHbGQMksYZwnpVBGAWW7P4bA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Oct 2017 22:39:23 -0000

On 13/10/17 03:28, Eric Curtin wrote:
> Hi Guys,
>=20
> I find base32 and base64 very useful in coreutils. If I wrote a base85
> implementation in the same style would it be accepted? Just wondering,
> don't want to waste my time submitting just in case.

Well as the bit width increases there is more opportunity
for application specific variations on the encoding.
I quick check confirms this, so I'm thinking that base85
is more useful as an application specific encoding used
by pdf or git etc. rather than a standalone useful encoding/util.

thanks,
P=C3=A1draig



From MAILER-DAEMON Mon Oct 16 03:14:38 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e3zbi-0002mR-EJ
	for mharc-coreutils@gnu.org; Mon, 16 Oct 2017 03:14:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49698)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3zbe-0002jk-Jt
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:14:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3zbb-0001h8-2m
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:14:34 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:48346)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e3zba-0001fe-Ot
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:14:31 -0400
Received: from localhost.net (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 56BC39A52;
	Mon, 16 Oct 2017 08:14:26 +0100 (IST)
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] dd: fix nocache regions passed to posix_fadvise()
Date: Mon, 16 Oct 2017 00:14:10 -0700
Message-Id: <20171016071410.16942-1-P@draigBrady.com>
X-Mailer: git-send-email 2.9.3
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Oct 2017 07:14:37 -0000

Previously with oflag=direct the call to invalidate_cache()
was not passed to the kernel, as it was less than a page size,
and a subsequent call was not made to invalidate the pending space.
Similarly with oflag=nocache the pending space at EOF was
not invalidated.  Even though these amount to only a single page
in the page cache it's significant for example when one
tries to read that file with O_DIRECT as it will block.

* src/dd.c (i_nocache_eof, o_nocache_eof): New bools used
to control when we want invalidate_cache(,0) to clear to EOF.
(cache_round): Use IO_BUFSIZE (currently 132KiB) to minimize
calls to the relatively expensive advise function, rather
than page_size.  This also makes it clear that while the
kernel function operates on pages, this size is chosen for
performance reasons.
(invalidate_cache): Refactor to share more code between
input and output paths. Use i_nocache_eof and o_nocache_eof
rather than proxying off max_records.  Ensure we
invalidate full pages when clearing to EOF as the kernel
will ignore any non complete pages.  Fix the offset used
for the output path.
(dd_copy): Invalidate the cache of the input after the
offset is updated, for consistency and so we don't try to
invalidate before the start of the file.  When we read
EOF on input, set flags so that we invalidate to EOF.
(main): Invalidate to EOF in more cases, by depending
on the i_nocache_eof and o_nocache_eof flags.
* doc/coreutils.texi (dd invocation): Clarify the alignment
and persisted caveats on the example applying "nocache"
to part of a file.
* tests/dd/nocache_eof.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
---
 NEWS                    |   5 +++
 doc/coreutils.texi      |   4 +-
 src/dd.c                | 117 +++++++++++++++++++++++++++++-------------------
 tests/dd/nocache_eof.sh |  83 ++++++++++++++++++++++++++++++++++
 tests/local.mk          |   1 +
 5 files changed, 163 insertions(+), 47 deletions(-)
 create mode 100755 tests/dd/nocache_eof.sh

diff --git a/NEWS b/NEWS
index 2878b70..c61e4e8 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,11 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  dd now ensures the correct ranges are specified for the "nocache"
+  and "direct" flags.  Previously some pages were missed.
+  [bug introduced for "direct" in coreutils-7.5,
+   and with the "nocache" implementation in coreutils-8.11]
+
   ptx -S no longer infloops for a pattern which returns zero-length matches.
   [the bug dates back to the initial implementation]
 
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 47a9f6d..70e2b76 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -9187,7 +9187,9 @@ dd if=ifile iflag=nocache count=0
 # Ensure drop cache for the whole file
 dd of=ofile oflag=nocache conv=notrunc,fdatasync count=0
 
-# Drop cache for part of file
+# Advise to drop cache for part of file
+# Note the kernel will only consider complete and
+# already persisted pages.
 dd if=ifile iflag=nocache skip=10 count=10 of=/dev/null
 
 # Stream data using just the read-ahead cache.
diff --git a/src/dd.c b/src/dd.c
index 8e3224a..636fac6 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -31,6 +31,7 @@
 #include "fd-reopen.h"
 #include "gethrxtime.h"
 #include "human.h"
+#include "ioblksize.h"
 #include "long-options.h"
 #include "quote.h"
 #include "verror.h"
@@ -266,6 +267,9 @@ static sig_atomic_t volatile info_signal_count;
 /* Whether to discard cache for input or output.  */
 static bool i_nocache, o_nocache;
 
+/* Whether to instruct the kernel to discard the complete file.  */
+static bool i_nocache_eof, o_nocache_eof;
+
 /* Function used for read (to handle iflag=fullblock parameter).  */
 static ssize_t (*iread_fnc) (int fd, char *buf, size_t size);
 
@@ -1000,7 +1004,8 @@ quit (int code)
   exit (code);
 }
 
-/* Return LEN rounded down to a multiple of PAGE_SIZE
+/* Return LEN rounded down to a multiple of IO_BUFSIZE
+   (to minimize calls to the expensive posix_fadvise(,POSIX_FADV_DONTNEED),
    while storing the remainder internally per FD.
    Pass LEN == 0 to get the current remainder.  */
 
@@ -1013,7 +1018,7 @@ cache_round (int fd, off_t len)
   if (len)
     {
       uintmax_t c_pending = *pending + len;
-      *pending = c_pending % page_size;
+      *pending = c_pending % IO_BUFSIZE;
       if (c_pending > *pending)
         len = c_pending - *pending;
       else
@@ -1033,54 +1038,64 @@ static bool
 invalidate_cache (int fd, off_t len)
 {
   int adv_ret = -1;
+  off_t offset;
+  bool nocache_eof = (fd == STDIN_FILENO ? i_nocache_eof : o_nocache_eof);
 
   /* Minimize syscalls.  */
   off_t clen = cache_round (fd, len);
   if (len && !clen)
     return true; /* Don't advise this time.  */
-  if (!len && !clen && max_records)
-    return true; /* Nothing pending.  */
+  else if (! len && ! clen && ! nocache_eof)
+    return true;
   off_t pending = len ? cache_round (fd, 0) : 0;
 
   if (fd == STDIN_FILENO)
     {
       if (input_seekable)
+        offset = input_offset;
+      else
         {
-          /* Note we're being careful here to only invalidate what
-             we've read, so as not to dump any read ahead cache.  */
-#if HAVE_POSIX_FADVISE
-            adv_ret = posix_fadvise (fd, input_offset - clen - pending, clen,
-                                     POSIX_FADV_DONTNEED);
-#else
-            errno = ENOTSUP;
-#endif
+          offset = -1;
+          errno = ESPIPE;
         }
-      else
-        errno = ESPIPE;
     }
-  else if (fd == STDOUT_FILENO)
+  else
     {
       static off_t output_offset = -2;
 
       if (output_offset != -1)
         {
-          if (0 > output_offset)
-            {
-              output_offset = lseek (fd, 0, SEEK_CUR);
-              output_offset -= clen + pending;
-            }
-          if (0 <= output_offset)
-            {
+          if (output_offset < 0)
+            output_offset = lseek (fd, 0, SEEK_CUR);
+          else if (len)
+            output_offset += clen + pending;
+        }
+
+      offset = output_offset;
+    }
+
+  if (0 <= offset)
+   {
+     if (! len && clen && nocache_eof)
+       {
+         pending = clen;
+         clen = 0;
+       }
+
+     /* Note we're being careful here to only invalidate what
+        we've read, so as not to dump any read ahead cache.
+        Note also the kernel is conservative and only invalidates
+        full pages in the specified range.  */
 #if HAVE_POSIX_FADVISE
-              adv_ret = posix_fadvise (fd, output_offset, clen,
-                                       POSIX_FADV_DONTNEED);
+     offset = offset - clen - pending;
+     /* ensure full page specified when invalidating to eof.  */
+     if (clen == 0)
+       offset -= offset % page_size;
+     adv_ret = posix_fadvise (fd, offset, clen, POSIX_FADV_DONTNEED);
 #else
-              errno = ENOTSUP;
+     errno = ENOTSUP;
 #endif
-              output_offset += clen + pending;
-            }
-        }
-    }
+   }
 
   return adv_ret != -1 ? true : false;
 }
@@ -1168,15 +1183,19 @@ iwrite (int fd, char const *buf, size_t size)
                quotef (output_file));
 
       /* Since we have just turned off O_DIRECT for the final write,
-         here we try to preserve some of its semantics.  First, use
-         posix_fadvise to tell the system not to pollute the buffer
-         cache with this data.  Don't bother to diagnose lseek or
-         posix_fadvise failure. */
+         we try to preserve some of its semantics.  */
+
+      /* Call invalidate_cache() to setup the appropriate offsets
+         for subsequent calls.  */
+      o_nocache_eof = true;
       invalidate_cache (STDOUT_FILENO, 0);
 
       /* Attempt to ensure that that final block is committed
          to disk as quickly as possible.  */
       conversions_mask |= C_FSYNC;
+
+      /* After the subsequent fsync() we'll call invalidate_cache()
+         to attempt to clear all data from the page cache.  */
     }
 
   while (total_written < size)
@@ -1562,11 +1581,13 @@ scanargs (int argc, char *const *argv)
   if (input_flags & O_NOCACHE)
     {
       i_nocache = true;
+      i_nocache_eof = (max_records == 0 && max_bytes == 0);
       input_flags &= ~O_NOCACHE;
     }
   if (output_flags & O_NOCACHE)
     {
       o_nocache = true;
+      o_nocache_eof = (max_records == 0 && max_bytes == 0);
       output_flags &= ~O_NOCACHE;
     }
 }
@@ -2149,13 +2170,19 @@ dd_copy (void)
       else
         nread = iread_fnc (STDIN_FILENO, ibuf, input_blocksize);
 
-      if (nread >= 0 && i_nocache)
-        invalidate_cache (STDIN_FILENO, nread);
-
-      if (nread == 0)
-        break;			/* EOF.  */
-
-      if (nread < 0)
+      if (nread > 0)
+        {
+          advance_input_offset (nread);
+          if (i_nocache)
+            invalidate_cache (STDIN_FILENO, nread);
+        }
+      else if (nread == 0)
+        {
+          i_nocache_eof = i_nocache;
+          o_nocache_eof = o_nocache && ! (conversions_mask & C_NOTRUNC);
+          break;			/* EOF.  */
+        }
+      else
         {
           if (!(conversions_mask & C_NOERROR) || status_level != STATUS_NONE)
             error (0, errno, _("error reading %s"), quoteaf (input_file));
@@ -2194,7 +2221,6 @@ dd_copy (void)
         }
 
       n_bytes_read = nread;
-      advance_input_offset (nread);
 
       if (n_bytes_read < input_blocksize)
         {
@@ -2470,13 +2496,12 @@ main (int argc, char **argv)
           exit_status = EXIT_FAILURE;
         }
     }
-  else if (max_records != (uintmax_t) -1)
+  else
     {
-      /* Invalidate any pending region less than page size,
-         in case the kernel might round up.  */
-      if (i_nocache)
+      /* Invalidate any pending region or to EOF if appropriate.  */
+      if (i_nocache || i_nocache_eof)
         invalidate_cache (STDIN_FILENO, 0);
-      if (o_nocache)
+      if (o_nocache || o_nocache_eof)
         invalidate_cache (STDOUT_FILENO, 0);
     }
 
diff --git a/tests/dd/nocache_eof.sh b/tests/dd/nocache_eof.sh
new file mode 100755
index 0000000..626bb87
--- /dev/null
+++ b/tests/dd/nocache_eof.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Ensure dd invalidates to EOF when appropriate
+
+# Copyright (C) 2017 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+print_ver_ dd
+require_strace_ fadvise64
+
+head -c1234567 /dev/zero > in.f || framework_failure_
+
+# Check basic operation or skip.
+# We could check for 'Operation not supported' error here,
+# but that was seen to be brittle. HPUX returns ENOTTY for example.
+# So assume that if this basic operation fails, it's due to lack
+# of support by the system.
+dd if=in.f iflag=nocache count=0 ||
+  skip_ 'this file system lacks support for posix_fadvise()'
+
+strace_dd() {
+  strace -o dd.strace -e fadvise64 dd status=none "$@" || fail=1
+}
+
+advised_to_eof() {
+  grep -F ' 0, POSIX_FADV_DONTNEED' dd.strace >/dev/null
+}
+
+strace_dd if=in.f of=out.f bs=1M oflag=direct
+# fadvise64(1, 1048576, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+strace_dd if=in.f of=out.f bs=1M oflag=nocache,sync
+#fadvise64(1, 0, 1048576, POSIX_FADV_DONTNEED) = 0
+#fadvise64(1, 1048576, 131072, POSIX_FADV_DONTNEED) = 0
+#fadvise64(1, 1179648, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+strace_dd if=in.f count=0 iflag=nocache
+#fadvise64(0, 0, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+strace_dd if=in.f of=/dev/null iflag=nocache skip=10 count=300
+#fadvise64(0, 5120, 131072, POSIX_FADV_DONTNEED) = 0
+#fadvise64(0, 136192, 22528, POSIX_FADV_DONTNEED) = 0
+returns_ 1 advised_to_eof || fail=1
+
+strace_dd if=in.f of=/dev/null iflag=nocache bs=1M count=3000
+#fadvise64(0, 0, 1048576, POSIX_FADV_DONTNEED) = 0
+#fadvise64(0, 1048576, 131072, POSIX_FADV_DONTNEED) = 0
+#fadvise64(0, 1179648, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+strace_dd if=in.f of=/dev/null bs=1M count=1 iflag=nocache
+#fadvise64(0, 0, 1048576, POSIX_FADV_DONTNEED) = 0
+returns_ 1 advised_to_eof || fail=1
+
+strace_dd if=in.f of=out.f bs=1M iflag=nocache oflag=nocache,sync
+#fadvise64(0, 0, 1048576, POSIX_FADV_DONTNEED) = 0
+#fadvise64(1, 0, 1048576, POSIX_FADV_DONTNEED) = 0
+#fadvise64(0, 1048576, 131072, POSIX_FADV_DONTNEED) = 0
+#fadvise64(1, 1048576, 131072, POSIX_FADV_DONTNEED) = 0
+#fadvise64(0, 1179648, 0, POSIX_FADV_DONTNEED) = 0
+#fadvise64(1, 1179648, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+strace_dd if=in.f of=out.f bs=1M oflag=direct,sync seek=512 oflag=seek_bytes
+#fadvise64(1, 1048576, 0, POSIX_FADV_DONTNEED) = 0
+advised_to_eof || fail=1
+
+Exit $fail
diff --git a/tests/local.mk b/tests/local.mk
index 42e247e..74426f6 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -511,6 +511,7 @@ all_tests =					\
   tests/dd/misc.sh				\
   tests/dd/no-allocate.sh			\
   tests/dd/nocache.sh				\
+  tests/dd/nocache_eof.sh			\
   tests/dd/not-rewound.sh			\
   tests/dd/reblock.sh				\
   tests/dd/skip-seek.pl				\
-- 
2.9.3



From MAILER-DAEMON Mon Oct 16 03:15:21 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e3zcP-0003Rb-LO
	for mharc-coreutils@gnu.org; Mon, 16 Oct 2017 03:15:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49967)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3zcI-0003Ha-I7
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:15:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e3zcH-000286-Bf
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:15:14 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:48352)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e3zcH-00027P-1V
	for coreutils@gnu.org; Mon, 16 Oct 2017 03:15:13 -0400
Received: from localhost.net (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 724879A54;
	Mon, 16 Oct 2017 08:15:11 +0100 (IST)
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] dd: support iflag=direct with arbitrary sized files
Date: Mon, 16 Oct 2017 00:15:04 -0700
Message-Id: <20171016071504.17251-1-P@draigBrady.com>
X-Mailer: git-send-email 2.9.3
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Oct 2017 07:15:20 -0000

* src/dd.c (iread): Handle read error with a non-aligned
file offset in the O_DIRECT case.
* tests/dd/direct.sh: Test the iflag=direct case also.
* NEWS: Mention the improvement.
---
 NEWS               |  4 ++++
 src/dd.c           | 15 +++++++++++----
 tests/dd/direct.sh |  4 ++--
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index c61e4e8..00cf6df 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ GNU coreutils NEWS                                    -*- outline -*-
   to attempt to hide the original length of the file name.
   [bug introduced in coreutils-8.28]
 
+** Improvements
+
+  dd now supports iflag=direct with arbitrary sized files.
+
 ** Build-related
 
   Default man pages are now distributed which are used if perl is
diff --git a/src/dd.c b/src/dd.c
index 636fac6..613dfe0 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1108,11 +1108,21 @@ static ssize_t
 iread (int fd, char *buf, size_t size)
 {
   ssize_t nread;
+  static ssize_t prev_nread;
 
   do
     {
       process_signals ();
       nread = read (fd, buf, size);
+      /* Ignore final read error with iflag=direct as that
+         returns EINVAL due to the non aligned file offset.  */
+      if (nread == -1 && errno == EINVAL
+          && 0 < prev_nread && prev_nread < size
+          && (input_flags & O_DIRECT))
+        {
+          errno = 0;
+          nread = 0;
+        }
     }
   while (nread < 0 && errno == EINTR);
 
@@ -1122,8 +1132,6 @@ iread (int fd, char *buf, size_t size)
 
   if (0 < nread && warn_partial_read)
     {
-      static ssize_t prev_nread;
-
       if (0 < prev_nread && prev_nread < size)
         {
           uintmax_t prev = prev_nread;
@@ -1136,10 +1144,9 @@ iread (int fd, char *buf, size_t size)
                    prev);
           warn_partial_read = false;
         }
-
-      prev_nread = nread;
     }
 
+  prev_nread = nread;
   return nread;
 }
 
diff --git a/tests/dd/direct.sh b/tests/dd/direct.sh
index e440ba3..f6bc9ca 100755
--- a/tests/dd/direct.sh
+++ b/tests/dd/direct.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# ensure that dd's oflag=direct works
+# ensure that dd's iflag=direct and oflag=direct work
 
 # Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
@@ -29,7 +29,7 @@ truncate -s 8193 p1 || framework_failure_
 
 for i in short m1 p1; do
   rm -f out
-  dd if=$i oflag=direct of=out || fail=1
+  dd if=$i iflag=direct oflag=direct of=out || fail=1
 done
 
 Exit $fail
-- 
2.9.3



From MAILER-DAEMON Mon Oct 16 08:03:21 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e4477-0007AJ-8o
	for mharc-coreutils@gnu.org; Mon, 16 Oct 2017 08:03:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50669)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <joao.eiras@gmail.com>) id 1e43aK-0002KH-NN
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:29:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <joao.eiras@gmail.com>) id 1e43aJ-0001z3-O9
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:29:28 -0400
Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:45477)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <joao.eiras@gmail.com>)
	id 1e43aJ-0001y4-JY
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:29:27 -0400
Received: by mail-oi0-x22f.google.com with SMTP id f66so24562140oib.2
	for <coreutils@gnu.org>; Mon, 16 Oct 2017 04:29:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:content-transfer-encoding;
	bh=bS87xHeosOEPxIfJ3wFvxwe4J8Zikf8CXcMQNyBMRYc=;
	b=I8NiDjiXVLtTwVkp1EDHFaSzDOAgvAmpjx2XYsX4VUpQN5MuyzO0keI15CYbAIwIw5
	RPFht/EZ+9gBpgVcHKU9Cu7XshEc/cOO0qXomixybmS/YdNDydM9X9MMGwma0GZXpM/I
	y+iLEWdTT11O6nh1umKDS9Sd+ckFow26O3GYXxsQ/jMHgTfLnyU+QEz+HNZiz2/EqLAx
	burC5D+uQ4GIf6MfyT6EeqNy5w4bl7rZ4r2Chntswqz+QYhBTXGxDGHUYhqxUmkJ+nvD
	7AIR6/PiH4t6MxvTl+zvKiNGsDO/XjCNQt5BO1vUfH8H7T4kOnvEpEL2SiZMYjd0l3lf
	OFxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-transfer-encoding;
	bh=bS87xHeosOEPxIfJ3wFvxwe4J8Zikf8CXcMQNyBMRYc=;
	b=Sd/7tKb4MbMLdJtcpEewFcKLmKcfpMuBQZ77oGmJHg+MqFvm74QCOerznb29mNXKwm
	6elPDl/Q0uA8luf1Q650hqRfcvN0Knzgpu8IdnXTm/izj/98PTkpFoMpy8YDqWlsMxm4
	ZoEDJM1QPecqsN47teKAisEsWeV5wwtTbQqOoR2rv95OEB6ongb3F/VD7sTKXoQq+23r
	sNn0f6eOmKxu8MBxHqkn1kUefcK802mNJpLi1ZcoH3UszDIRVrBTXutrZlQaZUuxAJI1
	w+YiGsl0LLIk/tk475Y7yW9au3TEUkIVzPKAQARZiSvI8ZAMMnVL6ngpRKUkCNzuKz/J
	wEDQ==
X-Gm-Message-State: AMCzsaU+d8/KmpryLWhPquXjVW03MKJJYFPgneuMSbqpmOiPIK8MZAkb
	5qpvwccO3lZbJvG8RxqpeCs2DFsT0cF/DScD1Fhh
X-Google-Smtp-Source: ABhQp+Q50g0tSttG9uOQ+PEBhjzKb3lGuB8ahZktYpmmb7cGut7Kx/xLwJ3JQCbQgs7LpK2M9mz/WZC/TPVId2Hor/I=
X-Received: by 10.202.193.132 with SMTP id r126mr1620751oif.167.1508153366608; 
	Mon, 16 Oct 2017 04:29:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.91.105 with HTTP; Mon, 16 Oct 2017 04:28:46 -0700 (PDT)
In-Reply-To: <CAJ+sA05p9ViQBoO54wZKC_E3gc=njd8ABp_fVeCxJ+TPm7ezTA@mail.gmail.com>
References: <CAJ+sA05p9ViQBoO54wZKC_E3gc=njd8ABp_fVeCxJ+TPm7ezTA@mail.gmail.com>
From: =?UTF-8?Q?Jo=C3=A3o_Eiras?= <joao.eiras@gmail.com>
Date: Mon, 16 Oct 2017 13:28:46 +0200
Message-ID: <CAJ+sA066eFzbXT-weWDae5bEpz9-NGsygmh4_F35qBJHMg3shA@mail.gmail.com>
Subject: Re: Realpath resolving current folder with no-symlinks
To: coreutils@gnu.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4003:c06::22f
X-Mailman-Approved-At: Mon, 16 Oct 2017 08:03:19 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Oct 2017 11:29:29 -0000

On 16 October 2017 at 13:23, Jo=C3=A3o Eiras <joao.eiras@gmail.com> wrote:
> Howdy.
>
> An issue bit me recently. Consider the following:
>
> $ cd
> $ mkdir -p realfolder/subfolder
> $ ln -s realfolder linkedfolder
> $ cd linkedfolder
> $ realpath --no-symlinks blah
> /home/.../realfolder/blah
> $ cd subfolder
> $ realpath --no-symlinks blah
> /home/.../linkedfolder/subfolder/blah
>
> The first call to realpath resolves the relative path to "blah" to be
> an absolute path, but it is resolving symlinks for the current working
> folder (.) even though --no-symlinks is given.
>
> The second call happens inside a subfolder, not directly inside the
> linked folder and realpath is no longer resolving the symlinks for
> that one.

I forgot to tell, I tried the above in cygwin with coreutils 8.26

Meanwhile I tried in linux with coreutils 8.25 and I get

$ cd linkedfolder
$ realpath --no-symlinks blah
/home/.../realfolder/blah
$ cd subfolder
$ realpath --no-symlinks blah
/home/.../realfolder/subfolder/blah

So, in this case (linux and coreutils 8.25) the behavior is
consistent, but it still resolves symlinks against the --no-symlinks
option.

Is this by design ?

Thank you.


From MAILER-DAEMON Mon Oct 16 08:03:23 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e4479-0007BY-CI
	for mharc-coreutils@gnu.org; Mon, 16 Oct 2017 08:03:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49140)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <joao.eiras@gmail.com>) id 1e43Un-0008RO-DN
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:23:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <joao.eiras@gmail.com>) id 1e43Um-0007bV-II
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:23:45 -0400
Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:52743)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <joao.eiras@gmail.com>)
	id 1e43Um-0007aM-Bc
	for coreutils@gnu.org; Mon, 16 Oct 2017 07:23:44 -0400
Received: by mail-oi0-x232.google.com with SMTP id c202so24370931oih.9
	for <coreutils@gnu.org>; Mon, 16 Oct 2017 04:23:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:from:date:message-id:subject:to;
	bh=2IW4kB0xbqcA1AHJ+5ZR2vwn6WApjLtXIJa0/ULksAg=;
	b=X9FLHuBWl90118Lo/VvapXswkUbFNQ6jd2xAi85/u9DhJPVfZMEGkJY4KtcBahV2fy
	/DDpKgCEiQG9tAs5fA1goDWhxEpmaH/sWXLrNilXt0ehIxg1g8Fe0tlHFNQzuKNg30dc
	DYV2lR6Dxp8iH4BpAyEHzTmP2UGmbQLpON/U+snS+bC1AoOqR5Om+lgw0mPz5ZW7/86x
	RaClykbTPsfhgc/0tELx+lJgoUh8pWCErl7NCaqIoycOLZNvMPOYloCjqJwyavScxrMo
	KqJ/mJspJoGw5sz89qk8xxYqGXbaWUv9VTLX7eGpDdftUQyJeoU78aQpuxFO+qDNbXtG
	HTUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=2IW4kB0xbqcA1AHJ+5ZR2vwn6WApjLtXIJa0/ULksAg=;
	b=XB5cRYBEOrvh/jkeAZQ5Mt+UlvhOL+JrPn+J4qWfuU7nqw4mxqMJ2gxowG1E8yX+hC
	m3pWdJN7d6KMJlRLy5qy3yHup8JXP+AtXOV1BLd67wR/8x5Wr+kvyYzcnR/i2EhJNE3q
	hHFIJnZm/mFOSnsEUUT3NbhCrnr2ZS94oN//a9MxY20mvKyvuDNlOQXWEHRLQ1RZHTtL
	40t2nkOQFI7guvaav4/zvUuZPQubDaCmbM9Ey2/ahs/ayZhijInmIKEojq1cFFL7jS/P
	EliOA0TcAeP1YZTkuxczEkj10I7SOALPdKSKxRd5ayI6NTmaouhEeEDwIVVQ16RtWrTQ
	/wEA==
X-Gm-Message-State: AMCzsaVPTF3NIaJ3PGdu96UbtMJ3FFG3HR/zqh8oqPAa29XNMKhDo8QX
	1hYNrLMR4yzBtrKwSg5I0c8T7tgVbjRIIhwVuycX
X-Google-Smtp-Source: ABhQp+QrU2WspStoIGrqfMwxL55c33dJU/fUi/BipDIXUTyGuMrpoERHl2K4mGvCNT4FhpPjYcLD/qXtO7SQogAeeqY=
X-Received: by 10.202.198.194 with SMTP id w185mr5319179oif.329.1508153021076; 
	Mon, 16 Oct 2017 04:23:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.91.105 with HTTP; Mon, 16 Oct 2017 04:23:00 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o_Eiras?= <joao.eiras@gmail.com>
Date: Mon, 16 Oct 2017 13:23:00 +0200
Message-ID: <CAJ+sA05p9ViQBoO54wZKC_E3gc=njd8ABp_fVeCxJ+TPm7ezTA@mail.gmail.com>
Subject: Realpath resolving current folder with no-symlinks
To: coreutils@gnu.org
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4003:c06::232
X-Mailman-Approved-At: Mon, 16 Oct 2017 08:03:19 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Oct 2017 11:23:46 -0000

Howdy.

An issue bit me recently. Consider the following:

$ cd
$ mkdir -p realfolder/subfolder
$ ln -s realfolder linkedfolder
$ cd linkedfolder
$ realpath --no-symlinks blah
/home/.../realfolder/blah
$ cd subfolder
$ realpath --no-symlinks blah
/home/.../linkedfolder/subfolder/blah

The first call to realpath resolves the relative path to "blah" to be
an absolute path, but it is resolving symlinks for the current working
folder (.) even though --no-symlinks is given.

The second call happens inside a subfolder, not directly inside the
linked folder and realpath is no longer resolving the symlinks for
that one.

This is inconsistent behavior and seems to me it violate the
--no-symlinks option,

Comments ?

Thank you !


From MAILER-DAEMON Tue Oct 17 04:10:46 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e4Mxa-0004xS-2S
	for mharc-coreutils@gnu.org; Tue, 17 Oct 2017 04:10:46 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55855)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e4MxS-0004uY-Gi
	for coreutils@gnu.org; Tue, 17 Oct 2017 04:10:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e4MxO-0003H8-CO
	for coreutils@gnu.org; Tue, 17 Oct 2017 04:10:38 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:45924)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e4MxO-0003Ft-6n
	for coreutils@gnu.org; Tue, 17 Oct 2017 04:10:34 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 5A289994C
	for <coreutils@gnu.org>; Tue, 17 Oct 2017 09:10:31 +0100 (IST)
Subject: Re: [PATCH] dd: support iflag=direct with arbitrary sized files
To: Coreutils <coreutils@gnu.org>
References: <20171016071504.17251-1-P@draigBrady.com>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <eb10f5c9-cc9b-62f3-3ce6-0614410f57f5@draigBrady.com>
Date: Tue, 17 Oct 2017 01:10:28 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20171016071504.17251-1-P@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Oct 2017 08:10:44 -0000

On 16/10/17 00:15, P=E1draig Brady wrote:
> * src/dd.c (iread): Handle read error with a non-aligned
> file offset in the O_DIRECT case.
> * tests/dd/direct.sh: Test the iflag=3Ddirect case also.
> * NEWS: Mention the improvement.
> ---
>  NEWS               |  4 ++++
>  src/dd.c           | 15 +++++++++++----
>  tests/dd/direct.sh |  4 ++--
>  3 files changed, 17 insertions(+), 6 deletions(-)
>=20
> diff --git a/NEWS b/NEWS
> index c61e4e8..00cf6df 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -16,6 +16,10 @@ GNU coreutils NEWS                                  =
  -*- outline -*-
>    to attempt to hide the original length of the file name.
>    [bug introduced in coreutils-8.28]
> =20
> +** Improvements
> +
> +  dd now supports iflag=3Ddirect with arbitrary sized files.
> +
>  ** Build-related
> =20
>    Default man pages are now distributed which are used if perl is
> diff --git a/src/dd.c b/src/dd.c
> index 636fac6..613dfe0 100644
> --- a/src/dd.c
> +++ b/src/dd.c
> @@ -1108,11 +1108,21 @@ static ssize_t
>  iread (int fd, char *buf, size_t size)
>  {
>    ssize_t nread;
> +  static ssize_t prev_nread;
> =20
>    do
>      {
>        process_signals ();
>        nread =3D read (fd, buf, size);
> +      /* Ignore final read error with iflag=3Ddirect as that
> +         returns EINVAL due to the non aligned file offset.  */
> +      if (nread =3D=3D -1 && errno =3D=3D EINVAL
> +          && 0 < prev_nread && prev_nread < size
> +          && (input_flags & O_DIRECT))
> +        {
> +          errno =3D 0;
> +          nread =3D 0;
> +        }
>      }
>    while (nread < 0 && errno =3D=3D EINTR);
> =20
> @@ -1122,8 +1132,6 @@ iread (int fd, char *buf, size_t size)
> =20
>    if (0 < nread && warn_partial_read)
>      {
> -      static ssize_t prev_nread;
> -
>        if (0 < prev_nread && prev_nread < size)
>          {
>            uintmax_t prev =3D prev_nread;
> @@ -1136,10 +1144,9 @@ iread (int fd, char *buf, size_t size)
>                     prev);
>            warn_partial_read =3D false;
>          }
> -
> -      prev_nread =3D nread;
>      }
> =20
> +  prev_nread =3D nread;
>    return nread;
>  }
> =20
> diff --git a/tests/dd/direct.sh b/tests/dd/direct.sh
> index e440ba3..f6bc9ca 100755
> --- a/tests/dd/direct.sh
> +++ b/tests/dd/direct.sh
> @@ -1,5 +1,5 @@
>  #!/bin/sh
> -# ensure that dd's oflag=3Ddirect works
> +# ensure that dd's iflag=3Ddirect and oflag=3Ddirect work
> =20
>  # Copyright (C) 2009-2017 Free Software Foundation, Inc.
> =20
> @@ -29,7 +29,7 @@ truncate -s 8193 p1 || framework_failure_
> =20
>  for i in short m1 p1; do
>    rm -f out
> -  dd if=3D$i oflag=3Ddirect of=3Dout || fail=3D1
> +  dd if=3D$i iflag=3Ddirect oflag=3Ddirect of=3Dout || fail=3D1
>  done
> =20
>  Exit $fail
>=20

This will need adjusting.
It works on ext4,
and on newer 4.10.6-200.fc25.x86_64) xfs, where it's not actually needed =
as EINVAL is not returned
but on older (centos7) xfs, even the initial read() will return EINVAL,
so we'd have to disable O_DIRECT and retry to support that, which I'm not=
 sure about.
I'll do a bit more testing...

cheers,
P=E1draig


From MAILER-DAEMON Wed Oct 18 12:49:21 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e4rWz-0006rL-No
	for mharc-coreutils@gnu.org; Wed, 18 Oct 2017 12:49:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46158)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <thomas.jarosch@intra2net.com>) id 1e4rVe-0006FE-Ts
	for coreutils@gnu.org; Wed, 18 Oct 2017 12:48:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <thomas.jarosch@intra2net.com>) id 1e4rVa-0003JG-Ip
	for coreutils@gnu.org; Wed, 18 Oct 2017 12:47:58 -0400
Received: from rp02.intra2net.com ([62.75.181.28]:50104)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <thomas.jarosch@intra2net.com>)
	id 1e4rVa-0003Fq-CJ
	for coreutils@gnu.org; Wed, 18 Oct 2017 12:47:54 -0400
Received: from mail.m.i2n (unknown [172.17.128.1])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by rp02.intra2net.com (Postfix) with ESMTPS id BD85410018C;
	Wed, 18 Oct 2017 18:47:51 +0200 (CEST)
Received: from localhost (mail.m.i2n [127.0.0.1])
	by localhost (Postfix) with ESMTP id 7F6C0B47;
	Wed, 18 Oct 2017 18:47:51 +0200 (CEST)
X-Virus-Scanned: by Intra2net Mail Security (AVE=8.3.48.38,VDF=8.14.29.234)
Received: from storm.m.i2n (storm.m.i2n [172.16.1.2])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.m.i2n (Postfix) with ESMTPS id 9CC16AEE;
	Wed, 18 Oct 2017 18:47:49 +0200 (CEST)
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: coreutils@gnu.org
Cc: Tobias Stoeckmann <tobias@stoeckmann.org>,
	=?ISO-8859-1?Q?P=E1draig?= Brady <P@draigbrady.com>
Subject: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
Date: Wed, 18 Oct 2017 18:47:49 +0200
Message-ID: <1893674.yVKFGJX2gb@storm.m.i2n>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 62.75.181.28
X-Mailman-Approved-At: Wed, 18 Oct 2017 12:49:19 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Oct 2017 16:48:01 -0000

We inherit the signal mask from our parent process,
therefore ensure SIGCHLD is not blocked.

If SIGCHLD is blocked, sigsuspend() won't be interrupted
when the child process exits and we hang until the timeout (SIGALRM).

The issue has been found by an "autotest" testsuite
doing high level tests of a custom distribution.
One complex test case got stuck 100% of the time.

This fixes a regression from

commit 2f69dba5df8caaf9eda658c1808b1379e9949f22
Author: Tobias Stoeckmann <tobias@stoeckmann.org>
Date:   Sun Feb 5 13:23:22 2017 +0100

    timeout: fix race possibly terminating wrong process


Please CC: comments, I'm not subscribed to the list.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
 src/timeout.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/timeout.c b/src/timeout.c
index a58b84f4e..aa2fff7d9 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -323,6 +323,16 @@ parse_duration (const char* str)
   return duration;
 }
 
+static void
+unblock_signal (int sig)
+{
+  sigset_t unblock_set;
+  sigemptyset (&unblock_set);
+  sigaddset (&unblock_set, sig);
+  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) != 0)
+    error (0, errno, _("warning: sigprocmask"));
+}
+
 static void
 install_sigchld (void)
 {
@@ -333,6 +343,10 @@ install_sigchld (void)
                                  more likely to work cleanly.  */
 
   sigaction (SIGCHLD, &sa, NULL);
+
+  /* we inherit the signal mask from our parent process,
+     ensure SIGCHLD is not blocked. */
+  unblock_signal(SIGCHLD);
 }
 
 static void
@@ -369,16 +383,6 @@ block_cleanup (int sigterm, sigset_t *old_set)
     error (0, errno, _("warning: sigprocmask"));
 }
 
-static void
-unblock_signal (int sig)
-{
-  sigset_t unblock_set;
-  sigemptyset (&unblock_set);
-  sigaddset (&unblock_set, sig);
-  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) != 0)
-    error (0, errno, _("warning: sigprocmask"));
-}
-
 /* Try to disable core dumps for this process.
    Return TRUE if successful, FALSE otherwise.  */
 static bool
-- 
2.14.1



From MAILER-DAEMON Wed Oct 18 22:45:44 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e50q8-0001ul-5p
	for mharc-coreutils@gnu.org; Wed, 18 Oct 2017 22:45:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46126)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e50q6-0001uf-C7
	for coreutils@gnu.org; Wed, 18 Oct 2017 22:45:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e50q1-0006sc-Em
	for coreutils@gnu.org; Wed, 18 Oct 2017 22:45:42 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:48844)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e50q1-0006o2-7H
	for coreutils@gnu.org; Wed, 18 Oct 2017 22:45:37 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id D48AB99FA;
	Thu, 19 Oct 2017 03:45:31 +0100 (IST)
Subject: Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
To: Thomas Jarosch <thomas.jarosch@intra2net.com>, coreutils@gnu.org
References: <1893674.yVKFGJX2gb@storm.m.i2n>
Cc: Tobias Stoeckmann <tobias@stoeckmann.org>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
Date: Wed, 18 Oct 2017 19:45:29 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <1893674.yVKFGJX2gb@storm.m.i2n>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Oct 2017 02:45:43 -0000

On 18/10/17 09:47, Thomas Jarosch wrote:
> We inherit the signal mask from our parent process,
> therefore ensure SIGCHLD is not blocked.
>=20
> If SIGCHLD is blocked, sigsuspend() won't be interrupted
> when the child process exits and we hang until the timeout (SIGALRM).
>=20
> The issue has been found by an "autotest" testsuite
> doing high level tests of a custom distribution.
> One complex test case got stuck 100% of the time.
>=20
> This fixes a regression from
>=20
> commit 2f69dba5df8caaf9eda658c1808b1379e9949f22
> Author: Tobias Stoeckmann <tobias@stoeckmann.org>
> Date:   Sun Feb 5 13:23:22 2017 +0100
>=20
>     timeout: fix race possibly terminating wrong process
>=20
>=20
> Please CC: comments, I'm not subscribed to the list.
>=20
> Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
> ---
>  src/timeout.c | 24 ++++++++++++++----------
>  1 file changed, 14 insertions(+), 10 deletions(-)
>=20
> diff --git a/src/timeout.c b/src/timeout.c
> index a58b84f4e..aa2fff7d9 100644
> --- a/src/timeout.c
> +++ b/src/timeout.c
> @@ -323,6 +323,16 @@ parse_duration (const char* str)
>    return duration;
>  }
> =20
> +static void
> +unblock_signal (int sig)
> +{
> +  sigset_t unblock_set;
> +  sigemptyset (&unblock_set);
> +  sigaddset (&unblock_set, sig);
> +  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) !=3D 0)
> +    error (0, errno, _("warning: sigprocmask"));
> +}
> +
>  static void
>  install_sigchld (void)
>  {
> @@ -333,6 +343,10 @@ install_sigchld (void)
>                                   more likely to work cleanly.  */
> =20
>    sigaction (SIGCHLD, &sa, NULL);
> +
> +  /* we inherit the signal mask from our parent process,
> +     ensure SIGCHLD is not blocked. */
> +  unblock_signal(SIGCHLD);
>  }
> =20
>  static void
> @@ -369,16 +383,6 @@ block_cleanup (int sigterm, sigset_t *old_set)
>      error (0, errno, _("warning: sigprocmask"));
>  }
> =20
> -static void
> -unblock_signal (int sig)
> -{
> -  sigset_t unblock_set;
> -  sigemptyset (&unblock_set);
> -  sigaddset (&unblock_set, sig);
> -  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) !=3D 0)
> -    error (0, errno, _("warning: sigprocmask"));
> -}
> -
>  /* Try to disable core dumps for this process.
>     Return TRUE if successful, FALSE otherwise.  */
>  static bool
>=20

Drats, right thanks.

Isn't there also a small race if SIGCHLD is received
after wait() returns but before the sigsuspend() runs?
I.E. would this also be an appropriate addition to your patch:

diff --git a/src/timeout.c b/src/timeout.c
index a58b84f..1a9fe50 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -352,10 +352,12 @@ install_cleanup (int sigterm)
   sigaction (sigterm, &sa, NULL); /* user specified termination signal. =
 */
 }

-/* Blocks all signals which were registered with cleanup
-   as signal handler.  Return original mask in OLD_SET.  */
+/* Block all signals which were registered with cleanup
+   as signal handler.  Also block SIGCHLD to ensure
+   sigsuspend() doesn't miss it.
+   Return original mask in OLD_SET.  */
 static void
-block_cleanup (int sigterm, sigset_t *old_set)
+block_cleanup_and_chld (int sigterm, sigset_t *old_set)
 {
   sigset_t block_set;
   sigemptyset (&block_set);
@@ -364,6 +366,7 @@ block_cleanup (int sigterm, sigset_t *old_set)
   sigaddset (&block_set, SIGQUIT);
   sigaddset (&block_set, SIGHUP);
   sigaddset (&block_set, SIGTERM);
+  sigaddset (&block_set, SIGCHLD);
   sigaddset (&block_set, sigterm);
   if (sigprocmask (SIG_BLOCK, &block_set, old_set) !=3D 0)
     error (0, errno, _("warning: sigprocmask"));
@@ -504,7 +507,7 @@ main (int argc, char **argv)
       /* Ensure we don't cleanup() after waitpid() reaps the child,
          to avoid sending signals to a possibly different process.  */
       sigset_t cleanup_set;
-      block_cleanup (term_signal, &cleanup_set);
+      block_cleanup_and_chld (term_signal, &cleanup_set);

       while ((wait_result =3D waitpid (monitored_pid, &status, WNOHANG))=
 =3D=3D 0)
         sigsuspend (&cleanup_set);  /* Wait with cleanup signals unblock=
ed.  */



From MAILER-DAEMON Wed Oct 18 23:13:11 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e51Gg-0004ag-Vo
	for mharc-coreutils@gnu.org; Wed, 18 Oct 2017 23:13:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50651)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e51Ga-0004aL-SZ
	for coreutils@gnu.org; Wed, 18 Oct 2017 23:13:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e51GW-0003F3-27
	for coreutils@gnu.org; Wed, 18 Oct 2017 23:13:04 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:54724)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e51GV-0003EM-RR
	for coreutils@gnu.org; Wed, 18 Oct 2017 23:12:59 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 69B031E6;
	Thu, 19 Oct 2017 04:12:57 +0100 (IST)
Subject: Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
To: Thomas Jarosch <thomas.jarosch@intra2net.com>, coreutils@gnu.org
References: <1893674.yVKFGJX2gb@storm.m.i2n>
	<8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
Cc: Tobias Stoeckmann <tobias@stoeckmann.org>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <c4ce2d1c-3448-266a-c862-fd9be82418a0@draigBrady.com>
Date: Wed, 18 Oct 2017 20:12:55 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Oct 2017 03:13:09 -0000

On 18/10/17 19:45, P=E1draig Brady wrote:
> On 18/10/17 09:47, Thomas Jarosch wrote:
>> We inherit the signal mask from our parent process,
>> therefore ensure SIGCHLD is not blocked.
>>
>> If SIGCHLD is blocked, sigsuspend() won't be interrupted
>> when the child process exits and we hang until the timeout (SIGALRM).
>>
>> The issue has been found by an "autotest" testsuite
>> doing high level tests of a custom distribution.
>> One complex test case got stuck 100% of the time.
>>
>> This fixes a regression from
>>
>> commit 2f69dba5df8caaf9eda658c1808b1379e9949f22
>> Author: Tobias Stoeckmann <tobias@stoeckmann.org>
>> Date:   Sun Feb 5 13:23:22 2017 +0100
>>
>>     timeout: fix race possibly terminating wrong process
>>
>>
>> Please CC: comments, I'm not subscribed to the list.
>>
>> Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
>> ---
>>  src/timeout.c | 24 ++++++++++++++----------
>>  1 file changed, 14 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/timeout.c b/src/timeout.c
>> index a58b84f4e..aa2fff7d9 100644
>> --- a/src/timeout.c
>> +++ b/src/timeout.c
>> @@ -323,6 +323,16 @@ parse_duration (const char* str)
>>    return duration;
>>  }
>> =20
>> +static void
>> +unblock_signal (int sig)
>> +{
>> +  sigset_t unblock_set;
>> +  sigemptyset (&unblock_set);
>> +  sigaddset (&unblock_set, sig);
>> +  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) !=3D 0)
>> +    error (0, errno, _("warning: sigprocmask"));
>> +}
>> +
>>  static void
>>  install_sigchld (void)
>>  {
>> @@ -333,6 +343,10 @@ install_sigchld (void)
>>                                   more likely to work cleanly.  */
>> =20
>>    sigaction (SIGCHLD, &sa, NULL);
>> +
>> +  /* we inherit the signal mask from our parent process,
>> +     ensure SIGCHLD is not blocked. */
>> +  unblock_signal(SIGCHLD);
>>  }
>> =20
>>  static void
>> @@ -369,16 +383,6 @@ block_cleanup (int sigterm, sigset_t *old_set)
>>      error (0, errno, _("warning: sigprocmask"));
>>  }
>> =20
>> -static void
>> -unblock_signal (int sig)
>> -{
>> -  sigset_t unblock_set;
>> -  sigemptyset (&unblock_set);
>> -  sigaddset (&unblock_set, sig);
>> -  if (sigprocmask (SIG_UNBLOCK, &unblock_set, NULL) !=3D 0)
>> -    error (0, errno, _("warning: sigprocmask"));
>> -}
>> -
>>  /* Try to disable core dumps for this process.
>>     Return TRUE if successful, FALSE otherwise.  */
>>  static bool
>>
>=20
> Drats, right thanks.
>=20
> Isn't there also a small race if SIGCHLD is received
> after wait() returns but before the sigsuspend() runs?
> I.E. would this also be an appropriate addition to your patch:

On second thoughts there probably best as separate patchces
as they're separate issues really.
1. consistent hang with blocked SIGCHLD in parent
2. intermittent hang in all cases.

cheers,
P=E1draig


From MAILER-DAEMON Thu Oct 19 13:53:33 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e5F0f-0005d5-DK
	for mharc-coreutils@gnu.org; Thu, 19 Oct 2017 13:53:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60107)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tobias@stoeckmann.org>) id 1e5EqS-0003Qw-3w
	for coreutils@gnu.org; Thu, 19 Oct 2017 13:43:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tobias@stoeckmann.org>) id 1e5EqP-0002Dy-1g
	for coreutils@gnu.org; Thu, 19 Oct 2017 13:43:00 -0400
Received: from mout.kundenserver.de ([212.227.126.187]:53961)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <tobias@stoeckmann.org>)
	id 1e5EqO-0002D8-O8
	for coreutils@gnu.org; Thu, 19 Oct 2017 13:42:56 -0400
Received: from localhost ([217.87.198.192]) by mrelayeu.kundenserver.de
	(mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id
	0MBWuQ-1dy3Ja2x1C-00AWY5; Thu, 19 Oct 2017 19:42:52 +0200
Subject: Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
To: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>,
	Thomas Jarosch <thomas.jarosch@intra2net.com>, coreutils@gnu.org
References: <1893674.yVKFGJX2gb@storm.m.i2n>
	<8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
From: =?UTF-8?Q?Tobias_St=c3=b6ckmann?= <tobias@stoeckmann.org>
Message-ID: <13d04fba-8371-aca5-2f58-9c3cf3923f3b@stoeckmann.org>
Date: Thu, 19 Oct 2017 19:42:59 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
	Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:8SkXEtNPDyirrnC/sqwCNTg4f3j7npoZs9dTkSr0720MOkZPp1T
	6rRhaehpC2/WP6oDTgzCzUHBalHLI/8x5XQeu/7n1AiQu4set5KQwahKPaMZSuGRO6R7Dae
	W523PbjQ37R2NaU28CCANt1ZXE99bL3tX7OlbspAmTpbiiWi2J2kcwe53uABwB9RCn4AcQ1
	fTyHL7Hmq79aFafXIsr8w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:h1zweGb4WfQ=:pljGo7lwLe6F5xSZv6CrX9
	wC6uTWVE8k9TyK5IveEwS4GSFLO1vRGHHEEmWLaNiBTVbPJl0mFIKsRHkp35Gcet/MM2TqqG4
	Pko/2h6Xl4z6rLmbLMLT3lSbZOsbyzrGiABpdtmO+DscvWn0FXZg742SSzFeZ+yIDFErcR5+h
	UDr5JJoBk94iyv2OBksyBS3i7515JODWf2pC0tXmWFHhXxlPTZYDNPqLBZjdQw9S+4tNBpiVs
	vKeSyQJO1BDOUUNdPlbkvVFt1RA3OoEHrNsJ8W6BZrlAj6CsI/58oLl30fsF05GGPnyNY7Zau
	hnBg1NXo7ss98Gio5PULHZePlGGYAep9v1a3Vxlzd2Y0qodJH63W3H1/QDzXVZcW5EOk+qA8E
	Y9oIfIVPY6WJI7TXcfXQR4u5CPp3SL9l8ej5Eni3Tu4qpvgPQC7brSSxIr3LtYVlBwc58ZD/m
	NXjDgKcZZW8TE+1Gjg1Mm5UqxHOXR2HFKPx3DvCAk33/buesWn6UKhgdioGDMli0pmMbW0NR1
	TcZotKc9XwtFkGQXxYTfPAQbq4f/TMhOuiWNBvFZ6WtBNnMWE8WRKsq9rIG/sHc+hwULBwybH
	FHnIg3MrTPhbKFiCWIK1Jyo1UyoleOkXhnK2BquKNbT9H5W6inqBGfsde/rq93J9YZBGexjMp
	fGvBKOY1CJl9sscjtUiLzGkY4efj4oFy1Co62ZEiKGBzVHUkzN+nyTSzqpzhfuIdYyKDNtKMn
	oUmbXy5bLftwKrBDyFTx3Lq5DW+iPXXLInW3XWqOlqSZ1BOoN+q4fqkHhCo=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.126.187
X-Mailman-Approved-At: Thu, 19 Oct 2017 13:53:32 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Oct 2017 17:43:04 -0000

Hi,

On 19/10/17 04:45, Pádraig Brady wrote:
> Isn't there also a small race if SIGCHLD is received
> after wait() returns but before the sigsuspend() runs?

great catch, that could happen indeed. As you wrote in your other mail,
this should go in as a separate patch as it fixes another issue my
original patch tried to address.

The one reported by Thomas is an actually introduced regression, sorry
for that.


Tobias


From MAILER-DAEMON Thu Oct 19 18:28:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e5JIf-0006aR-Bs
	for mharc-coreutils@gnu.org; Thu, 19 Oct 2017 18:28:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36574)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e5JIZ-0006YV-6h
	for coreutils@gnu.org; Thu, 19 Oct 2017 18:28:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e5JIY-00065n-5y
	for coreutils@gnu.org; Thu, 19 Oct 2017 18:28:19 -0400
Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:46642)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <meyering@gmail.com>) id 1e5JIY-00063U-0q
	for coreutils@gnu.org; Thu, 19 Oct 2017 18:28:18 -0400
Received: by mail-qk0-x233.google.com with SMTP id k123so12292136qke.3
	for <coreutils@gnu.org>; Thu, 19 Oct 2017 15:28:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc:content-transfer-encoding;
	bh=Ryh6HvSOo3apfARqJp7EBuLUXBTzqQE2TdwBjJ2Qxjs=;
	b=mQ8AWRCzq0XmoWwXuUy2L8D1Anq136r0Ls22FCPUrq/ho4WJcAtVXMpZ1h4AXAez+j
	KGbU75ohjAYnzzKnkIPLPGEmNnI8t/NvGWhc/6lrlOyag2BtuAgMhbnUUxxMcurrXV9i
	1LPB4ibWCbokZQddbP7cM69h91Xh/QUHDJmZ4aNcJVURs3EYG4CpselAWuAMrSL1dr4V
	Gr1D52hnkoPPWHJSQuXyfvSz+Cx/V66AsF612QQar1ZMKpfMohFIMLcZb4HMvJjDKzq6
	T7we4iYnAx0LeP1yc12IMHVb6/X0oQqScW+RGKmibA1hvX8IZT65DtksuW8d5xWy/DhU
	MGkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc:content-transfer-encoding;
	bh=Ryh6HvSOo3apfARqJp7EBuLUXBTzqQE2TdwBjJ2Qxjs=;
	b=XNg/AZU2QBZpVS/eq8wKoFwADEv9JRG0qym1SUMLdN6sqTHo35ErniPlhJMvvpUhh3
	LtZm0GQLQJtQy0s4ASCX+Ts5TKrxOh1uWFnY+9XWGRTboaO9Q68K1AsZ8pLa1Fi7rHNv
	uyPy+PeLHAvD/rUMZFk8S+WZRFUm+6sSEijLAeSy/IyFvG3WjzfKRUc1en4z5lllkneB
	REjpeynit46TUZShsvH0vZGUC9U5VX+BEdjQssUyy/np68ZJqJ168U0fTJzTPPXUBHj4
	brBLcfT+uugVN4yKGbSizsdibxTJtmlCMyw1vn1zHhsCVCYg6a+UdmjeW8blsLp/FegC
	oNYA==
X-Gm-Message-State: AMCzsaWdx4spyHKAS2PUZMDpSJCDzhZh/su1BPErE0RoYIGIUU/NBYxq
	9abYU+73ZfoTSIpxb+koFaYulN4Wxxu0/i2DTGA=
X-Google-Smtp-Source: ABhQp+TLaPBRoIvh0SfR+i8pH/TyQsg2nA0d16GnLEfuqLY/px3wfBXwjvaM90Gwvml/w9lBR+fZK/AIqhyG1azBOog=
X-Received: by 10.55.116.197 with SMTP id p188mr3894121qkc.125.1508452096274; 
	Thu, 19 Oct 2017 15:28:16 -0700 (PDT)
MIME-Version: 1.0
Sender: meyering@gmail.com
Received: by 10.55.198.145 with HTTP; Thu, 19 Oct 2017 15:27:55 -0700 (PDT)
In-Reply-To: <541AE88E.4050306@draigBrady.com>
References: <541AC7F9.2030906@zoho.com> <541AE88E.4050306@draigBrady.com>
From: Jim Meyering <jim@meyering.net>
Date: Thu, 19 Oct 2017 15:27:55 -0700
X-Google-Sender-Auth: natFS4IrA5leH50TicUPVG6EJUo
Message-ID: <CA+8g5KFBGuUVECUODv2vo+Yz=6b07y7A6jmVzK0_KBLUOJstcQ@mail.gmail.com>
Subject: Re: Bug#762092: sha...sum man pages refer to nonexistent 'sha...sum
	invocation' info pages
To: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@draigbrady.com>
Cc: Rebecca Palmer <rebecca_palmer@zoho.com>, 762092@bugs.debian.org, 
	Coreutils <coreutils@gnu.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c09::233
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Oct 2017 22:28:24 -0000

On Thu, Sep 18, 2014 at 7:13 AM, P=C3=A1draig Brady <P@draigbrady.com> wrot=
e:
> On 09/18/2014 12:54 PM, Rebecca Palmer wrote:
>> Package: coreutils
>> Version: 8.23-2
>> Severity: minor
>> Control: tags -1 patch
>>
>> The man page of sha512sum states that more documentation can be found at=
 info coreutils 'sha512sum invocation', but this info node does not exist; =
the correct name is 'sha2 utilities'.  At least sha256sum, and I suspect al=
l four sizes, are also affected.
>>
>> (See also #760861.)
>
> Attached 2 patches will address this in the next upstream release.

Here is a perhaps-simpler approach:

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 47a9f6d25..c76be2280 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3998,6 +3998,10 @@ sha2 utilities
 @pindex sha256sum
 @pindex sha384sum
 @pindex sha512sum
+@pindex sha224sum invocation
+@pindex sha256sum invocation
+@pindex sha384sum invocation
+@pindex sha512sum invocation
 @cindex SHA-2
 @cindex 224-bit checksum
 @cindex 256-bit checksum


From MAILER-DAEMON Fri Oct 20 11:47:06 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e5ZVq-0005fJ-7p
	for mharc-coreutils@gnu.org; Fri, 20 Oct 2017 11:47:06 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41702)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <thomas.jarosch@intra2net.com>) id 1e5ZVl-0005bA-Nq
	for coreutils@gnu.org; Fri, 20 Oct 2017 11:47:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <thomas.jarosch@intra2net.com>) id 1e5ZVi-0006RN-ML
	for coreutils@gnu.org; Fri, 20 Oct 2017 11:47:01 -0400
Received: from rp02.intra2net.com ([62.75.181.28]:36458)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <thomas.jarosch@intra2net.com>)
	id 1e5ZVi-0006Qw-Fd
	for coreutils@gnu.org; Fri, 20 Oct 2017 11:46:58 -0400
Received: from mail.m.i2n (unknown [172.17.128.1])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by rp02.intra2net.com (Postfix) with ESMTPS id A779D10017D;
	Fri, 20 Oct 2017 17:46:55 +0200 (CEST)
Received: from localhost (mail.m.i2n [127.0.0.1])
	by localhost (Postfix) with ESMTP id 6A65BA9E;
	Fri, 20 Oct 2017 17:46:55 +0200 (CEST)
X-Virus-Scanned: by Intra2net Mail Security (AVE=8.3.48.38,VDF=8.14.29.234)
Received: from storm.m.i2n (storm.m.i2n [172.16.1.2])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mail.m.i2n (Postfix) with ESMTPS id A39C2611;
	Fri, 20 Oct 2017 17:46:53 +0200 (CEST)
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: Tobias =?ISO-8859-1?Q?St=F6ckmann?= <tobias@stoeckmann.org>
Cc: =?ISO-8859-1?Q?P=E1draig?= Brady <P@draigbrady.com>, coreutils@gnu.org
Subject: Re: [PATCH] timeout: Ensure SIGCHLD signal is not blocked
Date: Fri, 20 Oct 2017 17:46:53 +0200
Message-ID: <2553589.9XBJfnfPKc@storm.m.i2n>
Organization: Intra2net AG
In-Reply-To: <13d04fba-8371-aca5-2f58-9c3cf3923f3b@stoeckmann.org>
References: <1893674.yVKFGJX2gb@storm.m.i2n>
	<8043843f-9aaa-5e89-028a-02d073c46396@draigBrady.com>
	<13d04fba-8371-aca5-2f58-9c3cf3923f3b@stoeckmann.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 62.75.181.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Oct 2017 15:47:05 -0000

Hi Tobias,

On Thursday, 19 October 2017 19:42:59 CEST Tobias St=F6ckmann wrote:
> On 19/10/17 04:45, P=E1draig Brady wrote:
> > Isn't there also a small race if SIGCHLD is received
> > after wait() returns but before the sigsuspend() runs?
>=20
> great catch, that could happen indeed. As you wrote in your other mail,
> this should go in as a separate patch as it fixes another issue my
> original patch tried to address.
>=20
> The one reported by Thomas is an actually introduced regression, sorry
> for that.

no worries about the regression, such stuff happens all the time.
It took several hours to track down the issue because every time I
ran timeout(1) via strace, it worked just fine. After a lot of printf=20
debugging in timeout(1) I found out what was going on.

Before switching to timeout(1), we had an similar implementation called=20
"exec_timeout". It suffers from the same race condition that you fixed ;)
Another good point for having timeout(1) in coreutils.

Cheers,
Thomas



From MAILER-DAEMON Tue Oct 24 04:53:21 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e6uxc-0002Xi-Uu
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 04:53:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52121)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e6uxa-0002W8-MG
	for coreutils@gnu.org; Tue, 24 Oct 2017 04:53:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e6uxZ-00010U-Rb
	for coreutils@gnu.org; Tue, 24 Oct 2017 04:53:18 -0400
Received: from out4440.biz.mail.alibaba.com ([47.88.44.40]:30655)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e6uxU-0000uz-BY; Tue, 24 Oct 2017 04:53:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1508835176;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; 
	bh=K61r8L7tdCyGIr4kkr3K0QucmqJPXv0DKT7MOqMq8B8=;
	b=AYykXl35fPo7ZAPMC3cRLPBMk0VrtuvfbbVwzTp3TFYrN7uQL2D0ATkO1v/dNiHU47EqE8EKUA5+F2VDwZWwqQjdCR29nYL94IQDUJG2D7IS+HhdZMbQ1wVra1qpK1O7ubv0PP4GrcUST2/LYRX833Hj7wTN5KbLjHwesmydVM8=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R711e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03293;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=4; SR=0;
	TI=SMTPD_---.9DuPHDM_1508834210; 
Received: from ali-6c96cfd98fb5.local(mailfrom:qianyue.zj@alibaba-inc.com
	ip:106.11.34.14) by smtp.aliyun-inc.com(127.0.0.1);
	Tue, 24 Oct 2017 16:36:50 +0800
Message-ID: <59EEFBA1.1090308@alibaba-inc.com>
Date: Tue, 24 Oct 2017 16:36:49 +0800
From: "Jia Zhang" <qianyue.zj@alibaba-inc.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;
	rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: Bruno Haible <bruno@clisp.org>, =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?=
	<P@draigbrady.com>
CC: bug-gnulib@gnu.org, coreutils@gnu.org
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<9be73950-f1a5-0a4f-a567-c48729954a13@draigBrady.com>
	<6473292.TjZuIb3LsK@omega>
In-Reply-To: <6473292.TjZuIb3LsK@omega>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.40
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 08:53:20 -0000


于 2017/10/11 下午5:13, Bruno Haible 写道:
> 张佳(乾越) wrote:
>>> Currently, I only implement SM3 in gnulib. I will implement it 
>>> in libgcrypt and openssl later.
> 
> Yes, for a crypto algorjthm to be widely usable in GNU, it needs
> to be available both in GNUTLS (via libgcrypt) and openssl.
> 
> Pádraig Brady wrote:
>> Being available in gnulib is more plausible, though I'd like to 
>> see it in the more specific openssl library first.
> 
> Indeed, we don't have many crypto experts on the gnulib mailing 
> lists. Therefore, I too would like the crypto experts on the 
> libgcrypt or openssl mailing lists to evaluate the SM3 algorithm 
> and your code first, before we can accept it in gnulib.

libgcrypt has merged SM3 hash function. See
https://dev.gnupg.org/rC4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd

I plan to add addition commits to use SM3 functions exported by
libgcrypt, and current implementation is used as baseline for review.
Is it good for you?

Thanks,
Jia

> 
> Bruno
> 


From MAILER-DAEMON Tue Oct 24 06:13:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e6wD7-0004kw-5G
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 06:13:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44304)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bruno@clisp.org>) id 1e6wD4-0004kn-L5
	for coreutils@gnu.org; Tue, 24 Oct 2017 06:13:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bruno@clisp.org>) id 1e6wCz-0002S0-N8
	for coreutils@gnu.org; Tue, 24 Oct 2017 06:13:22 -0400
Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::8]:34903)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <bruno@clisp.org>) id 1e6wCz-0002RP-Dy
	for coreutils@gnu.org; Tue, 24 Oct 2017 06:13:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1508839996;
	s=domk; d=clisp.org;
	h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:
	In-Reply-To:Date:Subject:Cc:To:From;
	bh=18W8bak5tEhRzBAEJhljM9YoiYJXZjLS29EiYA+iSuI=;
	b=NChdexW41ieWvKJHK7GQTPpE2xygE4AM7T1e8YRj/HLxB+nn5wa90hM7xVbh+TK4Xz
	LJ7Be7E4Ky7E3Zv1x1yXtoQQ6/jcVnwQ/7gxSTnmGdWEaAEvpockIcGgavz3HDmUPxX/
	TZHqNqabcvfq2CqVuHJe843KmR8Klw/VoxgG4=
X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf0zZRW
X-RZG-CLASS-ID: mo00
Received: from bruno.haible.de
	(dslb-088-068-032-102.088.068.pools.vodafone-ip.de [88.68.32.102])
	by smtp.strato.de (RZmta 42.8 DYNA|AUTH)
	with ESMTPSA id I0b719t9OA9whKu
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521
	ECDH bits, eq. 15360 bits RSA))
	(Client did not present a certificate);
	Tue, 24 Oct 2017 12:09:58 +0200 (CEST)
From: Bruno Haible <bruno@clisp.org>
To: Jia Zhang <qianyue.zj@alibaba-inc.com>
Cc: =?ISO-8859-1?Q?P=E1draig?= Brady <P@draigbrady.com>, bug-gnulib@gnu.org,
	coreutils@gnu.org
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
Date: Tue, 24 Oct 2017 12:09:56 +0200
Message-ID: <2577472.loxlcmsLqh@omega>
User-Agent: KMail/5.1.3 (Linux/4.4.0-96-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <59EEFBA1.1090308@alibaba-inc.com>
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<6473292.TjZuIb3LsK@omega> <59EEFBA1.1090308@alibaba-inc.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2a01:238:20a:202:5300::8
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 10:13:23 -0000

Hi Jia,

> > Indeed, we don't have many crypto experts on the gnulib mailing 
> > lists. Therefore, I too would like the crypto experts on the 
> > libgcrypt or openssl mailing lists to evaluate the SM3 algorithm 
> > and your code first, before we can accept it in gnulib.
> 
> libgcrypt has merged SM3 hash function. See
> https://dev.gnupg.org/rC4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd

Or [1].

Thanks. I see it wasn't an easy discussion [2], but now it's over,
so I'm awaiting your gnulib patches.

> I plan to add addition commits to use SM3 functions exported by
> libgcrypt, and current implementation is used as baseline for review.

Yes, good.

Bruno

[1] https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=shortlog;h=refs/heads/master
[2] https://lists.gnupg.org/pipermail/gcrypt-devel/2017-October/thread.html



From MAILER-DAEMON Tue Oct 24 11:53:26 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e71WA-0001sP-4n
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 11:53:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40385)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mstone@debian.org>) id 1e71W8-0001sJ-H3
	for coreutils@gnu.org; Tue, 24 Oct 2017 11:53:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mstone@debian.org>) id 1e71W5-0002ZE-GG
	for coreutils@gnu.org; Tue, 24 Oct 2017 11:53:24 -0400
Received: from harad.mathom.us ([54.218.24.45]:36386)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <mstone@debian.org>) id 1e71W5-0002Y7-B4
	for coreutils@gnu.org; Tue, 24 Oct 2017 11:53:21 -0400
Received: from osgiliath.mathom.us (osgiliath.mathom.us
	[IPv6:2001:470:e4c3:2341::2])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by harad.mathom.us (Postfix) with ESMTPSA id 4EEE31E3
	for <coreutils@gnu.org>; Tue, 24 Oct 2017 15:53:16 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by osgiliath.mathom.us (Postfix) with ESMTP id 854446E801
	for <coreutils@gnu.org>; Tue, 24 Oct 2017 11:52:45 -0400 (EDT)
Received: from osgiliath.mathom.us ([127.0.0.1])
	by localhost (osgiliath.mathom.us [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id ka8KR4w4Pzo3 for <coreutils@gnu.org>;
	Tue, 24 Oct 2017 11:52:45 -0400 (EDT)
Received: by osgiliath.mathom.us (Postfix, from userid 1000)
	id 6DE2A6E8B5; Tue, 24 Oct 2017 11:52:45 -0400 (EDT)
Date: Tue, 24 Oct 2017 11:52:45 -0400
From: Michael Stone <mstone@debian.org>
To: coreutils@gnu.org
Subject: ls man page/quoting_style
Message-ID: <d2a78f22-b8d2-11e7-9b6a-00163eeb5320@msgid.mathom.us>
Mail-Followup-To: coreutils@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
X-Pgp-Fingerprint: 02D5 315F F11F 1861 860E  1E02 F61A ACDC FA11 FFDE
User-Agent: NeoMutt/20170113 (1.7.2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 54.218.24.45
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 15:53:25 -0000

There's no mention of the QUOTING_STYLE environment variable on the ls 
man page or help output. What about changing 

      --quoting-style=WORD   use quoting style WORD for entry names:
                               literal, locale, shell, shell-always,
                               shell-escape, shell-escape-always, c, escape

to something like

      --quoting-style=WORD   use quoting style WORD for entry names:
                               literal, locale, shell, shell-always,
                               shell-escape, shell-escape-always, c, escape
                               (overrides QUOTING_STYLE environment variable)

Which both hints that the environment knob exists and specifies their 
precedence.

Mike Stone


From MAILER-DAEMON Tue Oct 24 13:39:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e73Aj-0001Qj-8u
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 13:39:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39278)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e73Ah-0001Pl-Jy
	for coreutils@gnu.org; Tue, 24 Oct 2017 13:39:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e73Ad-0002zU-Mj
	for coreutils@gnu.org; Tue, 24 Oct 2017 13:39:23 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:41764)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e73Ad-0002y6-GE
	for coreutils@gnu.org; Tue, 24 Oct 2017 13:39:19 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id BDBF09897;
	Tue, 24 Oct 2017 18:39:14 +0100 (IST)
Subject: Re: ls man page/quoting_style
To: coreutils@gnu.org
References: <d2a78f22-b8d2-11e7-9b6a-00163eeb5320@msgid.mathom.us>
Cc: Michael Stone <mstone@debian.org>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <7de821c5-872a-950b-fe30-c0548c2dd1a4@draigBrady.com>
Date: Tue, 24 Oct 2017 10:39:12 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <d2a78f22-b8d2-11e7-9b6a-00163eeb5320@msgid.mathom.us>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 17:39:24 -0000

On 24/10/17 08:52, Michael Stone wrote:
> There's no mention of the QUOTING_STYLE environment variable on the ls=20
> man page or help output. What about changing=20
>=20
>       --quoting-style=3DWORD   use quoting style WORD for entry names:
>                                literal, locale, shell, shell-always,
>                                shell-escape, shell-escape-always, c, es=
cape
>=20
> to something like
>=20
>       --quoting-style=3DWORD   use quoting style WORD for entry names:
>                                literal, locale, shell, shell-always,
>                                shell-escape, shell-escape-always, c, es=
cape
>                                (overrides QUOTING_STYLE environment var=
iable)
>=20
> Which both hints that the environment knob exists and specifies their=20
> precedence.

Good idea. The following is pushed in your name:
https://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;h=3D9fa17=
8f

cheers,
P=E1draig


From MAILER-DAEMON Tue Oct 24 21:30:35 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7AWh-0006Qx-Og
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 21:30:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36726)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e7AWe-0006QK-RT
	for coreutils@gnu.org; Tue, 24 Oct 2017 21:30:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e7AWZ-0002cF-T9
	for coreutils@gnu.org; Tue, 24 Oct 2017 21:30:32 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:52900)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e7AWZ-0002bW-N3
	for coreutils@gnu.org; Tue, 24 Oct 2017 21:30:27 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id A4D544B0C
	for <coreutils@gnu.org>; Wed, 25 Oct 2017 02:30:23 +0100 (IST)
Subject: Re: ls man page/quoting_style
To: coreutils@gnu.org
References: <d2a78f22-b8d2-11e7-9b6a-00163eeb5320@msgid.mathom.us>
	<7de821c5-872a-950b-fe30-c0548c2dd1a4@draigBrady.com>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <fc138d5d-162b-8865-3474-b8a4e33795d9@draigBrady.com>
Date: Tue, 24 Oct 2017 18:30:21 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <7de821c5-872a-950b-fe30-c0548c2dd1a4@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 01:30:33 -0000

On 24/10/17 10:39, P=E1draig Brady wrote:
> On 24/10/17 08:52, Michael Stone wrote:
>> There's no mention of the QUOTING_STYLE environment variable on the ls=
=20
>> man page or help output. What about changing=20
>>
>>       --quoting-style=3DWORD   use quoting style WORD for entry names:
>>                                literal, locale, shell, shell-always,
>>                                shell-escape, shell-escape-always, c, e=
scape
>>
>> to something like
>>
>>       --quoting-style=3DWORD   use quoting style WORD for entry names:
>>                                literal, locale, shell, shell-always,
>>                                shell-escape, shell-escape-always, c, e=
scape
>>                                (overrides QUOTING_STYLE environment va=
riable)
>>
>> Which both hints that the environment knob exists and specifies their=20
>> precedence.
>=20
> Good idea. The following is pushed in your name:
> https://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;h=3D9fa=
178f

For reference, env vars are not ideal for user preferences
as they're significant when parsing command output (not a tty).
I.E. globally set env vars in user settings may cause bugs in scripts.
This is not a big deal in this case as QUOTING_STYLE=3Dliteral is
already the default for non tty.  Also ls output is exceedingly
hard to parse in a robust manner and is best avoided anyway.

cheers,
P=E1draig.


From MAILER-DAEMON Tue Oct 24 22:57:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7Bsj-0001by-8N
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 22:57:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37390)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mstone@debian.org>) id 1e7Bsh-0001bA-VO
	for coreutils@gnu.org; Tue, 24 Oct 2017 22:57:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mstone@debian.org>) id 1e7Bse-00013L-UM
	for coreutils@gnu.org; Tue, 24 Oct 2017 22:57:24 -0400
Received: from harad.mathom.us ([54.218.24.45]:39776)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <mstone@debian.org>) id 1e7Bse-00011t-Nw
	for coreutils@gnu.org; Tue, 24 Oct 2017 22:57:20 -0400
Received: from osgiliath.mathom.us (osgiliath.mathom.us
	[IPv6:2001:470:e4c3:2341::2])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by harad.mathom.us (Postfix) with ESMTPSA id 15F6C39;
	Wed, 25 Oct 2017 02:56:48 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by osgiliath.mathom.us (Postfix) with ESMTP id C71476E7F7;
	Tue, 24 Oct 2017 22:56:16 -0400 (EDT)
Received: from osgiliath.mathom.us ([127.0.0.1])
	by localhost (osgiliath.mathom.us [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id 45EYz46ssmQJ; Tue, 24 Oct 2017 22:56:16 -0400 (EDT)
Received: by osgiliath.mathom.us (Postfix, from userid 1000)
	id A52536E81F; Tue, 24 Oct 2017 22:56:16 -0400 (EDT)
Date: Tue, 24 Oct 2017 22:56:16 -0400
From: Michael Stone <mstone@debian.org>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Cc: coreutils@gnu.org
Subject: Re: ls man page/quoting_style
Message-ID: <e2cb3f3c-b92e-11e7-9b6a-00163eeb5320@msgid.mathom.us>
Mail-Followup-To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>,
	coreutils@gnu.org
References: <d2a78f22-b8d2-11e7-9b6a-00163eeb5320@msgid.mathom.us>
	<7de821c5-872a-950b-fe30-c0548c2dd1a4@draigBrady.com>
	<fc138d5d-162b-8865-3474-b8a4e33795d9@draigBrady.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
In-Reply-To: <fc138d5d-162b-8865-3474-b8a4e33795d9@draigBrady.com>
X-Pgp-Fingerprint: 02D5 315F F11F 1861 860E  1E02 F61A ACDC FA11 FFDE
User-Agent: NeoMutt/20170113 (1.7.2)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 54.218.24.45
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 02:57:24 -0000

On Tue, Oct 24, 2017 at 06:30:21PM -0700, P=E1draig Brady wrote:
>For reference, env vars are not ideal for user preferences
>as they're significant when parsing command output (not a tty).
>I.E. globally set env vars in user settings may cause bugs in scripts.
>This is not a big deal in this case as QUOTING_STYLE=3Dliteral is
>already the default for non tty.  Also ls output is exceedingly
>hard to parse in a robust manner and is best avoided anyway.

My personal objection to things like "QUOTING_STYLE" is that they're=20
awfully polluting of the namespace and should have been something like=20
COREUTILS_QUOTING. All water under the bridge now, just like the fact=20
that ls is a horrible mismash of human readable functionality and de=20
facto use in legacy scripts. Better if we could start over with ls=20
having a flag for an easily parseable output mode that everyone could=20
have gotten on board with 40 years ago, and a human mode that could be=20
configured with dotfiles or something. Oh well.

Mike Stone


From MAILER-DAEMON Tue Oct 24 23:14:37 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7C9N-0004JA-PY
	for mharc-coreutils@gnu.org; Tue, 24 Oct 2017 23:14:37 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42694)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e7C9L-0004J0-Jn
	for coreutils@gnu.org; Tue, 24 Oct 2017 23:14:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e7C9G-0006Dv-LQ
	for coreutils@gnu.org; Tue, 24 Oct 2017 23:14:35 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:56230)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e7C9G-0006C4-EH
	for coreutils@gnu.org; Tue, 24 Oct 2017 23:14:30 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 4500899FC
	for <coreutils@gnu.org>; Wed, 25 Oct 2017 04:14:28 +0100 (IST)
Subject: Re: [PATCH] dd: fix nocache regions passed to posix_fadvise()
To: Coreutils <coreutils@gnu.org>
References: <20171016071410.16942-1-P@draigBrady.com>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <2d1f9518-3716-1a7f-677b-4297ba0878f2@draigBrady.com>
Date: Tue, 24 Oct 2017 20:14:25 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20171016071410.16942-1-P@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 03:14:36 -0000

Tested on ext4, newer xfs, older xfs (no 512 align support), tmpfs (no O_=
DIRECT support)
Commited https://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;=
h=3Dv8.28-21-gde15a49
tweak at https://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;=
h=3Dv8.28-22-ge818f19

cheers,
P=E1draig


From MAILER-DAEMON Thu Oct 26 16:23:58 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7oh4-0003H2-8U
	for mharc-coreutils@gnu.org; Thu, 26 Oct 2017 16:23:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33321)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e7oh1-0003Ez-LE
	for coreutils@gnu.org; Thu, 26 Oct 2017 16:23:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e7ogy-0007wM-Fe
	for coreutils@gnu.org; Thu, 26 Oct 2017 16:23:55 -0400
Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:46259)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <assafgordon@gmail.com>)
	id 1e7ogy-0007vv-B6; Thu, 26 Oct 2017 16:23:52 -0400
Received: by mail-io0-x22b.google.com with SMTP id 101so8151172ioj.3;
	Thu, 26 Oct 2017 13:23:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:references:cc:from:message-id:date:user-agent
	:mime-version:in-reply-to:content-language:content-transfer-encoding;
	bh=3E8UbHgv2wMRwMTodONgip+1fMuE6mEpXEMkDIqfrls=;
	b=r+FlTvLtn14KuRFPx5XLNXskdPASoYy2XDRojMemm1gFZHd5+4+qUA8ji9AHQke+CV
	VT4YMgfaVwaofMnai8CSdano2I3b/k4Di2fcIdthFFQUxThe5oJKQl1K2WB7ahqITNT8
	u/hybk0io14IJvI5hhUWz0bvH2xAZ9OeBinKZnNvVQaKfVkS0AuVyZbpiSpKociX4NDy
	spkA3pYRUaIpnRZmiZ6flb+gP2nIYL/K9MZPHvhU5ZRKtL6vXUzilHwUL8oQQUKXqzo9
	g4O7fsNmFI0DpqFdlkilvtdJglKKQVP8zbMsIhy+8igwbINvdsFPV0JTZU8LtlixNrOl
	zRxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:cc:from:message-id:date
	:user-agent:mime-version:in-reply-to:content-language
	:content-transfer-encoding;
	bh=3E8UbHgv2wMRwMTodONgip+1fMuE6mEpXEMkDIqfrls=;
	b=r6j7rVU0EyJ/84VX9pCTUQDh/EosUhBYx1j4GImYsrqLZEZj8vTG/Mr9Wsd4oG/Rrr
	Ndo2xUhSrjbWjSA46nQp3MxbuY/WK3N0F1pAqCJxW/yOdolIOQ7eHBiXHbxSVMdJ4A2H
	nQJXfhAnr2W6HlwkG2MLHSH+ixd1/KQCmODVHOuE9GfAip9IHHN6hhzw98q+s49Dq9ZX
	QZAKGqbbVhDpQmQYM8R9dOe+t3lliB89/ui0S3F5jr/yP7bwqjOa5v0xG/VadgNJtuzf
	uWS2t2JsU5ImPbuo+2O5pknqLI21EC0CnHyRVAhOnVy4fr3MiJdCxqLWYHpAoQngniyv
	o8hQ==
X-Gm-Message-State: AMCzsaXdfqznQSP3JsCBZLcYl9+7nMFsRLFVF3HcR0Op7RN8gFyos7dM
	0Xd/bS012NHuMdxHOiPAxVvlJoru
X-Google-Smtp-Source: ABhQp+SkjlFluXDyecrLohcQfLE/icXum5P/kNeZGvfLe4be9DnDUWeH2pW1SMeUsci/+Qk3I5ZF7g==
X-Received: by 10.36.139.130 with SMTP id g124mr268387ite.100.1509049431275;
	Thu, 26 Oct 2017 13:23:51 -0700 (PDT)
Received: from [192.168.88.239] (moose.housegordon.com. [184.68.105.38])
	by smtp.googlemail.com with ESMTPSA id
	e68sm91121ite.0.2017.10.26.13.23.49
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Thu, 26 Oct 2017 13:23:50 -0700 (PDT)
Subject: unicode normalization / unorm (was: [bug-gnu-libiconv] The utf-8-mac
	encoder on macOS gives incorrect output)
To: Marcin Sulikowski <marcin.sulikowski@editshare.com>,
	bug-gnu-libiconv@gnu.org
References: <CAN_iqyqkYtDbz9qyjWr9xdX_hO_Qd8V7vx0z7ok6kfWh3e_ZxA@mail.gmail.com>
Cc: Coreutils <coreutils@gnu.org>
From: Assaf Gordon <assafgordon@gmail.com>
Message-ID: <d9375bb7-0e02-9f27-5a21-4eeae6c9197b@gmail.com>
Date: Thu, 26 Oct 2017 14:23:49 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CAN_iqyqkYtDbz9qyjWr9xdX_hO_Qd8V7vx0z7ok6kfWh3e_ZxA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4001:c06::22b
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Oct 2017 20:23:56 -0000

Hello,

(cc'ing coreutils@)

On 2017-10-26 05:50 AM, Marcin Sulikowski wrote:
> I've been trying to use libiconv on macOS to convert UTF-8 strings to 
> their NFD form using libiconv's "utf-8-mac" encoding which is available 
> on macOS.

FWIW,

In GNU coreutils we are working on a unicode normalization program 
(unorm) which can perform nfd/nfc/nfkd/nfkc conversions and other 
multibyte character processing.

It is still highly experimental, but produces the following output based 
on your input:

===
$ ( printf "a%.0s" `seq 4094` ; echo -n ó ) \
      | unorm --normalization=nfd \
      | hexdump -e '8/1 "%02x " "\n"'
61 61 61 61 61 61 61 61
*
61 61 61 61 61 61 6f cc
81
===

Where U+00f3 (\xc3 \xb3) was normalized to "o" + U+0301 (\x6F \xCC \x81).


More information about the multibyte implementation progress is here:
  https://crashcourse.housegordon.org/coreutils-multibyte-support.html

If you'd like to experiment with the program, a snapshot is  here:
http://files.housegordon.org/src/coreutils-multibyte-experimental-8.28.39-79242.tar.xz
(note this is unstable and unsupported snapsot of coreutils code).

Any feedback is appreciated.

regards,
  - assaf


From MAILER-DAEMON Thu Oct 26 20:30:57 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7sY4-0004DE-Tg
	for mharc-coreutils@gnu.org; Thu, 26 Oct 2017 20:30:56 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48100)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e7sY2-0004Ci-Mm
	for coreutils@gnu.org; Thu, 26 Oct 2017 20:30:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e7sY1-0002QI-St
	for coreutils@gnu.org; Thu, 26 Oct 2017 20:30:54 -0400
Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:44747)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <meyering@gmail.com>)
	id 1e7sY1-0002Pi-OF; Thu, 26 Oct 2017 20:30:53 -0400
Received: by mail-qk0-x22c.google.com with SMTP id r64so6545512qkc.1;
	Thu, 26 Oct 2017 17:30:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:sender:from:date:message-id:subject:to;
	bh=3H/bbIjJn+RFl/PmjFLXKk3zvhSvk4r8Jujz3o4NPR0=;
	b=X/YM/ZZzCxREvwdqbggiH8sAYvl9i4h4I3x9XSMXR72Xez2CmhtlMCW+9JEz4XwZgD
	KK1pZyFFnvcdXKHiHwLUoYQZKI9GneAcdOf4ztBHwSRDrLrB94VuC5N213wGNzebCoZa
	OP2yoIfHis3DBqPNN9DHYE/ZA92F2LXtMtgtxiimNfdcxy8w5vflnQjYgoeSYRlMcwlu
	J1bRgidHY2c8KKwacIk3dcm3+uL9PBUa0YCpQlXW54OTJtziqbxoHC+UbE3lFw0y3weY
	i28KZ/HB2iFfxDR0zxRt8HpwBAYPxhl55C/Khkn2dS7fkV1iVH/2QD4l1/1uQRmbZsV2
	zhUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:sender:from:date:message-id:subject
	:to; bh=3H/bbIjJn+RFl/PmjFLXKk3zvhSvk4r8Jujz3o4NPR0=;
	b=VyVaXPUvA+DKVReiova9R0vJsDx26Dpu9qSRveG3E8NZ4iF5tI12Fb4chbNP0nzBJn
	ieMpsvgeU3HQ6zvqyqCzm/9KRDenhSBEjpRSuX50qic7SnVgYJ273jIGh2znGjAnrSif
	BaNb+woEC6F8dNGp7HDtfWxUptRZXmrxeP12MmuotfcjqbBBMntXpLizr+ss7CVXx9Cu
	hMs2naiJCJrq2m7dk9zZERzBlx5Di5Z/dB69mVN9uIzCiLeGEkwdToJgFM72eT02vHtR
	tOCN/1yKGAmgYDv1wDdDpUX4R+vzJjcQJMS1Ve2DwSb4DYXylg6mE1yOEm4PU22LyWes
	mkPw==
X-Gm-Message-State: AMCzsaX62XKJmzaHW4N4MSz9Uj0yH//d4pau/koTa4KCm9JvO/8fDdDs
	77Q3VSyRzhCtxjD9QN0z6u1UQ0V5s+TDT0nwWhGmNA==
X-Google-Smtp-Source: ABhQp+RYIt/lCFM+aPMzfqVb0Yy5AmAQCgnSq2qGr2J9qdQGEn0FBX0lsQ3rM65jD+kaWC0alJgkmrTPCF6PfxoEAtQ=
X-Received: by 10.55.197.152 with SMTP id k24mr10580190qkl.178.1509064252527; 
	Thu, 26 Oct 2017 17:30:52 -0700 (PDT)
MIME-Version: 1.0
Sender: meyering@gmail.com
Received: by 10.55.198.145 with HTTP; Thu, 26 Oct 2017 17:30:31 -0700 (PDT)
From: Jim Meyering <jim@meyering.net>
Date: Thu, 26 Oct 2017 17:30:31 -0700
X-Google-Sender-Auth: MQPwtjZ-C5CIBiSqT3IDopSkX_E
Message-ID: <CA+8g5KEXrR8qNXWv0SSC772FYCx4VbhNpBCFfQJu=Q0VQ4Un1w@mail.gmail.com>
Subject: FYI, shorter lists.gnu.org URLs, finally
To: Coreutils <coreutils@gnu.org>,
	"bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c09::22c
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2017 00:30:55 -0000

Now, instead of
http://lists.gnu.org/archive/html/bug-coreutils/2017-10/threads.html
you can write the shorter
http://lists.gnu.org/r/bug-coreutils/2017-10/threads.html

This applies to all mailing lists hosted on lists.gnu.org.

Sometimes it matters, especially when a URL is longer than the maximum
line length in some context.


From MAILER-DAEMON Thu Oct 26 21:31:45 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7tUv-0008Ry-7L
	for mharc-coreutils@gnu.org; Thu, 26 Oct 2017 21:31:45 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43963)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1e7tUt-0008Qr-98
	for coreutils@gnu.org; Thu, 26 Oct 2017 21:31:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1e7tUs-0000Vh-E7
	for coreutils@gnu.org; Thu, 26 Oct 2017 21:31:43 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44290)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eggert@cs.ucla.edu>)
	id 1e7tUn-0000RP-6U; Thu, 26 Oct 2017 21:31:37 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id A5DC1160F47;
	Thu, 26 Oct 2017 18:31:33 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
	with ESMTP id znuv8S4lZxJD; Thu, 26 Oct 2017 18:31:32 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
	by zimbra.cs.ucla.edu (Postfix) with ESMTP id B76B1160F5A;
	Thu, 26 Oct 2017 18:31:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
	by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id Op1yvZ7VDKk8; Thu, 26 Oct 2017 18:31:32 -0700 (PDT)
Received: from [100.69.19.201] (unknown [12.129.159.195])
	by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9215B160F47;
	Thu, 26 Oct 2017 18:31:32 -0700 (PDT)
Subject: Re: FYI, shorter lists.gnu.org URLs, finally
To: Jim Meyering <jim@meyering.net>, Coreutils <coreutils@gnu.org>,
	"bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
References: <CA+8g5KEXrR8qNXWv0SSC772FYCx4VbhNpBCFfQJu=Q0VQ4Un1w@mail.gmail.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Message-ID: <1b73a448-5b29-daa6-29de-2dee1ed5c1c4@cs.ucla.edu>
Date: Thu, 26 Oct 2017 18:31:32 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CA+8g5KEXrR8qNXWv0SSC772FYCx4VbhNpBCFfQJu=Q0VQ4Un1w@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 131.179.128.68
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2017 01:31:44 -0000

On 10/26/2017 05:30 PM, Jim Meyering wrote:
> Now, instead of
> http://lists.gnu.org/archive/html/bug-coreutils/2017-10/threads.html
> you can write the shorter
> http://lists.gnu.org/r/bug-coreutils/2017-10/threads.html

That's nice. "r" is for "Arrrrrchive"?



From MAILER-DAEMON Thu Oct 26 21:42:15 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e7tf5-0001oM-Hy
	for mharc-coreutils@gnu.org; Thu, 26 Oct 2017 21:42:15 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:47719)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e7tf4-0001oG-0b
	for coreutils@gnu.org; Thu, 26 Oct 2017 21:42:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e7tf3-0008Kl-5C
	for coreutils@gnu.org; Thu, 26 Oct 2017 21:42:14 -0400
Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:46207)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <meyering@gmail.com>)
	id 1e7tf3-0008KZ-0t; Thu, 26 Oct 2017 21:42:13 -0400
Received: by mail-qt0-x22f.google.com with SMTP id 1so6705221qtn.3;
	Thu, 26 Oct 2017 18:42:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc;
	bh=QYSnxNWp4+hJnJ+Bpx3v5Yq9O/AyS9wW55bFYzwYbsg=;
	b=AgfHc349gAXqJZyrEtE84QGqpZaQ5h16N7acCizX18OY0Fp4Cj08e4oAfPg4KU1T79
	Oisfeou0vyGDwtwQpP3HYfAyleBYEgqAIeQVraH4n7jVs1fZJgPAm84kZ0lT5ACyWd5E
	Rbpoaw9ENHyZN/AhdS9Dk86+ARDBWHubfv4bUANhHmSiXTR7286+dlA2L+w2f6QbZ8Uw
	4Ykdt9JFN4kY2lv06KrYCnIQP8Br/aUne6IFOxYijegpyfjLL4e1XE3zVdjceft9Lcza
	DNJLImgqbKNlMWXf0h9xfkLOws49TCacWwaBkP0wznVhUDD2qe1oKI4YiUY4FvRr7q3O
	PUjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc;
	bh=QYSnxNWp4+hJnJ+Bpx3v5Yq9O/AyS9wW55bFYzwYbsg=;
	b=LXsTqeiaW9H1uVQwIzznaPrZsUpx3yiDCCF53L20cN+FJDloojosIR6OyCQsSKWKmo
	i22Twd0SHbWMDqX9ESUTLpKL711ZfCHtuzhkXXGk1XD5wPf2V6zA0YcQpn9FvY+fhApa
	uHhl8nvUEkxkKQjMBp5hhRfyqmoYpGHsxQuvdI7w+lusMnCGaVirFrT3n/Cf3tkdMLYj
	D6YrvfcdPU/d+naTThYxVFMP4fmTTLtkIjnm7ozawYDBSH5PvxCSD4g/xuIKe/xjat66
	ZM1gnlHsgVi+Qt/0n6IYXkYrkv0BXb1hbovAcDMF1wI/hniAwD8EsJAzeTpc+116mTiY
	HnfQ==
X-Gm-Message-State: AMCzsaW72jbiRTpXq46qpcj6b7Ev9Z3cIEe5P1MighrNSlLdMWW5sa+i
	K/6PHPmgV8vUzsnYVbMXYXI8PNRO/r1TEkbpBqY=
X-Google-Smtp-Source: ABhQp+Rw6CV6c9rNn/+lcNvlguUZ+5KIkefVgumVSd7jRbbxyBRlobriwDeCSViv/ZsNa3XK25nHJx//8FeGS5bo20I=
X-Received: by 10.200.7.74 with SMTP id k10mr15215517qth.279.1509068532433;
	Thu, 26 Oct 2017 18:42:12 -0700 (PDT)
MIME-Version: 1.0
Sender: meyering@gmail.com
Received: by 10.55.198.145 with HTTP; Thu, 26 Oct 2017 18:41:51 -0700 (PDT)
In-Reply-To: <1b73a448-5b29-daa6-29de-2dee1ed5c1c4@cs.ucla.edu>
References: <CA+8g5KEXrR8qNXWv0SSC772FYCx4VbhNpBCFfQJu=Q0VQ4Un1w@mail.gmail.com>
	<1b73a448-5b29-daa6-29de-2dee1ed5c1c4@cs.ucla.edu>
From: Jim Meyering <jim@meyering.net>
Date: Thu, 26 Oct 2017 18:41:51 -0700
X-Google-Sender-Auth: Fy2pcvPTYho-6CFw4I7p3omAtw8
Message-ID: <CA+8g5KEaK=G3nrFvbN1d7GjS1JM6tK5am5kAxufachuaR2=n9w@mail.gmail.com>
Subject: Re: FYI, shorter lists.gnu.org URLs, finally
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Coreutils <coreutils@gnu.org>,
	"bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c0d::22f
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2017 01:42:15 -0000

On Thu, Oct 26, 2017 at 6:31 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 10/26/2017 05:30 PM, Jim Meyering wrote:
>>
>> Now, instead of
>> http://lists.gnu.org/archive/html/bug-coreutils/2017-10/threads.html
>> you can write the shorter
>> http://lists.gnu.org/r/bug-coreutils/2017-10/threads.html
>
> That's nice. "r" is for "Arrrrrchive"?

Sounds plausible :-)


From MAILER-DAEMON Sat Oct 28 00:37:26 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8IsA-0006I4-5R
	for mharc-coreutils@gnu.org; Sat, 28 Oct 2017 00:37:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49394)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e8Is8-0006Hu-7L
	for coreutils@gnu.org; Sat, 28 Oct 2017 00:37:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e8Is4-0003Is-Dz
	for coreutils@gnu.org; Sat, 28 Oct 2017 00:37:24 -0400
Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:54013)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <meyering@gmail.com>) id 1e8Is4-0003I5-9L
	for coreutils@gnu.org; Sat, 28 Oct 2017 00:37:20 -0400
Received: by mail-pg0-x241.google.com with SMTP id s2so6698217pge.10
	for <coreutils@gnu.org>; Fri, 27 Oct 2017 21:37:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=sender:from:to:subject:date:message-id:mime-version;
	bh=+W5z0cWRoh3GfWq7sclXHWe+NTI7ncGpKqeUd1Lu36w=;
	b=S1CwhxDKq+JsQKqnp9WsHuXlvmpLZgaE/tW7sNftDozpFyN0vSNwzM2DJI0hyIThdk
	AlsAo2/6xev1aN19wYFGPhJ9KSuLMFnajWfOPCkllKd3107/b8PRouRA5QPqEf09RNic
	ko+QLVbXvcqUicfXbtBtKdwQk+KZj45rOPP6EpUoneVRAy4rTtUhND7RCmRLub6b8gCs
	562VY1rf51PtdVSw8gdRMvk7Vx6NZ/WPKVrmyqai16RUJ1tQ7BAujSYggNY6/ZHleddm
	0JjTnd5WrPNPqt9IOXVlKLsFap/hY6OIRZSTeNLukDPgcGaSNlrlYnF10mmkKuJSSiCx
	fyog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:sender:from:to:subject:date:message-id
	:mime-version;
	bh=+W5z0cWRoh3GfWq7sclXHWe+NTI7ncGpKqeUd1Lu36w=;
	b=uB2uBrIlg+yedvh1g5Vi/j6BlweqZTvHw1+GYteT4eyD9bTcUzkWNTcfT5mj9u3kIS
	qQHKnuGTCLchshp6QyN93EINzGQq9gA+yHQTv5Ohk0FJWKsvJEhiitDKKZJNELgMSW/v
	l1dMEmKS+Eo7izgpWmmZFMigcEhDKFxU4R+RDxpPLGOU5J/OkCTU1iqOwld3LC/eORp4
	W1X6YLcpdK4gySfavlGFtDmQkBhGDOdU6V6lCgrY5XbH17jKSg86Hj1wegvEPHZF2bjL
	K41IfFF7nZE6dwlKAtbwS7rZSCqoprbMPW7882Cq7mZuq6xbf4iuVaiL7MBkNcvopdfS
	/56g==
X-Gm-Message-State: AMCzsaVaDlmlNBO9xmUWjELUv67/P31PcxfyYuWUywlpIOq9qy3VMoJZ
	RjqmpUhzi6ekIl4671shKwMGOg==
X-Google-Smtp-Source: ABhQp+T5zRy/TesL/7JqNzSyB3wo93pkWUwJHR3LGoVPp++3tENrtDsmpclLfPVQa6bqSz0ZbfaweQ==
X-Received: by 10.98.111.71 with SMTP id k68mr2422569pfc.91.1509165438851;
	Fri, 27 Oct 2017 21:37:18 -0700 (PDT)
Received: from dhcp-172-26-106-18.dhcp.thefacebook.com
	([2620:10d:c090:180::1:b442]) by smtp.gmail.com with ESMTPSA id
	g16sm18576685pfd.87.2017.10.27.21.37.17 for <coreutils@gnu.org>
	(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
	Fri, 27 Oct 2017 21:37:17 -0700 (PDT)
Sender: Jim Meyering <meyering@gmail.com>
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
Date: Fri, 27 Oct 2017 21:37:16 -0700
Message-ID: <lubpf3she3nb0j.fsf@meyering.net>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400e:c05::241
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Oct 2017 04:37:25 -0000

I noticed a new warning/error when building with git-latest gcc,
and propose to fix it with this:

>From f89c20bdf7ccc033cbc22662e932fae7761754fc Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@fb.com>
Date: Fri, 27 Oct 2017 21:14:37 -0700
Subject: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions

* src/ls.c (DEFINE_SORT_FUNCTIONS): Apply _GL_ATTRIBUTE_PURE
to each strcmp-derived function definition, since GCC8 with
-Wsuggest-attribute=pure now warns it is needed.
---
 src/ls.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ls.c b/src/ls.c
index 49e345aec..073e135e4 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -3603,25 +3603,25 @@ typedef int (*qsortFunc)(V a, V b);
   /* direct, non-dirfirst versions */					\
   static int xstrcoll_##key_name (V a, V b)				\
   { return key_cmp_func (a, b, xstrcoll); }				\
-  static int strcmp_##key_name (V a, V b)				\
+  static int _GL_ATTRIBUTE_PURE strcmp_##key_name (V a, V b)		\
   { return key_cmp_func (a, b, strcmp); }				\
                                                                         \
   /* reverse, non-dirfirst versions */					\
   static int rev_xstrcoll_##key_name (V a, V b)				\
   { return key_cmp_func (b, a, xstrcoll); }				\
-  static int rev_strcmp_##key_name (V a, V b)				\
+  static int _GL_ATTRIBUTE_PURE rev_strcmp_##key_name (V a, V b)	\
   { return key_cmp_func (b, a, strcmp); }				\
                                                                         \
   /* direct, dirfirst versions */					\
   static int xstrcoll_df_##key_name (V a, V b)				\
   { DIRFIRST_CHECK (a, b); return key_cmp_func (a, b, xstrcoll); }	\
-  static int strcmp_df_##key_name (V a, V b)				\
+  static int _GL_ATTRIBUTE_PURE strcmp_df_##key_name (V a, V b)		\
   { DIRFIRST_CHECK (a, b); return key_cmp_func (a, b, strcmp); }	\
                                                                         \
   /* reverse, dirfirst versions */					\
   static int rev_xstrcoll_df_##key_name (V a, V b)			\
   { DIRFIRST_CHECK (a, b); return key_cmp_func (b, a, xstrcoll); }	\
-  static int rev_strcmp_df_##key_name (V a, V b)			\
+  static int _GL_ATTRIBUTE_PURE rev_strcmp_df_##key_name (V a, V b)	\
   { DIRFIRST_CHECK (a, b); return key_cmp_func (b, a, strcmp); }

 static inline int
--
2.14.1.729.g59c0ea183


From MAILER-DAEMON Sat Oct 28 05:10:25 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8N8K-0003qf-TR
	for mharc-coreutils@gnu.org; Sat, 28 Oct 2017 05:10:24 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53602)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e8N8I-0003pg-V6
	for coreutils@gnu.org; Sat, 28 Oct 2017 05:10:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e8N8H-0000Tk-MU
	for coreutils@gnu.org; Sat, 28 Oct 2017 05:10:22 -0400
Received: from out4440.biz.mail.alibaba.com ([47.88.44.40]:12296)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e8N8B-0008SD-R5; Sat, 28 Oct 2017 05:10:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1509181805;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; 
	bh=+t4HdRvf1P/cXd7vnaYM1DEbahF63ahIf1xx4RrOQ0c=;
	b=m0CmgYJ1yYqKmjbQ7mdQOjATC8dkfL4rmnL7Df/MGLcIVxbsQtlgIITtf8PZw6BgLqSmIQvreV1vmc/b3oCH78a+d43aRTy3lZrnZ6pHmEHdgwvb/1eKjaRsybAli07YP7kxJvFFQuOv8+5q40W7Q7c1V0I+BAEj5Zvz53dLbns=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R651e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03290;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=5; SR=0;
	TI=SMTPD_---.9FyKGs8_1509181772; 
Received: from ali-6c96cfd98fb5.local(mailfrom:qianyue.zj@alibaba-inc.com
	ip:42.120.74.171) by smtp.aliyun-inc.com(127.0.0.1);
	Sat, 28 Oct 2017 17:09:32 +0800
Message-ID: <59F4494B.8010300@alibaba-inc.com>
Date: Sat, 28 Oct 2017 17:09:31 +0800
From: "Jia Zhang" <qianyue.zj@alibaba-inc.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;
	rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigbrady.com>, 
	Bruno Haible <bruno@clisp.org>
CC: <bug-gnulib@gnu.org>, <coreutils@gnu.org>,
	"Jia Zhang" <qianyue.zj@alibaba-inc.com>
Subject: [V2 PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.40
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Oct 2017 09:10:24 -0000

Hi Pádraig & Bruno,

This is the V2 review request for SM3 hash algorithm.

As promised, I have made SM3 hash algorithm available in the latest
libgcrypt. See
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd

The V2 patch adds the support with libgcrypt and associated test case.
By the way, I fixed several gc-libgcrypt and gc-gnulib build failures in
order to build out sm3sum with either libgcrypt or internal functions.

Plz refer to the following PRs for code review.

- For the new gnulib module crypto/sm3
  https://github.com/coreutils/gnulib/pull/3/commits

- For the new program sm3sum
  https://github.com/coreutils/coreutils/pull/12/commits

Thanks,
Jia


From MAILER-DAEMON Sat Oct 28 12:42:38 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8UBy-00011B-IH
	for mharc-coreutils@gnu.org; Sat, 28 Oct 2017 12:42:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37649)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <maxcharles111@protonmail.com>) id 1e8RWT-00060l-9u
	for coreutils@gnu.org; Sat, 28 Oct 2017 09:51:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <maxcharles111@protonmail.com>) id 1e8RWQ-0001Jt-7N
	for coreutils@gnu.org; Sat, 28 Oct 2017 09:51:37 -0400
Received: from mail3.protonmail.ch ([185.70.40.25]:61668)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <maxcharles111@protonmail.com>)
	id 1e8RWP-0000zp-SX
	for coreutils@gnu.org; Sat, 28 Oct 2017 09:51:34 -0400
Date: Sat, 28 Oct 2017 09:50:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
	s=default; t=1509198650;
	bh=iB3n/MOUTBPNCpaYOP6BW3DLgza3++h6iXMYHbtA7kA=;
	h=Date:To:From:Reply-To:Subject:Feedback-ID:From;
	b=P8K91koz7OcQfkaOE/0Ag7NtL9e1NILEqNdX5YqoM8Rbb3bf/Wei/WCbOTMs3B4ai
	odS3FZc5xcheln7YATw0RN51NKTmEj4+rrPg5BYzQtaiUCBY0Uwg18cpP3CHBVfjwO
	f6lL2gR7BcjiJwFazA6ADsuxTM590gMv7TpyOdIc=
To: "coreutils@gnu.org" <coreutils@gnu.org>
From: Max Charles <maxcharles111@protonmail.com>
Reply-To: Max Charles <maxcharles111@protonmail.com>
Subject: grep pipe
Message-ID: <GA2n0oisq7LWidnN0N1iIkF7-tzuvyZtg_0X3JYDIGCkEpKp5xUUi0v5mD0zD1hgriri1uSdVrzkDfVYLjhiMWg9Q4KvcdEw36MyZA4uG1w=@protonmail.com>
Feedback-ID: JKxdnEemFQj2HLVJ1Bq1Q-ezy5MP3u8XsG6WgJDHiJ7a8zYFNhJKXTnb7WOWrY4zmt-5Q3tfSBZOZRuFph3Pig==:Ext:ProtonMail
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]
X-Received-From: 185.70.40.25
X-Mailman-Approved-At: Sat, 28 Oct 2017 12:42:37 -0400
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Oct 2017 13:51:38 -0000

SG93IHlvdSBnZXQgZ3JlcCB0byBwdXQgdGhlIG91dHB1dCBvZiB0aGUgcGlwZSBsaWtlIHNvLCB0
aGVyZSBzZWVtcyB0byBiZSBubyBvcHRpb24gZm9yIHNvbWV0aGluZyBsaWtlIHRoaXM6CgplY2hv
ICdwYXR0ZXJuZnJvbXBpcGUnIHwgZ3JlcCAtUiAncGF0dGVybmZyb21waXBlJyAqCgpncmVwIC1S
ICdwYXR0ZXJuJyAqCndvcmtzIGZpbmUKClRoYW5rcywKCk1heA==


From MAILER-DAEMON Sat Oct 28 12:57:51 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8UQh-0004Jf-NQ
	for mharc-coreutils@gnu.org; Sat, 28 Oct 2017 12:57:51 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40628)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <addw@phcomp.co.uk>) id 1e8UQg-0004JV-2c
	for coreutils@gnu.org; Sat, 28 Oct 2017 12:57:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <addw@phcomp.co.uk>) id 1e8UQc-0007Jz-2v
	for coreutils@gnu.org; Sat, 28 Oct 2017 12:57:50 -0400
Received: from freshmint.phcomp.co.uk ([78.32.209.33]:48672
	helo=mint.phcomp.co.uk)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <addw@phcomp.co.uk>) id 1e8UQb-0006Ur-SX
	for coreutils@gnu.org; Sat, 28 Oct 2017 12:57:46 -0400
Received: from addw by mint.phcomp.co.uk with local (Exim 4.89)
	(envelope-from <addw@phcomp.co.uk>) id 1e8UQ3-0007Ud-To
	for coreutils@gnu.org; Sat, 28 Oct 2017 17:57:12 +0100
Date: Sat, 28 Oct 2017 17:57:11 +0100
From: Alain Williams <addw@phcomp.co.uk>
To: coreutils@gnu.org
Subject: Re: grep pipe
Message-ID: <20171028165711.GH24539@phcomp.co.uk>
References: <GA2n0oisq7LWidnN0N1iIkF7-tzuvyZtg_0X3JYDIGCkEpKp5xUUi0v5mD0zD1hgriri1uSdVrzkDfVYLjhiMWg9Q4KvcdEw36MyZA4uG1w=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <GA2n0oisq7LWidnN0N1iIkF7-tzuvyZtg_0X3JYDIGCkEpKp5xUUi0v5mD0zD1hgriri1uSdVrzkDfVYLjhiMWg9Q4KvcdEw36MyZA4uG1w=@protonmail.com>
Organization: Parliament Hill Computers Ltd
User-Agent: Mutt/1.5.20 (2009-12-10)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 78.32.209.33
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Oct 2017 16:57:51 -0000

On Sat, Oct 28, 2017 at 09:50:47AM -0400, Max Charles wrote:
> How you get grep to put the output of the pipe like so, there seems to be no option for something like this:
> 
> echo 'patternfrompipe' | grep -R 'patternfrompipe' *

grep -R "$( echo 'patternfrompipe' )" *

> grep -R 'pattern' *
> works fine
> 
> Thanks,
> 
> Max

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>


From MAILER-DAEMON Sun Oct 29 03:28:57 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8i1h-0000hR-83
	for mharc-coreutils@gnu.org; Sun, 29 Oct 2017 03:28:57 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57095)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e8i1f-0000hK-Dm
	for coreutils@gnu.org; Sun, 29 Oct 2017 03:28:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e8i1c-0001Go-AC
	for coreutils@gnu.org; Sun, 29 Oct 2017 03:28:55 -0400
Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:53335)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <assafgordon@gmail.com>)
	id 1e8i1c-0001GO-3i; Sun, 29 Oct 2017 03:28:52 -0400
Received: by mail-io0-x236.google.com with SMTP id 189so20771973iow.10;
	Sun, 29 Oct 2017 00:28:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:cc:references:from:message-id:date:user-agent
	:mime-version:in-reply-to:content-language:content-transfer-encoding;
	bh=U1OqB90vrbsabxykRwciRcQ1ozUewv9K1IdOjWLVo+M=;
	b=InN0iKuvVZE7p3gQ3qUxtQsWPgf4sVHahvhAnq8Y2gKBQZJreys3e9WAmJdkafbY4A
	BfRmqqPE4wt6NB28734FUg25J+2Qj5qYSTCZLr0G4rDltpjA8p4aVo7ASdv9MC3iCIiy
	DfmeB8AiTNRiCBEHdYqNEy2dMntk95AFqXaWIrdyEIjAwzQfsfSwh9SjqWqmsLsW9K3C
	WicKho21uRj7fO7TYnnrbSi0FFNuXEiA9IYZLU8h8DgShmX/OIWZdSBs3pCgcQcZI9jE
	GSuma6d71a+K+tuEaaMg20GGeDOLOZeaY0px/UhmOOojPK+HJwktmBGLNAfiOCA/XmwC
	SrlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:cc:references:from:message-id:date
	:user-agent:mime-version:in-reply-to:content-language
	:content-transfer-encoding;
	bh=U1OqB90vrbsabxykRwciRcQ1ozUewv9K1IdOjWLVo+M=;
	b=n4IzWacDooY918zWJ5mqILTYxWa8RLukMa9sDexcDOszxKW1kA1N9j8w0PD9GkRM98
	flHV4WT55z5wdd6iBCIOOG7pn8LQw4HwCvPT9oGkDqW2f7O7eu16gjj+PVZpLDCNCFLb
	A6Fz+4gWNj9f9E6oETtBJgnSczyGE/Wqt6PgluDkv1+RcyaXV5y2bnNGFJXPaFoBIweU
	p9VBTmOF55TEBiSQHBkkcRNbgiM8naXfLrzzTvB786Rwp9LADhebUHTbxLS+L9gXAD8j
	khSIqK/z1mKe/WazZPv6ht8nblT3Q+nM5+0xgWHPXf3D/TAoi75u247i9nR8R+MnBiEF
	h4lQ==
X-Gm-Message-State: AMCzsaXyTeoiwLC2g9PmoWM1SquvhhP2uIMsH+pVp+2xXRzNldbv6dC5
	E/+tc/s8BsO1W/X63nWkb84NfXaJ
X-Google-Smtp-Source: ABhQp+TvGNfE4CMZVDn3OhNcVWOaim89riFP+EOTe/G8+UmXGjvM3QVF/24VHwIu+vSGAOmTy0+wiA==
X-Received: by 10.107.165.140 with SMTP id o134mr6988750ioe.21.1509262130879; 
	Sun, 29 Oct 2017 00:28:50 -0700 (PDT)
Received: from [192.168.88.239] (moose.housegordon.com. [184.68.105.38])
	by smtp.googlemail.com with ESMTPSA id
	79sm566932itu.7.2017.10.29.00.28.49
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sun, 29 Oct 2017 00:28:50 -0700 (PDT)
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
To: Bruno Haible <bruno@clisp.org>, Jia Zhang <qianyue.zj@alibaba-inc.com>
Cc: bug-gnulib@gnu.org, coreutils@gnu.org
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<6473292.TjZuIb3LsK@omega> <59EEFBA1.1090308@alibaba-inc.com>
	<2577472.loxlcmsLqh@omega>
From: Assaf Gordon <assafgordon@gmail.com>
Message-ID: <a211c945-4cff-93fd-e29d-2c6cdb4be95b@gmail.com>
Date: Sun, 29 Oct 2017 01:28:48 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <2577472.loxlcmsLqh@omega>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4001:c06::236
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 07:28:56 -0000

Hello,

On 2017-10-24 04:09 AM, Bruno Haible wrote:
>>> Indeed, we don't have many crypto experts on the gnulib mailing
>>> lists. Therefore, I too would like the crypto experts on the
>>> libgcrypt or openssl mailing lists to evaluate the SM3 algorithm
>>> and your code first, before we can accept it in gnulib.
>>
>> libgcrypt has merged SM3 hash function. See
>> https://dev.gnupg.org/rC4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd

I see SM3 has been added to gnulib and libgcrypt,
but I would suggest we wait for further evaluation before adding it to 
coreutils.

libgcrypt specifically say: "Thorough understanding of
applied cryptography is required to use Libgcrypt."
and Werner Koch explicitly acknowledged that they are willing to include
known weak algorithms in libgcrypt because non-experts should never use 
it directly:
  https://lists.gnupg.org/pipermail/gcrypt-devel/2017-October/004287.html

I'm assuming the same applies to gnulib - but not to coreutils.




I won't claim to have any understanding of cryptography or hashing,
but a cursory look at the code raises three red flags:

First,
It is *very* similar to sha256.
Not just the function structure, but almost line-for-line identical.
It could almost be said that SM3 is just a modified sha256 with slightly 
different primitives.
(try "diff -u lib/sm3.c lib/sha256.c" to see what I mean).

sha256 was published in 2001, and while it has not yet been compromised,
I would naively think it is not wise to offer a new hashing algorithm in 
2017 that's based on sha256.
I think it is already generally recommended to move away from sha-256
to at least sha-512 (or sha-3).



Second,
All SHA-2 hash functions use initialization values that
are based on the cube roots of the first 62 primes.
In lib/sha256.c it is the "sha256_round_constants" variable.
In lib/sm3.c these initialization values are the same 32bit values,
rotated:

/* SM3 round constants */
#define T(j) sm3_round_constants[j]
static const uint32_t sm3_round_constants[64] = {
   0x79cc4519UL, 0xf3988a32UL, 0xe7311465UL, 0xce6228cbUL,
   0x9cc45197UL, 0x3988a32fUL, 0x7311465eUL, 0xe6228cbcUL,
   0xcc451979UL, 0x988a32f3UL, 0x311465e7UL, 0x6228cbceUL,
   0xc451979cUL, 0x88a32f39UL, 0x11465e73UL, 0x228cbce6UL,
   0x9d8a7a87UL, 0x3b14f50fUL, 0x7629ea1eUL, 0xec53d43cUL,
   0xd8a7a879UL, 0xb14f50f3UL, 0x629ea1e7UL, 0xc53d43ceUL,
   0x8a7a879dUL, 0x14f50f3bUL, 0x29ea1e76UL, 0x53d43cecUL,
   0xa7a879d8UL, 0x4f50f3b1UL, 0x9ea1e762UL, 0x3d43cec5UL,
   0x7a879d8aUL, 0xf50f3b14UL, 0xea1e7629UL, 0xd43cec53UL,
   0xa879d8a7UL, 0x50f3b14fUL, 0xa1e7629eUL, 0x43cec53dUL,
   0x879d8a7aUL, 0x0f3b14f5UL, 0x1e7629eaUL, 0x3cec53d4UL,
   0x79d8a7a8UL, 0xf3b14f50UL, 0xe7629ea1UL, 0xcec53d43UL,
   0x9d8a7a87UL, 0x3b14f50fUL, 0x7629ea1eUL, 0xec53d43cUL,
   0xd8a7a879UL, 0xb14f50f3UL, 0x629ea1e7UL, 0xc53d43ceUL,
   0x8a7a879dUL, 0x14f50f3bUL, 0x29ea1e76UL, 0x53d43cecUL,
   0xa7a879d8UL, 0x4f50f3b1UL, 0x9ea1e762UL, 0x3d43cec5UL,




Third,
The 64 rounds ("Compression function") in sha256 seem to
rotate the internal state variables equally (a..h)
in the R macro definition [1] and usage [2].

[1] https://opengrok.housegordon.com/source/xref/gnulib/lib/sha256.c#484
[2] https://opengrok.housegordon.com/source/xref/gnulib/lib/sha256.c#504

In sm3, it seems from a cursory look that the first 128 bits
and the last 128 bits of internal states are kept mostly separated
(variable a..d and e..h) based on the R macro [3] and usage [4].

[3] https://opengrok.housegordon.com/source/xref/gnulib/lib/sm3.c#377
[4] https://opengrok.housegordon.com/source/xref/gnulib/lib/sm3.c#413



Again, I'm not a cryptography expert, and perhaps this is secure.
But it does look a bit suspicious.


---

It's one thing to add it to a library, where it can not be accidentally
used by non-expert users, but it's a different thing to provide an
executable that will be shipped by default on all future GNU/Linux
machine.

I would humbly suggest we wait until other crypto experts evaluate
'sm3', and decide to offer it in their programs (preferably openssl /
libressl) as a general-purpose program.





regards,
  - assaf





From MAILER-DAEMON Sun Oct 29 10:56:54 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8p1C-0007yq-Mj
	for mharc-coreutils@gnu.org; Sun, 29 Oct 2017 10:56:54 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60353)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e8p13-0007yG-JJ
	for coreutils@gnu.org; Sun, 29 Oct 2017 10:56:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <qianyue.zj@alibaba-inc.com>) id 1e8p10-0002Mo-7S
	for coreutils@gnu.org; Sun, 29 Oct 2017 10:56:45 -0400
Received: from out4434.biz.mail.alibaba.com ([47.88.44.34]:40660)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <qianyue.zj@alibaba-inc.com>)
	id 1e8p0z-0002LI-CF
	for coreutils@gnu.org; Sun, 29 Oct 2017 10:56:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=alibaba-inc.com; s=default; t=1509288993;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; 
	bh=Arn2yS9JhF8xx67einm+WsGrqahA8VRngD/w+4GDchg=;
	b=FPp/utWAklOoJFfTI9Q7LecIGXo9XW7GCfrYr5ldZ48/nqp3r+ubLRKaghVincOJC+fS1uhNEiXKO3MaJ0eDFqYNhvj8GE/V+ChZst3UGuT/IPgtFogRTZjk5Mf5JbpJf2Njan9TJwatkWtqHWYpAyXpbgStT5piPIHULnwvw7o=
X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R111e4;
	FP=0|-1|-1|-1|0|-1|-1|-1; HT=e02c03294;
	MF=qianyue.zj@alibaba-inc.com; NM=1; PH=DS; RN=2; SR=0;
	TI=SMTPD_---.9GVVtsM_1509288956; 
Received: from ali-6c96cfd98fb5.local(mailfrom:qianyue.zj@alibaba-inc.com
	ip:121.0.29.167) by smtp.aliyun-inc.com(127.0.0.1);
	Sun, 29 Oct 2017 22:55:56 +0800
Message-ID: <59F5EBFC.5000208@alibaba-inc.com>
Date: Sun, 29 Oct 2017 22:55:56 +0800
From: "Jia Zhang" <qianyue.zj@alibaba-inc.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12;
	rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigbrady.com>
CC: coreutils@gnu.org
Subject: [PATCH] Implement sm3sum
Content-Type: multipart/mixed; boundary="------------010803040706030005020807"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 47.88.44.34
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 14:56:47 -0000

This is a multi-part message in MIME format.
--------------010803040706030005020807
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi Brady,

As promised, I made efforts on making SM3 algorithm available in both
libgcrypt and gnulib.

Dropping the PR in github, I submit the patch here for a code review.

Thanks,
Jia



--------------010803040706030005020807
Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
 name="0001-md5sum-implement-SM3-hash-utility.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="0001-md5sum-implement-SM3-hash-utility.patch"

RnJvbSBmNzEzOTY4ZmNjNGNmM2FhNWYzNDA3NzQ4OGM4OTg5ZWM3MWZjYjcwIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaWEgWmhhbmcgPHFpYW55dWUuempAYWxpYmFiYS1p
bmMuY29tPgpEYXRlOiBTdW4sIDggT2N0IDIwMTcgMDA6MTE6MTEgLTA0MDAKU3ViamVjdDog
W1BBVENIXSBtZDVzdW06IGltcGxlbWVudCBTTTMgaGFzaCB1dGlsaXR5CgpUaGlzIG5ldyBo
YXNoIGNvbXB1dGluZyB0b29sIGlzIHByb3ZpZGVkIGZvciBTTTMgaGFzaCBhbGdvcml0aG0u
CgoqIEFVVEhPUlM6IEFkZCBhdXRob3IgaW5mby4KKiBSRUFETUU6IEFkZCBzbTNzdW0gdG8g
dGhlIHByb2dyYW0gbGlzdC4KKiBib290c3RyYXAuY29uZjogQWRkIHNtMyBtb2R1bGUgdG8g
dGhlIGdudWxpYiBtb2R1bGUgbGlzdC4KKiBidWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dy
YW1zLnNoOiBBZGQgc20zc3VtIHRvIHRoZSBidWlsZGFibGUgbGlzdC4KKiBtYW4vLmdpdGln
bm9yZTogSWdub3JlIHRoZSBtYW4gcGFnZSBmaWxlIHNtM3N1bS4xLgoqIG1hbi9sb2NhbC5t
azogRGVmaW5lIHRoZSBnZW5lcmF0aW9uIHJ1bGUgb2Ygc20zc3VtLjEuCiogbWFuL21kNXN1
bS54OiBBZGQgdGhlIGFkdmljZSBvZiB1c2luZyBzbTNzdW0uCiogbWFuL3NoYTFzdW0ueDog
TGlrZXdpc2UuCiogbWFuL3NtM3N1bS54OiBUaGUgbWFuIHBhZ2UgYWRkZWQuCiogc2NyaXB0
cy9naXQtaG9va3MvY29tbWl0LW1zZzogQWRkIHNtM3N1bSB0byB0aGUgdmFsaWQga2V5d29y
ZCBsaXN0LgoqIHNyYy8uZ2l0aWdub3JlOiBJZ25vcmUgdGhlIHByb2dyYW0gc20zc3VtLgoq
IHNyYy9sb2NhbC5tazogRGVmaW5lIHRoZSBydWxlcyBvZiBjb21waWxpbmcgc20zc3VtLgoq
IHNyYy9tZDVzdW0uYzogRGVmaW5lIEhBU0hfQUxHT19TTTMgYW5kIGFzc29jaWF0ZWQgY29u
dGVudHMuCiogc3JjL3N5c3RlbS5oOiBBZGQgc20zc3VtIHRvIGluZm9tYXAuCiogdGVzdHMv
bG9jYWwubWs6IEFkZCBzbTNzdW0ucGwgdG8gdGhlIHRlc3RjYXNlIGxpc3QuCiogdGVzdHMv
bWlzYy9zbTNzdW0ucGw6IFRoZSB0ZXN0IGNhc2UgYWRkZWQuCi0tLQogQVVUSE9SUyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICB8ICAxICsKIFJFQURNRSAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgfCAgNCArLS0KIGJvb3RzdHJhcC5jb25mICAgICAgICAgICAgICAgICAg
ICAgfCAgMSArCiBidWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoIHwgIDEgKwog
bWFuLy5naXRpZ25vcmUgICAgICAgICAgICAgICAgICAgICB8ICAxICsKIG1hbi9sb2NhbC5t
ayAgICAgICAgICAgICAgICAgICAgICAgfCAgMSArCiBtYW4vbWQ1c3VtLnggICAgICAgICAg
ICAgICAgICAgICAgIHwgIDMgKystCiBtYW4vc2hhMXN1bS54ICAgICAgICAgICAgICAgICAg
ICAgIHwgIDMgKystCiBtYW4vc20zc3VtLnggICAgICAgICAgICAgICAgICAgICAgIHwgIDQg
KysrCiBzY3JpcHRzL2dpdC1ob29rcy9jb21taXQtbXNnICAgICAgIHwgIDIgKy0KIHNyYy8u
Z2l0aWdub3JlICAgICAgICAgICAgICAgICAgICAgfCAgMSArCiBzcmMvbG9jYWwubWsgICAg
ICAgICAgICAgICAgICAgICAgIHwgIDUgKysrKwogc3JjL21kNXN1bS5jICAgICAgICAgICAg
ICAgICAgICAgICB8IDE0ICsrKysrKysrKysKIHNyYy9zeXN0ZW0uaCAgICAgICAgICAgICAg
ICAgICAgICAgfCAgMSArCiB0ZXN0cy9sb2NhbC5tayAgICAgICAgICAgICAgICAgICAgIHwg
IDEgKwogdGVzdHMvbWlzYy9zbTNzdW0ucGwgICAgICAgICAgICAgICB8IDU1ICsrKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrCiAxNiBmaWxlcyBjaGFuZ2VkLCA5MyBp
bnNlcnRpb25zKCspLCA1IGRlbGV0aW9ucygtKQogY3JlYXRlIG1vZGUgMTAwNjQ0IG1hbi9z
bTNzdW0ueAogY3JlYXRlIG1vZGUgMTAwNzU1IHRlc3RzL21pc2Mvc20zc3VtLnBsCgpkaWZm
IC0tZ2l0IGEvQVVUSE9SUyBiL0FVVEhPUlMKaW5kZXggOTNkNTQ3YjJkLi5hOWU5MWIxMTUg
MTAwNjQ0Ci0tLSBhL0FVVEhPUlMKKysrIGIvQVVUSE9SUwpAQCAtNzksNiArNzksNyBAQCBz
aGE1MTJzdW06IFVscmljaCBEcmVwcGVyLCBTY290dCBNaWxsZXIsIERhdmlkIE1hZG9yZQog
c2hyZWQ6IENvbGluIFBsdW1iCiBzaHVmOiBQYXVsIEVnZ2VydAogc2xlZXA6IEppbSBNZXll
cmluZywgUGF1bCBFZ2dlcnQKK3NtM3N1bTogSmlhIFpoYW5nCiBzb3J0OiBNaWtlIEhhZXJ0
ZWwsIFBhdWwgRWdnZXJ0CiBzcGxpdDogVG9yYmpvcm4gR3Jhbmx1bmQsIFJpY2hhcmQgTS4g
U3RhbGxtYW4KIHN0YXQ6IE1pY2hhZWwgTWVza2VzCmRpZmYgLS1naXQgYS9SRUFETUUgYi9S
RUFETUUKaW5kZXggOTI4NGU3YzBhLi45YjNlMDI4ODQgMTAwNjQ0Ci0tLSBhL1JFQURNRQor
KysgYi9SRUFETUUKQEAgLTEzLDggKzEzLDggQEAgVGhlIHByb2dyYW1zIHRoYXQgY2FuIGJl
IGJ1aWx0IHdpdGggdGhpcyBwYWNrYWdlIGFyZToKICAgam9pbiBraWxsIGxpbmsgbG4gbG9n
bmFtZSBscyBtZDVzdW0gbWtkaXIgbWtmaWZvIG1rbm9kIG1rdGVtcCBtdiBuaWNlIG5sCiAg
IG5vaHVwIG5wcm9jIG51bWZtdCBvZCBwYXN0ZSBwYXRoY2hrIHBpbmt5IHByIHByaW50ZW52
IHByaW50ZiBwdHggcHdkCiAgIHJlYWRsaW5rIHJlYWxwYXRoIHJtIHJtZGlyIHJ1bmNvbiBz
ZXEgc2hhMXN1bSBzaGEyMjRzdW0gc2hhMjU2c3VtIHNoYTM4NHN1bQotICBzaGE1MTJzdW0g
c2hyZWQgc2h1ZiBzbGVlcCBzb3J0IHNwbGl0IHN0YXQgc3RkYnVmIHN0dHkgc3VtIHN5bmMg
dGFjIHRhaWwKLSAgdGVlIHRlc3QgdGltZW91dCB0b3VjaCB0ciB0cnVlIHRydW5jYXRlIHRz
b3J0IHR0eSB1bmFtZSB1bmV4cGFuZCB1bmlxCisgIHNoYTUxMnN1bSBzaHJlZCBzaHVmIHNs
ZWVwIHNtM3N1bSBzb3J0IHNwbGl0IHN0YXQgc3RkYnVmIHN0dHkgc3VtIHN5bmMgdGFjCisg
IHRhaWwgdGVlIHRlc3QgdGltZW91dCB0b3VjaCB0ciB0cnVlIHRydW5jYXRlIHRzb3J0IHR0
eSB1bmFtZSB1bmV4cGFuZCB1bmlxCiAgIHVubGluayB1cHRpbWUgdXNlcnMgdmRpciB3YyB3
aG8gd2hvYW1pIHllcwogCiBTZWUgdGhlIGZpbGUgTkVXUyBmb3IgYSBsaXN0IG9mIG1ham9y
IGNoYW5nZXMgaW4gdGhlIGN1cnJlbnQgcmVsZWFzZS4KZGlmZiAtLWdpdCBhL2Jvb3RzdHJh
cC5jb25mIGIvYm9vdHN0cmFwLmNvbmYKaW5kZXggY2UxNjg5YTdlLi5lNTIxZWNkNmEgMTAw
NjQ0Ci0tLSBhL2Jvb3RzdHJhcC5jb25mCisrKyBiL2Jvb3RzdHJhcC5jb25mCkBAIC01NSw2
ICs1NSw3IEBAIGdudWxpYl9tb2R1bGVzPSIKICAgY3J5cHRvL3NoYTEKICAgY3J5cHRvL3No
YTI1NgogICBjcnlwdG8vc2hhNTEyCisgIGNyeXB0by9zbTMKICAgY3ljbGUtY2hlY2sKICAg
ZC1pbm8KICAgZC10eXBlCmRpZmYgLS1naXQgYS9idWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXBy
b2dyYW1zLnNoIGIvYnVpbGQtYXV4L2dlbi1saXN0cy1vZi1wcm9ncmFtcy5zaAppbmRleCBj
ZGJjZDBhOWUuLjU2ODdkN2E1NSAxMDA3NTUKLS0tIGEvYnVpbGQtYXV4L2dlbi1saXN0cy1v
Zi1wcm9ncmFtcy5zaAorKysgYi9idWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNo
CkBAIC0xMTIsNiArMTEyLDcgQEAgbm9ybWFsX3Byb2dzPScKICAgICBzaHJlZAogICAgIHNo
dWYKICAgICBzbGVlcAorICAgIHNtM3N1bQogICAgIHNvcnQKICAgICBzcGxpdAogICAgIHN0
YXQKZGlmZiAtLWdpdCBhL21hbi8uZ2l0aWdub3JlIGIvbWFuLy5naXRpZ25vcmUKaW5kZXgg
OWVmMDQ4YTRjLi5lNDVhZDQ0NTEgMTAwNjQ0Ci0tLSBhL21hbi8uZ2l0aWdub3JlCisrKyBi
L21hbi8uZ2l0aWdub3JlCkBAIC03NCw2ICs3NCw3IEBAIHNoYTUxMnN1bS4xCiBzaHJlZC4x
CiBzaHVmLjEKIHNsZWVwLjEKK3NtM3N1bS4xCiBzb3J0LjEKIHNwbGl0LjEKIHN0YXQuMQpk
aWZmIC0tZ2l0IGEvbWFuL2xvY2FsLm1rIGIvbWFuL2xvY2FsLm1rCmluZGV4IDVmM2YyMTUy
ZC4uZDE0NmM4NjI5IDEwMDY0NAotLS0gYS9tYW4vbG9jYWwubWsKKysrIGIvbWFuL2xvY2Fs
Lm1rCkBAIC0xNDEsNiArMTQxLDcgQEAgbWFuL3NoYTUxMnN1bS4xOiBzcmMvc2hhNTEyc3Vt
JChFWEVFWFQpCiBtYW4vc2hyZWQuMTogICAgIHNyYy9zaHJlZCQoRVhFRVhUKQogbWFuL3No
dWYuMTogICAgICBzcmMvc2h1ZiQoRVhFRVhUKQogbWFuL3NsZWVwLjE6ICAgICBzcmMvc2xl
ZXAkKEVYRUVYVCkKK21hbi9zbTNzdW0uMTogICAgc3JjL3NtM3N1bSQoRVhFRVhUKQogbWFu
L3NvcnQuMTogICAgICBzcmMvc29ydCQoRVhFRVhUKQogbWFuL3NwbGl0LjE6ICAgICBzcmMv
c3BsaXQkKEVYRUVYVCkKIG1hbi9zdGF0LjE6ICAgICAgc3JjL3N0YXQkKEVYRUVYVCkKZGlm
ZiAtLWdpdCBhL21hbi9tZDVzdW0ueCBiL21hbi9tZDVzdW0ueAppbmRleCBiZGI2Y2M3NjUu
LmFkNTQ4OGM0YiAxMDA2NDQKLS0tIGEvbWFuL21kNXN1bS54CisrKyBiL21hbi9tZDVzdW0u
eApAQCAtNiw0ICs2LDUgQEAgbWQ1c3VtIFwtIGNvbXB1dGUgYW5kIGNoZWNrIE1ENSBtZXNz
YWdlIGRpZ2VzdAogRG8gbm90IHVzZSB0aGUgTUQ1IGFsZ29yaXRobSBmb3Igc2VjdXJpdHkg
cmVsYXRlZCBwdXJwb3Nlcy4KIEluc3RlYWQsIHVzZSBhbiBTSEFcLTIgYWxnb3JpdGhtLCBp
bXBsZW1lbnRlZCBpbiB0aGUgcHJvZ3JhbXMKIHNoYTIyNHN1bSgxKSwgc2hhMjU2c3VtKDEp
LCBzaGEzODRzdW0oMSksIHNoYTUxMnN1bSgxKSwKLW9yIHRoZSBCTEFLRTIgYWxnb3JpdGht
LCBpbXBsZW1lbnRlZCBpbiBiMnN1bSgxKQorb3IgdGhlIEJMQUtFMiBhbGdvcml0aG0sIGlt
cGxlbWVudGVkIGluIGIyc3VtKDEpLCBvciB0aGUgU00zCithbGdvcml0aG0sIGltcGxlbWVu
dGVkIGluIHNtM3N1bSgxKQpkaWZmIC0tZ2l0IGEvbWFuL3NoYTFzdW0ueCBiL21hbi9zaGEx
c3VtLngKaW5kZXggZWYwODUyZjRkLi4xMGQ1YmQ2ODcgMTAwNjQ0Ci0tLSBhL21hbi9zaGEx
c3VtLngKKysrIGIvbWFuL3NoYTFzdW0ueApAQCAtNiw0ICs2LDUgQEAgc2hhMXN1bSBcLSBj
b21wdXRlIGFuZCBjaGVjayBTSEExIG1lc3NhZ2UgZGlnZXN0CiBEbyBub3QgdXNlIHRoZSBT
SEEtMSBhbGdvcml0aG0gZm9yIHNlY3VyaXR5IHJlbGF0ZWQgcHVycG9zZXMuCiBJbnN0ZWFk
LCB1c2UgYW4gU0hBXC0yIGFsZ29yaXRobSwgaW1wbGVtZW50ZWQgaW4gdGhlIHByb2dyYW1z
CiBzaGEyMjRzdW0oMSksIHNoYTI1NnN1bSgxKSwgc2hhMzg0c3VtKDEpLCBzaGE1MTJzdW0o
MSksCi1vciB0aGUgQkxBS0UyIGFsZ29yaXRobSwgaW1wbGVtZW50ZWQgaW4gYjJzdW0oMSkK
K29yIHRoZSBCTEFLRTIgYWxnb3JpdGhtLCBpbXBsZW1lbnRlZCBpbiBiMnN1bSgxKSwgb3Ig
dGhlIFNNMworYWxnb3JpdGhtLCBpbXBsZW1lbnRlZCBpbiBzbTNzdW0oMSkKZGlmZiAtLWdp
dCBhL21hbi9zbTNzdW0ueCBiL21hbi9zbTNzdW0ueApuZXcgZmlsZSBtb2RlIDEwMDY0NApp
bmRleCAwMDAwMDAwMDAuLmRjMjhjNTA3NAotLS0gL2Rldi9udWxsCisrKyBiL21hbi9zbTNz
dW0ueApAQCAtMCwwICsxLDQgQEAKK1tOQU1FXQorc20zc3VtIFwtIGNvbXB1dGUgYW5kIGNo
ZWNrIFNNMyBtZXNzYWdlIGRpZ2VzdAorW0RFU0NSSVBUSU9OXQorLlwiIEFkZCBhbnkgYWRk
aXRpb25hbCBkZXNjcmlwdGlvbiBoZXJlCmRpZmYgLS1naXQgYS9zY3JpcHRzL2dpdC1ob29r
cy9jb21taXQtbXNnIGIvc2NyaXB0cy9naXQtaG9va3MvY29tbWl0LW1zZwppbmRleCBlNmIz
OGJiMjEuLjAxNDgyMTFiZiAxMDA3NTUKLS0tIGEvc2NyaXB0cy9naXQtaG9va3MvY29tbWl0
LW1zZworKysgYi9zY3JpcHRzL2dpdC1ob29rcy9jb21taXQtbXNnCkBAIC0yMCw3ICsyMCw3
IEBAIG15IEB2YWxpZCA9IHF3KAogICAgIGpvaW4ga2lsbCBsaW5rIGxuIGxvZ25hbWUgbHMg
bWQ1c3VtIG1rZGlyIG1rZmlmbyBta25vZCBta3RlbXAKICAgICBtdiBuaWNlIG5sIG5vaHVw
IG5wcm9jIG51bWZtdCBvZCBwYXN0ZSBwYXRoY2hrIHBpbmt5IHByIHByaW50ZW52IHByaW50
ZgogICAgIHB0eCBwd2QgcmVhZGxpbmsgcmVhbHBhdGggcm0gcm1kaXIgcnVuY29uIHNlcSBz
aGExc3VtIHNoYTIyNHN1bSBzaGEyNTZzdW0KLSAgICBzaGEzODRzdW0gc2hhNTEyc3VtIHNo
cmVkIHNodWYgc2xlZXAgc29ydCBzcGxpdCBzdGF0IHN0ZGJ1ZiBzdHR5CisgICAgc2hhMzg0
c3VtIHNoYTUxMnN1bSBzaHJlZCBzaHVmIHNsZWVwIHNtM3N1bSBzb3J0IHNwbGl0IHN0YXQg
c3RkYnVmIHN0dHkKICAgICBzdW0gc3luYyB0YWMgdGFpbCB0ZWUgdGVzdCB0aW1lb3V0IHRv
dWNoIHRyIHRydWUgdHJ1bmNhdGUgdHNvcnQKICAgICB0dHkgdW5hbWUgdW5leHBhbmQgdW5p
cSB1bmxpbmsgdXB0aW1lIHVzZXJzIHZkaXIgd2Mgd2hvIHdob2FtaSB5ZXMKIApkaWZmIC0t
Z2l0IGEvc3JjLy5naXRpZ25vcmUgYi9zcmMvLmdpdGlnbm9yZQppbmRleCA3MGFiMmNhYzgu
LmZlOTcwMDQ2NyAxMDA2NDQKLS0tIGEvc3JjLy5naXRpZ25vcmUKKysrIGIvc3JjLy5naXRp
Z25vcmUKQEAgLTg2LDYgKzg2LDcgQEAgc2hhNTEyc3VtCiBzaHJlZAogc2h1Zgogc2xlZXAK
K3NtM3N1bQogc29ydAogc3BsaXQKIHN0YXQKZGlmZiAtLWdpdCBhL3NyYy9sb2NhbC5tayBi
L3NyYy9sb2NhbC5tawppbmRleCAzOGI0YmQ0NDkuLjQwNDJiMzEzNCAxMDA2NDQKLS0tIGEv
c3JjL2xvY2FsLm1rCisrKyBiL3NyYy9sb2NhbC5tawpAQCAtMTgwLDYgKzE4MCw3IEBAIHNy
Y19zaGE1MTJzdW1fTERBREQgPSAkKExEQUREKQogc3JjX3NocmVkX0xEQUREID0gJChMREFE
RCkKIHNyY19zaHVmX0xEQUREID0gJChMREFERCkKIHNyY19zbGVlcF9MREFERCA9ICQoTERB
REQpCitzcmNfc20zc3VtX0xEQUREID0gJChMREFERCkKIHNyY19zb3J0X0xEQUREID0gJChM
REFERCkKIHNyY19zcGxpdF9MREFERCA9ICQoTERBREQpCiBzcmNfc3RhdF9MREFERCA9ICQo
TERBREQpCkBAIC0zMDAsNiArMzAxLDcgQEAgc3JjX3NoYTIyNHN1bV9MREFERCArPSAkKExJ
Ql9DUllQVE8pCiBzcmNfc2hhMjU2c3VtX0xEQUREICs9ICQoTElCX0NSWVBUTykKIHNyY19z
aGEzODRzdW1fTERBREQgKz0gJChMSUJfQ1JZUFRPKQogc3JjX3NoYTUxMnN1bV9MREFERCAr
PSAkKExJQl9DUllQVE8pCitzcmNfc20zc3VtX0xEQUREICs9ICQoTElCX0NSWVBUTykKIAog
IyBmb3IgY2Fub25faG9zdAogc3JjX3Bpbmt5X0xEQUREICs9ICQoR0VUQUREUklORk9fTElC
KQpAQCAtMzk3LDYgKzM5OSw5IEBAIHNyY19zaGEzODRzdW1fU09VUkNFUyA9IHNyYy9tZDVz
dW0uYwogc3JjX3NoYTM4NHN1bV9DUFBGTEFHUyA9IC1ESEFTSF9BTEdPX1NIQTM4ND0xICQo
QU1fQ1BQRkxBR1MpCiBzcmNfc2hhNTEyc3VtX1NPVVJDRVMgPSBzcmMvbWQ1c3VtLmMKIHNy
Y19zaGE1MTJzdW1fQ1BQRkxBR1MgPSAtREhBU0hfQUxHT19TSEE1MTI9MSAkKEFNX0NQUEZM
QUdTKQorc3JjX3NtM3N1bV9TT1VSQ0VTID0gc3JjL21kNXN1bS5jCitzcmNfc20zc3VtX0NQ
UEZMQUdTID0gLURIQVNIX0FMR09fU00zPTEgJChBTV9DUFBGTEFHUykKKwogIyBJbmNsdWRl
IHRoZSBmaWxlIG9uIHRoZSBjb21tYW5kIGxpbmUgdG8gYXZvaWQgbW9kaWZ5aW5nCiAjIHRo
ZSBibGFrZTIgdXBzdHJlYW0gc291cmNlCiBpZiBVU0VfWExDX0lOQ0xVREUKZGlmZiAtLWdp
dCBhL3NyYy9tZDVzdW0uYyBiL3NyYy9tZDVzdW0uYwppbmRleCBjODAwMjMxNzguLjI3ODI4
ZjZkMiAxMDA2NDQKLS0tIGEvc3JjL21kNXN1bS5jCisrKyBiL3NyYy9tZDVzdW0uYwpAQCAt
NDIsNiArNDIsOSBAQAogI2lmIEhBU0hfQUxHT19TSEE1MTIgfHwgSEFTSF9BTEdPX1NIQTM4
NAogIyBpbmNsdWRlICJzaGE1MTIuaCIKICNlbmRpZgorI2lmIEhBU0hfQUxHT19TTTMKKyMg
aW5jbHVkZSAic20zLmgiCisjZW5kaWYKICNpbmNsdWRlICJkaWUuaCIKICNpbmNsdWRlICJl
cnJvci5oIgogI2luY2x1ZGUgImZhZHZpc2UuaCIKQEAgLTk4LDYgKzEwMSwxMyBAQAogIyBk
ZWZpbmUgRElHRVNUX0JJVFMgMzg0CiAjIGRlZmluZSBESUdFU1RfUkVGRVJFTkNFICJGSVBT
LTE4MC0yIgogIyBkZWZpbmUgRElHRVNUX0FMSUdOIDgKKyNlbGlmIEhBU0hfQUxHT19TTTMK
KyMgZGVmaW5lIFBST0dSQU1fTkFNRSAic20zc3VtIgorIyBkZWZpbmUgRElHRVNUX1RZUEVf
U1RSSU5HICJTTTMiCisjIGRlZmluZSBESUdFU1RfU1RSRUFNIHNtM19zdHJlYW0KKyMgZGVm
aW5lIERJR0VTVF9CSVRTIDI1NgorIyBkZWZpbmUgRElHRVNUX1JFRkVSRU5DRSAiR0IvVCAz
MjkwNS0yMDE2IgorIyBkZWZpbmUgRElHRVNUX0FMSUdOIDQKICNlbHNlCiAjIGVycm9yICJD
YW4ndCBkZWNpZGUgd2hpY2ggaGFzaCBhbGdvcml0aG0gdG8gY29tcGlsZS4iCiAjZW5kaWYK
QEAgLTEwNiw2ICsxMTYsMTAgQEAKICMgZGVmaW5lIEFVVEhPUlMgXAogICBwcm9wZXJfbmFt
ZSAoIlBhZHJhaWcgQnJhZHkiKSwgXAogICBwcm9wZXJfbmFtZSAoIlNhbXVlbCBOZXZlcyIp
CisjZWxpZiBIQVNIX0FMR09fU00zCisjIGRlZmluZSBBVVRIT1JTIFwKKyAgcHJvcGVyX25h
bWUgKCJKaWEgWmhhbmciKQorIyBkZWZpbmUgRElHRVNUX0hFWF9CWVRFUyAoRElHRVNUX0JJ
VFMgLyA0KQogI2Vsc2UKICMgZGVmaW5lIEFVVEhPUlMgXAogICBwcm9wZXJfbmFtZSAoIlVs
cmljaCBEcmVwcGVyIiksIFwKZGlmZiAtLWdpdCBhL3NyYy9zeXN0ZW0uaCBiL3NyYy9zeXN0
ZW0uaAppbmRleCAxYzdmZWU5ZTkuLmU3MjVmMWVhMCAxMDA2NDQKLS0tIGEvc3JjL3N5c3Rl
bS5oCisrKyBiL3NyYy9zeXN0ZW0uaApAQCAtNjM2LDYgKzYzNiw3IEBAIGVtaXRfYW5jaWxs
YXJ5X2luZm8gKGNoYXIgY29uc3QgKnByb2dyYW0pCiAgICAgeyAic2hhMjU2c3VtIiwgInNo
YTIgdXRpbGl0aWVzIiB9LAogICAgIHsgInNoYTM4NHN1bSIsICJzaGEyIHV0aWxpdGllcyIg
fSwKICAgICB7ICJzaGE1MTJzdW0iLCAic2hhMiB1dGlsaXRpZXMiIH0sCisgICAgeyAic20z
c3VtIiwgInNtMyB1dGlsaXR5IiB9LAogICAgIHsgTlVMTCwgTlVMTCB9CiAgIH07CiAKZGlm
ZiAtLWdpdCBhL3Rlc3RzL2xvY2FsLm1rIGIvdGVzdHMvbG9jYWwubWsKaW5kZXggNzQ0MjZm
NjA4Li5iMjJjZjM1ZmYgMTAwNjQ0Ci0tLSBhL3Rlc3RzL2xvY2FsLm1rCisrKyBiL3Rlc3Rz
L2xvY2FsLm1rCkBAIC0zNDYsNiArMzQ2LDcgQEAgYWxsX3Rlc3RzID0JCQkJCVwKICAgdGVz
dHMvbWlzYy9zaHVmLnNoCQkJCVwKICAgdGVzdHMvbWlzYy9zaHVmLXJlc2Vydm9pci5zaAkJ
CVwKICAgdGVzdHMvbWlzYy9zbGVlcC5zaAkJCQlcCisgIHRlc3RzL21pc2Mvc20zc3VtLnBs
CQkJCVwKICAgdGVzdHMvbWlzYy9zb3J0LnBsCQkJCVwKICAgdGVzdHMvbWlzYy9zb3J0LWJl
bmNobWFyay1yYW5kb20uc2gJCVwKICAgdGVzdHMvbWlzYy9zb3J0LWNvbXByZXNzLnNoCQkJ
XApkaWZmIC0tZ2l0IGEvdGVzdHMvbWlzYy9zbTNzdW0ucGwgYi90ZXN0cy9taXNjL3NtM3N1
bS5wbApuZXcgZmlsZSBtb2RlIDEwMDc1NQppbmRleCAwMDAwMDAwMDAuLjcwZDU4NmY4Ngot
LS0gL2Rldi9udWxsCisrKyBiL3Rlc3RzL21pc2Mvc20zc3VtLnBsCkBAIC0wLDAgKzEsNTUg
QEAKKyMhL3Vzci9iaW4vcGVybAorIyBUZXN0ICJzbTNzdW0iLgorCisjIENvcHlyaWdodCAo
QykgMjAxNyBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KKworIyBUaGlzIHByb2dy
YW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1v
ZGlmeQorIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBM
aWNlbnNlIGFzIHB1Ymxpc2hlZCBieQorIyB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9u
LCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgorIyAoYXQgeW91ciBvcHRp
b24pIGFueSBsYXRlciB2ZXJzaW9uLgorCisjIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRl
ZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorIyBidXQgV0lUSE9VVCBB
TlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgorIyBN
RVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBT
ZWUgdGhlCisjIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMu
CisKKyMgWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVy
YWwgUHVibGljIExpY2Vuc2UKKyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3Qs
IHNlZSA8aHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LgorCit1c2Ugc3RyaWN0Owor
CisobXkgJHByb2dyYW1fbmFtZSA9ICQwKSA9fiBzfC4qL3x8OworCisjIFR1cm4gb2ZmIGxv
Y2FsaXphdGlvbiBvZiBleGVjdXRhYmxlJ3Mgb3V0cHV0LgorQEVOVntxdyhMQU5HVUFHRSBM
QU5HIExDX0FMTCl9ID0gKCdDJykgeCAzOworCitteSAkc20zX2RlZ2VuZXJhdGUgPSAiMWFi
MjFkODM1NWNmYTE3ZjhlNjExOTQ4MzFlODFhOGYyMmJlYzhjNzI4ZmVmYjc0N2VkMDM1ZWI1
MDgyYWEyYiI7CisKK215IEBUZXN0cyA9CisgICAgKAorICAgICBbJ3MxJywge0lOPT4ge2Y9
PiAnJ319LAorICAgICAgICAgICAgICAgICAgICAgICAge09VVD0+IiRzbTNfZGVnZW5lcmF0
ZSAgZlxuIn1dLAorICAgICBbJ3MyJywge0lOPT4ge2Y9PiAnYSd9fSwKKyAgICAgICAgICAg
ICAgICAgICAgICAgIHtPVVQ9PiI2MjM0NzZhYzE4ZjY1YTI5MDllNDNjN2ZlYzYxYjQ5Yzdl
NzY0YTkxYTE4Y2NiODJmMTkxN2EyOWM4NmM1ZTg4ICBmXG4ifV0sCisgICAgIFsnczMnLCB7
SU49PiB7Zj0+ICdhYmMnfX0sCisgICAgICAgICAgICAgICAgICAgICAgICB7T1VUPT4iNjZj
N2YwZjQ2MmVlZWRkOWQxZjJkNDZiZGMxMGU0ZTI0MTY3YzQ4NzVjZjJmN2EyMjk3ZGEwMmI4
ZjRiYThlMCAgZlxuIn1dLAorICAgICBbJ3M0JywKKyAgICAgIHtJTj0+IHtmPT4gJ2FiY2Ri
Y2RlY2RlZmRlZmdlZmdoZmdoaWdoaWpoaWpraWprbGprbG1rbG1ubG1ub21ub3Bub3BxJ319
LAorICAgICAgICAgICAgICAgICAgICAgICAge09VVD0+IjYzOWI2Y2M1ZTY0ZDllMzdhMzkw
YjE5MmRmNGZhMWVhMDcyMGFiNzQ3ZmY2OTJiOWYzOGM0ZTY2YWQ3YjhjMDUgIGZcbiJ9XSwK
KyAgICAgWydzOCcsIHtJTj0+IHtmPT4gJ2EnIHggMTAwMDAwMH19LAorICAgICAgICAgICAg
ICAgICAgICAgICAge09VVD0+ImM4YWFmODk0Mjk1NTQwMjllMjMxOTQxYTJhY2MwYWQ2MWZm
MmE1YWNkOGZhZGQyNTg0N2EzYTczMmIzYjAyYzMgIGZcbiJ9XSwKKyAgICApOworCisjIElu
c2VydCB0aGUgJy0tdGV4dCcgYXJndW1lbnQgZm9yIGVhY2ggdGVzdC4KK215ICR0OworZm9y
ZWFjaCAkdCAoQFRlc3RzKQorICB7CisgICAgc3BsaWNlIEAkdCwgMSwgMCwgJy0tdGV4dCcg
dW5sZXNzIEAkdFsxXSA9fiAvLS1jaGVjay87CisgIH0KKworbXkgJHNhdmVfdGVtcHMgPSAk
RU5We0RFQlVHfTsKK215ICR2ZXJib3NlID0gJEVOVntWRVJCT1NFfTsKKworbXkgJHByb2cg
PSAnc20zc3VtJzsKK215ICRmYWlsID0gcnVuX3Rlc3RzICgkcHJvZ3JhbV9uYW1lLCAkcHJv
ZywgXEBUZXN0cywgJHNhdmVfdGVtcHMsICR2ZXJib3NlKTsKK2V4aXQgJGZhaWw7Ci0tIAoy
LjE0LjEKCg==
--------------010803040706030005020807--


From MAILER-DAEMON Sun Oct 29 17:25:48 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8v5X-0003ek-VL
	for mharc-coreutils@gnu.org; Sun, 29 Oct 2017 17:25:47 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38655)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e8v5W-0003ec-Aj
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:25:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e8v5T-0004ok-6y
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:25:46 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:58440)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>) id 1e8v5T-0004lV-06
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:25:43 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 170D71EB;
	Sun, 29 Oct 2017 21:25:39 +0000 (GMT)
Subject: Re: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
To: Jim Meyering <jim@meyering.net>, coreutils@gnu.org
References: <lubpf3she3nb0j.fsf@meyering.net>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <5bf08f03-e447-ebf8-0584-0821f6e498f2@draigBrady.com>
Date: Sun, 29 Oct 2017 14:25:37 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <lubpf3she3nb0j.fsf@meyering.net>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 21:25:47 -0000

On 27/10/17 21:37, Jim Meyering wrote:
> I noticed a new warning/error when building with git-latest gcc,
> and propose to fix it with this:
>=20
>>From f89c20bdf7ccc033cbc22662e932fae7761754fc Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@fb.com>
> Date: Fri, 27 Oct 2017 21:14:37 -0700
> Subject: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more function=
s
>=20
> * src/ls.c (DEFINE_SORT_FUNCTIONS): Apply _GL_ATTRIBUTE_PURE
> to each strcmp-derived function definition, since GCC8 with
> -Wsuggest-attribute=3Dpure now warns it is needed.

+1
Works fine with gcc 6.3.1 FWIW

cheers,
P=E1draig



From MAILER-DAEMON Sun Oct 29 17:29:30 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8v98-0004Dw-PV
	for mharc-coreutils@gnu.org; Sun, 29 Oct 2017 17:29:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39126)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e8v93-0004CF-HX
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:29:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1e8v92-0006xt-3B
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:29:25 -0400
Received: from mail.magicbluesmoke.com ([82.195.144.49]:58448)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <P@draigBrady.com>)
	id 1e8v8x-0006xE-9d; Sun, 29 Oct 2017 17:29:19 -0400
Received: from localhost.localdomain (c-73-158-116-184.hsd1.ca.comcast.net
	[73.158.116.184])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 34033235;
	Sun, 29 Oct 2017 21:29:17 +0000 (GMT)
Subject: Re: [PATCH] Implement SM3 hash algorithm in gnulib and the computing
	tool in coreutils.
To: Assaf Gordon <assafgordon@gmail.com>, Bruno Haible <bruno@clisp.org>,
	Jia Zhang <qianyue.zj@alibaba-inc.com>
References: <D603E203.81E%qianyue.zj@alibaba-inc.com>
	<6473292.TjZuIb3LsK@omega> <59EEFBA1.1090308@alibaba-inc.com>
	<2577472.loxlcmsLqh@omega>
	<a211c945-4cff-93fd-e29d-2c6cdb4be95b@gmail.com>
Cc: bug-gnulib@gnu.org, coreutils@gnu.org
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@draigBrady.com>
Message-ID: <b0bd04b5-b914-5591-812a-4ebd3d5912a6@draigBrady.com>
Date: Sun, 29 Oct 2017 14:29:15 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <a211c945-4cff-93fd-e29d-2c6cdb4be95b@gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 82.195.144.49
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 21:29:26 -0000

On 29/10/17 00:28, Assaf Gordon wrote:
> Hello,
>=20
> On 2017-10-24 04:09 AM, Bruno Haible wrote:
>>>> Indeed, we don't have many crypto experts on the gnulib mailing
>>>> lists. Therefore, I too would like the crypto experts on the
>>>> libgcrypt or openssl mailing lists to evaluate the SM3 algorithm
>>>> and your code first, before we can accept it in gnulib.
>>>
>>> libgcrypt has merged SM3 hash function. See
>>> https://dev.gnupg.org/rC4423bf3cc4432b9bfe801ff74cb05e6f0dd3eccd
>=20
> I see SM3 has been added to gnulib and libgcrypt,
> but I would suggest we wait for further evaluation before adding it to=20
> coreutils.
>=20
> libgcrypt specifically say: "Thorough understanding of
> applied cryptography is required to use Libgcrypt."
> and Werner Koch explicitly acknowledged that they are willing to includ=
e
> known weak algorithms in libgcrypt because non-experts should never use=
=20
> it directly:
>   https://lists.gnupg.org/pipermail/gcrypt-devel/2017-October/004287.ht=
ml
>=20
> I'm assuming the same applies to gnulib - but not to coreutils.
>=20
>=20
>=20
>=20
> I won't claim to have any understanding of cryptography or hashing,
> but a cursory look at the code raises three red flags:
>=20
> First,
> It is *very* similar to sha256.
> Not just the function structure, but almost line-for-line identical.
> It could almost be said that SM3 is just a modified sha256 with slightl=
y=20
> different primitives.
> (try "diff -u lib/sm3.c lib/sha256.c" to see what I mean).
>=20
> sha256 was published in 2001, and while it has not yet been compromised=
,
> I would naively think it is not wise to offer a new hashing algorithm i=
n=20
> 2017 that's based on sha256.
> I think it is already generally recommended to move away from sha-256
> to at least sha-512 (or sha-3).
>=20
>=20
>=20
> Second,
> All SHA-2 hash functions use initialization values that
> are based on the cube roots of the first 62 primes.
> In lib/sha256.c it is the "sha256_round_constants" variable.
> In lib/sm3.c these initialization values are the same 32bit values,
> rotated:
>=20
> /* SM3 round constants */
> #define T(j) sm3_round_constants[j]
> static const uint32_t sm3_round_constants[64] =3D {
>    0x79cc4519UL, 0xf3988a32UL, 0xe7311465UL, 0xce6228cbUL,
>    0x9cc45197UL, 0x3988a32fUL, 0x7311465eUL, 0xe6228cbcUL,
>    0xcc451979UL, 0x988a32f3UL, 0x311465e7UL, 0x6228cbceUL,
>    0xc451979cUL, 0x88a32f39UL, 0x11465e73UL, 0x228cbce6UL,
>    0x9d8a7a87UL, 0x3b14f50fUL, 0x7629ea1eUL, 0xec53d43cUL,
>    0xd8a7a879UL, 0xb14f50f3UL, 0x629ea1e7UL, 0xc53d43ceUL,
>    0x8a7a879dUL, 0x14f50f3bUL, 0x29ea1e76UL, 0x53d43cecUL,
>    0xa7a879d8UL, 0x4f50f3b1UL, 0x9ea1e762UL, 0x3d43cec5UL,
>    0x7a879d8aUL, 0xf50f3b14UL, 0xea1e7629UL, 0xd43cec53UL,
>    0xa879d8a7UL, 0x50f3b14fUL, 0xa1e7629eUL, 0x43cec53dUL,
>    0x879d8a7aUL, 0x0f3b14f5UL, 0x1e7629eaUL, 0x3cec53d4UL,
>    0x79d8a7a8UL, 0xf3b14f50UL, 0xe7629ea1UL, 0xcec53d43UL,
>    0x9d8a7a87UL, 0x3b14f50fUL, 0x7629ea1eUL, 0xec53d43cUL,
>    0xd8a7a879UL, 0xb14f50f3UL, 0x629ea1e7UL, 0xc53d43ceUL,
>    0x8a7a879dUL, 0x14f50f3bUL, 0x29ea1e76UL, 0x53d43cecUL,
>    0xa7a879d8UL, 0x4f50f3b1UL, 0x9ea1e762UL, 0x3d43cec5UL,
>=20
>=20
>=20
>=20
> Third,
> The 64 rounds ("Compression function") in sha256 seem to
> rotate the internal state variables equally (a..h)
> in the R macro definition [1] and usage [2].
>=20
> [1] https://opengrok.housegordon.com/source/xref/gnulib/lib/sha256.c#48=
4
> [2] https://opengrok.housegordon.com/source/xref/gnulib/lib/sha256.c#50=
4
>=20
> In sm3, it seems from a cursory look that the first 128 bits
> and the last 128 bits of internal states are kept mostly separated
> (variable a..d and e..h) based on the R macro [3] and usage [4].
>=20
> [3] https://opengrok.housegordon.com/source/xref/gnulib/lib/sm3.c#377
> [4] https://opengrok.housegordon.com/source/xref/gnulib/lib/sm3.c#413
>=20
>=20
>=20
> Again, I'm not a cryptography expert, and perhaps this is secure.
> But it does look a bit suspicious.
>=20
>=20
> ---
>=20
> It's one thing to add it to a library, where it can not be accidentally
> used by non-expert users, but it's a different thing to provide an
> executable that will be shipped by default on all future GNU/Linux
> machine.
>=20
> I would humbly suggest we wait until other crypto experts evaluate
> 'sm3', and decide to offer it in their programs (preferably openssl /
> libressl) as a general-purpose program.

Thanks for looking at this Assaf.
I do agree that a general command released to everyone
has a higher bar than routines being available in a library.
As I mentioned previously inclusion in openssl should be
a minimum prerequisite, and even then making sm3sum generally
available should be carefully considered.

cheers,
P=C3=A1draig



From MAILER-DAEMON Sun Oct 29 17:49:09 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e8vS9-0000IK-Dx
	for mharc-coreutils@gnu.org; Sun, 29 Oct 2017 17:49:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41958)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e8vS6-0000IC-Ud
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:49:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@gmail.com>) id 1e8vS5-0002I5-Rp
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:49:07 -0400
Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:50533)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <meyering@gmail.com>) id 1e8vS5-0002Hm-NI
	for coreutils@gnu.org; Sun, 29 Oct 2017 17:49:05 -0400
Received: by mail-qt0-x241.google.com with SMTP id d9so14188450qtd.7
	for <coreutils@gnu.org>; Sun, 29 Oct 2017 14:49:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:sender:in-reply-to:references:from:date:message-id
	:subject:to:cc:content-transfer-encoding;
	bh=KQFqBu8mJO8nJ8l88kksndt546otrPz/Pz/QZFBdDLk=;
	b=aKYaGF9eaYUjFnhLf5v5NwWt0IH7hx1/1uj5k/1dh51VbqwqcGA2sweaqzqcA4u5K9
	8hklrIZYyAov8Y6kJg6nkMNbJY2YaJ/sO827g4ZTYBYIK3HtjwQZXL8E3sgY+iNYHtcA
	DE5X2JC9uNPw86NYkVtswDZyyJf7Pp2LnmS982xUrNUwz+TKwfxEf0Tq19z6LsXf76KI
	Q8QZ2IbPe+Hxnc4tNGelY1tX1TC4k9HtIMaKtXogtr3gMrjoc84ArKYrX+AcXCdUH3fI
	hUDXhJIBz7C9pww4TE+VI5dkMX1HQjpvbrzUi7amkKQfrEahYclsMxbU7awI7INMxTfv
	VVVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
	:date:message-id:subject:to:cc:content-transfer-encoding;
	bh=KQFqBu8mJO8nJ8l88kksndt546otrPz/Pz/QZFBdDLk=;
	b=fFVZnVi6r+tEZwJYhz5chjGkhPBSq65C++pbXjyv2hHE1mUP4sTNGOJmvtX/VmOP+7
	Qum8C720Ffygwb9cKw8Lq28kn/MfWuVn3smt6jla0YN+47L1aBqu2if+SwURBgjHz0Zj
	kuwPGXmTGJ4SGHd1QUCQGIBl8s7JSb3070uBP7OtAYCLTjmLLrakEeuko++CLpPRHUa8
	12X7ak1K7yEn896iGEDxG50VH6sqSnNxrMBtt5VeaDMA7q7TF85iGl06mLx2tqY2T2gn
	FU5yw365gqH4Bip8Kw9AqFPMR1pJPZlsvUHquKFAUYRg0xgqWT+43GExoKk89jmKccgj
	Rpdg==
X-Gm-Message-State: AMCzsaV3J5z6hC36UQXkF8z8rJZzKDteo+i6XfDRX7vIbrsbzOzZPPqH
	7Vc0W3UHYY3LNl9Se7ssVfyGz802bOszZrN7HV0=
X-Google-Smtp-Source: ABhQp+SWzkB9NpTDj8fEnaYhUcr3vz+jqP+SbPjGbV4YoHs+JSBDaiRVc5XVyqRYuenfR582zf2xWSdikJ1UXA/OGq0=
X-Received: by 10.237.57.228 with SMTP id m91mr11521625qte.267.1509313745045; 
	Sun, 29 Oct 2017 14:49:05 -0700 (PDT)
MIME-Version: 1.0
Sender: meyering@gmail.com
Received: by 10.55.198.145 with HTTP; Sun, 29 Oct 2017 14:48:44 -0700 (PDT)
In-Reply-To: <5bf08f03-e447-ebf8-0584-0821f6e498f2@draigBrady.com>
References: <lubpf3she3nb0j.fsf@meyering.net>
	<5bf08f03-e447-ebf8-0584-0821f6e498f2@draigBrady.com>
From: Jim Meyering <jim@meyering.net>
Date: Sun, 29 Oct 2017 14:48:44 -0700
X-Google-Sender-Auth: 4gjggLoqUawFKJ_08M-WhgacBo4
Message-ID: <CA+8g5KHYuPn+77ph7JMei4RFe326XpkKUNH3iEq7CJE9EMgsSg@mail.gmail.com>
Subject: Re: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
To: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@draigbrady.com>
Cc: Coreutils <coreutils@gnu.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c0d::241
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 21:49:08 -0000

On Sun, Oct 29, 2017 at 2:25 PM, P=C3=A1draig Brady <P@draigbrady.com> wrot=
e:
> On 27/10/17 21:37, Jim Meyering wrote:
>> I noticed a new warning/error when building with git-latest gcc,
>> and propose to fix it with this:
>>
>>>From f89c20bdf7ccc033cbc22662e932fae7761754fc Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@fb.com>
>> Date: Fri, 27 Oct 2017 21:14:37 -0700
>> Subject: [PATCH] build: ls.c: apply _GL_ATTRIBUTE_PURE to more functions
>>
>> * src/ls.c (DEFINE_SORT_FUNCTIONS): Apply _GL_ATTRIBUTE_PURE
>> to each strcmp-derived function definition, since GCC8 with
>> -Wsuggest-attribute=3Dpure now warns it is needed.
>
> +1
> Works fine with gcc 6.3.1 FWIW

Thanks. Pushed.


From MAILER-DAEMON Tue Oct 31 08:13:58 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e9VQc-0004Qy-HO
	for mharc-coreutils@gnu.org; Tue, 31 Oct 2017 08:13:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43665)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1e9VQX-0004Qq-Iu
	for coreutils@gnu.org; Tue, 31 Oct 2017 08:13:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1e9VQT-0006yP-U3
	for coreutils@gnu.org; Tue, 31 Oct 2017 08:13:53 -0400
Received: from mout.kundenserver.de ([212.227.126.131]:64975)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <mail@bernhard-voelker.de>)
	id 1e9VQT-0006w3-CK
	for coreutils@gnu.org; Tue, 31 Oct 2017 08:13:49 -0400
Received: from [192.168.101.10] ([91.12.164.42]) by mrelayeu.kundenserver.de
	(mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id
	0MaXEr-1dpuCp2rlZ-00K5di for <coreutils@gnu.org>;
	Tue, 31 Oct 2017 13:13:46 +0100
To: Coreutils <coreutils@gnu.org>
From: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: webcvs/coreutils/.htaccess: redirection withou scheme?
Message-ID: <79ce99ad-77ed-e9c2-d9d7-f29f70f55b08@bernhard-voelker.de>
Date: Tue, 31 Oct 2017 13:13:45 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
	Thunderbird/45.6.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------AB634863AE67B176820DA256"
X-Provags-ID: V03:K0:OzYEbAzmu4IKRqp03wqYuZxwtG/nz6MhAZtQgXkpzjzPAnpXcKi
	owogEu4Yb+FpMfoPqez9p6e5FTnGGQBgdvBRTtB8f9F7XP2Tns+jUoU0JUR4vN8YKMFiKpF
	Sps5/uO5EWnclW5i21523w0jvNuSccMyHeVl/NNk+8thIrP02+yo3aPAOuXRSv+8NhFq/OX
	7TpKXfvxhimerq3xfT4Qw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:7GQUUmgEuB4=:STLSte9uL0vScKN+YJITC/
	hcI9qFLDMQUKU9oEWoj2G2hKCwXn0FFLLFH5i7DQWIhGkk8zZSHkwe0Sh5ImnY8MS0lSyH/S6
	OFbjCoy7+YPynpeOmR947BXvvBuEPtKA7xx4Jmxw30bm3+dd5oKFvFYn7/VWrNSx8oZzbb0H6
	Wcqi6Sk5E32dLi+APTYZu9VmakcAC3XC9aJ7eex6z1xfTpDzhlEmNCufxCabE6mjrmbAn3+vt
	XelDULP1x3B9SYL7u03c1PUsCgHKmAHg8drPPo8o9H+RVEu+BFTnAIcog+nRQoqBJcyKRa8xE
	v+1aTT05NUTopqs1ZUKfPUr/3YIj1zI9BcCU6LfftSQ5ji/DNXns+Wn7H4Bm9ZdkLg6NQuBwW
	5gQBNwx8tj4OIERrjWq2KZDaD/TResATR5HVbPQa5yjcVxkETnuPgQR3uReu8HenQy+1iYY3J
	Uil3PPoBHbcwEKRHb7jNewDPcQLoV1ivtao50HLDG9b3hfyRRIgmfsGcVczlToiYfNkeLAZCZ
	jnWxGT674IGEcU2XffcRrmXq2xp6ZLuQnD9PrHwTNDCz8YLp3v1Idp9xe+ZlMbOa3MJqvGN4X
	YJCiJA25xI0rJ7EnajYrRTq01VJA/YUQsDuDYNHCh7v88BscHuOsMluapt+mQtEoKSN2OXrTk
	tIZ/TdIisgaCgneYBf10vbHsjlTzlkWPEgH0C2SqNEWe1OYyaY/L0MycFAumtbiA6OLFBTdFR
	S0Rbkfs2z5FcWqWHFBoa/RBXzsMkpRf8cj542A==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.126.131
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Oct 2017 12:13:56 -0000

This is a multi-part message in MIME format.
--------------AB634863AE67B176820DA256
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

With the next gnulib update, the "Full documentation" URLs will change
from http://... to https://..., so shouldn't we change the .htaccess rules
for the redirection into the html manual without the scheme and server part?

e.g. for cp:
-Redirect /software/coreutils/cp
http://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html#cp-invocation
+Redirect /software/coreutils/cp        /software/coreutils/manual/html_node/cp-invocation.html#cp-invocation

I don't know the Apache server settings, but I think this should work,
shouldn't it?  I cannot test though ...

Have a nice day,
Berny


--------------AB634863AE67B176820DA256
Content-Type: text/x-patch;
 name="webcvs-coreutils-htaccess-redirect-no-scheme.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="webcvs-coreutils-htaccess-redirect-no-scheme.patch"

Index: .htaccess
===================================================================
RCS file: /webcvs/coreutils/coreutils/.htaccess,v
retrieving revision 1.6
diff -u -r1.6 .htaccess
--- .htaccess	30 Nov 2016 23:01:34 -0000	1.6
+++ .htaccess	31 Oct 2017 12:06:25 -0000
@@ -1,6 +1,6 @@
 # for prog in $(~/git/coreutils/build-aux/gen-lists-of-programs.sh --list-progs); do
 #     { test "$prog" = libstdbuf.so || test "$prog" = 'blah'; } && continue
-#     base='http://www.gnu.org/software/coreutils/manual/html_node'
+#     base='/software/coreutils/manual/html_node'
 #     case "$prog" in
 #               [) node="test-invocation.html#test-invocation";;
 #       coreutils) node="Multi-call-invocation.html#Multi-call-invocation";;
@@ -10,111 +10,111 @@
 #     printf 'Redirect /software/coreutils/%-10s%s/%s\n' "$prog" "$base" "$node"
 # done >> .htaccess
 
-Redirect /software/coreutils/arch      http://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html#arch-invocation
-Redirect /software/coreutils/coreutils http://www.gnu.org/software/coreutils/manual/html_node/Multi-call-invocation.html#Multi-call-invocation
-Redirect /software/coreutils/hostname  http://www.gnu.org/software/coreutils/manual/html_node/hostname-invocation.html#hostname-invocation
-Redirect /software/coreutils/chroot    http://www.gnu.org/software/coreutils/manual/html_node/chroot-invocation.html#chroot-invocation
-Redirect /software/coreutils/df        http://www.gnu.org/software/coreutils/manual/html_node/df-invocation.html#df-invocation
-Redirect /software/coreutils/hostid    http://www.gnu.org/software/coreutils/manual/html_node/hostid-invocation.html#hostid-invocation
-Redirect /software/coreutils/nice      http://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html#nice-invocation
-Redirect /software/coreutils/pinky     http://www.gnu.org/software/coreutils/manual/html_node/pinky-invocation.html#pinky-invocation
-Redirect /software/coreutils/stdbuf    http://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html#stdbuf-invocation
-Redirect /software/coreutils/stty      http://www.gnu.org/software/coreutils/manual/html_node/stty-invocation.html#stty-invocation
-Redirect /software/coreutils/uptime    http://www.gnu.org/software/coreutils/manual/html_node/uptime-invocation.html#uptime-invocation
-Redirect /software/coreutils/users     http://www.gnu.org/software/coreutils/manual/html_node/users-invocation.html#users-invocation
-Redirect /software/coreutils/who       http://www.gnu.org/software/coreutils/manual/html_node/who-invocation.html#who-invocation
-Redirect /software/coreutils/[         http://www.gnu.org/software/coreutils/manual/html_node/test-invocation.html#test-invocation
-Redirect /software/coreutils/b2sum     http://www.gnu.org/software/coreutils/manual/html_node/b2sum-invocation.html#b2sum-invocation
-Redirect /software/coreutils/base32    http://www.gnu.org/software/coreutils/manual/html_node/base32-invocation.html#base32-invocation
-Redirect /software/coreutils/base64    http://www.gnu.org/software/coreutils/manual/html_node/base64-invocation.html#base64-invocation
-Redirect /software/coreutils/basename  http://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html#basename-invocation
-Redirect /software/coreutils/cat       http://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html#cat-invocation
-Redirect /software/coreutils/chcon     http://www.gnu.org/software/coreutils/manual/html_node/chcon-invocation.html#chcon-invocation
-Redirect /software/coreutils/chgrp     http://www.gnu.org/software/coreutils/manual/html_node/chgrp-invocation.html#chgrp-invocation
-Redirect /software/coreutils/chmod     http://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html#chmod-invocation
-Redirect /software/coreutils/chown     http://www.gnu.org/software/coreutils/manual/html_node/chown-invocation.html#chown-invocation
-Redirect /software/coreutils/cksum     http://www.gnu.org/software/coreutils/manual/html_node/cksum-invocation.html#cksum-invocation
-Redirect /software/coreutils/comm      http://www.gnu.org/software/coreutils/manual/html_node/comm-invocation.html#comm-invocation
-Redirect /software/coreutils/cp        http://www.gnu.org/software/coreutils/manual/html_node/cp-invocation.html#cp-invocation
-Redirect /software/coreutils/csplit    http://www.gnu.org/software/coreutils/manual/html_node/csplit-invocation.html#csplit-invocation
-Redirect /software/coreutils/cut       http://www.gnu.org/software/coreutils/manual/html_node/cut-invocation.html#cut-invocation
-Redirect /software/coreutils/date      http://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html#date-invocation
-Redirect /software/coreutils/dd        http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html#dd-invocation
-Redirect /software/coreutils/dir       http://www.gnu.org/software/coreutils/manual/html_node/dir-invocation.html#dir-invocation
-Redirect /software/coreutils/dircolors http://www.gnu.org/software/coreutils/manual/html_node/dircolors-invocation.html#dircolors-invocation
-Redirect /software/coreutils/dirname   http://www.gnu.org/software/coreutils/manual/html_node/dirname-invocation.html#dirname-invocation
-Redirect /software/coreutils/du        http://www.gnu.org/software/coreutils/manual/html_node/du-invocation.html#du-invocation
-Redirect /software/coreutils/echo      http://www.gnu.org/software/coreutils/manual/html_node/echo-invocation.html#echo-invocation
-Redirect /software/coreutils/env       http://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#env-invocation
-Redirect /software/coreutils/expand    http://www.gnu.org/software/coreutils/manual/html_node/expand-invocation.html#expand-invocation
-Redirect /software/coreutils/expr      http://www.gnu.org/software/coreutils/manual/html_node/expr-invocation.html#expr-invocation
-Redirect /software/coreutils/factor    http://www.gnu.org/software/coreutils/manual/html_node/factor-invocation.html#factor-invocation
-Redirect /software/coreutils/false     http://www.gnu.org/software/coreutils/manual/html_node/false-invocation.html#false-invocation
-Redirect /software/coreutils/fmt       http://www.gnu.org/software/coreutils/manual/html_node/fmt-invocation.html#fmt-invocation
-Redirect /software/coreutils/fold      http://www.gnu.org/software/coreutils/manual/html_node/fold-invocation.html#fold-invocation
-Redirect /software/coreutils/ginstall  http://www.gnu.org/software/coreutils/manual/html_node/ginstall-invocation.html#ginstall-invocation
-Redirect /software/coreutils/groups    http://www.gnu.org/software/coreutils/manual/html_node/groups-invocation.html#groups-invocation
-Redirect /software/coreutils/head      http://www.gnu.org/software/coreutils/manual/html_node/head-invocation.html#head-invocation
-Redirect /software/coreutils/id        http://www.gnu.org/software/coreutils/manual/html_node/id-invocation.html#id-invocation
-Redirect /software/coreutils/join      http://www.gnu.org/software/coreutils/manual/html_node/join-invocation.html#join-invocation
-Redirect /software/coreutils/kill      http://www.gnu.org/software/coreutils/manual/html_node/kill-invocation.html#kill-invocation
-Redirect /software/coreutils/link      http://www.gnu.org/software/coreutils/manual/html_node/link-invocation.html#link-invocation
-Redirect /software/coreutils/ln        http://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html#ln-invocation
-Redirect /software/coreutils/logname   http://www.gnu.org/software/coreutils/manual/html_node/logname-invocation.html#logname-invocation
-Redirect /software/coreutils/ls        http://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html#ls-invocation
-Redirect /software/coreutils/md5sum    http://www.gnu.org/software/coreutils/manual/html_node/md5sum-invocation.html#md5sum-invocation
-Redirect /software/coreutils/mkdir     http://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html#mkdir-invocation
-Redirect /software/coreutils/mkfifo    http://www.gnu.org/software/coreutils/manual/html_node/mkfifo-invocation.html#mkfifo-invocation
-Redirect /software/coreutils/mknod     http://www.gnu.org/software/coreutils/manual/html_node/mknod-invocation.html#mknod-invocation
-Redirect /software/coreutils/mktemp    http://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html#mktemp-invocation
-Redirect /software/coreutils/mv        http://www.gnu.org/software/coreutils/manual/html_node/mv-invocation.html#mv-invocation
-Redirect /software/coreutils/nl        http://www.gnu.org/software/coreutils/manual/html_node/nl-invocation.html#nl-invocation
-Redirect /software/coreutils/nproc     http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html#nproc-invocation
-Redirect /software/coreutils/nohup     http://www.gnu.org/software/coreutils/manual/html_node/nohup-invocation.html#nohup-invocation
-Redirect /software/coreutils/numfmt    http://www.gnu.org/software/coreutils/manual/html_node/numfmt-invocation.html#numfmt-invocation
-Redirect /software/coreutils/od        http://www.gnu.org/software/coreutils/manual/html_node/od-invocation.html#od-invocation
-Redirect /software/coreutils/paste     http://www.gnu.org/software/coreutils/manual/html_node/paste-invocation.html#paste-invocation
-Redirect /software/coreutils/pathchk   http://www.gnu.org/software/coreutils/manual/html_node/pathchk-invocation.html#pathchk-invocation
-Redirect /software/coreutils/pr        http://www.gnu.org/software/coreutils/manual/html_node/pr-invocation.html#pr-invocation
-Redirect /software/coreutils/printenv  http://www.gnu.org/software/coreutils/manual/html_node/printenv-invocation.html#printenv-invocation
-Redirect /software/coreutils/printf    http://www.gnu.org/software/coreutils/manual/html_node/printf-invocation.html#printf-invocation
-Redirect /software/coreutils/ptx       http://www.gnu.org/software/coreutils/manual/html_node/ptx-invocation.html#ptx-invocation
-Redirect /software/coreutils/pwd       http://www.gnu.org/software/coreutils/manual/html_node/pwd-invocation.html#pwd-invocation
-Redirect /software/coreutils/readlink  http://www.gnu.org/software/coreutils/manual/html_node/readlink-invocation.html#readlink-invocation
-Redirect /software/coreutils/realpath  http://www.gnu.org/software/coreutils/manual/html_node/realpath-invocation.html#realpath-invocation
-Redirect /software/coreutils/rm        http://www.gnu.org/software/coreutils/manual/html_node/rm-invocation.html#rm-invocation
-Redirect /software/coreutils/rmdir     http://www.gnu.org/software/coreutils/manual/html_node/rmdir-invocation.html#rmdir-invocation
-Redirect /software/coreutils/runcon    http://www.gnu.org/software/coreutils/manual/html_node/runcon-invocation.html#runcon-invocation
-Redirect /software/coreutils/seq       http://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation
-Redirect /software/coreutils/sha1sum   http://www.gnu.org/software/coreutils/manual/html_node/sha1sum-invocation.html#sha1sum-invocation
-Redirect /software/coreutils/sha224sum http://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
-Redirect /software/coreutils/sha256sum http://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
-Redirect /software/coreutils/sha384sum http://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
-Redirect /software/coreutils/sha512sum http://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
-Redirect /software/coreutils/shred     http://www.gnu.org/software/coreutils/manual/html_node/shred-invocation.html#shred-invocation
-Redirect /software/coreutils/shuf      http://www.gnu.org/software/coreutils/manual/html_node/shuf-invocation.html#shuf-invocation
-Redirect /software/coreutils/sleep     http://www.gnu.org/software/coreutils/manual/html_node/sleep-invocation.html#sleep-invocation
-Redirect /software/coreutils/sort      http://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html#sort-invocation
-Redirect /software/coreutils/split     http://www.gnu.org/software/coreutils/manual/html_node/split-invocation.html#split-invocation
-Redirect /software/coreutils/stat      http://www.gnu.org/software/coreutils/manual/html_node/stat-invocation.html#stat-invocation
-Redirect /software/coreutils/sum       http://www.gnu.org/software/coreutils/manual/html_node/sum-invocation.html#sum-invocation
-Redirect /software/coreutils/sync      http://www.gnu.org/software/coreutils/manual/html_node/sync-invocation.html#sync-invocation
-Redirect /software/coreutils/tac       http://www.gnu.org/software/coreutils/manual/html_node/tac-invocation.html#tac-invocation
-Redirect /software/coreutils/tail      http://www.gnu.org/software/coreutils/manual/html_node/tail-invocation.html#tail-invocation
-Redirect /software/coreutils/tee       http://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html#tee-invocation
-Redirect /software/coreutils/test      http://www.gnu.org/software/coreutils/manual/html_node/test-invocation.html#test-invocation
-Redirect /software/coreutils/timeout   http://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html#timeout-invocation
-Redirect /software/coreutils/touch     http://www.gnu.org/software/coreutils/manual/html_node/touch-invocation.html#touch-invocation
-Redirect /software/coreutils/tr        http://www.gnu.org/software/coreutils/manual/html_node/tr-invocation.html#tr-invocation
-Redirect /software/coreutils/true      http://www.gnu.org/software/coreutils/manual/html_node/true-invocation.html#true-invocation
-Redirect /software/coreutils/truncate  http://www.gnu.org/software/coreutils/manual/html_node/truncate-invocation.html#truncate-invocation
-Redirect /software/coreutils/tsort     http://www.gnu.org/software/coreutils/manual/html_node/tsort-invocation.html#tsort-invocation
-Redirect /software/coreutils/tty       http://www.gnu.org/software/coreutils/manual/html_node/tty-invocation.html#tty-invocation
-Redirect /software/coreutils/uname     http://www.gnu.org/software/coreutils/manual/html_node/uname-invocation.html#uname-invocation
-Redirect /software/coreutils/unexpand  http://www.gnu.org/software/coreutils/manual/html_node/unexpand-invocation.html#unexpand-invocation
-Redirect /software/coreutils/uniq      http://www.gnu.org/software/coreutils/manual/html_node/uniq-invocation.html#uniq-invocation
-Redirect /software/coreutils/unlink    http://www.gnu.org/software/coreutils/manual/html_node/unlink-invocation.html#unlink-invocation
-Redirect /software/coreutils/vdir      http://www.gnu.org/software/coreutils/manual/html_node/vdir-invocation.html#vdir-invocation
-Redirect /software/coreutils/wc        http://www.gnu.org/software/coreutils/manual/html_node/wc-invocation.html#wc-invocation
-Redirect /software/coreutils/whoami    http://www.gnu.org/software/coreutils/manual/html_node/whoami-invocation.html#whoami-invocation
-Redirect /software/coreutils/yes       http://www.gnu.org/software/coreutils/manual/html_node/yes-invocation.html#yes-invocation
+Redirect /software/coreutils/arch      /software/coreutils/manual/html_node/arch-invocation.html#arch-invocation
+Redirect /software/coreutils/coreutils /software/coreutils/manual/html_node/Multi-call-invocation.html#Multi-call-invocation
+Redirect /software/coreutils/hostname  /software/coreutils/manual/html_node/hostname-invocation.html#hostname-invocation
+Redirect /software/coreutils/chroot    /software/coreutils/manual/html_node/chroot-invocation.html#chroot-invocation
+Redirect /software/coreutils/df        /software/coreutils/manual/html_node/df-invocation.html#df-invocation
+Redirect /software/coreutils/hostid    /software/coreutils/manual/html_node/hostid-invocation.html#hostid-invocation
+Redirect /software/coreutils/nice      /software/coreutils/manual/html_node/nice-invocation.html#nice-invocation
+Redirect /software/coreutils/pinky     /software/coreutils/manual/html_node/pinky-invocation.html#pinky-invocation
+Redirect /software/coreutils/stdbuf    /software/coreutils/manual/html_node/stdbuf-invocation.html#stdbuf-invocation
+Redirect /software/coreutils/stty      /software/coreutils/manual/html_node/stty-invocation.html#stty-invocation
+Redirect /software/coreutils/timeout   /software/coreutils/manual/html_node/timeout-invocation.html#timeout-invocation
+Redirect /software/coreutils/uptime    /software/coreutils/manual/html_node/uptime-invocation.html#uptime-invocation
+Redirect /software/coreutils/users     /software/coreutils/manual/html_node/users-invocation.html#users-invocation
+Redirect /software/coreutils/who       /software/coreutils/manual/html_node/who-invocation.html#who-invocation
+Redirect /software/coreutils/[         /software/coreutils/manual/html_node/test-invocation.html#test-invocation
+Redirect /software/coreutils/b2sum     /software/coreutils/manual/html_node/b2sum-invocation.html#b2sum-invocation
+Redirect /software/coreutils/base64    /software/coreutils/manual/html_node/base64-invocation.html#base64-invocation
+Redirect /software/coreutils/base32    /software/coreutils/manual/html_node/base32-invocation.html#base32-invocation
+Redirect /software/coreutils/basename  /software/coreutils/manual/html_node/basename-invocation.html#basename-invocation
+Redirect /software/coreutils/cat       /software/coreutils/manual/html_node/cat-invocation.html#cat-invocation
+Redirect /software/coreutils/chcon     /software/coreutils/manual/html_node/chcon-invocation.html#chcon-invocation
+Redirect /software/coreutils/chgrp     /software/coreutils/manual/html_node/chgrp-invocation.html#chgrp-invocation
+Redirect /software/coreutils/chmod     /software/coreutils/manual/html_node/chmod-invocation.html#chmod-invocation
+Redirect /software/coreutils/chown     /software/coreutils/manual/html_node/chown-invocation.html#chown-invocation
+Redirect /software/coreutils/cksum     /software/coreutils/manual/html_node/cksum-invocation.html#cksum-invocation
+Redirect /software/coreutils/comm      /software/coreutils/manual/html_node/comm-invocation.html#comm-invocation
+Redirect /software/coreutils/cp        /software/coreutils/manual/html_node/cp-invocation.html#cp-invocation
+Redirect /software/coreutils/csplit    /software/coreutils/manual/html_node/csplit-invocation.html#csplit-invocation
+Redirect /software/coreutils/cut       /software/coreutils/manual/html_node/cut-invocation.html#cut-invocation
+Redirect /software/coreutils/date      /software/coreutils/manual/html_node/date-invocation.html#date-invocation
+Redirect /software/coreutils/dd        /software/coreutils/manual/html_node/dd-invocation.html#dd-invocation
+Redirect /software/coreutils/dir       /software/coreutils/manual/html_node/dir-invocation.html#dir-invocation
+Redirect /software/coreutils/dircolors /software/coreutils/manual/html_node/dircolors-invocation.html#dircolors-invocation
+Redirect /software/coreutils/dirname   /software/coreutils/manual/html_node/dirname-invocation.html#dirname-invocation
+Redirect /software/coreutils/du        /software/coreutils/manual/html_node/du-invocation.html#du-invocation
+Redirect /software/coreutils/echo      /software/coreutils/manual/html_node/echo-invocation.html#echo-invocation
+Redirect /software/coreutils/env       /software/coreutils/manual/html_node/env-invocation.html#env-invocation
+Redirect /software/coreutils/expand    /software/coreutils/manual/html_node/expand-invocation.html#expand-invocation
+Redirect /software/coreutils/expr      /software/coreutils/manual/html_node/expr-invocation.html#expr-invocation
+Redirect /software/coreutils/factor    /software/coreutils/manual/html_node/factor-invocation.html#factor-invocation
+Redirect /software/coreutils/false     /software/coreutils/manual/html_node/false-invocation.html#false-invocation
+Redirect /software/coreutils/fmt       /software/coreutils/manual/html_node/fmt-invocation.html#fmt-invocation
+Redirect /software/coreutils/fold      /software/coreutils/manual/html_node/fold-invocation.html#fold-invocation
+Redirect /software/coreutils/ginstall  /software/coreutils/manual/html_node/ginstall-invocation.html#ginstall-invocation
+Redirect /software/coreutils/groups    /software/coreutils/manual/html_node/groups-invocation.html#groups-invocation
+Redirect /software/coreutils/head      /software/coreutils/manual/html_node/head-invocation.html#head-invocation
+Redirect /software/coreutils/id        /software/coreutils/manual/html_node/id-invocation.html#id-invocation
+Redirect /software/coreutils/join      /software/coreutils/manual/html_node/join-invocation.html#join-invocation
+Redirect /software/coreutils/kill      /software/coreutils/manual/html_node/kill-invocation.html#kill-invocation
+Redirect /software/coreutils/link      /software/coreutils/manual/html_node/link-invocation.html#link-invocation
+Redirect /software/coreutils/ln        /software/coreutils/manual/html_node/ln-invocation.html#ln-invocation
+Redirect /software/coreutils/logname   /software/coreutils/manual/html_node/logname-invocation.html#logname-invocation
+Redirect /software/coreutils/ls        /software/coreutils/manual/html_node/ls-invocation.html#ls-invocation
+Redirect /software/coreutils/md5sum    /software/coreutils/manual/html_node/md5sum-invocation.html#md5sum-invocation
+Redirect /software/coreutils/mkdir     /software/coreutils/manual/html_node/mkdir-invocation.html#mkdir-invocation
+Redirect /software/coreutils/mkfifo    /software/coreutils/manual/html_node/mkfifo-invocation.html#mkfifo-invocation
+Redirect /software/coreutils/mknod     /software/coreutils/manual/html_node/mknod-invocation.html#mknod-invocation
+Redirect /software/coreutils/mktemp    /software/coreutils/manual/html_node/mktemp-invocation.html#mktemp-invocation
+Redirect /software/coreutils/mv        /software/coreutils/manual/html_node/mv-invocation.html#mv-invocation
+Redirect /software/coreutils/nl        /software/coreutils/manual/html_node/nl-invocation.html#nl-invocation
+Redirect /software/coreutils/nproc     /software/coreutils/manual/html_node/nproc-invocation.html#nproc-invocation
+Redirect /software/coreutils/nohup     /software/coreutils/manual/html_node/nohup-invocation.html#nohup-invocation
+Redirect /software/coreutils/numfmt    /software/coreutils/manual/html_node/numfmt-invocation.html#numfmt-invocation
+Redirect /software/coreutils/od        /software/coreutils/manual/html_node/od-invocation.html#od-invocation
+Redirect /software/coreutils/paste     /software/coreutils/manual/html_node/paste-invocation.html#paste-invocation
+Redirect /software/coreutils/pathchk   /software/coreutils/manual/html_node/pathchk-invocation.html#pathchk-invocation
+Redirect /software/coreutils/pr        /software/coreutils/manual/html_node/pr-invocation.html#pr-invocation
+Redirect /software/coreutils/printenv  /software/coreutils/manual/html_node/printenv-invocation.html#printenv-invocation
+Redirect /software/coreutils/printf    /software/coreutils/manual/html_node/printf-invocation.html#printf-invocation
+Redirect /software/coreutils/ptx       /software/coreutils/manual/html_node/ptx-invocation.html#ptx-invocation
+Redirect /software/coreutils/pwd       /software/coreutils/manual/html_node/pwd-invocation.html#pwd-invocation
+Redirect /software/coreutils/readlink  /software/coreutils/manual/html_node/readlink-invocation.html#readlink-invocation
+Redirect /software/coreutils/realpath  /software/coreutils/manual/html_node/realpath-invocation.html#realpath-invocation
+Redirect /software/coreutils/rm        /software/coreutils/manual/html_node/rm-invocation.html#rm-invocation
+Redirect /software/coreutils/rmdir     /software/coreutils/manual/html_node/rmdir-invocation.html#rmdir-invocation
+Redirect /software/coreutils/runcon    /software/coreutils/manual/html_node/runcon-invocation.html#runcon-invocation
+Redirect /software/coreutils/seq       /software/coreutils/manual/html_node/seq-invocation.html#seq-invocation
+Redirect /software/coreutils/sha1sum   /software/coreutils/manual/html_node/sha1sum-invocation.html#sha1sum-invocation
+Redirect /software/coreutils/sha224sum /software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
+Redirect /software/coreutils/sha256sum /software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
+Redirect /software/coreutils/sha384sum /software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
+Redirect /software/coreutils/sha512sum /software/coreutils/manual/html_node/sha2-utilities#sha2-utilities
+Redirect /software/coreutils/shred     /software/coreutils/manual/html_node/shred-invocation.html#shred-invocation
+Redirect /software/coreutils/shuf      /software/coreutils/manual/html_node/shuf-invocation.html#shuf-invocation
+Redirect /software/coreutils/sleep     /software/coreutils/manual/html_node/sleep-invocation.html#sleep-invocation
+Redirect /software/coreutils/sort      /software/coreutils/manual/html_node/sort-invocation.html#sort-invocation
+Redirect /software/coreutils/split     /software/coreutils/manual/html_node/split-invocation.html#split-invocation
+Redirect /software/coreutils/stat      /software/coreutils/manual/html_node/stat-invocation.html#stat-invocation
+Redirect /software/coreutils/sum       /software/coreutils/manual/html_node/sum-invocation.html#sum-invocation
+Redirect /software/coreutils/sync      /software/coreutils/manual/html_node/sync-invocation.html#sync-invocation
+Redirect /software/coreutils/tac       /software/coreutils/manual/html_node/tac-invocation.html#tac-invocation
+Redirect /software/coreutils/tail      /software/coreutils/manual/html_node/tail-invocation.html#tail-invocation
+Redirect /software/coreutils/tee       /software/coreutils/manual/html_node/tee-invocation.html#tee-invocation
+Redirect /software/coreutils/test      /software/coreutils/manual/html_node/test-invocation.html#test-invocation
+Redirect /software/coreutils/touch     /software/coreutils/manual/html_node/touch-invocation.html#touch-invocation
+Redirect /software/coreutils/tr        /software/coreutils/manual/html_node/tr-invocation.html#tr-invocation
+Redirect /software/coreutils/true      /software/coreutils/manual/html_node/true-invocation.html#true-invocation
+Redirect /software/coreutils/truncate  /software/coreutils/manual/html_node/truncate-invocation.html#truncate-invocation
+Redirect /software/coreutils/tsort     /software/coreutils/manual/html_node/tsort-invocation.html#tsort-invocation
+Redirect /software/coreutils/tty       /software/coreutils/manual/html_node/tty-invocation.html#tty-invocation
+Redirect /software/coreutils/uname     /software/coreutils/manual/html_node/uname-invocation.html#uname-invocation
+Redirect /software/coreutils/unexpand  /software/coreutils/manual/html_node/unexpand-invocation.html#unexpand-invocation
+Redirect /software/coreutils/uniq      /software/coreutils/manual/html_node/uniq-invocation.html#uniq-invocation
+Redirect /software/coreutils/unlink    /software/coreutils/manual/html_node/unlink-invocation.html#unlink-invocation
+Redirect /software/coreutils/vdir      /software/coreutils/manual/html_node/vdir-invocation.html#vdir-invocation
+Redirect /software/coreutils/wc        /software/coreutils/manual/html_node/wc-invocation.html#wc-invocation
+Redirect /software/coreutils/whoami    /software/coreutils/manual/html_node/whoami-invocation.html#whoami-invocation
+Redirect /software/coreutils/yes       /software/coreutils/manual/html_node/yes-invocation.html#yes-invocation

--------------AB634863AE67B176820DA256--


From MAILER-DAEMON Tue Oct 31 18:35:16 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1e9f7r-0004QB-To
	for mharc-coreutils@gnu.org; Tue, 31 Oct 2017 18:35:15 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52866)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e9f7p-0004Mu-UU
	for coreutils@gnu.org; Tue, 31 Oct 2017 18:35:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1e9f7l-0007aW-Ue
	for coreutils@gnu.org; Tue, 31 Oct 2017 18:35:13 -0400
Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]:54001)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <assafgordon@gmail.com>)
	id 1e9f7l-0007Zv-Ok
	for coreutils@gnu.org; Tue, 31 Oct 2017 18:35:09 -0400
Received: by mail-io0-x235.google.com with SMTP id 189so2217707iow.10
	for <coreutils@gnu.org>; Tue, 31 Oct 2017 15:35:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:references:from:message-id:date:user-agent:mime-version
	:in-reply-to:content-language:content-transfer-encoding;
	bh=YolKZS28YLEdFbH5hnZFpbAuA5SCKkv4ExfOKQupkFE=;
	b=Zf2wyexoa1NAk/26Guj3UtXb+2tJSKRhkV6Ge5vnPeFfQK3aUuBFZIc7l+l6Rf7lbi
	MKJNIZHy6ZovPiQrwQj8xQ+lmq5GzZfluQoQCekmlNK4UxMdEeB6Loymky4wcyIpypXq
	n86V/Fv+LqwKR8X3n8MXytm9qie+9U0YL4Nip3+vKHwfVuDEVlXg8Bs7QFc4ob7+h0Kx
	94nTMr9cgEc6otRmidhVqg+b28ImLDhMZyzsaHvZ5LqxyYSxzE7uVQNnwgZ3Y0AhimYM
	2dtZITdef27Pbn6eUPapxhDcrTA9W57LyFviDw0JcG6UbMeaAQOy+8cQD0fRPLRdN2zE
	ETXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:from:message-id:date
	:user-agent:mime-version:in-reply-to:content-language
	:content-transfer-encoding;
	bh=YolKZS28YLEdFbH5hnZFpbAuA5SCKkv4ExfOKQupkFE=;
	b=MDff2MVryfLzsTnxce6ghoIaaJN8lbw6I6T6/J9+Gu8659UuL/9gS94jjqZnyRZwYJ
	qKe3OIswVmGTWW4sI87GGQdTHrIYWq8fYDyKTWyL6tP3QQPeTtfXO8H24w8+RWUx6rnY
	G1CMjRABTBOILXB4mpMN75EMPG8UwibdZNPJDcxvsHbNr7azfmiHp6C5HkbJl+U6Uzwb
	8NgYGrexOVy1aAXcNbdpMCVbwiR2zhFXp9LEq14Iinvm44bREKDJ+HfoxvEz+CKzqDrI
	9mbJREEis3d9J9Y8ApONPNZ3kQ4lVDSpPYA/ymGpd78N7dHMNspaWqPVwtB3UvlkUDrd
	sZhg==
X-Gm-Message-State: AMCzsaV7jep8xWYaW2C9YWQpgy6WYHs+499ya9EdboYcc1LHXZHF7ypv
	IGhjOSpPHCFYew+Jxg0QwpnNyXqV
X-Google-Smtp-Source: ABhQp+SL6xlGO0rozYbXHU6tvmqpSJAVLSuKwJP2DKOYKWGNxF9UkZZxXERXqvWYNKQ2GnYYuVlBOw==
X-Received: by 10.107.112.4 with SMTP id l4mr4547839ioc.261.1509489308504;
	Tue, 31 Oct 2017 15:35:08 -0700 (PDT)
Received: from [192.168.88.239] (moose.housegordon.com. [184.68.105.38])
	by smtp.googlemail.com with ESMTPSA id
	m145sm3489029itg.4.2017.10.31.15.35.07
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Tue, 31 Oct 2017 15:35:07 -0700 (PDT)
Subject: Re: webcvs/coreutils/.htaccess: redirection withou scheme?
To: Bernhard Voelker <mail@bernhard-voelker.de>, Coreutils <coreutils@gnu.org>
References: <79ce99ad-77ed-e9c2-d9d7-f29f70f55b08@bernhard-voelker.de>
From: Assaf Gordon <assafgordon@gmail.com>
Message-ID: <49f92a24-4f24-e81b-38ad-e78b653634ef@gmail.com>
Date: Tue, 31 Oct 2017 16:35:07 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <79ce99ad-77ed-e9c2-d9d7-f29f70f55b08@bernhard-voelker.de>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4001:c06::235
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: GNU coreutils General Discussion <coreutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/coreutils/>
List-Post: <mailto:coreutils@gnu.org>
List-Help: <mailto:coreutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/coreutils>,
	<mailto:coreutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Oct 2017 22:35:14 -0000

Hi,

On 2017-10-31 06:13 AM, Bernhard Voelker wrote:
> +Redirect /software/coreutils/cp        /software/coreutils/manual/html_node/cp-invocation.html#cp-invocation
> 
> I don't know the Apache server settings, but I think this should work,
> shouldn't it?  I cannot test though ...
> 

I've tested it on our dummy savannah project and it seems to work.

This is the new .htaccess file:
http://web.cvs.savannah.gnu.org/viewvc/test-project/test-project/.htaccess?revision=1.1&view=markup

Containing just one line:
   Redirect /test-project/foobar.html /test-project/test/foo.html

And apache uses it:
   $ curl -D /dev/stderr http://nongnu.org/test-project/foobar.html
   HTTP/1.1 302 Found
   Date: Tue, 31 Oct 2017 22:34:03 GMT
   Server: Apache/2.4.7
   Location: http://nongnu.org/test-project/test/foo.html


regards,
  - assaf




